From report at bugs.python.org Sat Dec 1 00:57:29 2018 From: report at bugs.python.org (Tim Peters) Date: Sat, 01 Dec 2018 05:57:29 +0000 Subject: [issue35369] List sorting makes duplicate comparisons In-Reply-To: <1543635233.42.0.788709270274.issue35369@psf.upfronthosting.co.za> Message-ID: <1543643849.3.0.788709270274.issue35369@psf.upfronthosting.co.za> Tim Peters added the comment: Yup, it can do some redundant comparisons; more on that here: https://mail.python.org/pipermail/python-dev/2018-August/155020.html I'm not inclined to make this already-difficult code even harder to understand for something that's quite likely not to matter - or even hurt. For example, if we're sorting a million randomly ordered objects, we can expect about 20 million comparisons. 9,800 is so close to zero compared to that it wouldn't be a measurable difference even if the new code came for free - which it doesn't. It adds whole new piles of tests/branches, which will almost certainly be mis-predicted on the first iteration of the outer loop because they always fail the "initial" part on iterations after the first. At best, they're cheap but pure do-nothing overhead on outer-loop iterations after the first. I also dislike that binarysort grows a pile of undocumented assumptions about the _context_ it's called in. As is, it can be used to sort any slice meeting the requirements spelled out in the comments. "Leaking" requirements across function boundaries is fragile. Note that this part: else IFLT(pivot, *p) { r = p; } else { l = p + 1; } doesn't work at all the way it "looks like" it works. It expands to: else if ((k = ISLT(pivot, *p)) < 0) goto fail; if (k) { r = p: } else { l = p + 1; } The r = p; and l = p + 1; lines you added above in your new code are useless, because this final "if (k)" block executes regardless of whether `initial` is true or false. Indeed, if you hadn't _also_ added new code to set `k` to 0 or 1, the code would be wrong. But that's impossible to see without expanding the macro. So if you pursue this, at least rewrite that block as: else { IFLT(pivot, *p) { r = p; else { l = p + 1; } } and remove the new "k = 1;" and "k = 0;" mystery lines. But unless there are real-world cases that show significant speedups, I'm - as I said in the message I linked to above - happy with the tradeoffs already in place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 03:01:14 2018 From: report at bugs.python.org (David Wyde) Date: Sat, 01 Dec 2018 08:01:14 +0000 Subject: [issue35369] List sorting makes duplicate comparisons In-Reply-To: <1543635233.42.0.788709270274.issue35369@psf.upfronthosting.co.za> Message-ID: <1543651274.21.0.788709270274.issue35369@psf.upfronthosting.co.za> David Wyde added the comment: Thanks for the speedy and helpful response. Keeping complexity down is fair. The wasted if-checks on subsequent iterations are certainly a negative trade-off. I saw that binarysort() is only called in one place, but I understand wanting to keep it generic. I think that slow comparison functions, especially when repeatedly sorting short lists, are the main use case. I don't know if that's common in performance-critical code. I've heard of using human choices for comparisons, when fewer decisions could provide a notable speedup. The patched code seems a bit slower in some situations, but is faster in others. Do you think it's worth posting to python-ideas to see what people's use cases are? ---------- Added file: https://bugs.python.org/file47964/sort-fix-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 04:22:41 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 01 Dec 2018 09:22:41 +0000 Subject: [issue34850] Emit a syntax warning for "is" with a literal In-Reply-To: <1538295319.77.0.545547206417.issue34850@psf.upfronthosting.co.za> Message-ID: <1543656161.54.0.788709270274.issue34850@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Oh neat, I didn't realize that Nathaniel. That makes such warnings much more useful. I'm fine if you go ahead with this change. In the unlikely event it turns out to cause user annoyance problems in betas due to third party code that can't be updated, we can reconsider. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 05:04:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 01 Dec 2018 10:04:06 +0000 Subject: [issue31177] unittest mock's reset_mock throws an error when an attribute has been deleted In-Reply-To: <1502374939.75.0.688742031254.issue31177@psf.upfronthosting.co.za> Message-ID: <1543658646.7.0.788709270274.issue31177@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset edeca92c84a3b08902ecdfe987cde00c7e617887 by Victor Stinner (Xtreak) in branch 'master': bpo-31177: Skip deleted attributes while calling reset_mock (GH-9302) https://github.com/python/cpython/commit/edeca92c84a3b08902ecdfe987cde00c7e617887 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 05:05:04 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 01 Dec 2018 10:05:04 +0000 Subject: [issue31177] unittest mock's reset_mock throws an error when an attribute has been deleted In-Reply-To: <1502374939.75.0.688742031254.issue31177@psf.upfronthosting.co.za> Message-ID: <1543658704.95.0.788709270274.issue31177@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10077 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 05:05:12 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 01 Dec 2018 10:05:12 +0000 Subject: [issue31177] unittest mock's reset_mock throws an error when an attribute has been deleted In-Reply-To: <1502374939.75.0.688742031254.issue31177@psf.upfronthosting.co.za> Message-ID: <1543658712.85.0.788709270274.issue31177@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10078 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 05:16:29 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 01 Dec 2018 10:16:29 +0000 Subject: [issue31177] unittest mock's reset_mock throws an error when an attribute has been deleted In-Reply-To: <1502374939.75.0.688742031254.issue31177@psf.upfronthosting.co.za> Message-ID: <1543659389.79.0.788709270274.issue31177@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c0566e0ff6c2dd1a8b814ecd65649605c090527b by Miss Islington (bot) in branch '3.6': bpo-31177: Skip deleted attributes while calling reset_mock (GH-9302) https://github.com/python/cpython/commit/c0566e0ff6c2dd1a8b814ecd65649605c090527b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 05:24:52 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 01 Dec 2018 10:24:52 +0000 Subject: [issue31177] unittest mock's reset_mock throws an error when an attribute has been deleted In-Reply-To: <1502374939.75.0.688742031254.issue31177@psf.upfronthosting.co.za> Message-ID: <1543659892.62.0.788709270274.issue31177@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 422c1658b7d34fdc73c5fc895b135862103d1983 by Miss Islington (bot) in branch '3.7': bpo-31177: Skip deleted attributes while calling reset_mock (GH-9302) https://github.com/python/cpython/commit/422c1658b7d34fdc73c5fc895b135862103d1983 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 05:40:37 2018 From: report at bugs.python.org (Fabio Zadrozny) Date: Sat, 01 Dec 2018 10:40:37 +0000 Subject: [issue35370] Provide API to set the tracing function to be used for running threads. Message-ID: <1543660837.51.0.788709270274.issue35370@psf.upfronthosting.co.za> New submission from Fabio Zadrozny : Right now it's hard for debuggers to set the tracing function to be used for running threads. This would be really handy for debuggers when attaching to a running program to debug all threads. -- Note: currently there is a way to achieve that by pausing all the threads then selectively switching to a thread to make it current and setting the tracing function using the C-API (see: https://github.com/fabioz/PyDev.Debugger/blob/master/pydevd_attach_to_process/dll/attach.cpp#L1224), but I believe this is very hacky and not portable to other Python implementations. ---------- components: Interpreter Core messages: 330849 nosy: fabioz priority: normal severity: normal status: open title: Provide API to set the tracing function to be used for running threads. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 05:40:47 2018 From: report at bugs.python.org (Fabio Zadrozny) Date: Sat, 01 Dec 2018 10:40:47 +0000 Subject: [issue35370] Provide API to set the tracing function to be used for running threads. In-Reply-To: <1543660837.51.0.788709270274.issue35370@psf.upfronthosting.co.za> Message-ID: <1543660847.83.0.788709270274.issue35370@psf.upfronthosting.co.za> Change by Fabio Zadrozny : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 06:42:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2018 11:42:08 +0000 Subject: [issue35371] Fix undefined behavior in os.utime() on Windows Message-ID: <1543664528.12.0.788709270274.issue35371@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The hFile variable is used uninitialized in os.utime() on Windows when an error is raised in arguments parsing. This is an undefined behavior, and can cause a crash. ---------- assignee: serhiy.storchaka components: Extension Modules messages: 330850 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Fix undefined behavior in os.utime() on Windows type: crash versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 06:46:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2018 11:46:22 +0000 Subject: [issue35371] Fix undefined behavior in os.utime() on Windows In-Reply-To: <1543664528.12.0.788709270274.issue35371@psf.upfronthosting.co.za> Message-ID: <1543664782.38.0.788709270274.issue35371@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10079 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 07:30:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2018 12:30:22 +0000 Subject: [issue35371] Fix undefined behavior in os.utime() on Windows In-Reply-To: <1543664528.12.0.788709270274.issue35371@psf.upfronthosting.co.za> Message-ID: <1543667422.94.0.788709270274.issue35371@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 32bc11c33cf5ccea165b5f4ac3799f02fdf9c76a by Serhiy Storchaka in branch 'master': bpo-35371: Fix possible crash in os.utime() on Windows. (GH-10844) https://github.com/python/cpython/commit/32bc11c33cf5ccea165b5f4ac3799f02fdf9c76a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 07:30:34 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 01 Dec 2018 12:30:34 +0000 Subject: [issue35371] Fix undefined behavior in os.utime() on Windows In-Reply-To: <1543664528.12.0.788709270274.issue35371@psf.upfronthosting.co.za> Message-ID: <1543667434.82.0.788709270274.issue35371@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10080 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 07:30:45 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 01 Dec 2018 12:30:45 +0000 Subject: [issue35371] Fix undefined behavior in os.utime() on Windows In-Reply-To: <1543664528.12.0.788709270274.issue35371@psf.upfronthosting.co.za> Message-ID: <1543667445.34.0.788709270274.issue35371@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10081 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 07:52:06 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 01 Dec 2018 12:52:06 +0000 Subject: [issue35371] Fix undefined behavior in os.utime() on Windows In-Reply-To: <1543664528.12.0.788709270274.issue35371@psf.upfronthosting.co.za> Message-ID: <1543668726.7.0.788709270274.issue35371@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 265b41996aa3f604624a8046d1c314a1aee4b590 by Miss Islington (bot) in branch '3.7': bpo-35371: Fix possible crash in os.utime() on Windows. (GH-10844) https://github.com/python/cpython/commit/265b41996aa3f604624a8046d1c314a1aee4b590 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 07:53:39 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 01 Dec 2018 12:53:39 +0000 Subject: [issue35371] Fix undefined behavior in os.utime() on Windows In-Reply-To: <1543664528.12.0.788709270274.issue35371@psf.upfronthosting.co.za> Message-ID: <1543668819.4.0.788709270274.issue35371@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 013832ff964a0b3b59e04a07a33bae65c1c3ae84 by Miss Islington (bot) in branch '3.6': bpo-35371: Fix possible crash in os.utime() on Windows. (GH-10844) https://github.com/python/cpython/commit/013832ff964a0b3b59e04a07a33bae65c1c3ae84 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 08:21:17 2018 From: report at bugs.python.org (Mathieu Dupuy) Date: Sat, 01 Dec 2018 13:21:17 +0000 Subject: [issue22496] urllib2 fails against IIS (urllib2 can't parse 401 reply www-authenticate headers) In-Reply-To: <1411660131.7.0.581562777837.issue22496@psf.upfronthosting.co.za> Message-ID: <1543670477.55.0.788709270274.issue22496@psf.upfronthosting.co.za> Change by Mathieu Dupuy : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 08:47:05 2018 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Dec 2018 13:47:05 +0000 Subject: [issue14074] argparse allows nargs>1 for positional arguments but doesn't allow metavar to be a tuple In-Reply-To: <1329845918.75.0.31962840333.issue14074@psf.upfronthosting.co.za> Message-ID: <1543672025.87.0.788709270274.issue14074@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +10082 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 08:50:50 2018 From: report at bugs.python.org (Cyker Way) Date: Sat, 01 Dec 2018 13:50:50 +0000 Subject: [issue14074] argparse allows nargs>1 for positional arguments but doesn't allow metavar to be a tuple In-Reply-To: <1329845918.75.0.31962840333.issue14074@psf.upfronthosting.co.za> Message-ID: <1543672250.21.0.788709270274.issue14074@psf.upfronthosting.co.za> Cyker Way added the comment: Can confirm this bug still exists on master branch, python3.7, python3.6, and very likely other versions since it's reported. It seems only `_format_action_invocation` and `_get_action_name` need to be fixed. So we can do it more lightweight (<10 lines). ---------- nosy: +cykerway Added file: https://bugs.python.org/file47965/14074.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 12:17:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2018 17:17:56 +0000 Subject: [issue35372] Code page decoder incorrectly handles input >2GiB Message-ID: <1543684676.55.0.788709270274.issue35372@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : >>> b = b'a'*(2**31-2)+b'\xff'*2 >>> x, y = codecs.code_page_decode(932, b, 'replace', True) >>> len(x) 2 >>> x, y ('aa', 2147483648) ---------- assignee: serhiy.storchaka components: Interpreter Core messages: 330855 nosy: serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Code page decoder incorrectly handles input >2GiB type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 12:22:44 2018 From: report at bugs.python.org (Ronal Abraham) Date: Sat, 01 Dec 2018 17:22:44 +0000 Subject: [issue35332] shutil.rmtree(..., ignore_errors=True) doesn't ignore errors from os.close() In-Reply-To: <1543348313.91.0.788709270274.issue35332@psf.upfronthosting.co.za> Message-ID: <1543684964.27.0.788709270274.issue35332@psf.upfronthosting.co.za> Ronal Abraham added the comment: I forgot to mention: the exception raised is an OSError and the errno is 52 (ESTALE on AIX). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 12:33:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2018 17:33:53 +0000 Subject: [issue35372] Code page decoder incorrectly handles input >2GiB In-Reply-To: <1543684676.55.0.788709270274.issue35372@psf.upfronthosting.co.za> Message-ID: <1543685633.73.0.788709270274.issue35372@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10083 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 12:52:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2018 17:52:57 +0000 Subject: [issue35365] Use wchar_t* buffer instead of Unicode object in code page decoder In-Reply-To: <1543606479.07.0.788709270274.issue35365@psf.upfronthosting.co.za> Message-ID: <1543686777.13.0.788709270274.issue35365@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- dependencies: +Code page decoder incorrectly handles input >2GiB _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 12:58:42 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 01 Dec 2018 17:58:42 +0000 Subject: [issue31177] unittest mock's reset_mock throws an error when an attribute has been deleted In-Reply-To: <1502374939.75.0.688742031254.issue31177@psf.upfronthosting.co.za> Message-ID: <1543687122.49.0.788709270274.issue31177@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I am closing this as fixed since all the PRs were merged. Feel free to reopen this if needed. Thanks @mariocj89 and @vstinner for the review. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 13:03:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2018 18:03:04 +0000 Subject: [issue35373] PyInit_timezone() must return a value Message-ID: <1543687384.46.0.788709270274.issue35373@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : PyInit_timezone() is declared as returning int, but it contains return statements without value. >From compiler output on Windows: timemodule.c ..\Modules\timemodule.c(1584): warning C4033: 'PyInit_timezone' must return a value [C:\py\cpython3.8\PCbuild\pythoncore.vcxproj] ..\Modules\timemodule.c(1589): warning C4033: 'PyInit_timezone' must return a value [C:\py\cpython3.8\PCbuild\pythoncore.vcxproj] ..\Modules\timemodule.c(1593): warning C4033: 'PyInit_timezone' must return a value [C:\py\cpython3.8\PCbuild\pythoncore.vcxproj] c:\py\cpython3.8\modules\timemodule.c(1647): warning C4715: 'PyInit_timezone': not all control paths return a value [C:\py\cpython3.8\PCbuild\pythoncore.vcxproj] ---------- components: Extension Modules messages: 330858 nosy: serhiy.storchaka, vstinner priority: normal severity: normal status: open title: PyInit_timezone() must return a value type: compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 13:10:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2018 18:10:31 +0000 Subject: [issue35371] Fix undefined behavior in os.utime() on Windows In-Reply-To: <1543664528.12.0.788709270274.issue35371@psf.upfronthosting.co.za> Message-ID: <1543687831.23.0.788709270274.issue35371@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 Dec 1 13:33:52 2018 From: report at bugs.python.org (s-ball) Date: Sat, 01 Dec 2018 18:33:52 +0000 Subject: [issue35335] msgfmt should be able to merge more than one po file In-Reply-To: <1543389979.14.0.788709270274.issue35335@psf.upfronthosting.co.za> Message-ID: <1543689232.07.0.788709270274.issue35335@psf.upfronthosting.co.za> s-ball added the comment: I have followed SilentGhost's advice and begun by thoroughly testing the current behaviour. I then realized that I was wrong, and that (probably by chance) msgfmt.py partially followed my requirements, but pybabel did not and GNU gettext msgfmt did not really. I wrote 2 tiny po files (joined) and played with them, meaning I tried to combine them with pybabel, msgfmt.py and GNU gettext msg. Current behaviour (Windows shell syntax): > pybabel compile -o .\file12-fr.mo -l fr -i file1-fr.po -i file2-fr.po only uses second file (file2-fr.po) > msgfmt -o file12-fr.mo --no-hash file1-fr.po file2-fr.po chokes on a repeated key on file2 (the header has "" for key...). It works fine anyway after commenting out the header in any of the files > python "path\to\Tools\i18n\msgfmt.py" -o file12py-fr.mo file1-fr.po file2-fr.po unexpectedly produces the expected result and successfully combines both po files into one single mo file BUT: > python "path\to\Tools\i18n\msgfmt.py" file1-fr.po file2-fr.po Produces file1-fr.mo which is the compiled version of file1-fr.po and file2-fr.mo which combines both input files. Definitely not an expected result! This is caused by the problem identified in issue 9741 (https://bugs.python.org/issue9741) My initial goal was to be able to use the make function from msgfmt.py in an external script. I then realize that combining multiple po files is not a good idea because the resulting mo file can only contain one single header and the best behaviour is GNU gettext msgfmt one. I now wonder whether this issue should not be closed because the requirement is not relevant, and it would probably better to propose a fix (including tests and code improvement) for issue 9741. ---------- Added file: https://bugs.python.org/file47966/files.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 14:10:17 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 01 Dec 2018 19:10:17 +0000 Subject: [issue27715] call-matcher breaks if a method is mocked with spec=True In-Reply-To: <1470710605.81.0.432461136624.issue27715@psf.upfronthosting.co.za> Message-ID: <1543691417.39.0.788709270274.issue27715@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 15:53:18 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Dec 2018 20:53:18 +0000 Subject: [issue35369] List sorting makes duplicate comparisons In-Reply-To: <1543635233.42.0.788709270274.issue35369@psf.upfronthosting.co.za> Message-ID: <1543697598.21.0.788709270274.issue35369@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I've heard of using human choices for comparisons, when fewer decisions could provide a notable speedup. Memoization is the usual solution when expensive computations are being repeated. That technique preserves the work that was done and it avoids adding unnecessary complexity to the consumer code. > Do you think it's worth posting to python-ideas to see > what people's use cases are? No, that would be a waste of time and it wouldn't change the validity of Tim's insights. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 16:03:31 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Dec 2018 21:03:31 +0000 Subject: [issue35341] Add generic version of OrderedDict to typing module In-Reply-To: <1543425458.24.0.788709270274.issue35341@psf.upfronthosting.co.za> Message-ID: <1543698211.67.0.788709270274.issue35341@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Now that regular dicts are ordered, my expectation is that OrderedDict() is going to mostly fall into disuse (much like UserDict, UserList, UserString). That said, it would be nice if all of the collections classes had generic counterparts in the typing module. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 17:44:56 2018 From: report at bugs.python.org (David Wyde) Date: Sat, 01 Dec 2018 22:44:56 +0000 Subject: [issue35369] List sorting makes duplicate comparisons In-Reply-To: <1543635233.42.0.788709270274.issue35369@psf.upfronthosting.co.za> Message-ID: <1543704296.87.0.788709270274.issue35369@psf.upfronthosting.co.za> David Wyde added the comment: Okay. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 18:52:49 2018 From: report at bugs.python.org (Luna Chen) Date: Sat, 01 Dec 2018 23:52:49 +0000 Subject: [issue16516] argparse types (and actions) must be hashable In-Reply-To: <1353468507.9.0.0965555550975.issue16516@psf.upfronthosting.co.za> Message-ID: <1543708369.9.0.788709270274.issue16516@psf.upfronthosting.co.za> Luna Chen added the comment: Hi bradengroom, I have reviewed your PR, it's just a small thing! If you could update your PR, it would be amazing! Thank you! ---------- nosy: +BNMetrics _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 21:59:24 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Dec 2018 02:59:24 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543719564.18.0.788709270274.issue34172@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: multiprocessing.Pool.imap hangs in MacOs after applying this commit: import multiprocessing def the_test(): print("Begin") for x in multiprocessing.Pool().imap(int, ["4", "3"]): print(x) print("End") the_test() This also happens in the backported branches. ---------- nosy: +pablogsal status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 22:01:15 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Dec 2018 03:01:15 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543719675.2.0.788709270274.issue34172@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Bisecting between 3.7.0(good) and 3.7.1(bad) with the code in my previous commit points to: 97f998a4dfd6db6d867f446daa62445d0782bf39 is the first bad commit commit 97f998a4dfd6db6d867f446daa62445d0782bf39 Author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> Date: Tue Oct 2 14:17:04 2018 -0700 bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-8450) (GH-9676) Fix a reference issue inside multiprocessing.Pool that caused the pool to remain alive if it was deleted without being closed or terminated explicitly. (cherry picked from commit 97bfe8d3ebb0a54c8798f57555cb4152f9b2e1d0) Co-authored-by: tzickel :040000 040000 90e0af29e82d0fcc1c1d7e19b3659f9602596e3e d997cfb00c1c44bbd87ce15edfd391203362a1d7 M Lib :040000 040000 6aa4273821c2c563ea69370a59284ed48576416f b6d46f14b6bb36cc5ae62b3ca74025c24d683bb5 M Misc bisect run success ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 22:14:54 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Dec 2018 03:14:54 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543720494.03.0.788709270274.issue34172@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: This also happens on Linux, hanging in different moments: ? ./python test.py Begin 4 [hangs] ? ./python test.py Begin 4 3 [hangs] ? ./python test.py [hangs] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 00:37:15 2018 From: report at bugs.python.org (Ma Lin) Date: Sun, 02 Dec 2018 05:37:15 +0000 Subject: [issue35228] Index search in CHM help crashes viewer In-Reply-To: <1542107217.87.0.788709270274.issue35228@psf.upfronthosting.co.za> Message-ID: <1543729035.52.0.788709270274.issue35228@psf.upfronthosting.co.za> Ma Lin added the comment: I suffered this problem more than one years. Here is a solution, before compiling the chm, modify like this: --- D:\Python-3.7.1\Doc\build\htmlhelp\python371.hhp Sun Dec 02 13:12:37 2018 +++ D:\fix_crash\python371.hhp Sun Dec 02 13:05:57 2018 @@ -1,6 +1,6 @@ [OPTIONS] Binary TOC=No -Binary Index=No +Binary Index=Yes Compiled file=python371.chm Contents file=python371.hhc Default Window=python371 The chm will generate a binary file python371.chw in the same folder when first opened. No longer crash, but duplicated entries don't show Title anymore, see the attached picture. ---------- nosy: +Ma Lin Added file: https://bugs.python.org/file47967/binary_index.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 02:30:10 2018 From: report at bugs.python.org (tzickel) Date: Sun, 02 Dec 2018 07:30:10 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543735810.6.0.788709270274.issue34172@psf.upfronthosting.co.za> tzickel added the comment: A. It would be nice to add a test that tests this. B. Now that Pool is cleaning up properly, any of it's functions which return another object (like imap's IMapIterator) need to hold a reference to the Pool, so it won't get cleanedup before computing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 02:49:20 2018 From: report at bugs.python.org (tzickel) Date: Sun, 02 Dec 2018 07:49:20 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543736960.24.0.788709270274.issue34172@psf.upfronthosting.co.za> tzickel added the comment: here is something quick I did to check if it works (it works) but I'm not fluent in multiprocessing code, so If i'm missing something or doing something wrong feel free to tell me: https://github.com/tzickel/cpython/commit/ec63a43706f3bf615ab7ed30fb095607f6101e26 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 04:04:20 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 02 Dec 2018 09:04:20 +0000 Subject: [issue35227] [RFE] tarfile: support adding file objects without prior known size In-Reply-To: <1542097676.97.0.788709270274.issue35227@psf.upfronthosting.co.za> Message-ID: <1543741460.08.0.788709270274.issue35227@psf.upfronthosting.co.za> Martin Panter added the comment: If something like your ?addbuffer? method existed, then you won?t need to get the size first, right? We don?t need the changes in ?gettarinfo? for ?addbuffer? to be useful. BTW have you considered returning a file writer rather than accepting a file reader? Similar to ZipFile.open(..., mode='w'). It would be a bit more complicated to implement, but also more flexible for the user: # File downloaded with ?urlopen?, also possible with TarFile.addbuffer API: with tf.get_file_writer(download_tarinfo) as writer: shutil.copyfileobj(urlopen_response, writer) # SVG file generated on the fly, encoded with UTF-8 and Gzip compressed; not possible with ?addbuffer?: writer = tf.get_file_writer(svgz_tarinfo) gzip_writer = gzip.GzipFile(fileobj=writer, mode='w') with io.TextIOWrapper(gzip_writer, 'utf-8') as text_writer: svg = xml.sax.saxutils.XMLGenerator(text_writer, 'UTF-8') svg.startDocument() ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 04:23:30 2018 From: report at bugs.python.org (Christian Ullrich) Date: Sun, 02 Dec 2018 09:23:30 +0000 Subject: [issue35228] Index search in CHM help crashes viewer In-Reply-To: <1542107217.87.0.788709270274.issue35228@psf.upfronthosting.co.za> Message-ID: <1543742610.01.0.788709270274.issue35228@psf.upfronthosting.co.za> Christian Ullrich added the comment: Ma Lin, thanks for the suggestion! Yes, it looks like this option fixes the problem. I can reproduce the crash at will with a .chm built without this option, and not at all with one that has it on. If the .chm's directory is not writable, the .chw will be created, and later reused from, %APPDATA%\Microsoft\HTML Help. Unfortunately, sphinx apparently has no facility for setting this option to Yes in the generated .hhp file, so it will have to be modified before compilation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 04:42:08 2018 From: report at bugs.python.org (Christian Ullrich) Date: Sun, 02 Dec 2018 09:42:08 +0000 Subject: [issue35374] Windows doc build does not find autodetected hhc.exe Message-ID: <1543743728.61.0.788709270274.issue35374@psf.upfronthosting.co.za> New submission from Christian Ullrich : If hhc.exe is on the PATH when HTML Help is being built, the build fails because make.bat does not correctly remember the fact. The set command is very finicky with trailing spaces, leading to this: '"hhc "' is not recognized as an internal or external command, operable program or batch file. I suppose the "official" build does not rely on autodetection. In that case, a better fix would be to require setting HTMLHELP explicitly. PR (for the single-character fix) incoming. ---------- assignee: docs at python components: Documentation messages: 330872 nosy: chrullrich, docs at python priority: normal severity: normal status: open title: Windows doc build does not find autodetected hhc.exe type: compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 04:43:29 2018 From: report at bugs.python.org (Christian Ullrich) Date: Sun, 02 Dec 2018 09:43:29 +0000 Subject: [issue35374] Windows doc build does not find autodetected hhc.exe In-Reply-To: <1543743728.61.0.788709270274.issue35374@psf.upfronthosting.co.za> Message-ID: <1543743809.73.0.788709270274.issue35374@psf.upfronthosting.co.za> Change by Christian Ullrich : ---------- keywords: +patch pull_requests: +10084 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 04:55:03 2018 From: report at bugs.python.org (Ismo Toijala) Date: Sun, 02 Dec 2018 09:55:03 +0000 Subject: [issue35341] Add generic version of OrderedDict to typing module In-Reply-To: <1543425458.24.0.788709270274.issue35341@psf.upfronthosting.co.za> Message-ID: <1543744503.91.0.788709270274.issue35341@psf.upfronthosting.co.za> Ismo Toijala added the comment: My reason for using OrderedDict was that the normal dict is not reversible. I needed to get the last element added, so I ended up doing something like next(reversed(ordered_dict)). Perhaps this would be something to add to the normal dict (for 3.8?). Then I could migrate away from OrderedDict. Shall I open a new issue for this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 05:11:52 2018 From: report at bugs.python.org (Sriram Krishna) Date: Sun, 02 Dec 2018 10:11:52 +0000 Subject: [issue35375] name shadowing while a module tries to import another Message-ID: <1543745512.2.0.788709270274.issue35375@psf.upfronthosting.co.za> New submission from Sriram Krishna : Suppose I have a file profile.py in the same directory as the file I am running (say test.py) Let the contents of the files be: profile.py: raise Exception test.py: import cProfile now if I run test.py $ python test.py Traceback (most recent call last): File "test.py", line 1, in import cProfile File "/usr/lib/python3.7/cProfile.py", line 10, in import profile as _pyprofile File "/home/username/profile.py", line 1, in raise Exception Exception The file profile.py in '/usr/lib/python3.7' should have been loaded. This would also happen if test.py imported a module or package which imported cProfile. The only possible way of avoiding this problem completely is by ensuring that the name of any the python files don't match a builtin python file or the name of any installed package. A python user can't be expected to know the name of every possible file in the Python standard library. Maybe the current working directory should be removed from sys.path when importing from within another module not in the same directory. ---------- components: Interpreter Core messages: 330874 nosy: ksriram priority: normal severity: normal status: open title: name shadowing while a module tries to import another type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 05:13:00 2018 From: report at bugs.python.org (Ismo Toijala) Date: Sun, 02 Dec 2018 10:13:00 +0000 Subject: [issue35341] Add generic version of OrderedDict to typing module In-Reply-To: <1543425458.24.0.788709270274.issue35341@psf.upfronthosting.co.za> Message-ID: <1543745580.8.0.788709270274.issue35341@psf.upfronthosting.co.za> Change by Ismo Toijala : ---------- keywords: +patch pull_requests: +10085 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 05:30:26 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 02 Dec 2018 10:30:26 +0000 Subject: [issue35341] Add generic version of OrderedDict to typing module In-Reply-To: <1543425458.24.0.788709270274.issue35341@psf.upfronthosting.co.za> Message-ID: <1543746626.11.0.788709270274.issue35341@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: > Shall I open a new issue for this? @itoijala Please see https://bugs.python.org/issue33462. It's on master. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 05:35:10 2018 From: report at bugs.python.org (pmpp) Date: Sun, 02 Dec 2018 10:35:10 +0000 Subject: [issue35375] name shadowing while a module tries to import another In-Reply-To: <1543745512.2.0.788709270274.issue35375@psf.upfronthosting.co.za> Message-ID: <1543746910.04.0.788709270274.issue35375@psf.upfronthosting.co.za> pmpp added the comment: hi you are obsverving that because current working directory is set *first* in sys.path as a commodity you can avoid that with import sys,os sys.path.remove( os.getcwd() ) at the start of your program. otherwise usually it is wise to put user module in a package and choose its name with care. ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 05:40:49 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 02 Dec 2018 10:40:49 +0000 Subject: [issue35374] Windows doc build does not find autodetected hhc.exe In-Reply-To: <1543743728.61.0.788709270274.issue35374@psf.upfronthosting.co.za> Message-ID: <1543747249.11.0.788709270274.issue35374@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 05:43:14 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 02 Dec 2018 10:43:14 +0000 Subject: [issue35375] name shadowing while a module tries to import another In-Reply-To: <1543745512.2.0.788709270274.issue35375@psf.upfronthosting.co.za> Message-ID: <1543747394.12.0.788709270274.issue35375@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: > A python user can't be expected to know the name of every possible file in the Python standard library. Maybe the current working directory should be removed from sys.path when importing from within another module not in the same directory. I think there was a similar discussion about this since Perl did a related change : https://mail.python.org/pipermail/python-ideas/2017-June/045842.html ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 05:49:01 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 02 Dec 2018 10:49:01 +0000 Subject: [issue35227] [RFE] tarfile: support adding file objects without prior known size In-Reply-To: <1542097676.97.0.788709270274.issue35227@psf.upfronthosting.co.za> Message-ID: <1543747741.76.0.788709270274.issue35227@psf.upfronthosting.co.za> R?mi Lapeyre added the comment: Thanks, this looks interesting. How will the file writer know the whole file has been read? The override of the Tar header is done on `close`? Are `download_tarinfo` and `svgz_tarinfo` built by hand if we don't make changes in `gettarinfo`? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 06:15:07 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 02 Dec 2018 11:15:07 +0000 Subject: [issue29541] Python3 error while building on Alt-F In-Reply-To: <1486972341.9.0.0995375126995.issue29541@psf.upfronthosting.co.za> Message-ID: <1543749307.75.0.788709270274.issue29541@psf.upfronthosting.co.za> Martin Panter added the comment: The missing ?crypt? symbol is probably this function: . It is defined by the OS or a separate library, not by Python. You may need to link the ?_crypt? Python module to the library that contains the function. E.g. in Glibc you are meant to ?link with -lcrypt?, although I suspect Python?s ?setup.py? normally does that automatically. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 06:27:56 2018 From: report at bugs.python.org (Sriram Krishna) Date: Sun, 02 Dec 2018 11:27:56 +0000 Subject: [issue35375] name shadowing while a module tries to import another In-Reply-To: <1543745512.2.0.788709270274.issue35375@psf.upfronthosting.co.za> Message-ID: <1543750076.57.0.788709270274.issue35375@psf.upfronthosting.co.za> Sriram Krishna added the comment: My contention is that this behaviour breaks the Principle of Least Astonishment. In the particular example I gave, the user doesn't know (and can't be expected to know) the existence of a module called profile in the standard library. Here the user is not explicitly importing profile. The user can't be expected to know which submodules are imported by the modules they use. Hence they wouldn't expect another file sitting in the same directory to get imported when they are not explicitly importing it. on 2018-12-02 10:35, pmpp said: > you can avoid that with > import sys,os > sys.path.remove( os.getcwd() ) > at the start of your program. completely removing cwd from sys.path would disable the option of importing user modules. Any method of fixing this would be backwards incompatible, and will break some (most likely badly written) code. My hack solution was to have cwd in sys.path only if __name__ is '__main__'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 07:01:37 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 02 Dec 2018 12:01:37 +0000 Subject: [issue35227] [RFE] tarfile: support adding file objects without prior known size In-Reply-To: <1542097676.97.0.788709270274.issue35227@psf.upfronthosting.co.za> Message-ID: <1543752097.79.0.788709270274.issue35227@psf.upfronthosting.co.za> Martin Panter added the comment: Yeah, the TarFile class would fix up the header when the user calls ?close?. I think this is how it was done for ZipFile (implemented in Issue 26039). Yes currently you would have to build the tarinfo object by hand. I think a helper function would be nice, but the ?TarFile.gettarinfo? method is not a good place for that. In fact, documenting the default settings for the TarInfo constructor may be enough. Then you might get away with the following if you just want a regular file with no specific attributes: download_tarinfo = TarInfo('index.html') svgz_tarinfo = TarInfo('image.svg.gz') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 07:41:32 2018 From: report at bugs.python.org (Eryk Sun) Date: Sun, 02 Dec 2018 12:41:32 +0000 Subject: [issue35374] Windows doc build does not find autodetected hhc.exe In-Reply-To: <1543743728.61.0.788709270274.issue35374@psf.upfronthosting.co.za> Message-ID: <1543754492.11.0.788709270274.issue35374@psf.upfronthosting.co.za> Change by Eryk Sun : ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 08:04:04 2018 From: report at bugs.python.org (Sriram Krishna) Date: Sun, 02 Dec 2018 13:04:04 +0000 Subject: [issue35375] name shadowing while a module tries to import another In-Reply-To: <1543745512.2.0.788709270274.issue35375@psf.upfronthosting.co.za> Message-ID: <1543755844.14.0.788709270274.issue35375@psf.upfronthosting.co.za> Sriram Krishna added the comment: Already covered in issue29929: https://bugs.python.org/issue29929. Thanks xtreak for the link to the message thread. PEP 432 seems to have methods to resolve this. Currently if the code doesn't access to .local, one can use the -I commandline option and use from . import module for local imports. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 09:21:17 2018 From: report at bugs.python.org (Daniel Fortunov) Date: Sun, 02 Dec 2018 14:21:17 +0000 Subject: [issue35226] mock.call equality surprisingly broken In-Reply-To: <1542096332.14.0.788709270274.issue35226@psf.upfronthosting.co.za> Message-ID: <1543760477.65.0.788709270274.issue35226@psf.upfronthosting.co.za> Change by Daniel Fortunov : ---------- nosy: +dfortunov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 10:00:55 2018 From: report at bugs.python.org (rdb) Date: Sun, 02 Dec 2018 15:00:55 +0000 Subject: [issue35376] modulefinder skips nested modules with same name as top-level bad module Message-ID: <1543762855.5.0.788709270274.issue35376@psf.upfronthosting.co.za> New submission from rdb : If modulefinder finds a nested module import (eg. 'import a.b.c') while there is a top-level module with the same name (eg. 'c') that failed to import and got added to the badmodules list, it will skip it entirely without even trying to import it. This has a trivial fix (attached). The right thing to do is clearly to check it by fqname in the badmodules dict since that's also what it expects in other locations. I can make a PR as soon as my CLA gets validated, if that is more convenient. (Which branch should I make the PR against?) ---------- components: Library (Lib) files: patch.diff keywords: patch messages: 330883 nosy: rdb priority: normal severity: normal status: open title: modulefinder skips nested modules with same name as top-level bad module 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/file47968/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 10:27:37 2018 From: report at bugs.python.org (devkral) Date: Sun, 02 Dec 2018 15:27:37 +0000 Subject: [issue35377] urlsplit scheme argument broken Message-ID: <1543764457.53.0.788709270274.issue35377@psf.upfronthosting.co.za> New submission from devkral : the scheme argument of urlsplit/urlparse is completely broken. here two examples: urlunsplit(urlsplit("httpbin.org", scheme="https://")) 'https://:httpbin.org' urlunsplit(urlsplit("httpbin.org", scheme="https")) 'https:///httpbin.org' Fix: change urlsplit logic like this: ... url, scheme, _coerce_result = _coerce_args(url, scheme) scheme = scheme.rstrip("://") # this removes :// ... i = url.find('://') # harden against arbitrary : if i > 0: ... elif scheme: netloc, url = _splitnetloc(url, 0) # if scheme is specified, netloc is implied sry too lazy to create a patch from this. Most probably are all python versions affected but I checked only 2.7 and 3.7 . ---------- components: Library (Lib) messages: 330884 nosy: devkral priority: normal severity: normal status: open title: urlsplit scheme argument broken versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 10:30:26 2018 From: report at bugs.python.org (Farhaan Bukhsh) Date: Sun, 02 Dec 2018 15:30:26 +0000 Subject: [issue34238] When BROWSER is set on Mac webbrowser.register_standard_browsers doesn't work In-Reply-To: <1532623484.23.0.56676864532.issue34238@psf.upfronthosting.co.za> Message-ID: <1543764626.53.0.788709270274.issue34238@psf.upfronthosting.co.za> Farhaan Bukhsh added the comment: Hey I would like to take this bug and work on it, can you please anyone guide me how do I proceed? ---------- nosy: +fhackdroid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 10:40:47 2018 From: report at bugs.python.org (SilentGhost) Date: Sun, 02 Dec 2018 15:40:47 +0000 Subject: [issue35377] urlsplit scheme argument broken In-Reply-To: <1543764457.53.0.788709270274.issue35377@psf.upfronthosting.co.za> Message-ID: <1543765247.69.0.788709270274.issue35377@psf.upfronthosting.co.za> SilentGhost added the comment: While it might seem broken, it behaves according to documentation, it seems to me. ---------- nosy: +SilentGhost, orsenthil type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 10:45:17 2018 From: report at bugs.python.org (SilentGhost) Date: Sun, 02 Dec 2018 15:45:17 +0000 Subject: [issue35376] modulefinder skips nested modules with same name as top-level bad module In-Reply-To: <1543762855.5.0.788709270274.issue35376@psf.upfronthosting.co.za> Message-ID: <1543765517.18.0.788709270274.issue35376@psf.upfronthosting.co.za> Change by SilentGhost : ---------- nosy: +brett.cannon, eric.snow, ncoghlan stage: -> patch review versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 10:53:17 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 02 Dec 2018 15:53:17 +0000 Subject: [issue35341] Add generic version of OrderedDict to typing module In-Reply-To: <1543425458.24.0.788709270274.issue35341@psf.upfronthosting.co.za> Message-ID: <1543765997.78.0.788709270274.issue35341@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: New changeset 68b56d02ef20479b87c65e523cf3dec1b7b77d40 by Ivan Levkivskyi (Ismo Toijala) in branch 'master': bpo-35341: Add generic version of OrderedDict to typing (GH-10850) https://github.com/python/cpython/commit/68b56d02ef20479b87c65e523cf3dec1b7b77d40 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 10:53:34 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 02 Dec 2018 15:53:34 +0000 Subject: [issue35341] Add generic version of OrderedDict to typing module In-Reply-To: <1543425458.24.0.788709270274.issue35341@psf.upfronthosting.co.za> Message-ID: <1543766014.92.0.788709270274.issue35341@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10086 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 11:00:09 2018 From: report at bugs.python.org (devkral) Date: Sun, 02 Dec 2018 16:00:09 +0000 Subject: [issue35377] urlsplit scheme argument broken In-Reply-To: <1543764457.53.0.788709270274.issue35377@psf.upfronthosting.co.za> Message-ID: <1543766409.67.0.788709270274.issue35377@psf.upfronthosting.co.za> devkral added the comment: first a correction; there is one protocol where it make sense: file I would change: ... elif scheme: ... to ... elif scheme and scheme != "file": ... Second: no it is not a correct behaviour. Urlunsplit is supposed to create a valid url from a tuple created by urlsplit. :/// is not a valid url (except for the file protocol). Third: rstrip could be simplified to rstrip(":/") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 11:14:47 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 02 Dec 2018 16:14:47 +0000 Subject: [issue35341] Add generic version of OrderedDict to typing module In-Reply-To: <1543425458.24.0.788709270274.issue35341@psf.upfronthosting.co.za> Message-ID: <1543767287.0.0.788709270274.issue35341@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6cb0486ce861903448bd6ba1095685b6cd48e3bd by Miss Islington (bot) in branch '3.7': bpo-35341: Add generic version of OrderedDict to typing (GH-10850) https://github.com/python/cpython/commit/6cb0486ce861903448bd6ba1095685b6cd48e3bd ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 11:18:57 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 02 Dec 2018 16:18:57 +0000 Subject: [issue35341] Add generic version of OrderedDict to typing module In-Reply-To: <1543425458.24.0.788709270274.issue35341@psf.upfronthosting.co.za> Message-ID: <1543767537.28.0.788709270274.issue35341@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 Sun Dec 2 11:43:32 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Dec 2018 16:43:32 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects Message-ID: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : After applying the PRs in issue34172, multiprocessing.Pool.imap hangs on MacOs and Linux. This is a simple reproducer: import multiprocessing def the_test(): print("Begin") for x in multiprocessing.Pool().imap(int, ["4", "3"]): print(x) print("End") the_test() This happens because the IMapIterator does not maintain alive the multiprocessing.Pool object while it is still alive. ---------- components: Library (Lib) messages: 330890 nosy: pablogsal, pitrou, tzickel priority: normal severity: normal status: open title: multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 11:43:47 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Dec 2018 16:43:47 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543769027.75.0.788709270274.issue34172@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: As this issue was somehow still present previous to this commit, I am going to track this problem in a new issue: issue35378 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 12:23:31 2018 From: report at bugs.python.org (Prabakaran Kumaresshan) Date: Sun, 02 Dec 2018 17:23:31 +0000 Subject: =?utf-8?b?W2lzc3VlMzUzNjRdIERhdGV0aW1lIOKAnGZyb210aW1lc3RhbXAoKeKAnSBp?= =?utf-8?q?gnores_inheritance_if_timezone_is_not_None?= In-Reply-To: <1543598741.31.0.788709270274.issue35364@psf.upfronthosting.co.za> Message-ID: <1543771411.08.0.788709270274.issue35364@psf.upfronthosting.co.za> Prabakaran Kumaresshan added the comment: It's a side effect of a date arithmetic operation performed while setting timezone. while passing tz info to datetime invokes tz.fromutc() -> https://github.com/python/cpython/blob/3df85404d4bf420db3362eeae1345f2cad948a71/Lib/datetime.py#L1593 followed by a datetime arithmetic here -> https://github.com/python/cpython/blob/3df85404d4bf420db3362eeae1345f2cad948a71/Lib/datetime.py#L2188 which eventually leads to building a new datetime object here -> https://github.com/python/cpython/blob/3df85404d4bf420db3362eeae1345f2cad948a71/Lib/datetime.py#L1997-L2000 I'm not sure if its an expected behaviour ---------- nosy: +nixphix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 12:45:36 2018 From: report at bugs.python.org (tzickel) Date: Sun, 02 Dec 2018 17:45:36 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1543772736.32.0.788709270274.issue35378@psf.upfronthosting.co.za> tzickel added the comment: It's important to note that before those PR, that code would leak the Pool instance until the process ends (once per call). https://github.com/python/cpython/compare/master...tzickel:fix34172 Is my proposed fix (till I get it to a PR). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 12:56:27 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 02 Dec 2018 17:56:27 +0000 Subject: [issue35369] List sorting makes duplicate comparisons In-Reply-To: <1543635233.42.0.788709270274.issue35369@psf.upfronthosting.co.za> Message-ID: <1543773387.58.0.788709270274.issue35369@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 13:06:47 2018 From: report at bugs.python.org (Eric N. Vander Weele) Date: Sun, 02 Dec 2018 18:06:47 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1543774007.55.0.788709270274.issue35378@psf.upfronthosting.co.za> Change by Eric N. Vander Weele : ---------- nosy: +ericvw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 13:30:10 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 02 Dec 2018 18:30:10 +0000 Subject: [issue35379] IDLE's close fails when io.filename set to None Message-ID: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> New submission from Raymond Hettinger : I'm not sure that sequence of events that causes this, but more than once I've gotten the following traceback. Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py", line 1705, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/idlelib/multicall.py", line 176, in handler r = l[i](event) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/idlelib/filelist.py", line 54, in close_all_callback reply = edit.close() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/idlelib/editor.py", line 1017, in close self._close() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/idlelib/pyshell.py", line 309, in _close EditorWindow._close(self) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/idlelib/editor.py", line 1021, in _close if self.io.filename: AttributeError: 'NoneType' object has no attribute 'filename' ---------- assignee: terry.reedy components: IDLE messages: 330894 nosy: rhettinger, terry.reedy priority: normal severity: normal status: open title: IDLE's close fails when io.filename set to None versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 13:32:59 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Dec 2018 18:32:59 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1543775579.8.0.788709270274.issue35378@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: I was working already on a PR. Do you prefer to wait for yours instead? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 13:49:55 2018 From: report at bugs.python.org (tzickel) Date: Sun, 02 Dec 2018 18:49:55 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1543776595.33.0.788709270274.issue35378@psf.upfronthosting.co.za> tzickel added the comment: I dont mind, I think my code is ready for review, but I'm not versed in this, so if you think you have something better, feel free to open a PR or tell me if I should submit mine, and you can comment on it: https://github.com/python/cpython/compare/master...tzickel:fix34172 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 14:21:45 2018 From: report at bugs.python.org (s-ball) Date: Sun, 02 Dec 2018 19:21:45 +0000 Subject: [issue35335] msgfmt should be able to merge more than one po file In-Reply-To: <1543389979.14.0.788709270274.issue35335@psf.upfronthosting.co.za> Message-ID: <1543778505.89.0.788709270274.issue35335@psf.upfronthosting.co.za> s-ball added the comment: After some more thinking about it, my opinion is that the proposed path for issue 9741 does not address at all my requirements. So I will try to propose a pull request addressing both issues here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 14:41:09 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 02 Dec 2018 19:41:09 +0000 Subject: [issue34238] When BROWSER is set on Mac webbrowser.register_standard_browsers doesn't work In-Reply-To: <1532623484.23.0.56676864532.issue34238@psf.upfronthosting.co.za> Message-ID: <1543779669.75.0.788709270274.issue34238@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: > However, I think there might be a bug with the implementation that doesn't correctly respect the BROWSER preference. Notice how the webbrowser._tryorder has two 'lynx' items and both of them are last. If you look at the comment in the code, it says that it should be prepended to _tryorder because it's the preferred browser @ograycode Is this similar to issue35308 ? ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 15:30:49 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Dec 2018 20:30:49 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1543782649.43.0.788709270274.issue35378@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: I think the code is almost ok (I also prefer to also use the cache as an excuse to maintain the pool alive) but the test needs to be done a bit more carefully to avoid hanging the test suite in case of failure and to avoid leaking threads or processes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 15:33:12 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Dec 2018 20:33:12 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1543782792.26.0.788709270274.issue35378@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +10087 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 16:46:41 2018 From: report at bugs.python.org (Vijay) Date: Sun, 02 Dec 2018 21:46:41 +0000 Subject: [issue35366] Monkey Patching class derived from ctypes.Union doesn't work In-Reply-To: <1543606609.9.0.788709270274.issue35366@psf.upfronthosting.co.za> Message-ID: <1543787201.42.0.788709270274.issue35366@psf.upfronthosting.co.za> Vijay added the comment: Wanted to post a possible workaround until this is fixed. One can simply wrap a union anonymously inside a structure. Like so: struct my_struct_s { union my_union_u { }; }; This temporarily solved the problem in my case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 17:06:32 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 02 Dec 2018 22:06:32 +0000 Subject: [issue30410] Documentation for sys.stdout encoding does not reflect the new Windows behavior in Python 3.6+ In-Reply-To: <1495270729.75.0.717879181788.issue30410@psf.upfronthosting.co.za> Message-ID: <1543788392.71.0.788709270274.issue30410@psf.upfronthosting.co.za> Lysandros Nikolaou added the comment: I updated the PR with the new wording by Paul, since I found it easier to understand as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 17:14:30 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 02 Dec 2018 22:14: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: <1543788870.35.0.788709270274.issue22021@psf.upfronthosting.co.za> Lysandros Nikolaou added the comment: Ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 18:04:50 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Dec 2018 23:04:50 +0000 Subject: [issue35380] Enable TCP_NODELAY for proactor event loop Message-ID: <1543791890.63.0.788709270274.issue35380@psf.upfronthosting.co.za> New submission from Andrew Svetlov : We do it for selector based loops already, let's be consistent. I think the feature should be backported to 3.7 too. ---------- components: asyncio messages: 330903 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Enable TCP_NODELAY for proactor event loop versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 18:04:59 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Dec 2018 23:04:59 +0000 Subject: [issue35380] Enable TCP_NODELAY for proactor event loop In-Reply-To: <1543791890.63.0.788709270274.issue35380@psf.upfronthosting.co.za> Message-ID: <1543791899.75.0.788709270274.issue35380@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- assignee: -> asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 19:26:25 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 03 Dec 2018 00:26:25 +0000 Subject: [issue35377] urlsplit scheme argument broken In-Reply-To: <1543764457.53.0.788709270274.issue35377@psf.upfronthosting.co.za> Message-ID: <1543796785.64.0.788709270274.issue35377@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I don't think this is broken, but I do think it could be documented better. You have to read the documentation for `urlparse` to see this: [Quote] Following the syntax specifications in RFC 1808, urlparse recognizes a netloc only if it is properly introduced by ?//?. Otherwise the input is presumed to be a relative URL and thus to start with a path component. https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlparse so the function is correct. You're making two errors: - providing a relative URL "httpbin.org" and expecting it to be treated as an absolute URL; - specifying scheme+delimiter instead of the scheme alone. So I don't think this is a bug. urlsplit rightly accepts any arbitrary string as a scheme (it used to have a whitelist of permitted schemes, and that was a problem), and we can't assume that :/// is ONLY valid for file protocols. Unless you come up with a convincing argument for why this is a bug, I'm going to change it to a documentation issue. The docs could do with some improvement to make it more clear, although the examples are good. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 21:38:34 2018 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 03 Dec 2018 02:38:34 +0000 Subject: [issue10320] printf %qd is nonstandard In-Reply-To: <1288946289.37.0.37131892978.issue10320@psf.upfronthosting.co.za> Message-ID: <1543804714.57.0.788709270274.issue10320@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +10088 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 21:40:01 2018 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 03 Dec 2018 02:40:01 +0000 Subject: [issue10320] printf %qd is nonstandard In-Reply-To: <1288946289.37.0.37131892978.issue10320@psf.upfronthosting.co.za> Message-ID: <1543804801.98.0.788709270274.issue10320@psf.upfronthosting.co.za> Zackery Spytz added the comment: I've created a PR for this issue. ---------- nosy: +ZackerySpytz versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 01:33:59 2018 From: report at bugs.python.org (Eddie Elizondo) Date: Mon, 03 Dec 2018 06:33:59 +0000 Subject: [issue35381] Heap-allocated Posixmodule Message-ID: <1543818839.39.0.788709270274.issue35381@psf.upfronthosting.co.za> New submission from Eddie Elizondo : After bpo34784, there are still two more cases of statically allocated types (DirEntryType & ScandirIteratorType). These should also be heap allocated to make posixmodule fully compatible with PEP384. ---------- components: Library (Lib) messages: 330906 nosy: eelizondo priority: normal severity: normal status: open title: Heap-allocated Posixmodule versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 01:35:08 2018 From: report at bugs.python.org (Eddie Elizondo) Date: Mon, 03 Dec 2018 06:35:08 +0000 Subject: [issue35381] Heap-allocated Posixmodule types In-Reply-To: <1543818839.39.0.788709270274.issue35381@psf.upfronthosting.co.za> Message-ID: <1543818908.68.0.788709270274.issue35381@psf.upfronthosting.co.za> Change by Eddie Elizondo : ---------- title: Heap-allocated Posixmodule -> Heap-allocated Posixmodule types _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 01:35:16 2018 From: report at bugs.python.org (Eddie Elizondo) Date: Mon, 03 Dec 2018 06:35:16 +0000 Subject: [issue35381] Heap-allocated posixmodule types In-Reply-To: <1543818839.39.0.788709270274.issue35381@psf.upfronthosting.co.za> Message-ID: <1543818916.03.0.788709270274.issue35381@psf.upfronthosting.co.za> Change by Eddie Elizondo : ---------- title: Heap-allocated Posixmodule types -> Heap-allocated posixmodule types _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 01:37:16 2018 From: report at bugs.python.org (Eddie Elizondo) Date: Mon, 03 Dec 2018 06:37:16 +0000 Subject: [issue35381] Heap-allocated posixmodule types In-Reply-To: <1543818839.39.0.788709270274.issue35381@psf.upfronthosting.co.za> Message-ID: <1543819036.0.0.788709270274.issue35381@psf.upfronthosting.co.za> Change by Eddie Elizondo : ---------- keywords: +patch pull_requests: +10089 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 02:58:25 2018 From: report at bugs.python.org (Chris Withers) Date: Mon, 03 Dec 2018 07:58:25 +0000 Subject: [issue32153] mock.create_autospec fails if an attribute is a partial function In-Reply-To: <1511864595.09.0.213398074469.issue32153@psf.upfronthosting.co.za> Message-ID: <1543823905.74.0.788709270274.issue32153@psf.upfronthosting.co.za> Chris Withers added the comment: New changeset c667b094ae37799a7e42ba5cd2ad501cc7920888 by Chris Withers (Xtreak) in branch 'master': bpo-32153: Add unit test for create_autospec with partial function returned in getattr (#10398) https://github.com/python/cpython/commit/c667b094ae37799a7e42ba5cd2ad501cc7920888 ---------- nosy: +cjw296 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 03:09:02 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Dec 2018 08:09:02 +0000 Subject: [issue32153] mock.create_autospec fails if an attribute is a partial function In-Reply-To: <1511864595.09.0.213398074469.issue32153@psf.upfronthosting.co.za> Message-ID: <1543824542.67.0.788709270274.issue32153@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10090 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 03:16:12 2018 From: report at bugs.python.org (Sergei Zobov) Date: Mon, 03 Dec 2018 08:16:12 +0000 Subject: [issue35242] multiprocessing.Queue in an inconsistent state and a traceback silently suppressed if put an unpickable object and process's target function is finished In-Reply-To: <1542173181.91.0.788709270274.issue35242@psf.upfronthosting.co.za> Message-ID: <1543824972.45.0.788709270274.issue35242@psf.upfronthosting.co.za> Sergei Zobov added the comment: So, should I just close this issue in case we've decided it's not a big problem? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 03:26:10 2018 From: report at bugs.python.org (Chris Withers) Date: Mon, 03 Dec 2018 08:26:10 +0000 Subject: [issue32153] mock.create_autospec fails if an attribute is a partial function In-Reply-To: <1511864595.09.0.213398074469.issue32153@psf.upfronthosting.co.za> Message-ID: <1543825570.57.0.788709270274.issue32153@psf.upfronthosting.co.za> Chris Withers added the comment: New changeset 1ef06c62d3c05cbba6448c56af30a09c551c9ec2 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-32153: Add unit test for create_autospec with partial function returned in getattr (GH-10398) (#10855) https://github.com/python/cpython/commit/1ef06c62d3c05cbba6448c56af30a09c551c9ec2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 03:27:45 2018 From: report at bugs.python.org (Leung) Date: Mon, 03 Dec 2018 08:27:45 +0000 Subject: [issue35382] Something wrong with pymysql Message-ID: <1543825665.91.0.788709270274.issue35382@psf.upfronthosting.co.za> New submission from Leung : when i use like that userinfo = dbsession2.query(func.count(radcheck1.username)).\ outerjoin(radcheck2,radcheck1.username==radcheck2.username).\ filter(radcheck1.admin_user==g.user.name,or_(radcheck1.username.like('im_%'),and_(radcheck1.attribute=='Cleartext-Password',radcheck2.attribute=='Expiration'))). python3.6 is ok.But python 3.7 and 3.7.1 show me name 'byte2int' is not defined in pymysql/_auth.py ---------- messages: 330910 nosy: leung priority: normal severity: normal status: open title: Something wrong with pymysql type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 03:31:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2018 08:31:37 +0000 Subject: [issue10320] printf %qd is nonstandard In-Reply-To: <1288946289.37.0.37131892978.issue10320@psf.upfronthosting.co.za> Message-ID: <1543825897.98.0.788709270274.issue10320@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 062cbb67726f26794b1b461853e40696b4a0b220 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-10320: Replace nonstandard sprintf() length modifier in ctypes' PyCArg_repr(). (GH-10853) https://github.com/python/cpython/commit/062cbb67726f26794b1b461853e40696b4a0b220 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 03:31:48 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Dec 2018 08:31:48 +0000 Subject: [issue10320] printf %qd is nonstandard In-Reply-To: <1288946289.37.0.37131892978.issue10320@psf.upfronthosting.co.za> Message-ID: <1543825908.31.0.788709270274.issue10320@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10091 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 03:32:01 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Dec 2018 08:32:01 +0000 Subject: [issue10320] printf %qd is nonstandard In-Reply-To: <1288946289.37.0.37131892978.issue10320@psf.upfronthosting.co.za> Message-ID: <1543825921.05.0.788709270274.issue10320@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10092 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 03:32:15 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Dec 2018 08:32:15 +0000 Subject: [issue10320] printf %qd is nonstandard In-Reply-To: <1288946289.37.0.37131892978.issue10320@psf.upfronthosting.co.za> Message-ID: <1543825935.1.0.788709270274.issue10320@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10093 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 03:36:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2018 08:36:47 +0000 Subject: [issue35372] Code page decoder incorrectly handles input >2GiB In-Reply-To: <1543684676.55.0.788709270274.issue35372@psf.upfronthosting.co.za> Message-ID: <1543826207.34.0.788709270274.issue35372@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4013c179117754b039957db4730880bf3285919d by Serhiy Storchaka in branch 'master': bpo-35372: Fix the code page decoder for input > 2 GiB. (GH-10848) https://github.com/python/cpython/commit/4013c179117754b039957db4730880bf3285919d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 03:36:56 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Dec 2018 08:36:56 +0000 Subject: [issue35372] Code page decoder incorrectly handles input >2GiB In-Reply-To: <1543684676.55.0.788709270274.issue35372@psf.upfronthosting.co.za> Message-ID: <1543826216.81.0.788709270274.issue35372@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10094 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 03:37:05 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Dec 2018 08:37:05 +0000 Subject: [issue35372] Code page decoder incorrectly handles input >2GiB In-Reply-To: <1543684676.55.0.788709270274.issue35372@psf.upfronthosting.co.za> Message-ID: <1543826225.76.0.788709270274.issue35372@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10095 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 03:47:55 2018 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 03 Dec 2018 08:47:55 +0000 Subject: [issue35382] Something wrong with pymysql In-Reply-To: <1543825665.91.0.788709270274.issue35382@psf.upfronthosting.co.za> Message-ID: <1543826875.76.0.788709270274.issue35382@psf.upfronthosting.co.za> Mark Dickinson added the comment: Hi Leung. This is the issue tracker for the core Python language (along with the standard library). PyMySQL is a third-party project: it isn't part of the standard library. I'd suggest reporting your issue directly to the PyMySQL maintainers. (At a quick glance, https://github.com/PyMySQL/PyMySQL looks like the right place.) ---------- nosy: +mark.dickinson resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 03:52:43 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 03 Dec 2018 08:52:43 +0000 Subject: [issue35382] Something wrong with pymysql In-Reply-To: <1543825665.91.0.788709270274.issue35382@psf.upfronthosting.co.za> Message-ID: <1543827163.15.0.788709270274.issue35382@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Also, for future reference, please spend the time to make a good bug report, showing the minimum code needed to reproduce the error, and the full error, not just a summary. Please read this before your next bug report: http://sscce.org/ Thank you. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 03:58:34 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 03 Dec 2018 08:58:34 +0000 Subject: [issue35382] Something wrong with pymysql In-Reply-To: <1543825665.91.0.788709270274.issue35382@psf.upfronthosting.co.za> Message-ID: <1543827514.83.0.788709270274.issue35382@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: It's a third party issue as others noted but just to add to this I found the below PR and question to be related to your problem in the tracker while googling byte2int pymysql that might be of help. * https://stackoverflow.com/questions/51565646/pymysql-stopped-working-nameerror-name-byte2int-is-not-defined * https://github.com/PyMySQL/PyMySQL/pull/713 Thanks ---------- nosy: +xtreak -mark.dickinson, steven.daprano resolution: third party -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 04:00:24 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 03 Dec 2018 09:00:24 +0000 Subject: [issue35382] Something wrong with pymysql In-Reply-To: <1543825665.91.0.788709270274.issue35382@psf.upfronthosting.co.za> Message-ID: <1543827624.03.0.788709270274.issue35382@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Sorry, I messed up while adding the reply at the same time. Closing it again. ---------- nosy: +mark.dickinson, steven.daprano resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 04:00:25 2018 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 03 Dec 2018 09:00:25 +0000 Subject: [issue35283] "threading._DummyThread" redefines "is_alive" but forgets "isAlive" In-Reply-To: <1542752189.25.0.788709270274.issue35283@psf.upfronthosting.co.za> Message-ID: <1543827625.65.0.788709270274.issue35283@psf.upfronthosting.co.za> Dong-hee Na added the comment: Hi, I am going to solve this issue through below process. 1. Implement `isAlive` for dummy thread 2. Updating docstrings to recommend use is_alive() instead of isAlive(). 3. Add a deprecation warning for both Thread.isAlive and _DummyThread.isAlive 4. Remove isAlive in future Python release (3.8 for the deprecation, 3.8+2 for removal). 5. Backporting the property down to 3.7 and 3.6 doesn't hurt, let's do it Is it okay? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 04:09:17 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Dec 2018 09:09:17 +0000 Subject: [issue35372] Code page decoder incorrectly handles input >2GiB In-Reply-To: <1543684676.55.0.788709270274.issue35372@psf.upfronthosting.co.za> Message-ID: <1543828157.53.0.788709270274.issue35372@psf.upfronthosting.co.za> miss-islington added the comment: New changeset bdeb56cd21ef3f4f086c93045d80f2a753823379 by Miss Islington (bot) in branch '3.7': bpo-35372: Fix the code page decoder for input > 2 GiB. (GH-10848) https://github.com/python/cpython/commit/bdeb56cd21ef3f4f086c93045d80f2a753823379 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 04:11:33 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Dec 2018 09:11:33 +0000 Subject: [issue10320] printf %qd is nonstandard In-Reply-To: <1288946289.37.0.37131892978.issue10320@psf.upfronthosting.co.za> Message-ID: <1543828293.87.0.788709270274.issue10320@psf.upfronthosting.co.za> miss-islington added the comment: New changeset a9f435e5d856fb62516b70a78217e40b90bec233 by Miss Islington (bot) in branch '3.7': bpo-10320: Replace nonstandard sprintf() length modifier in ctypes' PyCArg_repr(). (GH-10853) https://github.com/python/cpython/commit/a9f435e5d856fb62516b70a78217e40b90bec233 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 04:11:39 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Dec 2018 09:11:39 +0000 Subject: [issue10320] printf %qd is nonstandard In-Reply-To: <1288946289.37.0.37131892978.issue10320@psf.upfronthosting.co.za> Message-ID: <1543828299.77.0.788709270274.issue10320@psf.upfronthosting.co.za> miss-islington added the comment: New changeset f65ede3f8fa08493facf48177540d0ec26e59560 by Miss Islington (bot) in branch '3.6': bpo-10320: Replace nonstandard sprintf() length modifier in ctypes' PyCArg_repr(). (GH-10853) https://github.com/python/cpython/commit/f65ede3f8fa08493facf48177540d0ec26e59560 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 04:15:05 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Dec 2018 09:15:05 +0000 Subject: [issue35372] Code page decoder incorrectly handles input >2GiB In-Reply-To: <1543684676.55.0.788709270274.issue35372@psf.upfronthosting.co.za> Message-ID: <1543828505.09.0.788709270274.issue35372@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 0f9b6687eb8b26dd804abcc6efd4d6430ae16f24 by Miss Islington (bot) in branch '3.6': bpo-35372: Fix the code page decoder for input > 2 GiB. (GH-10848) https://github.com/python/cpython/commit/0f9b6687eb8b26dd804abcc6efd4d6430ae16f24 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 04:35:58 2018 From: report at bugs.python.org (Dieter Maurer) Date: Mon, 03 Dec 2018 09:35:58 +0000 Subject: [issue35283] "threading._DummyThread" redefines "is_alive" but forgets "isAlive" In-Reply-To: <1542752189.25.0.788709270274.issue35283@psf.upfronthosting.co.za> Message-ID: <1543829758.09.0.788709270274.issue35283@psf.upfronthosting.co.za> Dieter Maurer added the comment: > Hi, I am going to solve this issue through below process. > ... > Is it okay? For me, this would be perfect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 04:42:23 2018 From: report at bugs.python.org (Denton Liu) Date: Mon, 03 Dec 2018 09:42:23 +0000 Subject: [issue35155] Clarify Protocol Handlers in urllib.request Docs In-Reply-To: <1541286673.86.0.788709270274.issue35155@psf.upfronthosting.co.za> Message-ID: <1543830143.2.0.788709270274.issue35155@psf.upfronthosting.co.za> Denton Liu added the comment: Pinging for updates. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 05:17:20 2018 From: report at bugs.python.org (Niklas Rosenstein) Date: Mon, 03 Dec 2018 10:17:20 +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: <1543832240.29.0.788709270274.issue33337@psf.upfronthosting.co.za> Niklas Rosenstein added the comment: Lukasz, have you created a 3rd party package branching off lib2to3? I'm working on a project that is based on it (in a similar usecase as YAPF and Black) and was hoping that there may be some version maintained distinctly from the Python release schedule. ---------- nosy: +n_rosenstein _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 05:17:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 10:17:52 +0000 Subject: [issue33529] [security] Infinite loop on folding email (_fold_as_ew()) if an header has no spaces In-Reply-To: <1526429548.63.0.682650639539.issue33529@psf.upfronthosting.co.za> Message-ID: <1543832272.47.0.788709270274.issue33529@psf.upfronthosting.co.za> STINNER Victor added the comment: Since it's a denial of service which can be triggered by an user, I mark this issue as a security issue. I can be wrong, but it seems like Python 2.7 isn't affected: Lib/email/_header_value_parser.py was added by bpo-12586 (commit 0b6f6c82b51b7071d88f48abb3192bf3dc2a2d24). Python 2.7 doesn't have this file nor policies. ---------- nosy: +vstinner title: Infinite loop on folding email if headers has no spaces -> [security] Infinite loop on folding email (_fold_as_ew()) if an header has no spaces type: behavior -> security versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 05:20:07 2018 From: report at bugs.python.org (Niklas Rosenstein) Date: Mon, 03 Dec 2018 10:20:07 +0000 Subject: [issue35383] lib2to3 raises ParseError on argument called "print" Message-ID: <1543832407.47.0.788709270274.issue35383@psf.upfronthosting.co.za> New submission from Niklas Rosenstein : On Python 3.7.0 lib2to3 will not parse code like this: def foo(print=None): pass and yield the following error instead lib2to3.pgen2.parse.ParseError: bad input: type=1, value='print', context=('', (1, 8)) ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 330926 nosy: n_rosenstein priority: normal severity: normal status: open title: lib2to3 raises ParseError on argument called "print" type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 05:24:15 2018 From: report at bugs.python.org (devkral) Date: Mon, 03 Dec 2018 10:24:15 +0000 Subject: [issue35377] urlsplit scheme argument broken In-Reply-To: <1543764457.53.0.788709270274.issue35377@psf.upfronthosting.co.za> Message-ID: <1543832655.08.0.788709270274.issue35377@psf.upfronthosting.co.za> devkral added the comment: Ok, then the problem is in unsplit. Because: :/// is not a valid url. Next try: in urlunsplit: if netloc or (scheme and scheme in uses_netloc and url[:2] != '//'): if url and url[:1] != '/' and scheme in ("file", ""): # my change url = '/' + url ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 05:34:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 10:34:35 +0000 Subject: [issue35373] PyInit_timezone() must return a value In-Reply-To: <1543687384.46.0.788709270274.issue35373@psf.upfronthosting.co.za> Message-ID: <1543833275.32.0.788709270274.issue35373@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10096 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 05:38:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 10:38:03 +0000 Subject: [issue35373] PyInit_timezone() must return a value In-Reply-To: <1543687384.46.0.788709270274.issue35373@psf.upfronthosting.co.za> Message-ID: <1543833483.18.0.788709270274.issue35373@psf.upfronthosting.co.za> STINNER Victor added the comment: Crap. My commit 503ce5c482cb267b0770bc46c315d5cf822bdca9 was supposed to fix on of the latest compiler warning in master, but I introduced a new warning :-( What a shame on me :-( I was too quick... PR 10861 should fix the new warning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 05:39:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2018 10:39:42 +0000 Subject: [issue32477] Move jumps optimization from the peepholer to the compiler In-Reply-To: <1514844207.77.0.467229070634.issue32477@psf.upfronthosting.co.za> Message-ID: <1543833582.5.0.788709270274.issue32477@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Simplified PR 5077. It uses now NEXT_BLOCK() to guarantee that a new block is always used after jumps. NEXT_BLOCK() was defined, but not used before. bpo-35193 and bpo-9566 demonstrate that the code of peephole.c is complex and error-prone. Moving it to the upper level makes it more error-proof and general. ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 05:40:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2018 10:40:17 +0000 Subject: [issue35372] Code page decoder incorrectly handles input >2GiB In-Reply-To: <1543684676.55.0.788709270274.issue35372@psf.upfronthosting.co.za> Message-ID: <1543833617.66.0.788709270274.issue35372@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 Dec 3 05:50:08 2018 From: report at bugs.python.org (Roundup Robot) Date: Mon, 03 Dec 2018 10:50:08 +0000 Subject: [issue35377] urlsplit scheme argument broken In-Reply-To: <1543764457.53.0.788709270274.issue35377@psf.upfronthosting.co.za> Message-ID: <1543834208.84.0.788709270274.issue35377@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +10097 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 05:52:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2018 10:52:28 +0000 Subject: [issue35384] The repr of ctypes.CArgObject fails for non-ascii character Message-ID: <1543834348.49.0.788709270274.issue35384@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The repr of the ctypes.CArgObject instance will fail when the value is a non-ascii character. The code is: sprintf(buffer, "", self->tag, self->value.c); ... return PyUnicode_FromString(buffer); If self->value.c is out of range 0-127, buffer will contain a string not decodable with UTF-8. There is a similar problem with non-ascii self->tag. The following PR is purposed to fix this, but I don't know how to test it. Current tests only create CArgObject instances with tag='P' (in byref()). ---------- components: Extension Modules, ctypes messages: 330931 nosy: amaury.forgeotdarc, belopolsky, meador.inge, serhiy.storchaka priority: normal severity: normal status: open title: The repr of ctypes.CArgObject fails for non-ascii character type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 05:53:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2018 10:53:45 +0000 Subject: [issue35384] The repr of ctypes.CArgObject fails for non-ascii character In-Reply-To: <1543834348.49.0.788709270274.issue35384@psf.upfronthosting.co.za> Message-ID: <1543834425.08.0.788709270274.issue35384@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10099 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 05:56:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 10:56:29 +0000 Subject: [issue35385] time module: why not using tzname from the glibc? Message-ID: <1543834589.7.0.788709270274.issue35385@psf.upfronthosting.co.za> New submission from STINNER Victor : Currently, the time module uses tm_zone and tm_gmtoff of struct tm with localtime_r() to get the timezone (name and offset) on my Fedora 29. But it seems like glibc provides "tzname", "daylight" and "timezone" variables. Why not using them? Python also provides "altzone", I'm not sure how to get this value from the glibc. See also the documentation: https://docs.python.org/dev/library/time.html#timezone-constants It's not a bug, it's more a question :-) It seems like the configure script always undefine HAVE_DECL_TZNAME: --- /* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. */ #undef HAVE_DECL_TZNAME --- Example of C program: --- #include #include #include int main() { putenv("TZ=UTC"); tzset(); printf("tzname = {%s, %s}\n", tzname[0], tzname[1]); exit(EXIT_SUCCESS); } --- Output on Fedora 29, glibc 2.28: --- tzname = {UTC, UTC} --- Note: tzname is not always defined by : --- /* Defined in localtime.c. */ extern char *__tzname[2]; /* Current timezone names. */ extern int __daylight; /* If daylight-saving time is ever in use. */ extern long int __timezone; /* Seconds west of UTC. */ #ifdef __USE_POSIX /* Same as above. */ extern char *tzname[2]; /* Set time conversion information from the TZ environment variable. If TZ is not defined, a locale-dependent default is used. */ extern void tzset (void) __THROW; #endif #if defined __USE_MISC || defined __USE_XOPEN extern int daylight; extern long int timezone; #endif --- configure should try to tzname is available no? For HAVE_WORKING_TZSET, configure contains a C program which uses HAVE_TZNAME. Extract: --- #if HAVE_TZNAME extern char *tzname[]; #endif ... putenv("TZ=UTC+0"); tzset(); if (localtime(&groundhogday)->tm_hour != 0) exit(1); #if HAVE_TZNAME /* For UTC, tzname[1] is sometimes "", sometimes " " */ if (strcmp(tzname[0], "UTC") || (tzname[1][0] != 0 && tzname[1][0] != ' ')) exit(1); #endif --- I don't understand the test on the TZ=UTC+0 timezone: I get tzname[0]="UTC" and tzname[1]="UTC" which fails the test... In Python 2.7, there is: --- /* This code moved from inittime wholesale to allow calling it from time_tzset. In the future, some parts of it can be moved back (for platforms that don't HAVE_WORKING_TZSET, when we know what they are), and the extraneous calls to tzset(3) should be removed. I haven't done this yet, as I don't want to change this code as little as possible when introducing the time.tzset and time.tzsetwall methods. This should simply be a method of doing the following once, at the top of this function and removing the call to tzset() from time_tzset(): #ifdef HAVE_TZSET tzset() #endif And I'm lazy and hate C so nyer. */ #if defined(HAVE_TZNAME) && !defined(__GLIBC__) && !defined(__CYGWIN__) --- The glibc is explicitly excluded from platforms which support "tzname". The "!defined(__GLIBC__)" test is quite old... commit ea424e19f152638260c91d5fd6a805a288c931d2 Author: Guido van Rossum Date: Fri Apr 23 20:59:05 1999 +0000 Apparently __GNU_LIBRARY__ is defined for glibc as well as for libc5. The test really wanted to distinguish between the two. So now we test for __GLIBC__ instead. I have confirmed that this works for glibc and I have an email from Christian Tanzer confirming that it works for libc5, so it should be fine. ---------- components: Library (Lib) messages: 330932 nosy: vstinner priority: normal severity: normal status: open title: time module: why not using tzname from the glibc? versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 05:57:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 10:57:01 +0000 Subject: [issue35385] time module: why not using tzname from the glibc? In-Reply-To: <1543834589.7.0.788709270274.issue35385@psf.upfronthosting.co.za> Message-ID: <1543834621.2.0.788709270274.issue35385@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 05:58:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 10:58:34 +0000 Subject: [issue35385] time module: why not using tzname from the glibc? In-Reply-To: <1543834589.7.0.788709270274.issue35385@psf.upfronthosting.co.za> Message-ID: <1543834714.08.0.788709270274.issue35385@psf.upfronthosting.co.za> STINNER Victor added the comment: Ah, context of this question: I modified get_gmtoff() in bpo-35373 to fix compiler warnings :-) (see my first commit 503ce5c482cb267b0770bc46c315d5cf822bdca9) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 06:02:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 11:02:47 +0000 Subject: [issue35373] PyInit_timezone() must return a value In-Reply-To: <1543687384.46.0.788709270274.issue35373@psf.upfronthosting.co.za> Message-ID: <1543834967.1.0.788709270274.issue35373@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset ab6614969301b238fcc27f43923a0189a57a2a3c by Victor Stinner in branch 'master': bpo-35373: Fix PyInit_timezone() if HAVE_DECL_TZNAME is defined (GH-10861) https://github.com/python/cpython/commit/ab6614969301b238fcc27f43923a0189a57a2a3c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 06:10:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 11:10:09 +0000 Subject: [issue35373] PyInit_timezone() must return a value In-Reply-To: <1543687384.46.0.788709270274.issue35373@psf.upfronthosting.co.za> Message-ID: <1543835409.51.0.788709270274.issue35373@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10100 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 06:13:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 11:13:59 +0000 Subject: [issue35373] PyInit_timezone() must return a value In-Reply-To: <1543687384.46.0.788709270274.issue35373@psf.upfronthosting.co.za> Message-ID: <1543835639.16.0.788709270274.issue35373@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum. By the way, PyInit_time() calls PyModule_AddObject() without checking for errors :-/ PyMODINIT_FUNC PyInit_time(void) { PyObject *m; m = PyModule_Create(&timemodule); if (m == NULL) return NULL; ... PyModule_AddObject(m, "struct_time", (PyObject*) &StructTimeType); ... return m; } It should have at least one final generic: if (PyErr_Occurred()) { return -1; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 06:22:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 11:22:44 +0000 Subject: [issue35373] PyInit_timezone() must return a value In-Reply-To: <1543687384.46.0.788709270274.issue35373@psf.upfronthosting.co.za> Message-ID: <1543836164.27.0.788709270274.issue35373@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10101 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 06:27:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 11:27:04 +0000 Subject: [issue35372] Code page decoder incorrectly handles input >2GiB In-Reply-To: <1543684676.55.0.788709270274.issue35372@psf.upfronthosting.co.za> Message-ID: <1543836424.18.0.788709270274.issue35372@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks for the fix ;-) I guess that nobody tried this code with a string longer than 2 GiB before you :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 06:29:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 11:29:31 +0000 Subject: [issue35368] [2.7] Make PyMem_Malloc() thread-safe in debug mode In-Reply-To: <1543619268.28.0.788709270274.issue35368@psf.upfronthosting.co.za> Message-ID: <1543836571.48.0.788709270274.issue35368@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c275be54411d425c90e7c679ddb5321ba458f61d by Victor Stinner in branch '2.7': bpo-35368: Make PyMem_Malloc() thread-safe in debug mode (GH-10828) https://github.com/python/cpython/commit/c275be54411d425c90e7c679ddb5321ba458f61d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 06:39:41 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 03 Dec 2018 11:39:41 +0000 Subject: [issue35377] urlsplit scheme argument broken In-Reply-To: <1543764457.53.0.788709270274.issue35377@psf.upfronthosting.co.za> Message-ID: <1543837181.85.0.788709270274.issue35377@psf.upfronthosting.co.za> Steven D'Aprano added the comment: You haven't given a convincing reason that there is a problem that needs fixing, or if there is, that your patch is the right way to fix it. You have already pointed out that there is at least one scheme where :/// is part of a valid URL: "file:///". Where there is one, there could be others, if not today, then in the future: spam:///eggs.cheese There are well over 200 registered schemes: https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml I don't think it will be practical to put in a whitelist or a blacklist of schemes that are, or aren't, permitted to include :/// after the scheme. It is the caller's responsibility to use the correct scheme, without adding extra characters to the end. I asked you to justify why this should be considered a bug in the library, rather than a bug in your code. I'm not an expert on URLs, but the functions look correct to me. If you can't justify why this is a bug in the library that needs fixing, rather than user-error, we should close this or change it to a request for better documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 06:43:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2018 11:43:05 +0000 Subject: [issue35372] Code page decoder incorrectly handles input >2GiB In-Reply-To: <1543684676.55.0.788709270274.issue35372@psf.upfronthosting.co.za> Message-ID: <1543837385.25.0.788709270274.issue35372@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Decoding a 2 GiB string takes > 80 seconds on my computer and needs around 14 GiB of memory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 06:45:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 11:45:56 +0000 Subject: [issue35368] [2.7] Make PyMem_Malloc() thread-safe in debug mode In-Reply-To: <1543619268.28.0.788709270274.issue35368@psf.upfronthosting.co.za> Message-ID: <1543837556.42.0.788709270274.issue35368@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10102 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 06:53:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2018 11:53:16 +0000 Subject: [issue26868] Document PyModule_AddObject's behavior on error In-Reply-To: <1461735404.8.0.653639688918.issue26868@psf.upfronthosting.co.za> Message-ID: <1543837996.94.0.788709270274.issue26868@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: issue26868_v2.diff LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 06:53:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2018 11:53:26 +0000 Subject: [issue26868] Document PyModule_AddObject's behavior on error In-Reply-To: <1461735404.8.0.653639688918.issue26868@psf.upfronthosting.co.za> Message-ID: <1543838006.66.0.788709270274.issue26868@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 07:39:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 12:39:52 +0000 Subject: [issue35386] ftp://www.pythontest.net/ returns error 500 Message-ID: <1543840792.75.0.788709270274.issue35386@psf.upfronthosting.co.za> New submission from STINNER Victor : The FTP server running at www.pythontest.net returns randomly errors with the code 500. Example: $ lftp www.pythontest.net lftp www.pythontest.net:~> ls -r--r--r-- 1 33 33 123 Jun 06 04:15 README lftp www.pythontest.net:/> get README ? README ? ? 0 (0%) [500 OOPS: vsf_sysutil_bind] You can try in a brower: ftp://www.pythontest.net/README Firefox popup: "500 OOPS: vsf_sysutil_bind". ---------- components: Tests messages: 330941 nosy: vstinner priority: normal severity: normal status: open title: ftp://www.pythontest.net/ returns error 500 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 07:43:07 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2018 12:43:07 +0000 Subject: [issue35380] Enable TCP_NODELAY for proactor event loop In-Reply-To: <1543791890.63.0.788709270274.issue35380@psf.upfronthosting.co.za> Message-ID: <1543840987.45.0.788709270274.issue35380@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +10103 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 07:45:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 12:45:41 +0000 Subject: [issue35373] PyInit_timezone() must return a value In-Reply-To: <1543687384.46.0.788709270274.issue35373@psf.upfronthosting.co.za> Message-ID: <1543841141.72.0.788709270274.issue35373@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3bb150d8148e3cc08418077a58f43e064b9fde61 by Victor Stinner in branch 'master': bpo-35373: Fix PyInit_time() error handling (GH-10865) https://github.com/python/cpython/commit/3bb150d8148e3cc08418077a58f43e064b9fde61 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 07:57:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 12:57:53 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1543841873.02.0.788709270274.issue26544@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10104 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 08:00:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 13:00:34 +0000 Subject: [issue35346] Modernize Lib/platform.py code In-Reply-To: <1543455759.08.0.788709270274.issue35346@psf.upfronthosting.co.za> Message-ID: <1543842034.64.0.788709270274.issue35346@psf.upfronthosting.co.za> STINNER Victor added the comment: Another issue with Python 2 compatibility (I addition to platform.dist() removal) of Lib/platform.py from master: it uses re.ASCII which doesn't exist in Python 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 08:03:46 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Mon, 03 Dec 2018 13:03:46 +0000 Subject: [issue35385] time module: why not using tzname from the glibc? In-Reply-To: <1543834589.7.0.788709270274.issue35385@psf.upfronthosting.co.za> Message-ID: <1543842226.25.0.788709270274.issue35385@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: See #28108 and https://sourceware.org/bugzilla/show_bug.cgi?id=23859 (for msg276123). ---------- nosy: +izbyshev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 08:59:42 2018 From: report at bugs.python.org (Kevin Walzer) Date: Mon, 03 Dec 2018 13:59:42 +0000 Subject: [issue35387] Dialogs on IDLE are accompanied by a small black window Message-ID: <1543845582.88.0.788709270274.issue35387@psf.upfronthosting.co.za> New submission from Kevin Walzer : The "About IDLE" and "Preferences" dialogs on IDLE are accompanied by a small black window titled "idle" when IDLE is run agains the tip of Tk 8.6 on macOS 10.14. This is likely owing to the multiple changes in Tk to accommodate the Mac's API changes on Mojave. I suspect the dialog's [wm transient] implementation is part of the issue; the parent windows for the dialog are not hidden when run against the Tk tip, and thus they have this ugly display. Hopefully the fix is not too complicated. ---------- assignee: terry.reedy components: IDLE messages: 330945 nosy: terry.reedy, wordtech priority: normal severity: normal status: open title: Dialogs on IDLE are accompanied by a small black window versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 09:01:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 14:01:30 +0000 Subject: [issue35351] LTOFLAGS are passed to BASECFLAGS when using LTO In-Reply-To: <1543505341.98.0.788709270274.issue35351@psf.upfronthosting.co.za> Message-ID: <1543845690.0.0.788709270274.issue35351@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 10:13:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 15:13:10 +0000 Subject: [issue35388] _PyRuntime_Initialize() called after Py_Finalize() does nothing Message-ID: <1543849990.49.0.788709270274.issue35388@psf.upfronthosting.co.za> New submission from STINNER Victor : When Python is embedded, it should be possible to call the following Python function multiple times: void func(void) { Py_Initialize(); /* do something in Python */ Py_Finalize(); } Py_Finalize() ends by calling _PyRuntime_Finalize(). Problem: when Py_Initialize() is called the second time, _PyRuntime_Initialize() does nothing: _PyInitError _PyRuntime_Initialize(void) { /* XXX We only initialize once in the process, which aligns with the static initialization of the former globals now found in _PyRuntime. However, _PyRuntime *should* be initialized with every Py_Initialize() call, but doing so breaks the runtime. This is because the runtime state is not properly finalized currently. */ static int initialized = 0; if (initialized) { return _Py_INIT_OK(); } initialized = 1; return _PyRuntimeState_Init(&_PyRuntime); } For example, Py_Finalize() clears runtime->interpreters.mutex and runtime->xidregistry.mutex, whereas mutexes are still needed the second time func() is called. There is currently a *workaround*: _PyInitError _PyInterpreterState_Enable(_PyRuntimeState *runtime) { ... if (runtime->interpreters.mutex == NULL) { ... runtime->interpreters.mutex = PyThread_allocate_lock(); ... } ... } I would prefer that _PyRuntime_Initialize() calls _PyRuntimeState_Init() each time, and that _PyRuntimeState_Init() does nothing at the following call (except after Py_Finalize?). Note: _PyRuntimeState_Fini() doesn't free runtime->xidregistry.mutex currently. ---------- messages: 330946 nosy: vstinner priority: normal severity: normal status: open title: _PyRuntime_Initialize() called after Py_Finalize() does nothing versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 10:19:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 15:19:07 +0000 Subject: [issue31473] PyMem_Raw* API in debug mode are not thread safe In-Reply-To: <1505410594.97.0.693915173163.issue31473@psf.upfronthosting.co.za> Message-ID: <1543850347.03.0.788709270274.issue31473@psf.upfronthosting.co.za> STINNER Victor added the comment: I looked at _Py_atomic_address to avoid atomic "serialno++", but we don't have atomic_fetch_add(). We could implement it using a loop and atomic_compare_exchange_strong()... but we don't have atomic_compare_exchange_strong() neither. I tried to add a mutex, but there are some pratical issues: * bpo-35388: question about calling Py_Initialize() / Py_Finalize() multiple times * I modified _PyRuntimeState_Init() to initialize the lock. _PyRuntimeState_Init() calls PyThread_acquire_lock() which calls PyMem_RawMalloc(). Problem: PyMem_RawMalloc() requires the lock. I worked around the isuse using "if (_PyRuntime.mem.mutex != NULL) {". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 10:21:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 15:21:01 +0000 Subject: [issue31473] PyMem_Raw* API in debug mode are not thread safe In-Reply-To: <1505410594.97.0.693915173163.issue31473@psf.upfronthosting.co.za> Message-ID: <1543850461.43.0.788709270274.issue31473@psf.upfronthosting.co.za> STINNER Victor added the comment: By the way, the previous attempt to add _PyRuntime.mem had to be reverted. See bpo-32096, bpo-30860 and the commit: commit 9e87e7776f7ace66baaf7247233afdabd00c2b44 Author: Victor Stinner Date: Fri Nov 24 12:09:24 2017 +0100 bpo-32096: Remove obj and mem from _PyRuntime (#4532) bpo-32096, bpo-30860: Partially revert the commit 2ebc5ce42a8a9e047e790aefbf9a94811569b2b6: * Move structures back from Include/internal/mem.h to Objects/obmalloc.c * Remove _PyObject_Initialize() and _PyMem_Initialize() * Remove Include/internal/pymalloc.h * Add test_capi.test_pre_initialization_api(): Make sure that it's possible to call Py_DecodeLocale(), and then call Py_SetProgramName() with the decoded string, before Py_Initialize(). PyMem_RawMalloc() and Py_DecodeLocale() can be called again before _PyRuntimeState_Init(). Co-Authored-By: Eric Snow ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 10:22:40 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 15:22:40 +0000 Subject: [issue31473] PyMem_Raw* API in debug mode are not thread safe In-Reply-To: <1505410594.97.0.693915173163.issue31473@psf.upfronthosting.co.za> Message-ID: <1543850560.07.0.788709270274.issue31473@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-35265: "Internal C API: pass the memory allocator in a context". The most complex part is the Python initialization which changes the memory allocator *and* allocate memory. We have to remain which allocator has been used to allocate data, to be able to release memory at exit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 10:32:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 15:32:58 +0000 Subject: [issue35386] ftp://www.pythontest.net/ returns error 500 In-Reply-To: <1543840792.75.0.788709270274.issue35386@psf.upfronthosting.co.za> Message-ID: <1543851178.76.0.788709270274.issue35386@psf.upfronthosting.co.za> STINNER Victor added the comment: Ernest w. Durbin iii (EWDurbin) fixed the bug in less than one hour, cool! I contacted him on IRC (#python-infra). The disk was full (/dev/vda1 25G 25G 0 100% /) and cron was stopped. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 10:49:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 15:49:34 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1543852174.31.0.788709270274.issue26544@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8687bd86e6f138ef0699a1e9f3f9555765949b51 by Victor Stinner in branch '2.7': bpo-26544: Make platform.libc_ver() less slow (GH-10868) https://github.com/python/cpython/commit/8687bd86e6f138ef0699a1e9f3f9555765949b51 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 10:54:29 2018 From: report at bugs.python.org (Lars Beckers) Date: Mon, 03 Dec 2018 15:54:29 +0000 Subject: [issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals In-Reply-To: <1279881989.28.0.725806934086.issue9338@psf.upfronthosting.co.za> Message-ID: <1543852469.22.0.788709270274.issue9338@psf.upfronthosting.co.za> Change by Lars Beckers : ---------- nosy: +extmind _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 11:02:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 16:02:13 +0000 Subject: [issue35389] Use gnu_get_libc_version() in platform.libc_ver()? Message-ID: <1543852933.45.0.788709270274.issue35389@psf.upfronthosting.co.za> New submission from STINNER Victor : Currently, platform.libc_ver() opens Python binary file (ex: /usr/bin/python3) and looks for a string like "GLIBC-2.28". Maybe gnu_get_libc_version() should be exposed in Python to get the version of the running glibc version? And use it if available, or fall back on parsing the binary file (as done currenetly) otherwise. Example: $ cat x.c #include #include #include int main(int argc, char *argv[]) { printf("GNU libc version: %s\n", gnu_get_libc_version()); printf("GNU libc release: %s\n", gnu_get_libc_release()); exit(EXIT_SUCCESS); } $ ./x GNU libc version: 2.28 GNU libc release: stable I'm not sure if it's possible that Python is compiled with glibc but run with a different libc implementation? -- Alternative: run a program to get the libc version which *might* be different than the libc version of Python if the libc is upgraded in the meanwhile (unlikely, but is technically possible on a server running for days): $ ldd --version ldd (GNU libc) 2.28 ... $ /lib64/libc.so.6 GNU C Library (GNU libc) stable release version 2.28. ... $ rpm -q glibc glibc-2.28-17.fc29.x86_64 ... etc. -- See also discussions on platform.libc_ver() performance: https://github.com/python/cpython/pull/10868 ---------- components: Library (Lib) messages: 330952 nosy: vstinner priority: normal severity: normal status: open title: Use gnu_get_libc_version() in platform.libc_ver()? versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 11:24:04 2018 From: report at bugs.python.org (Jakub Wilk) Date: Mon, 03 Dec 2018 16:24:04 +0000 Subject: [issue35389] Use gnu_get_libc_version() in platform.libc_ver()? In-Reply-To: <1543852933.45.0.788709270274.issue35389@psf.upfronthosting.co.za> Message-ID: <1543854244.43.0.788709270274.issue35389@psf.upfronthosting.co.za> Jakub Wilk added the comment: You can use confstr to get (running) glibc version: >>> os.confstr('CS_GNU_LIBC_VERSION') 'glibc 2.28' ---------- nosy: +jwilk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 11:24:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 16:24:54 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543854294.67.0.788709270274.issue34172@psf.upfronthosting.co.za> STINNER Victor added the comment: I suggest to revert this change, since it caused a regression: "multiprocessing.Pool.imap hangs in MacOs after applying this commit: (...)" ---------- nosy: +benjamin.peterson, ned.deily, vstinner priority: normal -> release blocker resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 11:27:30 2018 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Dec 2018 16:27:30 +0000 Subject: [issue10320] printf %qd is nonstandard In-Reply-To: <1288946289.37.0.37131892978.issue10320@psf.upfronthosting.co.za> Message-ID: <1543854450.54.0.788709270274.issue10320@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 11:28:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 16:28:50 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543854530.21.0.788709270274.issue34172@psf.upfronthosting.co.za> STINNER Victor added the comment: """ def the_test(): print("Begin") for x in multiprocessing.Pool().imap(int, ["4", "3"]): print(x) print("End") """ Side-note: Is it correct to use a pool without calling terminate() nor close()? Should we start to emit a ResourceWarning if a pool is not closed explicitly, as we did for files, sockets, asyncio event loops and subprocess.Popen objects? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 11:38:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 16:38:33 +0000 Subject: [issue35389] Use gnu_get_libc_version() in platform.libc_ver()? In-Reply-To: <1543852933.45.0.788709270274.issue35389@psf.upfronthosting.co.za> Message-ID: <1543855113.85.0.788709270274.issue35389@psf.upfronthosting.co.za> STINNER Victor added the comment: > >>> os.confstr('CS_GNU_LIBC_VERSION') > 'glibc 2.28' That's cool because it doesn't require to write new C code ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 11:41:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 16:41:18 +0000 Subject: [issue31473] PyMem_Raw* API in debug mode are not thread safe In-Reply-To: <1505410594.97.0.693915173163.issue31473@psf.upfronthosting.co.za> Message-ID: <1543855278.61.0.788709270274.issue31473@psf.upfronthosting.co.za> STINNER Victor added the comment: Note: PTHREAD_MUTEX_INITIALIZER can be used to statically initialize a mutex. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 11:43:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 16:43:57 +0000 Subject: [issue31473] Debug hooks on memory allocators are not thread safe (serialno variable) In-Reply-To: <1505410594.97.0.693915173163.issue31473@psf.upfronthosting.co.za> Message-ID: <1543855437.7.0.788709270274.issue31473@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: PyMem_Raw* API in debug mode are not thread safe -> Debug hooks on memory allocators are not thread safe (serialno variable) versions: +Python 2.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 11:45:16 2018 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 03 Dec 2018 16:45:16 +0000 Subject: [issue35385] time module: why not using tzname from the glibc? In-Reply-To: <1543834589.7.0.788709270274.issue35385@psf.upfronthosting.co.za> Message-ID: <1543855516.89.0.788709270274.issue35385@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 11:45:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 16:45:17 +0000 Subject: [issue35368] [2.7] Make PyMem_Malloc() thread-safe in debug mode In-Reply-To: <1543619268.28.0.788709270274.issue35368@psf.upfronthosting.co.za> Message-ID: <1543855517.53.0.788709270274.issue35368@psf.upfronthosting.co.za> STINNER Victor added the comment: According to bpo-31473, the debug hook on PyMem_Malloc() is not thread-safe: 'serialno' variable is not protected by any lock and it's not atomic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 11:45:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 16:45:31 +0000 Subject: [issue31473] Debug hooks on memory allocators are not thread safe (serialno variable) In-Reply-To: <1505410594.97.0.693915173163.issue31473@psf.upfronthosting.co.za> Message-ID: <1543855531.51.0.788709270274.issue31473@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-35368: [2.7] Make PyMem_Malloc() thread-safe in debug mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 11:48:29 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 03 Dec 2018 16:48:29 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543855709.15.0.788709270274.issue34172@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: V?ctor, I have a PR fixing this in: issue35378 Even if is not correct to not call close or join on the Pool, this behaviour was working before while now it hangs. The fix is really simple, si I think we should fix it and not revert the change on this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 12:11:49 2018 From: report at bugs.python.org (Dan) Date: Mon, 03 Dec 2018 17:11:49 +0000 Subject: [issue35390] ctypes not possible to pass NULL c_void_p in structure by reference Message-ID: <1543857109.69.0.788709270274.issue35390@psf.upfronthosting.co.za> New submission from Dan : I have a C struct typedef struct Effect { void* ptr; } Effect; where when I allocate the memory, the void* gets initialized to NULL, and pass back a pointer: Effect* get_effect(){ Effect* pEffect = malloc(sizeof(*pEffect)); pEffect->ptr = NULL; return pEffect; } In Python, I need to call the C function to initialize, and then pass a REFERENCE to the pointer to another C function: from ctypes import cdll, Structure, c_int, c_void_p, addressof, pointer, POINTER, c_double, byref clibptr = cdll.LoadLibrary("libpointers.so") class Effect(Structure): _fields_ = [("ptr", POINTER(c_double))] clibptr.get_effect.restype = POINTER(Effect) pEffect = clibptr.get_effect() effect = pEffect.contents clibptr.print_ptraddress(byref(effect.ptr)) But this prints an error, because effect.ptr is None, so byref(None) fails. Below is full working code in the case where ptr is instead a double*, where there is no problem. As far as I can tell, there is no way to pass a c_void_p field by reference, which would be very useful! #include #include #define PRINT_MSG_2SX(ARG0, ARG1) printf("From C - [%s] (%d) - [%s]: ARG0: [%s], ARG1: 0x%016llX\n", __FILE__, __LINE__, __FUNCTION__, ARG0, (unsigned long long)ARG1) typedef struct Effect { double* ptr; } Effect; void print_ptraddress(double** ptraddress){ PRINT_MSG_2SX("Address of Pointer:", ptraddress); } Effect* get_effect(){ Effect* pEffect = malloc(sizeof(*pEffect)); pEffect->ptr = NULL; print_ptraddress(&pEffect->ptr); return pEffect; } Python: from ctypes import cdll, Structure, c_int, c_void_p, addressof, pointer, POINTER, c_double, byref clibptr = cdll.LoadLibrary("libpointers.so") class Effect(Structure): _fields_ = [("ptr", POINTER(c_double))] clibptr.get_effect.restype = POINTER(Effect) pEffect = clibptr.get_effect() effect = pEffect.contents clibptr.print_ptraddress(byref(effect.ptr)) gives matching addresses: >From C - [pointers.c] (11) - [print_ptraddress]: ARG0: [Address of Pointer:], ARG1: 0x00007FC2E1AD3770 From C - [pointers.c] (11) - [print_ptraddress]: ARG0: [Address of Pointer:], ARG1: 0x00007FC2E1AD3770 ---------- components: ctypes messages: 330961 nosy: dtamayo priority: normal severity: normal status: open title: ctypes not possible to pass NULL c_void_p in structure by reference type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 12:31:12 2018 From: report at bugs.python.org (tzickel) Date: Mon, 03 Dec 2018 17:31:12 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543858272.87.0.788709270274.issue34172@psf.upfronthosting.co.za> tzickel added the comment: The previous posts here touch all this subjects: A. The documentation explicitly says: "When the pool object is garbage collected terminate() will be called immediately." (Happened till a code refactor 9 years ago introduced this bug). B. Large amount of code was developed for this technique: https://github.com/python/cpython/blob/master/Lib/multiprocessing/util.py#L147 (Till the end of the file almost) C. The reason I opened this bug was because I was called to see why a long running process crashes after a while, and found out it leaked tons of subprocesses / pool._cache memory. D. The quoted code, will currently simply leak each invocation lots of subprocesses... I too, think we should push for the said fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 12:53:07 2018 From: report at bugs.python.org (=?utf-8?q?Natal_Ng=C3=A9tal?=) Date: Mon, 03 Dec 2018 17:53:07 +0000 Subject: [issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0 In-Reply-To: <1276659404.06.0.425467293989.issue9004@psf.upfronthosting.co.za> Message-ID: <1543859587.87.0.788709270274.issue9004@psf.upfronthosting.co.za> Natal Ng?tal added the comment: Please can you convert your patch to a pull request on github. ---------- nosy: +hobbestigrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 12:57:37 2018 From: report at bugs.python.org (Andrew Dunai) Date: Mon, 03 Dec 2018 17:57:37 +0000 Subject: [issue35357] unittest.mock.call can't represent calls to a method called 'parent' In-Reply-To: <1543564537.68.0.788709270274.issue35357@psf.upfronthosting.co.za> Message-ID: <1543859857.87.0.788709270274.issue35357@psf.upfronthosting.co.za> Andrew Dunai added the comment: I've just stumbled upon this issue while looking for a good first issue to contribute on. If the community agrees this is something that needs to be done, I'll gladly work on this. ---------- nosy: +and3rson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 13:29:54 2018 From: report at bugs.python.org (Chris Withers) Date: Mon, 03 Dec 2018 18:29:54 +0000 Subject: [issue35357] unittest.mock.call can't represent calls to a method called 'parent' In-Reply-To: <1543564537.68.0.788709270274.issue35357@psf.upfronthosting.co.za> Message-ID: <1543861794.04.0.788709270274.issue35357@psf.upfronthosting.co.za> Chris Withers added the comment: Go for it! :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 13:38:20 2018 From: report at bugs.python.org (Andrew Dunai) Date: Mon, 03 Dec 2018 18:38:20 +0000 Subject: [issue35357] unittest.mock.call can't represent calls to a method called 'parent' In-Reply-To: <1543564537.68.0.788709270274.issue35357@psf.upfronthosting.co.za> Message-ID: <1543862300.85.0.788709270274.issue35357@psf.upfronthosting.co.za> Andrew Dunai added the comment: I see 2 most applicable ways to do it: - Hide .parent and .name by mangling - Define them within the mock class definition scope, but not within the class itself. As long as those are accessed only from within the mock class, I think second method would be better as it would completely remove them from mock's attributes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 13:40:10 2018 From: report at bugs.python.org (Chris Withers) Date: Mon, 03 Dec 2018 18:40:10 +0000 Subject: [issue35357] unittest.mock.call can't represent calls to a method called 'parent' In-Reply-To: <1543564537.68.0.788709270274.issue35357@psf.upfronthosting.co.za> Message-ID: <1543862410.72.0.788709270274.issue35357@psf.upfronthosting.co.za> Chris Withers added the comment: Not sure I follow the second option, I was thinking of just _mock_parent and _mock_name when I logged this. Happy to see a PR for either though! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 13:50:54 2018 From: report at bugs.python.org (dzhu) Date: Mon, 03 Dec 2018 18:50:54 +0000 Subject: [issue35267] reproducible deadlock with multiprocessing.Pool In-Reply-To: <1542416799.14.0.788709270274.issue35267@psf.upfronthosting.co.za> Message-ID: <1543863054.37.0.788709270274.issue35267@psf.upfronthosting.co.za> dzhu added the comment: Given the hairiness of the deadlock, I think I would rather let someone who has more experience with the codebase in general handle it, but I can come back to it if it doesn't get addressed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 13:52:14 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Dec 2018 18:52:14 +0000 Subject: [issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0 In-Reply-To: <1276659404.06.0.425467293989.issue9004@psf.upfronthosting.co.za> Message-ID: <1543863134.14.0.788709270274.issue9004@psf.upfronthosting.co.za> Change by Alexander Belopolsky : ---------- pull_requests: +10105 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 13:53:43 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Dec 2018 18:53:43 +0000 Subject: [issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0 In-Reply-To: <1276659404.06.0.425467293989.issue9004@psf.upfronthosting.co.za> Message-ID: <1543863223.88.0.788709270274.issue9004@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I submitted Gaurav's patch as PR 10870. Please review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 13:57:36 2018 From: report at bugs.python.org (Roundup Robot) Date: Mon, 03 Dec 2018 18:57:36 +0000 Subject: [issue25567] shlex.quote doesn't work on bytestrings In-Reply-To: <1446814343.82.0.823951892686.issue25567@psf.upfronthosting.co.za> Message-ID: <1543863456.68.0.788709270274.issue25567@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +10106 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 14:00:29 2018 From: report at bugs.python.org (Andrew Dunai) Date: Mon, 03 Dec 2018 19:00:29 +0000 Subject: [issue35357] unittest.mock.call can't represent calls to a method called 'parent' In-Reply-To: <1543564537.68.0.788709270274.issue35357@psf.upfronthosting.co.za> Message-ID: <1543863629.28.0.788709270274.issue35357@psf.upfronthosting.co.za> Andrew Dunai added the comment: I was considering wrapping a `unittest.mock._Call` class definition within a function that would contain name & parent as local variables (arguments). Thus they would be accessible within the `_Call` class, but wouldn't be accessible from the outside. However this would make them inaccessible from other instances of `_Call`. So I think I'll stick to the more trivial solution of renaming them to `_mock_name` and `_mock_parent` to conform to the rest of the module :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 14:04:51 2018 From: report at bugs.python.org (Omer Bartal) Date: Mon, 03 Dec 2018 19:04:51 +0000 Subject: [issue35391] threading.RLock exception handling while waiting Message-ID: <1543863891.16.0.788709270274.issue35391@psf.upfronthosting.co.za> New submission from Omer Bartal : (tested on python 2.7) Created a threading.Condition(threading.RLock()) A piece of code acquires the lock using a with block and waits (for a notify) While wait() is running a KeyboardInterrupt is raised An exception is raised while exiting the lock's with block: File "/usr/lib/python2.7/threading.py", line 289, in __exit__ return self.__lock.__exit__(*args) File "/usr/lib/python2.7/threading.py", line 216, in __exit__ self.release() File "/usr/lib/python2.7/threading.py", line 204, in release raise RuntimeError("cannot release un-acquired lock") example code running on the main thread: def waiting(lock): # (the lock was created using Condition(RLock())) with lock: lock.wait(timeout=xxx) # while waiting a keyboard interrupt is raised The issue is caused because threading.RLock doesn't handle the exception correctly: def _acquire_restore(self, count_owner): count, owner = count_owner self.__block.acquire() self.__count = count self.__owner = owner if __debug__: self._note("%s._acquire_restore()", self) The exception is raised after the acquire() returns and the count and owner are not restored. The problem was solved using the following fix (added try, finally): def _acquire_restore(self, count_owner): count, owner = count_owner try: self.__block.acquire() finally: self.__count = count self.__owner = owner if __debug__: self._note("%s._acquire_restore()", self) Looking at the code, this issue exists in python 3.8 as well. ---------- components: Library (Lib) messages: 330972 nosy: Omer Bartal priority: normal severity: normal status: open title: threading.RLock exception handling while waiting type: crash 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 Mon Dec 3 14:07:03 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2018 19:07:03 +0000 Subject: [issue35392] Create asyncio/sockutils.py Message-ID: <1543864023.37.0.788709270274.issue35392@psf.upfronthosting.co.za> New submission from Andrew Svetlov : As discussed with Yuri on https://github.com/python/cpython/pull/10867#discussion_r238395192 Candidate functions to move into the helper modules: * _set_nodelay() * _ipaddr_info() * _set_reuseport() ---------- components: asyncio messages: 330973 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Create asyncio/sockutils.py versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 14:08:15 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2018 19:08:15 +0000 Subject: [issue35380] Enable TCP_NODELAY for proactor event loop In-Reply-To: <1543791890.63.0.788709270274.issue35380@psf.upfronthosting.co.za> Message-ID: <1543864095.76.0.788709270274.issue35380@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset 3bc0ebab17bf5a2c29d2214743c82034f82e6573 by Andrew Svetlov in branch 'master': bpo-35380: Enable TCP_NODELAY for proactor event loop (#10867) https://github.com/python/cpython/commit/3bc0ebab17bf5a2c29d2214743c82034f82e6573 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 14:08:34 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Dec 2018 19:08:34 +0000 Subject: [issue35380] Enable TCP_NODELAY for proactor event loop In-Reply-To: <1543791890.63.0.788709270274.issue35380@psf.upfronthosting.co.za> Message-ID: <1543864114.73.0.788709270274.issue35380@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10109 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 14:17:22 2018 From: report at bugs.python.org (Andrew Dunai) Date: Mon, 03 Dec 2018 19:17:22 +0000 Subject: [issue35357] unittest.mock.call can't represent calls to a method called 'parent' In-Reply-To: <1543564537.68.0.788709270274.issue35357@psf.upfronthosting.co.za> Message-ID: <1543864642.19.0.788709270274.issue35357@psf.upfronthosting.co.za> Change by Andrew Dunai : ---------- keywords: +patch pull_requests: +10110 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 14:19:59 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2018 19:19:59 +0000 Subject: [issue35380] Enable TCP_NODELAY for proactor event loop In-Reply-To: <1543791890.63.0.788709270274.issue35380@psf.upfronthosting.co.za> Message-ID: <1543864799.17.0.788709270274.issue35380@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- pull_requests: +10111 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 14:33:03 2018 From: report at bugs.python.org (s-ball) Date: Mon, 03 Dec 2018 19:33:03 +0000 Subject: [issue35335] msgfmt should be able to merge more than one po file In-Reply-To: <1543389979.14.0.788709270274.issue35335@psf.upfronthosting.co.za> Message-ID: <1543865583.88.0.788709270274.issue35335@psf.upfronthosting.co.za> Change by s-ball : ---------- keywords: +patch pull_requests: +10112 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 14:33:03 2018 From: report at bugs.python.org (s-ball) Date: Mon, 03 Dec 2018 19:33:03 +0000 Subject: [issue9741] msgfmt.py generates invalid mo because msgfmt.make() does not clear dictionary In-Reply-To: <1283437902.68.0.344684434437.issue9741@psf.upfronthosting.co.za> Message-ID: <1543865583.95.0.663665092547.issue9741@psf.upfronthosting.co.za> Change by s-ball : ---------- pull_requests: +10113 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 14:39:20 2018 From: report at bugs.python.org (Filip Bengtsson) Date: Mon, 03 Dec 2018 19:39:20 +0000 Subject: [issue35393] Typo in documentation Message-ID: <1543865960.77.0.788709270274.issue35393@psf.upfronthosting.co.za> New submission from Filip Bengtsson : There are 256 characters in the range 0?255. ---------- assignee: docs at python components: Documentation messages: 330975 nosy: autom, docs at python priority: normal pull_requests: 10114 severity: normal status: open title: Typo in documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 14:48:46 2018 From: report at bugs.python.org (devkral) Date: Mon, 03 Dec 2018 19:48:46 +0000 Subject: [issue35377] urlsplit scheme argument broken In-Reply-To: <1543764457.53.0.788709270274.issue35377@psf.upfronthosting.co.za> Message-ID: <1543866526.65.0.788709270274.issue35377@psf.upfronthosting.co.za> devkral added the comment: ah, I get the idea behind urlunsplit. But still: for e.g. http, http:/// is invalid. These urls are invalid for e.g. requests. May I ask: urllib.parse is for web protocol urls? If yes, then there should be an option which defaults to my version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 15:10:03 2018 From: report at bugs.python.org (SilentGhost) Date: Mon, 03 Dec 2018 20:10:03 +0000 Subject: [issue35335] msgfmt should be able to merge more than one po file In-Reply-To: <1543389979.14.0.788709270274.issue35335@psf.upfronthosting.co.za> Message-ID: <1543867803.76.0.788709270274.issue35335@psf.upfronthosting.co.za> Change by SilentGhost : ---------- nosy: +eric.araujo, ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 15:11:38 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 03 Dec 2018 20:11:38 +0000 Subject: [issue35335] msgfmt should be able to merge more than one po file In-Reply-To: <1543389979.14.0.788709270274.issue35335@psf.upfronthosting.co.za> Message-ID: <1543867898.01.0.788709270274.issue35335@psf.upfronthosting.co.za> ?ric Araujo added the comment: I am curious about the use cases for this feature! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 15:20:09 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 03 Dec 2018 20:20:09 +0000 Subject: [issue35393] Typo in documentation In-Reply-To: <1543865960.77.0.788709270274.issue35393@psf.upfronthosting.co.za> Message-ID: <1543868409.71.0.788709270274.issue35393@psf.upfronthosting.co.za> Eric V. Smith added the comment: Can you be more specific? There's not enough information here to take any action. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 15:27:44 2018 From: report at bugs.python.org (s-ball) Date: Mon, 03 Dec 2018 20:27:44 +0000 Subject: [issue35335] msgfmt should be able to merge more than one po file In-Reply-To: <1543389979.14.0.788709270274.issue35335@psf.upfronthosting.co.za> Message-ID: <1543868864.28.0.788709270274.issue35335@psf.upfronthosting.co.za> s-ball added the comment: Currently my main use case is to be able to compile one or more po file(s) from a Python script, so I just need to be able to repeatedly call make from that script - which was broken per issue 9741 To be honest, I must acknowledge that I initially thought that compiling more than one po file was a common use case, and I only later realized that it was not. But as it was already (partially) allowed by msgfmt.py, I have just fixed the problems and added tests for it. BTW, I am also the author of last commit, but I have written it on a box where I had forgotten to correctly initialize git ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 15:30:25 2018 From: report at bugs.python.org (Filip Bengtsson) Date: Mon, 03 Dec 2018 20:30:25 +0000 Subject: [issue35393] Typo in documentation In-Reply-To: <1543865960.77.0.788709270274.issue35393@psf.upfronthosting.co.za> Message-ID: <1543869025.15.0.788709270274.issue35393@psf.upfronthosting.co.za> Filip Bengtsson added the comment: https://github.com/python/cpython/pull/10876/commits/00f39c15a13377f3920c72267b2b78a043d9b8ab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 15:43:20 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 03 Dec 2018 20:43:20 +0000 Subject: [issue35387] Dialogs on IDLE are accompanied by a small black window In-Reply-To: <1543845582.88.0.788709270274.issue35387@psf.upfronthosting.co.za> Message-ID: <1543869800.29.0.788709270274.issue35387@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I just updated my Macbook to Mohave. As implied, I do not see this on installed 3.7.1 with 8.6.8. But this is a heads-up for future releases. Someone with both a Mac Python development environment + tip 8.6 would have to look at this now. When the packaged tcl/tk in the repository is updated, idlelib/idle_test/htest.py should be run (in addition to test/test_idle.py) to see if the new tcl/tk introduces any visual artifacts. Htest passes 'htest=True' to ConfigDialog.__init__, but that only affects dialog placement. Kevin, can you run htest on your system? I don't understand "the dialog's [wm transient] implementation is part of the issue; the parent windows for the dialog are not hidden when run against the Tk tip," The transient call is 'self.transient(parent)' and the parent is the editor-based window, which is not blank and which should not be hidden. If tk adds a new 3rd blank window, that seems like a tk bug to me. ---------- nosy: +ned.deily, taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 15:53:13 2018 From: report at bugs.python.org (Oran Avraham) Date: Mon, 03 Dec 2018 20:53:13 +0000 Subject: [issue35310] select which was interrupted by EINTR isn't re-run if the timeout has passed In-Reply-To: <1543151946.49.0.788709270274.issue35310@psf.upfronthosting.co.za> Message-ID: <1543870393.8.0.788709270274.issue35310@psf.upfronthosting.co.za> Change by Oran Avraham : ---------- pull_requests: +10116 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 16:11:46 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2018 21:11:46 +0000 Subject: [issue35380] Enable TCP_NODELAY for proactor event loop In-Reply-To: <1543791890.63.0.788709270274.issue35380@psf.upfronthosting.co.za> Message-ID: <1543871506.14.0.788709270274.issue35380@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset fe91e9ba08a8854e2149398386702828fe3c0038 by Andrew Svetlov (Miss Islington (bot)) in branch '3.7': [3.7] bpo-35380: Enable TCP_NODELAY for proactor event loop (GH-10867) (GH-10872) https://github.com/python/cpython/commit/fe91e9ba08a8854e2149398386702828fe3c0038 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 16:31:40 2018 From: report at bugs.python.org (Chris Withers) Date: Mon, 03 Dec 2018 21:31:40 +0000 Subject: [issue35226] mock.call equality surprisingly broken In-Reply-To: <1542096332.14.0.788709270274.issue35226@psf.upfronthosting.co.za> Message-ID: <1543872700.26.0.788709270274.issue35226@psf.upfronthosting.co.za> Chris Withers added the comment: New changeset 8ca0fa9d2f4de6e69f0902790432e0ab2f37ba68 by Chris Withers in branch 'master': bpo-35226: Fix equality for nested unittest.mock.call objects. (#10555) https://github.com/python/cpython/commit/8ca0fa9d2f4de6e69f0902790432e0ab2f37ba68 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 16:32:23 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Dec 2018 21:32:23 +0000 Subject: [issue35226] mock.call equality surprisingly broken In-Reply-To: <1542096332.14.0.788709270274.issue35226@psf.upfronthosting.co.za> Message-ID: <1543872743.05.0.788709270274.issue35226@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10117 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 16:32:32 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Dec 2018 21:32:32 +0000 Subject: [issue35226] mock.call equality surprisingly broken In-Reply-To: <1542096332.14.0.788709270274.issue35226@psf.upfronthosting.co.za> Message-ID: <1543872752.18.0.788709270274.issue35226@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10118 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 16:54:24 2018 From: report at bugs.python.org (Chris Withers) Date: Mon, 03 Dec 2018 21:54:24 +0000 Subject: [issue35226] mock.call equality surprisingly broken In-Reply-To: <1542096332.14.0.788709270274.issue35226@psf.upfronthosting.co.za> Message-ID: <1543874064.87.0.788709270274.issue35226@psf.upfronthosting.co.za> Chris Withers added the comment: New changeset 67e6136a6d5c07141d4dba820c450a70db7aedd5 by Chris Withers (Miss Islington (bot)) in branch '3.6': bpo-35226: Fix equality for nested unittest.mock.call objects. (GH-10555) https://github.com/python/cpython/commit/67e6136a6d5c07141d4dba820c450a70db7aedd5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 16:54:47 2018 From: report at bugs.python.org (Chris Withers) Date: Mon, 03 Dec 2018 21:54:47 +0000 Subject: [issue35226] mock.call equality surprisingly broken In-Reply-To: <1542096332.14.0.788709270274.issue35226@psf.upfronthosting.co.za> Message-ID: <1543874087.04.0.788709270274.issue35226@psf.upfronthosting.co.za> Chris Withers added the comment: New changeset e8f9e4785caeef8a68bb7859280e91a4cb424b79 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-35226: Fix equality for nested unittest.mock.call objects. (GH-10555) https://github.com/python/cpython/commit/e8f9e4785caeef8a68bb7859280e91a4cb424b79 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 16:59:26 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2018 21:59:26 +0000 Subject: [issue35394] Add __slots__ = () to asyncio protocols Message-ID: <1543874366.92.0.788709270274.issue35394@psf.upfronthosting.co.za> New submission from Andrew Svetlov : Protocols have no members. Adding empty slots doesn't harm any existing code but it allows to write proper protocol implementation with slot-based class. ---------- components: asyncio messages: 330986 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Add __slots__ = () to asyncio protocols versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:01:20 2018 From: report at bugs.python.org (Chris Withers) Date: Mon, 03 Dec 2018 22:01:20 +0000 Subject: [issue35226] mock.call equality surprisingly broken In-Reply-To: <1542096332.14.0.788709270274.issue35226@psf.upfronthosting.co.za> Message-ID: <1543874480.65.0.788709270274.issue35226@psf.upfronthosting.co.za> Change by Chris Withers : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:05:04 2018 From: report at bugs.python.org (Chris Withers) Date: Mon, 03 Dec 2018 22:05:04 +0000 Subject: [issue17185] unittest mock create_autospec doesn't correctly replace mocksignature In-Reply-To: <1360621900.03.0.519438692167.issue17185@psf.upfronthosting.co.za> Message-ID: <1543874704.74.0.788709270274.issue17185@psf.upfronthosting.co.za> Chris Withers added the comment: xtreak - great to see action on this! First step would be to add a unit test for the failure case I reported. I like the tests you have too, but would be good to see the specific failure case covered too. Beyond that, if we can get all the the new tests passing, then I'd say you're there! ---------- versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:29:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 22:29:53 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543876193.27.0.788709270274.issue34172@psf.upfronthosting.co.za> STINNER Victor added the comment: tzickel: > A. The documentation explicitly says: "When the pool object is garbage collected terminate() will be called immediately." (Happened till a code refactor 9 years ago introduced this bug). It is a *very bad* practice to rely on __del__. Don't do that. That's why we introduced ResourceWarning. tzickel: > https://github.com/python/cpython/blob/master/Lib/multiprocessing/util.py#L147 (Till the end of the file almost) Is this API *incompatible* with pool.close()? Explicitly release resources? Pablo: > V?ctor, I have a PR fixing this in: (...) The fix is really simple, so I think we should fix it and not revert the change on this case. I'm not comfortable with the fix. I cannot explain why but I feel like adding a strong dependency from a child to its parent is going to lead to more bugs, not less. It sounds like a recipe for reference cycles. Maybe I'm just plain wrong. At this point, I would like that someone explains me what the problem is. https://github.com/python/cpython/pull/10852 is a solution, ok, but what is the problem? What does the code hangs, whereas previously it was fine? Is the example code really correct? Do we want to support such usage? I understand that msg330864 rely on black magic to expect that it's going to be fine. The lifetime of the pool is implicit and it sounds like a bad design. I don't want to endorse that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:30:52 2018 From: report at bugs.python.org (Naglis) Date: Mon, 03 Dec 2018 22:30:52 +0000 Subject: [issue35395] Typo in asyncio eventloop documentation Message-ID: <1543876252.15.0.788709270274.issue35395@psf.upfronthosting.co.za> New submission from Naglis : loop.add_writer and loop.add_signal_handler have *callback* in their signatures, but in their documentation regarding functools.partial usage the function is referred to as *func*. ---------- assignee: docs at python components: Documentation messages: 330989 nosy: docs at python, naglis priority: normal severity: normal status: open title: Typo in asyncio eventloop documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:33:12 2018 From: report at bugs.python.org (Naglis) Date: Mon, 03 Dec 2018 22:33:12 +0000 Subject: [issue35395] Typo in asyncio eventloop documentation In-Reply-To: <1543876252.15.0.788709270274.issue35395@psf.upfronthosting.co.za> Message-ID: <1543876392.51.0.788709270274.issue35395@psf.upfronthosting.co.za> Change by Naglis : ---------- keywords: +patch pull_requests: +10119 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:36:17 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2018 22:36:17 +0000 Subject: [issue35395] Typo in asyncio eventloop documentation In-Reply-To: <1543876252.15.0.788709270274.issue35395@psf.upfronthosting.co.za> Message-ID: <1543876577.1.0.788709270274.issue35395@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Would you create a PR with a fix? ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:36:51 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2018 22:36:51 +0000 Subject: [issue35395] Typo in asyncio eventloop documentation In-Reply-To: <1543876252.15.0.788709270274.issue35395@psf.upfronthosting.co.za> Message-ID: <1543876611.61.0.788709270274.issue35395@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Sorry, you did already ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:43:24 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 03 Dec 2018 22:43:24 +0000 Subject: [issue35396] Add support for __fspath__ to fnmatch.fnmatchase and filter Message-ID: <1543877004.47.0.788709270274.issue35396@psf.upfronthosting.co.za> New submission from Andr?s Delfino : Both fnmatch.fnmatchase and fnmatch.filter (in Unix) do not support path-like objects. This is inconvenient, for example, when taking advantage of os.scandir and working with os.DirEntry objets. Also, fnmatch.filter in Windows does support path-like objects, since it uses os.path.normcase (which works with path-like objects), so the change for Unix would add consistency. I propose for both functions to accept path-like objects, and in the case of fnmatch.filter, to return the path-like object if it matches the pattern (as it does now for Windows). ---------- components: Library (Lib) messages: 330992 nosy: adelfino priority: normal severity: normal status: open title: Add support for __fspath__ to fnmatch.fnmatchase and filter type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:45:06 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 03 Dec 2018 22:45:06 +0000 Subject: [issue35396] Add support for __fspath__ to fnmatch.fnmatchase and filter In-Reply-To: <1543877004.47.0.788709270274.issue35396@psf.upfronthosting.co.za> Message-ID: <1543877106.6.0.788709270274.issue35396@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +10121 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:51:57 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 03 Dec 2018 22:51:57 +0000 Subject: [issue35377] urlparse doesn't validate the scheme In-Reply-To: <1543764457.53.0.788709270274.issue35377@psf.upfronthosting.co.za> Message-ID: <1543877517.42.0.788709270274.issue35377@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I'm changing the name to better describe the problem, and suggest a better solution. The urlparse.urlsplit and .urlunsplit functions currently don't validate the scheme argument, if given. According to the RFC: Scheme names consist of a sequence of characters. The lower case letters "a"--"z", digits, and the characters plus ("+"), period ("."), and hyphen ("-") are allowed. For resiliency, programs interpreting URLs should treat upper case letters as equivalent to lower case in scheme names (e.g., allow "HTTP" as well as "http"). https://www.ietf.org/rfc/rfc1738.txt If the scheme is specified, I suggest it should be normalised to lowercase and validated, something like this: # untested if scheme: # scheme_chars already defined in module badchars = set(scheme) - set(scheme_chars) if badchars: raise ValueError('"%c" is invalid in URL schemes' % badchars.pop()) scheme = scheme.lower() This will help avoid errors such as passing 'http://' as the scheme. ---------- keywords: -patch stage: patch review -> title: urlsplit scheme argument broken -> urlparse doesn't validate the scheme versions: +Python 3.8 -Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:59:08 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 03 Dec 2018 22:59:08 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543877948.22.0.788709270274.issue34172@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: > I'm not comfortable with the fix. I cannot explain why but I feel like adding a strong dependency from a child to its parent is going to lead to more bugs, not less. It sounds like a recipe for reference cycles. Maybe I'm just plain wrong. The pool child objects (imap iterators, async results...etc) need to keep a reference to the parent because if not, the caller is in charge of doing that and that may lead to bugs. Is the same scenario as if I get a dictionary iterator and then I destroy my reference to the dictionary: if the iterator does not keep a reference to the parent (the dictionary) it will not be possible to be used in the future. Indeed, we can see that this is what happens: I'm not comfortable with the fix. I cannot explain why but I feel like adding a strong dependency from a child to its parent is going to lead to more bugs, not less. It sounds like a recipe for reference cycles. Maybe I'm just plain wrong. >>> x = {1:2} >>> y = iter(x) >>> gc.get_referrents(x) Traceback (most recent call last): File "", line 1, in AttributeError: module 'gc' has no attribute 'get_referrents' >>> gc.get_referrers(x) [, {'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': , 'y': , 'gc': , 'x': {1: 2}} ] We can see that the dict_keyiterator refers to the dictionary, keeping it alive. Here we have the same situation: if we do not keep the pool alive, the iterator will hang when iterating because the jobs won't get finished. >At this point, I would like that someone explains to me what the problem is. https://github.com/python/cpython/pull/10852 is a solution, ok, but what is the problem? What does the code hangs, whereas >previously it was fine? Is the example code really correct? Do we want to support such usage? The code hangs because the pool was not being destroyed before due to the reference cycle between the pool and an internal object (a Thread). Now it hangs because the worker thread is destroyed with the pool as no references are kept to it and the job that the iterator is waiting on is never finished. >I understand that msg330864 rely on black magic to expect that it's going to be fine. The lifetime of the pool is implicit and it sounds like a bad design. I don't want to endorse that. I found the weird code in the example in several projects. I have corrected it to use the pool as a context manager or to call close(), but this means that users are doing this and it used to work and not it does not: technically is a regression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:59:45 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 03 Dec 2018 22:59:45 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543877985.0.0.788709270274.issue34172@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg330994 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:59:57 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 03 Dec 2018 22:59:57 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543877997.33.0.788709270274.issue34172@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: > I'm not comfortable with the fix. I cannot explain why but I feel like adding a strong dependency from a child to its parent is going to lead to more bugs, not less. It sounds like a recipe for reference cycles. Maybe I'm just plain wrong. The pool child objects (imap iterators, async results...etc) need to keep a reference to the parent because if not, the caller is in charge of doing that and that may lead to bugs. Is the same scenario as if I get a dictionary iterator and then I destroy my reference to the dictionary: if the iterator does not keep a reference to the parent (the dictionary) it will not be possible to be used in the future. Indeed, we can see that this is what happens: >>> x = {1:2} >>> y = iter(x) >>> gc.get_referrents(x) Traceback (most recent call last): File "", line 1, in AttributeError: module 'gc' has no attribute 'get_referrents' >>> gc.get_referrers(x) [, {'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': , 'y': , 'gc': , 'x': {1: 2}} ] We can see that the dict_keyiterator refers to the dictionary, keeping it alive. Here we have the same situation: if we do not keep the pool alive, the iterator will hang when iterating because the jobs won't get finished. >At this point, I would like that someone explains to me what the problem is. https://github.com/python/cpython/pull/10852 is a solution, ok, but what is the problem? What does the code hangs, whereas >previously it was fine? Is the example code really correct? Do we want to support such usage? The code hangs because the pool was not being destroyed before due to the reference cycle between the pool and an internal object (a Thread). Now it hangs because the worker thread is destroyed with the pool as no references are kept to it and the job that the iterator is waiting on is never finished. >I understand that msg330864 rely on black magic to expect that it's going to be fine. The lifetime of the pool is implicit and it sounds like a bad design. I don't want to endorse that. I found the weird code in the example in several projects. I have corrected it to use the pool as a context manager or to call close(), but this means that users are doing this and it used to work and not it does not: technically is a regression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 18:00:15 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 03 Dec 2018 23:00:15 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543878015.72.0.788709270274.issue34172@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg330995 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 18:00:26 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 03 Dec 2018 23:00:26 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543878026.48.0.788709270274.issue34172@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: > I'm not comfortable with the fix. I cannot explain why but I feel like adding a strong dependency from a child to its parent is going to lead to more bugs, not less. It sounds like a recipe for reference cycles. Maybe I'm just plain wrong. The pool child objects (imap iterators, async results...etc) need to keep a reference to the parent because if not, the caller is in charge of doing that and that may lead to bugs. Is the same scenario as if I get a dictionary iterator and then I destroy my reference to the dictionary: if the iterator does not keep a reference to the parent (the dictionary) it will not be possible to be used in the future. Indeed, we can see that this is what happens: I'm not comfortable with the fix. I cannot explain why but I feel like adding a strong dependency from a child to its parent is going to lead to more bugs, not less. It sounds like a recipe for reference cycles. Maybe I'm just plain wrong. >>> x = {1:2} >>> y = iter(x) >>> gc.get_referrers(x) [, {'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': , 'y': , 'gc': , 'x': {1: 2}} ] We can see that the dict_keyiterator refers to the dictionary, keeping it alive. Here we have the same situation: if we do not keep the pool alive, the iterator will hang when iterating because the jobs won't get finished. >At this point, I would like that someone explains to me what the problem is. https://github.com/python/cpython/pull/10852 is a solution, ok, but what is the problem? What does the code hangs, whereas >previously it was fine? Is the example code really correct? Do we want to support such usage? The code hangs because the pool was not being destroyed before due to the reference cycle between the pool and an internal object (a Thread). Now it hangs because the worker thread is destroyed with the pool as no references are kept to it and the job that the iterator is waiting on is never finished. >I understand that msg330864 rely on black magic to expect that it's going to be fine. The lifetime of the pool is implicit and it sounds like a bad design. I don't want to endorse that. I found the weird code in the example in several projects. I have corrected it to use the pool as a context manager or to call close(), but this means that users are doing this and it used to work and not it does not: technically is a regression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 18:07:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 23:07:58 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543878478.86.0.788709270274.issue34172@psf.upfronthosting.co.za> STINNER Victor added the comment: > I found the weird code in the example in several projects. I have corrected it to use the pool as a context manager or to call close(), but this means that users are doing this and it used to work and not it does not: technically is a regression. That's why I'm asking for a revert :-) I suggest to revert this change immediately from 2.7, 3.6 and 3.7, and later see what can be done for master. Even if we design carefully an API, there will be always someone to misuse it :-) I would prefer to stop promoting such bad code and find a transition to more correct code. I disagree that a child should keep its parent alive. I would be ok to use a *weak reference* from the child to the parent to detect when the parent goes away, and maybe trigger an action in that case. For example, raise an exception or log a warning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 18:09:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 23:09:06 +0000 Subject: [issue35373] PyInit_timezone() must return a value In-Reply-To: <1543687384.46.0.788709270274.issue35373@psf.upfronthosting.co.za> Message-ID: <1543878546.31.0.788709270274.issue35373@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 5eb78c75128187a36d8e983027632fa51cc2ff4d by Victor Stinner in branch '3.7': [3.7] bpo-35373: Fix PyInit_timezone() error handling (GH-10864) https://github.com/python/cpython/commit/5eb78c75128187a36d8e983027632fa51cc2ff4d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 18:09:51 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Dec 2018 23:09:51 +0000 Subject: [issue35373] PyInit_timezone() must return a value In-Reply-To: <1543687384.46.0.788709270274.issue35373@psf.upfronthosting.co.za> Message-ID: <1543878591.01.0.788709270274.issue35373@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10122 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 18:11:42 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 03 Dec 2018 23:11:42 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543878702.44.0.788709270274.issue34172@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: > I disagree that a child should keep its parent alive. But this is normal across the standard library. For example, here is how a deque iterator keeps the deque alive: >>> x = deque([1,2,3]) >>> deque_iter = iter(x) >>> deque_weakref = weakref.ref(x) >>> del x >>> gc.collect() >>> gc.get_referrers(deque_weakref()) [<_collections._deque_iterator object at 0x0000024447ED6EA8>] Here, the deque iterator is the *only* reference to the deque. When we destroy it, the deque is destroyed: >>> del deque_iter >>> gc.collect() >>> deque_weakref() None ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 18:12:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 23:12:36 +0000 Subject: [issue35373] PyInit_timezone() must return a value In-Reply-To: <1543687384.46.0.788709270274.issue35373@psf.upfronthosting.co.za> Message-ID: <1543878756.91.0.788709270274.issue35373@psf.upfronthosting.co.za> STINNER Victor added the comment: In Python 2.7, inittimezone() is simpler and so less likely to fail. I propose to leave Python 2.7 unchanged. ---------- versions: +Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 18:22:38 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Dec 2018 23:22:38 +0000 Subject: [issue35373] PyInit_timezone() must return a value In-Reply-To: <1543687384.46.0.788709270274.issue35373@psf.upfronthosting.co.za> Message-ID: <1543879357.99.0.788709270274.issue35373@psf.upfronthosting.co.za> miss-islington added the comment: New changeset f455353bc0d195e092f09fec92ed16e9be02b7b1 by Miss Islington (bot) in branch '3.6': [3.7] bpo-35373: Fix PyInit_timezone() error handling (GH-10864) https://github.com/python/cpython/commit/f455353bc0d195e092f09fec92ed16e9be02b7b1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 18:25:19 2018 From: report at bugs.python.org (Martin Panter) Date: Mon, 03 Dec 2018 23:25:19 +0000 Subject: [issue35390] ctypes not possible to pass NULL c_void_p in structure by reference In-Reply-To: <1543857109.69.0.788709270274.issue35390@psf.upfronthosting.co.za> Message-ID: <1543879519.54.0.788709270274.issue35390@psf.upfronthosting.co.za> Martin Panter added the comment: This problem is common to structure fields in general, not just "c_void_p". I recently encountered it with a different type (don't remember the type now, but I notice plain types like c_int share the problem). I found which suggests using the undocumented "offset" attribute of the structure fields. In your case you might be able to do: print_ptraddress(byref(effect, Effect.ptr.offset)) however the pointer data type will be wrong. Maybe you can also do print_ptraddress(c_void_p.from_buffer(effect, Effect.ptr.offset)) although there is no automatic type checking that Effect.ptr refers to a c_void_p data type. Unless there is a better way, I think the "offset" attribute of structure fields should be documented. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 18:25:50 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 03 Dec 2018 23:25:50 +0000 Subject: [issue35397] Undeprecate and document urllib.parse.unwrap Message-ID: <1543879550.52.0.788709270274.issue35397@psf.upfronthosting.co.za> New submission from Steven D'Aprano : The urllib.parse module contains an undocumented function unwrap: unwrap('') --> 'type://host/path' This is useful. I've been re-inventing this function in many of my scripts, because I didn't know it existed (not documented!) and only stumbled across it by accident today, where I see it was deprecated in #27485 but I can't see any reason for the deprecation. If not for the deprecation, I would certainly use this unwrap function in preference to rolling my own. It seems to me that this might have been a case of an over-enthusiastic change. #27485 talks about deprecating the various split* functions, which are officially redundant (urlparse and urlsplit are preferred) but doesn't talk about unwrap, which is useful and (in my opinion) should have been documented rather than deprecated. ---------- messages: 331003 nosy: cheryl.sabella, serhiy.storchaka, steven.daprano priority: normal severity: normal status: open title: Undeprecate and document urllib.parse.unwrap type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 18:27:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2018 23:27:06 +0000 Subject: [issue35373] PyInit_timezone() must return a value In-Reply-To: <1543687384.46.0.788709270274.issue35373@psf.upfronthosting.co.za> Message-ID: <1543879626.04.0.788709270274.issue35373@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 Mon Dec 3 19:12:36 2018 From: report at bugs.python.org (kernc) Date: Tue, 04 Dec 2018 00:12:36 +0000 Subject: [issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals In-Reply-To: <1279881989.28.0.725806934086.issue9338@psf.upfronthosting.co.za> Message-ID: <1543882356.26.0.788709270274.issue9338@psf.upfronthosting.co.za> Change by kernc : ---------- nosy: +kernc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 20:24:01 2018 From: report at bugs.python.org (HenrikB) Date: Tue, 04 Dec 2018 01:24:01 +0000 Subject: [issue35305] subprocess.Popen(['/sbin/ldconfig', '-p'], stdin=PIPE) itself hangs/deadlocks (Linux) In-Reply-To: <1543034201.31.0.788709270274.issue35305@psf.upfronthosting.co.za> Message-ID: <1543886641.01.0.788709270274.issue35305@psf.upfronthosting.co.za> HenrikB added the comment: Thank you both for the comments and suggests. Before I'm getting to the "interesting" part, first to the "easy" one: >> What is also useful to know, is that I'm observing this on a legacy RHEL 6 system *with a customized kernel* part of the Scyld ClusterWare (https://www.penguincomputing.com/products/software/scyld-clusterware/) that *cannot* be updated: > Do you mean this trouble is happened only on the system? > Or can this trouble be reproducible on normal Linux kernel? The issue only occurs on this particular setup and I have not seen it on the two other RHEL/Centos systems I have access to. More below. > Are you able to reproduce the issue with Python 3? Yes, I can confirm that I'm seeing this issue also with Python 3.6.5 where: import subprocess p = subprocess.Popen(['/sbin/ldconfig', '-p'], stdout=subprocess.PIPE) stalls. > Can you please also try http://pypi.org/project/subprocess32/? Confirming that the following stalls on both Python 2.7.9 and 2.7.15: import subprocess32 p = subprocess32.Popen(['/sbin/ldconfig', '-p'], stdout=subprocess32.PIPE) POOR MAN'S DEBUGGING: Some more narrowing down on exactly where in the code it get stuck, with the disclaimer that I'm kind of a rookie when it comes to Python so I don't really know how to debug interactively etc. Using poor man's debug, that is, lots of print statements, I've narrowed down the stall of import subprocess p = subprocess.Popen(['/sbin/ldconfig', '-p'], stdout=subprocess.PIPE) to occur in the call: _execute_child(args = ['/sbin/ldconfig', '-p'], executable = None, preexec_fn = None, close_fds = False, cwd = None, env = None, universal_newlines = False, startupinfo = None, creationflags = 0, shell = False, to_close = set([3, 4]), p2cread = None, p2cwrite = None, c2pread = 3, c2pwrite = 4, errread = None, errwrite = None) where the *child* process (`self.pid == 0`) get stuck while calling _dup2(c2pwrite = 4, 1) which in turn calls os.dup2(a = 4, b = 1). The *parent* process get stuck in the call data = _eintr_retry_call(os.read, errpipe_read, 1048576). Not sure if that rules out certain things, or it just confirms what is already known/what strace is already saying. SOME MORE TROUBLESHOOTING: > So I think there are some bug in your kernel, relating to CLOEXEC. I'm also leaning towards the issue is related to the kernel. What is really interesting is that executable '/sbin/ldconfig' does *not* exist: $ ls /sbin/ldconfig ls: cannot access /sbin/ldconfig: No such file or directory but yet, I can call it: $ /sbin/ldconfig -p | wc -c 102460 and the output is indeed valid(*). For me, this strongly suggests that this particular system call is intercepted. I don't know the details, but I think this reflects the gist of the Scyld Clusterware kernel where it intercepts certain system calls makes a multi-node computer cluster to appear as one machine. (*) By valid I mean '/sbin/ldconfig -p' gives identical out on the compute nodes where this problem occurs as on the master node (where /sbin/ldconfig indeed exists) which Scyld is trying to "mirror" on the compute nodes. (I don't ask you to waste brain cycles on trying to follow this but I thought it's useful to put all this down for the record and potential future readers.) > Maybe, you can consult with the company. I will try to reach out to them to have them confirm my troubleshooting and see if this has been fixed in a later release of theirs. (Unfortunately, it won't help our current legacy system, which we are slowly moving away. Regardless, by posting this here, I hope I'll spare at least one other person some troubleshooting if they find this post; it caused me and lots of other users 100's of hours of confusion and troubleshooting before we got this far.) It would also be interesting to understand exactly what causes the stall. Is it indeed the pipe that gets filled up? Is that because the kernel does *not* respect the pipe limit and just dumps all output at once (> 65,536 bytes), i.e. it is a bug? Or is it that Python or one of its dependencies runs into a race condition because, say, it does not have a chance to set up the parent-child communication before the child (== the kernel) dumps too much data? Inada Naoki, does the above new info give further evidence to your comment: > So I think there are some bug in your kernel, relating to CLOEXEC. or did it possibly bring something new to the table? (I'm not too familiar with the Linux system calls and what to infer from strace logs). A BROKEN DESIGN? Finally, I don't know if the fact that `/sbin/ldconfig` does not exist but you can yet call it is (i) poorly designed kernel, or (ii) a valid design in the Unix world. I don't know the answer to this and I don't claim one is more correct than the other. I also don't know if there are other kernels out there that does this type of interception. If it is indeed a valid design, then one could argue that Python and other software tools should be able to handle it. FYI, this far I've/we've only hit this issue with Python (>= 2.7.13), maybe because of pure luck. It did not cause a problem in Python (< 2.7.13) and it does not cause a problem if we use subprocess.Popen(..., 'shell = True'). On the other hand, if one would argue that it is a poor design, then would it make sense to protect against by for instance asserting that the executable actually exists before calling it: --- subprocess.py 2018-12-03 16:34:05.777608059 -0800 +++ subprocess.py.2.7.15 2018-12-03 16:33:21.124909394 -0800 @@ -918,9 +918,6 @@ if executable is None: executable = args[0] - if not os.path.isfile(executable): - raise RuntimeError("No such executable: " + executable) - def _close_in_parent(fd): os.close(fd) to_close.remove(fd) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 20:43:02 2018 From: report at bugs.python.org (Eryk Sun) Date: Tue, 04 Dec 2018 01:43:02 +0000 Subject: [issue35390] ctypes not possible to pass NULL c_void_p in structure by reference In-Reply-To: <1543857109.69.0.788709270274.issue35390@psf.upfronthosting.co.za> Message-ID: <1543887782.78.0.788709270274.issue35390@psf.upfronthosting.co.za> Eryk Sun added the comment: Your example uses POINTER(c_double), not c_void_p. There's no problem with an actual pointer object (i.e. subclass of ctypes._Pointer). The problem is with simple types (i.e. immediate subclasses of ctypes._SimpleCData), including simple pointer types (i.e. c_void_p, c_char_p, c_wchar_p). Simple types are automatically converted to equivalent Python types when returned from functions or accessed in aggregates (i.e. structs and arrays). This is generally convenient, but at times it's a serious problem. Note that I said this is the case only for immediate subclasses of _SimpleCData. We can work around the behavior by using a subclass of the given simple type. For example: class my_wchar_p(ctypes.c_wchar_p): pass class T(ctypes.Structure): _fields_ = (('s1', ctypes.c_wchar_p), ('s2', my_wchar_p)) >>> t = T('abc', 'def') >>> t.s1 'abc' >>> t.s2 my_wchar_p(140497806976112) >>> t.s2.value 'def' If desired, we can retain the automatic conversion for function results by defining a staticmethod or classmethod named "_check_retval_" on the subclass. This method takes the result as parameter to be checked, possibly converted, and returned. One exception is that [wide-]character arrays always get converted into bytes/strings when accessed as fields of a struct. This is implemented in PyCField_FromDesc in Modules/_ctypes/cfield.c. We can't easily work around this hack because it doesn't check whether the base type is an immediate subclass of _SimpleCData. Instead we have to use the undocumented `offset` attribute. We can hide this workaround with a private field and a property. For example: class T(ctypes.Structure): _fields_ = (('s1', ctypes.c_wchar * 10), ('_s2', ctypes.c_wchar * 10)) @property def s2(self): offset = type(self)._s2.offset return (ctypes.c_wchar * 10).from_buffer(self, offset) >>> t = T('abc', 'def') >>> t._s2 'def' >>> t.s2 <__main__.c_wchar_Array_10 object at 0x7fc82c3a6510> >>> t.s2.value 'def' ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 21:27:45 2018 From: report at bugs.python.org (Montana Low) Date: Tue, 04 Dec 2018 02:27:45 +0000 Subject: [issue35398] SQLite incorrect row count for UPDATE Message-ID: <1543890465.67.0.788709270274.issue35398@psf.upfronthosting.co.za> New submission from Montana Low : SQLite driver returns an incorrect row count (-1) for UPDATE statements that begin with a comment. Downstream Reference: https://github.com/sqlalchemy/sqlalchemy/issues/4396 Test Case: ``` import sqlite3 conn = sqlite3.connect(":memory:") cursor = conn.cursor() cursor.execute(""" CREATE TABLE foo ( id INTEGER NOT NULL, updated_at DATETIME, PRIMARY KEY (id) ) """) cursor.execute(""" /* watermarking bug */ INSERT INTO foo (id, updated_at) VALUES (?, ?) """, [1, None]) cursor.execute(""" UPDATE foo SET updated_at=? WHERE foo.id = ? """, ('2018-12-02 14:55:57.169785', 1)) assert cursor.rowcount == 1 cursor.execute(""" /* watermarking bug */ UPDATE foo SET updated_at=? WHERE foo.id = ? """, ('2018-12-03 14:55:57.169785', 1)) assert cursor.rowcount == 1 ``` ---------- components: Library (Lib) messages: 331006 nosy: Montana Low priority: normal severity: normal status: open title: SQLite incorrect row count for UPDATE versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 21:39:34 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 04 Dec 2018 02:39:34 +0000 Subject: [issue11107] Cache constant "slice" instances In-Reply-To: <1296761121.69.0.66743926851.issue11107@psf.upfronthosting.co.za> Message-ID: <1543891174.35.0.788709270274.issue11107@psf.upfronthosting.co.za> Change by Josh Rosenberg : ---------- versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 22:34:43 2018 From: report at bugs.python.org (mike bayer) Date: Tue, 04 Dec 2018 03:34:43 +0000 Subject: [issue35398] SQLite incorrect row count for UPDATE In-Reply-To: <1543890465.67.0.788709270274.issue35398@psf.upfronthosting.co.za> Message-ID: <1543894483.43.0.788709270274.issue35398@psf.upfronthosting.co.za> Change by mike bayer : ---------- nosy: +zzzeek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 00:28:26 2018 From: report at bugs.python.org (Jorge Ramos) Date: Tue, 04 Dec 2018 05:28:26 +0000 Subject: [issue35399] Sysconfig bug Message-ID: <1543901306.28.0.788709270274.issue35399@psf.upfronthosting.co.za> New submission from Jorge Ramos : As can be seen in the file, the sysconfig test fails when profiling (PGO) this utility. This is the very same bug as described in issue#35299 https://bugs.python.org/issue35299 but in distutils. The problem is that when the test for sysconfig runs, it does not find the file pyconfig.h in the include directory. If this file is manually copied there, the test runs OK. ---------- files: sysconfig_bug.txt messages: 331007 nosy: neyuru priority: normal severity: normal status: open title: Sysconfig bug type: compile error versions: Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file47969/sysconfig_bug.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 00:44:02 2018 From: report at bugs.python.org (Jorge Ramos) Date: Tue, 04 Dec 2018 05:44:02 +0000 Subject: [issue35400] PGOMGR : warning PG0188: Message-ID: <1543902242.92.0.788709270274.issue35400@psf.upfronthosting.co.za> New submission from Jorge Ramos : The following command: Tools\msi\buildrelease.bat -x64 is used to build a 64 bit version (on win_10_64) of python (using visual studio 2017). The following modules did not build correctly because, presumably, the corresponding .PGC files could not be found, even when the PGO tests ran perfectly well: _elementtree _multiprocessing _ctypes winsound pyexpat _socket _bz2 _ssl _lzma _hashlib select See details in the attached file (search for the text "PGOMGR"). ---------- components: Build files: missing_pgc_files.txt messages: 331008 nosy: neyuru priority: normal severity: normal status: open title: PGOMGR : warning PG0188: type: compile error versions: Python 3.6 Added file: https://bugs.python.org/file47970/missing_pgc_files.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 00:44:19 2018 From: report at bugs.python.org (Jorge Ramos) Date: Tue, 04 Dec 2018 05:44:19 +0000 Subject: [issue35399] Sysconfig bug In-Reply-To: <1543901306.28.0.788709270274.issue35399@psf.upfronthosting.co.za> Message-ID: <1543902259.94.0.788709270274.issue35399@psf.upfronthosting.co.za> Change by Jorge Ramos : ---------- components: +Build _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 01:53:19 2018 From: report at bugs.python.org (tzickel) Date: Tue, 04 Dec 2018 06:53:19 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543906399.28.0.788709270274.issue34172@psf.upfronthosting.co.za> tzickel added the comment: Reverting the code will cause another class of problems, like the reason I fixed it. Programs written such as the example that Pablo gave (and what I've seen) will quietly leak child processes, file descriptors (for the pipes) and memory to a variety degree might not be detected, or in the end detected in a big error or crash. Also in some ResourceWarnings (if not all), the resources are closed in the end (like in sockets), here without this code patch you cannot implicitly reclaim the resources (because there is a Thread involved here), which I think is a high bar for the user to think about. You can also enable multiprocessing's debug logging to see how the code behaves with and without the fix: https://stackoverflow.com/a/1353037 I also agree with Pablo that there is code in the stdlib that holdes reference between child and parent. There is also code that has circular reference (for example Python 2's OrderedDict) and that is ok as well (not that this is the situation here). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 02:10:32 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 04 Dec 2018 07:10:32 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q Message-ID: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> New submission from Ned Deily : New versions of OpenSSL were released on 2018-11-20. We should update for 3.7.2, 3.6.8, and 2.7.16. ---------- assignee: christian.heimes components: SSL, Windows, macOS messages: 331010 nosy: benjamin.peterson, christian.heimes, ned.deily, paul.moore, ronaldoussoren, steve.dower, tim.golden, zach.ware priority: release blocker severity: normal status: open title: Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 02:22:40 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 04 Dec 2018 07:22:40 +0000 Subject: [issue35402] Upgrade macOS (and Windows?) installer to Tcl/Tk 8.6.9.1 Message-ID: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> New submission from Ned Deily : Tcl/Tk 8.6.9 (followed by Tk 8.6.9.1) was released recently. Among other things, they contain fixes for various issues on macOS, some of which have been seen by macOS users of IDLE and other tkinter apps, so the macOS installer should definitely be updated for 3.7.2, 3.6.8, and 2.7.16. ---------- components: Windows, macOS messages: 331011 nosy: ned.deily, paul.moore, ronaldoussoren, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Upgrade macOS (and Windows?) installer to Tcl/Tk 8.6.9.1 versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 02:31:20 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 04 Dec 2018 07:31:20 +0000 Subject: [issue35395] Typo in asyncio eventloop documentation In-Reply-To: <1543876252.15.0.788709270274.issue35395@psf.upfronthosting.co.za> Message-ID: <1543908680.04.0.788709270274.issue35395@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 17473347942353946fe455f797a2197cb89c1090 by Miss Islington (bot) (Naglis) in branch 'master': bpo-35395: fix typos in asyncio eventloop documentation (GH-10880) https://github.com/python/cpython/commit/17473347942353946fe455f797a2197cb89c1090 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 02:31:29 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 04 Dec 2018 07:31:29 +0000 Subject: [issue35395] Typo in asyncio eventloop documentation In-Reply-To: <1543876252.15.0.788709270274.issue35395@psf.upfronthosting.co.za> Message-ID: <1543908689.65.0.788709270274.issue35395@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10123 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 02:36:34 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 04 Dec 2018 07:36:34 +0000 Subject: [issue35395] Typo in asyncio eventloop documentation In-Reply-To: <1543876252.15.0.788709270274.issue35395@psf.upfronthosting.co.za> Message-ID: <1543908994.14.0.788709270274.issue35395@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6627d3ae1e151095fda4ec2592c7cfb759f23669 by Miss Islington (bot) in branch '3.7': bpo-35395: fix typos in asyncio eventloop documentation (GH-10880) https://github.com/python/cpython/commit/6627d3ae1e151095fda4ec2592c7cfb759f23669 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 03:01:11 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 04 Dec 2018 08:01:11 +0000 Subject: [issue35305] subprocess.Popen(['/sbin/ldconfig', '-p'], stdin=PIPE) itself hangs/deadlocks (Linux) In-Reply-To: <1543886641.01.0.788709270274.issue35305@psf.upfronthosting.co.za> Message-ID: INADA Naoki added the comment: > > where the *child* process (`self.pid == 0`) get stuck while calling _dup2(c2pwrite = 4, 1) which in turn calls os.dup2(a = 4, b = 1). > Doesn't child process get stuck while writing stdout? > > It would also be interesting to understand exactly what causes the stall. Is it indeed the pipe that gets filled up? Is that because the kernel does *not* respect the pipe limit and just dumps all output at once (> 65,536 bytes), i.e. it is a bug? Or is it that Python or one of its dependencies runs into a race condition because, say, it does not have a chance to set up the parent-child communication before the child (== the kernel) dumps too much data? > In a normal case, when child process succeeded to `exec`, `errpipe_write` must be closed, by CLOEXEC flag. Then, parent process `_eintr_retry_call(os.read, errpipe_read, 1048576)` returns b"". So parent process can read from stdio pipes, and child process can write to stdio pipes more than 65536 bytes. In your case, `errpipe_write` is not closed when `exec` is succeeded. That's kernel bug. Parent process `_eintr_retry_call(os.read, errpipe_read, 1048576)` does not return until child process exits. But child process is blocked when writing to stdout/err more than 65536 bytes. Deadlock happened. > > A BROKEN DESIGN? > > Finally, I don't know if the fact that `/sbin/ldconfig` does not exist but you can yet call it is (i) poorly designed kernel, or (ii) a valid design in the Unix world. I don't know the answer to this and I don't claim one is more correct than the other. I also don't know if there are other kernels out there that does this type of interception. If it is indeed a valid design, then one could argue that Python and other software tools should be able to handle it. FYI, this far I've/we've only hit this issue with Python (>= 2.7.13), maybe because of pure luck. It did not cause a problem in Python (< 2.7.13) and it does not cause a problem if we use subprocess.Popen(..., 'shell = True'). On the other hand, if one would argue that it is a poor design, then would it make sense to protect against by for instance asserting that the executable actually exists before calling it: > I don't know (i) or (II). But I don't think the assertion makes sense. I expect OSError rather than RuntimeError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 03:14:05 2018 From: report at bugs.python.org (pmpp) Date: Tue, 04 Dec 2018 08:14:05 +0000 Subject: [issue35403] support application/wasm in mimetypes and http.server Message-ID: <1543911244.97.0.788709270274.issue35403@psf.upfronthosting.co.za> New submission from pmpp : web browsers have recently gained ability to run webassembly code and for that a new content type has to be add to web servers for optimal use: wasm => Content-Type header : application/wasm spec says it : https://webassembly.github.io/spec/web-api/index.html#streaming-modules "Firefox streaming compilation needs Content-Type header set" cf: https://groups.google.com/forum/#!topic/emscripten-discuss/C7-i1gqWay4 google's filament documentation says: "Python's simple server [...] does not serve WebAssembly files with the correct MIME type." it would be logical since simple htt server is mostly used for testing software to offer support of that new techonology. ---------- messages: 331015 nosy: pmpp priority: normal severity: normal status: open title: support application/wasm in mimetypes and http.server type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 03:24:53 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 04 Dec 2018 08:24:53 +0000 Subject: [issue35403] support application/wasm in mimetypes and http.server In-Reply-To: <1543911244.97.0.788709270274.issue35403@psf.upfronthosting.co.za> Message-ID: <1543911893.41.0.788709270274.issue35403@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Python 3.7 is in feature-freeze, so any new features like this will have to be 3.8 only. ---------- nosy: +steven.daprano versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 03:25:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2018 08:25:54 +0000 Subject: [issue35365] Use wchar_t* buffer instead of Unicode object in code page decoder In-Reply-To: <1543606479.07.0.788709270274.issue35365@psf.upfronthosting.co.za> Message-ID: <1543911954.08.0.788709270274.issue35365@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset eeb719eac6347f5b6e85389aa13a386024766806 by Serhiy Storchaka in branch 'master': bpo-35365: Use a wchar_t* buffer in the code page decoder. (GH-10837) https://github.com/python/cpython/commit/eeb719eac6347f5b6e85389aa13a386024766806 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 03:28:01 2018 From: report at bugs.python.org (pmpp) Date: Tue, 04 Dec 2018 08:28:01 +0000 Subject: [issue35243] readline timeout too long for async gfx use In-Reply-To: <1542182908.62.0.788709270274.issue35243@psf.upfronthosting.co.za> Message-ID: <1543912081.57.0.788709270274.issue35243@psf.upfronthosting.co.za> Change by pmpp : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 04:01:35 2018 From: report at bugs.python.org (Charles-Axel Dein) Date: Tue, 04 Dec 2018 09:01:35 +0000 Subject: [issue35404] Document how to import _structure in email.message Message-ID: <1543914095.32.0.788709270274.issue35404@psf.upfronthosting.co.za> New submission from Charles-Axel Dein : The example for `walk()` in `email.message.EmailMessage` makes use of the `_structure` function but does not clarify how to import it. I can make a patch adding a line: from email.iterators import _structure ---------- assignee: docs at python components: Documentation messages: 331018 nosy: charlax, docs at python priority: normal severity: normal status: open title: Document how to import _structure in email.message type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 04:02:59 2018 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Dec 2018 09:02:59 +0000 Subject: [issue35404] Document how to import _structure in email.message In-Reply-To: <1543914095.32.0.788709270274.issue35404@psf.upfronthosting.co.za> Message-ID: <1543914179.23.0.788709270274.issue35404@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +10124 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 04:08:51 2018 From: report at bugs.python.org (Chris Withers) Date: Tue, 04 Dec 2018 09:08:51 +0000 Subject: [issue35357] unittest.mock.call can't represent calls to a method called 'parent' In-Reply-To: <1543564537.68.0.788709270274.issue35357@psf.upfronthosting.co.za> Message-ID: <1543914531.11.0.788709270274.issue35357@psf.upfronthosting.co.za> Chris Withers added the comment: New changeset e63e617ebbe481c498bdf037a62e09f4f9f3963f by Chris Withers (Andrew Dunai) in branch 'master': bpo-35357: Add _mock_ prefix to name/parent/from_kall attributes of _Call/_MagicProxy. (#10873) https://github.com/python/cpython/commit/e63e617ebbe481c498bdf037a62e09f4f9f3963f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 04:09:10 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 04 Dec 2018 09:09:10 +0000 Subject: [issue35357] unittest.mock.call can't represent calls to a method called 'parent' In-Reply-To: <1543564537.68.0.788709270274.issue35357@psf.upfronthosting.co.za> Message-ID: <1543914550.62.0.788709270274.issue35357@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 04:09:20 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 04 Dec 2018 09:09:20 +0000 Subject: [issue35357] unittest.mock.call can't represent calls to a method called 'parent' In-Reply-To: <1543564537.68.0.788709270274.issue35357@psf.upfronthosting.co.za> Message-ID: <1543914560.23.0.788709270274.issue35357@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10126 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 04:10:33 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 04 Dec 2018 09:10:33 +0000 Subject: [issue35395] Typo in asyncio eventloop documentation In-Reply-To: <1543876252.15.0.788709270274.issue35395@psf.upfronthosting.co.za> Message-ID: <1543914633.14.0.788709270274.issue35395@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thanks Naglis ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 04:34:38 2018 From: report at bugs.python.org (Chris Withers) Date: Tue, 04 Dec 2018 09:34:38 +0000 Subject: [issue35357] unittest.mock.call can't represent calls to a method called 'parent' In-Reply-To: <1543564537.68.0.788709270274.issue35357@psf.upfronthosting.co.za> Message-ID: <1543916078.58.0.788709270274.issue35357@psf.upfronthosting.co.za> Chris Withers added the comment: New changeset 12735c14134082584b899308af8dd8fcc9f15696 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-35357: Add _mock_ prefix to name/parent/from_kall attributes of _Call/_MagicProxy. (GH-10873) (#10887) https://github.com/python/cpython/commit/12735c14134082584b899308af8dd8fcc9f15696 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 04:34:51 2018 From: report at bugs.python.org (Chris Withers) Date: Tue, 04 Dec 2018 09:34:51 +0000 Subject: [issue35357] unittest.mock.call can't represent calls to a method called 'parent' In-Reply-To: <1543564537.68.0.788709270274.issue35357@psf.upfronthosting.co.za> Message-ID: <1543916091.17.0.788709270274.issue35357@psf.upfronthosting.co.za> Chris Withers added the comment: New changeset 70ca3fce9fe2bdd7bf97d5fe1299cfa5e32b3ad4 by Chris Withers (Miss Islington (bot)) in branch '3.6': bpo-35357: Add _mock_ prefix to name/parent/from_kall attributes of _Call/_MagicProxy. (GH-10873) https://github.com/python/cpython/commit/70ca3fce9fe2bdd7bf97d5fe1299cfa5e32b3ad4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 04:35:25 2018 From: report at bugs.python.org (Chris Withers) Date: Tue, 04 Dec 2018 09:35:25 +0000 Subject: [issue35357] unittest.mock.call can't represent calls to a method called 'parent' In-Reply-To: <1543564537.68.0.788709270274.issue35357@psf.upfronthosting.co.za> Message-ID: <1543916125.22.0.788709270274.issue35357@psf.upfronthosting.co.za> Change by Chris Withers : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 05:00:56 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 04 Dec 2018 10:00:56 +0000 Subject: [issue35379] IDLE's close fails when io.filename set to None In-Reply-To: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> Message-ID: <1543917656.86.0.788709270274.issue35379@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Serhiy, this issue appears to be about an exception raised when an IDLE editor shutdown is called twice. Any thoughts would be appreciated. The recent #35263 and old #17822 are also intermittant unsolved None attribute errors. #17614 (spunoff from *17613) fixed an instance of this exact error. #22614 fixed a related error. For an editor, io is unconditionally set and unset in __init__ and _close with 249: self.io = io = self.IOBinding(self) # from iomenu.py 1026: self.io = None The reset to None is after the failing self.io.filename test, so it seems that failure is not possible. There is no other occurrence of re 'io\s=\sNone' in idlelib. There are, however, 3 explicit explicit tests of self.io. 1. editor.py, 1005-6, David Scherer in 2009, no issue or commit message. def maybesave(self): if self.io: # should add '== None' here and 'return None' at end. Called by close() before _close(). 2. pyshell.py, Roger Serwy, #17614, 265-270 def restore_file_breaks(self): # part of editor initialization self.text.update() # this enables setting "BREAK" tags to be visible if self.io is None: # can happen if IDLE closes due to the .update() call return Triggered by editing a large file and hitting Alt-F4 after the editor window appears but before initialization is complete. (Should add issue to comment.) 3. pyshell.py, Serhiy Storchaka, 154-8 def color_breakpoint_text(self, color=True): "Turn colorizing of breakpoint text on or off" if self.io is None: # possible due to update in restore_file_breaks return The latter two are a race condition of close being called by an event handler while initialization is ongoing. This does not obviously apply to maybesave or this issue, but maybe somehow close can be called again while still executing. The failing line is followed by self.update_recent_files_list(new_file=self.io.filename) If there is no io, this cannot execute, and the test might be changed to if self.io in not None and self.io.filename: However, self.io.close() would then fail. Even with that fixed, I imagine that other shutdown calls in _close() could fail. If 'self.per = None' or 'self.top.destroy() are called once, a subsequent self.per or self.top will fail. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 05:02:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2018 10:02:59 +0000 Subject: [issue25862] TextIOWrapper assertion failure after read() and SEEK_CUR In-Reply-To: <1450143790.74.0.198268951027.issue25862@psf.upfronthosting.co.za> Message-ID: <1543917779.88.0.788709270274.issue25862@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset eab421bff954e4fb77516bfe6c98d30ced1412d0 by Serhiy Storchaka in branch '2.7': [2.7] bpo-25862: Fix several bugs in the _io module. (GH-8026) (GH-8033) https://github.com/python/cpython/commit/eab421bff954e4fb77516bfe6c98d30ced1412d0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 05:17:13 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 04 Dec 2018 10:17:13 +0000 Subject: [issue35405] Wrong traceback for AssertionError while running under pdb Message-ID: <1543918633.67.0.788709270274.issue35405@psf.upfronthosting.co.za> New submission from Karthikeyan Singaravelan : While running under pdb when I have an assertion error after the command continue then the assertion error is mentioned with the statement under which I have executed continue command in pdb. Below script has an assertion error on assert 1 == 2 but when I execute continue from assert 1 == 1 then it shows the line assert 1 == 1 with the AssertionError. I first noticed this with unittest but seems to be a general issue with assert. This is confusing while debugging unittest failures. I searched for issues but couldn't find a related one and this exists on master and 2.7. I assume this is a case where AssertionError doesn't use the current line and uses the one where pdb is executed with continue? I don't know if this is an issue with pdb or assert so I am adding Library as the component. # Reproducible script import pdb; pdb.set_trace(); assert 1 == 1 for i in range(10): pass assert 1 == 2 # Executing on master ? cpython git:(master) $ ./python.exe /tmp/foo.py > /tmp/foo.py(3)() -> assert 1 == 1 (Pdb) c Traceback (most recent call last): File "/tmp/foo.py", line 3, in assert 1 == 1 AssertionError ---------- components: Library (Lib) messages: 331025 nosy: xtreak priority: normal severity: normal status: open title: Wrong traceback for AssertionError while running under pdb type: behavior versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 05:18:16 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 04 Dec 2018 10:18:16 +0000 Subject: [issue35394] Add __slots__ = () to asyncio protocols In-Reply-To: <1543874366.92.0.788709270274.issue35394@psf.upfronthosting.co.za> Message-ID: <1543918696.61.0.788709270274.issue35394@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +10127 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 05:32:43 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 04 Dec 2018 10:32:43 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543919563.34.0.788709270274.issue34172@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: > that there is code in the stdlib that holdes reference between child and parent Just to clarify: is not that is just code in the stdlib that keeps a reference between child and parent. The examples I have given are the exact same situation that we have here: the iterator object associated with another needs to keep its parent alive to work correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 05:34:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 10:34:37 +0000 Subject: [issue35305] subprocess.Popen(['/sbin/ldconfig', '-p'], stdin=PIPE) itself hangs/deadlocks (Linux) In-Reply-To: <1543034201.31.0.788709270274.issue35305@psf.upfronthosting.co.za> Message-ID: <1543919677.13.0.788709270274.issue35305@psf.upfronthosting.co.za> STINNER Victor added the comment: I tested: * Python 2.6.6 (installed from RHEL) on RHEL6 * Python 2.7.15 (compiled manually) on RHEL6 * Python 2.7.15 (installed from Fedora) on Fedora 29 Note: I tested RHEL 6.10 with kernel 2.6.32-754.el6.x86_64. The fact that Python 3 is also impacted makes me think that it's a bug in your kernel, not in Python. "MY CONCLUSION: To me, this looks like a deadlock in Popen() itself - is that correct?" It works on all systems except of yours, I don't think that it's a bug in Python. You have to debug your kernel. This issue is not a Python bug, so I close it. If you are a Red Hat customer, contact Red Hat to get support. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 05:38:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2018 10:38:10 +0000 Subject: [issue16865] ctypes arrays >=2GB in length causes exception In-Reply-To: <1357334898.38.0.395259266999.issue16865@psf.upfronthosting.co.za> Message-ID: <1543919890.14.0.788709270274.issue16865@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 93d7918f77278f973a4a106c1d01ad2d9805816d by Serhiy Storchaka in branch '2.7': [2.7] bpo-16865: Support arrays >=2GB in ctypes. (GH-3006). (GH-7441) https://github.com/python/cpython/commit/93d7918f77278f973a4a106c1d01ad2d9805816d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 05:39:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 10:39:50 +0000 Subject: [issue16865] ctypes arrays >=2GB in length causes exception In-Reply-To: <1357334898.38.0.395259266999.issue16865@psf.upfronthosting.co.za> Message-ID: <1543919990.46.0.788709270274.issue16865@psf.upfronthosting.co.za> STINNER Victor added the comment: > The environment is Windows 8 Pro 64-bit running Python 64-bit in the WinPython distribution. This issue is specific to system with 32-bit long but 64-bit void* I guess? So only Windows is impacted? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 05:47:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2018 10:47:28 +0000 Subject: [issue16865] ctypes arrays >=2GB in length causes exception In-Reply-To: <1357334898.38.0.395259266999.issue16865@psf.upfronthosting.co.za> Message-ID: <1543920448.66.0.788709270274.issue16865@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This issue is specific to system with 32-bit long but 64-bit size_t. Yes, seems the only supported impacted system is Windows. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 05:47:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2018 10:47:52 +0000 Subject: [issue25862] TextIOWrapper assertion failure after read() and SEEK_CUR In-Reply-To: <1450143790.74.0.198268951027.issue25862@psf.upfronthosting.co.za> Message-ID: <1543920472.64.0.788709270274.issue25862@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 Dec 4 05:55:26 2018 From: report at bugs.python.org (=?utf-8?b?xZ5haGlu?=) Date: Tue, 04 Dec 2018 10:55:26 +0000 Subject: [issue35406] calendar.nextmonth and calendar.prevmonth functions doesn't check if the month is valid Message-ID: <1543920926.36.0.788709270274.issue35406@psf.upfronthosting.co.za> New submission from ?ahin : import calendar calendar.nextmonth(2018, 11) returns (2018, 12) which is OK. calendar.nextmonth(2018, 12) returns (2019, 1) which is also OK. calendar.nextmonth(2018, 13) returns (2018, 14). It would make more sense if this was raise calendar.IllegalMonthError. ---------- components: Library (Lib) messages: 331031 nosy: asocia priority: normal severity: normal status: open title: calendar.nextmonth and calendar.prevmonth functions doesn't check if the month is valid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 05:56:06 2018 From: report at bugs.python.org (=?utf-8?b?xZ5haGlu?=) Date: Tue, 04 Dec 2018 10:56:06 +0000 Subject: [issue35406] calendar.nextmonth and calendar.prevmonth functions doesn't check if the month is valid In-Reply-To: <1543920926.36.0.788709270274.issue35406@psf.upfronthosting.co.za> Message-ID: <1543920966.39.0.788709270274.issue35406@psf.upfronthosting.co.za> Change by ?ahin : ---------- keywords: +patch pull_requests: +10128 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 06:06:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2018 11:06:57 +0000 Subject: [issue35406] calendar.nextmonth and calendar.prevmonth functions doesn't check if the month is valid In-Reply-To: <1543920926.36.0.788709270274.issue35406@psf.upfronthosting.co.za> Message-ID: <1543921617.0.0.788709270274.issue35406@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: prevmonth() and nextmonth() are internal functions. They are used only in itermonthdays3(), and the month is already checked before calling them. ---------- nosy: +belopolsky, rhettinger, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 06:19:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2018 11:19:24 +0000 Subject: [issue35405] Wrong traceback for AssertionError while running under pdb In-Reply-To: <1543918633.67.0.788709270274.issue35405@psf.upfronthosting.co.za> Message-ID: <1543922364.94.0.788709270274.issue35405@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is nothing specific for assert and AssertionError. Other example: import pdb; pdb.set_trace() x = 1 y = 1/0 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 06:22:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2018 11:22:57 +0000 Subject: [issue35365] Use wchar_t* buffer instead of Unicode object in code page decoder In-Reply-To: <1543606479.07.0.788709270274.issue35365@psf.upfronthosting.co.za> Message-ID: <1543922577.12.0.788709270274.issue35365@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 Dec 4 06:35:47 2018 From: report at bugs.python.org (=?utf-8?b?xZ5haGlu?=) Date: Tue, 04 Dec 2018 11:35:47 +0000 Subject: [issue35406] calendar.nextmonth and calendar.prevmonth functions doesn't check if the month is valid In-Reply-To: <1543920926.36.0.788709270274.issue35406@psf.upfronthosting.co.za> Message-ID: <1543923347.69.0.788709270274.issue35406@psf.upfronthosting.co.za> ?ahin added the comment: I understand you but i still think these functions need to check it. As an end-user, I shouldn't see these functions to work with no errors for illegal months. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 06:47:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 11:47:51 +0000 Subject: [issue35389] Use gnu_get_libc_version() in platform.libc_ver()? In-Reply-To: <1543852933.45.0.788709270274.issue35389@psf.upfronthosting.co.za> Message-ID: <1543924071.01.0.788709270274.issue35389@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10130 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 07:03:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2018 12:03:18 +0000 Subject: [issue35389] Use gnu_get_libc_version() in platform.libc_ver()? In-Reply-To: <1543852933.45.0.788709270274.issue35389@psf.upfronthosting.co.za> Message-ID: <1543924998.89.0.788709270274.issue35389@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Currently libc_ver() can be used for other executable. See issue26544 for discussion about libc_ver(). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 07:07:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2018 12:07:44 +0000 Subject: [issue35406] calendar.nextmonth and calendar.prevmonth functions doesn't check if the month is valid In-Reply-To: <1543920926.36.0.788709270274.issue35406@psf.upfronthosting.co.za> Message-ID: <1543925264.76.0.788709270274.issue35406@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is the problem with current code? Can you provide an example that doesn't work correctly? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 07:23:28 2018 From: report at bugs.python.org (Sameer Joshi) Date: Tue, 04 Dec 2018 12:23:28 +0000 Subject: [issue35407] Datetime function with selenium Message-ID: <1543926208.85.0.788709270274.issue35407@psf.upfronthosting.co.za> New submission from Sameer Joshi : I have defined 2 variables , 1 for Friday and other for rest of weekdays. However when I match these two with the website date(which is 'today - 3' for Monday and 'today -1' )it shows the error as variable not defined. Below is code for the same. import datetime d = datetime.date.today() if d.weekday() == 0: tdelta = datetime.timedelta(days=3) friday = d - tdelta print(friday) elif d.weekday() in range(1,5): tdelta1 = datetime.timedelta(days=1) prev_day = d - tdelta1 print(prev_day) data_date = new.date() # data_date is the date fetched from website if data_date == friday: print("Data as on", friday, "for Race Horses") elif data_date == prev_day: print("Data as on", prev_day, "for Race Horses") else: print("Data update required.") ---------- messages: 331038 nosy: jsameer23 priority: normal severity: normal status: open title: Datetime function with selenium versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 07:25:21 2018 From: report at bugs.python.org (Sameer Joshi) Date: Tue, 04 Dec 2018 12:25:21 +0000 Subject: [issue35407] Datetime function with selenium In-Reply-To: <1543926208.85.0.788709270274.issue35407@psf.upfronthosting.co.za> Message-ID: <1543926321.03.0.788709270274.issue35407@psf.upfronthosting.co.za> Sameer Joshi added the comment: I have defined 2 variables , 1 for Friday and other for rest of weekdays. However when I match these two with the website date(which is 'today - 3' for Monday and 'today -1' )it shows the error as variable not defined. Below is code for the same. import datetime d = datetime.date.today() if d.weekday() == 0: tdelta = datetime.timedelta(days=3) friday = d - tdelta print(friday) elif d.weekday() in range(1,5): tdelta1 = datetime.timedelta(days=1) prev_day = d - tdelta1 print(prev_day) data_date = new.date() # data_date is the date fetched from website if data_date == friday: print("Data as on", friday, "for page") elif data_date == prev_day: print("Data as on", prev_day, "for page") else: print("Data update required.") ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 07:35:18 2018 From: report at bugs.python.org (Enric Tejedor Saavedra) Date: Tue, 04 Dec 2018 12:35:18 +0000 Subject: [issue35408] Python3.7 crash in PyCFunction_New due to broken _PyObject_GC_TRACK Message-ID: <1543926918.35.0.788709270274.issue35408@psf.upfronthosting.co.za> New submission from Enric Tejedor Saavedra : Attached is a reproducer that calls PyCFunction_New. The reproducer runs normally with Python 3.6.5, but it crashes with Python 3.7.1. The reason seems to be that the _PyObject_GC_TRACK macro ends up being called and it is broken in Python3.7. A fix for that macro seems to have been committed to master: https://github.com/python/cpython/pull/10507 ---------- components: Interpreter Core files: reproducer.cpp messages: 331040 nosy: etejedor priority: normal severity: normal status: open title: Python3.7 crash in PyCFunction_New due to broken _PyObject_GC_TRACK type: crash versions: Python 3.7 Added file: https://bugs.python.org/file47971/reproducer.cpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 08:12:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 13:12:14 +0000 Subject: [issue35389] Use gnu_get_libc_version() in platform.libc_ver()? In-Reply-To: <1543852933.45.0.788709270274.issue35389@psf.upfronthosting.co.za> Message-ID: <1543929134.45.0.788709270274.issue35389@psf.upfronthosting.co.za> STINNER Victor added the comment: > Currently libc_ver() can be used for other executable. See issue26544 for discussion about libc_ver(). Oh, my PR had a bug: it ignores executable. Fixed: it now only uses os.confstr() if the executable argument is not set. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 08:14:45 2018 From: report at bugs.python.org (=?utf-8?b?xZ5haGlu?=) Date: Tue, 04 Dec 2018 13:14:45 +0000 Subject: [issue35406] calendar.nextmonth and calendar.prevmonth functions doesn't check if the month is valid In-Reply-To: <1543920926.36.0.788709270274.issue35406@psf.upfronthosting.co.za> Message-ID: <1543929285.41.0.788709270274.issue35406@psf.upfronthosting.co.za> ?ahin added the comment: I'm suggesting this idea to consistency. Why an IllegalMonthError exists in calendar module if we don't raise this error when required? What would you say if I asked you to "What is the month number coming after 156th month?" Would you say 157 or prefer to inform me that I'm doing something wrong? >>> import calendar >>> calendar.nextmonth(2018, 12) (2019, 1) If Python is smart enough to jump next year's first month and not say (2018, 13) blindly, it should also check if the given month is valid. But: >>> calendar.nextmonth(2018, 157) (2018, 158) I think this is clearly a bug in the code. --------------------------------------------------- I'll wander away from the this issue but some of the functions in calendar module also not consistent with each other: >>> calendar.monthcalendar(2018, 12) # Runs with no problem. >>> calendar.monthcalendar(2018, 0) # Raises IllegalMonthError. >>> calendar.monthcalendar(2018, 13) # Raises IllegalMonthError. >>> calendar.month(2018, 12) # Runs with no problem. >>> calendar.month(2018, 0) # Raises IllegalMonthError. >>> calendar.month(2018, 13) # Raises IndexError??? Why? Wouldn't it be more reasonable if the last one also had raised IllegalMonthError? >>> calendar.monthrange(2018, 12) # Runs with no problem. >>> calendar.monthrange(2018, 0) # Raises IllegalMonthError. >>> calendar.monthrange(2018, 13) # Raises IllegalMonthError. >>> calendar.prmonth(2018, 12) # Runs with no problem. >>> calendar.prmonth(2018, 0) # Raises IllegalMonthError. >>> calendar.prmonth(2018, 13) # Raises IndexError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 08:21:20 2018 From: report at bugs.python.org (Vincent Michel) Date: Tue, 04 Dec 2018 13:21:20 +0000 Subject: [issue35409] Async generator might re-throw GeneratorExit on aclose() Message-ID: <1543929680.9.0.788709270274.issue35409@psf.upfronthosting.co.za> New submission from Vincent Michel : As far as I can tell, this issue is different than: https://bugs.python.org/issue34730 I noticed `async_gen.aclose()` raises a GeneratorExit exception if the async generator finalization awaits and silence a failing unfinished future (see example.py). This seems to be related to a bug in `async_gen_athrow_throw`. In fact, `async_gen.aclose().throw(exc)` does not silence GeneratorExit exceptions. This behavior can be reproduced without asyncio (see test.py). Attached is a possible patch, although I'm not too comfortable messing with the python C internals. I can make a PR if necessary. ---------- components: Interpreter Core files: example.py messages: 331043 nosy: vxgmichel priority: normal severity: normal status: open title: Async generator might re-throw GeneratorExit on aclose() type: behavior versions: Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file47972/example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 08:21:23 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 04 Dec 2018 13:21:23 +0000 Subject: [issue35407] Datetime function with selenium In-Reply-To: <1543926208.85.0.788709270274.issue35407@psf.upfronthosting.co.za> Message-ID: <1543929683.43.0.788709270274.issue35407@psf.upfronthosting.co.za> Steven D'Aprano added the comment: This is for reporting bugs in the Python interpreter and standard library, not for asking for help with bugs in your own code. The code you show contains a syntax error (some of the indentation is wrong) and at least one undefined variable, "new". The traceback you got would have shown you that: py> data_date = new.date() # data_date is the date fetched from website Traceback (most recent call last): File "", line 1, in NameError: name 'new' is not defined You need to define "new" before you can use it. Since this is not a bug in Python, I'm closing this. If you disagree, please read this website: http://sscce.org/ copy and paste the full exception you get, and be prepared to explain why it is a bug in the interpreter rather than in your code. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 08:22:10 2018 From: report at bugs.python.org (Vincent Michel) Date: Tue, 04 Dec 2018 13:22:10 +0000 Subject: [issue35409] Async generator might re-throw GeneratorExit on aclose() In-Reply-To: <1543929680.9.0.788709270274.issue35409@psf.upfronthosting.co.za> Message-ID: <1543929730.65.0.788709270274.issue35409@psf.upfronthosting.co.za> Change by Vincent Michel : Added file: https://bugs.python.org/file47973/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 08:22:28 2018 From: report at bugs.python.org (Vincent Michel) Date: Tue, 04 Dec 2018 13:22:28 +0000 Subject: [issue35409] Async generator might re-throw GeneratorExit on aclose() In-Reply-To: <1543929680.9.0.788709270274.issue35409@psf.upfronthosting.co.za> Message-ID: <1543929748.73.0.788709270274.issue35409@psf.upfronthosting.co.za> Change by Vincent Michel : ---------- keywords: +patch Added file: https://bugs.python.org/file47974/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 08:23:33 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 04 Dec 2018 13:23:33 +0000 Subject: [issue35405] Wrong traceback for AssertionError while running under pdb In-Reply-To: <1543918633.67.0.788709270274.issue35405@psf.upfronthosting.co.za> Message-ID: <1543929813.28.0.788709270274.issue35405@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks Serhiy, is this a known behavior or issue since it's from 2.7 ? This is highly confusing and misleading as in your example and also while debugging tests that fail at a different line of assertion statement from the current line in pdb which might also be a different assert statement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 08:41:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2018 13:41:12 +0000 Subject: [issue35406] calendar.nextmonth and calendar.prevmonth functions doesn't check if the month is valid In-Reply-To: <1543920926.36.0.788709270274.issue35406@psf.upfronthosting.co.za> Message-ID: <1543930872.49.0.788709270274.issue35406@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: nextmonth() is not a public API. You should not use it. If you want to make IllegalMonthError be always raised instead of IndexError for out of range month values, this is a different issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 09:06:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 14:06:06 +0000 Subject: [issue35346] Modernize Lib/platform.py code In-Reply-To: <1543455759.08.0.788709270274.issue35346@psf.upfronthosting.co.za> Message-ID: <1543932366.01.0.788709270274.issue35346@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10131 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 09:20:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 14:20:32 +0000 Subject: [issue35408] Python3.7 crash in PyCFunction_New due to broken _PyObject_GC_TRACK In-Reply-To: <1543926918.35.0.788709270274.issue35408@psf.upfronthosting.co.za> Message-ID: <1543933232.13.0.788709270274.issue35408@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 09:24:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 14:24:56 +0000 Subject: [issue35408] Python3.7 crash in PyCFunction_New due to broken _PyObject_GC_TRACK In-Reply-To: <1543926918.35.0.788709270274.issue35408@psf.upfronthosting.co.za> Message-ID: <1543933496.38.0.788709270274.issue35408@psf.upfronthosting.co.za> STINNER Victor added the comment: > Python3.7 crash in PyCFunction_New due to broken _PyObject_GC_TRACK It's unrelated. Your must not use the Python API before Python is initialized. If you modify your code like that, it works as expected: int main() { Py_Initialize(); PyMethodDef methoddef_ = { const_cast< char* >( "myfun" ), (PyCFunction) myfun, METH_O, NULL }; PyObject* myFunPtr = PyCFunction_New( &methoddef_, NULL ); Py_Finalize(); return 0; } I don't think that it's a regression. Python initialization is now well documented: https://docs.python.org/dev/c-api/init.html The documentation starts with: "In an application embedding Python, the Py_Initialize() function must be called before using any other Python/C API functions; with the exception of a few functions and the global configuration variables." PyCFunction_New() is an example of function of the Python C API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 09:29:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 14:29:58 +0000 Subject: [issue35408] Python3.7 crash in PyCFunction_New due to broken _PyObject_GC_TRACK In-Reply-To: <1543926918.35.0.788709270274.issue35408@psf.upfronthosting.co.za> Message-ID: <1543933798.2.0.788709270274.issue35408@psf.upfronthosting.co.za> STINNER Victor added the comment: I close the issue as "not a bug". Even if the code "worked" in Python 3.6, it worked because of a mistake :-) ---------- nosy: +eric.snow, ncoghlan resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 09:54:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 14:54:05 +0000 Subject: [issue35351] LTOFLAGS are passed to BASECFLAGS when using LTO In-Reply-To: <1543505341.98.0.788709270274.issue35351@psf.upfronthosting.co.za> Message-ID: <1543935245.94.0.788709270274.issue35351@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset f92c7aa1ae81efa475b5aecf66e4711ef0f52c4c by Victor Stinner (stratakis) in branch 'master': bpo-35351: Pass link time optimization flags to CFLAGS_NODIST (GH-10797) https://github.com/python/cpython/commit/f92c7aa1ae81efa475b5aecf66e4711ef0f52c4c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 09:54:18 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 04 Dec 2018 14:54:18 +0000 Subject: [issue35351] LTOFLAGS are passed to BASECFLAGS when using LTO In-Reply-To: <1543505341.98.0.788709270274.issue35351@psf.upfronthosting.co.za> Message-ID: <1543935258.97.0.788709270274.issue35351@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10132 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:06:01 2018 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Tue, 04 Dec 2018 15:06:01 +0000 Subject: [issue35406] calendar.nextmonth and calendar.prevmonth functions doesn't check if the month is valid In-Reply-To: <1543920926.36.0.788709270274.issue35406@psf.upfronthosting.co.za> Message-ID: <1543935961.58.0.788709270274.issue35406@psf.upfronthosting.co.za> Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) added the comment: I agree with Serhiy, nextmonth() is not a public API,you should not use it. ---------- nosy: +thatiparthy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:06:26 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 04 Dec 2018 15:06:26 +0000 Subject: [issue35351] LTOFLAGS are passed to BASECFLAGS when using LTO In-Reply-To: <1543505341.98.0.788709270274.issue35351@psf.upfronthosting.co.za> Message-ID: <1543935986.62.0.788709270274.issue35351@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 1751423686d05e3facdd6da2620202728e5d7917 by Miss Islington (bot) in branch '3.7': bpo-35351: Pass link time optimization flags to CFLAGS_NODIST (GH-10797) https://github.com/python/cpython/commit/1751423686d05e3facdd6da2620202728e5d7917 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:25:52 2018 From: report at bugs.python.org (rdb) Date: Tue, 04 Dec 2018 15:25:52 +0000 Subject: [issue35376] modulefinder skips nested modules with same name as top-level bad module In-Reply-To: <1543762855.5.0.788709270274.issue35376@psf.upfronthosting.co.za> Message-ID: <1543937152.52.0.788709270274.issue35376@psf.upfronthosting.co.za> Change by rdb : ---------- pull_requests: +10133 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:27:11 2018 From: report at bugs.python.org (=?utf-8?b?xZ5haGlu?=) Date: Tue, 04 Dec 2018 15:27:11 +0000 Subject: [issue35406] calendar.nextmonth and calendar.prevmonth functions doesn't check if the month is valid In-Reply-To: <1543920926.36.0.788709270274.issue35406@psf.upfronthosting.co.za> Message-ID: <1543937231.75.0.788709270274.issue35406@psf.upfronthosting.co.za> ?ahin added the comment: OK now it isn't a problem if we shouldn't use this function directly but how am i going to understand if a function is public API or not? In classes, we are using single or double underscore to indicate that the function or variable we're declaring is intended to be private. Is there anything similar to this for "public API functions" or am I in the wrong way? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:32:05 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 04 Dec 2018 15:32:05 +0000 Subject: [issue35406] calendar.nextmonth and calendar.prevmonth functions doesn't check if the month is valid In-Reply-To: <1543937231.75.0.788709270274.issue35406@psf.upfronthosting.co.za> Message-ID: <3F61E913-A599-429C-A26F-1EB969CD28EB@gmail.com> Alexander Belopolsky added the comment: > On Dec 4, 2018, at 10:27 AM, ?ahin wrote: > > Is there anything similar to this for "public API functions"? Yes - read the reference manual. If the function is not there it is not public. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:37:16 2018 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 04 Dec 2018 15:37:16 +0000 Subject: [issue35406] calendar.nextmonth and calendar.prevmonth functions doesn't check if the month is valid In-Reply-To: <1543920926.36.0.788709270274.issue35406@psf.upfronthosting.co.za> Message-ID: <1543937836.26.0.788709270274.issue35406@psf.upfronthosting.co.za> Paul Ganssle added the comment: Might it be worth moving `nextmonth` and `prevmonth` to `calendar._nextmonth` and `calendar._prevmonth` to make it more clear that these are private methods? Due to Hyrum's Law, people will be using them anyway, but it could have a short deprecation period where `calendar.nextmonth` and `calendar.prevmonth` raise DeprecationWarning and then call `calendar._nextmonth` and `calendar._prevmonth`. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:37:38 2018 From: report at bugs.python.org (rdb) Date: Tue, 04 Dec 2018 15:37:38 +0000 Subject: [issue35376] modulefinder skips nested modules with same name as top-level bad module In-Reply-To: <1543762855.5.0.788709270274.issue35376@psf.upfronthosting.co.za> Message-ID: <1543937858.72.0.788709270274.issue35376@psf.upfronthosting.co.za> Change by rdb : ---------- pull_requests: +10134 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:39:48 2018 From: report at bugs.python.org (rdb) Date: Tue, 04 Dec 2018 15:39:48 +0000 Subject: [issue35376] modulefinder skips nested modules with same name as top-level bad module In-Reply-To: <1543762855.5.0.788709270274.issue35376@psf.upfronthosting.co.za> Message-ID: <1543937988.14.0.788709270274.issue35376@psf.upfronthosting.co.za> Change by rdb : ---------- pull_requests: -10133 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:42:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 15:42:48 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1543938168.67.0.788709270274.issue35363@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh. That's just a variant of the old bpo-25234. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:43:15 2018 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 04 Dec 2018 15:43:15 +0000 Subject: =?utf-8?b?W2lzc3VlMzUzNjRdIERhdGV0aW1lIOKAnGZyb210aW1lc3RhbXAoKeKAnSBp?= =?utf-8?q?gnores_inheritance_if_timezone_is_not_None?= In-Reply-To: <1543598741.31.0.788709270274.issue35364@psf.upfronthosting.co.za> Message-ID: <1543938195.8.0.788709270274.issue35364@psf.upfronthosting.co.za> Paul Ganssle added the comment: This is another manifestation of issue 32417. The biggest complication, to me, is that adding a `timedelta` to a datetime always returns a `datetime.datetime` rather than the subclass that it was added to. I *think* most if not all people would consider this a bug, and we can probably fix it. That should cascade down to `fromutc` and then to `astimezone`. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:43:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 15:43:50 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1543938230.29.0.788709270274.issue35363@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10136 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:44:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2018 15:44:19 +0000 Subject: [issue35406] calendar.nextmonth and calendar.prevmonth functions doesn't check if the month is valid In-Reply-To: <1543920926.36.0.788709270274.issue35406@psf.upfronthosting.co.za> Message-ID: <1543938259.24.0.788709270274.issue35406@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: They are not in the __all__ list and are not documented. If __all__ is defined for the module, there is no need to use the underscore prefix for private globals. The calendar module is not special, many other modules follow this convention. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 11:04:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2018 16:04:28 +0000 Subject: =?utf-8?b?W2lzc3VlMzUzNjRdIERhdGV0aW1lIOKAnGZyb210aW1lc3RhbXAoKeKAnSBp?= =?utf-8?q?gnores_inheritance_if_timezone_is_not_None?= In-Reply-To: <1543598741.31.0.788709270274.issue35364@psf.upfronthosting.co.za> Message-ID: <1543939468.57.0.788709270274.issue35364@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is not easy problem, ant it doesn't have right solution. Different decisions were made for the result type of alternate constructors and operators for different classes. The frombytes() method of an int subclass returns an int. As well arithmetic operations with int subclasses return an int. The fromhex() method of a bytes subclass returns an instance of this subclass. But arithmetic operations with bytes subclasses return a bytes object. The fromkeys() method of a dict subclass returns an instance of this subclass. The copy() method of a dict subclass returns a dict. The copy() method of a dict subclass returns a dict. But defaultdict, OrdertedDict and Counter redefine it: copy() methods of their subclasses return the object of the same type. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 11:12:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 16:12:51 +0000 Subject: [issue35296] Install Include/internal/ header files In-Reply-To: <1542908001.51.0.788709270274.issue35296@psf.upfronthosting.co.za> Message-ID: <1543939971.21.0.788709270274.issue35296@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10137 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 11:13:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 16:13:36 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1543940016.66.0.788709270274.issue35363@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 4752e65250bce60b97d5af702d586092d02fbf58 by Victor Stinner in branch 'master': bpo-35363, test_eintr: skip test_open() on macOS (GH-10896) https://github.com/python/cpython/commit/4752e65250bce60b97d5af702d586092d02fbf58 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 11:13:48 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 04 Dec 2018 16:13:48 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1543940028.31.0.788709270274.issue35363@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10138 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 11:13:58 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 04 Dec 2018 16:13:58 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1543940038.11.0.788709270274.issue35363@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10139 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 11:15:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 16:15:13 +0000 Subject: [issue35296] Install Include/internal/ header files In-Reply-To: <1542908001.51.0.788709270274.issue35296@psf.upfronthosting.co.za> Message-ID: <1543940113.8.0.788709270274.issue35296@psf.upfronthosting.co.za> STINNER Victor added the comment: I reopen the issue since I'm now also interested to make the change in Python 3.7. I wrote PR 10897. See discussion on python-dev: https://mail.python.org/pipermail/python-dev/2018-December/155921.html ---------- resolution: fixed -> status: closed -> open versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 11:18:15 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 16:18:15 +0000 Subject: [issue35346] Modernize Lib/platform.py code In-Reply-To: <1543455759.08.0.788709270274.issue35346@psf.upfronthosting.co.za> Message-ID: <1543940295.23.0.788709270274.issue35346@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b8e689a6e8134e88f857a55e50b6a4977967e385 by Victor Stinner in branch 'master': bpo-35346, platform: import subprocess in _syscmd_file() (GH-10892) https://github.com/python/cpython/commit/b8e689a6e8134e88f857a55e50b6a4977967e385 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 11:24:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2018 16:24:08 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1543940648.03.0.788709270274.issue31961@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 11:32:14 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 04 Dec 2018 16:32:14 +0000 Subject: [issue35405] Wrong traceback for AssertionError while running under pdb In-Reply-To: <1543918633.67.0.788709270274.issue35405@psf.upfronthosting.co.za> Message-ID: <1543941134.28.0.788709270274.issue35405@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Seems this is a known issue and has an open PR https://github.com/python/cpython/pull/6233 . I checked out the PR locally and it works fine on the examples presented though has merge conflicts with master. I am closing it as duplicate of issue16482 that links to other possible issues. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> pdb.set_trace() clobbering traceback on error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 11:53:04 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 04 Dec 2018 16:53:04 +0000 Subject: [issue35257] Add LDFLAGS_NODIST for the LDFLAGS not intended for propagation to C extensions. In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1543942384.59.0.788709270274.issue35257@psf.upfronthosting.co.za> Change by Charalampos Stratakis : ---------- keywords: +patch pull_requests: +10140 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 12:08:21 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 04 Dec 2018 17:08:21 +0000 Subject: [issue16482] pdb.set_trace() clobbering traceback on error In-Reply-To: <1353002125.56.0.265106335805.issue16482@psf.upfronthosting.co.za> Message-ID: <1543943301.62.0.788709270274.issue16482@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I too just hit this issue with pdb and checked out the PR locally. It works fine though it has merge conflicts with latest master. I am adding 3.8, 3.7 and 3.6 removing the older versions that don't support bug fixes. Since the PR has unknown repository I suppose @xdegaye has deleted their fork and I don't know if the PR can be revived without opening a new one. I have merged the latest master in my own fork resolving conflicts in case a new PR has to be generated : https://github.com/python/cpython/compare/master...tirkarthi:pr-6233-latest. Adding Serhiy to the issue. The PR also solves many linked issues in the PR and I thought to add the update here since it seemed appropriate. Thanks much @xdegaye for the PR ---------- nosy: +serhiy.storchaka, xtreak versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 12:12:10 2018 From: report at bugs.python.org (=?utf-8?q?Natal_Ng=C3=A9tal?=) Date: Tue, 04 Dec 2018 17:12:10 +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: <1543943530.89.0.788709270274.issue5430@psf.upfronthosting.co.za> Change by Natal Ng?tal : ---------- pull_requests: +10141 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 12:13:33 2018 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 04 Dec 2018 17:13:33 +0000 Subject: =?utf-8?b?W2lzc3VlMzUzNjRdIERhdGV0aW1lIOKAnGZyb210aW1lc3RhbXAoKeKAnSBp?= =?utf-8?q?gnores_inheritance_if_timezone_is_not_None?= In-Reply-To: <1543598741.31.0.788709270274.issue35364@psf.upfronthosting.co.za> Message-ID: <1543943613.6.0.788709270274.issue35364@psf.upfronthosting.co.za> Paul Ganssle added the comment: > This is not easy problem, ant it doesn't have right solution. Different decisions were made for the result type of alternate constructors and operators for different classes. It's certainly true that it occasionally makes sense to do something like this, but this one is particularly egregious. Because of an implementation detail of `fromtimestamp` (and `now`, and a few others), which is actually relying on an implementation detail of `fromutc`, which is actually relying on what *may* have been a choice in the `__add__` method of timedelta, you get a *different class* in the alternate constructor of a subclass depending on the *argument* to the alternate constructor. This is pretty solidly a bug. I think the things we need to take into account are: 1. What do we consider the contract of the relevant functions involved 2. What do people expect the code to do? 3. Is it likely that anyone is *relying* on the existing behavior. The most fundamental problem, timedelta addition, is also the closest call, so I think we should *start* with the analysis there. For #1, the contract is either "x + timedelta returns a datetime if x is a datetime subclass" or "x + timedelta returns a datetime or datetime subclass" - both of these are consistent with the current behavior, and as long as "datetime subclass isa datetime", I don't see that there would be anything fundamentally backwards-incompatible about changing what is actually returned. For #2, I think people almost universally consider it a bug or at the very least counter-intuitive that `DatetimeSubclass + timedelta` returns a datetime and not a DatetimeSubclass. There are many instances of people who create datetime subclasses like arrow and pendulum (for just two OSS examples) - all of them end up with fairly complicated implementations where they have to work around all the places where the underlying implementation has hard-coded datetime. Some of these have been fixed already, but it's a notorious game of whack-a-mole. I've never heard of a situation where someone *wants* the other behavior. For #3, it is feasible that there are people who are accidentally relying on this behavior, but it would only be in pretty unpythonic code (like assert type(dt) == datetime), or when using broken datetime subclasses. The only situation where I can think of where this behavior might be desirable is if you have a thin datetime wrapper that only needs to be the wrapper class at the point of input, and afterwards you don't care what class it is (and as such you'd want it to be datetime, so as to take advantage of the fast paths in C code). That is far from the common case, and it's a "nice to have" - if it doesn't happen you'll get slower code, not broken code, and you can fix it the same way everyone else fixes their broken subclasses by overriding __add__ and __radd__. I think there is a pretty compelling case for switching timedelta + datetimesubclass over to returning `datetimesubclass`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 12:19:29 2018 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 04 Dec 2018 17:19:29 +0000 Subject: [issue20371] datetime.datetime.replace bypasses a subclass's __new__ In-Reply-To: <1390506444.15.0.286575412745.issue20371@psf.upfronthosting.co.za> Message-ID: <1543943969.19.0.788709270274.issue20371@psf.upfronthosting.co.za> Paul Ganssle added the comment: This issue was fixed in Python 3.7, and it turns out issue 31222 was a duplicate of it. It can be closed now. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 12:21:38 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 04 Dec 2018 17:21:38 +0000 Subject: [issue20371] datetime.datetime.replace bypasses a subclass's __new__ In-Reply-To: <1390506444.15.0.286575412745.issue20371@psf.upfronthosting.co.za> Message-ID: <1543944098.04.0.788709270274.issue20371@psf.upfronthosting.co.za> Change by Alexander Belopolsky : ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> datetime.py implementation of .replace inconsistent with C implementation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 12:22:35 2018 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 04 Dec 2018 17:22:35 +0000 Subject: =?utf-8?b?W2lzc3VlMzUzNjRdIERhdGV0aW1lIOKAnGZyb210aW1lc3RhbXAoKeKAnSBp?= =?utf-8?q?gnores_inheritance_if_timezone_is_not_None?= In-Reply-To: <1543598741.31.0.788709270274.issue35364@psf.upfronthosting.co.za> Message-ID: <1543944155.51.0.788709270274.issue35364@psf.upfronthosting.co.za> Paul Ganssle added the comment: Another thing to note: I'm pretty sure this was a mistake in the first place. There are many examples of places where the datetime module was just not designed with inheritance in mind, for example: - issue 32404 / issue 32403 - fromtimestamp not calling __new__ - issue 31222 / 20371 - C implementation of .replace I think there are many other unreported issues that all stem from similar inconsistencies that we've been slowly shoring up. One problem is that it's very inconsistent, which makes datetime not particularly friendly to subclass, but to the extent that that's changing, we've been getting *more* friendly to subclasses. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 12:31:47 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 04 Dec 2018 17:31:47 +0000 Subject: [issue35398] SQLite incorrect row count for UPDATE In-Reply-To: <1543890465.67.0.788709270274.issue35398@psf.upfronthosting.co.za> Message-ID: <1543944707.05.0.788709270274.issue35398@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +ghaering, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 12:35:36 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Tue, 04 Dec 2018 17:35:36 +0000 Subject: [issue35398] SQLite incorrect row count for UPDATE In-Reply-To: <1543890465.67.0.788709270274.issue35398@psf.upfronthosting.co.za> Message-ID: <1543944936.67.0.788709270274.issue35398@psf.upfronthosting.co.za> Change by Lysandros Nikolaou : ---------- nosy: +lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 12:44:14 2018 From: report at bugs.python.org (Aaron Meurer) Date: Tue, 04 Dec 2018 17:44:14 +0000 Subject: [issue16482] pdb.set_trace() clobbering traceback on error In-Reply-To: <1353002125.56.0.265106335805.issue16482@psf.upfronthosting.co.za> Message-ID: <1543945454.22.0.788709270274.issue16482@psf.upfronthosting.co.za> Aaron Meurer added the comment: You can download the branch for a pull request even if the repo is deleted using this https://stackoverflow.com/a/28622034/161801. That will let you keep the original commits intact. ---------- nosy: +asmeurer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 12:47:39 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 04 Dec 2018 17:47:39 +0000 Subject: [issue35398] SQLite incorrect row count for UPDATE In-Reply-To: <1543890465.67.0.788709270274.issue35398@psf.upfronthosting.co.za> Message-ID: <1543945659.63.0.788709270274.issue35398@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Did some debugging here. If I am understanding this correctly the rowcount is set at https://github.com/python/cpython/blob/b8e689a6e8134e88f857a55e50b6a4977967e385/Modules/_sqlite/cursor.c#L574 . It checks for is_dml flag that is set here https://github.com/python/cpython/blob/b8e689a6e8134e88f857a55e50b6a4977967e385/Modules/_sqlite/statement.c#L78 The part to set is_dml skips space, tabs and newline and checks for the first set of characters that is not skipped to be insert, update, delete or replace and in this case the first set of characters to be matched will be "/* watermarking */". Thus with comment not matching, is_dml is not set and -1 is set for the rowcount. ---------- versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 13:20:57 2018 From: report at bugs.python.org (Mark Inderhees) Date: Tue, 04 Dec 2018 18:20:57 +0000 Subject: [issue35235] Access violation on alloc in Windows x86-64 python, pymalloc_alloc In-Reply-To: <1542131178.89.0.788709270274.issue35235@psf.upfronthosting.co.za> Message-ID: <1543947657.9.0.788709270274.issue35235@psf.upfronthosting.co.za> Mark Inderhees added the comment: I have reproduced this with both PYTHONMALLOC=debug and "py -3.7 -x dev ", but it did not print out any allocation debug info. When using this option, it does take many more attempts to hit the issue than if running without debugging turned on. Is there some other useful info I can gather? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 13:30:47 2018 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 04 Dec 2018 18:30:47 +0000 Subject: [issue32417] fromutc does not respect datetime subclasses In-Reply-To: <1514052939.19.0.213398074469.issue32417@psf.upfronthosting.co.za> Message-ID: <1543948247.17.0.788709270274.issue32417@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- keywords: +patch pull_requests: +10142 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 13:30:47 2018 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 04 Dec 2018 18:30:47 +0000 Subject: =?utf-8?b?W2lzc3VlMzUzNjRdIERhdGV0aW1lIOKAnGZyb210aW1lc3RhbXAoKeKAnSBp?= =?utf-8?q?gnores_inheritance_if_timezone_is_not_None?= In-Reply-To: <1543598741.31.0.788709270274.issue35364@psf.upfronthosting.co.za> Message-ID: <1543948247.28.0.663665092547.issue35364@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- keywords: +patch pull_requests: +10143 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 13:35:31 2018 From: report at bugs.python.org (Mark Inderhees) Date: Tue, 04 Dec 2018 18:35:31 +0000 Subject: [issue35235] Access violation on alloc in Windows x86-64 python, pymalloc_alloc In-Reply-To: <1542131178.89.0.788709270274.issue35235@psf.upfronthosting.co.za> Message-ID: <1543948531.78.0.788709270274.issue35235@psf.upfronthosting.co.za> Mark Inderhees added the comment: Correction to my previous post. I did use capital X, ie '-X dev'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 14:18:30 2018 From: report at bugs.python.org (=?utf-8?b?xZ5haGlu?=) Date: Tue, 04 Dec 2018 19:18:30 +0000 Subject: [issue35406] calendar.nextmonth and calendar.prevmonth functions doesn't check if the month is valid In-Reply-To: <1543920926.36.0.788709270274.issue35406@psf.upfronthosting.co.za> Message-ID: <1543951110.85.0.788709270274.issue35406@psf.upfronthosting.co.za> ?ahin added the comment: OK, thank you all for information. It's now clear for me too why this is not an issue. I'll try to close this issue by selecting status as close but if it isn't working with this way (I'm new, I don't know how) anyone can close this. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 15:04:54 2018 From: report at bugs.python.org (Eliot Bixby) Date: Tue, 04 Dec 2018 20:04:54 +0000 Subject: [issue35410] copy.deepcopy does not respect metaclasses with __deepcopy__ implementations Message-ID: <1543953894.66.0.788709270274.issue35410@psf.upfronthosting.co.za> New submission from Eliot Bixby : __deepcopy__ implementations on metaclasses are ignored because deepcopy explicitly ignores class objects. It seems to me that more consistent behavior would be to use a null op as a fallback for class objects that do not have any of the relevant methods implemented (deepcopy, reduce, reduce_ex, etc) I've attached a PR that implements this. ---------- components: Library (Lib) messages: 331073 nosy: elibixby priority: normal pull_requests: 10144 severity: normal status: open title: copy.deepcopy does not respect metaclasses with __deepcopy__ implementations type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 15:14:34 2018 From: report at bugs.python.org (Dan) Date: Tue, 04 Dec 2018 20:14:34 +0000 Subject: [issue35390] ctypes not possible to pass NULL c_void_p in structure by reference In-Reply-To: <1543857109.69.0.788709270274.issue35390@psf.upfronthosting.co.za> Message-ID: <1543954474.61.0.788709270274.issue35390@psf.upfronthosting.co.za> Dan added the comment: Thank you both, that's really helpful. Yes, I agree eryksun, I was saying that pointers to c_double and other normal pointer objects work fine, but that if you change to void* and c_void_p in my example it doesn't work. The private field seems like a reasonable solution, and I agree it would be useful for the offset attribute and perhaps that pattern to be documented. Thanks again for the quick responses. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 15:26:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 20:26:00 +0000 Subject: [issue29564] ResourceWarning: suggest to enable tracemalloc in the message In-Reply-To: <1487128296.48.0.945171350707.issue29564@psf.upfronthosting.co.za> Message-ID: <1543955160.64.0.788709270274.issue29564@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0091f349cde179ea991f4ee4d095119cd1fc3802 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-29564: warnings suggests to enable tracemalloc (GH-10486) (GH-10509) https://github.com/python/cpython/commit/0091f349cde179ea991f4ee4d095119cd1fc3802 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 15:26:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 20:26:56 +0000 Subject: [issue29564] ResourceWarning: suggest to enable tracemalloc in the message In-Reply-To: <1487128296.48.0.945171350707.issue29564@psf.upfronthosting.co.za> Message-ID: <1543955216.17.0.788709270274.issue29564@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 15:28:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 20:28:31 +0000 Subject: [issue35296] Install Include/internal/ header files In-Reply-To: <1542908001.51.0.788709270274.issue35296@psf.upfronthosting.co.za> Message-ID: <1543955311.89.0.788709270274.issue35296@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b02774f42108aaf18eb19865472c8d5cd95b5f11 by Victor Stinner in branch '3.7': bpo-35296: make install now installs the internal API (GH-10665) (GH-10897) https://github.com/python/cpython/commit/b02774f42108aaf18eb19865472c8d5cd95b5f11 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 15:30:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 20:30:54 +0000 Subject: [issue35296] Install Include/internal/ header files In-Reply-To: <1542908001.51.0.788709270274.issue35296@psf.upfronthosting.co.za> Message-ID: <1543955454.99.0.788709270274.issue35296@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 15:58:54 2018 From: report at bugs.python.org (HenrikB) Date: Tue, 04 Dec 2018 20:58:54 +0000 Subject: [issue35305] subprocess.Popen(['/sbin/ldconfig', '-p'], stdin=PIPE) itself hangs/deadlocks (Linux) In-Reply-To: <1543034201.31.0.788709270274.issue35305@psf.upfronthosting.co.za> Message-ID: <1543957134.8.0.788709270274.issue35305@psf.upfronthosting.co.za> HenrikB added the comment: Thanks for taking your time on this one. I'll report back if I find out more about this kernel-specific issue. Here're my replies to the outstanding questions/comments: >> where the *child* process (`self.pid == 0`) get stuck while calling _dup2(c2pwrite = 4, 1) which in turn calls os.dup2(a = 4, b = 1). > > Doesn't child process get stuck while writing stdout? I'm not sure I understand; are you saying you would expect the child process to get stuck *before* reaching that line? If so, no, it's in the _dup2(c2pwrite = 4, 1) call where it (consistently) gets stuck. > But I don't think the assertion makes sense. I expect OSError rather > than RuntimeError. I only used RuntimeError here to keep it simple plus it wasn't obvious what the setup of OSError would be (I see that there is a FileNotFoundError in Python 3). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 17:08:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 22:08:09 +0000 Subject: [issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting. Message-ID: <1543961289.76.0.788709270274.issue35411@psf.upfronthosting.co.za> New submission from STINNER Victor : ERROR: test_ftp (test.test_urllib2net.OtherNetworkTests) (url='ftp://www.pythontest.net/README') ERROR: test_ftp_basic (test.test_urllib2net.TimeoutTest) ERROR: test_ftp_default_timeout (test.test_urllib2net.TimeoutTest) ERROR: test_ftp_no_timeout (test.test_urllib2net.TimeoutTest) ERROR: test_ftp_timeout (test.test_urllib2net.TimeoutTest) It seems like Jython has a similar issue: http://bugs.jython.org/issue2708 Logs from Travis CI job of https://github.com/python/cpython/pull/10898: https://travis-ci.org/python/cpython/jobs/463422586 Re-running test 'test_urllib2net' in verbose mode test_close (test.test_urllib2net.CloseSocketTest) ... ok test_custom_headers (test.test_urllib2net.OtherNetworkTests) ... ok test_file (test.test_urllib2net.OtherNetworkTests) ... ok test_ftp (test.test_urllib2net.OtherNetworkTests) ... test_redirect_url_withfrag (test.test_urllib2net.OtherNetworkTests) ... ok test_sites_no_connection_close (test.test_urllib2net.OtherNetworkTests) ... skipped 'XXX: http://www.imdb.com is gone' test_urlwithfrag (test.test_urllib2net.OtherNetworkTests) ... ok test_ftp_basic (test.test_urllib2net.TimeoutTest) ... ERROR test_ftp_default_timeout (test.test_urllib2net.TimeoutTest) ... /home/travis/build/python/cpython/Lib/urllib/request.py:222: ResourceWarning: unclosed return opener.open(url, data, timeout) /home/travis/build/python/cpython/Lib/urllib/request.py:222: ResourceWarning: unclosed return opener.open(url, data, timeout) /home/travis/build/python/cpython/Lib/urllib/request.py:222: ResourceWarning: unclosed return opener.open(url, data, timeout) ERROR test_ftp_no_timeout (test.test_urllib2net.TimeoutTest) ... ERROR test_ftp_timeout (test.test_urllib2net.TimeoutTest) ... ERROR test_http_basic (test.test_urllib2net.TimeoutTest) ... ok test_http_default_timeout (test.test_urllib2net.TimeoutTest) ... ok test_http_no_timeout (test.test_urllib2net.TimeoutTest) ... ok test_http_timeout (test.test_urllib2net.TimeoutTest) ... ok ====================================================================== ERROR: test_ftp (test.test_urllib2net.OtherNetworkTests) (url='ftp://www.pythontest.net/README') ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 1540, in ftp_open fp, retrlen = fw.retrfile(file, type) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 2404, in retrfile conn, retrlen = self.ftp.ntransfercmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 365, in ntransfercmd resp = self.sendcmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 273, in sendcmd return self.getresp() File "/home/travis/build/python/cpython/Lib/ftplib.py", line 244, in getresp raise error_temp(resp) ftplib.error_temp: 425 Security: Bad IP connecting. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 219, in _test_urls f = urlopen(url, req, TIMEOUT) File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 27, in wrapped return _retry_thrice(func, exc, *args, **kwargs) File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 23, in _retry_thrice raise last_exc File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 19, in _retry_thrice return func(*args, **kwargs) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 525, in open response = self._open(req, data) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 543, in _open '_open', req) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 503, in _call_chain result = func(*args) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 1551, in ftp_open raise exc.with_traceback(sys.exc_info()[2]) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 1540, in ftp_open fp, retrlen = fw.retrfile(file, type) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 2404, in retrfile conn, retrlen = self.ftp.ntransfercmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 365, in ntransfercmd resp = self.sendcmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 273, in sendcmd return self.getresp() File "/home/travis/build/python/cpython/Lib/ftplib.py", line 244, in getresp raise error_temp(resp) urllib.error.URLError: ====================================================================== ERROR: test_ftp_basic (test.test_urllib2net.TimeoutTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 1540, in ftp_open fp, retrlen = fw.retrfile(file, type) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 2425, in retrfile conn, retrlen = self.ftp.ntransfercmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 365, in ntransfercmd resp = self.sendcmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 273, in sendcmd return self.getresp() File "/home/travis/build/python/cpython/Lib/ftplib.py", line 244, in getresp raise error_temp(resp) ftplib.error_temp: 425 Security: Bad IP connecting. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 296, in test_ftp_basic u = _urlopen_with_retry(self.FTP_HOST) File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 27, in wrapped return _retry_thrice(func, exc, *args, **kwargs) File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 23, in _retry_thrice raise last_exc File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 19, in _retry_thrice return func(*args, **kwargs) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 525, in open response = self._open(req, data) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 543, in _open '_open', req) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 503, in _call_chain result = func(*args) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 1551, in ftp_open raise exc.with_traceback(sys.exc_info()[2]) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 1540, in ftp_open fp, retrlen = fw.retrfile(file, type) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 2425, in retrfile conn, retrlen = self.ftp.ntransfercmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 365, in ntransfercmd resp = self.sendcmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 273, in sendcmd return self.getresp() File "/home/travis/build/python/cpython/Lib/ftplib.py", line 244, in getresp raise error_temp(resp) urllib.error.URLError: ====================================================================== ERROR: test_ftp_default_timeout (test.test_urllib2net.TimeoutTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 1540, in ftp_open fp, retrlen = fw.retrfile(file, type) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 2425, in retrfile conn, retrlen = self.ftp.ntransfercmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 365, in ntransfercmd resp = self.sendcmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 273, in sendcmd return self.getresp() File "/home/travis/build/python/cpython/Lib/ftplib.py", line 244, in getresp raise error_temp(resp) ftplib.error_temp: 425 Security: Bad IP connecting. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 305, in test_ftp_default_timeout u = _urlopen_with_retry(self.FTP_HOST) File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 27, in wrapped return _retry_thrice(func, exc, *args, **kwargs) File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 23, in _retry_thrice raise last_exc File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 19, in _retry_thrice return func(*args, **kwargs) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 525, in open response = self._open(req, data) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 543, in _open '_open', req) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 503, in _call_chain result = func(*args) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 1551, in ftp_open raise exc.with_traceback(sys.exc_info()[2]) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 1540, in ftp_open fp, retrlen = fw.retrfile(file, type) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 2425, in retrfile conn, retrlen = self.ftp.ntransfercmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 365, in ntransfercmd resp = self.sendcmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 273, in sendcmd return self.getresp() File "/home/travis/build/python/cpython/Lib/ftplib.py", line 244, in getresp raise error_temp(resp) urllib.error.URLError: ====================================================================== ERROR: test_ftp_no_timeout (test.test_urllib2net.TimeoutTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 1540, in ftp_open fp, retrlen = fw.retrfile(file, type) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 2425, in retrfile conn, retrlen = self.ftp.ntransfercmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 365, in ntransfercmd resp = self.sendcmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 273, in sendcmd return self.getresp() File "/home/travis/build/python/cpython/Lib/ftplib.py", line 244, in getresp raise error_temp(resp) ftplib.error_temp: 425 Security: Bad IP connecting. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 316, in test_ftp_no_timeout u = _urlopen_with_retry(self.FTP_HOST, timeout=None) File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 27, in wrapped return _retry_thrice(func, exc, *args, **kwargs) File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 23, in _retry_thrice raise last_exc File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 19, in _retry_thrice return func(*args, **kwargs) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 525, in open response = self._open(req, data) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 543, in _open '_open', req) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 503, in _call_chain result = func(*args) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 1551, in ftp_open raise exc.with_traceback(sys.exc_info()[2]) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 1540, in ftp_open fp, retrlen = fw.retrfile(file, type) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 2425, in retrfile conn, retrlen = self.ftp.ntransfercmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 365, in ntransfercmd resp = self.sendcmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 273, in sendcmd return self.getresp() File "/home/travis/build/python/cpython/Lib/ftplib.py", line 244, in getresp raise error_temp(resp) urllib.error.URLError: ====================================================================== ERROR: test_ftp_timeout (test.test_urllib2net.TimeoutTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 1540, in ftp_open fp, retrlen = fw.retrfile(file, type) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 2425, in retrfile conn, retrlen = self.ftp.ntransfercmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 365, in ntransfercmd resp = self.sendcmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 273, in sendcmd return self.getresp() File "/home/travis/build/python/cpython/Lib/ftplib.py", line 244, in getresp raise error_temp(resp) ftplib.error_temp: 425 Security: Bad IP connecting. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 324, in test_ftp_timeout u = _urlopen_with_retry(self.FTP_HOST, timeout=60) File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 27, in wrapped return _retry_thrice(func, exc, *args, **kwargs) File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 23, in _retry_thrice raise last_exc File "/home/travis/build/python/cpython/Lib/test/test_urllib2net.py", line 19, in _retry_thrice return func(*args, **kwargs) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 525, in open response = self._open(req, data) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 543, in _open '_open', req) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 503, in _call_chain result = func(*args) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 1551, in ftp_open raise exc.with_traceback(sys.exc_info()[2]) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 1540, in ftp_open fp, retrlen = fw.retrfile(file, type) File "/home/travis/build/python/cpython/Lib/urllib/request.py", line 2425, in retrfile conn, retrlen = self.ftp.ntransfercmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 365, in ntransfercmd resp = self.sendcmd(cmd) File "/home/travis/build/python/cpython/Lib/ftplib.py", line 273, in sendcmd return self.getresp() File "/home/travis/build/python/cpython/Lib/ftplib.py", line 244, in getresp raise error_temp(resp) urllib.error.URLError: ---------------------------------------------------------------------- Ran 15 tests in 5.693s FAILED (errors=5, skipped=1) /home/travis/build/python/cpython/Lib/test/support/__init__.py:1535: ResourceWarning: unclosed gc.collect() /home/travis/build/python/cpython/Lib/test/support/__init__.py:1535: ResourceWarning: unclosed gc.collect() /home/travis/build/python/cpython/Lib/test/support/__init__.py:1535: ResourceWarning: unclosed gc.collect() /home/travis/build/python/cpython/Lib/test/support/__init__.py:1535: ResourceWarning: unclosed gc.collect() /home/travis/build/python/cpython/Lib/test/support/__init__.py:1535: ResourceWarning: unclosed gc.collect() /home/travis/build/python/cpython/Lib/test/support/__init__.py:1535: ResourceWarning: unclosed gc.collect() /home/travis/build/python/cpython/Lib/test/support/__init__.py:1535: ResourceWarning: unclosed gc.collect() /home/travis/build/python/cpython/Lib/test/support/__init__.py:1535: ResourceWarning: unclosed gc.collect() /home/travis/build/python/cpython/Lib/test/support/__init__.py:1535: ResourceWarning: unclosed gc.collect() test test_urllib2net failed 1 test failed again: test_urllib2net ---------- components: Tests messages: 331078 nosy: vstinner priority: normal severity: normal status: open title: FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting. versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 17:14:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 22:14:50 +0000 Subject: [issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting. In-Reply-To: <1543961289.76.0.788709270274.issue35411@psf.upfronthosting.co.za> Message-ID: <1543961690.99.0.788709270274.issue35411@psf.upfronthosting.co.za> STINNER Victor added the comment: Another similar issue in a different project: https://sagebionetworks.jira.com/browse/SYNPY-731 The fix... removed the test :-) https://github.com/Sage-Bionetworks/synapsePythonClient/pull/571/files ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 17:37:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 22:37:17 +0000 Subject: [issue35412] test_future4 ran no test Message-ID: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> New submission from STINNER Victor : Since bpo-34279 has been fixed, regrtest now logs a message when a test runs no test. I noticed that test_future4 logs such message: ... 0:05:23 load avg: 0.56 [152/412] test_future4 0:05:24 load avg: 0.56 [153/412] test_future5 -- test_future4 run no tests ... 2 tests run no tests: test_dtrace test_future4 I can reproduce the issue: $ ./python -m test test_future4 (...) test_future4 run no tests (...) Tests result: NO TEST RUN The test has been added by: commit 62e2c7e3dfffd8465a54b99fc6d3c2a60acab350 Author: Jeremy Hylton Date: Wed Feb 28 17:48:06 2001 +0000 Add regression test for future statements. This adds eight files, but seven are not tests in their own right; these files are mentioned in regrtest. diff --git a/Lib/test/test_future4.py b/Lib/test/test_future4.py new file mode 100644 index 0000000000..805263be89 --- /dev/null +++ b/Lib/test/test_future4.py @@ -0,0 +1,10 @@ +"""This is a test""" +import __future__ +from __future__ import nested_scopes + +def f(x): + def g(y): + return x + y + return g + +print f(2)(4) ... test removed by commit 3090694068670371cdbd5b1a3d3c5dbecc83835a. A file recreated by: commit fa50bad9578cf32e6adcaf52c3a58c7b6cd81e30 Author: Christian Heimes Date: Wed Mar 26 22:55:31 2008 +0000 I forgot to svn add the future test ... I guess that it's related to: commit 3c60833e1e53f6239825b44f76fa22172feb1790 Author: Christian Heimes Date: Wed Mar 26 22:01:37 2008 +0000 Patch #2477: Added from __future__ import unicode_literals The new PyParser_*Ex() functions are based on Neal's suggestion and initial patch. The new __future__ feature makes all '' and r'' unicode strings. b'' and br'' stay (byte) strings. (Other candidates: commit 342212c52afd375d93f44f3ecda0914d77372f26 and commit 7f23d86107dfea69992322577c5033f2edbc3b4f.) ---------- messages: 331080 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: test_future4 ran no test versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 17:41:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 22:41:17 +0000 Subject: [issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting. In-Reply-To: <1543961289.76.0.788709270274.issue35411@psf.upfronthosting.co.za> Message-ID: <1543963277.49.0.788709270274.issue35411@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10145 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 18:51:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 23:51:19 +0000 Subject: [issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting. In-Reply-To: <1543961289.76.0.788709270274.issue35411@psf.upfronthosting.co.za> Message-ID: <1543967479.0.0.788709270274.issue35411@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10146 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 18:53:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2018 23:53:09 +0000 Subject: [issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting. In-Reply-To: <1543961289.76.0.788709270274.issue35411@psf.upfronthosting.co.za> Message-ID: <1543967589.87.0.788709270274.issue35411@psf.upfronthosting.co.za> STINNER Victor added the comment: According to my PR 10906, FTP tests of test_urllib2net now also fail each time on master (not all of them, at least two tests fail). I wrote PR 10907 to skip the tests on Travis CI. We have AppVeyor to run these tests in pre-commit, and the buildbot farm to test in post-commit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 19:58:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 00:58:41 +0000 Subject: [issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting. In-Reply-To: <1543961289.76.0.788709270274.issue35411@psf.upfronthosting.co.za> Message-ID: <1543971521.89.0.788709270274.issue35411@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c11b3b19a5b022c6c229043d37f9a9fd06f22500 by Victor Stinner in branch 'master': bpo-35411: Skip test_urllib2net FTP tests on Travis CI (GH-10907) https://github.com/python/cpython/commit/c11b3b19a5b022c6c229043d37f9a9fd06f22500 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 19:58:47 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 00:58:47 +0000 Subject: [issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting. In-Reply-To: <1543961289.76.0.788709270274.issue35411@psf.upfronthosting.co.za> Message-ID: <1543971527.3.0.788709270274.issue35411@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10147 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 19:58:54 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 00:58:54 +0000 Subject: [issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting. In-Reply-To: <1543961289.76.0.788709270274.issue35411@psf.upfronthosting.co.za> Message-ID: <1543971534.19.0.788709270274.issue35411@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10148 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:01:31 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 01:01:31 +0000 Subject: [issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting. In-Reply-To: <1543961289.76.0.788709270274.issue35411@psf.upfronthosting.co.za> Message-ID: <1543971691.56.0.788709270274.issue35411@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10149 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:16:44 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 01:16:44 +0000 Subject: [issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting. In-Reply-To: <1543961289.76.0.788709270274.issue35411@psf.upfronthosting.co.za> Message-ID: <1543972604.21.0.788709270274.issue35411@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 74a80e1ed0c9067ef47f0a637d7f718a51b4f34e by Miss Islington (bot) in branch '3.7': bpo-35411: Skip test_urllib2net FTP tests on Travis CI (GH-10907) https://github.com/python/cpython/commit/74a80e1ed0c9067ef47f0a637d7f718a51b4f34e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:19:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 01:19:00 +0000 Subject: [issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting. In-Reply-To: <1543961289.76.0.788709270274.issue35411@psf.upfronthosting.co.za> Message-ID: <1543972740.13.0.788709270274.issue35411@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 65a5eff67474703329477b070d9c081fee17c69c by Victor Stinner (Miss Islington (bot)) in branch '3.6': bpo-35411: Skip test_urllib2net FTP tests on Travis CI (GH-10907) (GH-10909) https://github.com/python/cpython/commit/65a5eff67474703329477b070d9c081fee17c69c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:22:05 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 01:22:05 +0000 Subject: [issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting. In-Reply-To: <1543961289.76.0.788709270274.issue35411@psf.upfronthosting.co.za> Message-ID: <1543972925.66.0.788709270274.issue35411@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c7976da5c262be818a06c344d43ac09b1083c80b by Miss Islington (bot) in branch '2.7': bpo-35411: Skip test_urllib2net FTP tests on Travis CI (GH-10907) https://github.com/python/cpython/commit/c7976da5c262be818a06c344d43ac09b1083c80b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:28:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 01:28:29 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1543973309.6.0.788709270274.issue35363@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10150 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:31:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 01:31:31 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1543973491.53.0.788709270274.issue35363@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10151 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:35:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 01:35:56 +0000 Subject: [issue35413] test_multiprocessing_fork: test_del_pool() leaks dangling threads and processes on AMD64 FreeBSD CURRENT Shared 3.x Message-ID: <1543973756.35.0.788709270274.issue35413@psf.upfronthosting.co.za> New submission from STINNER Victor : Previous issue fixing such bug: bpo-33676. https://buildbot.python.org/all/#/builders/168/builds/332 test_empty_string (test.test_multiprocessing_fork.WithThreadsTestPoll) ... ok test_strings (test.test_multiprocessing_fork.WithThreadsTestPoll) ... ok test_apply (test.test_multiprocessing_fork.WithThreadsTestPool) ... ok test_async (test.test_multiprocessing_fork.WithThreadsTestPool) ... ok test_async_timeout (test.test_multiprocessing_fork.WithThreadsTestPool) ... ok test_context (test.test_multiprocessing_fork.WithThreadsTestPool) ... ok test_del_pool (test.test_multiprocessing_fork.WithThreadsTestPool) ... Warning -- threading_cleanup() failed to cleanup 1 threads (count: 8, dangling: 9) Dangling thread: Dangling thread: <_MainThread(MainThread, started 34370793472)> Dangling thread: Dangling thread: Dangling thread: Dangling thread: Dangling thread: Dangling thread: Dangling thread: ok test_empty_iterable (test.test_multiprocessing_fork.WithThreadsTestPool) ... ok test_imap (test.test_multiprocessing_fork.WithThreadsTestPool) ... ok test_imap_handle_iterable_exception (test.test_multiprocessing_fork.WithThreadsTestPool) ... ok test_imap_unordered (test.test_multiprocessing_fork.WithThreadsTestPool) ... ok ---------- components: Tests messages: 331086 nosy: vstinner priority: normal severity: normal status: open title: test_multiprocessing_fork: test_del_pool() leaks dangling threads and processes on AMD64 FreeBSD CURRENT Shared 3.x versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:37:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 01:37:36 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1543973856.01.0.788709270274.issue34172@psf.upfronthosting.co.za> STINNER Victor added the comment: multiprocessing should help the developer to detect when the API is misused. For example, emit a ResourceWarning if a pool is not released explicitly. It might help to detect such bugs: * bpo-33676 * bpo-35413 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:03:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 02:03:25 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1543975405.44.0.788709270274.issue35363@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 93d038c91dc3075dd34b41ce6b6fb4ea07fbb8c3 by Victor Stinner in branch '3.6': bpo-35363, test_eintr: skip test_open() on macOS (GH-10896) (GH-10912) https://github.com/python/cpython/commit/93d038c91dc3075dd34b41ce6b6fb4ea07fbb8c3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:03:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 02:03:30 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1543975410.41.0.788709270274.issue35363@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c93e3b05d5672dc9e8d6e2f2dce332799d5b95d2 by Victor Stinner in branch '3.7': bpo-35363, test_eintr: skip test_open() on macOS (GH-10896) (GH-10911) https://github.com/python/cpython/commit/c93e3b05d5672dc9e8d6e2f2dce332799d5b95d2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:04:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 02:04:14 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1543975454.11.0.788709270274.issue35363@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 Tue Dec 4 22:29:33 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Dec 2018 03:29:33 +0000 Subject: [issue35330] When using mock to wrap an existing object, side_effect requires return_value In-Reply-To: <1543339599.43.0.788709270274.issue35330@psf.upfronthosting.co.za> Message-ID: <1543980573.59.0.788709270274.issue35330@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- components: +Tests nosy: +cjw296 stage: -> test needed versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 22:48:51 2018 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Dec 2018 03:48:51 +0000 Subject: [issue35398] SQLite incorrect row count for UPDATE In-Reply-To: <1543890465.67.0.788709270274.issue35398@psf.upfronthosting.co.za> Message-ID: <1543981731.77.0.788709270274.issue35398@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +10152 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 22:53:10 2018 From: report at bugs.python.org (Montana Low) Date: Wed, 05 Dec 2018 03:53:10 +0000 Subject: [issue35398] SQLite incorrect row count for UPDATE In-Reply-To: <1543890465.67.0.788709270274.issue35398@psf.upfronthosting.co.za> Message-ID: <1543981990.25.0.788709270274.issue35398@psf.upfronthosting.co.za> Montana Low added the comment: I took a stab at patch. It fixes the issue for me, as proven via the Test Case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 01:25:24 2018 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 05 Dec 2018 06:25:24 +0000 Subject: [issue35414] A reference counting bug in PyState_RemoveModule() Message-ID: <1543991124.3.0.788709270274.issue35414@psf.upfronthosting.co.za> New submission from Zackery Spytz : There's a missing Py_INCREF(Py_None) in PyState_RemoveModule(). ---------- components: Interpreter Core messages: 331091 nosy: ZackerySpytz priority: normal severity: normal status: open title: A reference counting bug in PyState_RemoveModule() versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 01:28:43 2018 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 05 Dec 2018 06:28:43 +0000 Subject: [issue35414] A reference counting bug in PyState_RemoveModule() In-Reply-To: <1543991124.3.0.788709270274.issue35414@psf.upfronthosting.co.za> Message-ID: <1543991323.19.0.788709270274.issue35414@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +10153 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 02:14:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 07:14:05 +0000 Subject: [issue35414] A reference counting bug in PyState_RemoveModule() In-Reply-To: <1543991124.3.0.788709270274.issue35414@psf.upfronthosting.co.za> Message-ID: <1543994045.4.0.788709270274.issue35414@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 2a893430c9c8378cbdfac95895a64fa07aaff9ed by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-35414: Add a missing Py_INCREF(Py_None) in PyState_RemoveModule(). (GH-10914) https://github.com/python/cpython/commit/2a893430c9c8378cbdfac95895a64fa07aaff9ed ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 02:14:20 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 07:14:20 +0000 Subject: [issue35414] A reference counting bug in PyState_RemoveModule() In-Reply-To: <1543991124.3.0.788709270274.issue35414@psf.upfronthosting.co.za> Message-ID: <1543994060.16.0.788709270274.issue35414@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10154 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 02:14:30 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 07:14:30 +0000 Subject: [issue35414] A reference counting bug in PyState_RemoveModule() In-Reply-To: <1543991124.3.0.788709270274.issue35414@psf.upfronthosting.co.za> Message-ID: <1543994070.62.0.788709270274.issue35414@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10155 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 02:51:16 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 07:51:16 +0000 Subject: [issue35414] A reference counting bug in PyState_RemoveModule() In-Reply-To: <1543991124.3.0.788709270274.issue35414@psf.upfronthosting.co.za> Message-ID: <1543996276.48.0.788709270274.issue35414@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2d594f857865a4719876ac545ddfd62f474522cd by Miss Islington (bot) in branch '3.7': bpo-35414: Add a missing Py_INCREF(Py_None) in PyState_RemoveModule(). (GH-10914) https://github.com/python/cpython/commit/2d594f857865a4719876ac545ddfd62f474522cd ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 02:51:18 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 07:51:18 +0000 Subject: [issue35414] A reference counting bug in PyState_RemoveModule() In-Reply-To: <1543991124.3.0.788709270274.issue35414@psf.upfronthosting.co.za> Message-ID: <1543996278.16.0.788709270274.issue35414@psf.upfronthosting.co.za> miss-islington added the comment: New changeset afb07fccf013f20b89b33516f126695388be47b9 by Miss Islington (bot) in branch '3.6': bpo-35414: Add a missing Py_INCREF(Py_None) in PyState_RemoveModule(). (GH-10914) https://github.com/python/cpython/commit/afb07fccf013f20b89b33516f126695388be47b9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 03:30:09 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2018 08:30:09 +0000 Subject: [issue35380] Enable TCP_NODELAY for proactor event loop In-Reply-To: <1543791890.63.0.788709270274.issue35380@psf.upfronthosting.co.za> Message-ID: <1543998609.96.0.788709270274.issue35380@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset bfb881849f588cd2046776fb431c3045781c8214 by Andrew Svetlov in branch '3.6': [3.6] bpo-35380: Enable TCP_NODELAY for proactor event loop (GH-10867). (GH-10874) https://github.com/python/cpython/commit/bfb881849f588cd2046776fb431c3045781c8214 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 03:30:55 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2018 08:30:55 +0000 Subject: [issue35380] Enable TCP_NODELAY for proactor event loop In-Reply-To: <1543791890.63.0.788709270274.issue35380@psf.upfronthosting.co.za> Message-ID: <1543998655.39.0.788709270274.issue35380@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 03:41:12 2018 From: report at bugs.python.org (Dima Tisnek) Date: Wed, 05 Dec 2018 08:41:12 +0000 Subject: [issue35415] fileno argument to socket.socket is not validated Message-ID: <1543999272.31.0.788709270274.issue35415@psf.upfronthosting.co.za> New submission from Dima Tisnek : socket.socket gained a fileno= kwarg the value of which is not checked if address family and socket type are both provided. For example, following is accepted: >>> socket.socket(socket.AF_INET, socket.SOCK_STREAM, fileno=-1234) >>> socket.socket(socket.AF_INET, socket.SOCK_STREAM, fileno=1234) >>> socket.socket(socket.AF_INET, socket.SOCK_STREAM, fileno=0.999) Resulting in a socket object that will fail at runtime. One of the implications is that it's possible to "steal" file descriptor, i.e. create a socket for an fd that doesn't exist; then some other function/thread happens to create e.g. socket with this specific fd, which can be "unexpectedly" used (or closed or modified, e.g. non-blocking changed) through the first socket object. Additionally if the shorthand is used, the exception raised in these cases has odd text, at least it was misleading for me. >>> socket.socket(fileno=get_wrong_fd_from_somewhere()) [snip] OSError: [Errno 9] Bad file descriptor: 'family' I thought that I had a bug whereby a string was passed in instead of an int fd; Ultimately I had to look in cpython source code to understand what the "family" meant. I volunteer to submit a patch! ---------- messages: 331096 nosy: Dima.Tisnek priority: normal severity: normal status: open title: fileno argument to socket.socket is not validated versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 03:43:39 2018 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Dec 2018 08:43:39 +0000 Subject: [issue35415] fileno argument to socket.socket is not validated In-Reply-To: <1543999272.31.0.788709270274.issue35415@psf.upfronthosting.co.za> Message-ID: <1543999419.99.0.788709270274.issue35415@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +10156 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 03:54:19 2018 From: report at bugs.python.org (=?utf-8?q?Micka=C3=ABl_Schoentgen?=) Date: Wed, 05 Dec 2018 08:54:19 +0000 Subject: [issue35416] Fix potential resource warnings in distutils Message-ID: <1544000059.73.0.788709270274.issue35416@psf.upfronthosting.co.za> New submission from Micka?l Schoentgen : I am looking to clean-up potential ResourceWarnings in distutils. The patch will provide 2 changes: - ensure file descriptor are always closed when it is not the case - and uniformization of the "with open(...)" use ---------- components: Distutils messages: 331097 nosy: Tiger-222, dstufft, eric.araujo priority: normal severity: normal status: open title: Fix potential resource warnings in distutils type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 03:59:35 2018 From: report at bugs.python.org (=?utf-8?q?Micka=C3=ABl_Schoentgen?=) Date: Wed, 05 Dec 2018 08:59:35 +0000 Subject: [issue35416] Fix potential resource warnings in distutils In-Reply-To: <1544000059.73.0.788709270274.issue35416@psf.upfronthosting.co.za> Message-ID: <1544000375.14.0.788709270274.issue35416@psf.upfronthosting.co.za> Change by Micka?l Schoentgen : ---------- keywords: +patch pull_requests: +10157 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 04:35:04 2018 From: report at bugs.python.org (Kubilay Kocak) Date: Wed, 05 Dec 2018 09:35:04 +0000 Subject: [issue35413] test_multiprocessing_fork: test_del_pool() leaks dangling threads and processes on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1543973756.35.0.788709270274.issue35413@psf.upfronthosting.co.za> Message-ID: <1544002504.83.0.788709270274.issue35413@psf.upfronthosting.co.za> Change by Kubilay Kocak : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 05:10:19 2018 From: report at bugs.python.org (Jonathan Alush-Aben) Date: Wed, 05 Dec 2018 10:10:19 +0000 Subject: [issue35417] Double parenthesis in print function running 2to3 in already correct call Message-ID: <1544004619.56.0.788709270274.issue35417@psf.upfronthosting.co.za> New submission from Jonathan Alush-Aben : If 2to3 is run on a file with the following contents: a="string" print ("%s" % a) The output is: a="string" print (("%s" % a)) Although it was already a valid call to print in python3. ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 331098 nosy: jondaa priority: normal severity: normal status: open title: Double parenthesis in print function running 2to3 in already correct call _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 06:23:35 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Wed, 05 Dec 2018 11:23:35 +0000 Subject: [issue35396] Add support for __fspath__ to fnmatch.fnmatchase and filter In-Reply-To: <1543877004.47.0.788709270274.issue35396@psf.upfronthosting.co.za> Message-ID: <1544009015.53.0.788709270274.issue35396@psf.upfronthosting.co.za> Andr?s Delfino added the comment: Closing, as __fspath__ returns paths and fnmatchcase/filter deals with filenames. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 06:49:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 11:49:02 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544010542.56.0.788709270274.issue10496@psf.upfronthosting.co.za> STINNER Victor added the comment: According to seirl on IRC, this issue is trigged when a Python application is run by systemd using DynamicUser=yes: "DynamicUser: Takes a boolean parameter. If set, a UNIX user and group pair is allocated dynamically when the unit is started, and released as soon as it is stopped. The user and group will not be added to /etc/passwd or /etc/group, but are managed transiently during runtime. (...)" * https://www.freedesktop.org/software/systemd/man/systemd.exec.html * http://0pointer.net/blog/dynamic-users-with-systemd.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 06:52:25 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 05 Dec 2018 11:52:25 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1544010745.48.0.788709270274.issue33725@psf.upfronthosting.co.za> Ronald Oussoren added the comment: AFAIK there is nothing you can do between after calling fork(2) to "reinitialise" the ObjC runtime. And I don't think that's the issue anyway: I suspect that the actual problem is that Apple's system frameworks use multithreading (in particular libdispatch) and don't have code to ensure a sane state after calling fork. In Python 3 there is another workaround to avoid problems using multiprocessing: use multiprocessing.set_start_method() to switch away from the "fork" startup handler to "spawn" or "forkserver" (the latter only when calling set_start_method before calling any code that might call into Apple system frameworks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 07:10:25 2018 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 05 Dec 2018 12:10:25 +0000 Subject: [issue34784] Heap-allocated StructSequences In-Reply-To: <1537773797.44.0.956365154283.issue34784@psf.upfronthosting.co.za> Message-ID: <1544011825.67.0.788709270274.issue34784@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 Wed Dec 5 07:10:47 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 05 Dec 2018 12:10:47 +0000 Subject: [issue35164] socket.getfqdn and socket.gethostbyname fail on MacOS In-Reply-To: <1541350241.71.0.788709270274.issue35164@psf.upfronthosting.co.za> Message-ID: <1544011847.04.0.788709270274.issue35164@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This issue does not have enough information to determine what is wrong. It is however fairly clear that it is not related to "scutil --get HostName" mentioning that there is no hostname set as that is the normal state of systems, and I have never run into the problem mentioned here (and have used macOS exclusively from one of the earliest public beta's of macOS 10.0). My gut feeling is that this is some issue with your system or environment. Some more questions: - Is this is a consistent problem, or only on some networks? - Do you have any custom settings in the Networking preference pane related to name resolution (extra search domains, DNS servers, ...)? - Do the domains returned by the DHCP server actually exist? - Likewise for the DNS servers - Does the result of socket.gethostname() look sane? In particular, does this include a domain name? - The original message mentions: "and that the DHCP servers provides one ore more domains to be useles for resolution.". What is meant by that? AFAIK the DHCP server can only return 1 domain name, not a full DNS search list (or at least not one that is used by most major platforms). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 07:11:29 2018 From: report at bugs.python.org (Antoine Pietri) Date: Wed, 05 Dec 2018 12:11:29 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544011889.77.0.788709270274.issue10496@psf.upfronthosting.co.za> Antoine Pietri added the comment: Trivial way to reproduce, run this as root: systemd-run -p DynamicUser=yes -t python3 ---------- nosy: +antoine.pietri _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 07:33:08 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 05 Dec 2018 12:33:08 +0000 Subject: [issue35417] Double parenthesis in print function running 2to3 in already correct call In-Reply-To: <1544004619.56.0.788709270274.issue35417@psf.upfronthosting.co.za> Message-ID: <1544013188.3.0.788709270274.issue35417@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. Is this similar to issue10375 ? One option would be to use -p to stop transforming print related code if you don't want to transform any print statement. $ cat /tmp/foo.py print (1) $ 2to3 /tmp/foo.py [snip] --- /tmp/foo.py (original) +++ /tmp/foo.py (refactored) @@ -1 +1 @@ -print (1) +print((1)) $ 2to3 -p /tmp/foo.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: No files need to be modified. ---------- nosy: +benjamin.peterson, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 07:51:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 12:51:05 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544014265.58.0.788709270274.issue10496@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10158 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 07:51:48 2018 From: report at bugs.python.org (Cao Hongfu) Date: Wed, 05 Dec 2018 12:51:48 +0000 Subject: [issue35418] python hung or stuck somtimes randomly on windows server 2008R2 Message-ID: <1544014308.03.0.788709270274.issue35418@psf.upfronthosting.co.za> New submission from Cao Hongfu : Recently, python frequently(but randomly) hung or stuck at initialization(when I click the python.exe or use python cmd prompt) on my server(running windows server 2008R2), But everything is fine on my windows 7 PC). I tried reinstall python, but not working(also tried 3.6). I tried process-explorer and found that the normal python process allocated about 12MB memory but the stuck one only allocated 8MB memory. here is the stack information for stuck python process(having 3 threads): ------------------thread1------------------ ntdll.dll!ZwWaitForSingleObject+0xa ntdll.dll!RtlImageDirectoryEntryToData+0x118 ntdll.dll!RtlEnterCriticalSection+0xd1 ntdll.dll!EtwDeliverDataBlock+0x777 ntdll.dll!LdrLoadDll+0xed !TlsGetValue+0x4756 !UuidCreate+0x1b00 !I_RpcBindingIsServerLocal+0x12899 !RegEnumKeyExW+0x13a !RegEnumKeyExW+0xbe !RpcBindingFree+0x320 !RpcAsyncRegisterInfo+0x10ff !Ndr64AsyncClientCall+0x9da !Ndr64AsyncClientCall+0xc9b !NdrClientCall3+0xf5 !LsaOpenPolicy+0xb9 !LsaOpenPolicy+0x56 !LookupPrivilegeValueW+0x6f !LookupPrivilegeValueA+0x84 !PyNamespace_New+0xd4 !PyCodec_LookupTextEncoding+0xb5 !PyObject_SetAttrId+0x21e !PyMethodDef_RawFastCallDict+0x115 !PyObject_SetAttr+0x352 !PyEval_EvalFrameDefault+0x1182 !PyEval_EvalCodeWithName+0x1a0 !PyMethodDef_RawFastCallKeywords+0xc32 !PyEval_EvalFrameDefault+0x4b1 !PyMethodDef_RawFastCallKeywords+0xa77 !PyEval_EvalFrameDefault+0x913 !PyMethodDef_RawFastCallKeywords+0xa77 !PyEval_EvalFrameDefault+0x4b1 !PyMethodDef_RawFastCallKeywords+0xa77 !PyEval_EvalFrameDefault+0x4b1 !PyMethodDef_RawFastCallKeywords+0xa77 !PyEval_EvalFrameDefault+0x913 !PyMethodDef_RawFastCallKeywords+0xa77 !PyEval_EvalFrameDefault+0x4b1 !PyMethodDef_RawFastCallKeywords+0xa77 !PyEval_EvalFrameDefault+0x913 !PyFunction_FastCallDict+0xdd !PyObject_CallMethod+0xef !PyObject_CallMethod+0xa2 !PyObject_CallMethod+0x3c !PyTime_MulDiv+0x47 !Py_InitializeMainInterpreter+0x95 !PyMainInterpreterConfig_Read+0x309 !PyMapping_SetItemString+0x306 !PyBytes_AsString+0x142 !Py_Main+0x52 !BaseThreadInitThunk+0xd ntdll.dll!RtlUserThreadStart+0x1d ------------------thread2------------------ ntdll.dll!ZwWaitForSingleObject+0xa ntdll.dll!RtlImageDirectoryEntryToData+0x118 ntdll.dll!RtlEnterCriticalSection+0xd1 !UuidCreate+0x1ae2 !NdrFullPointerQueryPointer+0x35d !LsaLookupGetDomainInfo+0xb8 !RpcBindingFree+0x320 !RpcAsyncRegisterInfo+0x10ff !Ndr64AsyncClientCall+0x9da !Ndr64AsyncClientCall+0xc9b !NdrClientCall3+0xf5 !LsaLookupOpenLocalPolicy+0x41 !LookupAccountNameLocalW+0xaf !LookupAccountSidLocalW+0x25 !LookupAccountSidW+0x57 !MBCGlobal::get_proc_user_name+0x1f7 !MBCGlobal::init+0x240a !HDirSnap::operator=+0xda !LVPVTBase::to_file+0x46ef ntdll.dll!RtlDeactivateActivationContextUnsafeFast+0x34e ntdll.dll!EtwDeliverDataBlock+0xa44 ntdll.dll!LdrLoadDll+0xed !TlsGetValue+0x4756 !PublicService+0x13ec !BaseThreadInitThunk+0xd ntdll.dll!RtlUserThreadStart+0x1d ------------------thread3------------------ ntdll.dll!ZwWaitForSingleObject+0xa ntdll.dll!RtlImageDirectoryEntryToData+0x118 ntdll.dll!RtlEnterCriticalSection+0xd1 ntdll.dll!LdrQueryModuleServiceTags+0x13f ntdll.dll!CsrIdentifyAlertableThread+0x9d ntdll.dll!EtwSendNotification+0x16d ntdll.dll!RtlQueryProcessDebugInformation+0x371 ntdll.dll!EtwDeliverDataBlock+0xf00 !BaseThreadInitThunk+0xd ntdll.dll!RtlUserThreadStart+0x1d here is the stack info for normal python process(have 2 threads) ------------------thread1------------------ ntdll.dll!ZwRequestWaitReplyPort+0xa kernel32.dll!GetConsoleMode+0xf8 kernel32.dll!VerifyConsoleIoHandle+0x281 kernel32.dll!ReadConsoleW+0xbc python37.dll!PyOS_Readline+0x4f4 python37.dll!PyOS_Readline+0x333 python37.dll!PyOS_Readline+0xfa python37.dll!PyErr_NoMemory+0xc228 python37.dll!PyUnicode_AsUnicode+0x553 python37.dll!PyUnicode_AsUnicode+0x9c python37.dll!PyParser_ParseFileObject+0x86 python37.dll!PyParser_ASTFromFileObject+0x82 python37.dll!PyRun_InteractiveOneObject+0x24a python37.dll!PyRun_InteractiveLoopFlags+0xf6 python37.dll!PyRun_AnyFileExFlags+0x45 python37.dll!Py_UnixMain+0x50b python37.dll!Py_UnixMain+0x5b3 python37.dll!PyErr_NoMemory+0x195a4 python37.dll!PyBytes_AsString+0x14f python37.dll!Py_Main+0x52 python.exe+0x1258 kernel32.dll!BaseThreadInitThunk+0xd ntdll.dll!RtlUserThreadStart+0x1d ------------------thread2------------------ ntdll.dll!NtWaitForMultipleObjects+0xa ntdll.dll!RtlIsCriticalSectionLockedByThread+0xd4d kernel32.dll!BaseThreadInitThunk+0xd ntdll.dll!RtlUserThreadStart+0x1d One of my friend say that this may be issues with https://support.microsoft.com/en-us/help/2545627/a-multithreaded-application-might-crash-in-windows-7-or-in-windows-ser Thx. ---------- components: Windows messages: 331105 nosy: Cao Hongfu, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: python hung or stuck somtimes randomly on windows server 2008R2 type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 07:55:10 2018 From: report at bugs.python.org (Stan) Date: Wed, 05 Dec 2018 12:55:10 +0000 Subject: [issue35419] Thread.is_alive while running Process.is_alive causes either premature termination or never-terminating. Message-ID: <1544014510.18.0.788709270274.issue35419@psf.upfronthosting.co.za> New submission from Stan : Checking if thread.is_alive() while thread is checking on Process.is_alive() seemingly causes undefined behavior. The attached POC is expected to print "ThreadN.data == 1999" for N in range(0, 20) with some repeats. However the integers are spread all over the place. Moreover sometimes one or more of the threads never terminate resulting in technically infinite amount of "ThreadN.data == ###" prints. In python2.7.15 I never observed a thread lock (only early terminations), but in python3.4.8 I did. You may have to adjust max_count variable to have higher success rate of thread locking. I got about 40% chance of `python3 bug_test.py` never finishing on an Intel(R) Core(TM) i7-4610M CPU @ 3.00GHz ---------- files: bug_test.py messages: 331106 nosy: Hexorg priority: normal severity: normal status: open title: Thread.is_alive while running Process.is_alive causes either premature termination or never-terminating. type: behavior versions: Python 2.7, Python 3.4 Added file: https://bugs.python.org/file47975/bug_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 07:55:57 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 05 Dec 2018 12:55:57 +0000 Subject: [issue35416] Fix potential resource warnings in distutils In-Reply-To: <1544000059.73.0.788709270274.issue35416@psf.upfronthosting.co.za> Message-ID: <1544014557.36.0.788709270274.issue35416@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: There is a similar open issue issue22831 with patches for distutils and Tools. ---------- nosy: +serhiy.storchaka, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 08:03:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 13:03:42 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544015022.62.0.788709270274.issue10496@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote PR #10919 which fix posix.expandpath() and also fix indirectly the site module. @Antoine Pietri: Would you mind to try the fix? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 08:04:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 13:04:57 +0000 Subject: [issue35389] Use gnu_get_libc_version() in platform.libc_ver()? In-Reply-To: <1543852933.45.0.788709270274.issue35389@psf.upfronthosting.co.za> Message-ID: <1544015097.67.0.788709270274.issue35389@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 476b113ed8531b9fbb0bd023a05eb3af21996600 by Victor Stinner in branch 'master': bpo-35389: platform.libc_ver() uses os.confstr() (GH-10891) https://github.com/python/cpython/commit/476b113ed8531b9fbb0bd023a05eb3af21996600 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 08:10:06 2018 From: report at bugs.python.org (=?utf-8?q?Micka=C3=ABl_Schoentgen?=) Date: Wed, 05 Dec 2018 13:10:06 +0000 Subject: [issue35416] Fix potential resource warnings in distutils In-Reply-To: <1544000059.73.0.788709270274.issue35416@psf.upfronthosting.co.za> Message-ID: <1544015406.15.0.788709270274.issue35416@psf.upfronthosting.co.za> Micka?l Schoentgen added the comment: I saw it but it is quite old and targetting 3.5. I opended this issue to target only distutils, easier to eventually backport than a big patch on a lot of files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 08:34:05 2018 From: report at bugs.python.org (Enric Tejedor Saavedra) Date: Wed, 05 Dec 2018 13:34:05 +0000 Subject: [issue35408] Python3.7 crash in PyCFunction_New due to broken _PyObject_GC_TRACK In-Reply-To: <1543926918.35.0.788709270274.issue35408@psf.upfronthosting.co.za> Message-ID: <1544016845.02.0.788709270274.issue35408@psf.upfronthosting.co.za> Enric Tejedor Saavedra added the comment: Hi Victor, Thank you for clarifying. If the call to PyCFunction_New is done from a C extension module, is it also necessary to call Py_Initialize()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 08:40:46 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 05 Dec 2018 13:40:46 +0000 Subject: [issue35387] Dialogs on IDLE are accompanied by a small black window In-Reply-To: <1543845582.88.0.788709270274.issue35387@psf.upfronthosting.co.za> Message-ID: <1544017246.89.0.788709270274.issue35387@psf.upfronthosting.co.za> Tal Einat added the comment: Vlad, perhaps you could take a look at this? Note that Tcl/Tk 8.6.9 has recently been released (Nov 16th, 2018), which addresses several other issues pertaining to macOS Mojave. Can someone check this on Mojave with Tk 8.6.9? ---------- nosy: +vtudorache _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 08:53:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 13:53:18 +0000 Subject: [issue35389] Use gnu_get_libc_version() in platform.libc_ver()? In-Reply-To: <1543852933.45.0.788709270274.issue35389@psf.upfronthosting.co.za> Message-ID: <1544017998.24.0.788709270274.issue35389@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 Wed Dec 5 09:07:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 14:07:25 +0000 Subject: [issue35408] Python3.7 crash in PyCFunction_New due to broken _PyObject_GC_TRACK In-Reply-To: <1543926918.35.0.788709270274.issue35408@psf.upfronthosting.co.za> Message-ID: <1544018845.31.0.788709270274.issue35408@psf.upfronthosting.co.za> STINNER Victor added the comment: > If the call to PyCFunction_New is done from a C extension module, is it also necessary to call Py_Initialize()? Py_Initialize() must always be called first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:08:14 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 05 Dec 2018 14:08:14 +0000 Subject: [issue35416] Fix potential resource warnings in distutils In-Reply-To: <1544000059.73.0.788709270274.issue35416@psf.upfronthosting.co.za> Message-ID: <1544018894.62.0.788709270274.issue35416@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think the places that already use try/finally: close are correct. We try to minimize churn in distutils; changing to with is nice but does not fix errors or warning in these cases. The changes for the few spots that don?t use finally: close are welcome though! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:08:33 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Wed, 05 Dec 2018 14:08:33 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544018913.41.0.788709270274.issue10496@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: If I understood PR 10919 correctly, sysconfig.get_config_var('userbase') can now return unexpanded paths containing '~'. Is it intended despite the previous discussion starting with msg135047? ---------- nosy: +izbyshev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:23:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 14:23:05 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1544019785.57.0.788709270274.issue26544@psf.upfronthosting.co.za> STINNER Victor added the comment: > bpo-26544: Make platform.libc_ver() less slow (GH-10868) > https://github.com/python/cpython/commit/8687bd86e6f138ef0699a1e9f3f9555765949b51 "Coarse benchmark on Fedora 29: 1.6 sec => 0.1 sec." Oops, my benchmark in the commit message was wrong, it included the startup time. Correct benchmark says 44x faster, it's way better! Python 2.7: [old_py2] 1.51 sec +- 0.03 sec -> [if_in] 34.6 ms +- 0.4 ms: 43.61x faster (-98%) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:26:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 14:26:49 +0000 Subject: [issue35389] Use gnu_get_libc_version() in platform.libc_ver()? In-Reply-To: <1543852933.45.0.788709270274.issue35389@psf.upfronthosting.co.za> Message-ID: <1544020009.0.0.788709270274.issue35389@psf.upfronthosting.co.za> STINNER Victor added the comment: > Quick benchmark on Fedora 29: > python3 -m perf command ./python -S -c 'import platform; platform.libc_ver()' > 94.9 ms +- 4.3 ms -> 33.2 ms +- 1.4 ms: 2.86x faster (-65%) Oops, my benchmark in the commit message was wrong, it includes the startup time... Correct benchmark says 44,538x faster, it's *WAY* better! [regex] 56.1 ms +- 1.9 ms -> [confstr] 1.26 us +- 0.04 us: 44537.88x faster (-100%) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:38:17 2018 From: report at bugs.python.org (=?utf-8?q?Micka=C3=ABl_Schoentgen?=) Date: Wed, 05 Dec 2018 14:38:17 +0000 Subject: [issue35416] Fix potential resource warnings in distutils In-Reply-To: <1544000059.73.0.788709270274.issue35416@psf.upfronthosting.co.za> Message-ID: <1544020697.75.0.788709270274.issue35416@psf.upfronthosting.co.za> Micka?l Schoentgen added the comment: OK then I updated the PR to only update code that would really leak resources. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:43:17 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 05 Dec 2018 14:43:17 +0000 Subject: [issue35257] Add LDFLAGS_NODIST for the LDFLAGS not intended for propagation to C extensions. In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1544020997.27.0.788709270274.issue35257@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: So to better illustrate the actual issue I'll be using an example from the python documentation [0][1]. Get the demo.c and the setup.py. Compile cpython first with --with-lto and then compile the demo.c with ./python3 setup.py build. You will notice that various link time optimization linker flags are passed to the extension. [0] https://docs.python.org/3/extending/extending.html#keyword-parameters-for-extension-functions [1] https://docs.python.org/3/extending/building.html#building-c-and-c-extensions-with-distutils ---------- Added file: https://bugs.python.org/file47976/demo.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:43:26 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 05 Dec 2018 14:43:26 +0000 Subject: [issue35257] Add LDFLAGS_NODIST for the LDFLAGS not intended for propagation to C extensions. In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1544021006.43.0.788709270274.issue35257@psf.upfronthosting.co.za> Change by Charalampos Stratakis : Added file: https://bugs.python.org/file47977/setup.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:44:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 14:44:18 +0000 Subject: [issue32787] Better error handling in ctypes In-Reply-To: <1518003970.21.0.467229070634.issue32787@psf.upfronthosting.co.za> Message-ID: <1544021058.61.0.788709270274.issue32787@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 398bd27967690f2c1a8cbf8d47a5613edd9cfb2a by Serhiy Storchaka in branch 'master': bpo-32787: Better error handling in ctypes. (#3727) https://github.com/python/cpython/commit/398bd27967690f2c1a8cbf8d47a5613edd9cfb2a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:44:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 14:44:23 +0000 Subject: [issue31572] Avoid suppressing all exceptions in PyObject_HasAttr() In-Reply-To: <1506275205.91.0.662869765666.issue31572@psf.upfronthosting.co.za> Message-ID: <1544021063.57.0.702299269573.issue31572@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 398bd27967690f2c1a8cbf8d47a5613edd9cfb2a by Serhiy Storchaka in branch 'master': bpo-32787: Better error handling in ctypes. (#3727) https://github.com/python/cpython/commit/398bd27967690f2c1a8cbf8d47a5613edd9cfb2a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:44:59 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 05 Dec 2018 14:44:59 +0000 Subject: [issue35257] Add LDFLAGS_NODIST for the LDFLAGS not intended for propagation to C extensions. In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1544021099.38.0.788709270274.issue35257@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: And here is the difference between compiling the extension with the current tip, comparing to applying my current draft PR: Master branch with the linker flags propagated: running build running build_ext building 'demo' extension creating build creating build/temp.linux-x86_64-3.8 gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/Harris/dev/cpython/_install/include/python3.8m -c demo.c -o build/temp.linux-x86_64-3.8/demo.o creating build/lib.linux-x86_64-3.8 gcc -pthread -shared -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g build/temp.linux-x86_64-3.8/demo.o -o build/lib.linux-x86_64-3.8/demo.cpython-38m-x86_64-linux-gnu.so With introduction of the LDFLAGS_NODIST variable: running build running build_ext building 'demo' extension creating build creating build/temp.linux-x86_64-3.8 gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/Harris/dev/cpython/_install/include/python3.8m -c demo.c -o build/temp.linux-x86_64-3.8/demo.o creating build/lib.linux-x86_64-3.8 gcc -pthread -shared build/temp.linux-x86_64-3.8/demo.o -o build/lib.linux-x86_64-3.8/demo.cpython-38m-x86_64-linux-gnu.so ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:46:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 14:46:02 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544021161.98.0.788709270274.issue10496@psf.upfronthosting.co.za> STINNER Victor added the comment: > If I understood PR 10919 correctly, sysconfig.get_config_var('userbase') can now return unexpanded paths containing '~'. Is it intended despite the previous discussion starting with msg135047? With my PR 10919, "python3 setup.py install" and "python3 setup.py install --user" still fail with: Traceback (most recent call last): File "setup.py", line 79, in main() File "setup.py", line 75, in main setup(**options) File "/tmp/cpython/Lib/distutils/core.py", line 121, in setup dist.parse_config_files() File "/tmp/cpython/Lib/distutils/dist.py", line 397, in parse_config_files filenames = self.find_config_files() File "/tmp/cpython/Lib/distutils/dist.py", line 349, in find_config_files check_environ() File "/tmp/cpython/Lib/distutils/util.py", line 161, in check_environ os.environ['HOME'] = pwd.getpwuid(os.getuid())[5] KeyError: 'getpwuid(): uid not found: 12345' I suggest to open a new issue if you want to enhance the error message and/or handle getpwuid() failure in find_config_files(). I prefer to stick to the initial bug report which hasn't been fixed in 8 years: > When Python cannot find the home directory of the user invoking it, it prints "'import site' failed; use -v for traceback". IMHO PR 10919 fix is straighforward, it respects the contract (documentation) of posixpath.expanduser() ("If user or $HOME is unknown, do nothing."), and expanduser() already handles KeyError on getpwnam() (since the function has been created in 1992 by Guido van Rossum! commit 7ac4878773040158038031a85be122d9e7071afe). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:50:33 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Wed, 05 Dec 2018 14:50:33 +0000 Subject: [issue35257] Add LDFLAGS_NODIST for the LDFLAGS not intended for propagation to C extensions. In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1544021433.18.0.788709270274.issue35257@psf.upfronthosting.co.za> Change by Miro Hron?ok : ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:52:24 2018 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 05 Dec 2018 14:52:24 +0000 Subject: [issue35389] Use gnu_get_libc_version() in platform.libc_ver()? In-Reply-To: <1543852933.45.0.788709270274.issue35389@psf.upfronthosting.co.za> Message-ID: <1544021544.73.0.788709270274.issue35389@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Nice. I never liked the "parse the executable approach", but there wasn't anything better available at the time. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:53:43 2018 From: report at bugs.python.org (Antoine Pietri) Date: Wed, 05 Dec 2018 14:53:43 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544021623.86.0.788709270274.issue10496@psf.upfronthosting.co.za> Antoine Pietri added the comment: Would it make sense to backport this fix in 3.6 and 3.7? As distros increasingly move in the direction of using DynamicUser=yes for most stateless services, it would really help to have that, for instance in Debian Buster (which will probably be on 3.7 if my understanding is correct). FYI the cutoff date for the release candidate of 3.6.8 is 2018-12-07 (in two days). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:59:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 14:59:31 +0000 Subject: [issue35389] Use gnu_get_libc_version() in platform.libc_ver()? In-Reply-To: <1543852933.45.0.788709270274.issue35389@psf.upfronthosting.co.za> Message-ID: <1544021971.32.0.788709270274.issue35389@psf.upfronthosting.co.za> STINNER Victor added the comment: > Nice. I never liked the "parse the executable approach", but there wasn't anything better available at the time. Aha. Well, it's not perfect but it works and was fast enough (since libc_ver() is never used in performance critical code) :-) I'm now curious and looked at the history of this feature. "man confstr" says: > _CS_GNU_LIBC_VERSION (GNU C library only; since glibc 2.3.2) glibc 2.3.2 has been released in March 2003, so it's fine, we should get this constant in most "modern" Linux (using glibc) in 2018 :-) man gnu_get_libc_version says: > These functions first appeared in glibc in version 2.1. glibc 2.1 has been released in Feb 1999. Using this function might provide even better compatibility but I'm not sure that it's worth it to use it. As I wrote, I prefer to not write a new function C, if os.confstr() can already be used in pure Python! Sadly, these functions (confstr(_CS_GNU_LIBC_VERSION) / gnu_get_libc_version()) are specific to glibc. Sorry, I'm not interested to support other libc, I mostly care about Fedora, sorry :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:01:03 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Wed, 05 Dec 2018 15:01:03 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544022063.93.0.788709270274.issue10496@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: > I prefer to stick to the initial bug report which hasn't been fixed in 8 years I'm interested in fixing this bug too since it bit me in SCons and I had to use a local patch for it. I welcome the upstream fix and don't object to PR 10919. I'm not personally affected by unexpanded paths in sysconfig (at least not in a way I know of), so I just want to make sure that all effects of the PR are considered, given the previous discussions. Thanks, Victor! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:01:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 15:01:24 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544022084.57.0.788709270274.issue10496@psf.upfronthosting.co.za> STINNER Victor added the comment: Yes, I plan to try to backport the fix to stable branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:06:25 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Wed, 05 Dec 2018 15:06:25 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544022385.06.0.788709270274.issue10496@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: > Would it make sense to backport this fix in 3.6 and 3.7? I'd like to see it there, given that this bug surfaced in many use cases not involving any modern features or systemd at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:13:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 15:13:19 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544022799.0.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10159 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:13:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 15:13:22 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544022802.43.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10159, 10160 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:14:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 15:14:15 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544022855.2.0.788709270274.issue22831@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 10921 is based on fd_leaks_distutils.patch. ---------- versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:14:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 15:14:36 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544022876.51.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +dstufft, eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:22:05 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 05 Dec 2018 15:22:05 +0000 Subject: [issue28015] configure --with-lto builds fail when CC=clang on Linux, requires gold linker In-Reply-To: <1473320709.67.0.0429640617864.issue28015@psf.upfronthosting.co.za> Message-ID: <1544023325.12.0.788709270274.issue28015@psf.upfronthosting.co.za> Change by Charalampos Stratakis : ---------- pull_requests: +10161 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:22:12 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 05 Dec 2018 15:22:12 +0000 Subject: [issue28015] configure --with-lto builds fail when CC=clang on Linux, requires gold linker In-Reply-To: <1473320709.67.0.0429640617864.issue28015@psf.upfronthosting.co.za> Message-ID: <1544023332.15.0.788709270274.issue28015@psf.upfronthosting.co.za> Change by Charalampos Stratakis : ---------- pull_requests: +10161, 10162 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:22:16 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 05 Dec 2018 15:22:16 +0000 Subject: [issue28015] configure --with-lto builds fail when CC=clang on Linux, requires gold linker In-Reply-To: <1473320709.67.0.0429640617864.issue28015@psf.upfronthosting.co.za> Message-ID: <1544023336.4.0.788709270274.issue28015@psf.upfronthosting.co.za> Change by Charalampos Stratakis : ---------- pull_requests: +10161, 10162, 10163 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:26:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 15:26:45 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1544023605.54.0.788709270274.issue35412@psf.upfronthosting.co.za> STINNER Victor added the comment: There are a few more on Windows: 4 tests run no tests: test_dtrace test_future4 test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_fork and test_multiprocessing_forkserver should raise SkipTest on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:32:59 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Wed, 05 Dec 2018 15:32:59 +0000 Subject: [issue35418] python hung or stuck somtimes randomly on windows server 2008R2 In-Reply-To: <1544014308.03.0.788709270274.issue35418@psf.upfronthosting.co.za> Message-ID: <1544023979.82.0.788709270274.issue35418@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: You might try to check the list of DLLs loaded into the stuck python process and find third-party ones (e.g., antivirus). If there are any, disable the third-party software and try again. ---------- nosy: +izbyshev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:46:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 15:46:25 +0000 Subject: [issue32787] Better error handling in ctypes In-Reply-To: <1518003970.21.0.467229070634.issue32787@psf.upfronthosting.co.za> Message-ID: <1544024785.93.0.788709270274.issue32787@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 Dec 5 10:49:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 15:49:39 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544024979.38.0.788709270274.issue10496@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset f2f4555d8287ad217a1dba7bbd93103ad4daf3a8 by Victor Stinner in branch 'master': bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (GH-10919) https://github.com/python/cpython/commit/f2f4555d8287ad217a1dba7bbd93103ad4daf3a8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:54:50 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 15:54:50 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544025290.97.0.788709270274.issue10496@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10164 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:55:10 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 15:55:10 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544025310.6.0.788709270274.issue10496@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10164, 10165 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:55:26 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 15:55:26 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544025326.64.0.788709270274.issue10496@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10164, 10165, 10166 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:58:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 15:58:23 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544025503.4.0.788709270274.issue10496@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:58:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 15:58:41 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544025521.21.0.788709270274.issue10496@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10167, 10168 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:04:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:04:07 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544025847.74.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10169 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:04:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:04:15 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544025855.12.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10169, 10170 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:04:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:04:22 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544025862.13.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10169, 10170, 10171 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:04:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:04:27 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544025867.13.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10171, 10172 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:04:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:04:36 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544025876.18.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10172, 10174 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:04:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:04:42 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544025882.18.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10171, 10172, 10173, 10174 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:04:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:04:51 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544025891.21.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10173, 10175 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:04:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:04:56 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544025896.22.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10175, 10176 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:05:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:05:03 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544025903.27.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10175, 10176, 10177 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:05:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:05:11 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544025911.32.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10177, 10178 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:05:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:05:19 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544025919.33.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10177, 10178, 10179 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:05:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:05:28 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544025928.33.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10177, 10178, 10179, 10180 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:07:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:07:44 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544026064.07.0.788709270274.issue22831@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 10926 is based on fd_leaks_tools1_2.patch. PR 10927 is based on fd_leaks_tools2_2.patch. PR 10928 is based on fd_leaks_tests1_2.patch. PR 10929 is based on fd_leaks_tests2_2.patch. Some of changes in these patches were already applied in other issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:08:00 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 16:08:00 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544026080.68.0.788709270274.issue10496@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 983d1ab0e6f4280f954bcba87db76e11131f1c33 by Miss Islington (bot) in branch '3.7': bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (GH-10919) https://github.com/python/cpython/commit/983d1ab0e6f4280f954bcba87db76e11131f1c33 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:08:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:08:11 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544026091.33.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -10160 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:21:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 16:21:44 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544026904.07.0.788709270274.issue10496@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 31b635dbf0c7108f18bb3ce382b895374cff77fb by Victor Stinner in branch '3.6': bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (GH-10919) (GH-10925) https://github.com/python/cpython/commit/31b635dbf0c7108f18bb3ce382b895374cff77fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:30:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 16:30:13 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544027413.32.0.788709270274.issue10496@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10181 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:30:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 16:30:30 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544027430.36.0.788709270274.issue10496@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10181, 10182 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:30:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 16:30:48 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544027448.56.0.788709270274.issue10496@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10181, 10182, 10183 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:31:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 16:31:07 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544027467.61.0.788709270274.issue10496@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10183 versions: +Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:44:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 16:44:39 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544028279.22.0.788709270274.issue10496@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10184 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:44:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 16:44:57 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544028297.98.0.788709270274.issue10496@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10184, 10185 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:45:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 16:45:12 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544028312.98.0.788709270274.issue10496@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10184, 10185, 10186 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:51:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:51:27 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544028687.18.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -10170 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:51:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:51:36 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544028696.09.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -10170, 10171 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:51:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:51:43 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544028703.13.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -10170, 10171, 10174 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:51:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:51:51 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544028711.18.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -10170, 10171, 10173, 10174 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:51:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:51:54 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544028714.16.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -10171, 10173, 10174, 10180 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:51:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:51:57 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544028717.9.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -10171, 10173, 10174, 10176, 10180 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:52:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:52:06 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544028726.22.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -10171, 10173, 10174, 10176, 10177, 10179, 10180 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:52:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 16:52:02 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544028722.16.0.788709270274.issue22831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -10171, 10173, 10174, 10176, 10177, 10180 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 12:12:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 17:12:22 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1544029942.21.0.788709270274.issue22831@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: self.addCleanup(f.close) can not be used if the same file should be opened several times in the test. It can not be used also if the file is deleted in the test or in tearDown(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 12:50:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 17:50:29 +0000 Subject: [issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function In-Reply-To: <1530786887.48.0.56676864532.issue34052@psf.upfronthosting.co.za> Message-ID: <1544032229.27.0.788709270274.issue34052@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 5b25f1d03100e2283c1b129d461ba68ac0169a14 by Serhiy Storchaka (Sergey Fedoseev) in branch 'master': bpo-34052: Prevent SQLite functions from setting callbacks on exceptions. (GH-8113) https://github.com/python/cpython/commit/5b25f1d03100e2283c1b129d461ba68ac0169a14 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 13:29:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 18:29:25 +0000 Subject: [issue34987] A possible null pointer dereference in _pickle.c's save_reduce() In-Reply-To: <1539585850.77.0.788709270274.issue34987@psf.upfronthosting.co.za> Message-ID: <1544034565.59.0.788709270274.issue34987@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 25d389789c59a52a31770f7c50ce9e02a8909190 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-34987: Fix a possible null pointer dereference in _pickle.c's save_reduce(). (GH-9886) https://github.com/python/cpython/commit/25d389789c59a52a31770f7c50ce9e02a8909190 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 13:29:37 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 18:29:37 +0000 Subject: [issue34987] A possible null pointer dereference in _pickle.c's save_reduce() In-Reply-To: <1539585850.77.0.788709270274.issue34987@psf.upfronthosting.co.za> Message-ID: <1544034577.83.0.788709270274.issue34987@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10187 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 13:29:51 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 18:29:51 +0000 Subject: [issue34987] A possible null pointer dereference in _pickle.c's save_reduce() In-Reply-To: <1539585850.77.0.788709270274.issue34987@psf.upfronthosting.co.za> Message-ID: <1544034591.26.0.788709270274.issue34987@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10188 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:05:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 19:05:45 +0000 Subject: [issue34738] Distutils: ZIP files don't include directory entries In-Reply-To: <1537364847.56.0.956365154283.issue34738@psf.upfronthosting.co.za> Message-ID: <1544036745.57.0.788709270274.issue34738@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The inconsistency is not just with the tarfile module, but with other method of creating ZIP archives. The unix unzip command creates directories if needed, but I am not sure about other third-party utilities. Since all know ZIP creators creates entries for directories, I would not be surprised if there are ZIP readers that doesn't work without explicit entries for directories. Zipimport is an example of this. Matthew mentioned other case. Empty directories currently are added to the TAR archive, but are omitted in the ZIP archive (unless you use an external zip tool). TAR archives are common on Unix, ZIP archives are common on Windows, and we can get different source distributions for Unix and Windows. You need to add a fake empty file to be sure that the directory will be added in the distribution. Some old DOS archives needed this trick, but the ZIP format supports empty directories. The downside of adding entries for directories is that this increases the size of the archive. But the difference is pretty small. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:10:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 19:10:25 +0000 Subject: [issue34604] Possible mojibake in pwd.getpwnam and grp.getgrnam In-Reply-To: <1536326094.99.0.56676864532.issue34604@psf.upfronthosting.co.za> Message-ID: <1544037025.86.0.788709270274.issue34604@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 34c7f0c04e2b4e715b2c3df1875af8939fbe7d0b by Serhiy Storchaka (William Grzybowski) in branch 'master': bpo-34604: Use %R because of invisible characters or trailing whitespaces. (GH-9165) https://github.com/python/cpython/commit/34c7f0c04e2b4e715b2c3df1875af8939fbe7d0b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:16:39 2018 From: report at bugs.python.org (mattip) Date: Wed, 05 Dec 2018 19:16:39 +0000 Subject: [issue35420] how to migrate a c-extension module to one that supports subinerpreters? Message-ID: <1544037399.3.0.788709270274.issue35420@psf.upfronthosting.co.za> New submission from mattip : NumPy does not currently support subinterpreters, it has global state that is not cleaned up when releasing the module. I could not find a description of the steps I need to take to modernize the C-extension module to be able to used under a subinterpreter. It would be nice to describe this in the Python documentation, or does such documentation exist? ---------- assignee: docs at python components: Documentation messages: 331142 nosy: docs at python, eric.snow, mattip priority: normal severity: normal status: open title: how to migrate a c-extension module to one that supports subinerpreters? type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:18:41 2018 From: report at bugs.python.org (Myles Borins) Date: Wed, 05 Dec 2018 19:18:41 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1544037521.76.0.788709270274.issue31715@psf.upfronthosting.co.za> Myles Borins added the comment: I see that when this landed it appears that it was removed from landing on "Python 2.7, Python 3.6, Python 3.7". Is there any chance to revisit this decision? I dug into the mimetype code and it doesn't appear that there is a way to rely on operating system mimetypes for systems aside from Windows... as such this is going to be a fairly large experience gap for people developing front-end applications that utilize the file extension on any version other than 3.8, which will likely take quite a while to be distributed as a default in various OS distributions. ---------- nosy: +mylesborins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:23:39 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 05 Dec 2018 19:23:39 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1544037819.6.0.788709270274.issue31715@psf.upfronthosting.co.za> Christian Heimes added the comment: It's technically a new feature. New features are not added to existing releases unless there is a very compelling reason. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:24:39 2018 From: report at bugs.python.org (Dan) Date: Wed, 05 Dec 2018 19:24:39 +0000 Subject: [issue35390] ctypes not possible to pass NULL c_void_p in structure by reference In-Reply-To: <1543857109.69.0.788709270274.issue35390@psf.upfronthosting.co.za> Message-ID: <1544037879.23.0.788709270274.issue35390@psf.upfronthosting.co.za> Change by Dan : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:28:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 19:28:54 +0000 Subject: [issue33023] Unable to copy ssl.SSLContext In-Reply-To: <1520489361.61.0.467229070634.issue33023@psf.upfronthosting.co.za> Message-ID: <1544038134.3.0.788709270274.issue33023@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10189 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:32:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 19:32:24 +0000 Subject: [issue34185] Lib/test/test_bdb.py failed when ran as a script In-Reply-To: <1532196122.3.0.56676864532.issue34185@psf.upfronthosting.co.za> Message-ID: <1544038344.24.0.788709270274.issue34185@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 54fd45505b3a365e6d53441e6dd7e0d1ec13b46f by Serhiy Storchaka (Alex H) in branch 'master': bpo-34185: Fix test module collision in test_bdb when ran as script. (GH-8537) https://github.com/python/cpython/commit/54fd45505b3a365e6d53441e6dd7e0d1ec13b46f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:32:27 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 19:32:27 +0000 Subject: [issue34185] Lib/test/test_bdb.py failed when ran as a script In-Reply-To: <1532196122.3.0.56676864532.issue34185@psf.upfronthosting.co.za> Message-ID: <1544038347.54.0.788709270274.issue34185@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10190 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:32:35 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 19:32:35 +0000 Subject: [issue34185] Lib/test/test_bdb.py failed when ran as a script In-Reply-To: <1532196122.3.0.56676864532.issue34185@psf.upfronthosting.co.za> Message-ID: <1544038355.62.0.788709270274.issue34185@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10191 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:32:43 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 19:32:43 +0000 Subject: [issue34185] Lib/test/test_bdb.py failed when ran as a script In-Reply-To: <1532196122.3.0.56676864532.issue34185@psf.upfronthosting.co.za> Message-ID: <1544038363.86.0.788709270274.issue34185@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10192 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:35:45 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 19:35:45 +0000 Subject: [issue34987] A possible null pointer dereference in _pickle.c's save_reduce() In-Reply-To: <1539585850.77.0.788709270274.issue34987@psf.upfronthosting.co.za> Message-ID: <1544038545.41.0.788709270274.issue34987@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e2f376f284b7bf1388d85e99dce646cabc507016 by Miss Islington (bot) in branch '3.7': bpo-34987: Fix a possible null pointer dereference in _pickle.c's save_reduce(). (GH-9886) https://github.com/python/cpython/commit/e2f376f284b7bf1388d85e99dce646cabc507016 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:35:50 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 19:35:50 +0000 Subject: [issue34987] A possible null pointer dereference in _pickle.c's save_reduce() In-Reply-To: <1539585850.77.0.788709270274.issue34987@psf.upfronthosting.co.za> Message-ID: <1544038550.64.0.788709270274.issue34987@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 92d912c344e6c21de46da29f0dc45b7e476fa79d by Miss Islington (bot) in branch '3.6': bpo-34987: Fix a possible null pointer dereference in _pickle.c's save_reduce(). (GH-9886) https://github.com/python/cpython/commit/92d912c344e6c21de46da29f0dc45b7e476fa79d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:36:51 2018 From: report at bugs.python.org (Lingaraj Gowdar) Date: Wed, 05 Dec 2018 19:36:51 +0000 Subject: [issue35421] Expected result is not clear in case of list.append(list) Message-ID: <1544038611.2.0.788709270274.issue35421@psf.upfronthosting.co.za> New submission from Lingaraj Gowdar : Currently the output of below append cannot be used for practical purpose, This jira is to get the expectation for a case in append. >>> a=[1,2] >>> a.append(a) >>> a [1, 2, [...]] >>> ---------- assignee: terry.reedy components: IDLE messages: 331148 nosy: Lingaraj Gowdar, terry.reedy priority: normal severity: normal status: open title: Expected result is not clear in case of list.append(list) type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:42:15 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 05 Dec 2018 19:42:15 +0000 Subject: [issue17185] unittest mock create_autospec doesn't correctly replace mocksignature In-Reply-To: <1360621900.03.0.519438692167.issue17185@psf.upfronthosting.co.za> Message-ID: <1544038935.21.0.788709270274.issue17185@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: While working on partials test case failure I found two more cases along the way. 1. When we call create_autospec it calls _get_signature_object that gets the signature for the given parameter. With functools.partial it returns a partial object and hence while getting the signature it returns the signature for the constructor of partial instead of the underlying function passed to functools.partial. I think a check needs to be added to make sure not to use func.__init__ when it's a partial object. 2. When we call create_autospect on a class that has a partialmethod the self parameter is not skipped in the signature and thus it creates a signature with self causing error. The fix would be to handle partialmethod also in _must_skip that determines whether to skip self or not. 3. It also seems that inspect.getfullargspec doesn't work for magic mocks which I hope is now fixed with __signature__ set in my patch To be honest I don't if my getting hacky at this point I will clean up the code in a couple of days and raise a PR for initial feedback. Current changes are at https://github.com/python/cpython/compare/master...tirkarthi:bpo17185. I am adding @mariocj89 to the issue. Sample reproducer : from functools import partial, partialmethod from unittest.mock import create_autospec import inspect def foo(a, b): pass p = partial(foo, 1) m = create_autospec(p) m(1, 2, 3) # passes since signature is set as (*args, **kwargs) the signature of functools.partial constructor. This should throw TypeError under autospec class A: def f(self, a, b): print(a, b) g = partialmethod(f, 1) m = create_autospec(A) m().g(1, 2) # passes since signature is set as (self, b) and self is not skipped in _must_skip thus self=1, b=2. This should throw TypeError under autospec since the valid call is m().g(2) ---------- nosy: +mariocj89 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:46:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 19:46:28 +0000 Subject: [issue34738] Distutils: ZIP files don't include directory entries In-Reply-To: <1537364847.56.0.956365154283.issue34738@psf.upfronthosting.co.za> Message-ID: <1544039188.37.0.788709270274.issue34738@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 67a93b3a0b3814e97ef9d077b21325fc8ce351b2 by Serhiy Storchaka in branch 'master': bpo-34738: Add directory entries in ZIP files created by distutils. (GH-9419) https://github.com/python/cpython/commit/67a93b3a0b3814e97ef9d077b21325fc8ce351b2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:46:38 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 19:46:38 +0000 Subject: [issue34738] Distutils: ZIP files don't include directory entries In-Reply-To: <1537364847.56.0.956365154283.issue34738@psf.upfronthosting.co.za> Message-ID: <1544039198.37.0.788709270274.issue34738@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10193 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:46:47 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 19:46:47 +0000 Subject: [issue34738] Distutils: ZIP files don't include directory entries In-Reply-To: <1537364847.56.0.956365154283.issue34738@psf.upfronthosting.co.za> Message-ID: <1544039207.96.0.788709270274.issue34738@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10194 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:54:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 19:54:08 +0000 Subject: [issue33023] Unable to copy ssl.SSLContext In-Reply-To: <1520489361.61.0.467229070634.issue33023@psf.upfronthosting.co.za> Message-ID: <1544039648.77.0.788709270274.issue33023@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 10934 fixes just a typo in the name of NotImplementedError. It fixes also a similar typo in IDLE. It adds new tests and fixes existing tests for NotImplementedError in SSLSocket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:54:46 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 19:54:46 +0000 Subject: [issue34185] Lib/test/test_bdb.py failed when ran as a script In-Reply-To: <1532196122.3.0.56676864532.issue34185@psf.upfronthosting.co.za> Message-ID: <1544039686.51.0.788709270274.issue34185@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c7c4e938b98068e8e4e5fe56d441db696d47de78 by Miss Islington (bot) in branch '3.7': bpo-34185: Fix test module collision in test_bdb when ran as script. (GH-8537) https://github.com/python/cpython/commit/c7c4e938b98068e8e4e5fe56d441db696d47de78 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:55:48 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 05 Dec 2018 19:55:48 +0000 Subject: [issue35420] how to migrate a c-extension module to one that supports subinerpreters? In-Reply-To: <1544037399.3.0.788709270274.issue35420@psf.upfronthosting.co.za> Message-ID: <1544039748.78.0.788709270274.issue35420@psf.upfronthosting.co.za> Change by Eric Snow : ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:00:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 20:00:56 +0000 Subject: [issue35250] Minor parameter documentation mismatch for turtle In-Reply-To: <1542228045.84.0.788709270274.issue35250@psf.upfronthosting.co.za> Message-ID: <1544040056.73.0.788709270274.issue35250@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10195 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:04:59 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 20:04:59 +0000 Subject: [issue34185] Lib/test/test_bdb.py failed when ran as a script In-Reply-To: <1532196122.3.0.56676864532.issue34185@psf.upfronthosting.co.za> Message-ID: <1544040299.97.0.788709270274.issue34185@psf.upfronthosting.co.za> miss-islington added the comment: New changeset bacc272afc165df21c607aae4ff7bfa21ae1979d by Miss Islington (bot) in branch '2.7': bpo-34185: Fix test module collision in test_bdb when ran as script. (GH-8537) https://github.com/python/cpython/commit/bacc272afc165df21c607aae4ff7bfa21ae1979d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:20:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 20:20:06 +0000 Subject: [issue34185] Lib/test/test_bdb.py failed when ran as a script In-Reply-To: <1532196122.3.0.56676864532.issue34185@psf.upfronthosting.co.za> Message-ID: <1544041206.0.0.788709270274.issue34185@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 49d995fd6f2a703d19d93baf06fc9f911cb2ce06 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-34185: Fix test module collision in test_bdb when ran as script. (GH-8537) (GH-10936) https://github.com/python/cpython/commit/49d995fd6f2a703d19d93baf06fc9f911cb2ce06 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:24:54 2018 From: report at bugs.python.org (Mario Corchero) Date: Wed, 05 Dec 2018 20:24:54 +0000 Subject: [issue35330] When using mock to wrap an existing object, side_effect requires return_value In-Reply-To: <1543339599.43.0.788709270274.issue35330@psf.upfronthosting.co.za> Message-ID: <1544041494.19.0.788709270274.issue35330@psf.upfronthosting.co.za> Mario Corchero added the comment: I'll get ready a PR with a good set of tests and the fix for the original issue. This is quite an interesting bug :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:27:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 20:27:29 +0000 Subject: [issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function In-Reply-To: <1530786887.48.0.56676864532.issue34052@psf.upfronthosting.co.za> Message-ID: <1544041649.22.0.788709270274.issue34052@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10196 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:29:33 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 20:29:33 +0000 Subject: [issue34738] Distutils: ZIP files don't include directory entries In-Reply-To: <1537364847.56.0.956365154283.issue34738@psf.upfronthosting.co.za> Message-ID: <1544041773.8.0.788709270274.issue34738@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 53bed18d93233b030bb5b2637daf1b5e87548ef1 by Miss Islington (bot) in branch '3.7': bpo-34738: Add directory entries in ZIP files created by distutils. (GH-9419) https://github.com/python/cpython/commit/53bed18d93233b030bb5b2637daf1b5e87548ef1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:29:51 2018 From: report at bugs.python.org (Myles Borins) Date: Wed, 05 Dec 2018 20:29:51 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1544037819.6.0.788709270274.issue31715@psf.upfronthosting.co.za> Message-ID: <33876DA2-59C3-46EE-AD6B-1AFAACEF39D8@google.com> Myles Borins added the comment: There are a number of tutorials that suggest using the .mjs extension for working with ESM modules for front end development. https://developers.google.com/web/fundamentals/primers/modules https://hacks.mozilla.org/2018/03/es-modules-a-cartoon-deep-dive/ There are many tutorials that suggest web developers use `python -m SimpleHTTPServer` as a way to spin up a quick development server. If a .mjs file is not served with the correct mime type the browser will throw when trying to load the module, and the error is not the most obvious if developers are not aware of what mime types even are. As such I would like propose that this is a bug fix, rather than a feature, as popular browser workflow is going to be broken without an obvious way to fix it for anyone using python right now. > On Dec 5, 2018, at 2:23 PM, Christian Heimes wrote: > > > Christian Heimes added the comment: > > It's technically a new feature. New features are not added to existing releases unless there is a very compelling reason. > > ---------- > nosy: +christian.heimes > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:32:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 20:32:55 +0000 Subject: [issue34604] Possible mojibake in pwd.getpwnam and grp.getgrnam In-Reply-To: <1536326094.99.0.56676864532.issue34604@psf.upfronthosting.co.za> Message-ID: <1544041975.05.0.788709270274.issue34604@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10197 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:36:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 20:36:06 +0000 Subject: [issue35310] select which was interrupted by EINTR isn't re-run if the timeout has passed In-Reply-To: <1543151946.49.0.788709270274.issue35310@psf.upfronthosting.co.za> Message-ID: <1544042166.05.0.788709270274.issue35310@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 7f52415a6d4841d77d3b7853e83b25a22e0048dc by Victor Stinner (Oran Avraham) in branch 'master': bpo-35310: Clear select() lists before returning upon EINTR (GH-10877) https://github.com/python/cpython/commit/7f52415a6d4841d77d3b7853e83b25a22e0048dc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:36:32 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 20:36:32 +0000 Subject: [issue35310] select which was interrupted by EINTR isn't re-run if the timeout has passed In-Reply-To: <1543151946.49.0.788709270274.issue35310@psf.upfronthosting.co.za> Message-ID: <1544042192.9.0.788709270274.issue35310@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10198 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:36:43 2018 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 05 Dec 2018 20:36:43 +0000 Subject: [issue25545] email parsing docs: clarify that only ASCII strings are supported In-Reply-To: <1446561810.16.0.921085816129.issue25545@psf.upfronthosting.co.za> Message-ID: <1544042203.44.0.788709270274.issue25545@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I don't think this ticket should be implemented as described. Consider the use-case in importlib_metadata, which loads metadata from a package, metadata known to be of a specified encoding. It already knows the encoding and has decoded the full message to text and now wants to parse it. It seems very much in the remit of something like email.parser to parse already-decoded content. Yes, the RFCs describe how to decode bytes content, but that shouldn't preclude the e-mail module from supporting parsing from Unicode text. And in fact, it does seem that the library is able to parse non-ascii Unicode text, especially on Python 3. Consider 'parse-text.py', attached. It illustrates that the parser currently mostly meets my expectation - on Python 2.7 and 3.7, e-mail messages are parsed from unicode text without any indication of an encoding, and returning unicode text on both Python 2 and Python 3. Python 2 is deficient in that message_from_string will get a UnicodeEncodeError constructing a bytes-oriented StringIO from the input, which is easily worked-around by using the text-oriented io.StringIO. Still, I would argue the current behavior is desirable and shouldn't be deprecated. ---------- nosy: +barry, jason.coombs Added file: https://bugs.python.org/file47978/parse-text.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:36:45 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 20:36:45 +0000 Subject: [issue35310] select which was interrupted by EINTR isn't re-run if the timeout has passed In-Reply-To: <1543151946.49.0.788709270274.issue35310@psf.upfronthosting.co.za> Message-ID: <1544042205.66.0.788709270274.issue35310@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10199 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:37:49 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 05 Dec 2018 20:37:49 +0000 Subject: [issue35421] Expected result is not clear in case of list.append(list) In-Reply-To: <1544038611.2.0.788709270274.issue35421@psf.upfronthosting.co.za> Message-ID: <1544042269.68.0.788709270274.issue35421@psf.upfronthosting.co.za> Eric V. Smith added the comment: The ... denotes a recursive data structure, which is what you've created here by "a" including itself as an element. I'm not clear what you expected to see, but I'm going to close this because I don't see an actual problem here. If you think there's a bug in Python, please describe it here. Also make sure to include what you expect to see in addition to what you do see. ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:37:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 20:37:51 +0000 Subject: [issue34738] Distutils: ZIP files don't include directory entries In-Reply-To: <1537364847.56.0.956365154283.issue34738@psf.upfronthosting.co.za> Message-ID: <1544042271.45.0.788709270274.issue34738@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10200 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:38:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 20:38:04 +0000 Subject: [issue35310] select which was interrupted by EINTR isn't re-run if the timeout has passed In-Reply-To: <1543151946.49.0.788709270274.issue35310@psf.upfronthosting.co.za> Message-ID: <1544042284.83.0.788709270274.issue35310@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 2.7 is not affected: select() isn't retried if it fails with EINTR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:44:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 20:44:43 +0000 Subject: [issue34738] Distutils: ZIP files don't include directory entries In-Reply-To: <1537364847.56.0.956365154283.issue34738@psf.upfronthosting.co.za> Message-ID: <1544042683.22.0.788709270274.issue34738@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset e0c2046d82f6db45a7f3d3ee5f555c3e2487a74d by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-34738: Add directory entries in ZIP files created by distutils. (GH-9419) (GH-10942) https://github.com/python/cpython/commit/e0c2046d82f6db45a7f3d3ee5f555c3e2487a74d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:56:28 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 20:56:28 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1544043388.79.0.788709270274.issue10496@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b50b33b4ac62c8798199682e511b2028f2d3ec42 by Victor Stinner in branch '2.7': bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (GH-10919) (GH-10930) https://github.com/python/cpython/commit/b50b33b4ac62c8798199682e511b2028f2d3ec42 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:00:13 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2018 21:00:13 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1544043613.53.0.788709270274.issue31715@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Christian Heimes is right: it is a new feature, not a bug fix. I regret too often when I cannot backport a brilliant patch to old Python version but this is the price of API stability. You can try to convince release managers (Benjamin and Ned, I've added you to nosy list) but I suspect you'll get a rejection. ---------- nosy: +benjamin.peterson, ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:03:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 21:03:13 +0000 Subject: [issue35389] Use gnu_get_libc_version() in platform.libc_ver()? In-Reply-To: <1543852933.45.0.788709270274.issue35389@psf.upfronthosting.co.za> Message-ID: <1544043793.38.0.788709270274.issue35389@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10201 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:09:10 2018 From: report at bugs.python.org (Myles Borins) Date: Wed, 05 Dec 2018 21:09:10 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1544044150.81.0.788709270274.issue31715@psf.upfronthosting.co.za> Myles Borins added the comment: Thanks for cc'ing the other folks. I help run the Node.js release + LTS team... so I 100% understand the balance necessary to keep a stable API. In this particular case I would gauge that this has a near 0 case for breakage, but leaving it unpatched has a high risk of breaking user expectations https://github.com/search?q=extension%3Amjs+function&type=Code This is a really heavy handed search against github showing 13k+ files with the .mjs extension that include the word "function" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:09:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 21:09:59 +0000 Subject: [issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function In-Reply-To: <1530786887.48.0.56676864532.issue34052@psf.upfronthosting.co.za> Message-ID: <1544044199.4.0.788709270274.issue34052@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 1de91a0032fed500ddd3d8c4fb7a38c0b8719f67 by Serhiy Storchaka in branch '3.7': bpo-34052: Prevent SQLite functions from setting callbacks on exceptions. (GH-8113). (GH-10946) https://github.com/python/cpython/commit/1de91a0032fed500ddd3d8c4fb7a38c0b8719f67 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:10:09 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 21:10:09 +0000 Subject: [issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function In-Reply-To: <1530786887.48.0.56676864532.issue34052@psf.upfronthosting.co.za> Message-ID: <1544044209.51.0.788709270274.issue34052@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10202 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:10:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 21:10:38 +0000 Subject: [issue35250] Minor parameter documentation mismatch for turtle In-Reply-To: <1542228045.84.0.788709270274.issue35250@psf.upfronthosting.co.za> Message-ID: <1544044238.53.0.788709270274.issue35250@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset abe74feb912292aa4df4e70d39e85d0bcd425436 by Serhiy Storchaka in branch '2.7': [2.7] bpo-35250: Correct argument name "num" -> "btn" in turtle docs. (GH-10565). (GH-10943) https://github.com/python/cpython/commit/abe74feb912292aa4df4e70d39e85d0bcd425436 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:14:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 21:14:51 +0000 Subject: [issue35250] Minor parameter documentation mismatch for turtle In-Reply-To: <1542228045.84.0.788709270274.issue35250@psf.upfronthosting.co.za> Message-ID: <1544044491.24.0.788709270274.issue35250@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 Dec 5 16:15:21 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 21:15:21 +0000 Subject: [issue35418] python hung or stuck somtimes randomly on windows server 2008R2 In-Reply-To: <1544014308.03.0.788709270274.issue35418@psf.upfronthosting.co.za> Message-ID: <1544044521.94.0.788709270274.issue35418@psf.upfronthosting.co.za> STINNER Victor added the comment: You can try to use faulthandler.dump_traceback_later() with a file to get the traceback of the stuck threads. ------------------thread1------------------ ... !UuidCreate+0x1b00 ... !RegEnumKeyExW+0xbe ... !LookupPrivilegeValueA+0x84 !PyNamespace_New+0xd4 !PyCodec_LookupTextEncoding+0xb5 !PyObject_SetAttrId+0x21e ... !PyObject_CallMethod+0x3c !PyTime_MulDiv+0x47 !Py_InitializeMainInterpreter+0x95 !PyMainInterpreterConfig_Read+0x309 !PyMapping_SetItemString+0x306 !PyBytes_AsString+0x142 !Py_Main+0x52 !BaseThreadInitThunk+0xd This traceback doesn't make sense: * Py_Main() doesn't call directly PyBytes_AsString(). * PyTime_MulDiv shouldn't call PyObject_CallMethod(). * I don't see how PyNamespace_New() can call LookupPrivilegeValueA() ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:19:20 2018 From: report at bugs.python.org (Myles Borins) Date: Wed, 05 Dec 2018 21:19:20 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1544044760.23.0.788709270274.issue31715@psf.upfronthosting.co.za> Myles Borins added the comment: Also wanted to point out some prior art of a mimetype (json) being backported to all active runtimes https://bugs.python.org/issue30824#msg297527 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:23:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 21:23:08 +0000 Subject: [issue34604] Possible mojibake in pwd.getpwnam and grp.getgrnam In-Reply-To: <1536326094.99.0.56676864532.issue34604@psf.upfronthosting.co.za> Message-ID: <1544044988.95.0.788709270274.issue34604@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ac8b47c8b4edd59aaee857717d434df52ec49e6c by Serhiy Storchaka in branch '3.7': bpo-34604: Use %R because of invisible characters or trailing whitespaces. (GH-9165). (GH-10947) https://github.com/python/cpython/commit/ac8b47c8b4edd59aaee857717d434df52ec49e6c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:23:17 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 21:23:17 +0000 Subject: [issue34604] Possible mojibake in pwd.getpwnam and grp.getgrnam In-Reply-To: <1536326094.99.0.56676864532.issue34604@psf.upfronthosting.co.za> Message-ID: <1544044997.95.0.788709270274.issue34604@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10203 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:24:32 2018 From: report at bugs.python.org (=?utf-8?q?C=C3=A9dric_Van_Rompay?=) Date: Wed, 05 Dec 2018 21:24:32 +0000 Subject: [issue35422] misleading error message from ssl.get_server_certificate() when bad port Message-ID: <1544045072.3.0.788709270274.issue35422@psf.upfronthosting.co.za> New submission from C?dric Van Rompay : When calling ssl.get_server_certificate() with a bad port number (I used 80 when I should have been using 443), the error raised is a bit misleading: >>> import ssl >>> ssl.get_server_certificate(('gitlab.com',80)) [...] SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:847) "SSL: wrong version number" seems to indicate that there is a mismatch between SSL versions supported by the client and the ones supported by the server. When here I guess the problem would better be described as "there is no SSL available at this address+port". ---------- assignee: christian.heimes components: SSL messages: 331171 nosy: cedricvanrompay, christian.heimes priority: normal severity: normal status: open title: misleading error message from ssl.get_server_certificate() when bad port type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:29:10 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 21:29:10 +0000 Subject: [issue35310] select which was interrupted by EINTR isn't re-run if the timeout has passed In-Reply-To: <1543151946.49.0.788709270274.issue35310@psf.upfronthosting.co.za> Message-ID: <1544045350.7.0.788709270274.issue35310@psf.upfronthosting.co.za> miss-islington added the comment: New changeset b2e0649dd9a36d54478d0edb623a18d7379e6f19 by Miss Islington (bot) in branch '3.6': bpo-35310: Clear select() lists before returning upon EINTR (GH-10877) https://github.com/python/cpython/commit/b2e0649dd9a36d54478d0edb623a18d7379e6f19 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:31:10 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 21:31:10 +0000 Subject: [issue35310] select which was interrupted by EINTR isn't re-run if the timeout has passed In-Reply-To: <1543151946.49.0.788709270274.issue35310@psf.upfronthosting.co.za> Message-ID: <1544045470.26.0.788709270274.issue35310@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 34510781901b75c9aeca79db41ce0fa92c67878f by Miss Islington (bot) in branch '3.7': bpo-35310: Clear select() lists before returning upon EINTR (GH-10877) https://github.com/python/cpython/commit/34510781901b75c9aeca79db41ce0fa92c67878f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:31:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 21:31:57 +0000 Subject: [issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting. In-Reply-To: <1543961289.76.0.788709270274.issue35411@psf.upfronthosting.co.za> Message-ID: <1544045517.38.0.788709270274.issue35411@psf.upfronthosting.co.za> STINNER Victor added the comment: Nathaniel Smith has an explanation. [Python-Dev] test_urllib2net fixed to repair Travis CI https://mail.python.org/pipermail/python-dev/2018-December/155929.html Travis is in the middle of moving everything from AWS to GCE, which is probably related: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration As noted there, GCE has different IP addresses. But I suspect it's not the new IP address that's the problem, but rather the fact that the GCE setup is known to break outgoing ftp: https://blog.travis-ci.com/2018-07-23-the-tale-of-ftp-at-travis-ci -n ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:33:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 21:33:28 +0000 Subject: [issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function In-Reply-To: <1530786887.48.0.56676864532.issue34052@psf.upfronthosting.co.za> Message-ID: <1544045607.99.0.788709270274.issue34052@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10204 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:36:00 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Wed, 05 Dec 2018 21:36:00 +0000 Subject: [issue35418] python hung or stuck somtimes randomly on windows server 2008R2 In-Reply-To: <1544014308.03.0.788709270274.issue35418@psf.upfronthosting.co.za> Message-ID: <1544045760.0.0.788709270274.issue35418@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: How is it possible to use faulthandler if the interpreter hasn't even started yet? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:41:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 21:41:54 +0000 Subject: [issue35344] platform: get macOS version rather than darwin version? In-Reply-To: <1543445701.98.0.788709270274.issue35344@psf.upfronthosting.co.za> Message-ID: <1544046114.52.0.788709270274.issue35344@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset ea0ca218b0c28b2af2b1f6a5d3383569de7fc2c1 by Victor Stinner in branch 'master': bpo-35344: platform.platform() uses mac_ver() on macOS (GH-10780) https://github.com/python/cpython/commit/ea0ca218b0c28b2af2b1f6a5d3383569de7fc2c1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:44:29 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 05 Dec 2018 21:44:29 +0000 Subject: [issue35257] Add LDFLAGS_NODIST for the LDFLAGS not intended for propagation to C extensions. In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1544046269.07.0.788709270274.issue35257@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: PR has been finalized. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:44:57 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 05 Dec 2018 21:44:57 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils. In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1544046297.96.0.788709270274.issue35257@psf.upfronthosting.co.za> Change by Charalampos Stratakis : ---------- title: Add LDFLAGS_NODIST for the LDFLAGS not intended for propagation to C extensions. -> Avoid leaking linker flags into distutils. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:49:18 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Dec 2018 21:49:18 +0000 Subject: [issue35421] Expected result is not clear in case of list.append(list) In-Reply-To: <1544038611.2.0.788709270274.issue35421@psf.upfronthosting.co.za> Message-ID: <1544046558.94.0.788709270274.issue35421@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Lingaraj: the fact that you use IDLE to run Python code, with the same binary executable that is running IDLE, does not make the result an IDLE issue. (This is a common mistake of beginners who use IDLE.) Anyway, an infinite string, the 'accurate' result, or an out-of-memory or recursion-depth exception, the original result of trying to print recursive data objects, is even less practical ;-). This fix, a compact replacement, is intentional. ---------- assignee: terry.reedy -> components: +Interpreter Core -IDLE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:53:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 21:53:44 +0000 Subject: [issue35346] Modernize Lib/platform.py code In-Reply-To: <1543455759.08.0.788709270274.issue35346@psf.upfronthosting.co.za> Message-ID: <1544046824.77.0.788709270274.issue35346@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10205 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 16:58:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 21:58:27 +0000 Subject: [issue35344] platform: get macOS version rather than darwin version In-Reply-To: <1543445701.98.0.788709270274.issue35344@psf.upfronthosting.co.za> Message-ID: <1544047107.54.0.788709270274.issue35344@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: platform: get macOS version rather than darwin version? -> platform: get macOS version rather than darwin version _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 17:00:27 2018 From: report at bugs.python.org (Dustin Ingram) Date: Wed, 05 Dec 2018 22:00:27 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1544047227.74.0.788709270274.issue31715@psf.upfronthosting.co.za> Change by Dustin Ingram : ---------- nosy: +di _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 17:02:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 22:02:15 +0000 Subject: [issue34738] Distutils: ZIP files don't include directory entries In-Reply-To: <1537364847.56.0.956365154283.issue34738@psf.upfronthosting.co.za> Message-ID: <1544047335.84.0.788709270274.issue34738@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b2742ba5f9ce8a6108202e0645662f2b58da423b by Serhiy Storchaka in branch '2.7': [2.7] bpo-34738: Add directory entries in ZIP files created by distutils. (GH-9419). (GH-10950) https://github.com/python/cpython/commit/b2742ba5f9ce8a6108202e0645662f2b58da423b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 17:03:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 22:03:17 +0000 Subject: [issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function In-Reply-To: <1530786887.48.0.56676864532.issue34052@psf.upfronthosting.co.za> Message-ID: <1544047397.68.0.788709270274.issue34052@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset fdf505000f135df3bdae08697b2a324d8f046768 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-34052: Prevent SQLite functions from setting callbacks on exceptions. (GH-8113). (GH-10946) (GH-10952) https://github.com/python/cpython/commit/fdf505000f135df3bdae08697b2a324d8f046768 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 17:04:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 22:04:23 +0000 Subject: [issue34604] Possible mojibake in pwd.getpwnam and grp.getgrnam In-Reply-To: <1536326094.99.0.56676864532.issue34604@psf.upfronthosting.co.za> Message-ID: <1544047463.82.0.788709270274.issue34604@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3a9b3346b03796d8573c063ab4c2407043609459 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-34604: Use %R because of invisible characters or trailing whitespaces. (GH-9165). (GH-10947) (GH-10954) https://github.com/python/cpython/commit/3a9b3346b03796d8573c063ab4c2407043609459 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 17:04:53 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Dec 2018 22:04:53 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1544047493.23.0.788709270274.issue31715@psf.upfronthosting.co.za> R. David Murray added the comment: We have generally made an exception to the "new feature" rule for mimetypes. That is, we don't really consider a mimetype addition to be a new feature in the sense that our backward compatibility rules mean. It is true that an application could work on x.y.z and break on x.y.z-1, but this isn't because an *API* present in x.y.z is not there in x.y.z-1. is more akin to a bugfix (it threw an exception before, now it works). Think of the absence of the mimetype rule as a bug, rather than its presence as a feature. And yes, this is a policy evolution. This way of looking at mimetypes changes has been in effect for....maybe five years now?...and before that we treated them as features. But then, too, before that we required there be an actual IANA accepted RFC, but that requirement too has had to evolve as mimetype management became more decentralized. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 17:09:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 22:09:34 +0000 Subject: [issue34604] Possible mojibake in pwd.getpwnam and grp.getgrnam In-Reply-To: <1536326094.99.0.56676864532.issue34604@psf.upfronthosting.co.za> Message-ID: <1544047774.4.0.788709270274.issue34604@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 17:10:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 22:10:17 +0000 Subject: [issue34738] Distutils: ZIP files don't include directory entries In-Reply-To: <1537364847.56.0.956365154283.issue34738@psf.upfronthosting.co.za> Message-ID: <1544047817.86.0.788709270274.issue34738@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 Dec 5 17:21:01 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Dec 2018 22:21:01 +0000 Subject: [issue25545] email parsing docs: clarify that only ASCII strings are supported In-Reply-To: <1446561810.16.0.921085816129.issue25545@psf.upfronthosting.co.za> Message-ID: <1544048461.88.0.788709270274.issue25545@psf.upfronthosting.co.za> R. David Murray added the comment: The problem comes from thinking you can parse an arbitrary email message if it is in unicode form. *YOU CANNOT DO THAT* in the general case (ie: non-ascii attachments). That said, the new email package API is designed to facilitate "off label" uses. I would have no problem with the definition of a policy object[*] that was basically "use this to parse messages in unicode form as long as they don't use MIME". As soon as you start parsing MIME headers, the input had better be binary or pure ascii, or the headers *won't make sense*. You break the MIME API contract if you use MIME with a non-ascii unicode string. [*] that policy might be a clone of one of the existing policies and not actually do anything to prevent the input having mime headers...ideally it would, but I just don't want to say it is OK to use the standard email policies to do this and expect it to continue to work in the future. It probably will, but we should not document it that way! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 17:21:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 22:21:43 +0000 Subject: [issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function In-Reply-To: <1530786887.48.0.56676864532.issue34052@psf.upfronthosting.co.za> Message-ID: <1544048503.56.0.788709270274.issue34052@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset fff8fab1ce4af208cd9c6cd84a8be626a1b744d8 by Serhiy Storchaka in branch '2.7': [2.7] bpo-34052: Prevent SQLite functions from setting callbacks on exceptions. (GH-8113). (GH-10946) (GH-10955) https://github.com/python/cpython/commit/fff8fab1ce4af208cd9c6cd84a8be626a1b744d8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 17:21:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 22:21:56 +0000 Subject: [issue35389] Use gnu_get_libc_version() in platform.libc_ver()? In-Reply-To: <1543852933.45.0.788709270274.issue35389@psf.upfronthosting.co.za> Message-ID: <1544048516.88.0.788709270274.issue35389@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 848acf7249b5669d73d70a7cb6e5ab60689cf825 by Victor Stinner in branch 'master': bpo-35389: test.pythoninfo logs platform.libc_ver (GH-10951) https://github.com/python/cpython/commit/848acf7249b5669d73d70a7cb6e5ab60689cf825 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 17:22:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 22:22:06 +0000 Subject: [issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function In-Reply-To: <1530786887.48.0.56676864532.issue34052@psf.upfronthosting.co.za> Message-ID: <1544048526.29.0.788709270274.issue34052@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 Dec 5 17:31:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2018 22:31:39 +0000 Subject: [issue34185] Lib/test/test_bdb.py failed when ran as a script In-Reply-To: <1532196122.3.0.56676864532.issue34185@psf.upfronthosting.co.za> Message-ID: <1544049099.98.0.788709270274.issue34185@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 Dec 5 17:38:30 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Dec 2018 22:38:30 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1544049510.12.0.788709270274.issue34162@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Release peps -- needed for proposed and actual release dates. 3.6 pep-494 3.7 pep-537 3.8 pep-569 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 17:40:10 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Dec 2018 22:40:10 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1544049610.96.0.788709270274.issue34162@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Release peps -- needed for proposed and actual release dates. 3.6 PEP 494 3.7 PEP 537 3.8 PEP 569 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 17:40:46 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Dec 2018 22:40:46 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1544049646.82.0.788709270274.issue34162@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- Removed message: https://bugs.python.org/msg331186 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 17:54:18 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Dec 2018 22:54:18 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1544050458.57.0.788709270274.issue34162@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +10206 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 17:55:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 22:55:41 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1544050541.46.0.788709270274.issue35363@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10207 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 17:58:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 22:58:59 +0000 Subject: [issue35316] test_eintr fails randomly on macOS In-Reply-To: <1543241507.8.0.788709270274.issue35316@psf.upfronthosting.co.za> Message-ID: <1544050739.09.0.788709270274.issue35316@psf.upfronthosting.co.za> STINNER Victor added the comment: I close the issue. @Pablo: You are free to continue to investigate why sometimes test_sleep() is not interrupted by any signal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:00:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 23:00:17 +0000 Subject: [issue35316] test_eintr fails randomly on macOS In-Reply-To: <1543241507.8.0.788709270274.issue35316@psf.upfronthosting.co.za> Message-ID: <1544050817.58.0.788709270274.issue35316@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 Wed Dec 5 18:00:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 23:00:44 +0000 Subject: [issue35316] test_eintr fails randomly on macOS In-Reply-To: <1543241507.8.0.788709270274.issue35316@psf.upfronthosting.co.za> Message-ID: <1544050843.99.0.788709270274.issue35316@psf.upfronthosting.co.za> STINNER Victor added the comment: Note: I just fixed another test_eintr bug on macOS, bpo-35363. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:09:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 23:09:05 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1544051345.9.0.788709270274.issue34172@psf.upfronthosting.co.za> STINNER Victor added the comment: Another example of complex issue related to object lifetime, resources (file descriptors) and multiprocessing: bpo-30966, add SimpleQueue.close(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:17:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 23:17:30 +0000 Subject: [issue35310] select which was interrupted by EINTR isn't re-run if the timeout has passed In-Reply-To: <1543151946.49.0.788709270274.issue35310@psf.upfronthosting.co.za> Message-ID: <1544051850.09.0.788709270274.issue35310@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, the bug should now be fixed in 3.6, 3.7 and master branches. Thanks Brian Maissy for the bug report and thanks Oran Avraham for the fix! I hope that we will understand why I didn't want to add a new functional test ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:18:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 23:18:35 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1544051915.34.0.788709270274.issue35363@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset aa8ae904ad2f576f8e7b38a9a6542d3e9a569be9 by Victor Stinner in branch 'master': bpo-35363: test_eintr runs eintr_tester.py in verbose mode (GH-10965) https://github.com/python/cpython/commit/aa8ae904ad2f576f8e7b38a9a6542d3e9a569be9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:18:41 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 23:18:41 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1544051921.38.0.788709270274.issue35363@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10208 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:18:53 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 23:18:53 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1544051933.83.0.788709270274.issue35363@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10209 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:23:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 23:23:30 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1544052210.38.0.788709270274.issue34172@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10210 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:25:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 23:25:23 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1544052323.73.0.788709270274.issue34172@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10211 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:35:46 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 23:35:46 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1544052946.09.0.788709270274.issue35363@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 0fc3b2fe010e42a8c146fb84924e9fd33c6f4e29 by Miss Islington (bot) in branch '3.7': bpo-35363: test_eintr runs eintr_tester.py in verbose mode (GH-10965) https://github.com/python/cpython/commit/0fc3b2fe010e42a8c146fb84924e9fd33c6f4e29 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:39:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 23:39:16 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1544053156.15.0.788709270274.issue34172@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10212 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:41:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Dec 2018 23:41:43 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1544053303.38.0.788709270274.issue34172@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10213 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:43:41 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Dec 2018 23:43:41 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1544053421.77.0.788709270274.issue35363@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 4699f2aa26b2f8befa77852e0c6fba0b474a2748 by Miss Islington (bot) in branch '3.6': bpo-35363: test_eintr runs eintr_tester.py in verbose mode (GH-10965) https://github.com/python/cpython/commit/4699f2aa26b2f8befa77852e0c6fba0b474a2748 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:56:04 2018 From: report at bugs.python.org (Eryk Sun) Date: Wed, 05 Dec 2018 23:56:04 +0000 Subject: [issue35418] python hung or stuck somtimes randomly on windows server 2008R2 In-Reply-To: <1544014308.03.0.788709270274.issue35418@psf.upfronthosting.co.za> Message-ID: <1544054164.02.0.788709270274.issue35418@psf.upfronthosting.co.za> Eryk Sun added the comment: > This traceback doesn't make sense Enable the installer options for the debug binaries and symbol files. Ensure that this installs the *_d.[exe|dll] debug binaries and also the *.pdb symbol files for the release and debug builds. Run the debug build via python_d.exe to check whether it aborts from a failed assertion. If it still hangs, in Process Explorer open the dialog for Options -> Configure Symbols and add the installation directory of Python 3.7 to the beginning of the "Symbols path". At least now your stack traces should have proper symbols instead of only the names of exported functions, for what that's worth. It's a poor substitute for a [mini]dump file and a debugger. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 19:12:39 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 06 Dec 2018 00:12:39 +0000 Subject: [issue35423] Signal handling machinery still relies on "pending calls". Message-ID: <1544055159.6.0.788709270274.issue35423@psf.upfronthosting.co.za> New submission from Eric Snow : For a while now the signal handling machinery has piggy-backed on ceval's "pending calls" machinery (e.g. Py_AddPendingCall). This is a bit confusing. It also increases the risk with unrelated changes to the pending calls code. ---------- assignee: eric.snow messages: 331196 nosy: eric.snow priority: normal severity: normal stage: needs patch status: open title: Signal handling machinery still relies on "pending calls". type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 19:16:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 00:16:05 +0000 Subject: [issue35423] Signal handling machinery still relies on "pending calls". In-Reply-To: <1544055159.6.0.788709270274.issue35423@psf.upfronthosting.co.za> Message-ID: <1544055365.12.0.788709270274.issue35423@psf.upfronthosting.co.za> STINNER Victor added the comment: In the master branch, the signal handler only uses pending calls to report error on writing into the "wakeup_fd" (fd or socket handle): commit c08177a1ccad2ed0d50898c2731b518c631aed14 Author: Antoine Pitrou Date: Wed Jun 28 23:29:29 2017 +0200 bpo-30703: Improve signal delivery (#2415) ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 19:18:14 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 06 Dec 2018 00:18:14 +0000 Subject: [issue35423] Signal handling machinery still relies on "pending calls". In-Reply-To: <1544055159.6.0.788709270274.issue35423@psf.upfronthosting.co.za> Message-ID: <1544055494.29.0.788709270274.issue35423@psf.upfronthosting.co.za> Change by Eric Snow : ---------- keywords: +patch pull_requests: +10214 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 19:47:37 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Thu, 06 Dec 2018 00:47:37 +0000 Subject: [issue35420] how to migrate a c-extension module to one that supports subinerpreters? In-Reply-To: <1544037399.3.0.788709270274.issue35420@psf.upfronthosting.co.za> Message-ID: <1544057257.59.0.788709270274.issue35420@psf.upfronthosting.co.za> Change by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 19:49:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 00:49:07 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1544057347.89.0.788709270274.issue34172@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3c6b0d967eb4c95e06c4f1beddfca4f6300d92ce by Victor Stinner in branch '3.7': [3.7] Revert "bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-8450) (GH-9676)" (#10968) https://github.com/python/cpython/commit/3c6b0d967eb4c95e06c4f1beddfca4f6300d92ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 19:49:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 00:49:36 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1544057376.98.0.788709270274.issue34172@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset eb38ee052e2273568d0041e969aa851ee44e43ce by Victor Stinner in branch '3.6': [3.6] Revert "bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-8450) (GH-9677)" (GH-10969) https://github.com/python/cpython/commit/eb38ee052e2273568d0041e969aa851ee44e43ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 19:49:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 00:49:44 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1544057384.0.0.788709270274.issue34172@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 358fc87f53cf97a1768d5b1ded08f2a564f9fd85 by Victor Stinner in branch '2.7': Revert "[2.7] bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-9686)" (GH-10970) https://github.com/python/cpython/commit/358fc87f53cf97a1768d5b1ded08f2a564f9fd85 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 19:54:45 2018 From: report at bugs.python.org (Mario Corchero) Date: Thu, 06 Dec 2018 00:54:45 +0000 Subject: [issue3533] mac 10.4 buld of 3.0 --with-pydebug fails no __eprintf In-Reply-To: <1218300371.75.0.851068496859.issue3533@psf.upfronthosting.co.za> Message-ID: <1544057685.96.0.788709270274.issue3533@psf.upfronthosting.co.za> Change by Mario Corchero : ---------- pull_requests: +10215 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 20:00:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 01:00:35 +0000 Subject: [issue35424] multiprocessing.Pool: emit ResourceWarning Message-ID: <1544058034.55.0.788709270274.issue35424@psf.upfronthosting.co.za> New submission from STINNER Victor : Since 2 years, I'm fixing frequently "dangling thread" and "dangling process" warnings on buildbots. These bugs are really hard to reproduce. They usually require to get access to a specific buildbot, simulate a specific workload, and get the proper timing to get the warning. I propose to emit a ResourceWarning in multiprocessing.Pool destructor if the pool has not been cleaned properly. I'm not sure in which cases a warning should be emitted. Attached PR is a WIP implementation. ---------- components: Tests messages: 331201 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: multiprocessing.Pool: emit ResourceWarning versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 20:01:46 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 01:01:46 +0000 Subject: [issue35424] multiprocessing.Pool: emit ResourceWarning In-Reply-To: <1544058034.55.0.788709270274.issue35424@psf.upfronthosting.co.za> Message-ID: <1544058106.58.0.788709270274.issue35424@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10216 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 20:45:20 2018 From: report at bugs.python.org (Cao Hongfu) Date: Thu, 06 Dec 2018 01:45:20 +0000 Subject: [issue35418] python hung or stuck somtimes randomly on windows server 2008R2 In-Reply-To: <1544014308.03.0.788709270274.issue35418@psf.upfronthosting.co.za> Message-ID: <1544060720.72.0.788709270274.issue35418@psf.upfronthosting.co.za> Cao Hongfu added the comment: I tried windows resource manager and found that stuck python process does not have load these three DLL files(or stuck on loading these DLL files): MozartBreathBolo.dll MozartBreathNet.dll MozartBreathProcess.dll. These DLL files were created by our company's supervisory software?I contact the IT guy and disabled it. Now everything is fine. Without the supervisory software, the normal python should allocate only 8MB memeory. THX you guys, and sorry for wasting your time~ ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 20:46:49 2018 From: report at bugs.python.org (Cao Hongfu) Date: Thu, 06 Dec 2018 01:46:49 +0000 Subject: [issue35418] python hung or stuck somtimes randomly on windows server 2008R2 In-Reply-To: <1544014308.03.0.788709270274.issue35418@psf.upfronthosting.co.za> Message-ID: <1544060809.69.0.788709270274.issue35418@psf.upfronthosting.co.za> Change by Cao Hongfu : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 21:53:24 2018 From: report at bugs.python.org (Eryk Sun) Date: Thu, 06 Dec 2018 02:53:24 +0000 Subject: [issue35418] python hung or stuck somtimes randomly on windows server 2008R2 In-Reply-To: <1544014308.03.0.788709270274.issue35418@psf.upfronthosting.co.za> Message-ID: <1544064804.07.0.788709270274.issue35418@psf.upfronthosting.co.za> Eryk Sun added the comment: > I don't see how PyNamespace_New() can call LookupPrivilegeValueA() For the record, in the 3.7.1 release build, `PyNamespace_New + d4` is in enable_symlink (Modules/posixmodule.c), which gets called when the nt (aka posix) module gets initialized. It's the return address for the LookupPrivilegeValueA call: 0:000> u (python37!PyNamespace_New + d4 - 6) l2 python37!enable_symlink+0x42: 00007ffd`e4b9a356 ff153ccd1500 call qword ptr [python37!_imp_LookupPrivilegeValueA (00007ffd`e4cf7098)] 00007ffd`e4b9a35c 85c0 test eax,eax It's just that Cao didn't have the python37.pdb symbol file available in Process Explorer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 00:23:48 2018 From: report at bugs.python.org (Myles Borins) Date: Thu, 06 Dec 2018 05:23:48 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1544073828.95.0.788709270274.issue31715@psf.upfronthosting.co.za> Change by Myles Borins : ---------- pull_requests: +10217 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 00:23:57 2018 From: report at bugs.python.org (Myles Borins) Date: Thu, 06 Dec 2018 05:23:57 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1544073837.43.0.788709270274.issue31715@psf.upfronthosting.co.za> Change by Myles Borins : ---------- pull_requests: +10218 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 00:24:04 2018 From: report at bugs.python.org (Myles Borins) Date: Thu, 06 Dec 2018 05:24:04 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1544073844.52.0.788709270274.issue31715@psf.upfronthosting.co.za> Change by Myles Borins : ---------- pull_requests: +10219 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 00:25:39 2018 From: report at bugs.python.org (Myles Borins) Date: Thu, 06 Dec 2018 05:25:39 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1544073939.46.0.788709270274.issue31715@psf.upfronthosting.co.za> Myles Borins added the comment: Thanks for chiming in R. David Murray > Think of the absence of the mimetype rule as a bug, rather than its presence as a feature. Very much appreciate this sentiment. I've opened backports to simplify the process if y'all decide to approve. 2.7: https://github.com/python/cpython/pull/10978 3.6: https://github.com/python/cpython/pull/10976 3.7: https://github.com/python/cpython/pull/10977 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 00:42:59 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 06 Dec 2018 05:42:59 +0000 Subject: [issue35422] misleading error message from ssl.get_server_certificate() when bad port In-Reply-To: <1544045072.3.0.788709270274.issue35422@psf.upfronthosting.co.za> Message-ID: <1544074979.45.0.788709270274.issue35422@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Note this is just the error that OpenSSL produces. There isn't a whole Python can do to change it. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 00:46:25 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Dec 2018 05:46:25 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1544075185.15.0.788709270274.issue34162@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 6ea9d54dea9f2f8be7fe6d284064c579331388a9 by Terry Jan Reedy in branch 'master': bpo-34162: Update idlelib NEWS to 2018-12-05. (GH-10964) https://github.com/python/cpython/commit/6ea9d54dea9f2f8be7fe6d284064c579331388a9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 00:52:42 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Dec 2018 05:52:42 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1544075562.38.0.788709270274.issue34162@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +10220 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 00:53:24 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Dec 2018 05:53:24 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1544075604.77.0.788709270274.issue34162@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +10221 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 02:04:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Dec 2018 07:04:38 +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: <1544079878.66.0.788709270274.issue33709@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8752dfbd1f0c96ca09cdacabaf0d0f8c3895b6ce by Serhiy Storchaka (native-api) in branch 'master': bpo-33709: test_ntpath and test_posixpath fail in Windows with ACP!=1252. (GH-7278) https://github.com/python/cpython/commit/8752dfbd1f0c96ca09cdacabaf0d0f8c3895b6ce ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 02:05:12 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 07:05:12 +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: <1544079912.87.0.788709270274.issue33709@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10222 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 02:05:26 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 07:05:26 +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: <1544079926.34.0.788709270274.issue33709@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10223 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 02:22:20 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 07:22:20 +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: <1544080940.25.0.788709270274.issue33709@psf.upfronthosting.co.za> miss-islington added the comment: New changeset b1438c0d376e1d438a11927e2698e3317da0d854 by Miss Islington (bot) in branch '3.7': bpo-33709: test_ntpath and test_posixpath fail in Windows with ACP!=1252. (GH-7278) https://github.com/python/cpython/commit/b1438c0d376e1d438a11927e2698e3317da0d854 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 02:26:53 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 07:26:53 +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: <1544081213.83.0.788709270274.issue33709@psf.upfronthosting.co.za> miss-islington added the comment: New changeset af31228650d30f02a283d291ba106e84275a04c1 by Miss Islington (bot) in branch '3.6': bpo-33709: test_ntpath and test_posixpath fail in Windows with ACP!=1252. (GH-7278) https://github.com/python/cpython/commit/af31228650d30f02a283d291ba106e84275a04c1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 02:51:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 07:51:53 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1544082713.61.0.788709270274.issue34172@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 9dfc754d61c55a526304e10a328bad448efa9ee9 by Victor Stinner in branch 'master': Revert "bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-8450)" (GH-10971) https://github.com/python/cpython/commit/9dfc754d61c55a526304e10a328bad448efa9ee9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 03:25:42 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Dec 2018 08:25:42 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1544084742.67.0.788709270274.issue34162@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset de8037db8c203ca0a1bf549f690230d5e7b8429e by Terry Jan Reedy in branch '3.7': [3.7] bpo-34162: Update idlelib NEWS to 2018-12-05 (GH-10964) (GH-10980) https://github.com/python/cpython/commit/de8037db8c203ca0a1bf549f690230d5e7b8429e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 03:25:59 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Dec 2018 08:25:59 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1544084759.39.0.788709270274.issue34162@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset af1f977575331623547d53247d99be8953a13b9f by Terry Jan Reedy in branch '3.6': [3.6] bpo-34162: Update idlelib NEWS to 2018-12-05 (GH-10964) (GH-10979) https://github.com/python/cpython/commit/af1f977575331623547d53247d99be8953a13b9f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 04:16:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Dec 2018 09:16:29 +0000 Subject: [issue35384] The repr of ctypes.CArgObject fails for non-ascii character In-Reply-To: <1543834348.49.0.788709270274.issue35384@psf.upfronthosting.co.za> Message-ID: <1544087789.72.0.788709270274.issue35384@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3ffa8b9ba190101f674a0e524e482a83ed09cccd by Serhiy Storchaka in branch 'master': bpo-35384: The repr of ctypes.CArgObject no longer fails for non-ascii character. (GH-10863) https://github.com/python/cpython/commit/3ffa8b9ba190101f674a0e524e482a83ed09cccd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 04:16:39 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 09:16:39 +0000 Subject: [issue35384] The repr of ctypes.CArgObject fails for non-ascii character In-Reply-To: <1543834348.49.0.788709270274.issue35384@psf.upfronthosting.co.za> Message-ID: <1544087799.55.0.788709270274.issue35384@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10224 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 04:16:49 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 09:16:49 +0000 Subject: [issue35384] The repr of ctypes.CArgObject fails for non-ascii character In-Reply-To: <1543834348.49.0.788709270274.issue35384@psf.upfronthosting.co.za> Message-ID: <1544087809.97.0.788709270274.issue35384@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10225 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 04:31:39 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 06 Dec 2018 09:31:39 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1544088699.81.0.788709270274.issue35378@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Let's step back a bit here. This kind of code has never been supported. As Victor says, we should be careful not to add any potential sources of reference cycles. The reason the code originally "worked" is that it actually leaked the Pool object (and presumably its worker threads and processes) until the end of the application. ---------- type: -> behavior versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 04:36:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Dec 2018 09:36:19 +0000 Subject: [issue30835] AttributeError when parsing multipart email with invalid non-decodable Content-Transfer-Encoding In-Reply-To: <1499089023.06.0.76757916564.issue30835@psf.upfronthosting.co.za> Message-ID: <1544088979.93.0.788709270274.issue30835@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- stage: -> test needed versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 04:40:49 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 09:40:49 +0000 Subject: [issue35384] The repr of ctypes.CArgObject fails for non-ascii character In-Reply-To: <1543834348.49.0.788709270274.issue35384@psf.upfronthosting.co.za> Message-ID: <1544089249.45.0.788709270274.issue35384@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10226 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 04:41:18 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 09:41:18 +0000 Subject: [issue35384] The repr of ctypes.CArgObject fails for non-ascii character In-Reply-To: <1543834348.49.0.788709270274.issue35384@psf.upfronthosting.co.za> Message-ID: <1544089278.84.0.788709270274.issue35384@psf.upfronthosting.co.za> miss-islington added the comment: New changeset f9d8b686285926c985cfe88a8392a9a497c0a916 by Miss Islington (bot) in branch '3.6': bpo-35384: The repr of ctypes.CArgObject no longer fails for non-ascii character. (GH-10863) https://github.com/python/cpython/commit/f9d8b686285926c985cfe88a8392a9a497c0a916 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 04:42:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 09:42:04 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1544089324.47.0.788709270274.issue34172@psf.upfronthosting.co.za> STINNER Victor added the comment: I reverted the change in 2.7, 3.6, 3.7 and master branches because it introduces a regression and we are very close to a release: https://mail.python.org/pipermail/python-dev/2018-December/155920.html I don't want to have the pressure to push a quick fix. I would like to make sure that we have enough time to design a proper fix. I'm not saying that Pablo's fix is not correct, it's just bad timing. This bug is likely here for a long time, so I think that it's ok to still have it in the next 3.6 and 3.7 bugfix releases. I suggest to open a discussion on the python-dev mailing list about multiprocessing relying on the garbage collector and lifetime of multiprocessing objects (Pool, Process, result, etc.). It seems like I disagree with Pablo and tzickel, whereas Armin Rigo (PyPy which has a different GC) is more on my side (release explicitly resources) :-) I would prefer to move towards explicit resource managment instead of relying on destructors and the garbage collector. For example, it's a bad practice to rely on these when using PyPy. See my previous comments about issues related to multiprocessing objects lifetime. ---------- priority: release blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 04:43:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Dec 2018 09:43:39 +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: <1544089419.39.0.788709270274.issue33709@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 29a4cbff92862207eb9df9a970b3636b8b06ff5d by Serhiy Storchaka (native-api) in branch '2.7': [2.7] bpo-33709: test_ntpath and test_posixpath fail in Windows with ACP!=1252. (GH-7278) (GH-7279) https://github.com/python/cpython/commit/29a4cbff92862207eb9df9a970b3636b8b06ff5d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 04:44:08 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 06 Dec 2018 09:44:08 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1544089448.13.0.788709270274.issue34172@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I agree that reverting in bugfix branches was the right thing to do. I think the fix should have remained in master, though. ---------- stage: patch review -> versions: -Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 04:52:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Dec 2018 09:52:10 +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: <1544089930.78.0.788709270274.issue33709@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 Dec 6 04:58:30 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 09:58:30 +0000 Subject: [issue35384] The repr of ctypes.CArgObject fails for non-ascii character In-Reply-To: <1543834348.49.0.788709270274.issue35384@psf.upfronthosting.co.za> Message-ID: <1544090310.54.0.788709270274.issue35384@psf.upfronthosting.co.za> miss-islington added the comment: New changeset f740818f3d92497c564d515a661039dc8434fc6c by Miss Islington (bot) in branch '3.7': bpo-35384: The repr of ctypes.CArgObject no longer fails for non-ascii character. (GH-10863) https://github.com/python/cpython/commit/f740818f3d92497c564d515a661039dc8434fc6c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 05:07:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Dec 2018 10:07:10 +0000 Subject: [issue35384] The repr of ctypes.CArgObject fails for non-ascii character In-Reply-To: <1543834348.49.0.788709270274.issue35384@psf.upfronthosting.co.za> Message-ID: <1544090830.59.0.788709270274.issue35384@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 Dec 6 05:26:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 10:26:09 +0000 Subject: [issue35424] multiprocessing.Pool: emit ResourceWarning In-Reply-To: <1544058034.55.0.788709270274.issue35424@psf.upfronthosting.co.za> Message-ID: <1544091969.02.0.788709270274.issue35424@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10227 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 05:26:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 10:26:45 +0000 Subject: [issue35424] multiprocessing.Pool: emit ResourceWarning In-Reply-To: <1544058034.55.0.788709270274.issue35424@psf.upfronthosting.co.za> Message-ID: <1544092005.29.0.788709270274.issue35424@psf.upfronthosting.co.za> STINNER Victor added the comment: While testing PR 10974, I found two tests which emits ResourceWarning. I wrote 10986 to fix them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 05:29:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 10:29:58 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1544092198.04.0.788709270274.issue34172@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-35424: "multiprocessing.Pool: emit ResourceWarning". I wrote 10986 to fix 2 tests which leak resources. I have a question. Why do tests have to call "pool.join()" after "with pool:"? When I use a file, I know that the resources are released after "with file:". Should Pool.__exit__() call Pool.join()? This question reminds me my fix in socketserver (bpo-31151 and bpo-31233) which leaked processes and threads, and my bug bpo-34037 (asyncio leaks threads). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 05:56:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 10:56:05 +0000 Subject: [issue35359] [2.7][Windows] Define _CRT_SECURE_NO_WARNINGS to build Modules\zlib\ In-Reply-To: <1543579076.36.0.788709270274.issue35359@psf.upfronthosting.co.za> Message-ID: <1544093765.51.0.788709270274.issue35359@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 49cedc51a68b4cd2525c14ab02bd1a483d8be389 by Victor Stinner in branch '2.7': bpo-35359: Add _CRT_SECURE_NO_WARNINGS to pythoncore project (GH-10819) https://github.com/python/cpython/commit/49cedc51a68b4cd2525c14ab02bd1a483d8be389 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 05:56:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 10:56:54 +0000 Subject: [issue35424] multiprocessing.Pool: emit ResourceWarning In-Reply-To: <1544058034.55.0.788709270274.issue35424@psf.upfronthosting.co.za> Message-ID: <1544093814.31.0.788709270274.issue35424@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 388c8c208d9d09bd28289c1e4776b947d4d0f0f0 by Victor Stinner in branch 'master': bpo-35424: test_multiprocessing: join 3 pools (GH-10986) https://github.com/python/cpython/commit/388c8c208d9d09bd28289c1e4776b947d4d0f0f0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 05:57:07 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 10:57:07 +0000 Subject: [issue35424] multiprocessing.Pool: emit ResourceWarning In-Reply-To: <1544058034.55.0.788709270274.issue35424@psf.upfronthosting.co.za> Message-ID: <1544093827.22.0.788709270274.issue35424@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10228 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 05:57:16 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 10:57:16 +0000 Subject: [issue35424] multiprocessing.Pool: emit ResourceWarning In-Reply-To: <1544058034.55.0.788709270274.issue35424@psf.upfronthosting.co.za> Message-ID: <1544093836.31.0.788709270274.issue35424@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10229 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 05:58:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 10:58:55 +0000 Subject: [issue35359] [2.7][Windows] Define _CRT_SECURE_NO_WARNINGS to build Modules\zlib\ In-Reply-To: <1543579076.36.0.788709270274.issue35359@psf.upfronthosting.co.za> Message-ID: <1544093935.69.0.788709270274.issue35359@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 Dec 6 06:12:08 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 06 Dec 2018 11:12:08 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1544094728.75.0.788709270274.issue35378@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Although I think keeping the iterator is not a bad solution if done correctly, I think more and more that is not the best solution. @Antoine, would you be ok passing a weak reference to the iterator and raising if the pool is dead? I still think we should try to avoid hanging. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 06:16:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 11:16:24 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1544094984.15.0.788709270274.issue35378@psf.upfronthosting.co.za> STINNER Victor added the comment: In general, I'm fine with adding a *weak* reference, especially if it helps to detect bugs. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 06:17:38 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 06 Dec 2018 11:17:38 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1544095058.86.0.788709270274.issue35378@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think a weakref is fine. You don't have to *pass* a weakref: just pass a normal ref and let the Result object take a weakref (and a reference to the cache perhaps). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 06:17:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 11:17:43 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1544095063.9.0.788709270274.issue35378@psf.upfronthosting.co.za> STINNER Victor added the comment: See https://bugs.python.org/issue34172#msg331216 for a more general discussion about how the multiprocessing API is supposed tobe used and multiprocessing objects lifetime. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 06:17:48 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 06 Dec 2018 11:17:48 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1544095068.67.0.788709270274.issue35378@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Ok, I will modify my PR to pass a weak reference and raise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 06:18:27 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 06 Dec 2018 11:18:27 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1544095107.93.0.788709270274.issue35378@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I agree about making the multiprocessing API safer to use, but please let's have this discussion on a dedicated bug entry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 06:20:54 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 11:20:54 +0000 Subject: [issue35424] multiprocessing.Pool: emit ResourceWarning In-Reply-To: <1544058034.55.0.788709270274.issue35424@psf.upfronthosting.co.za> Message-ID: <1544095254.93.0.788709270274.issue35424@psf.upfronthosting.co.za> miss-islington added the comment: New changeset b7c67c4d510a7a72a35983cc168dbb2ce796cb8c by Miss Islington (bot) in branch '3.7': bpo-35424: test_multiprocessing: join 3 pools (GH-10986) https://github.com/python/cpython/commit/b7c67c4d510a7a72a35983cc168dbb2ce796cb8c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 06:23:22 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 11:23:22 +0000 Subject: [issue35424] multiprocessing.Pool: emit ResourceWarning In-Reply-To: <1544058034.55.0.788709270274.issue35424@psf.upfronthosting.co.za> Message-ID: <1544095402.23.0.788709270274.issue35424@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e44b5b2afa6fe2966d8caff45e36c0980413bb86 by Miss Islington (bot) in branch '3.6': bpo-35424: test_multiprocessing: join 3 pools (GH-10986) https://github.com/python/cpython/commit/e44b5b2afa6fe2966d8caff45e36c0980413bb86 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 07:23:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 12:23:33 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1544099013.95.0.788709270274.issue35363@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10230 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 07:28:28 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 12:28:28 +0000 Subject: [issue35425] test_eintr fails randomly on AMD64 FreeBSD 10-STABLE Non-Debug 3.7: TypeError: 'int' object is not callable Message-ID: <1544099308.26.0.788709270274.issue35425@psf.upfronthosting.co.za> New submission from STINNER Victor : I don't understand the error, it doesn't make sense. It *seems* like faulthandler.cancel_dump_traceback_later attribute has been set to an int, but I don't see how it could be possible. Or the call raises the TypeError? But the call can be summarized to: Py_CLEAR(thread.file); and I don't see how Py_CLEAR() can trigger a TypeError. https://buildbot.python.org/all/#/builders/170/builds/175 ERROR: test_sigwaitinfo (__main__.SignalEINTRTest) Traceback (most recent call last): File "/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/test/eintrdata/eintr_tester.py", line 71, in tearDown faulthandler.cancel_dump_traceback_later() TypeError: 'int' object is not callable ---------- components: Tests messages: 331232 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: test_eintr fails randomly on AMD64 FreeBSD 10-STABLE Non-Debug 3.7: TypeError: 'int' object is not callable versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 07:30:52 2018 From: report at bugs.python.org (Roundup Robot) Date: Thu, 06 Dec 2018 12:30:52 +0000 Subject: [issue33127] Python 2.7.14 won't build ssl module with Libressl 2.7.0 In-Reply-To: <1521831698.99.0.467229070634.issue33127@psf.upfronthosting.co.za> Message-ID: <1544099452.11.0.788709270274.issue33127@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +10231 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 07:36:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 12:36:00 +0000 Subject: [issue35426] test_signal.test_interprocess_signal() race condition Message-ID: <1544099760.1.0.788709270274.issue35426@psf.upfronthosting.co.za> New submission from STINNER Victor : test_signal.test_interprocess_signal() has a race condition: with self.subprocess_send_signal(pid, "SIGUSR1") as child: # here self.wait_signal(child, 'SIGUSR1', SIGUSR1Exception) The test only except SIGUSR1Exception inside wait_signal(), but the signal can be sent during subprocess_send_signal() call. assertRaises(SIGUSR1Exception) should surround these two lines instead. wait_signal() shouldn't handle the signal. Or wait_signal() should call subprocess_send_signal(). It seems like Python 2.7 has the proper design. It might be a regression introduced by myself in: commit 32eb840a42ec0e131daac48d43aa35290e72571e Author: Victor Stinner Date: Tue Mar 15 11:12:35 2016 +0100 Issue #26566: Rewrite test_signal.InterProcessSignalTests * Add Lib/test/signalinterproctester.py * Don't disable the garbage collector anymore * Don't use os.fork() with a subprocess to not inherit existing signal handlers or threads: start from a fresh process * Don't use UNIX kill command to send a signal but Python os.kill() * Use a timeout of 10 seconds to wait for the signal instead of 1 second * Always use signal.pause(), instead of time.wait(1), to wait for a signal * Use context manager on subprocess.Popen * remove code to retry on EINTR: it's no more needed since the PEP 475 * remove unused function exit_subprocess() * Cleanup the code FAIL: test_interprocess_signal (test.test_signal.PosixTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/test/test_signal.py", line 62, in test_interprocess_signal assert_python_ok(script) File "/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/test/support/script_helper.py", line 157, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/test/support/script_helper.py", line 143, in _assert_python res.fail(cmd_line) File "/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/test/support/script_helper.py", line 84, in fail err)) AssertionError: Process return code is 1 command line: ['/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/python', '-X', 'faulthandler', '-I', '/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/test/signalinterproctester.py'] stdout: --- --- stderr: --- E/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/subprocess.py:858: ResourceWarning: subprocess 64567 is still running ResourceWarning, source=self) ResourceWarning: Enable tracemalloc to get the object allocation traceback ====================================================================== ERROR: test_interprocess_signal (__main__.InterProcessSignalTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/test/signalinterproctester.py", line 68, in test_interprocess_signal with self.subprocess_send_signal(pid, "SIGUSR1") as child: File "/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/test/signalinterproctester.py", line 50, in subprocess_send_signal return subprocess.Popen(args) File "/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/subprocess.py", line 775, in __init__ restore_signals, start_new_session) File "/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/subprocess.py", line 1476, in _execute_child part = os.read(errpipe_read, 50000) File "/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/test/signalinterproctester.py", line 22, in sigusr1_handler raise SIGUSR1Exception SIGUSR1Exception ---------------------------------------------------------------------- Ran 1 test in 0.223s FAILED (errors=1) --- ---------------------------------------------------------------------- Ran 43 tests in 31.872s FAILED (failures=1, skipped=2) test test_signal failed ---------- components: Tests messages: 331233 nosy: vstinner priority: normal severity: normal status: open title: test_signal.test_interprocess_signal() race condition versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 08:16:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 13:16:25 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1544102185.42.0.788709270274.issue35363@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0644b33821b70efbf0ac1ec1fb8729b05796564a by Victor Stinner in branch 'master': bpo-35363: test_eintr uses print(flush=True) (GH-10990) https://github.com/python/cpython/commit/0644b33821b70efbf0ac1ec1fb8729b05796564a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 08:16:46 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 13:16:46 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1544102206.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10232 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 08:16:58 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 13:16:58 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1544102218.15.0.788709270274.issue35363@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10233 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 08:35:03 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 13:35:03 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1544103303.55.0.788709270274.issue35363@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 560fa4db17983ce37c1453c057901c627b2c3abc by Miss Islington (bot) in branch '3.7': bpo-35363: test_eintr uses print(flush=True) (GH-10990) https://github.com/python/cpython/commit/560fa4db17983ce37c1453c057901c627b2c3abc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 08:40:34 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 13:40:34 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1544103634.46.0.788709270274.issue35363@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3f0e8e225e2275d22c4bd2e8f8f212b6a8b849aa by Miss Islington (bot) in branch '3.6': bpo-35363: test_eintr uses print(flush=True) (GH-10990) https://github.com/python/cpython/commit/3f0e8e225e2275d22c4bd2e8f8f212b6a8b849aa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 08:42:40 2018 From: report at bugs.python.org (Mario Corchero) Date: Thu, 06 Dec 2018 13:42:40 +0000 Subject: [issue35330] When using mock to wrap an existing object, side_effect requires return_value In-Reply-To: <1543339599.43.0.788709270274.issue35330@psf.upfronthosting.co.za> Message-ID: <1544103760.5.0.788709270274.issue35330@psf.upfronthosting.co.za> Change by Mario Corchero : ---------- keywords: +patch pull_requests: +10234 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 09:11:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2018 14:11:12 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1544105472.09.0.788709270274.issue35363@psf.upfronthosting.co.za> STINNER Victor added the comment: Follow-up: bpo-35425, "test_eintr fails randomly on AMD64 FreeBSD 10-STABLE Non-Debug 3.7: TypeError: 'int' object is not callable". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 10:06:00 2018 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 06 Dec 2018 15:06:00 +0000 Subject: [issue34987] A possible null pointer dereference in _pickle.c's save_reduce() In-Reply-To: <1539585850.77.0.788709270274.issue34987@psf.upfronthosting.co.za> Message-ID: <1544108760.57.0.788709270274.issue34987@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 10:37:46 2018 From: report at bugs.python.org (Roundup Robot) Date: Thu, 06 Dec 2018 15:37:46 +0000 Subject: [issue33127] Python 2.7.14 won't build ssl module with Libressl 2.7.0 In-Reply-To: <1521831698.99.0.467229070634.issue33127@psf.upfronthosting.co.za> Message-ID: <1544110666.95.0.788709270274.issue33127@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +10235 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 11:39:34 2018 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 06 Dec 2018 16:39:34 +0000 Subject: [issue35427] logging UnicodeDecodeError from undecodable strftime output Message-ID: <1544114374.69.0.788709270274.issue35427@psf.upfronthosting.co.za> New submission from Mark Dickinson : We're seeing UnicodeDecodeErrors on Windows / Python 2.7 when using logging on a Japanese customer machine. The cause turns out to be in the log record formatting, where unicode fields are combined with non-decodable bytestrings coming from strftime. More details: we were using the following formatter: _LOG_FORMATTER = logging.Formatter( "%(asctime)s %(levelname)s:%(name)s:%(message)s", datefmt="%Y-%m-%dT%H:%M:%S%Z", ) In the logging internals, that `datefmt` gets passed to `time.strftime`, which on the machine in question produced a non-ASCII bytestring (i.e., type `str`). When combined with other Unicode strings in the log record, this gave the `UnicodeDecodeError`. I'm unfortunately failing to reproduce this directly on my own macOS / UK locale machine, but it's documented that `time.strftime` returns a value encoded according to the current locale. In this particular case, the output we were getting from the `time.strftime` call looked like: "2018-12-06T23:57:14\x93\x8c\x8b\x9e (\x95W\x8f\x80\x8e\x9e)" which assuming an encoding of cp932 decodes to something plausible: >>> s.decode("cp932") u'2018-12-06T23:57:14\u6771\u4eac (\u6a19\u6e96\u6642)' >>> print(s.decode("cp932")) 2018-12-06T23:57:14?? (???) It looks as though the logging module should be explicitly decoding the strftime output before doing formatting, using for example what's recommended in the strftime documentation [1]: strftime().decode(locale.getlocale()[1]) Code links: this is the line that's producing non-decodable bytes: https://github.com/python/cpython/blob/49cedc51a68b4cd2525c14ab02bd1a483d8be389/Lib/logging/__init__.py#L425 ... and this is the formatting operation that then ends up raising UnicodeDecodeError as a result of those: https://github.com/python/cpython/blob/49cedc51a68b4cd2525c14ab02bd1a483d8be389/Lib/logging/__init__.py#L469 This isn't an issue on Python 3, and I was unable to reproduce it on my non-Windows machine; that particular form of strftime output may well be specific to Windows (or possibly even specific to Japanese flavours of Windows). [1] https://docs.python.org/2/library/time.html#time.strftime ---------- components: Library (Lib) messages: 331238 nosy: mark.dickinson priority: normal severity: normal status: open title: logging UnicodeDecodeError from undecodable strftime output type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 11:54:24 2018 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 06 Dec 2018 16:54:24 +0000 Subject: [issue35427] logging UnicodeDecodeError from undecodable strftime output In-Reply-To: <1544114374.69.0.788709270274.issue35427@psf.upfronthosting.co.za> Message-ID: <1544115264.62.0.788709270274.issue35427@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a bug report from someone else running into the same issue on Scrapy; looks like they worked around the issue by simply removing the timezone information from the `datefmt` (which is what we ended up doing, too): https://github.com/scrapy/scrapy/issues/1270 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 12:00:16 2018 From: report at bugs.python.org (Roundup Robot) Date: Thu, 06 Dec 2018 17:00:16 +0000 Subject: [issue26415] Excessive peak memory consumption by the Python parser In-Reply-To: <1456182380.09.0.81920177296.issue26415@psf.upfronthosting.co.za> Message-ID: <1544115616.66.0.788709270274.issue26415@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +10236 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 12:34:00 2018 From: report at bugs.python.org (A. Skrobov) Date: Thu, 06 Dec 2018 17:34:00 +0000 Subject: [issue26415] Excessive peak memory consumption by the Python parser In-Reply-To: <1456182380.09.0.81920177296.issue26415@psf.upfronthosting.co.za> Message-ID: <1544117640.51.0.788709270274.issue26415@psf.upfronthosting.co.za> A. Skrobov added the comment: @Serhiy: incredibly, this patch from 2.5 years ago required very minor changes to apply to the latest master. Shows how ossified the parser is :-) Now posted as https://github.com/python/cpython/pull/10995 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 12:52:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Dec 2018 17:52:52 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544118772.59.0.788709270274.issue22005@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: NumPy starves from the same issue. In NumPy this problem was solved by requiring encoding='latin1' passed to unpickler. It makes sense to use the same approach for datetime classes. ---------- versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 13:08:42 2018 From: report at bugs.python.org (EZ) Date: Thu, 06 Dec 2018 18:08:42 +0000 Subject: [issue35428] xml.etree.ElementTree.tostring violates W3 standards allowing encoding='unicode' without error Message-ID: <1544119722.12.0.788709270274.issue35428@psf.upfronthosting.co.za> New submission from EZ : The documentation[0] for 3.x of xml.etree.ElementTree.tostring is quite clear: > Use encoding="unicode" to generate a Unicode string. See also the creation of the problem: https://bugs.python.org/issue10942 This is a violation of W3 standards, referenced by the ElementTree documentation[1] claiming it must conform to these standards, which state: ...it is a fatal error for an entity including an encoding declaration to be presented to the XML processor in an encoding other than that named in the declaration.... Encoding for 'unicode' does not appear in the named declarations (https://www.iana.org/assignments/character-sets/character-sets.xhtml) referenced by the same documentation[1]. Handling of a fatal error, must, in part: Once a fatal error is detected, however, the processor MUST NOT continue normal processing (i.e., it MUST NOT continue to pass character data and information about the document's logical structure to the application in the normal way) [0] https://docs.python.org/3.2/library/xml.etree.elementtree.html [1] The encoding string included in XML output should conform to the appropriate standards. For example, ?UTF-8? is valid, but ?UTF8? is not. See http://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl and http://www.iana.org/assignments/character-sets. ---------- components: XML messages: 331242 nosy: Zim priority: normal severity: normal status: open title: xml.etree.ElementTree.tostring violates W3 standards allowing encoding='unicode' without error 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 Thu Dec 6 14:21:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Dec 2018 19:21:11 +0000 Subject: [issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting. In-Reply-To: <1543961289.76.0.788709270274.issue35411@psf.upfronthosting.co.za> Message-ID: <1544124071.31.0.788709270274.issue35411@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: test_urllib2net still fails on Travis CI. See for example https://api.travis-ci.org/v3/job/464509821/log.txt. ---------- nosy: +benjamin.peterson, ned.deily, serhiy.storchaka priority: normal -> release blocker status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 15:01:58 2018 From: report at bugs.python.org (Roman Yurchak) Date: Thu, 06 Dec 2018 20:01:58 +0000 Subject: [issue35429] Incorrect use of raise NotImplemented Message-ID: <1544126518.18.0.788709270274.issue35429@psf.upfronthosting.co.za> New submission from Roman Yurchak : In two places in stdlib, `raise NotImplemented` is used instead of `raise NotImplementedError`. The former is not valid and produces, ``` >>> raise NotImplemented('message') Traceback (most recent call last): File "", line 1, in TypeError: 'NotImplementedType' object is not callable ``` ---------- components: Library (Lib) messages: 331244 nosy: rth priority: normal severity: normal status: open title: Incorrect use of raise NotImplemented versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 15:08:48 2018 From: report at bugs.python.org (Roman Yurchak) Date: Thu, 06 Dec 2018 20:08:48 +0000 Subject: [issue35429] Incorrect use of raise NotImplemented In-Reply-To: <1544126518.18.0.788709270274.issue35429@psf.upfronthosting.co.za> Message-ID: <1544126928.45.0.788709270274.issue35429@psf.upfronthosting.co.za> Change by Roman Yurchak : ---------- keywords: +patch pull_requests: +10237 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 15:27:58 2018 From: report at bugs.python.org (Roman Yurchak) Date: Thu, 06 Dec 2018 20:27:58 +0000 Subject: [issue35430] Lib/argparse.py uses `is` for string comparison Message-ID: <1544128078.84.0.788709270274.issue35430@psf.upfronthosting.co.za> New submission from Roman Yurchak : Lib/argparse.py uses `is` for string comparison, ` 221: if self.heading is not SUPPRESS and self.heading is not None: 247: if text is not SUPPRESS and text is not None: 251: if usage is not SUPPRESS: 256: if action.help is not SUPPRESS: 290: if part and part is not SUPPRESS]) 679: if action.default is not SUPPRESS: 1130: if self.dest is not SUPPRESS: 1766: if action.dest is not SUPPRESS: 1768: if action.default is not SUPPRESS: 1851: if argument_values is not SUPPRESS: 2026: if action.help is not SUPPRESS] ` where `SUPPRESS = '==SUPPRESS=='`. Unless I'm missing something this can produce false negatives if the variable that we compare against is a slice from another string. Using equality is probably safer in any case. Detected with LGTM.com analysis. ---------- components: Library (Lib) messages: 331246 nosy: rth priority: normal severity: normal status: open title: Lib/argparse.py uses `is` for string comparison versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 15:37:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Dec 2018 20:37:03 +0000 Subject: [issue33023] Unable to copy ssl.SSLContext In-Reply-To: <1520489361.61.0.467229070634.issue33023@psf.upfronthosting.co.za> Message-ID: <1544128623.58.0.788709270274.issue33023@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 42b1d6127bd8595522a78a75166ebb9fba74a6a2 by Serhiy Storchaka in branch 'master': bpo-33023: Fix NotImplemented to NotImplementedError. (GH-10934) https://github.com/python/cpython/commit/42b1d6127bd8595522a78a75166ebb9fba74a6a2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 15:37:15 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 20:37:15 +0000 Subject: [issue33023] Unable to copy ssl.SSLContext In-Reply-To: <1520489361.61.0.467229070634.issue33023@psf.upfronthosting.co.za> Message-ID: <1544128635.04.0.788709270274.issue33023@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10239 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 15:43:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Dec 2018 20:43:02 +0000 Subject: [issue33023] Unable to copy ssl.SSLContext In-Reply-To: <1520489361.61.0.467229070634.issue33023@psf.upfronthosting.co.za> Message-ID: <1544128982.31.0.788709270274.issue33023@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10240 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 15:46:46 2018 From: report at bugs.python.org (Roman Yurchak) Date: Thu, 06 Dec 2018 20:46:46 +0000 Subject: [issue35430] Lib/argparse.py uses `is` for string comparison In-Reply-To: <1544128078.84.0.788709270274.issue35430@psf.upfronthosting.co.za> Message-ID: <1544129206.85.0.788709270274.issue35430@psf.upfronthosting.co.za> Change by Roman Yurchak : ---------- keywords: +patch pull_requests: +10241 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 15:52:46 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Dec 2018 20:52:46 +0000 Subject: [issue33023] Unable to copy ssl.SSLContext In-Reply-To: <1520489361.61.0.467229070634.issue33023@psf.upfronthosting.co.za> Message-ID: <1544129566.97.0.788709270274.issue33023@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6485aa6eb1024672f08afdd577e2b5792eb6b03c by Miss Islington (bot) in branch '3.7': bpo-33023: Fix NotImplemented to NotImplementedError. (GH-10934) https://github.com/python/cpython/commit/6485aa6eb1024672f08afdd577e2b5792eb6b03c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 16:00:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Dec 2018 21:00:41 +0000 Subject: [issue33023] Unable to copy ssl.SSLContext In-Reply-To: <1520489361.61.0.467229070634.issue33023@psf.upfronthosting.co.za> Message-ID: <1544130041.48.0.788709270274.issue33023@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 7a2cf1e7d3bf300e98c702589d405734f4a8fcf8 by Serhiy Storchaka in branch '3.6': bpo-33023: Fix NotImplemented to NotImplementedError. (GH-10934). (GH-11001) https://github.com/python/cpython/commit/7a2cf1e7d3bf300e98c702589d405734f4a8fcf8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 16:12:27 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Thu, 06 Dec 2018 21:12:27 +0000 Subject: [issue35430] Lib/argparse.py uses `is` for string comparison In-Reply-To: <1544128078.84.0.788709270274.issue35430@psf.upfronthosting.co.za> Message-ID: <1544130747.93.0.788709270274.issue35430@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: argparse.SUPPRESS is an opaque value to be used by argparse clients. It could be anything, it just happens to be a string. So the code doesn't compare strings but checks whether a supplied object *is* the opaque value. I do not see any problem with this code, though one way to avoid LGTM diagnostics would be to use a non-string opaque value instead. ---------- nosy: +izbyshev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 16:17:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Dec 2018 21:17:35 +0000 Subject: [issue33023] Unable to copy ssl.SSLContext In-Reply-To: <1520489361.61.0.467229070634.issue33023@psf.upfronthosting.co.za> Message-ID: <1544131055.86.0.788709270274.issue33023@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10242 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 16:18:02 2018 From: report at bugs.python.org (kellerfuchs) Date: Thu, 06 Dec 2018 21:18:02 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients Message-ID: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> New submission from kellerfuchs : A recuring pain point, for me and for many others who use Python for mathematical computations, is that the standard library does not provide a function for computing binomial coefficients. I would like to suggest adding a function, in the math module, with the following signature: binomial(n: Integral, k: Integral) -> Integral A simple native Python implementation would be: from functools import reduce from math import factorial from numbers import Integral def binomial(n: Integral, k: Integral) -> Integral: if k < 0 or n < 0: raise ValueError("math.binomial takes non-negative parameters.") k = min(k, n-k) num, den = 1, 1 for i in range(k): num = num * (n - i) den = den * (i + 1) return num//den As far as I can tell, all of the math module is implemented in C, so this should be done in C too, but the implemented behaviour should be equivalent. I will submit a Github pull request once I have a ready-to-review patch. Not starting a PEP, per [PEP 1]: > Small enhancements or patches often don't need a PEP and can be injected into the Python development workflow with a patch submission to the Python issue tracker. [PEP 1]: https://www.python.org/dev/peps/pep-0001/#id36 ---------- messages: 331251 nosy: kellerfuchs priority: normal severity: normal status: open title: The math module should provide a function for computing binomial coefficients type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 16:21:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Dec 2018 21:21:55 +0000 Subject: [issue35430] Lib/argparse.py uses `is` for string comparison In-Reply-To: <1544128078.84.0.788709270274.issue35430@psf.upfronthosting.co.za> Message-ID: <1544131315.79.0.788709270274.issue35430@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I concur with Alexey. This is a correct use of the 'is' operator. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 16:25:02 2018 From: report at bugs.python.org (Roman Yurchak) Date: Thu, 06 Dec 2018 21:25:02 +0000 Subject: [issue35430] Lib/argparse.py uses `is` for string comparison In-Reply-To: <1544128078.84.0.788709270274.issue35430@psf.upfronthosting.co.za> Message-ID: <1544131502.21.0.788709270274.issue35430@psf.upfronthosting.co.za> Roman Yurchak added the comment: Thanks, Alexey and Serhiy! Looking at the code more closely I would agree. I guess changing the value of the suppress object to something else to avoid the warning, has a potential of breaking code that relies on the current functionality and is not worth it... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 16:54:24 2018 From: report at bugs.python.org (Bruno Chanal) Date: Thu, 06 Dec 2018 21:54:24 +0000 Subject: [issue35432] str.format and string.Formatter bug with French (and other) locale Message-ID: <1544133264.0.0.788709270274.issue35432@psf.upfronthosting.co.za> New submission from Bruno Chanal : The short story: Small numbers are not displayed properly when using a French (language) locale or similar, and formatting output with str.format or string.Formatter(). The problem probably extends to other locales. Long story: --- $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic $ python3 Python 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.setlocale(locale.LC_ALL, '') 'fr_CA.UTF-8' >>> print('{:n}'.format(10)) # Garbled output >>> print('{:n}'.format(10000)) # OK 10?000 >>> # Note: narrow non-break space used as thousands separator ... pass >>> locale.format_string('%d', 10, grouping=True) # OK '10' >>> locale.format_string('%d', 10123) # OK '10123' >>> locale.format_string('%d', 10123, grouping=True) # OK thousands separator \u202f '10\u202f123' >>> import string >>> print(string.Formatter().format('{:n}', 10)) # Same problem with Formatter AB >>> print(string.Formatter().format('{:n}', 10000)) 10?000 locale aware functions implementing the {:n} formatting code, such as str.format and string.Formatter, generate garbled output with small numbers under a French locale. However, locale.format_string('%d', numeric_value) produces valid strings. In other words, it's a workaround for the time being... The problem seems to originate from a new version of Ubuntu: I ran the same program about 18 months ago and didn't notice any problem. My 0.02 $ worth of analysis: the output from the str.locale function is some random and changing value with small numbers. The behavior is reminiscent of invalid memory reads in C functions, e.g., mismatch of parameter in function calls, or similar. The value is not consistent. It feels like format does not expect and deal properly with long Unicode characters as part of numbers. The space character is a NARROW NON-BREAK SPACE, in most Ubuntu French locales (and quite a few others) however. The problem shows up in Python 3.6 and 3.7. This might also be a security issue... ---------- components: Interpreter Core messages: 331254 nosy: canuck7 priority: normal severity: normal status: open title: str.format and string.Formatter bug with French (and other) locale type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 17:31:53 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 06 Dec 2018 22:31:53 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544135513.82.0.788709270274.issue35431@psf.upfronthosting.co.za> Steven D'Aprano added the comment: You import reduce but never use it :-) +1 for this, I certainly miss it too. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 18:22:43 2018 From: report at bugs.python.org (kellerfuchs) Date: Thu, 06 Dec 2018 23:22:43 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544138563.41.0.788709270274.issue35431@psf.upfronthosting.co.za> kellerfuchs added the comment: Yes, that was a copypasta mistake (and I also import factorial needlessly) as the file I prototyped it in had some other code for testing my proposed implementation. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 19:04:44 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 07 Dec 2018 00:04:44 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544141084.22.0.788709270274.issue35431@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 I have wanted this a number of times. FWIW, most recently I wrote it like this: def comb(n, r): 'Equivalent to factorial(n) // (factorial(r) * factorial(n-r))' c = 1 r = min(r, n-r) for i in range(1, r+1): c = c * (n - r + i) // i return c I'm not sure is this is better than a single divide, but it kept the intermediate values from exploding in size, taking advantage of cancellation at each step. Also, I'm not sure what the predominant choice for variable names should be, "n things taken r at a time" or "n things taken k at time". Also, it's worth considering whether the function should be called "binomial", "choose", "combinations", or "comb". The word "binomial" seems too application specific but would make sense if we ever introduced a "multinomial" counterpart. The word "choose" is how we usually pronounce it. The word "combinations" fits nicely with the related counting functions, "combinations, permutations, and factorial". The word "comb" is short, works well with "perm" and "fact", and nicely differentiates itself as the integer counterparts of the combinatoric functions in the itertools module. Wolfram uses both choose and Binomial[n,m] SciPy uses comb(n, k). Maple uses both numbcomb(n,m) and binomial(n,m). TeX uses {n \choose k} ---------- nosy: +mark.dickinson, rhettinger, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 20:03:11 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Fri, 07 Dec 2018 01:03:11 +0000 Subject: [issue35433] Correctly detect installed SDK versions Message-ID: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> New submission from Jeremy Kloth : In the process of eliminating compiler warnings on my buildbot, I needed to update VS2015 to the latest toolset (VS2015 Update 3). This in turn now causes an error due about not having the required version of Windows SDK installed. It seems that the detection logic for that uses a hard-coded list which may not be up-to-date (and possibly incorrect for some installs). Referenced PR fixes this. ---------- components: Build, Windows messages: 331258 nosy: jkloth, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Correctly detect installed SDK versions versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 20:11:00 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Fri, 07 Dec 2018 01:11:00 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544145060.13.0.788709270274.issue35433@psf.upfronthosting.co.za> Change by Jeremy Kloth : ---------- keywords: +patch pull_requests: +10243 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 20:22:44 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 07 Dec 2018 01:22:44 +0000 Subject: [issue35432] str.format and string.Formatter bug with French (and other) locale In-Reply-To: <1544133264.0.0.788709270274.issue35432@psf.upfronthosting.co.za> Message-ID: <1544145764.94.0.788709270274.issue35432@psf.upfronthosting.co.za> Eric V. Smith added the comment: Possibly related to issue 33954? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 20:43:14 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Fri, 07 Dec 2018 01:43:14 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1544146994.46.0.788709270274.issue9566@psf.upfronthosting.co.za> Change by Jeremy Kloth : ---------- pull_requests: +10244 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 20:44:10 2018 From: report at bugs.python.org (Jonathan Gossage) Date: Fri, 07 Dec 2018 01:44:10 +0000 Subject: [issue35267] reproducible deadlock with multiprocessing.Pool In-Reply-To: <1542416799.14.0.788709270274.issue35267@psf.upfronthosting.co.za> Message-ID: <1544147050.65.0.788709270274.issue35267@psf.upfronthosting.co.za> Jonathan Gossage added the comment: This is a great example of abusing the multi-processing API and thus creating timing errors that lead to locks not being released. What is happening is that the example attempts to transmit data that is too big for the underlying pipe and this creates the timing errors since the pipe that returns the result of invoking apply_async does not have the capacity of transmitting the result of the worker process in a single operation and accordingly the worker process returns prematurely while still holding the pipe lock. This can be seen by testing the ready status of the result returned by apply_async which will show whether the complete result of the worker process has been received. The solution to this situation is simple, simply invoke get() on the asynchronous result returned by apply_async. Using this call has the effect of correctly synchronizing the pipe used by the low-level queues used by the Pool Manager and there will be no lock left active when it should'nt be. The script lock1.py contains code that implements this fix as well as verifying that everything has worked properly. The output from the script is found in the file lock1.result.txt. Because there is an API based solution to the problem plus the behavior of apply_async makes sense in that the process of transferring multi-buffer data is very CPU intensive and should be delegated to the worker process rather than to the main-line process, I do not recommend that any changes be made to the multiprocessing code in Python, rather the solution should use the available multiprocessing API correctly. ---------- nosy: +Jonathan.Gossage Added file: https://bugs.python.org/file47979/lock1.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 20:45:58 2018 From: report at bugs.python.org (Jonathan Gossage) Date: Fri, 07 Dec 2018 01:45:58 +0000 Subject: [issue35267] reproducible deadlock with multiprocessing.Pool In-Reply-To: <1542416799.14.0.788709270274.issue35267@psf.upfronthosting.co.za> Message-ID: <1544147158.83.0.788709270274.issue35267@psf.upfronthosting.co.za> Change by Jonathan Gossage : Added file: https://bugs.python.org/file47980/lock1.result.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 20:47:30 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Fri, 07 Dec 2018 01:47:30 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1544147250.7.0.788709270274.issue9566@psf.upfronthosting.co.za> Change by Jeremy Kloth : ---------- pull_requests: +10245 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 20:49:57 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Fri, 07 Dec 2018 01:49:57 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1544147397.64.0.788709270274.issue9566@psf.upfronthosting.co.za> Change by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 21:03:36 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Fri, 07 Dec 2018 02:03:36 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1544148215.98.0.788709270274.issue9566@psf.upfronthosting.co.za> Jeremy Kloth added the comment: I've added two PRs (GH-11010 and GH-11011) along with bpo-35433 that should get 3.x warning free (finally!) on 64-bit Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 21:08:42 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Fri, 07 Dec 2018 02:08:42 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544148522.18.0.788709270274.issue35433@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Also, my buildbot *should* fail until this change is merged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 21:09:29 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Fri, 07 Dec 2018 02:09:29 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544148569.39.0.788709270274.issue35433@psf.upfronthosting.co.za> Change by Jeremy Kloth : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 22:19:35 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 03:19:35 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544152775.26.0.788709270274.issue35433@psf.upfronthosting.co.za> Steve Dower added the comment: Looks good to me. I can't apply tags from my phone, apparently, so someone else will have to merge and mark the backport versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 23:46:28 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 07 Dec 2018 04:46:28 +0000 Subject: [issue35434] Wrong bpo linked in What's New in 3.8 Message-ID: <1544157988.47.0.788709270274.issue35434@psf.upfronthosting.co.za> New submission from Josh Rosenberg : https://docs.python.org/3.8/whatsnew/3.8.html#optimizations begins with: shutil.copyfile(), shutil.copy(), shutil.copy2(), shutil.copytree() and shutil.move() use platform-specific ?fast-copy? syscalls on Linux, macOS and Solaris in order to copy the file more efficiently. ... more explanation ... (Contributed by Giampaolo Rodola? in bpo-25427.) That's all correct, except bpo-25427 is about removing the pyvenv script; it should be referencing bpo-33671. ---------- assignee: docs at python components: Documentation keywords: easy messages: 331264 nosy: docs at python, giampaolo.rodola, josh.r priority: low severity: normal status: open title: Wrong bpo linked in What's New in 3.8 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 00:09:24 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 05:09:24 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544159364.9.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 468a15aaf9206448a744fc5eab3fc21f51966aad by Steve Dower in branch 'master': bpo-34977: Add Windows App Store package (GH-10245) https://github.com/python/cpython/commit/468a15aaf9206448a744fc5eab3fc21f51966aad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 00:09:57 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 05:09:57 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544159397.17.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 253209149389e6793a052034e1f2d97691086f18 by Steve Dower in branch '3.7': [3.7] bpo-34977: Add Windows App Store package (GH-10245) https://github.com/python/cpython/commit/253209149389e6793a052034e1f2d97691086f18 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 00:15:16 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 05:15:16 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544159716.34.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: Making the release experimental as part of the next 3.7 update was approved by Ned (over email), so I merged the build. As soon as we snap for the RC I'll kick off an update and make the store page public, and hopefully can promote it enough to get eyes on it. Unfortunately, I discovered as part of a test submission that the minimum Windows version matters, and it's a version that hasn't been rolled out fully yet because of some bugs, so there may not be that many people who can use it this first time. But that will improve over time, and I'm sure I can find enough people to flush out issues before the next release (anyone on the Windows Insiders program should be fine). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 00:15:24 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 05:15:24 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544159724.69.0.788709270274.issue34977@psf.upfronthosting.co.za> Change by Steve Dower : ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 00:54:18 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 07 Dec 2018 05:54:18 +0000 Subject: [issue35434] Wrong bpo linked in What's New in 3.8 In-Reply-To: <1544157988.47.0.788709270274.issue35434@psf.upfronthosting.co.za> Message-ID: <1544162058.12.0.788709270274.issue35434@psf.upfronthosting.co.za> Change by Mariatta Wijaya : ---------- keywords: +patch pull_requests: +10246 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 00:55:59 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 07 Dec 2018 05:55:59 +0000 Subject: [issue35434] Wrong bpo linked in What's New in 3.8 In-Reply-To: <1544157988.47.0.788709270274.issue35434@psf.upfronthosting.co.za> Message-ID: <1544162159.32.0.788709270274.issue35434@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks! This has been fixed. ---------- nosy: +Mariatta resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 00:59:46 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Dec 2018 05:59:46 +0000 Subject: [issue35434] Wrong bpo linked in What's New in 3.8 In-Reply-To: <1544157988.47.0.788709270274.issue35434@psf.upfronthosting.co.za> Message-ID: <1544162386.0.0.788709270274.issue35434@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 16501b70826695991b3a151dfc538f010be5c765 by Miss Islington (bot) (Mariatta) in branch 'master': bpo-35434 Fix wrong issue number in what's new in 3.8 (GH-11012) https://github.com/python/cpython/commit/16501b70826695991b3a151dfc538f010be5c765 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 01:02:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 06:02:36 +0000 Subject: [issue33023] Unable to copy ssl.SSLContext In-Reply-To: <1520489361.61.0.467229070634.issue33023@psf.upfronthosting.co.za> Message-ID: <1544162556.64.0.788709270274.issue33023@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 324e1790094708538acf2e7795f9c44e3732aaf7 by Serhiy Storchaka in branch '2.7': [2.7] bpo-33023: Fix NotImplemented to NotImplementedError. (GH-10934). (GH-11001) (GH-11008) https://github.com/python/cpython/commit/324e1790094708538acf2e7795f9c44e3732aaf7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 01:13:39 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Fri, 07 Dec 2018 06:13:39 +0000 Subject: [issue32805] Possible integer overflow when call PyDTrace_GC_DONE() In-Reply-To: <1518168459.08.0.467229070634.issue32805@psf.upfronthosting.co.za> Message-ID: <1544163219.6.0.788709270274.issue32805@psf.upfronthosting.co.za> Change by Jeremy Kloth : ---------- keywords: +patch pull_requests: +10247 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 01:30:58 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 07 Dec 2018 06:30:58 +0000 Subject: [issue35435] Documentation of 3.3 is available Message-ID: <1544164258.79.0.788709270274.issue35435@psf.upfronthosting.co.za> New submission from St?phane Wirtel : Today, I was looking for the doc of unittest.mock and the result from DuckDuckGo was this link: https://docs.python.org/3.3/library/unittest.mock-examples.html In the devguide, we stopped the support and everything about this version, in the bug tracker, 3.3 is not available. Maybe we could remove the doc from the server. ---------- assignee: docs at python components: Documentation messages: 331271 nosy: docs at python, matrixise, mdk priority: normal severity: normal status: open title: Documentation of 3.3 is available _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 01:32:24 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Dec 2018 06:32:24 +0000 Subject: [issue34864] In Idle, Mac tabs make editor status line disappear. In-Reply-To: <1538422572.97.0.545547206417.issue34864@psf.upfronthosting.co.za> Message-ID: <1544164344.54.0.788709270274.issue34864@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 9ebe8794f003dadfff578a066ea503a3e37ffe1d by Terry Jan Reedy (Tal Einat) in branch 'master': bpo-34864: warn if "Prefer tabs when opening documents" set to "Always" (#10464) https://github.com/python/cpython/commit/9ebe8794f003dadfff578a066ea503a3e37ffe1d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 01:32:53 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Dec 2018 06:32:53 +0000 Subject: [issue34864] In Idle, Mac tabs make editor status line disappear. In-Reply-To: <1538422572.97.0.545547206417.issue34864@psf.upfronthosting.co.za> Message-ID: <1544164373.48.0.788709270274.issue34864@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10248 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 01:33:06 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Dec 2018 06:33:06 +0000 Subject: [issue34864] In Idle, Mac tabs make editor status line disappear. In-Reply-To: <1538422572.97.0.545547206417.issue34864@psf.upfronthosting.co.za> Message-ID: <1544164386.85.0.788709270274.issue34864@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10249 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 01:43:45 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 07 Dec 2018 06:43:45 +0000 Subject: [issue35435] Documentation of 3.3 is available In-Reply-To: <1544164258.79.0.788709270274.issue35435@psf.upfronthosting.co.za> Message-ID: <1544165025.88.0.788709270274.issue35435@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: It seems like all other versions (3.2, 3.1, 3.0) are still available too, just not updated anymore. I'm thinking it's ok to leave these documentation. While we don't support these versions anymore, they still exists, and they're even still available for download from python.org/downloads. It doesn't hurt to keep these docs. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 01:51:12 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Dec 2018 06:51:12 +0000 Subject: [issue34864] In Idle, Mac tabs make editor status line disappear. In-Reply-To: <1538422572.97.0.545547206417.issue34864@psf.upfronthosting.co.za> Message-ID: <1544165472.43.0.788709270274.issue34864@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2db190bb356d00422087e1286637887efb8d97c5 by Miss Islington (bot) in branch '3.7': bpo-34864: warn if "Prefer tabs when opening documents" set to "Always" (GH-10464) https://github.com/python/cpython/commit/2db190bb356d00422087e1286637887efb8d97c5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 01:53:21 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 07 Dec 2018 06:53:21 +0000 Subject: [issue35435] Documentation of 3.3 is available In-Reply-To: <1544164258.79.0.788709270274.issue35435@psf.upfronthosting.co.za> Message-ID: <1544165601.22.0.788709270274.issue35435@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Documentation is available for all versions going back to Python 1.4. https://docs.python.org/release/1.4/ As it should be: I'm surely not the only person who has need to check old versions of the documentation from time to time. Not everyone is using the latest version of Python, and some times we need to write code that supports old versions. Leaving the old docs available is not merely "doesn't hurt", but is positively a GOOD thing to do. We shouldn't remove the docs from the server, and we shouldn't break existing URLs. I don't think there's much we can do about search engines: they have their secret algorithms for ranking pages, and whatever comes up is what comes up, and I doubt we can control that. I expect that the only thing we could do is put a prominent note at the top of each page "This is an unsupported version of the docs, for the latest version see blah blah blah" and link to the most recent version. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 01:54:27 2018 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 07 Dec 2018 06:54:27 +0000 Subject: [issue35436] Add missing PyErr_NoMemory() calls Message-ID: <1544165667.15.0.788709270274.issue35436@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- components: Extension Modules, Interpreter Core nosy: ZackerySpytz priority: normal severity: normal status: open title: Add missing PyErr_NoMemory() calls type: behavior versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 01:56:53 2018 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 07 Dec 2018 06:56:53 +0000 Subject: [issue35436] Add missing PyErr_NoMemory() calls Message-ID: <1544165813.54.0.788709270274.issue35436@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +10250 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 01:57:38 2018 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 07 Dec 2018 06:57:38 +0000 Subject: [issue35436] Add missing PyErr_NoMemory() calls Message-ID: <1544165858.95.0.788709270274.issue35436@psf.upfronthosting.co.za> New submission from Zackery Spytz : The attached PR adds some missing PyErr_NoMemory() calls. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 02:03:34 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Dec 2018 07:03:34 +0000 Subject: [issue34864] In Idle, Mac tabs make editor status line disappear. In-Reply-To: <1538422572.97.0.545547206417.issue34864@psf.upfronthosting.co.za> Message-ID: <1544166214.98.0.788709270274.issue34864@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 10665544a97b6616898faafc12ac9d06505d0690 by Miss Islington (bot) in branch '3.6': bpo-34864: warn if "Prefer tabs when opening documents" set to "Always" (GH-10464) https://github.com/python/cpython/commit/10665544a97b6616898faafc12ac9d06505d0690 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 02:08:27 2018 From: report at bugs.python.org (Roman Yurchak) Date: Fri, 07 Dec 2018 07:08:27 +0000 Subject: [issue35429] Incorrect use of raise NotImplemented In-Reply-To: <1544126518.18.0.788709270274.issue35429@psf.upfronthosting.co.za> Message-ID: <1544166507.35.0.788709270274.issue35429@psf.upfronthosting.co.za> Roman Yurchak added the comment: Resolved in https://bugs.python.org/issue33023 ---------- resolution: -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 03:23:20 2018 From: report at bugs.python.org (Julien Palard) Date: Fri, 07 Dec 2018 08:23:20 +0000 Subject: [issue35435] Documentation of 3.3 is available In-Reply-To: <1544164258.79.0.788709270274.issue35435@psf.upfronthosting.co.za> Message-ID: <1544171000.03.0.788709270274.issue35435@psf.upfronthosting.co.za> Julien Palard added the comment: > I expect that the only thing we could do is put a prominent note at the top of each page "This is an unsupported version of the docs, for the latest version see blah blah blah" and link to the most recent version. I'm +1 on this, and it can even help search engine algorithms to rank the right pages (as receiving more links than the old page). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 03:42:05 2018 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 07 Dec 2018 08:42:05 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544172125.63.0.788709270274.issue35431@psf.upfronthosting.co.za> Mark Dickinson added the comment: For some ranges of inputs, it may make sense to use the apparently naive implementation `factorial(n) // factorial(k) // factorial(n - k)`. The current factorial implementation is significantly optimised, and using it directly may be faster than using an iterative solution. Here are some timings (Python 3.7.1, macOS 10.13), using Raymond's `comb` function from msg331257: In [5]: %timeit comb(1000, 600) 186 ?s ? 442 ns per loop (mean ? std. dev. of 7 runs, 10000 loops each) In [6]: %timeit factorial(1000) // factorial(600) // factorial(400) 97.8 ?s ? 256 ns per loop (mean ? std. dev. of 7 runs, 10000 loops each) In [7]: %timeit factorial(1000) // (factorial(600) * factorial(400)) 91.1 ?s ? 789 ns per loop (mean ? std. dev. of 7 runs, 10000 loops each) But that's just one set of inputs, on one system; your results may vary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 04:03:05 2018 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 07 Dec 2018 09:03:05 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544173385.87.0.788709270274.issue35431@psf.upfronthosting.co.za> Mark Dickinson added the comment: There's also the question of what inputs should be considered valid: `binomial(n, k)` for `k > n` should either return 0 or be a `ValueError`, but which? Same question for `k < 0`. There's a symmetry argument for allowing `k < 0` if you allow `k > n`, but I can't think of pragmatic reasons to allow `k < 0`, while allowing `k > n` _does_ seem potentially useful. Note that this needs fixing with both of the code snippets shown so far: they both return 1 for k > n. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 04:53:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 09:53:18 +0000 Subject: [issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting. In-Reply-To: <1543961289.76.0.788709270274.issue35411@psf.upfronthosting.co.za> Message-ID: <1544176398.81.0.788709270274.issue35411@psf.upfronthosting.co.za> STINNER Victor added the comment: > test_urllib2net still fails on Travis CI. See for example https://api.travis-ci.org/v3/job/464509821/log.txt. Do you have a reference to the pull request? "ERROR: test_ftp_default_timeout (test.test_urllib2net.TimeoutTest)" It seems like Travis CI ran an outdated version of date. Likely a pull request that hasn't been merged into master. See my email: https://mail.python.org/pipermail/python-dev/2018-December/155928.html If your wrote the PR before my fix and the test fails, you have to update your PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 04:57:18 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 07 Dec 2018 09:57:18 +0000 Subject: [issue35437] Almost all Windows buildbots are failing to compile Message-ID: <1544176638.38.0.788709270274.issue35437@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : Almost all Windows buildbots are failing to compile Python: https://buildbot.python.org/all/#/builders/130/builds/525 https://buildbot.python.org/all/#/builders/113/builds/825 https://buildbot.python.org/all/#/builders/121/builds/782 https://buildbot.python.org/all/#/builders/58/builds/1680 https://buildbot.python.org/all/#/builders/17/builds/494 ... I suspect that is due to this commit: 468a15a and its backports. ---------- components: Interpreter Core, Windows messages: 331283 nosy: pablogsal, paul.moore, steve.dower, tim.golden, zach.ware priority: release blocker severity: normal status: open title: Almost all Windows buildbots are failing to compile versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 04:57:22 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 07 Dec 2018 09:57:22 +0000 Subject: [issue35437] Almost all Windows buildbots are failing to compile In-Reply-To: <1544176638.38.0.788709270274.issue35437@psf.upfronthosting.co.za> Message-ID: <1544176642.42.0.788709270274.issue35437@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +ned.deily versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 05:00:57 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 07 Dec 2018 10:00:57 +0000 Subject: [issue35437] Almost all Windows buildbots are failing to compile In-Reply-To: <1544176638.38.0.788709270274.issue35437@psf.upfronthosting.co.za> Message-ID: <1544176857.47.0.788709270274.issue35437@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: https://github.com/python/cpython/commit/468a15aaf9206448a744fc5eab3fc21f51966aad ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 05:10:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 10:10:38 +0000 Subject: [issue35346] Modernize Lib/platform.py code In-Reply-To: <1543455759.08.0.788709270274.issue35346@psf.upfronthosting.co.za> Message-ID: <1544177438.37.0.788709270274.issue35346@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3a521f0b6167628f975c773b56c7daf8d33d6f40 by Victor Stinner in branch 'master': bpo-35346, platform: replace os.popen() with subprocess (GH-10786) https://github.com/python/cpython/commit/3a521f0b6167628f975c773b56c7daf8d33d6f40 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 05:11:06 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 07 Dec 2018 10:11:06 +0000 Subject: [issue35437] Almost all Windows buildbots are failing to compile In-Reply-To: <1544176638.38.0.788709270274.issue35437@psf.upfronthosting.co.za> Message-ID: <1544177466.94.0.788709270274.issue35437@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Reverting that commit seem to work: https://buildbot.python.org/all/#/builders/91/builds/9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 05:11:33 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 10:11:33 +0000 Subject: [issue35436] Add missing PyErr_NoMemory() calls In-Reply-To: <1544165858.95.0.788709270274.issue35436@psf.upfronthosting.co.za> Message-ID: <1544177492.99.0.788709270274.issue35436@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4c49da0cb7434c676d70b9ccf38aca82ac0d64a9 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-35436: Add missing PyErr_NoMemory() calls and other minor bug fixes. (GH-11015) https://github.com/python/cpython/commit/4c49da0cb7434c676d70b9ccf38aca82ac0d64a9 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 05:27:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 10:27:48 +0000 Subject: [issue35426] test_signal.test_interprocess_signal() race condition In-Reply-To: <1544099760.1.0.788709270274.issue35426@psf.upfronthosting.co.za> Message-ID: <1544178468.12.0.788709270274.issue35426@psf.upfronthosting.co.za> STINNER Victor added the comment: I forgot the URL to the build: https://buildbot.python.org/all/#/builders/170/builds/175 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 05:42:53 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 07 Dec 2018 10:42:53 +0000 Subject: [issue35437] Almost all Windows buildbots are failing to compile In-Reply-To: <1544176638.38.0.788709270274.issue35437@psf.upfronthosting.co.za> Message-ID: <1544179373.42.0.788709270274.issue35437@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: More broken buildbots: https://buildbot.python.org/all/#/builders/32/builds/1867 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:05:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 11:05:35 +0000 Subject: [issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting. In-Reply-To: <1543961289.76.0.788709270274.issue35411@psf.upfronthosting.co.za> Message-ID: <1544180735.7.0.788709270274.issue35411@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10251 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:10:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 11:10:20 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544181020.72.0.788709270274.issue22005@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10252 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:19:24 2018 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 07 Dec 2018 11:19:24 +0000 Subject: [issue35428] xml.etree.ElementTree.tostring violates W3 standards allowing encoding='unicode' without error In-Reply-To: <1544119722.12.0.788709270274.issue35428@psf.upfronthosting.co.za> Message-ID: <1544181564.33.0.788709270274.issue35428@psf.upfronthosting.co.za> Stefan Behnel added the comment: What exactly is the problem here? encoding='unicode' will never appear in the XML declaration, and thus will never be "presented to XML processors". It is up to the user to deal with encodings in this case, which I think is fine. It's them who asked for the non-encoded result, after all. The XML spec does not forbid XML tools to grow convenience features, and that's what I think this is. Is there any problem with this feature, besides not being covered by the XML spec? ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:20:51 2018 From: report at bugs.python.org (kellerfuchs) Date: Fri, 07 Dec 2018 11:20:51 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544181651.04.0.788709270274.issue35431@psf.upfronthosting.co.za> Change by kellerfuchs : ---------- keywords: +patch pull_requests: +10253 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:24:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 11:24:42 +0000 Subject: [issue35437] Almost all Windows buildbots are failing to compile In-Reply-To: <1544176638.38.0.788709270274.issue35437@psf.upfronthosting.co.za> Message-ID: <1544181882.45.0.788709270274.issue35437@psf.upfronthosting.co.za> STINNER Victor added the comment: > https://buildbot.python.org/all/#/builders/121/builds/782 41>d:\buildarea\3.7.bolen-windows10\build\pc\python_uwp.cpp(9): fatal error C1083: Cannot open include file: 'winrt\Windows.ApplicationModel.h': No such file or directory [D:\buildarea\3.7.bolen-windows10\build\PCbuild\python_uwp.vcxproj] ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:25:42 2018 From: report at bugs.python.org (kellerfuchs) Date: Fri, 07 Dec 2018 11:25:42 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544181942.88.0.788709270274.issue35431@psf.upfronthosting.co.za> kellerfuchs added the comment: @Raymond Hettinger: > it's worth considering whether the function should be called "binomial", "choose", "combinations", or "comb" Here goes the bike shed! :) Kidding, this is a pretty important ergonomics/discoverability concern, and I hadn't given it much thought yet. I'd rather not call it comb, because it collides with a completely-unrelated English word, and it's not obvious what it stands for unless one already knows. > The word "combinations" fits nicely with the related counting functions, "combinations, permutations, and factorial". That's a good point; math.permutations doesn't exist, but itertools.permutations does, so I would expect (by analogy) a ?combinations? functions to produce all possible k-sized subsets (rather than counting them), and that's exactly what itertools.combinations does. On the other hand, combinations and permutations are names that make it perhaps more obvious what is being counted, so perhaps math.{combinations,permutations} should be aliases for math.{binomial,factorial} ? Is the name collision with itertools a problem? TL;DR: ?binomial? is more consistent with the current naming in math and itertools, but perhaps it makes sense to introduce math.{combination,permutations} as aliases? (Note that I used math.binomial as the name in the PR so far, but that's only because I needed a name, not because I consider the discussion ended.) @Mark Dickinson: > The current factorial implementation is significantly optimised, and using it directly may be faster than using an iterative solution. Yes, I avoided pushing specifically for a given algorithm (rather than getting upfront agreement on the functional behaviour) because the performance characteristics will likely be quite different once implemented in C in the math module. (Unless I'm mistaken and there is a way to add pure-Python functions to the math module?) > `binomial(n, k)` for `k > n` should either return 0 or be a `ValueError`, but which? >From a mathematical standpoint, (n choose k) is defined for all non-negative k, n, with (n chooze k) = 0 when k>n or k=0. It's necessary behaviour for the usual equations to hold (like (n + 1 choose k + 1) = (n choose k) + (n choose k + 1)). As such, I'd argue that returning 0 is both more likely to be the thing the user wants (as in, it's necessary behaviour for combinatorics) and easier to reason about. Negative k and n, on the other hand, should clearly be a ValueError, and so should non-integers inputs; this is consistent with factorial's behaviour. I started a pull request and (for now) only added tests which document that (proposed) behaviour, so we can more easily discuss whether that's what we want. > Note that this needs fixing with both of the code snippets shown so far: they both return 1 for k > n. Yes :) I noticed last night, as I wrote Hypothesis tests for the snippet, but didn't think it was super important to send an updated version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:26:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 11:26:54 +0000 Subject: [issue35437] Almost all Windows buildbots are failing to compile In-Reply-To: <1544176638.38.0.788709270274.issue35437@psf.upfronthosting.co.za> Message-ID: <1544182014.72.0.788709270274.issue35437@psf.upfronthosting.co.za> STINNER Victor added the comment: > https://buildbot.python.org/all/#/builders/17/builds/494 C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 10.0.15063.0 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\buildbot.python.org\3.6.kloth-win64\build\PCbuild\pythoncore.vcxproj] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:30:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 11:30:06 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544182206.54.0.788709270274.issue35431@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think that it is better to add this function in a new module imath, which could contain other integer functions: factorial, gcs, as_integer_ration, isqrt, isprime, primes. See https://mail.python.org/pipermail/python-ideas/2018-July/051917.html ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:32:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 11:32:17 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544182337.92.0.788709270274.issue34977@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10255 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:32:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 11:32:22 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544182342.21.0.788709270274.issue35431@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Mathematically, `binomial(n, k)` for `k > n` is defined as 0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:33:43 2018 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 07 Dec 2018 11:33:43 +0000 Subject: [issue35436] Add missing PyErr_NoMemory() calls In-Reply-To: <1544165858.95.0.788709270274.issue35436@psf.upfronthosting.co.za> Message-ID: <1544182423.43.0.788709270274.issue35436@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- pull_requests: +10256 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:33:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 11:33:50 +0000 Subject: [issue35436] Add missing PyErr_NoMemory() calls In-Reply-To: <1544165858.95.0.788709270274.issue35436@psf.upfronthosting.co.za> Message-ID: <1544182430.18.0.788709270274.issue35436@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10257 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:40:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 11:40:06 +0000 Subject: [issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting. In-Reply-To: <1543961289.76.0.788709270274.issue35411@psf.upfronthosting.co.za> Message-ID: <1544182806.3.0.788709270274.issue35411@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Seems this is a glitch of Travis CI. PR 794 was created long time ago, and while it was regularly merged with master, tests become failing after recent updated. I expect that similar issues can be repeated with other old PRs. After creating a copy of that PR (see PR 11017), all tests are passed. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:42:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 11:42:14 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544182934.47.0.788709270274.issue22005@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8452ca15f41061c8a6297d7956df22ab476d4df4 by Serhiy Storchaka in branch 'master': bpo-22005: Fixed unpickling instances of datetime classes pickled by Python 2. (GH-11017) https://github.com/python/cpython/commit/8452ca15f41061c8a6297d7956df22ab476d4df4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:43:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 11:43:56 +0000 Subject: [issue35437] Almost all Windows buildbots are failing to compile In-Reply-To: <1544176638.38.0.788709270274.issue35437@psf.upfronthosting.co.za> Message-ID: <1544183036.42.0.788709270274.issue35437@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-35433: "Correctly detect installed SDK versions". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:46:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 11:46:23 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544183183.0.0.788709270274.issue34977@psf.upfronthosting.co.za> STINNER Victor added the comment: > Making the release experimental as part of the next 3.7 update was approved by Ned (over email), so I merged the build. I suggest to revert this change from Python 3.7: it broke all Windows buildbots, see bpo-35437. It doesn't seem like a good idea to push such change between a release candidate and a final version :-( ---------- nosy: +ned.deily, vstinner priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:51:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 11:51:16 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544183476.21.0.788709270274.issue34977@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10258 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:57:46 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 11:57:46 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544183866.1.0.788709270274.issue34977@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset cb0b78a070ea3b704416e74f64046178ae0dff3e by Victor Stinner in branch 'master': Revert "bpo-34977: Add Windows App Store package (GH-10245)" (GH-11019) https://github.com/python/cpython/commit/cb0b78a070ea3b704416e74f64046178ae0dff3e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 07:16:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 12:16:21 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544184981.55.0.788709270274.issue22005@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10259 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 07:17:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 12:17:45 +0000 Subject: [issue35436] Add missing PyErr_NoMemory() calls In-Reply-To: <1544165858.95.0.788709270274.issue35436@psf.upfronthosting.co.za> Message-ID: <1544185065.77.0.788709270274.issue35436@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 602d307ac5e8a2da38a193dca3bdfef5994dfe67 by Serhiy Storchaka (Zackery Spytz) in branch '3.7': bpo-35436: Add missing PyErr_NoMemory() calls and other minor bug fixes. (GH-11015) (GH-11020) https://github.com/python/cpython/commit/602d307ac5e8a2da38a193dca3bdfef5994dfe67 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 07:38:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 12:38:33 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544186313.75.0.788709270274.issue35433@psf.upfronthosting.co.za> STINNER Victor added the comment: Is this issue related to bpo-34977: Add Windows App Store package? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 07:49:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 12:49:01 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544186941.57.0.788709270274.issue34977@psf.upfronthosting.co.za> STINNER Victor added the comment: > I suggest to revert this change from Python 3.7: it broke all Windows buildbots, see bpo-35437. I reverted the change in master and I will merge PR 11021 once tests pass to revert in 3.7 as well. > It doesn't seem like a good idea to push such change between a release candidate and a final version :-( I started a discussion on python-dev: https://mail.python.org/pipermail/python-dev/2018-December/155932.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 07:49:48 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 07 Dec 2018 12:49:48 +0000 Subject: [issue35434] Wrong bpo linked in What's New in 3.8 In-Reply-To: <1544157988.47.0.788709270274.issue35434@psf.upfronthosting.co.za> Message-ID: <1544186988.43.0.788709270274.issue35434@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: My bad. Thanks for fixing it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 07:50:16 2018 From: report at bugs.python.org (Windson Yang) Date: Fri, 07 Dec 2018 12:50:16 +0000 Subject: [issue35324] ssl: FileNotFoundError when do handshake In-Reply-To: <1543300721.51.0.788709270274.issue35324@psf.upfronthosting.co.za> Message-ID: <1544187016.25.0.788709270274.issue35324@psf.upfronthosting.co.za> Windson Yang added the comment: I can't reproduce on my laptop. Would you please upload a minimal example? ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 07:51:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 12:51:28 +0000 Subject: [issue35436] Add missing PyErr_NoMemory() calls In-Reply-To: <1544165858.95.0.788709270274.issue35436@psf.upfronthosting.co.za> Message-ID: <1544187088.08.0.788709270274.issue35436@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -10257 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 07:56:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 12:56:04 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544187364.59.0.788709270274.issue22005@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 0d5730e6437b157f4aeaf5d2e67abca23448c29a by Serhiy Storchaka in branch '3.7': [3.7] bpo-22005: Fixed unpickling instances of datetime classes pickled by Python 2. (GH-11017) (GH-11022) https://github.com/python/cpython/commit/0d5730e6437b157f4aeaf5d2e67abca23448c29a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 07:56:29 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Dec 2018 12:56:29 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544187389.88.0.788709270274.issue22005@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10260 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 08:08:26 2018 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 07 Dec 2018 13:08:26 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544188106.53.0.788709270274.issue35431@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Mathematically, `binomial(n, k)` for `k > n` is defined as 0. It's not so clear cut. You can find different definitions out there. Knuth et. al., for example, in the book "Concrete Mathematics", extend the definition not just to negative k, but to negative n as well. Mathematicians aren't very good at agreeing on things. :-) But that doesn't really matter: what we need to decide is what behaviour is useful for the users of the function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 08:10:08 2018 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 07 Dec 2018 13:10:08 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544188208.98.0.788709270274.issue35431@psf.upfronthosting.co.za> Mark Dickinson added the comment: @kellerfuchs: > From a mathematical standpoint, (n choose k) is defined for all non-negative k, n, with (n chooze k) = 0 when k>n or k=0. You don't mean the "k=0" part of that, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 08:31:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 13:31:45 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544189505.93.0.788709270274.issue34977@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 783b794a5e6ea3bbbaba45a18b9e03ac322b3bd4 by Victor Stinner in branch '3.7': Revert "[3.7] bpo-34977: Add Windows App Store package (GH-10245)" (GH-11021) https://github.com/python/cpython/commit/783b794a5e6ea3bbbaba45a18b9e03ac322b3bd4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 08:32:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 13:32:17 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544189537.86.0.788709270274.issue34977@psf.upfronthosting.co.za> STINNER Victor added the comment: > Revert "[3.7] bpo-34977: Add Windows App Store package (GH-10245)" (GH-11021) That should repair buildbots, so I remove "release blocker" priority. ---------- priority: release blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 08:37:36 2018 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 07 Dec 2018 13:37:36 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544189856.52.0.788709270274.issue35431@psf.upfronthosting.co.za> Mark Dickinson added the comment: One more decision that needs to be made: should the new function accept integer-valued floats? Or should any `float` input give a TypeError. I'd personally prefer that floats not be accepted; I think this was a misfeature of `factorial` that we shouldn't compound. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 08:53:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 13:53:36 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544190816.27.0.788709270274.issue22005@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 19f6e83bf03b3ce22300638906bd90dd2dd5c463 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-22005: Fixed unpickling instances of datetime classes pickled by Python 2. (GH-11017) (GH-11022) (GH-11024) https://github.com/python/cpython/commit/19f6e83bf03b3ce22300638906bd90dd2dd5c463 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 08:58:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 13:58:13 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544191093.36.0.788709270274.issue22005@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10261 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 09:08:50 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 14:08:50 +0000 Subject: [issue35437] Almost all Windows buildbots are failing to compile In-Reply-To: <1544176638.38.0.788709270274.issue35437@psf.upfronthosting.co.za> Message-ID: <1544191730.25.0.788709270274.issue35437@psf.upfronthosting.co.za> Steve Dower added the comment: Okay, so apparently the buildbots are still building with VS 2015, and not VS 2017. I'll add a check for the new executable and repush. This was caused solely by the new code and not by any of the changes to existing code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 09:09:57 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 14:09:57 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544191797.8.0.788709270274.issue35433@psf.upfronthosting.co.za> Steve Dower added the comment: No, it just automates something that's been manual for a while. Installing VS 2017 on build bots is still a manual process ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 09:13:53 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 14:13:53 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544192033.65.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: We haven't done RC yet - why is pushing this now so bad? Most of the change is purely additive and does not modify the code base, the rest is Windows-only or tests. I'll add checks for outdated build machines, but there has to be a release of this or it remains untestable, so it'll either be from my branch or from the release branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 09:34:06 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 07 Dec 2018 14:34:06 +0000 Subject: [issue35437] Almost all Windows buildbots are failing to compile In-Reply-To: <1544176638.38.0.788709270274.issue35437@psf.upfronthosting.co.za> Message-ID: <1544193246.68.0.788709270274.issue35437@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: @Steve Notice that 468a15aaf9206448a744fc5eab3fc21f51966aad is currently reverted, so you need to push it again if you plan to add something on top of it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 09:44:09 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 07 Dec 2018 14:44:09 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544141084.22.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <20181207144401.GB13061@ando.pearwood.info> Steven D'Aprano added the comment: On Fri, Dec 07, 2018 at 12:04:44AM +0000, Raymond Hettinger wrote: > Also, I'm not sure what the predominant choice for variable names > should be, "n things taken r at a time" or "n things taken k at time". > > Also, it's worth considering whether the function should be called > "binomial", "choose", "combinations", or "comb". I've done a quick survey of some of the most common/popular scientific calculators: TI Nspire TI-84 Plus Casio Classpad Casio FX-82AU Plus II all call this nCr, and nPr for the permutation version. This matches the notation taught in secondary school maths classes in Australia. That's common and familiar notation for secondary school students, but personally I'm not super-keen on it. For what its worth, the colour I prefer for this bikeshed are "comb" and "perm", which are the names used by the HP 48GX calculator. Second choice would be to spell the names out in full, "combinations" and "permutations". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 09:48:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 14:48:31 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544194111.01.0.788709270274.issue22005@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 1133a8c0efabf6b33a169039cf6e2e03bfe6cfe3 by Serhiy Storchaka in branch 'master': bpo-22005: Fix condition for unpickling a date object. (GH-11025) https://github.com/python/cpython/commit/1133a8c0efabf6b33a169039cf6e2e03bfe6cfe3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 09:49:14 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Fri, 07 Dec 2018 14:49:14 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544194154.59.0.788709270274.issue35433@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Sorry Victor, I should have added more context when I nosy'ed you to this issue. Since you seem to be the "buildbot keeper" as of late, I wanted to give you a pointer to the reason for my failing buildbot. Which, as I surmised, is failing compile due to the missing SDK error that is fixed by this PR ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 09:50:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 14:50:13 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544194213.97.0.788709270274.issue34977@psf.upfronthosting.co.za> STINNER Victor added the comment: > We haven't done RC yet - why is pushing this now so bad? I reverted your change because it broke all Windows buildbots, and we have a policy to revert a change if buildbots turn red and no fix can be found in 2 hours: https://pythondev.readthedocs.io/ci.html#revert-on-fail > Most of the change is purely additive and does not modify the code base, the rest is Windows-only or tests. nitpicking: Your change modify venv and two tests, it's not purely Windows-only :-) By the way, as I wrote in my email, I would prefer to see the venv+tests change pushed in separated change (and explain why you do these changes). > I'll add checks for outdated build machines, but there has to be a release of this or it remains untestable, so it'll either be from my branch or from the release branch. Sorry, I don't know Windows App Store, I don't understand the restriction "there has to be a release of this or it remains untestable". Would you mind to elaborate? Do you mean that buildbots must upgrade to VS 2017? Can Python 3.6 and 3.7 be compiled without any issue on VS 2017? Maybe send an email to buildbot-status if you want to see more buildbots running VS 2017 rather than VS 2015. -- There was a small bug in your PR, in PC/launcher.c, fixed by commit 4c49da0cb7434c676d70b9ccf38aca82ac0d64a9 (bpo-35436): + if (executable == NULL) { + error(RC_NO_MEMORY, L"A memory allocation failed"); + } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 09:51:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 14:51:59 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544194319.37.0.788709270274.issue34977@psf.upfronthosting.co.za> STINNER Victor added the comment: Since the first attempt broke all Windows buildbot workers, it would be nice to use a custom build before merging a new attempt :-) See instructions in the devguide: https://devguide.python.org/buildbots/?highlight=custom#custom-builders Note: Pablo used buildbot-custom to test a revert of the App Store change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 09:52:18 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 07 Dec 2018 14:52:18 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544188106.53.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <20181207145213.GC13061@ando.pearwood.info> Steven D'Aprano added the comment: > > Mathematically, `binomial(n, k)` for `k > n` is defined as 0. > > It's not so clear cut. You can find different definitions out there. > Knuth et. al., for example, in the book "Concrete Mathematics", extend > the definition not just to negative k, but to negative n as well. > Mathematicians aren't very good at agreeing on things. :-) I think the key word there is *extend*. To the degree that any mathematical definition is "obvious", the obvious definition for number of combinations ("n choose r") is going to be 1 for r == 0 and 0 for r > n. However, I think that it is too easy to get the order of n and r (n and k) mixed up, and write combinations(5, 10) when you wanted to choose 5 from 10. I know I make that mistake on my calculator *all the time*, and so do my students, even with the nPr notation. So I recommend we raise ValueError for r > n. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 09:56:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 14:56:24 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544194584.79.0.788709270274.issue35433@psf.upfronthosting.co.za> STINNER Victor added the comment: After I reverted bpo-34977 change, most Windows buildbots are back to green. > In the process of eliminating compiler warnings on my buildbot, I needed to update VS2015 to the latest toolset (VS2015 Update 3). This in turn now causes an error due about not having the required version of Windows SDK installed. Is it a warning or an error? What is the warning/error message? What is your buildbot? Right now, it seems like only "AMD64 Windows7 SP1 3.x" is still red: "2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 10.0.17134.0 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\pythoncore.vcxproj]" https://buildbot.python.org/all/#/builders/40/builds/1322 Are you talking about this error? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 09:56:39 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 07 Dec 2018 14:56:39 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544189856.52.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <20181207145634.GD13061@ando.pearwood.info> Steven D'Aprano added the comment: On Fri, Dec 07, 2018 at 01:37:36PM +0000, Mark Dickinson wrote: > I'd personally prefer that floats not be accepted; Agreed. We can always add support for floats later, but its hard to remove it if it turns out to be problematic. We ought to require n, r (or n, k) to be non-negative ints with 0 <= r <= n. Extending this to negative ints or floats is probably YAGNI, but if somebody does need it, they can request an enhancement in the future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 10:00:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 15:00:34 +0000 Subject: [issue35436] Add missing PyErr_NoMemory() calls In-Reply-To: <1544165858.95.0.788709270274.issue35436@psf.upfronthosting.co.za> Message-ID: <1544194834.24.0.788709270274.issue35436@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10262 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 10:03:39 2018 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 07 Dec 2018 15:03:39 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544195019.96.0.788709270274.issue22005@psf.upfronthosting.co.za> Paul Ganssle added the comment: I'm not sure I agree with how this was resolved. We're adding complexity to the datetime unpickler to support unpickling pickles created in Python 2 in Python 3? I also don't really understand the encoding parts of it, but it smells very fishy to me. I agree with Gregory here, pickle has so many other problems when used between versions of Python that it's simply not useful for cross-version serialization. It is useful for things like inter-process communication between two trusted instances of Python programs running the same version. Also, what is the plan here for 2020+? Do we remove this hack for Python 3.9, or are we stuck with it indefinitely? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 10:06:35 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 15:06:35 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544195195.13.0.788709270274.issue34977@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +10263 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 10:08:15 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 15:08:15 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544195295.7.0.788709270274.issue34977@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +10264 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 10:38:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 15:38:06 +0000 Subject: [issue35437] Almost all Windows buildbots are failing to compile In-Reply-To: <1544176638.38.0.788709270274.issue35437@psf.upfronthosting.co.za> Message-ID: <1544197086.63.0.788709270274.issue35437@psf.upfronthosting.co.za> STINNER Victor added the comment: I revert the changes, so buildbots should go back to green. I asked Steve Dower to use a custom build to avoid such hiccup on the next attempt to merge his change. ---------- priority: release blocker -> resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 10:50:56 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 15:50:56 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544197856.26.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: >> We haven't done RC yet - why is pushing this now so bad? > I reverted your change because it broke all Windows buildbots, and we have a policy to revert a change if buildbots turn red and no fix can be found in 2 hours I don't dispute that policy, but you said it shouldn't go in between RC and a release, which it isn't. > nitpicking: Your change modify venv and two tests, it's not purely Windows-only :-) More nitpicking: the venv changes only affect Windows. Which makes it purely Windows and tests, exactly as I said. Adding smiles doesn't save you from having to read :) > Sorry, I don't know Windows App Store, I don't understand the restriction "there has to be a release of this or it remains untestable". Would you mind to elaborate? Sure. You can start by reading this thread, but the summary is that App Store apps (regardless of platform) generally have to go through an approval process before they can be installed. Without going through this process, they can't be tested fully in context. I believe we should make a true release and put that through the process, rather than me just doing one out of my branch. I provided instructions for developer testing above, which covers about 80% of what needs to be checked. The rest can only be tested by real use of a proper release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 10:57:26 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Fri, 07 Dec 2018 15:57:26 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544194584.79.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: Jeremy Kloth added the comment: > Is it a warning or an error? What is the warning/error message? What is your buildbot? It is a compiler error as you point out below (with message). By buildbot is: https://buildbot.python.org/all/#/workers/12 > Right now, it seems like only "AMD64 Windows7 SP1 3.x" is still red: > > "2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 10.0.17134.0 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\pythoncore.vcxproj]" > > https://buildbot.python.org/all/#/builders/40/builds/1322 > > Are you talking about this error? All the builders on my buildbot can no longer find a matching SDK version due to how the SDK version detection is handled. Previously, my buildbot had VS2015.2 installed whose build tools (version 1.2) didn't use the property `DefaultWindowsSDKVersion` to select the SDK version and just defaulted to Windows 8.1 SDK. Now that I've updated to VS2015.3 (includes build tools 1.4) it *does* use this property to select the SDK version. However, I have a newer SDK installed than is listed in the hard-coded list so it defaults to highest one in the list causing the missing SDK error. This PR changes the detection logic to simply accept what SDK the user has installed as long as it is newer (or the same) as the minimum allowed version. For those versed in MSBuild, this should be fairly self-evident, but hopefully this helps those who are not :) ---------- nosy: +jeremy.kloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:03:03 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 16:03:03 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544198583.61.0.788709270274.issue34977@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +10265 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:09:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 16:09:25 +0000 Subject: [issue35436] Add missing PyErr_NoMemory() calls In-Reply-To: <1544165858.95.0.788709270274.issue35436@psf.upfronthosting.co.za> Message-ID: <1544198965.64.0.788709270274.issue35436@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 2d6bc25dbc3dc5662f13917eb759f92842bf6de6 by Serhiy Storchaka in branch '3.6': bpo-35436: Add missing PyErr_NoMemory() calls and other minor bug fixes. (GH-11015) (GH-11020) (GH-11026) https://github.com/python/cpython/commit/2d6bc25dbc3dc5662f13917eb759f92842bf6de6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:13:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 16:13:00 +0000 Subject: [issue35436] Add missing PyErr_NoMemory() calls In-Reply-To: <1544165858.95.0.788709270274.issue35436@psf.upfronthosting.co.za> Message-ID: <1544199180.79.0.788709270274.issue35436@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Backporting to 2.7 is not so trivial due to the number of conflicts. Zackery, do you mind to create a backport for 2.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:19:28 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 07 Dec 2018 16:19:28 +0000 Subject: [issue35427] logging UnicodeDecodeError from undecodable strftime output In-Reply-To: <1544114374.69.0.788709270274.issue35427@psf.upfronthosting.co.za> Message-ID: <1544199568.11.0.788709270274.issue35427@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:25:41 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 16:25:41 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544199941.54.0.788709270274.issue34977@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +10266 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:27:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 16:27:10 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544200030.08.0.788709270274.issue22005@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is the same hack as in NumPy, so we are at least consistent here. I think we have to keep it some time after 2020, maybe to 2025. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:35:28 2018 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 07 Dec 2018 16:35:28 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544200528.64.0.788709270274.issue22005@psf.upfronthosting.co.za> Paul Ganssle added the comment: @Serhiy Any chance we can roll these back before the release so that they can have some time for discussion? I have serious concerns about having to support some Python 2/3 compatibility hack in datetime for the next 6 years. If this is worth doing at all, I think it can safely wait until the next release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:45:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2018 16:45:53 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544201153.59.0.788709270274.issue22005@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This issue is already open for a long time. There is a problem which can not be worked around from the user side. I want to get it solved in 3.6, and today is the last chance for this. This is important for migrating from Python 2 to Python 3. You can open a discussion on Python-Dev, and if there will be significant opposition, this change can be reverted before releasing the final version of 3.6.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:47:27 2018 From: report at bugs.python.org (kellerfuchs) Date: Fri, 07 Dec 2018 16:47:27 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544201247.44.0.788709270274.issue35431@psf.upfronthosting.co.za> kellerfuchs added the comment: @Serhiy Storchaka: > I think that it is better to add this function in a new module imath, which could contain other integer functions imath is a fine idea, and you already started a discussion in python-ideas@, but it's a much bigger undertaking than just adding this one function, and you can move it there once imath happens. As such, I think it's out-of-scope in this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:49:39 2018 From: report at bugs.python.org (kellerfuchs) Date: Fri, 07 Dec 2018 16:49:39 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544201379.82.0.788709270274.issue35431@psf.upfronthosting.co.za> kellerfuchs added the comment: @Mark Dickinson: > You don't mean the "k=0" part of that, right? Indeed not; the tests in the PR actually assert binomial(n, n) == binomial(n, 0) == 1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:52:49 2018 From: report at bugs.python.org (kellerfuchs) Date: Fri, 07 Dec 2018 16:52:49 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544201569.75.0.788709270274.issue35431@psf.upfronthosting.co.za> kellerfuchs added the comment: > I'd personally prefer that floats not be accepted; I think this was a misfeature of `factorial` that we shouldn't compound. OK; I only went with that because I assumed there were Good Reasons? that factorial did it, but if rejecting integral floats isn't going to be a controversial move I'm also in favor of it. Updating the PR momentarily to check that binomial rejects floats. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:54:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 16:54:25 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1544201665.73.0.788709270274.issue9566@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 028f0ef4f3111d2b3fc5b971642e337ba7990873 by Victor Stinner in branch 'master': bpo-9566: Fix compiler warnings in peephole.c (GH-10652) https://github.com/python/cpython/commit/028f0ef4f3111d2b3fc5b971642e337ba7990873 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 12:01:35 2018 From: report at bugs.python.org (kellerfuchs) Date: Fri, 07 Dec 2018 17:01:35 +0000 Subject: [issue35431] The math module should provide a function for computing binomial coefficients In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544202095.19.0.788709270274.issue35431@psf.upfronthosting.co.za> kellerfuchs added the comment: @Steven D'Aprano: > all call this nCr, and nPr for the permutation version. This matches > the notation taught in secondary school maths classes in Australia. > That's common and familiar notation for secondary school students, but > personally I'm not super-keen on it. It's also not universal; in my experience, most calculators are localized for a given market, and may use different notations (in particular, the notation for combinations/binomial numbers changes across countries). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 12:22:36 2018 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 07 Dec 2018 17:22:36 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544203356.31.0.788709270274.issue22005@psf.upfronthosting.co.za> Paul Ganssle added the comment: I do not care enough about this to fight about it. The issue has been open long enough that I do not think it justified the urgency of rushing through a patch just before the release and merging without review, but now that it is in the release of multiple versions, I think we may be stuck with it. This *is* something that users can work around by not abusing pickle in this way and instead using a proper cross-platform serialization format. I realize that that makes it *more difficult* for some people to do so, but as Gregory points out, these people are doing dangerous stuff that will break in a way that we are not going to be willing or able to fix at some point *anyway*. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 12:23:05 2018 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 07 Dec 2018 17:23:05 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544203385.55.0.788709270274.issue22005@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: -p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 12:23:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 17:23:14 +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: <1544203394.11.0.788709270274.issue33694@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10267 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 12:54:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 17:54:51 +0000 Subject: [issue32417] fromutc does not respect datetime subclasses In-Reply-To: <1514052939.19.0.213398074469.issue32417@psf.upfronthosting.co.za> Message-ID: <1544205291.59.0.788709270274.issue32417@psf.upfronthosting.co.za> STINNER Victor added the comment: Since the C code is only a few lines, what do you think of also fixing Python 2.7? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 13:06:34 2018 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 07 Dec 2018 18:06:34 +0000 Subject: [issue32417] fromutc does not respect datetime subclasses In-Reply-To: <1514052939.19.0.213398074469.issue32417@psf.upfronthosting.co.za> Message-ID: <1544205994.65.0.788709270274.issue32417@psf.upfronthosting.co.za> Paul Ganssle added the comment: I am somewhat uneasy about backporting this to Python 2.7 because changing the return type of `SomeDateTime + timedelta` could be seen as a breaking change. I have sent a message to the datetime-SIG mailing list about this for more visibility. If it is decided that this is just a bugfix, I'm OK with creating a backport for 2.7 (provided that there's nothing so different about 2.7 that the fix becomes much bigger). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 13:12:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Dec 2018 18:12:43 +0000 Subject: [issue32417] fromutc does not respect datetime subclasses In-Reply-To: <1514052939.19.0.213398074469.issue32417@psf.upfronthosting.co.za> Message-ID: <1544206363.9.0.788709270274.issue32417@psf.upfronthosting.co.za> STINNER Victor added the comment: > I am somewhat uneasy about backporting this to Python 2.7 because changing the return type of `SomeDateTime + timedelta` could be seen as a breaking change. I have sent a message to the datetime-SIG mailing list about this for more visibility. You asked to backport up to Python 3.6. The change is either fine to be backported to 2.7 and 3.6, or should not be backported. I prefer to have the same policy for stable branches... but I also understand that 2.7 requires even more stability. ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 13:33:23 2018 From: report at bugs.python.org (Mario Corchero) Date: Fri, 07 Dec 2018 18:33:23 +0000 Subject: [issue17185] unittest mock create_autospec doesn't correctly replace mocksignature In-Reply-To: <1360621900.03.0.519438692167.issue17185@psf.upfronthosting.co.za> Message-ID: <1544207603.54.0.788709270274.issue17185@psf.upfronthosting.co.za> Mario Corchero added the comment: Agree that it sounds reasonable to just set `__signature__` to tell `inspect` where to look at (thanks PEP 362 :P). Not an expert here though. For the partials bug, I'll add Pablo as we were speaking today about something similar :) but that might be unrelated (though interesting and worth fixing!) from the issue Chris brought up. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 14:22:42 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 19:22:42 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544210562.56.0.788709270274.issue35401@psf.upfronthosting.co.za> Steve Dower added the comment: I'm getting the cpython-source-deps repo updated now, and will do the Windows updates shortly after. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 14:43:23 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 07 Dec 2018 19:43:23 +0000 Subject: [issue31354] Fixing a bug related to LTO only build In-Reply-To: <1504648453.31.0.715065413662.issue31354@psf.upfronthosting.co.za> Message-ID: <1544211803.96.0.788709270274.issue31354@psf.upfronthosting.co.za> Ned Deily added the comment: This issue is still open and blocking the upcoming 3.7.2rc1 and 3.6.8rc1 releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 14:49:07 2018 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 07 Dec 2018 19:49:07 +0000 Subject: [issue32417] fromutc does not respect datetime subclasses In-Reply-To: <1514052939.19.0.213398074469.issue32417@psf.upfronthosting.co.za> Message-ID: <1544212147.54.0.788709270274.issue32417@psf.upfronthosting.co.za> Paul Ganssle added the comment: Ah, that's my mistake. I have always been under the impression that "Versions" meant "versions affected", not "versions that this needs to be fixed for". I usually just selected the ones where I had verified that it's a problem. I do not think this should be backported to 3.6. From the discussion in the datetime-SIG mailing list, we have realized that this change will *also* break anyone whose default constructor does not support the same signature as the base datetime. I think this is probably not a major problem (many other alternate constructors assume that the constructor accepts arguments as datetime does), but it's not something that I think we should be changing in a patch version. ---------- versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 15:07:39 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 07 Dec 2018 20:07:39 +0000 Subject: [issue35435] Documentation of 3.3 is available In-Reply-To: <1544164258.79.0.788709270274.issue35435@psf.upfronthosting.co.za> Message-ID: <1544213259.23.0.788709270274.issue35435@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: > put a prominent note at the top of each page "This is an unsupported version of the docs, for the latest version see blah blah blah" and link to the most recent version. Not sure how straightforward it will be to do this, and whether it will worth the trouble. Julien, perhaps you know more about this and can provide assessment. Perhaps it needs to be done from within python-docs-theme? FWIW, the landing page of each version (example https://docs.python.org/3.3/) states when it was last built. It can be an indication that it is outdated. There's also a related issue in python.org to better inform people of which Python versions are still maintained or not: https://github.com/python/pythondotorg/issues/1302 I think as it stands, this ticket is "not a bug". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 15:07:45 2018 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 07 Dec 2018 20:07:45 +0000 Subject: [issue32417] fromutc does not respect datetime subclasses In-Reply-To: <1514052939.19.0.213398074469.issue32417@psf.upfronthosting.co.za> Message-ID: <1544213265.24.0.788709270274.issue32417@psf.upfronthosting.co.za> Guido van Rossum added the comment: What's the use case for subclassing DateTime? These classes were not designed with subclassing as a use case in mind. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 15:29:03 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Dec 2018 20:29:03 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544214543.61.0.788709270274.issue34977@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Various questions and comments: 0. Steve: For more than one reason, I want this to be and remain an added alternative rather than a replacement of the current installer directly available on python.org. Can you assure us that the latter are not going away? I would have the same concern about adding something to the Apple/Mac store. 1. Ned: Since enhancements are not normally backported, it would be nice to have your approval, in whatever form it took, recorded here and not just in private email. I give a reason below. 2. Installers are always experimental until tested by multiple users on multiple machines. Even then, installation specific issues can arise. As I remember, the current installer, when new in 3.5, needed a shakedown period. One installer-specific issue was the initial working directory. To have a Windows Store Python ready for 3.8, we need to start now. There was once an issue where one of the installers failed to include one idlelib file. I believe it was help.html. I since added idle_test/test_help.py, which would now fail with something like "No such file or directory: 'C:\\Programs\\Python37\\Lib\\idlelib\\help.html'".) Repository testing does not test the actual binaries that users install, in their production context. Steve, assuming that I can access the Store, should I be able to install both PSF 3.7.2 and Windows Store 3.7.2 simultaneously? So I could test both IDLEs that beginners might install? 3. Anyone: Though it is not essential that I know, I am curious what 'restricted' versus 'non restricted' mean to Windows Store, and why Python can now go there. My search only came up with age restrictions, which python does not need (in my opinion). 4. While most PRs should be complete in themselves, reasons such as ease of review may suggest splitting one conceptual Pr into pieces. They just have to be reviewed together, or with expectation of a needed followup (and a revert if it does not appear). I have done this to get readable diffs for major refactorings that moved and edited multiple chunks of code in a large file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 15:39:04 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Fri, 07 Dec 2018 20:39:04 +0000 Subject: [issue31354] Fixing a bug related to LTO only build In-Reply-To: <1504648453.31.0.715065413662.issue31354@psf.upfronthosting.co.za> Message-ID: <1544215144.39.0.788709270274.issue31354@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Hi Ned, I recently pushed a fix on the master and 3.7 for this exact issue: https://bugs.python.org/issue35351 but it builds on top of https://github.com/python/cpython/pull/10922 which is not yet in 3.6. Thus 3.7 is fine for the rc cutoff. However there is another side effect of that change with the linker flags also leaking: https://bugs.python.org/issue35257 but it proved to be more complicated than what I initially thought to fix it. PR here: https://github.com/python/cpython/pull/10900 The issue is that I figured it wouldn't make it to the 3.6 branch as it would require extensive review due to the complexity of the build system and the requirement for extensive review to catch any possible regressions, thus it would be late for the rc cutoff. It would take some days to figure out everything I believe. Would it be possible to push that after rc1? Or maybe not fixing that would be better, deadline wise? I consider this an important issue but some more feedback is always welcome. Side note on your comment: The compiler used (CC) also seems to leak into distutils instead of the system default CC, on linux with 'python3 setup.py build'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 15:43:45 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 20:43:45 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544215425.82.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: Thanks Terry, great questions. > I want this to be and remain an added alternative rather than a replacement of the current installer directly available on python.org. Can you assure us that the latter are not going away? Absolutely. The current installer is not going anywhere, and there's no point considering the possibility until we've completely dropped support for Windows 10 1803 and earlier (which was only released this year, so dropping support is a long way out yet). > Installers are always experimental until tested by multiple users on multiple machines. Even then, installation specific issues can arise. ... To have a Windows Store Python ready for 3.8, we need to start now. Thanks for the vote of support for this point. > Steve, assuming that I can access the Store, should I be able to install both PSF 3.7.2 and Windows Store 3.7.2 simultaneously? So I could test both IDLEs that beginners might install? Yes, absolutely. (To be clear, both are PSF approved and under the PSF name/copyright/etc., so I've been calling them "traditional" and "Store" installers when I talk about them.) Also, I've been testing IDLE regularly, since one of the advantages of being in the Store is that we can safely put idle[3[.7]].exe on PATH. It definitely works :) I've also set up tests that run from an "installed" layout, rather than the source tree, and those are all passing as well (with one of the trivial test fixes in the PR). > I am curious what 'restricted' versus 'non restricted' mean to Windows Store, and why Python can now go there. In general, all app stores disallow their apps from doing things that may break or corrupt the machines they are installed on. Apps are self-contained and can only operate outside of their boundaries through carefully designed permissions/capabilities (which often prompt the user before continuing). Recently, Microsoft added support for "full trust" apps, which can bypass many of these restrictions. The aim is to allow traditional applications to swap their MSIs for being installed through the store, which can then ensure trustworthiness of at least the installers. (For example, a Store app is *never* going to install something into System32 or modify operating system files, whether it's full trust or not.) Full trust allows us to do things like launching non-app store processes and creating raw sockets through legacy APIs, so we can very easily move Python into a full trust package rather than having to rewrite it using approved APIs (a project that's been attempted a few times, but always loses low-level functionality that is considered a core part of Python - hence my long-term desire to make the low-level parts optional and have higher-level abstractions be the guaranteed parts). > While most PRs should be complete in themselves, reasons such as ease of review may suggest splitting one conceptual Pr into pieces. They just have to be reviewed together, or with expectation of a needed followup (and a revert if it does not appear). I have done this to get readable diffs for major refactorings that moved and edited multiple chunks of code in a large file. I agree that it's valuable and I've done it internally plenty of times. Unfortunately, no matter how much people repeatedly say that a PR for CPython is part of a chain, there always seems to be pushback from people who ignore that and won't approve a critical prerequisite because there's "no need". There's also the point that many of the changes were not known to be needed before the others were made. The pre-squash history is very interleaved between the various changes, and extracting them into separate PRs that totally stand alone is nearly as much work as solving the issues in the first place. I made the call this time to keep them all together and direct reviewers' attention towards the relevant parts. It turns out that didn't attract reviewers, so I'll come up with a new strategy next time I want to get people's attention on a change (maybe Buzzfeed style headlines? :) ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 15:47:01 2018 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 07 Dec 2018 20:47:01 +0000 Subject: [issue32417] fromutc does not respect datetime subclasses In-Reply-To: <1514052939.19.0.213398074469.issue32417@psf.upfronthosting.co.za> Message-ID: <1544215621.83.0.788709270274.issue32417@psf.upfronthosting.co.za> Paul Ganssle added the comment: > What's the use case for subclassing DateTime? These classes were not designed with subclassing as a use case in mind. There are several reasons for doing it, of various levels of legitimacy. The overall theme is that people want different behaviors from their datetime classes and they want to maintain drop-in compatibility with datetime so that you don't need to re-build the whole world of datetime-handling libraries if you want to adopt one of these alternative datetime providers. Ideally, you would tell people to just write API-compatible code and use duck-typing, but there's a lot of code in the standard library that uses `isinstance` checks, so things like `some_tzinfo.utcoffset(MyCoolDatetime.now())` will raise a TypeError. Two popular datetime frameworks arrow and pendulum, both use datetime subclasses. A lot of what they are providing is convenience methods that could easily be free functions, but they also need to be subclasses so that they can change things like the semantics of arithmetic. For example, one motivation for the creation of pendulum was that the creator wanted this invariant to hold true: assert dt1 == (dt1 - dt2) + dt2 This is basically due to the fact that in Python's datetime library, no distinction is made between "absolute deltas" (the absolute time between two events) and "calendar deltas", which makes subtraction or addition across DST boundaries ambiguous and occasionally lossy. Arithmetic semantics are one of the things about datetime I'd most love to change but for backwards compatibility reasons it's just not feasible. Another reason I've seen for subclassing datetime is that this is how dateutil provides its backport of PEP 495 (ambiguous datetime support). We have a datetime subclass called _DatetimeWithFold that supports the `fold` attribute, and is generated only when necessary (and does not exist in Python 3.6+). _DatetimeWithFold is not affected by this problem because PEP 495 specifies that the result of an arithmetic operation always sets fold to 0, but it *was* affected by the earlier (now fixed) bug where the subclass did not survive a `replace` operation. One last place I've seen datetime subclasses used is when you have a thin wrapper used for dispatch or other purposes where you are mapping between types. For example, at work we had to create mappings between python types and the types specified by a standard (developed for another language), but that standard specified both a datetime type (with millisecond precision) and a datetimeus type (with microsecond precision). The solution was a thin wrapper around datetime called DatetimeUs: https://github.com/bloomberg/python-comdb2/blob/master/comdb2/_cdb2_types.py#L62 Preventing operations from reverting to datetime was a bit of a pain, which is why we have a bunch of tests to check that the subclass survives basic operations: https://github.com/bloomberg/python-comdb2/blob/master/tests/test_cdb2_datetimeus.py#L95 Although it was not originally *designed* to be subclassed, support for datetime subclasses is already quite good. This timedelta issue is one of the last major issues to fix to make them truly subclass-friendly. I'll note also that for the past 9 years, the test suite has run all datetime tests against a "thin wrapper" subclass of datetime: https://github.com/python/cpython/blame/028f0ef4f3111d2b3fc5b971642e337ba7990873/Lib/test/datetimetester.py#L2802 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 16:11:44 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 07 Dec 2018 21:11:44 +0000 Subject: [issue35435] Documentation of 3.3 is available In-Reply-To: <1544164258.79.0.788709270274.issue35435@psf.upfronthosting.co.za> Message-ID: <1544217104.77.0.788709270274.issue35435@psf.upfronthosting.co.za> Ned Deily added the comment: > I think as it stands, this ticket is "not a bug". Indeed, this is not only not a bug, it's a feature that the docs for every Python release family are available on-line. That said, we do have two sets of URLs that point to these docs: 1. https://docs.python.org/release/x.y.z/ which is the canonical link to the docs for a particular release and linked to from https://www.python.org/doc/versions/ 2. https://docs.python.org/x.y/ (along with /x) which points to the most recent top of branch doc build for that branch. For the next feature release branch (master) and branches still in bug-fix mode, the docs are automatically updated several times a day. For 2.x and 3.x branches in security-fix mode or at end-of-life (retired), there are symlinks here that point to the doc set for the most recent release of that branch, i.e. the same doc set available in https://docs.python.org/release/x.y.z/. There is already in place a restriction in the robots.txt file for the docs.python.org server to not webcrawl anything under /release but there is nothing (AFAICT) telling webcrawlers to ignore the "symlinked" aliases at /x.y, and that would seem to be the case here. Without spending too much time on it, it seems to me there are s number of issues here: 1. What URL schemes do we have and want to continue to support? 2. What things do we want to show up in search engine results? 3. How do we make that happen? 4. How do we maintain this going forward? One possibility that comes to mind: 1. unchanged from today 2. just the most current 3.x maintenance release (e.g. today 3.7)? People needing accessing to other current or security-fix branches (dev, 3.6, 2.7, 3.5) can access those docsets through the version switcher pulldown on the doc webpages. 3. What isn't so obvious today is how to get to docsets for other, older releases. For that, perhaps we could add an "Other ..." or some such item to the version switcher list that would link to the complete list at https://www.python.org/doc/versions/ ? 4. If we think it is important to indefinitely provide the links at https://docs.python.org/x.y/ even after the release is retired, we could add a step to the release process to add an entry to robots.txt when a release enters security-fix-mode ? Or earlier? That gets back to question 2. I think this all is something for our release docs expert, Julien, to look into. ---------- assignee: docs at python -> mdk nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 16:13:02 2018 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 07 Dec 2018 21:13:02 +0000 Subject: [issue32417] fromutc does not respect datetime subclasses In-Reply-To: <1514052939.19.0.213398074469.issue32417@psf.upfronthosting.co.za> Message-ID: <1544217182.49.0.788709270274.issue32417@psf.upfronthosting.co.za> Guido van Rossum added the comment: OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 16:13:07 2018 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 07 Dec 2018 21:13:07 +0000 Subject: [issue32417] fromutc does not respect datetime subclasses In-Reply-To: <1514052939.19.0.213398074469.issue32417@psf.upfronthosting.co.za> Message-ID: <1544217187.7.0.788709270274.issue32417@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 16:18:49 2018 From: report at bugs.python.org (Paul Moore) Date: Fri, 07 Dec 2018 21:18:49 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1544215425.82.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: Paul Moore added the comment: > > Steve, assuming that I can access the Store, should I be able to install both PSF 3.7.2 and Windows Store 3.7.2 simultaneously? So I could test both IDLEs that beginners might install? > > Yes, absolutely. (To be clear, both are PSF approved and under the PSF name/copyright/etc., so I've been calling them "traditional" and "Store" installers when I talk about them.) I'd like to expand on this question a little. The first thing I'll note is that I'm not aware of any documentation on the Windows Store installer, and how it works. It's possible there's a docs patch in here somewhere, but to be honest, there are 8 PRs linked to this issue and I don't have the time to check them all right now. How will the Windows Store install work alongside the PSF one? Will it work the same, in that neither will go on PATH unless the user explicitly requests it? If I have PSF Python 3.7.1 and Store Python 3.7.2 simultaneously installed, which will py.exe -3.7 select? Can I influence it to choose the other one? Same question for 3rd party tools like "virtualenv -p 3.7" - I know it's not up to us to deal with virtualenv issues, but conversely I do think we have a responsibility to not change assumptions that 3rd party tools rely on. In terms of PEP 514, will the Store installer use a different tag, or some other way of having registry entries independent of the PSF installer? Basically, I'm not clear on how having the Store install and the PSF install simultaneously present will work - very few tools in my experience really support PEP 514 (not even the `py` launcher) - and frankly, if we're going to break tool assumptions that there's only one official "3.7" present at any time, we're on very shaky ground claiming that PEP 514 warned them if we haven't even updated our own supplied tool! (I know that there's lots of ways people can have multiple versions right now - PSF plus Anaconda, for example - but it's fine to say "you're mixing distributions, you're on your own" in that case. If the PSF is publishing two versions of 3.7, which can be simultaneously installed, we can't really use that argument. Paul ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 16:40:09 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 21:40:09 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544218809.38.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: > The first thing I'll note is that I'm not aware of any documentation > on the Windows Store installer, and how it works. Right now, correct. > How will the Windows Store install work alongside the PSF one? It will go into PATH under the same names as on other platforms (python, python3, python3.7, and same for pip and idle). The Windows Store makes it possible to do this reliably, so it's just on by default (and configurable through OS-provided UI for selecting the app to respond to a certain name). If you have already installed it traditionally and enabled the PATH modification, that will take precedence. So you'll get the MSI installed Python. If you've modified PATH by hand, it depends on where you put it. > If I have PSF Python 3.7.1 and Store Python > 3.7.2 simultaneously installed, which will py.exe -3.7 select? Can I > influence it to choose the other one? Same question for 3rd party > tools like "virtualenv -p 3.7" Right now, py.exe will not detect it. This is an unavoidable limitation right now (specifically, enumeration of classic app compatibility keys does not work, though direct access does), but it may become avoidable in the future (and being able to say "Python needs it" is actually going to be useful for removing the limitation). As usual, our recommended way to influence choice of Python is to specify it. "virtualenv -p 3.7" will find a traditionally installed Python first, but if it's not there and the store one is it *might* find the store one (it depends whether it requests the specific registry key or tries to enumerate all of them - again, I've got people looking into enabling enumeration, but we're talking about adding another feature to Windows specifically for Python, and those take time). > Basically, I'm not clear on how having the Store install and the PSF > install simultaneously present will work - very few tools in my > experience really support PEP 514 (not even the `py` launcher) - and > frankly, if we're going to break tool assumptions that there's only > one official "3.7" present at any time, we're on very shaky ground > claiming that PEP 514 warned them if we haven't even updated our own > supplied tool! (I know that there's lots of ways people can have > multiple versions right now - PSF plus Anaconda, for example - but > it's fine to say "you're mixing distributions, you're on your own" in > that case. If the PSF is publishing two versions of 3.7, which can be > simultaneously installed, we can't really use that argument. In all the cases I've tested, regular Python install shows up first. If it's not installed, the Store app shows up much of the time. This feels like the right design (with the caveat about "much of the time" requiring changes outside of our direct control), but without actually giving it to people in all their messy configurations there is literally no way to be sure. A regular install does not create "python3" and "python3.7" shortcuts on PATH, so if you use those you'll prefer the store app. But we've never used those, so there shouldn't be any change to existing behaviour. And I've never really been opposed to adding them to the Python installer, I just haven't done the work (and neither has anyone else) - I'd still be opposed to modifying PATH from the traditional installer though, as all of those problems remain. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 16:49:17 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 21:49:17 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544219357.69.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: > How will the Windows Store install work alongside the PSF one? Oh, and since I didn't mention it in my direct answer, the Store install goes to a totally different location (per machine, no elevation required), as do packages installed using pip (automatically per user). Nothing is shared between the two installs at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 16:51:29 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Dec 2018 21:51:29 +0000 Subject: [issue35383] lib2to3 raises ParseError on argument called "print" In-Reply-To: <1543832407.47.0.788709270274.issue35383@psf.upfronthosting.co.za> Message-ID: <1544219489.03.0.788709270274.issue35383@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In 2.x, 'print' is a reserved keyword and compiling foo fails with SyntaxError. AFAIK, 2to3 expects the input to be *valid* 2.x code that compiles. So it seems to me that the bug is in the input, not 2to3, and that this issue should be closed as 'not a bug'. ---------- nosy: +benjamin.peterson, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 17:32:49 2018 From: report at bugs.python.org (Ethan Smith) Date: Fri, 07 Dec 2018 22:32:49 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544221969.78.0.788709270274.issue34977@psf.upfronthosting.co.za> Change by Ethan Smith : ---------- nosy: +Ethan Smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 17:32:58 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Dec 2018 22:32:58 +0000 Subject: [issue35402] Upgrade macOS (and Windows?) installer to Tcl/Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544221978.56.0.788709270274.issue35402@psf.upfronthosting.co.za> Terry J. Reedy added the comment: ... and master. I believe for Windows the policy has been to stick with one tcl/tk version for a Python version. But I don't know that this is written on stone. If not too much trouble, I would like master updated occasionally during the a1 period rather than just once around b1. I am not sure about backports. ---------- nosy: +serhiy.storchaka, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 17:34:39 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Dec 2018 22:34:39 +0000 Subject: [issue35403] support application/wasm in mimetypes and http.server In-Reply-To: <1543911244.97.0.788709270274.issue35403@psf.upfronthosting.co.za> Message-ID: <1544222079.32.0.788709270274.issue35403@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 17:50:42 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 22:50:42 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544223042.2.0.788709270274.issue35401@psf.upfronthosting.co.za> Steve Dower added the comment: Bin and source dependency repos are updated - just needs the project updates now and testing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:10:25 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Dec 2018 23:10:25 +0000 Subject: [issue35435] Discourage external links to old docs. In-Reply-To: <1544164258.79.0.788709270274.issue35435@psf.upfronthosting.co.za> Message-ID: <1544224225.13.0.788709270274.issue35435@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I changed the title to better state the actual issue and goal of action. The termination solution is rejected, but further revisions to docs and site need not be. Adding the auto updated https://docs.python.org/3/ was a good move (and a reason to not casually go to a 4.0 release) but not the end of what we could do. I agree with Ned that easier internal access, such as through 'other...', would be nice. ---------- nosy: +terry.reedy stage: -> needs patch title: Documentation of 3.3 is available -> Discourage external links to old docs. type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:12:39 2018 From: report at bugs.python.org (Paul Moore) Date: Fri, 07 Dec 2018 23:12:39 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1544218809.38.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: Paul Moore added the comment: Thanks for the clarification. > In all the cases I've tested, regular Python install shows up first. If it's not installed, the Store app shows up much of the time. This feels like the right design (with the caveat about "much of the time" requiring changes outside of our direct control), but without actually giving it to people in all their messy configurations there is literally no way to be sure. Agreed, it does sound like it's probably the correct approach. But I'd strongly recommend that as much of the behaviour as possible gets documented as part of this change. There are a *lot* of projects out there that write code for Windows based on a relatively superficial understanding of all of the complexities that come into play here - most registry scanning code is based on guesswork and reverse engineering of how things worked before PEP 514 (I should know, I wrote rather a lot of it!!!) and plays fast and loose with even things like 32-bit/64-bit registry overlaying (it's late and I'm tired, sorry for not using the accurate term). Settig projects like virtualenv, tox, nox, pew, pipenv etc up for new bug reports associated with store installs, without any sort of guidance as to what's going on in the official docs, seems unfriendly at best. (I'm thinking of a section in "Python Setup and Usage" covering the store installer - that in addition to the changes in https://docs.python.org/3.7/using/windows.html#installation-steps needed to mention that there's now five installers available). > A regular install does not create "python3" and "python3.7" shortcuts on PATH, so if you use those you'll prefer the store app. But we've never used those, so there shouldn't be any change to existing behaviour. And I've never really been opposed to adding them to the Python installer, I just haven't done the work (and neither has anyone else) - I'd still be opposed to modifying PATH from the traditional installer though, as all of those problems remain. The "pythonup" project (https://github.com/uranusjr/pythonup-windows) creates versioned copies of python - python3.7.exe. Again, it's a non-standard project, so not technically our problem, but I'd be interested in how it would interact with the Store python. I do appreciate that we need to get the store installer out there in order to test things like this, and that initially at least there aren't going to be a huge number of people using the store installer over the traditional one (and likely vanishingly small numbers of people using both in parallel). But conversely, there's a class of problems that will be reported to other projects rather than to us, and I think we should be trying to support those other projects in dealing with this change, not simply leaving it up to them to find out about it (I doubt they'd even know to ask "did you use the store install or the traditional one" when diagnosing a problem). In general, I don't think we've done that great a job of publicising the various install options on Windows - we still get pip users trying to install packages into the embedded distribution, which they are using as if it were a standalone interpreter, and as far as I can tell essentially no-one knows about the nuget packages for Python. Let's not repeat the mistakes we've made previously with this new distribution option. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:26:00 2018 From: report at bugs.python.org (Eddie Elizondo) Date: Fri, 07 Dec 2018 23:26:00 +0000 Subject: [issue35438] Extension modules using non-API functions Message-ID: <1544225159.96.0.788709270274.issue35438@psf.upfronthosting.co.za> New submission from Eddie Elizondo : Three extension modules: _testcapimodule.c, posixmodule.c, and mathmodule.c are using `_PyObject_LookupSpecial` which is not API. These should instead use `PyObject_GetAttrString`, `PyType_GetSlot`. ---------- components: Library (Lib) messages: 331364 nosy: eelizondo priority: normal severity: normal status: open title: Extension modules using non-API functions type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:30:44 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 07 Dec 2018 23:30:44 +0000 Subject: [issue33747] Failed separate test_patch_propogrates_exc_on_exit in test_unittest In-Reply-To: <1528027150.62.0.592728768989.issue33747@psf.upfronthosting.co.za> Message-ID: <1544225444.36.0.788709270274.issue33747@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 3cf74384b53b998fa846dc2590cedf9ad2a0d5fd by Brett Cannon (Anirudha Bose) in branch 'master': bpo-33747: Avoid mutating the global sys.modules dict in unittest.mock tests (GH-8520) https://github.com/python/cpython/commit/3cf74384b53b998fa846dc2590cedf9ad2a0d5fd ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:31:01 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Dec 2018 23:31:01 +0000 Subject: [issue33747] Failed separate test_patch_propogrates_exc_on_exit in test_unittest In-Reply-To: <1528027150.62.0.592728768989.issue33747@psf.upfronthosting.co.za> Message-ID: <1544225461.82.0.788709270274.issue33747@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10268 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:31:14 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Dec 2018 23:31:14 +0000 Subject: [issue33747] Failed separate test_patch_propogrates_exc_on_exit in test_unittest In-Reply-To: <1528027150.62.0.592728768989.issue33747@psf.upfronthosting.co.za> Message-ID: <1544225474.67.0.788709270274.issue33747@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10269 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:36:38 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 07 Dec 2018 23:36:38 +0000 Subject: [issue35376] modulefinder skips nested modules with same name as top-level bad module In-Reply-To: <1543762855.5.0.788709270274.issue35376@psf.upfronthosting.co.za> Message-ID: <1544225798.85.0.788709270274.issue35376@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:36:50 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 07 Dec 2018 23:36:50 +0000 Subject: [issue35376] modulefinder skips nested modules with same name as top-level bad module In-Reply-To: <1543762855.5.0.788709270274.issue35376@psf.upfronthosting.co.za> Message-ID: <1544225810.56.0.788709270274.issue35376@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- nosy: +jvr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:37:37 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 07 Dec 2018 23:37:37 +0000 Subject: [issue35376] modulefinder skips nested modules with same name as top-level bad module In-Reply-To: <1543762855.5.0.788709270274.issue35376@psf.upfronthosting.co.za> Message-ID: <1544225857.93.0.788709270274.issue35376@psf.upfronthosting.co.za> Brett Cannon added the comment: PRs should always be against 'master' unless the issue is already fixed there. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:37:45 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 07 Dec 2018 23:37:45 +0000 Subject: [issue35376] modulefinder skips nested modules with same name as top-level bad module In-Reply-To: <1543762855.5.0.788709270274.issue35376@psf.upfronthosting.co.za> Message-ID: <1544225865.92.0.788709270274.issue35376@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:40:31 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 07 Dec 2018 23:40:31 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544226031.42.0.788709270274.issue35431@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- title: The math module should provide a function for computing binomial coefficients -> Add a function for computing binomial coefficients to the math module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:41:45 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 07 Dec 2018 23:41:45 +0000 Subject: [issue35429] Incorrect use of raise NotImplemented In-Reply-To: <1544126518.18.0.788709270274.issue35429@psf.upfronthosting.co.za> Message-ID: <1544226105.45.0.788709270274.issue35429@psf.upfronthosting.co.za> Brett Cannon added the comment: This was fixed by https://github.com/python/cpython/pull/10934 ---------- nosy: +brett.cannon stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:45:09 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Dec 2018 23:45:09 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544226309.31.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: > In general, I don't think we've done that great a job of publicising > the various install options on Windows - we still get pip users trying > to install packages into the embedded distribution, which they are > using as if it were a standalone interpreter, and as far as I can tell > essentially no-one knows about the nuget packages for Python. Let's > not repeat the mistakes we've made previously with this new > distribution option. Yeah, and these are all essentially my fault (though I documented the embeddable package relatively well, modulo a few uses I hadn't imagined). Maybe my holiday writing project can be some better docs for choosing how to install Python, especially since if/when this merges we'll finally have a good answer for "installing from a build without the installer" (using the PC/layout script, which *sigh* also needs a big fat manual). I feel like right now there's enough here that isn't quite locked down and I don't want to guarantee it. For example, in a future release of Windows we may be able to enable it to write to the actual %APPDATA% folder instead of an app-private one - should we document the current paths and then "break" it in the future? Or should we document that using the "Reset app" features will clean up everything fully now, knowing that if we change the %APPDATA% location later then _that_ will break? So for now, I want an unguaranteed store package that can be used but may change over time (and I'll update the text on the page to reflect that). Now is not the time to lock in all aspects of how it works, exactly as you say. But please hold me accountable for adding specific docs for the first 3.8 release - hopefully it's clear by then (if not earlier) what behavior we're happy with. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:53:02 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 07 Dec 2018 23:53:02 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544226031.45.0.702299269573.issue35431@psf.upfronthosting.co.za> Message-ID: <20181207235256.GF13061@ando.pearwood.info> Steven D'Aprano added the comment: Brett, what was the purpose of the title change? > title: The math module should provide a function for computing > binomial coefficients -> Add a function for computing binomial > coefficients to the math module ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 19:26:46 2018 From: report at bugs.python.org (Arturo Inzunza) Date: Sat, 08 Dec 2018 00:26:46 +0000 Subject: [issue35439] New class instance not initializing variables of type list Message-ID: <1544228806.94.0.788709270274.issue35439@psf.upfronthosting.co.za> New submission from Arturo Inzunza : List type variables in a class are not reset on new instances of the class. Example: class Klazz: lst = [] def __init__(self, va): print(self.lst) self.lst.append(va) k = Klazz(1) [] -> This is correct as the lst value is empty on class instantiation k2 = Klazz(2) [1] -> This is wrong, a totally new instance of the class retains the value of a previous class instance lst variable k3 = Klazz(3) [1, 2] -> And so on... new instances all share the same list ---------- messages: 331370 nosy: Arturo Inzunza priority: normal severity: normal status: open title: New class instance not initializing variables of type list versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 19:43:21 2018 From: report at bugs.python.org (Ammar Askar) Date: Sat, 08 Dec 2018 00:43:21 +0000 Subject: [issue35439] New class instance not initializing variables of type list In-Reply-To: <1544228806.94.0.788709270274.issue35439@psf.upfronthosting.co.za> Message-ID: <1544229801.09.0.788709270274.issue35439@psf.upfronthosting.co.za> Ammar Askar added the comment: This is expected behavior, take a look at this section in the tutorial on classes: https://docs.python.org/3/tutorial/classes.html#class-and-instance-variables Unlike say Java, member variables need to be initialized in the constructor. ---------- nosy: +ammar2 resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 20:50:03 2018 From: report at bugs.python.org (Eddie Elizondo) Date: Sat, 08 Dec 2018 01:50:03 +0000 Subject: [issue35438] Extension modules using non-API functions In-Reply-To: <1544225159.96.0.788709270274.issue35438@psf.upfronthosting.co.za> Message-ID: <1544233803.92.0.788709270274.issue35438@psf.upfronthosting.co.za> Eddie Elizondo added the comment: Correction, this is not as trivial as just using `PyObject_GetAttrString`. Will investigate the correct behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 22:01:12 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Sat, 08 Dec 2018 03:01:12 +0000 Subject: [issue35438] Extension modules using non-API functions In-Reply-To: <1544225159.96.0.788709270274.issue35438@psf.upfronthosting.co.za> Message-ID: <1544238072.86.0.788709270274.issue35438@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Batteries-included extension modules aren't limited to the public and/or limited API; they use tons of undocumented internal APIs (everything to do with Py_IDENTIFIERs being an obvious and frequently used non-public API). _PyObject_LookupSpecial is necessary to lookup special methods on the class of an instance (bypassing the instance itself) when no C level slot is associated with the special method (e.g. the math module using it to look up __ceil__ to implement math.ceil). Sure, each of these modules could reimplement it from scratch, but I'm not seeing the point in doing so. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 02:05:02 2018 From: report at bugs.python.org (Martin Panter) Date: Sat, 08 Dec 2018 07:05:02 +0000 Subject: [issue35383] lib2to3 raises ParseError on argument called "print" In-Reply-To: <1543832407.47.0.788709270274.issue35383@psf.upfronthosting.co.za> Message-ID: <1544252702.47.0.788709270274.issue35383@psf.upfronthosting.co.za> Martin Panter added the comment: Previous related reports: * Issue 35260: ?2to3? doesn?t parse Python 3?s ?print? function by default because it is supposed to translate Python 2 syntax * Issue 2412: ?2to3? should support ?from __future__ import print_function?. That frees up the ?print? reserved keyword in Python 2.6+. ---------- nosy: +martin.panter resolution: -> not a bug stage: -> resolved status: open -> closed superseder: -> 2to3 Parse Error on Python 3 print() with arguments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 04:05:58 2018 From: report at bugs.python.org (Kamaal Khan) Date: Sat, 08 Dec 2018 09:05:58 +0000 Subject: [issue35440] Setup failed 0x80072f7d - Unspecified error Message-ID: <1544259957.98.0.788709270274.issue35440@psf.upfronthosting.co.za> New submission from Kamaal Khan : I've been trying to install version 3.7.1 64-bit but it keeps on giving me that error. Tried fixing it by installing KB2999226, but to no avail. Been running the install file as admin too. Using Windows 7. Install log is attached. ---------- components: Windows files: Python 3.7.1 (64-bit) log.txt messages: 331375 nosy: DesignEngineer, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Setup failed 0x80072f7d - Unspecified error type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file47981/Python 3.7.1 (64-bit) log.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 05:04:58 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 08 Dec 2018 10:04:58 +0000 Subject: [issue35441] Dead (and buggy) code due to mishandling of PyList_SetItem() errors Message-ID: <1544263498.57.0.788709270274.issue35441@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- components: Extension Modules nosy: ZackerySpytz priority: normal severity: normal status: open title: Dead (and buggy) code due to mishandling of PyList_SetItem() errors type: behavior versions: Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 05:05:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2018 10:05:46 +0000 Subject: [issue35441] Dead (and buggy) code due to mishandling of PyList_SetItem() errors Message-ID: <1544263546.24.0.788709270274.issue35441@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 05:07:40 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 08 Dec 2018 10:07:40 +0000 Subject: [issue35441] Dead (and buggy) code due to mishandling of PyList_SetItem() errors Message-ID: <1544263660.5.0.788709270274.issue35441@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +10270 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 05:24:08 2018 From: report at bugs.python.org (Julien Palard) Date: Sat, 08 Dec 2018 10:24:08 +0000 Subject: [issue35435] Discourage external links to old docs. In-Reply-To: <1544164258.79.0.788709270274.issue35435@psf.upfronthosting.co.za> Message-ID: <1544264648.38.0.788709270274.issue35435@psf.upfronthosting.co.za> Julien Palard added the comment: > Without spending too much time on it, it seems to me there are s number of issues here: > 1. What URL schemes do we have and want to continue to support? > 2. What things do we want to show up in search engine results? > 3. How do we make that happen? > 4. How do we maintain this going forward? 1. unchanged from today is good: let's not break things. 2. agree too: just the most current 3.x maintenance release 3. By adding links from old releases to new releases, go new releases get weight (from a search engine point of view) and should rank better. Also by checking if the canonical header is configured properly on all releases. 4. I don't think hiding old pages from search engine is a good idea, it's lying to them. I'd prefer the way of linking from old to new, which is both user friendly (a) and search engine friendly (b). a) A nice text like "This is the documentation of an unmaintained version of Python, [switch to the latest version]" will not only help people landing from this old page from a search engine but also from favorites, links from articles, ... b) Search engine compute the "weight" of a page by adding weights of pages linking to it. Our old pages are linked from a lot of articles and various sources, they have a huge weight. Linking from those pages to our new pages will forward a part of this weight to our new pages, ranking them a bit better. Which is I think better than hiding the old pages from them and loosing the weight they accumulated (risk: get old blogs articles rank better than new official documentation). About the canonical, I'm having an issue opened indirectly about it (https://github.com/python/docsbuild-scripts/issues/51), by rebuilding old releases we could upgrade their headers and properly set a canonical link, typically from /3.4/ to /3/, like we're currently having from /3.5/ to /3/. I have an opened issue about handling the /release/ directory from docsbuild-scripts instead of it being a manual step in the release process (https://github.com/python/docsbuild-scripts/issues/48). I opened an issue in python-docs-theme about displaying a message pointing from old releases to new releases https://github.com/python/python-docs-theme/issues/24 mainly not to forgot about it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:06:52 2018 From: report at bugs.python.org (Paul Moore) Date: Sat, 08 Dec 2018 11:06:52 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1544226309.31.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: Paul Moore added the comment: > Yeah, and these are all essentially my fault (though I documented the embeddable package relatively well, modulo a few uses I hadn't imagined). Maybe my holiday writing project can be some better docs for choosing how to install Python, especially since if/when this merges we'll finally have a good answer for "installing from a build without the installer" (using the PC/layout script, which *sigh* also needs a big fat manual). Sorry about that - I wasn't trying to make you feel guilty! And yes, the embeddable package docs are very good. The problem with that one is mostly that people don't *read* the docs (but having them to point to makes responding to pip issues much easier, so you have my gratitude there :-) > I feel like right now there's enough here that isn't quite locked down and I don't want to guarantee it. For example, in a future release of Windows we may be able to enable it to write to the actual %APPDATA% folder instead of an app-private one - should we document the current paths and then "break" it in the future? Or should we document that using the "Reset app" features will clean up everything fully now, knowing that if we change the %APPDATA% location later then _that_ will break? > > So for now, I want an unguaranteed store package that can be used but may change over time (and I'll update the text on the page to reflect that). Now is not the time to lock in all aspects of how it works, exactly as you say. But please hold me accountable for adding specific docs for the first 3.8 release - hopefully it's clear by then (if not earlier) what behavior we're happy with. In which case, let's have a placeholder note in the docs, saying that the Windows Store installer exists, but it's experimental and may have unexpected interactions with other tools that expect a standard Python install. Users trying the Windows Store installer should be prepared for such issues, and we'd appreciate reports so that we can address them. Add that to the release announcement as well for extra visibility. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:25:07 2018 From: report at bugs.python.org (Chris Withers) Date: Sat, 08 Dec 2018 11:25:07 +0000 Subject: [issue35330] When using mock to wrap an existing object, side_effect requires return_value In-Reply-To: <1543339599.43.0.788709270274.issue35330@psf.upfronthosting.co.za> Message-ID: <1544268307.11.0.788709270274.issue35330@psf.upfronthosting.co.za> Chris Withers added the comment: New changeset f05df0a4b679d0acfd0b1fe6187ba2d553b37afa by Chris Withers (Mario Corchero) in branch 'master': bpo-35330: Don't call the wrapped object if `side_effect` is set (GH10973) https://github.com/python/cpython/commit/f05df0a4b679d0acfd0b1fe6187ba2d553b37afa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:25:40 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Dec 2018 11:25:40 +0000 Subject: [issue35330] When using mock to wrap an existing object, side_effect requires return_value In-Reply-To: <1543339599.43.0.788709270274.issue35330@psf.upfronthosting.co.za> Message-ID: <1544268340.44.0.788709270274.issue35330@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10271 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:25:48 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Dec 2018 11:25:48 +0000 Subject: [issue35330] When using mock to wrap an existing object, side_effect requires return_value In-Reply-To: <1543339599.43.0.788709270274.issue35330@psf.upfronthosting.co.za> Message-ID: <1544268348.39.0.788709270274.issue35330@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10272 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:36:16 2018 From: report at bugs.python.org (Anirudha Bose) Date: Sat, 08 Dec 2018 11:36:16 +0000 Subject: [issue35292] Make SimpleHTTPRequestHandler load mimetypes lazily In-Reply-To: <1542822100.42.0.788709270274.issue35292@psf.upfronthosting.co.za> Message-ID: <1544268976.13.0.788709270274.issue35292@psf.upfronthosting.co.za> Change by Anirudha Bose : ---------- keywords: +patch pull_requests: +10273 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:41:57 2018 From: report at bugs.python.org (Chris Withers) Date: Sat, 08 Dec 2018 11:41:57 +0000 Subject: [issue35330] When using mock to wrap an existing object, side_effect requires return_value In-Reply-To: <1543339599.43.0.788709270274.issue35330@psf.upfronthosting.co.za> Message-ID: <1544269317.42.0.788709270274.issue35330@psf.upfronthosting.co.za> Chris Withers added the comment: New changeset 12b9fb603eea9298c835bae5b8742db4fa52892e by Chris Withers (Miss Islington (bot)) in branch '3.6': bpo-35330: Don't call the wrapped object if `side_effect` is set (GH11034) https://github.com/python/cpython/commit/12b9fb603eea9298c835bae5b8742db4fa52892e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:47:03 2018 From: report at bugs.python.org (Chris Withers) Date: Sat, 08 Dec 2018 11:47:03 +0000 Subject: [issue35330] When using mock to wrap an existing object, side_effect requires return_value In-Reply-To: <1543339599.43.0.788709270274.issue35330@psf.upfronthosting.co.za> Message-ID: <1544269623.87.0.788709270274.issue35330@psf.upfronthosting.co.za> Chris Withers added the comment: New changeset ee2c5a8e2dcf662048dbcf4e49af9b4aaf81f7d3 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-35330: Don't call the wrapped object if `side_effect` is set (GH11035) https://github.com/python/cpython/commit/ee2c5a8e2dcf662048dbcf4e49af9b4aaf81f7d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:47:36 2018 From: report at bugs.python.org (Chris Withers) Date: Sat, 08 Dec 2018 11:47:36 +0000 Subject: [issue35330] When using mock to wrap an existing object, side_effect requires return_value In-Reply-To: <1543339599.43.0.788709270274.issue35330@psf.upfronthosting.co.za> Message-ID: <1544269656.79.0.788709270274.issue35330@psf.upfronthosting.co.za> Change by Chris Withers : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 07:05:57 2018 From: report at bugs.python.org (pmpp) Date: Sat, 08 Dec 2018 12:05:57 +0000 Subject: [issue35292] Make SimpleHTTPRequestHandler load mimetypes lazily In-Reply-To: <1542822100.42.0.788709270274.issue35292@psf.upfronthosting.co.za> Message-ID: <1544270757.93.0.788709270274.issue35292@psf.upfronthosting.co.za> pmpp added the comment: > and potentially other platforms? strangely, it does not. but adding a blocking read on first requests may ruin profiling data on any platform. isn't http.server reserved for instrumentation and testing ? ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 09:17:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2018 14:17:02 +0000 Subject: [issue35441] Dead (and buggy) code due to mishandling of PyList_SetItem() errors Message-ID: <1544278622.71.0.788709270274.issue35441@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : New changeset 99d56b53560b3867844472ae381fb3f858760621 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-35441: Remove dead and buggy code related to PyList_SetItem(). (GH-11033) https://github.com/python/cpython/commit/99d56b53560b3867844472ae381fb3f858760621 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 09:17:20 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Dec 2018 14:17:20 +0000 Subject: [issue35441] Dead (and buggy) code due to mishandling of PyList_SetItem() errors In-Reply-To: <1544278622.71.0.788709270274.issue35441@psf.upfronthosting.co.za> Message-ID: <1544278640.25.0.788709270274.issue35441@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10274 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 09:17:42 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Dec 2018 14:17:42 +0000 Subject: [issue35441] Dead (and buggy) code due to mishandling of PyList_SetItem() errors In-Reply-To: <1544278622.71.0.788709270274.issue35441@psf.upfronthosting.co.za> Message-ID: <1544278662.77.0.788709270274.issue35441@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10275 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 09:34:53 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Dec 2018 14:34:53 +0000 Subject: [issue35441] Dead (and buggy) code due to mishandling of PyList_SetItem() errors In-Reply-To: <1544278622.71.0.788709270274.issue35441@psf.upfronthosting.co.za> Message-ID: <1544279693.01.0.788709270274.issue35441@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8b7d8ac09cc0f736d0c3a39d838814d7ae253021 by Miss Islington (bot) in branch '3.7': bpo-35441: Remove dead and buggy code related to PyList_SetItem(). (GH-11033) https://github.com/python/cpython/commit/8b7d8ac09cc0f736d0c3a39d838814d7ae253021 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 09:39:40 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Dec 2018 14:39:40 +0000 Subject: [issue35441] Dead (and buggy) code due to mishandling of PyList_SetItem() errors In-Reply-To: <1544278622.71.0.788709270274.issue35441@psf.upfronthosting.co.za> Message-ID: <1544279980.04.0.788709270274.issue35441@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 25555e0fbed15f809a247c7e16ab9d0a0088f806 by Miss Islington (bot) in branch '3.6': bpo-35441: Remove dead and buggy code related to PyList_SetItem(). (GH-11033) https://github.com/python/cpython/commit/25555e0fbed15f809a247c7e16ab9d0a0088f806 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 09:59:08 2018 From: report at bugs.python.org (Danish Prakash) Date: Sat, 08 Dec 2018 14:59:08 +0000 Subject: [issue31823] Opaque default value for close_fds argument in Popen.__init__ In-Reply-To: <1508445256.4.0.213398074469.issue31823@psf.upfronthosting.co.za> Message-ID: <1544281148.42.0.788709270274.issue31823@psf.upfronthosting.co.za> Change by Danish Prakash : ---------- keywords: +patch pull_requests: +10276 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 10:14:00 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 08 Dec 2018 15:14:00 +0000 Subject: [issue35440] Setup failed 0x80072f7d - Unspecified error In-Reply-To: <1544259957.98.0.788709270274.issue35440@psf.upfronthosting.co.za> Message-ID: <1544282040.81.0.788709270274.issue35440@psf.upfronthosting.co.za> Steve Dower added the comment: It looks like you're not able to download the debug symbol packages from your machine. This may be a network issue or perhaps a totally disconnected machine? If you run setup with the "/layout [directory]" option on a machine with internet access it will give you all the possible installation files. Then you can transfer these to the other machine and install without needing network access. Alternatively, deselect any install options that say "Download". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 10:17:50 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 08 Dec 2018 15:17:50 +0000 Subject: [issue35292] Make SimpleHTTPRequestHandler load mimetypes lazily In-Reply-To: <1542822100.42.0.788709270274.issue35292@psf.upfronthosting.co.za> Message-ID: <1544282270.73.0.788709270274.issue35292@psf.upfronthosting.co.za> Steve Dower added the comment: Instrumentation is not the same thing as profiling, and this one is certainly not intended for performance. That said, simply importing it shouldn't impact anyone else's performance either, and since six imports this, fixing it will have a pretty broad impact. Thanks for the PR - I'll look when I get a chance, but most of my time is going towards the next 3.7 release right now. Feel free to ping me on here in a week if nobody has had a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 10:46:30 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 08 Dec 2018 15:46:30 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544283990.47.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: > In which case, let's have a placeholder note in the docs, saying that > the Windows Store installer exists, but it's experimental and may have > unexpected interactions with other tools that expect a standard Python > install. Users trying the Windows Store installer should be prepared > for such issues, and we'd appreciate reports so that we can address > them. Add that to the release announcement as well for extra > visibility. Sure, but first I need PR 11029 (and 11030 the backport) approved, so that I can rebase and work on redoing the other half of the change. Victor seems to have disappeared for the weekend, but I made all his requested changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 11:33:41 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Sat, 08 Dec 2018 16:33:41 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544286821.11.0.788709270274.issue35433@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Not to be impatient or anything, but this change is keeping my buildbot from being useful. Would it be possible for someone to merge as it has already been approved (msg331263). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 11:36:10 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 08 Dec 2018 16:36:10 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544286970.59.0.788709270274.issue35433@psf.upfronthosting.co.za> Steve Dower added the comment: Did you see my comment about converting the version numbers to System.Version before comparing? (I didn't know it could be done the first time I looked :) ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 13:35:08 2018 From: report at bugs.python.org (kernc) Date: Sat, 08 Dec 2018 18:35:08 +0000 Subject: [issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes In-Reply-To: <1536622594.77.0.0269046726804.issue34624@psf.upfronthosting.co.za> Message-ID: <1544294108.43.0.788709270274.issue34624@psf.upfronthosting.co.za> Change by kernc : ---------- nosy: +kernc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 13:38:17 2018 From: report at bugs.python.org (Maarten ter Huurne) Date: Sat, 08 Dec 2018 18:38:17 +0000 Subject: [issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used In-Reply-To: <1359599707.26.0.771342463799.issue17088@psf.upfronthosting.co.za> Message-ID: <1544294297.77.0.788709270274.issue17088@psf.upfronthosting.co.za> Maarten ter Huurne added the comment: I was working on what I thought would be an elegant solution to this problem: for non-qualified attributes, add the element's namespace before accessing the cache and strip the namespace prefix after accessing the cache if it's equal to the element's prefix. However, this approach doesn't work: even though non-qualified attributes will be processed like they are the element's namespace, they are considered to have no namespace. This means is considered valid XML, even though it effectively defines the same attribute twice. https://www.w3.org/TR/REC-xml-names/#uniqAttrs In my opinion the spec made a silly choice here, but that's probably not something that can fixed anymore. I haven't decided yet whether I'll make another attempt at fixing this issue. In any case, I hope this tale of caution benefits someone. ---------- nosy: +mthuurne _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 14:15:31 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Dec 2018 19:15:31 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544296531.35.0.788709270274.issue34977@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: -terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 14:46:27 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Dec 2018 19:46:27 +0000 Subject: [issue23874] Encrypted MSI fails to install with code 2755 In-Reply-To: <1428199707.15.0.13472678589.issue23874@psf.upfronthosting.co.za> Message-ID: <1544298387.25.0.788709270274.issue23874@psf.upfronthosting.co.za> Terry J. Reedy added the comment: For 3.x, this is out of date. Since 3.5, Windows installers are .exe, not .msi. There will be no more 3.4 installers. For 2.x, there should be at most 3 more releases. But the .msi installer author has been inactive since before this was opened. Given the rarity of the problem, the workaround of decrypting the file back to what we distribute, and the possibly of introducing a regression that only shows up after a release, I am confident that no one else wants to touch this. So closing as won't fix. ---------- nosy: +terry.reedy resolution: -> wont fix stage: -> resolved status: open -> closed versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 15:25:13 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 08 Dec 2018 20:25:13 +0000 Subject: [issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used In-Reply-To: <1359599707.26.0.771342463799.issue17088@psf.upfronthosting.co.za> Message-ID: <1544300713.14.0.788709270274.issue17088@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 16:20:39 2018 From: report at bugs.python.org (pmpp) Date: Sat, 08 Dec 2018 21:20:39 +0000 Subject: [issue35292] Make SimpleHTTPRequestHandler load mimetypes lazily In-Reply-To: <1542822100.42.0.788709270274.issue35292@psf.upfronthosting.co.za> Message-ID: <1544304039.05.0.788709270274.issue35292@psf.upfronthosting.co.za> pmpp added the comment: ??? i never compared Instrumentation and profiling and what getting delta timing about the script behind the first http request has to do with performance ? <= that's actually another question thefirst was : isn't http.server reserved for instrumentation and testing (because lazy loading seems a production feature to me ) ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 16:58:49 2018 From: report at bugs.python.org (Victor Porton) Date: Sat, 08 Dec 2018 21:58:49 +0000 Subject: [issue35442] Chain of several subcommands in argparse Message-ID: <1544306329.79.0.788709270274.issue35442@psf.upfronthosting.co.za> New submission from Victor Porton : We should consider some way to implement argparse functionality asked here: https://stackoverflow.com/q/53686523/856090 It is unclear how exactly to do this. This message is a call to discuss what should be the information format and API. The awful thing is that I may need to write my own command line parser, as current argparse seems to be unable to provide this functionality. I think, I will implement this for my program sooner or later but the idea to write my own analogue of argparse somehow terrifies me. ---------- components: Library (Lib) messages: 331393 nosy: porton priority: normal severity: normal status: open title: Chain of several subcommands in argparse type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 17:13:48 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 08 Dec 2018 22:13:48 +0000 Subject: [issue35292] Make SimpleHTTPRequestHandler load mimetypes lazily In-Reply-To: <1542822100.42.0.788709270274.issue35292@psf.upfronthosting.co.za> Message-ID: <1544307228.18.0.788709270274.issue35292@psf.upfronthosting.co.za> Steve Dower added the comment: If you weren't conflating profiling and instrumentation then your original comment makes no sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 17:17:16 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 08 Dec 2018 22:17:16 +0000 Subject: [issue35292] Make SimpleHTTPRequestHandler load mimetypes lazily In-Reply-To: <1542822100.42.0.788709270274.issue35292@psf.upfronthosting.co.za> Message-ID: <1544307436.72.0.788709270274.issue35292@psf.upfronthosting.co.za> Steve Dower added the comment: (Sorry, page submitted while I was still typing for some reason.) ... Instrumentation for everything other than time is unaffected, so if you didn't mean to conflate them, then no there is no impact on the documented use. Yes, moving mimetypes.init to the first request will make the first request slower. However, it makes *import* faster, and there should not be a significant penalty just for importing this module. You can trivially front-load the work in your app by calling mimetypes.init yourself, which will reduce the overhead on first request to a dict copy (I assume, haven't looked at the PR yet). Or just don't measure the first request - it's typical to do some warm-up loops when profiling. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 17:21:19 2018 From: report at bugs.python.org (pmpp) Date: Sat, 08 Dec 2018 22:21:19 +0000 Subject: [issue35292] Make SimpleHTTPRequestHandler load mimetypes lazily In-Reply-To: <1542822100.42.0.788709270274.issue35292@psf.upfronthosting.co.za> Message-ID: <1544307679.62.0.788709270274.issue35292@psf.upfronthosting.co.za> pmpp added the comment: the PR as it is actually add a blocking read (and maybe exceptions or whatever mimetypes modules decide to do) in processing of the first request to server, which has nothing to do with the code serving that request. I agree that makes no sense at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 17:48:02 2018 From: report at bugs.python.org (Eryk Sun) Date: Sat, 08 Dec 2018 22:48:02 +0000 Subject: [issue35440] Setup failed 0x80072f7d - Unspecified error In-Reply-To: <1544259957.98.0.788709270274.issue35440@psf.upfronthosting.co.za> Message-ID: <1544309282.58.0.788709270274.issue35440@psf.upfronthosting.co.za> Eryk Sun added the comment: For what it's worth, 0x8007XXXX indicates a Windows error, which in this case is ERROR_INTERNET_SECURITY_CHANNEL_ERROR (12157 or 0x2f7d) [1]: "the application experienced an internal error loading the SSL libraries". [1]: https://docs.microsoft.com/en-us/windows/desktop/WinInet/wininet-errors ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 18:31:52 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 08 Dec 2018 23:31:52 +0000 Subject: [issue35292] Make SimpleHTTPRequestHandler load mimetypes lazily In-Reply-To: <1542822100.42.0.788709270274.issue35292@psf.upfronthosting.co.za> Message-ID: <1544311912.66.0.788709270274.issue35292@psf.upfronthosting.co.za> Steve Dower added the comment: > I agree that makes no sense at all. I have to admit I have no idea what you're trying to argue or suggesting as an alternative. Could you try clearly explaining the change you'd rather see to fix the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 18:45:16 2018 From: report at bugs.python.org (pmpp) Date: Sat, 08 Dec 2018 23:45:16 +0000 Subject: [issue35292] Make SimpleHTTPRequestHandler load mimetypes lazily In-Reply-To: <1542822100.42.0.788709270274.issue35292@psf.upfronthosting.co.za> Message-ID: <1544312716.4.0.788709270274.issue35292@psf.upfronthosting.co.za> pmpp added the comment: sorry i was on my free time when enumerating profiling/instrumentation and testing. given now you pay attention i'll try to explain more. instrumentation : what does that server actually support ? eg writing a test for a specific mimitype support eg https://bugs.python.org/issue35403 profiling: i just want to time the first request to a service, ie without learning all the art of warming up a *one liner* http server with bare hands. testing: i want to test the servicing code, not receive error because mimetypes module may have failed late and server should not have started *at all* since it is a critical component of it. how to fix the issue ? as i said earlier, strangely "other platforms" don't have that issue so maybe the problem is in mimetypes module. So my position is "keep it that way" and investigate the slowdown at import on concerned platform. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 18:55:35 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 08 Dec 2018 23:55:35 +0000 Subject: [issue35292] Make SimpleHTTPRequestHandler load mimetypes lazily In-Reply-To: <1542822100.42.0.788709270274.issue35292@psf.upfronthosting.co.za> Message-ID: <1544313335.52.0.788709270274.issue35292@psf.upfronthosting.co.za> Steve Dower added the comment: So, you're suggesting doing a lazy mimetypes.init() on Windows and not on the others? There's no reason to have such a semantic difference between platforms, and since the whole point of mimetypes.init() is to avoid initializing on import, it makes the most sense to avoid initializing on import. In fact, it probably makes the *most* sense for http.server to have its own overrides, but otherwise fall back to the mimetypes function when needed. Bypassing the public API doesn't really add anything other than fragility. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 19:56:54 2018 From: report at bugs.python.org (Windson Yang) Date: Sun, 09 Dec 2018 00:56:54 +0000 Subject: [issue35267] reproducible deadlock with multiprocessing.Pool In-Reply-To: <1542416799.14.0.788709270274.issue35267@psf.upfronthosting.co.za> Message-ID: <1544317014.5.0.788709270274.issue35267@psf.upfronthosting.co.za> Windson Yang added the comment: As Jonathan Gossage said, I think it may break some code to fix this issue, maybe we could just add a warning on the document? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 20:11:28 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 09 Dec 2018 01:11:28 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544317888.11.0.788709270274.issue35431@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > For what its worth, the colour I prefer for this bikeshed are > "comb" and "perm", which are the names used by the > HP 48GX calculator. Second choice would be to spell the names > out in full, "combinations" and "permutations". +1 These would be my preferences as well :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 20:37:47 2018 From: report at bugs.python.org (Jonathan Gossage) Date: Sun, 09 Dec 2018 01:37:47 +0000 Subject: [issue35267] reproducible deadlock with multiprocessing.Pool In-Reply-To: <1542416799.14.0.788709270274.issue35267@psf.upfronthosting.co.za> Message-ID: <1544319467.49.0.788709270274.issue35267@psf.upfronthosting.co.za> Jonathan Gossage added the comment: I think documentation is sufficient but I would like it to state the pitfalls available if apply_async is not synchronized correctly which will happen whenever the output does not fit the pipe buffer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 20:53:16 2018 From: report at bugs.python.org (Windson Yang) Date: Sun, 09 Dec 2018 01:53:16 +0000 Subject: [issue35325] imp.find_module() return value documentation discrepancy In-Reply-To: <1543303624.81.0.788709270274.issue35325@psf.upfronthosting.co.za> Message-ID: <1544320396.55.0.788709270274.issue35325@psf.upfronthosting.co.za> Change by Windson Yang : ---------- keywords: +patch pull_requests: +10277 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 21:01:23 2018 From: report at bugs.python.org (Windson Yang) Date: Sun, 09 Dec 2018 02:01:23 +0000 Subject: [issue35105] Document that CPython accepts "invalid" identifiers In-Reply-To: <1540815891.13.0.788709270274.issue35105@psf.upfronthosting.co.za> Message-ID: <1544320883.49.0.788709270274.issue35105@psf.upfronthosting.co.za> Windson Yang added the comment: Any ideas? Or I will create a PR in a week without 'CPython implementation detail' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 21:18:53 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 09 Dec 2018 02:18:53 +0000 Subject: [issue35105] Document that CPython accepts "invalid" identifiers In-Reply-To: <1544320883.49.0.788709270274.issue35105@psf.upfronthosting.co.za> Message-ID: <20181209021847.GR13061@ando.pearwood.info> Steven D'Aprano added the comment: > Any ideas? Or I will create a PR in a week without 'CPython implementation detail' I don't think we want to give any stability guarantees for this. Perhaps we should explicitly state that this is not guaranteed behaviour and may change in the future. I would be happy for it to be stated as an CPython implementation detail. If PyPy or any other implementation happen to duplicate it, we're not responsible for documenting that fact. Please go ahead and make a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 22:46:02 2018 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Dec 2018 03:46:02 +0000 Subject: [issue22577] local variable changes lost after pdb jump command In-Reply-To: <1412763709.52.0.382735862315.issue22577@psf.upfronthosting.co.za> Message-ID: <1544327162.31.0.788709270274.issue22577@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +10278 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 01:30:19 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 09 Dec 2018 06:30:19 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1544337019.73.0.788709270274.issue33725@psf.upfronthosting.co.za> Change by Ned Deily : ---------- keywords: +patch pull_requests: +10279 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 01:50:19 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 09 Dec 2018 06:50:19 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1544338219.62.0.788709270274.issue33725@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset ac218bc5dbfabbd61c76ce8a17de088611e21981 by Ned Deily in branch 'master': bpo-33725: skip test_multiprocessing_fork on macOS (GH-11043) https://github.com/python/cpython/commit/ac218bc5dbfabbd61c76ce8a17de088611e21981 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 01:50:28 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 09 Dec 2018 06:50:28 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1544338228.61.0.788709270274.issue33725@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10280 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 01:50:36 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 09 Dec 2018 06:50:36 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1544338236.35.0.788709270274.issue33725@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10281 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 02:06:56 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 09 Dec 2018 07:06:56 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1544339216.05.0.788709270274.issue33725@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d4bcf13e06d33b8ec66a68db20df34a029e66882 by Miss Islington (bot) in branch '3.7': bpo-33725: skip test_multiprocessing_fork on macOS (GH-11043) https://github.com/python/cpython/commit/d4bcf13e06d33b8ec66a68db20df34a029e66882 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 02:07:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Dec 2018 07:07:07 +0000 Subject: [issue35337] Check index in PyTuple_GET_ITEM/PyTuple_SET_ITEM in debug mode In-Reply-To: <1543411028.15.0.788709270274.issue35337@psf.upfronthosting.co.za> Message-ID: <1544339227.76.0.788709270274.issue35337@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think we can break this only after adding public API for accessing internal storage of a tuple: PyTuple_ITEMS(). And the same for lists. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 02:11:33 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 09 Dec 2018 07:11:33 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1544339493.87.0.788709270274.issue33725@psf.upfronthosting.co.za> miss-islington added the comment: New changeset df5d884defc8f1a94013ff9beb493f1428bd55b5 by Miss Islington (bot) in branch '3.6': bpo-33725: skip test_multiprocessing_fork on macOS (GH-11043) https://github.com/python/cpython/commit/df5d884defc8f1a94013ff9beb493f1428bd55b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 02:31:20 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 09 Dec 2018 07:31:20 +0000 Subject: [issue35337] Check index in PyTuple_GET_ITEM/PyTuple_SET_ITEM in debug mode In-Reply-To: <1543411028.15.0.788709270274.issue35337@psf.upfronthosting.co.za> Message-ID: <1544340680.83.0.788709270274.issue35337@psf.upfronthosting.co.za> Stefan Behnel added the comment: If this is really just about debugging, then I would suggest to not break existing code at all. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 02:33:31 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 09 Dec 2018 07:33:31 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1544340811.16.0.788709270274.issue33725@psf.upfronthosting.co.za> Ned Deily added the comment: Since it looks like multiprocessing_fork is not going to be fixable for macOS, the main issue remaining is how to help users avoid this trap (literally). Should we add a check and issues a warning or error at run time? Or is a doc change sufficient? In the meantime, I've merged changes to disable running test_multiprocessing_fork which will sometimes (but not always) segfault on 10.14 Mojave. I should apologize to Barry and others who have run into this. I did notice the occasional segfault when testing with Mojave just prior to its release but it wasn't always reproducible and I didn't follow up on it. Now that the change in 10.14 behavior makes this existing problem with fork no exec more obvious, it's clear that the test segfaults are another manifestation of this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 02:46:53 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 09 Dec 2018 07:46:53 +0000 Subject: [issue34245] Python library should be installed writable In-Reply-To: <1532677710.44.0.56676864532.issue34245@psf.upfronthosting.co.za> Message-ID: <1544341613.84.0.788709270274.issue34245@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 25648d05ac3d74c436f951579bbb716372fb8cc7 by Ned Deily (jdemeyer) in branch 'master': bpo-34245: install Python shared library with more standard 0755 mode (GH-8492) https://github.com/python/cpython/commit/25648d05ac3d74c436f951579bbb716372fb8cc7 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 02:50:24 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 09 Dec 2018 07:50:24 +0000 Subject: [issue34245] Python library should be installed writable In-Reply-To: <1532677710.44.0.56676864532.issue34245@psf.upfronthosting.co.za> Message-ID: <1544341824.66.0.788709270274.issue34245@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the PR. I've merged it for release in 3.8.0. As I commented on the PR, I don't think we should backport this; the current behavior has been around for many years and was working as designed so it's not really a bug. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 03:08:46 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 09 Dec 2018 08:08:46 +0000 Subject: [issue28015] configure --with-lto builds fail when CC=clang on Linux, requires gold linker In-Reply-To: <1473320709.67.0.0429640617864.issue28015@psf.upfronthosting.co.za> Message-ID: <1544342926.98.0.788709270274.issue28015@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset f83ee476d48dbeb90ddf3526b04936a49a87973a by Ned Deily (stratakis) in branch '3.6': bpo-28015: Support LTO build with clang (GH-9908) (GH-10922) https://github.com/python/cpython/commit/f83ee476d48dbeb90ddf3526b04936a49a87973a ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 03:14:19 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 09 Dec 2018 08:14:19 +0000 Subject: [issue28015] configure --with-lto builds fail when CC=clang on Linux, requires gold linker In-Reply-To: <1473320709.67.0.0429640617864.issue28015@psf.upfronthosting.co.za> Message-ID: <1544343259.32.0.788709270274.issue28015@psf.upfronthosting.co.za> Ned Deily added the comment: See also Issue31354, Issue35351, and Issue35257. ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 03:16:20 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 09 Dec 2018 08:16:20 +0000 Subject: [issue35351] LTOFLAGS are passed to BASECFLAGS when using LTO In-Reply-To: <1543505341.98.0.788709270274.issue35351@psf.upfronthosting.co.za> Message-ID: <1544343380.54.0.788709270274.issue35351@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10282 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 03:35:15 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 09 Dec 2018 08:35:15 +0000 Subject: [issue35351] LTOFLAGS are passed to BASECFLAGS when using LTO In-Reply-To: <1543505341.98.0.788709270274.issue35351@psf.upfronthosting.co.za> Message-ID: <1544344515.35.0.788709270274.issue35351@psf.upfronthosting.co.za> miss-islington added the comment: New changeset f2d2cb12f2d3bd68a13c4098311e725f776768ad by Miss Islington (bot) in branch '3.6': bpo-35351: Pass link time optimization flags to CFLAGS_NODIST (GH-10797) https://github.com/python/cpython/commit/f2d2cb12f2d3bd68a13c4098311e725f776768ad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 03:43:45 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 09 Dec 2018 08:43:45 +0000 Subject: [issue35351] LTOFLAGS are passed to BASECFLAGS when using LTO In-Reply-To: <1543505341.98.0.788709270274.issue35351@psf.upfronthosting.co.za> Message-ID: <1544345025.71.0.788709270274.issue35351@psf.upfronthosting.co.za> Ned Deily added the comment: See also Issue28015, Issue31354, and Issue35257. ---------- nosy: +ned.deily resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 04:08:30 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 09 Dec 2018 09:08:30 +0000 Subject: [issue31354] Fixing a bug related to LTO only build In-Reply-To: <1504648453.31.0.715065413662.issue31354@psf.upfronthosting.co.za> Message-ID: <1544346510.88.0.788709270274.issue31354@psf.upfronthosting.co.za> Ned Deily added the comment: OK, I think we are in better shape for 3.6.8 now. I've merged the backports to 3.6 of Issue28015 / PR 9908 (LTO with clang) and Issue35351 / PR 10797 (prevent LTO CFLAGS leakage into distutils). So, at the moment, master, 3.7, and 3.6 should behave the same in this area, although I'm a little bit leery of having all this backporting just before 3.6 stops accepting bugfixes. As far as I can tell, what remains is resolving Issue35257 (prevent LTO LDFLAGS leakage into distutils). >Side note on your comment: The compiler used (CC) also seems to leak >into distutils instead of the system default CC, on linux with >'python3 setup.py build'. Yes, it does by design as do many other of the common build Makefile / environment variables. The point I was trying to make applies more to binary distributions of Python, like with the python.org macOS installer. In cases like that, the binary distribution is designed to install and run on multiple OS versions and that means that the compiler, and OS version for that matter, used to build the python executable and standard library extension modules are often very different from those on the end user's system when building third-party extension modules. ---------- priority: release blocker -> normal resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 04:16:15 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 09 Dec 2018 09:16:15 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils. In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1544346975.29.0.788709270274.issue35257@psf.upfronthosting.co.za> Ned Deily added the comment: Unfortunately, it appears this won't be resolved in time for 3.7.2rc1 and 3.6.8rc1 and it would not be appropriate to merge something this potentially disruptive without prior exposure. Since 3.6.8 is planned to be the final 3.6.x bugfix release, unless some critical problem is discovered prior to their final releases it's likely this will not be fixed for 3.6. ---------- nosy: +ned.deily priority: normal -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 04:33:16 2018 From: report at bugs.python.org (Muhammed Alkan) Date: Sun, 09 Dec 2018 09:33:16 +0000 Subject: [issue35443] Add Tail Call Optimization Message-ID: <1544347996.26.0.788709270274.issue35443@psf.upfronthosting.co.za> New submission from Muhammed Alkan : I see nothing wrong with adding Tail Call Optimization to Python. ---------- messages: 331420 nosy: midnio priority: normal severity: normal status: open title: Add Tail Call Optimization type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 05:33:02 2018 From: report at bugs.python.org (Christian Tanzer) Date: Sun, 09 Dec 2018 10:33:02 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: Your message of "Fri, 07 Dec 2018 17:22:36 +0000" <1544203356.31.0.788709270274.issue22005@psf.upfronthosting.co.za> Message-ID: Christian Tanzer added the comment: Paul Ganssle wrote at Fri, 07 Dec 2018 17:22:36 +0000: > > Gregory P. Smith (gregory.p.smith) 2017-03-02 18:57 > > TL;DR - Just one more example of why nobody should *ever* use pickle > > under any circumstances. It is useless for data that is not transient > > for consumption by the same exact versions of all software that > > created it. > > This *is* something that users can work around by not abusing pickle > in this way and instead using a proper cross-platform serialization > format. I realize that that makes it *more difficult* for some people > to do so, but as Gregory points out, these people are doing dangerous > stuff that will break in a way that we are not going to be willing or > able to fix at some point *anyway*. This is completely and utterly wrong, to put it mildly. The official documentation of the pickle module states (I checked 2.7 and 3.7): The pickle serialization format is guaranteed to be backwards compatible across Python releases. Considering that this issue is 4.5 years old, one would assume that the pickle documentation would have been changed in the meantime if Gregory's and Paul's view matched reality. But my or your personal views about the usability of pickle don't matter anyway. There are too many libraries and applications that have been using pickle for many years. I personally know about this kind of usage in applications since 1998. In that particular case, the pickled information resides on machines owned by the customers of the applications and **must** be readable by any new version of the application no matter how old the file containing the pickle is. Rewriting history by some Python developers is not going to impress the companies involved! Have a nice day! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 05:35:01 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 09 Dec 2018 10:35:01 +0000 Subject: [issue35443] Add Tail Call Optimization In-Reply-To: <1544347996.26.0.788709270274.issue35443@psf.upfronthosting.co.za> Message-ID: <1544351701.08.0.788709270274.issue35443@psf.upfronthosting.co.za> Steven D'Aprano added the comment: > I see nothing wrong with adding Tail Call Optimization to Python. That's nice. Is that supposed to be an argument that convinces us? You are hardly the first person ever to suggest TCO for Python: https://duckduckgo.com/?q=tail+call+optimization+site%3Ahttps%3A%2F%2Fmail.python.org Unless you have a more convincing argument than the arguments previously made, and rejected, this ticket will be closed. Even though this has been rejected in the past, the door is not quite closed. In a couple of weeks, Guido will be replaced as BDFL, and the new governor(s) may be more receptive to this idea. But you will probably need to write a PEP. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 05:42:59 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 09 Dec 2018 10:42:59 +0000 Subject: [issue35443] Add Tail Call Optimization In-Reply-To: <1544347996.26.0.788709270274.issue35443@psf.upfronthosting.co.za> Message-ID: <1544352179.55.0.788709270274.issue35443@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Guido had some thoughts on Tail Recursion Optimization (TRE). http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.html ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 06:01:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Dec 2018 11:01:30 +0000 Subject: [issue35444] Unify and optimize the helper for getting a builtin object Message-ID: <1544353290.83.0.788709270274.issue35444@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : _PyIter_GetBuiltin() was introduced in issue14288 (31668b8f7a3efc7b17511bb08525b28e8ff5f23a). This was used for getting references to the builtin "iter" and "reverse". It was renamed to _PyObject_GetBuiltin() in a701388de1135241b5a8e4c970e06c0e83a66dc0. There is other code that gets references to the builtin "getattr" using PyEval_GetBuiltins(). It is more efficient, but contains bugs. The proposed PR unifies getting references to builtins: * The prefix _PyObject_ is changed to _PyEval_, since this function has relation not to the object type but to the evaluation environment. * It uses now the private _Py_Identifier API instead of a raw C string. This saves time by omitting the creation of a Unicode object on every call. * It uses now fast PyEval_GetBuiltins() instead of slower PyImport_Import(). * Fixed errors handling in the code that used PyEval_GetBuiltins() before. It no longer swallows unexpected exceptions, no longer returns an error without setting an exception, and no longer causes raising a SystemError. An example of an error in current code: >>> import builtins >>> del builtins.getattr >>> int.bit_length.__reduce__() Traceback (most recent call last): File "", line 1, in SystemError: NULL object passed to Py_BuildValue ---------- components: Interpreter Core messages: 331424 nosy: kristjan.jonsson, pitrou, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Unify and optimize the helper for getting a builtin object versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 06:10:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Dec 2018 11:10:59 +0000 Subject: [issue35444] Unify and optimize the helper for getting a builtin object In-Reply-To: <1544353290.83.0.788709270274.issue35444@psf.upfronthosting.co.za> Message-ID: <1544353859.52.0.788709270274.issue35444@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10283 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 06:37:00 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 09 Dec 2018 11:37:00 +0000 Subject: [issue17185] unittest mock create_autospec doesn't correctly replace mocksignature In-Reply-To: <1360621900.03.0.519438692167.issue17185@psf.upfronthosting.co.za> Message-ID: <1544355420.47.0.788709270274.issue17185@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +10284 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 06:47:33 2018 From: report at bugs.python.org (Muhammed Alkan) Date: Sun, 09 Dec 2018 11:47:33 +0000 Subject: [issue35443] Add Tail Call Optimization In-Reply-To: <1544347996.26.0.788709270274.issue35443@psf.upfronthosting.co.za> Message-ID: <1544356053.11.0.788709270274.issue35443@psf.upfronthosting.co.za> Change by Muhammed Alkan : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 07:33:51 2018 From: report at bugs.python.org (Stefan Krah) Date: Sun, 09 Dec 2018 12:33:51 +0000 Subject: [issue35337] Check index in PyTuple_GET_ITEM/PyTuple_SET_ITEM in debug mode In-Reply-To: <1543411028.15.0.788709270274.issue35337@psf.upfronthosting.co.za> Message-ID: <1544358831.69.0.788709270274.issue35337@psf.upfronthosting.co.za> Stefan Krah added the comment: I'm using &PyTuple_GET_ITEM(args, 0), so Serhiy's concern is not theoretical. I think if people want the safe version they should use PyTuple_GetItem(). ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 07:34:21 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 09 Dec 2018 12:34:21 +0000 Subject: [issue20602] sys.flags and sys.float_info disappear at shutdown In-Reply-To: <1392146521.44.0.544055558433.issue20602@psf.upfronthosting.co.za> Message-ID: <1544358861.69.0.788709270274.issue20602@psf.upfronthosting.co.za> Zackery Spytz added the comment: Ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 07:34:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Dec 2018 12:34:29 +0000 Subject: [issue35445] Do not ignore errors when create posix.environ Message-ID: <1544358869.69.0.788709270274.issue35445@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Currently most errors during creating posix.environ are ignored except an error of creating an empty dict. The initial revision 85a5fbbdfea617f6cc8fae82c9e8c2b5c424436d contained the comment "XXX This part ignores errors". Later changes removed "XXX" from the comment and added explicit error clearing. Later the POSIX code was duplicated for Windows. It looks to me that that comment was not declared the intentional behavior, but just described existing code, and was left as a reminder for implementing error handling. The proposed PR implements proper error handling in this code. ---------- components: Extension Modules messages: 331427 nosy: larry, serhiy.storchaka priority: normal severity: normal status: open title: Do not ignore errors when create posix.environ type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 07:39:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Dec 2018 12:39:29 +0000 Subject: [issue35445] Do not ignore errors when create posix.environ In-Reply-To: <1544358869.69.0.788709270274.issue35445@psf.upfronthosting.co.za> Message-ID: <1544359169.61.0.788709270274.issue35445@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10285 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 07:40:06 2018 From: report at bugs.python.org (Alistsair Lenhard) Date: Sun, 09 Dec 2018 12:40:06 +0000 Subject: [issue35446] incorrect example Message-ID: <1544359206.53.0.788709270274.issue35446@psf.upfronthosting.co.za> New submission from Alistsair Lenhard : under: https://docs.python.org/3/tutorial/errors.html Original it says: "Note that if the except clauses were reversed (with except B first), it would have printed B, B, B ? the first matching except clause is triggered." It should read: "Note that if the except clauses were reversed (with except B first), it would have printed D, D, D ? the first matching except clause is triggered." As D is the first expression in the print statement. So if the expression is changed to "except B:" class B(Exception): pass class C(B): pass class D(C): pass for cls in [B, C, D]: try: raise cls() except B: print("D") except C: print("C") except B: print("B") Result is: D D D ---------- assignee: docs at python components: Documentation messages: 331428 nosy: Alistair, docs at python priority: normal severity: normal status: open title: incorrect example versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 07:43:27 2018 From: report at bugs.python.org (Stefan Krah) Date: Sun, 09 Dec 2018 12:43:27 +0000 Subject: [issue35337] Check index in PyTuple_GET_ITEM/PyTuple_SET_ITEM in debug mode In-Reply-To: <1543411028.15.0.788709270274.issue35337@psf.upfronthosting.co.za> Message-ID: <1544359407.44.0.788709270274.issue35337@psf.upfronthosting.co.za> Stefan Krah added the comment: Since this feature mainly helps when running a test suite using a debug build: The same can be achieved by running the test suite under Valgrind, which catches invalid accesses and a lot more. So I'd prefer to keep the macro in its current form. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 07:56:47 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 09 Dec 2018 12:56:47 +0000 Subject: [issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__' In-Reply-To: <1459972886.32.0.234738617564.issue26704@psf.upfronthosting.co.za> Message-ID: <1544360207.27.0.788709270274.issue26704@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks @asottile for the patch. I think the original AttributeError is resolved with issue28919 where they were silenced. It seems similar to issue32153 though the exception occurs from mock instead of partial object as in issue32153. The fix was applied to 3.7+ and hence 3.6 was not fixed which enters security fix only mode shortly. The attached tests also pass on master and I think it will it be a good unittest addition to Lib/unittest/test/testmock/testwith.py (similar to issue32153) that has a couple of nested with statements for the same attribute. Adding cjw296 to the list. ---------- nosy: +cjw296, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 08:02:42 2018 From: report at bugs.python.org (Stefan Krah) Date: Sun, 09 Dec 2018 13:02:42 +0000 Subject: [issue35337] Check index in PyTuple_GET_ITEM/PyTuple_SET_ITEM in debug mode In-Reply-To: <1543411028.15.0.788709270274.issue35337@psf.upfronthosting.co.za> Message-ID: <1544360562.06.0.788709270274.issue35337@psf.upfronthosting.co.za> Stefan Krah added the comment: If the feature is for the Python test suite itself, one solution would be to add -DPY_BOUNDS_CHECKS and use that on the buildbots. I still think making all of the test suite Valgrind-ready (most of it is, except test_multiprocessing and a few others) would catch more. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 08:34:07 2018 From: report at bugs.python.org (Maarten ter Huurne) Date: Sun, 09 Dec 2018 13:34:07 +0000 Subject: [issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used In-Reply-To: <1359599707.26.0.771342463799.issue17088@psf.upfronthosting.co.za> Message-ID: <1544362447.21.0.788709270274.issue17088@psf.upfronthosting.co.za> Change by Maarten ter Huurne : ---------- pull_requests: +10286 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 09:05:14 2018 From: report at bugs.python.org (Maarten ter Huurne) Date: Sun, 09 Dec 2018 14:05:14 +0000 Subject: [issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used In-Reply-To: <1359599707.26.0.771342463799.issue17088@psf.upfronthosting.co.za> Message-ID: <1544364314.27.0.788709270274.issue17088@psf.upfronthosting.co.za> Maarten ter Huurne added the comment: I think I have a good solution now, see the pull request for details. It does touch a lot of code, but I split all the changes into small consistent units, so it should be easier to verify whether they are correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 09:07:36 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 09 Dec 2018 14:07:36 +0000 Subject: [issue28054] Diff for visually comparing actual with expected in mock.assert_called_with. In-Reply-To: <1473461073.51.0.19108692382.issue28054@psf.upfronthosting.co.za> Message-ID: <1544364456.86.0.788709270274.issue28054@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: It seems that TestCase in unittest.case accepts failureException attribute that is raised on assertion failure. My initial approach is to subclass TestCase and add a custom failure exception like MockException that is caught to add the diff to the original message. I am adding @cjw296 and @mariocj89 for feedback since I hope this can reuse unittest.case.TestCase implementation for diffs. I think this is better done with a flag like verbose=True to display the difference and defaulting to False since sometimes the message can be long depending on args and kwargs. Also I find args (tuple) comparison to be little distracting. Since this is an enhancement I am adding 3.8. # Sample file from unittest.mock import Mock m = Mock() m(1, 2, foo='bar', bar='baz') m.assert_called_with(2, 3, bar='baz', foo='car') # On 3.7 $ python3.7 /tmp/foo_4.py Traceback (most recent call last): File "/tmp/foo_4.py", line 5, in m.assert_called_with(2, 3, bar='baz', foo='car') File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/mock.py", line 820, in assert_called_with raise AssertionError(_error_message()) from cause AssertionError: Expected call: mock(2, 3, bar='baz', foo='car') # With patch $ ./python.exe /tmp/foo_4.py Traceback (most recent call last): File "/tmp/foo_4.py", line 5, in m.assert_called_with(2, 3, bar='baz', foo='car') File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 844, in assert_called_with raise AssertionError(_error_message()) from cause AssertionError: Expected call: mock(2, 3, bar='baz', foo='car') Actual call: mock(1, 2, bar='baz', foo='bar') args: Tuples differ: (2, 3) != (1, 2) First differing element 0: 2 1 - (2, 3) + (1, 2) kwargs: {'bar': 'baz', 'foo': 'car'} != {'foo': 'bar', 'bar': 'baz'} - {'bar': 'baz', 'foo': 'car'} ? ^ + {'bar': 'baz', 'foo': 'bar'} ? ^ ---------- keywords: +patch nosy: +cjw296, mariocj89 versions: +Python 3.8 -Python 2.7, Python 3.7 Added file: https://bugs.python.org/file47982/issue28054.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 09:17:58 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 09 Dec 2018 14:17:58 +0000 Subject: [issue20239] Allow repeated deletion of unittest.mock.Mock attributes In-Reply-To: <1389611701.97.0.048361560176.issue20239@psf.upfronthosting.co.za> Message-ID: <1544365078.87.0.788709270274.issue20239@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I find this to be a reasonable behavior as with normal objects that support setting the attribute after deletion. It also seems to be an easy issue since @michael.foord has already attached the patch for this from the original report. The patch also also causes no test failure on master and a unit test can be added for the behavior once confirmed. ---------- nosy: +cjw296, mariocj89, xtreak versions: +Python 3.7, Python 3.8 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 10:13:53 2018 From: report at bugs.python.org (Davin Potts) Date: Sun, 09 Dec 2018 15:13:53 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1544368433.86.0.788709270274.issue33725@psf.upfronthosting.co.za> Davin Potts added the comment: Do we really need to disable the running of test_multiprocessing_fork entirely on MacOS? My understanding so far is that not *all* of the system libraries on the mac are spinning up threads and so we should expect that there are situations where fork alone may be permissible, but of course we don't yet know what those are. Pragmatically speaking, I have not yet seen a report of test_multiprocessing_fork tests triggering this problem but I would like to see/hear that when it is observed (that's my pitch for leaving the tests enabled). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 10:23:18 2018 From: report at bugs.python.org (Shishmarev Pavel) Date: Sun, 09 Dec 2018 15:23:18 +0000 Subject: [issue35447] Redundant try-except block in urllib Message-ID: <1544368998.3.0.788709270274.issue35447@psf.upfronthosting.co.za> New submission from Shishmarev Pavel : https://github.com/python/cpython/blob/master/Lib/urllib/parse.py#L875 It's redundant to raise and then catch exception. ---------- components: Library (Lib) messages: 331436 nosy: PashaWNN priority: normal severity: normal status: open title: Redundant try-except block in urllib 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 Sun Dec 9 10:25:06 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Sun, 09 Dec 2018 15:25:06 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544369106.83.0.788709270274.issue35433@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Sorry for the delay, but I wanted to get an environment that still had an older VS2015 install to test against. VS2015 prior to Update 3 use a different heuristic to determine the SDK version for building. I've made the following changes: - version checking uses System.Version, - WindowsTargetPlatformVersion is set to the detected Win10 SDK (this is the offical setting anyway, but required for VS2015 prior to Update 3) - added display of the detected SDK to ShowVersionInfo target (build.bat -V) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 10:29:03 2018 From: report at bugs.python.org (Shishmarev Pavel) Date: Sun, 09 Dec 2018 15:29:03 +0000 Subject: [issue35447] Redundant try-except block in urllib In-Reply-To: <1544368998.3.0.788709270274.issue35447@psf.upfronthosting.co.za> Message-ID: <1544369343.31.0.788709270274.issue35447@psf.upfronthosting.co.za> Change by Shishmarev Pavel : ---------- keywords: +patch pull_requests: +10287 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 10:35:35 2018 From: report at bugs.python.org (Shishmarev Pavel) Date: Sun, 09 Dec 2018 15:35:35 +0000 Subject: [issue35447] Redundant try-except block in urllib In-Reply-To: <1544368998.3.0.788709270274.issue35447@psf.upfronthosting.co.za> Message-ID: <1544369735.09.0.788709270274.issue35447@psf.upfronthosting.co.za> Change by Shishmarev Pavel : ---------- pull_requests: +10288 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 10:45:38 2018 From: report at bugs.python.org (Davin Potts) Date: Sun, 09 Dec 2018 15:45:38 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1544370338.61.0.788709270274.issue33725@psf.upfronthosting.co.za> Davin Potts added the comment: @ned.deily: Apologies, I misread what you wrote -- I would like to see the random segfaults that you were seeing on Mojave if you can still point me to a few. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 11:35:30 2018 From: report at bugs.python.org (Adrian Wielgosik) Date: Sun, 09 Dec 2018 16:35:30 +0000 Subject: [issue35448] ConfigParser .read() - handling of nonexistent files Message-ID: <1544373330.85.0.788709270274.issue35448@psf.upfronthosting.co.za> New submission from Adrian Wielgosik : Documentation of ConfigParser says: > If a file named in filenames cannot be opened, that file will be ignored. This is designed so that you can specify an iterable of potential configuration file locations (for example, the current directory, the user?s home directory, and some system-wide directory), and all existing configuration files in the iterable will be read. While this is a useful property, it can also be a footgun. The first read() example in the Quick Start section contains just a single file read: >>> config.read('example.ini') I would expect that this basic usage is very popular. If the file doesn't exist, the normal usage pattern fails in a confusing way: from configparser import ConfigParser config = ConfigParser() config.read('config.txt') value = config.getint('section', 'option') ---> configparser.NoSectionError: No section: 'section' In my opinion, this error isn't very obvious to understand and debug, unless you have read that piece of .read() documentation. This behavior did also bite me even more, with another usage pattern I've found in a project I maintain: > config.read('global.txt') > config.read('local.txt') Here, both files are expected to exist, with the latter one extending or updating configuration from the first file. If one of the files doesn't exist (eg mistake during deployment), there's no obvious error, but the program will be configured in different way than intended. Now, I'm aware that all of this can be avoided by simply using `read_file()`: > with open('file.txt') as f: > config.read_file(f) But again, `.read()` is the one usually mentioned first in both the official documentation, and most independent guides, so it's easy to get wrong. Due to this, I propose adding an extra parameter to .read(): read(filenames, encoding=None, check_exist=False) that, when manually set to True, will throw exception if any of input files doesn't exist; and to use this parameter by default in Quick Start section of ConfigParser documentation. If this is a reasonable idea, I could try and make a PR. For comparison, the `toml` Python library has the following behavior: - if argument is a single filename and file doesn't exist, it throws - if argument is a list of filenames and none exist, it throws - if argument is a list of filenames and at least one exists, it works, but prints a warning for each nonexistent file. For the record, seems like this issue was also mentioned in https://bugs.python.org/issue490399 ---------- components: Library (Lib) messages: 331439 nosy: Adrian Wielgosik priority: normal severity: normal status: open title: ConfigParser .read() - handling of nonexistent files type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 11:47:16 2018 From: report at bugs.python.org (Clint Allen) Date: Sun, 09 Dec 2018 16:47:16 +0000 Subject: [issue34079] Multiprocessing module fails to build on Solaris 11.3 In-Reply-To: <1531209271.96.0.56676864532.issue34079@psf.upfronthosting.co.za> Message-ID: <1544374036.43.0.788709270274.issue34079@psf.upfronthosting.co.za> Clint Allen added the comment: Agreed, that is a better approach. I have tested your patch successfully with gcc on Solaris 11.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 12:40:27 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 09 Dec 2018 17:40:27 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1544377227.03.0.788709270274.issue35378@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: I am playing with passing weakreferences into the iterator objects, but this may not be enough. For example, take the code of ApplyResult.get: def get(self, timeout=None): if self._pool() is None: raise RuntimeError("The pool is dead!") <--- new code self.wait(timeout) It can be that the pool is alive when we check for it (self._pool() is None) but while the code is waiting with no timeout, the pool dies, effectively leaving the program deadlocked with no error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 12:40:49 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 09 Dec 2018 17:40:49 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1544377249.55.0.788709270274.issue35378@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg331441 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 12:41:37 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 09 Dec 2018 17:41:37 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1544377297.69.0.788709270274.issue35378@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: I am playing with weakreferences inside the iterator objects, but this may not be enough. For example, take the code of ApplyResult.get: def get(self, timeout=None): if self._pool() is None: raise RuntimeError("The pool is dead!") <--- new code self.wait(timeout) It can be that the pool is alive when we check for it (self._pool() is None) but while the code is waiting with no timeout, the pool dies, effectively leaving the program deadlocked with no error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 12:41:42 2018 From: report at bugs.python.org (Stefan Seefeld) Date: Sun, 09 Dec 2018 17:41:42 +0000 Subject: [issue35449] documenting objects Message-ID: <1544377302.47.0.788709270274.issue35449@psf.upfronthosting.co.za> New submission from Stefan Seefeld : On multiple occasions I have wanted to add documentation not only to Python classes and functions, but also instance variables. This seems to involve (at least) two orthogonal questions: 1) what is the proper syntax to associate documentation (docstrings ?) to objects ? 2) what changes need to be applied to Python's infrastructure (e.g., the help system) to support it ? I have attempted to work around 1) in my custom code by explicitly setting an object's `__doc__` attribute. However, calling `help()` on such an object would simply ignore that attribute, and instead list the documentation associated with the instance type. Am I missing something here, i.e. am I approaching the problem the wrong way, or am I the first to want to use object-specific documentation ? ---------- messages: 331443 nosy: stefan priority: normal severity: normal status: open title: documenting objects type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 12:44:32 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 09 Dec 2018 17:44:32 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1544377472.94.0.788709270274.issue35378@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Also, making tests that do not leak threads for this case is very difficult as if we go with weakrefs, the test *has* to leak a pool (the pool is dead but never calls join/close) to check that when you use the iterator the exception happens. Also, getting such test race-free is going to be challenging. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 12:58:36 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 09 Dec 2018 17:58:36 +0000 Subject: [issue35449] documenting objects In-Reply-To: <1544377302.47.0.788709270274.issue35449@psf.upfronthosting.co.za> Message-ID: <1544378316.42.0.788709270274.issue35449@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 13:02:27 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 09 Dec 2018 18:02:27 +0000 Subject: [issue35448] ConfigParser .read() - handling of nonexistent files In-Reply-To: <1544373330.85.0.788709270274.issue35448@psf.upfronthosting.co.za> Message-ID: <1544378547.97.0.788709270274.issue35448@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 13:05:37 2018 From: report at bugs.python.org (Marcin) Date: Sun, 09 Dec 2018 18:05:37 +0000 Subject: [issue35450] venv module doesn't create a copy of python binary by default Message-ID: <1544378737.46.0.788709270274.issue35450@psf.upfronthosting.co.za> New submission from Marcin : Hello, from documentation: https://docs.python.org/3/library/venv.html "python3 -m venv /path/to/new/virtual/environment Running this command creates the target directory (creating any parent directories that don?t exist already) and places a pyvenv.cfg file in it with a home key pointing to the Python installation from which the command was run. It also creates a bin (or Scripts on Windows) subdirectory containing **a copy** of the python binary (or binaries, in the case of Windows)." This is not true. In my case it creates symlinks to python binary by default. This is quite different. Upgrading system's python version broke my virtual environment because I believed I'm having a static copy of python binary in my virtual environment. ---------- assignee: docs at python components: Documentation messages: 331445 nosy: docs at python, mkkot priority: normal severity: normal status: open title: venv module doesn't create a copy of python binary by default versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 13:24:42 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 09 Dec 2018 18:24:42 +0000 Subject: [issue35450] venv module doesn't create a copy of python binary by default In-Reply-To: <1544378737.46.0.788709270274.issue35450@psf.upfronthosting.co.za> Message-ID: <1544379882.82.0.788709270274.issue35450@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 14:15:09 2018 From: report at bugs.python.org (Henry Chen) Date: Sun, 09 Dec 2018 19:15:09 +0000 Subject: [issue22577] local variable changes lost after pdb jump command In-Reply-To: <1412763709.52.0.382735862315.issue22577@psf.upfronthosting.co.za> Message-ID: <1544382909.0.0.788709270274.issue22577@psf.upfronthosting.co.za> Change by Henry Chen : ---------- nosy: +henry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 14:30:10 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 09 Dec 2018 19:30:10 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544383810.59.0.788709270274.issue22005@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- pull_requests: +10289 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 14:43:00 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 09 Dec 2018 19:43:00 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544384580.12.0.788709270274.issue22005@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset e328753d91379274b699b93decff45de07854617 by Gregory P. Smith in branch 'master': bpo-22005: Document the reality of pickle compatibility. (GH-11054) https://github.com/python/cpython/commit/e328753d91379274b699b93decff45de07854617 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 14:43:17 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 09 Dec 2018 19:43:17 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544384597.87.0.788709270274.issue22005@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10290 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 14:48:38 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 09 Dec 2018 19:48:38 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544384918.09.0.788709270274.issue22005@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 331bfa4f2c3026a35e111303df0f198d06b4e0c8 by Miss Islington (bot) in branch '3.7': bpo-22005: Document the reality of pickle compatibility. (GH-11054) https://github.com/python/cpython/commit/331bfa4f2c3026a35e111303df0f198d06b4e0c8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 14:49:38 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Sun, 09 Dec 2018 19:49:38 +0000 Subject: [issue27004] Handle script shbang options In-Reply-To: <1462995550.58.0.0858558226193.issue27004@psf.upfronthosting.co.za> Message-ID: <1544384978.21.0.788709270274.issue27004@psf.upfronthosting.co.za> Miro Hron?ok added the comment: As a distro Python maintainer, I have to say that having yet another Python executable would no be accepted well by the other distro contributors or even users. I'll try to work on a proper solution that would merge the options, hopefully soon (but most likely not before the end of the year). ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 14:50:36 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 09 Dec 2018 19:50:36 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544385036.17.0.788709270274.issue22005@psf.upfronthosting.co.za> Gregory P. Smith added the comment: It is fundamentally impossible for pickled data to magically cross the 2 and 3 language boundary unscathed. The basic str/bytes/unicode types in the language changed meaning. Code must be written manually by the data owners to fix that up based on what the types and encodings should actually be in various places given the language version the data is being read into. The code in the PRs for this bug appears to do that in the requisite required hacky manner for stored datetime instances. This fact isn't new. It happened 10 years ago with the release of Python 3.0. The documentation is not a contract. I'm fixing it to mention this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 14:51:45 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 09 Dec 2018 19:51:45 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544385105.94.0.788709270274.issue22005@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Serhiy: should this one be marked fixed? ---------- assignee: -> serhiy.storchaka stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 15:12:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Dec 2018 20:12:39 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1544386359.31.0.788709270274.issue22005@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: With Gregory's addition I think this issue can be considered fixed. Thank you Gregory. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 15:20:45 2018 From: report at bugs.python.org (tzickel) Date: Sun, 09 Dec 2018 20:20:45 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1544386845.57.0.788709270274.issue35378@psf.upfronthosting.co.za> tzickel added the comment: https://bugs.python.org/issue35267 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 16:36:55 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 09 Dec 2018 21:36:55 +0000 Subject: [issue20239] Allow repeated deletion of unittest.mock.Mock attributes In-Reply-To: <1389611701.97.0.048361560176.issue20239@psf.upfronthosting.co.za> Message-ID: <1544391415.18.0.788709270274.issue20239@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +10291 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 17:38:47 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 09 Dec 2018 22:38:47 +0000 Subject: [issue35449] documenting objects In-Reply-To: <1544377302.47.0.788709270274.issue35449@psf.upfronthosting.co.za> Message-ID: <1544395127.92.0.788709270274.issue35449@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Minor note on terminology: classes and functions are themselves objects. I think that help() (or in particular PyDoc in general) should support any instance with a __doc__ attribute. Its failure to do so is causing pain, see #12154. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 17:58:26 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 09 Dec 2018 22:58:26 +0000 Subject: [issue35122] Process not exiting on unhandled exception when using multiprocessing module In-Reply-To: <1540984598.88.0.788709270274.issue35122@psf.upfronthosting.co.za> Message-ID: <1544396306.34.0.788709270274.issue35122@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 18:11:46 2018 From: report at bugs.python.org (Stefan Seefeld) Date: Sun, 09 Dec 2018 23:11:46 +0000 Subject: [issue35449] documenting objects In-Reply-To: <1544377302.47.0.788709270274.issue35449@psf.upfronthosting.co.za> Message-ID: <1544397106.35.0.788709270274.issue35449@psf.upfronthosting.co.za> Stefan Seefeld added the comment: Exactly ! I'm fully aware of the ubiquity of objects in Python, and it is for that reason that I had naively expected `pydoc` to simply DoTheRightThing when encountering an object containing a `__doc__` attribute. rather than only working for types and function objects. OK, assuming that this is a recognized bug / limitation, it seems easy to address. Is there any discussion concerning what syntax might be used for docstrings associated with objects ? (There seem to be some partial solutions added on top of the Python parser (I think `epydoc` offered one), but it would be nice to have a built-in solution to avoid having to re-invent wheels. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 18:35:52 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 09 Dec 2018 23:35:52 +0000 Subject: [issue35449] documenting objects In-Reply-To: <1544397106.35.0.788709270274.issue35449@psf.upfronthosting.co.za> Message-ID: <20181209233450.GX13061@ando.pearwood.info> Steven D'Aprano added the comment: > Is there any discussion concerning what syntax might be used for > docstrings associated with objects ? I don't know about PyDoc in general, but I would expect help(obj) to just use obj.__doc__ which will return the instance docstring if it exists, and if not, the type docstring (if it exists). No new syntax is required, the standard ``help(obj)`` is sufficient. > (There seem to be some partial > solutions added on top of the Python parser (I think `epydoc` offered > one), but it would be nice to have a built-in solution to avoid having > to re-invent wheels. Are you suggesting we need new syntax to automatically assign docstrings to instances? I don't think we do. I expect that if you want to set a custom instance docstring, you would just say ``instance.__doc__ = "The doc string"`` after creating the instance, or ``self.__doc__ = "..."`` inside the __init__ method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 19:16:52 2018 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Mon, 10 Dec 2018 00:16:52 +0000 Subject: [issue23864] issubclass without registration only works for "one-trick pony" collections ABCs. In-Reply-To: <1428145067.47.0.0726533343331.issue23864@psf.upfronthosting.co.za> Message-ID: <1544401012.45.0.788709270274.issue23864@psf.upfronthosting.co.za> G?ry added the comment: Guido, could we add those missing __subclasshook__ for consistency? ---------- nosy: +gvanrossum, maggyero _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 19:30:02 2018 From: report at bugs.python.org (Stefan Seefeld) Date: Mon, 10 Dec 2018 00:30:02 +0000 Subject: [issue35449] documenting objects In-Reply-To: <20181209233450.GX13061@ando.pearwood.info> Message-ID: <874978ef-8bff-ca02-1d0c-99e5ddf65e97@seefeld.name> Stefan Seefeld added the comment: On 2018-12-09 18:35, Steven D'Aprano wrote: > Steven D'Aprano added the comment: > >> Is there any discussion concerning what syntax might be used for >> docstrings associated with objects ? > I don't know about PyDoc in general, but I would expect help(obj) to > just use obj.__doc__ which will return the instance docstring if it > exists, and if not, the type docstring (if it exists). No new syntax is > required, the standard ``help(obj)`` is sufficient. That's why I distinguished between points 1) and 2) in my original mail: The syntax is about how certain tokens in the parse tree are associated as "docstring" with a given object (i.e., point 1), while the pydoc's behaviour (to either accept any `__doc__` attributes, or only those of specific types of objects) is entirely orthogonal to that (thus point 2). I now understand that the current `pydoc` behaviour is considered erroneous, and it sounds like a fix would be simple and focused in scope. >> (There seem to be some partial >> solutions added on top of the Python parser (I think `epydoc` offered >> one), but it would be nice to have a built-in solution to avoid having >> to re-invent wheels. > Are you suggesting we need new syntax to automatically assign docstrings > to instances? I don't think we do. No, I'm not suggesting that. I'm suggesting that within the current syntax, some additional semantic rules might be required to bind comments (or strings) to objects as "docstrings". For example: ``` foo = 123 """This is foo's docstring""" ``` might be one convention to add a docstring to a variable. ``` foo = 123 # This is foo's docstring ``` might be another. None of this is syntactically new, but the construction of the AST from the parse tree is. (I have seen both of these conventions used in custom tools to associate documentation to variables, which of course requires hacking into the parser internals, to add the given docstring to the object's `__doc__` attribute. It would be great to establish a convention for this, so in the future tools don't have to invent their own (non-portable) convention. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 19:48:39 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 10 Dec 2018 00:48:39 +0000 Subject: [issue35449] documenting objects In-Reply-To: <1544377302.47.0.788709270274.issue35449@psf.upfronthosting.co.za> Message-ID: <1544402919.1.0.788709270274.issue35449@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: There was a related proposal in https://www.python.org/dev/peps/pep-0258/#attribute-docstrings ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 20:42:49 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 10 Dec 2018 01:42:49 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1544406169.23.0.788709270274.issue33725@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I think it make sense to disable this test; the only possible modification would be to only disable it for macOS <= 10.13. AFAIK, that's the first version where core dumps were possible. (Aside: I also saw these core dumps for a long time on 10.13 and never associated it with fork-without-exec in Python code. Clearly, Apple has not done a good enough job of advertising this change.) I think it is useful to help users on macOS avoid these problematic idioms, via documentation and defaults. I think there's no way to predict when the core dumps will happen. With internal cases, I've seen repeated invocations of the same code only core dump on the first run of the process, and not subsequent ones, for reasons I do not understand. There seems to be a lot of mystery here, and without some explicit help from Apple, we're just doing our best to guess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 21:01:27 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 10 Dec 2018 02:01:27 +0000 Subject: [issue23864] issubclass without registration only works for "one-trick pony" collections ABCs. In-Reply-To: <1428145067.47.0.0726533343331.issue23864@psf.upfronthosting.co.za> Message-ID: <1544407287.37.0.788709270274.issue23864@psf.upfronthosting.co.za> Guido van Rossum added the comment: No, I consider this is a documentation problem. I don't recall why the docs say that (I don't even know if they still say that or whether Martijn misread them), but IMO this should not be changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 21:14:10 2018 From: report at bugs.python.org (Stefan Seefeld) Date: Mon, 10 Dec 2018 02:14:10 +0000 Subject: [issue35449] documenting objects In-Reply-To: <1544402919.1.0.788709270274.issue35449@psf.upfronthosting.co.za> Message-ID: <1dbd02e4-78bf-e073-4c3c-dc4023e781ab@seefeld.name> Stefan Seefeld added the comment: On 2018-12-09 19:48, Karthikeyan Singaravelan wrote: > There was a related proposal in https://www.python.org/dev/peps/pep-0258/#attribute-docstrings Right, but that was rejected (for unrelated reasons). The idea itself was rejected by Guido (https://www.python.org/dev/peps/pep-0224/#comments-from-our-bdfl), and I'm not aware whether anyone has addressed his concerns by proposing a different syntax. It's sad, as right now there doesn't appear to be any way to address this need... Stefan -- ...ich hab' noch einen Koffer in Berlin... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 22:59:37 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Dec 2018 03:59:37 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544414377.62.0.788709270274.issue35433@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset f46eccd0ffe65333035c3820886295b71c41ab6e by Steve Dower (Jeremy Kloth) in branch 'master': bpo-35433: Properly detect installed SDK versions (GH-11009) https://github.com/python/cpython/commit/f46eccd0ffe65333035c3820886295b71c41ab6e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 22:59:49 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Dec 2018 03:59:49 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544414389.6.0.788709270274.issue35433@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10292 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 23:03:47 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Dec 2018 04:03:47 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544414627.91.0.788709270274.issue35433@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +10293 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 23:05:24 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Dec 2018 04:05:24 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544414724.65.0.788709270274.issue35433@psf.upfronthosting.co.za> Steve Dower added the comment: Thanks for being thorough. I've merged the change now. ---------- assignee: -> steve.dower resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 23:08:09 2018 From: report at bugs.python.org (Martin Panter) Date: Mon, 10 Dec 2018 04:08:09 +0000 Subject: [issue35447] Redundant try-except block in urllib In-Reply-To: <1544368998.3.0.788709270274.issue35447@psf.upfronthosting.co.za> Message-ID: <1544414889.33.0.788709270274.issue35447@psf.upfronthosting.co.za> Martin Panter added the comment: Code in question: try: # non-sequence items should not work with len() # non-empty strings will fail this if len(query) and not isinstance(query[0], tuple): raise TypeError # [. . .] except TypeError: ty, va, tb = sys.exc_info() raise TypeError("not a valid non-string sequence " "or mapping object").with_traceback(tb) It is not redundant if you want a specific error message. I think that is the point of the code, to indicate the problem to the programmer. So the message is meant to be useful. I can think of three cases: >>> urlencode(None) # Non-sequence TypeError: not a valid non-string sequence or mapping object >>> urlencode({'sized but not indexable'}) TypeError: not a valid non-string sequence or mapping object >>> urlencode('item [0] not a tuple') TypeError: not a valid non-string sequence or mapping object ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 23:17:07 2018 From: report at bugs.python.org (Shishmarev Pavel) Date: Mon, 10 Dec 2018 04:17:07 +0000 Subject: [issue35447] Redundant try-except block in urllib In-Reply-To: <1544368998.3.0.788709270274.issue35447@psf.upfronthosting.co.za> Message-ID: <1544415427.54.0.788709270274.issue35447@psf.upfronthosting.co.za> Shishmarev Pavel added the comment: https://github.com/python/cpython/blob/master/Lib/urllib/parse.py#L875 It's redundant to raise and then catch exception. I mean: if len(query) and not isinstance(query[0], tuple): ty, va, tb = sys.exc_info() raise TypeError("not a valid non-string sequence " "or mapping object").with_traceback(tb) Would be more clean. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 23:20:25 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Dec 2018 04:20:25 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544415625.8.0.788709270274.issue35433@psf.upfronthosting.co.za> Steve Dower added the comment: Not making this change for Python 3.6, as that apparently breaks with the latest SDK (seen in the Pipelines build). So we'll leave 10.0.15063.0 as the maximum version for that - it's about to go into security mode anyway, and we don't rely on anything from the SDK with a security impact. (It's all import libraries, and the static libraries should be coming from the compiler toolset and not the platform SDK.) ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 23:20:43 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Dec 2018 04:20:43 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544415643.18.0.788709270274.issue35433@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c83ec055a09137e4b24f70e3bb5f887dc0ae6e8e by Miss Islington (bot) in branch '3.7': bpo-35433: Properly detect installed SDK versions (GH-11009) https://github.com/python/cpython/commit/c83ec055a09137e4b24f70e3bb5f887dc0ae6e8e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 23:35:42 2018 From: report at bugs.python.org (Martin Panter) Date: Mon, 10 Dec 2018 04:35:42 +0000 Subject: [issue35447] Redundant try-except block in urllib In-Reply-To: <1544368998.3.0.788709270274.issue35447@psf.upfronthosting.co.za> Message-ID: <1544416542.55.0.788709270274.issue35447@psf.upfronthosting.co.za> Martin Panter added the comment: That would not include the custom error message for the first two cases I listed. I suggest closing this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 23:57:48 2018 From: report at bugs.python.org (BobClown) Date: Mon, 10 Dec 2018 04:57:48 +0000 Subject: [issue33779] Error while installing python 3.6.5 on windows 10 In-Reply-To: <1528277897.55.0.592728768989.issue33779@psf.upfronthosting.co.za> Message-ID: <1544417868.68.0.788709270274.issue33779@psf.upfronthosting.co.za> BobClown added the comment: An addition to the record, as Google returns this issue as one of the top results for "python install \"Error 0x80070005: Failed to register bundle.\"": In my case, I had removed access for all users on the HKCU/RunOnce key and was getting this error. The purpose of removing access to that key is so Windows doesn't automatically relaunch all running programs on restart, as the setting to disable it does not exist in some earlier windows 10 patches. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce After restoring permission to my user, the package installed successfully. During installation, it was observed that the path to a temporary copy of the installer executable was added as a string value under the RunOnce key, purpose unknown. This string value was removed by the time installation was completed. While I disallowed access to this key manually, I suspect that some anti* software may also block access. Binary: python-3.7.1-amd64.exe SHA256 86E38B5F819F4141A7FA14DF39AB33E2AA97074E904A48AD498519AD3E69D017 ---------- nosy: +bobclown _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 00:08:36 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Dec 2018 05:08:36 +0000 Subject: [issue33779] Error while installing python 3.6.5 on windows 10 In-Reply-To: <1528277897.55.0.592728768989.issue33779@psf.upfronthosting.co.za> Message-ID: <1544418516.9.0.788709270274.issue33779@psf.upfronthosting.co.za> Steve Dower added the comment: Thanks for the extra info! I think the registration is put in there during install in case the PC restarts part way through, but it doesn't have to hang around after install is complete. Your explanation makes sense, and is a good reason to disable antivirus software while installing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 00:40:53 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 10 Dec 2018 05:40:53 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544420453.28.0.788709270274.issue35433@psf.upfronthosting.co.za> Change by Jeremy Kloth : ---------- pull_requests: +10294 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 00:47:42 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 10 Dec 2018 05:47:42 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544420862.91.0.788709270274.issue35433@psf.upfronthosting.co.za> Jeremy Kloth added the comment: I've added a PR for 3.6 using a different methodology for finding the available SDK. Without some change, my buildbot will continue to stay in the red (for 3.6). It does not the the highest SDK currently (previously?) listed the hard-coded list. It has the latest (17763), the latest for VS2015 (14393) and the baseline (10586). I would like to see a working build for VS2015 on 3.6. Once 3.6 is wrapped, I'll update the buildbot to VS2017 as that is what is listed in the README for building 3.7+, whereas 3.6 lists VS2015. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 01:55:19 2018 From: report at bugs.python.org (Andrew Tennikoff) Date: Mon, 10 Dec 2018 06:55:19 +0000 Subject: [issue23078] unittest.mock patch autospec doesn't work on staticmethods In-Reply-To: <1418892323.1.0.910322233262.issue23078@psf.upfronthosting.co.za> Message-ID: <1544424919.89.0.788709270274.issue23078@psf.upfronthosting.co.za> Change by Andrew Tennikoff : ---------- nosy: +atenni _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 02:21:53 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 10 Dec 2018 07:21:53 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils. In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1544426513.15.0.788709270274.issue35257@psf.upfronthosting.co.za> Ned Deily added the comment: > Unfortunately, it appears this won't be resolved in time for 3.7.2rc1 and 3.6.8rc1 An update: the cutoff for these releases has been extended until about 30 hours from now so there is perhaps a small chance that the PR for this could still be updated, reviewed, and merged in time. If not, it can wait. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 02:37:56 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 10 Dec 2018 07:37:56 +0000 Subject: [issue24928] mock.patch.dict spoils order of items in collections.OrderedDict In-Reply-To: <1440443995.19.0.0795335566212.issue24928@psf.upfronthosting.co.za> Message-ID: <1544427476.57.0.788709270274.issue24928@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks @nekobon for the patch. I am triaging old mock related issues. I think dict insertion order is maintained from 3.6 and guaranteed with 3.7 and above. But it would be good to add the unit test in the patch as a PR. I ran the test on master and it passes. ---------- nosy: +cjw296, mariocj89, xtreak versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 03:23:04 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 10 Dec 2018 08:23:04 +0000 Subject: [issue35449] documenting objects In-Reply-To: <874978ef-8bff-ca02-1d0c-99e5ddf65e97@seefeld.name> Message-ID: <20181210082257.GZ13061@ando.pearwood.info> Steven D'Aprano added the comment: I asked: > > Are you suggesting we need new syntax to automatically assign docstrings > > to instances? Stefan replied: > No, I'm not suggesting that. And then immediately went on to suggest new syntax for automatically binding a string to objects as docstrings. I am amused :-) Whether you want to call it "new semantics for existing syntax" or "new syntax" is a matter of terminology. The point is, you are suggesting something that requires dedicated support from the interpreter, as opposed to merely writing some Python code. > I'm suggesting that within the current > syntax, some additional semantic rules might be required to bind > comments (or strings) to objects as "docstrings". To my mind, it makes sense to have dedicated docstring syntax for classes, modules and functions: I expect that they will make up in excess of 95% of use-cases for docstrings. In this case, special cases *are* special enough to change the rules. But for the rare(?) cases of wanting to add docstrings to arbitrary instances, I don't think it is justified to have dedicated syntax to do it. It's easy enough and more than flexible enough to just do an instance attribute assignment: instance.__doc__ = """This is the instance docstring.""" I strongly oppose any suggestion that *comments* be treated as code: > foo = 123 > # This is foo's docstring Deleting comments shouldn't make have any runtime effect on the code, but in this case it would. (I'm willing to make an exception for the optional encoding cookie at the beginning of modules, as a rather special case.) So I think there are three related but separate issues here: 1. help(obj) and possibly PyDoc in general ought to support per-instance docstrings. I think that is uncontroversial and we just need somebody to do the work to make it happen. 2. Add special syntactic sugar to automatically associate a string with arbitrary instances as a docstring. I think that's overkill and unnecessary, but I'd be willing to be convinced otherwise. 3. Your examples suggest that even built-in immutable objects like ints should be able to take docstrings. I don't think that idea is going to fly, but I'm also not sure how serious you are about that. It runs into the problem that small ints and certain strings are cached, so your docstring could clobber my docstring. It is also going to require the addition of an extra attribute slot to every int, str, etc for the docstring, even if 99.999% of them never use it. > It would be great to establish a convention for this, so in the future > tools don't have to invent their own (non-portable) convention. ``instance.__doc__ = "docstring"`` seems pretty portable to me :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 03:30:56 2018 From: report at bugs.python.org (josephshi@yahoo.com) Date: Mon, 10 Dec 2018 08:30:56 +0000 Subject: [issue35324] ssl: FileNotFoundError when do handshake In-Reply-To: <1543300721.51.0.788709270274.issue35324@psf.upfronthosting.co.za> Message-ID: <1544430656.37.0.788709270274.issue35324@psf.upfronthosting.co.za> josephshi at yahoo.com added the comment: Hi, sorry I can't re-create the enviroment either because the in-house web server I connected to is out of my control. I can't re-create the web server for this exact issue. By the way, the web server is IIS. Still, I upload my code and the output under both python 3.6.7 and 3.7.1. You can see the code works under python 3.6.7 but broke under 3.7.1. ---------- Added file: https://bugs.python.org/file47983/py-file&output.7z _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 03:53:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 08:53:41 +0000 Subject: [issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py In-Reply-To: <1540308654.33.0.788709270274.issue35052@psf.upfronthosting.co.za> Message-ID: <1544432021.98.0.788709270274.issue35052@psf.upfronthosting.co.za> STINNER Victor added the comment: The bug was introduced in 2003 by: commit 787354c3b99c9a0c5fdbdd33d29f58ef26df379f Author: Martin v. L?wis Date: Sat Jan 25 15:28:29 2003 +0000 Merge with PyXML 1.80: Basic minidom changes to support the new higher-performance builder, as described: http://mail.python.org/pipermail/xml-sig/2002-February/007217.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 03:56:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 08:56:11 +0000 Subject: [issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py In-Reply-To: <1540308654.33.0.788709270274.issue35052@psf.upfronthosting.co.za> Message-ID: <1544432171.62.0.788709270274.issue35052@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10295 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 03:58:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 08:58:18 +0000 Subject: [issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py In-Reply-To: <1540308654.33.0.788709270274.issue35052@psf.upfronthosting.co.za> Message-ID: <1544432298.68.0.788709270274.issue35052@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote a fix: PR 11061. ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 04:18:19 2018 From: report at bugs.python.org (Mario Corchero) Date: Mon, 10 Dec 2018 09:18:19 +0000 Subject: [issue32299] unittest.mock.patch.dict.__enter__ should return the dict In-Reply-To: <1513148900.41.0.213398074469.issue32299@psf.upfronthosting.co.za> Message-ID: <1544433499.56.0.788709270274.issue32299@psf.upfronthosting.co.za> Change by Mario Corchero : ---------- pull_requests: +10296 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 04:18:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 09:18:29 +0000 Subject: [issue35451] Incorrect reference counting for sys.warnoptions and sys._xoptions Message-ID: <1544433509.38.0.788709270274.issue35451@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Borrowed references are incorrectly decrefed in get_warnoptions() and get_xoptions() in Python/sysmodule.c. The bag was introduced in issue30860. ---------- components: Interpreter Core messages: 331478 nosy: eric.snow, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Incorrect reference counting for sys.warnoptions and sys._xoptions type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 04:19:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 09:19:51 +0000 Subject: [issue35451] Incorrect reference counting for sys.warnoptions and sys._xoptions In-Reply-To: <1544433509.38.0.788709270274.issue35451@psf.upfronthosting.co.za> Message-ID: <1544433591.66.0.788709270274.issue35451@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10297 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 04:42:41 2018 From: report at bugs.python.org (Martin Panter) Date: Mon, 10 Dec 2018 09:42:41 +0000 Subject: [issue35446] incorrect example In-Reply-To: <1544359206.53.0.788709270274.issue35446@psf.upfronthosting.co.za> Message-ID: <1544434961.68.0.788709270274.issue35446@psf.upfronthosting.co.za> Martin Panter added the comment: It doesn?t make sense to move the ?except? line without moving the matching ?print? line. According to , ?A clause consists of a header and a ?suite?.? So when it talks about reversing the ?except? clauses, that includes reversing the corresponding ?print? lines, so they condinue to identify which exception handler was triggered. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:05:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 10:05:09 +0000 Subject: [issue35446] incorrect example In-Reply-To: <1544359206.53.0.788709270274.issue35446@psf.upfronthosting.co.za> Message-ID: <1544436309.84.0.788709270274.issue35446@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The example is correct. If the except clauses were reversed for cls in [B, C, D]: try: raise cls() except B: print("B") except C: print("C") except D: print("D") it would have printed B, B, B. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:06:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 10:06:51 +0000 Subject: [issue35447] Redundant try-except block in urllib In-Reply-To: <1544368998.3.0.788709270274.issue35447@psf.upfronthosting.co.za> Message-ID: <1544436411.66.0.788709270274.issue35447@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I concur with Martin. The try-except block was added for purpose. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:07:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 10:07:29 +0000 Subject: [issue31374] expat: warning: "_POSIX_C_SOURCE" redefined In-Reply-To: <1504737803.67.0.369927535596.issue31374@psf.upfronthosting.co.za> Message-ID: <1544436449.63.0.788709270274.issue31374@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10298 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:08:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 10:08:57 +0000 Subject: [issue35451] Incorrect reference counting for sys.warnoptions and sys._xoptions In-Reply-To: <1544433509.38.0.788709270274.issue35451@psf.upfronthosting.co.za> Message-ID: <1544436537.77.0.788709270274.issue35451@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 72ff7b4c000f7b8199231a0eb1ca4b119fab40a5 by Serhiy Storchaka in branch 'master': bpo-35451: Fix reference counting for sys.warnoptions and sys._xoptions. (GH-11063) https://github.com/python/cpython/commit/72ff7b4c000f7b8199231a0eb1ca4b119fab40a5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:09:13 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Dec 2018 10:09:13 +0000 Subject: [issue35451] Incorrect reference counting for sys.warnoptions and sys._xoptions In-Reply-To: <1544433509.38.0.788709270274.issue35451@psf.upfronthosting.co.za> Message-ID: <1544436553.42.0.788709270274.issue35451@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10299 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:10:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 10:10:59 +0000 Subject: [issue35445] Do not ignore errors when create posix.environ In-Reply-To: <1544358869.69.0.788709270274.issue35445@psf.upfronthosting.co.za> Message-ID: <1544436659.57.0.788709270274.issue35445@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 6fef0f1a8162e755f3b46677265b7cf052d9b83f by Serhiy Storchaka in branch 'master': bpo-35445: Do not ignore memory errors when create posix.environ. (GH-11049) https://github.com/python/cpython/commit/6fef0f1a8162e755f3b46677265b7cf052d9b83f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:12:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 10:12:55 +0000 Subject: [issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py In-Reply-To: <1540308654.33.0.788709270274.issue35052@psf.upfronthosting.co.za> Message-ID: <1544436775.87.0.788709270274.issue35052@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8e0418688906206fe59bd26344320c0fc026849e by Victor Stinner in branch 'master': bpo-35052: Fix handler on xml.dom.minidom.cloneNode() (GH-11061) https://github.com/python/cpython/commit/8e0418688906206fe59bd26344320c0fc026849e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:16:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 10:16:08 +0000 Subject: [issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py In-Reply-To: <1540308654.33.0.788709270274.issue35052@psf.upfronthosting.co.za> Message-ID: <1544436968.61.0.788709270274.issue35052@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10300 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:18:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 10:18:01 +0000 Subject: [issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py In-Reply-To: <1540308654.33.0.788709270274.issue35052@psf.upfronthosting.co.za> Message-ID: <1544437081.81.0.788709270274.issue35052@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10301 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:19:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 10:19:28 +0000 Subject: [issue35445] Do not ignore errors when create posix.environ In-Reply-To: <1544358869.69.0.788709270274.issue35445@psf.upfronthosting.co.za> Message-ID: <1544437168.44.0.788709270274.issue35445@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 Dec 10 05:21:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 10:21:57 +0000 Subject: [issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py In-Reply-To: <1540308654.33.0.788709270274.issue35052@psf.upfronthosting.co.za> Message-ID: <1544437317.04.0.788709270274.issue35052@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10302 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:22:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 10:22:39 +0000 Subject: [issue35050] Off-by-one bug in AF_ALG In-Reply-To: <1540299621.45.0.788709270274.issue35050@psf.upfronthosting.co.za> Message-ID: <1544437359.33.0.788709270274.issue35050@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2eb6ad8578fa9d764c21a92acd8e054e3202ad19 by Victor Stinner (Christian Heimes) in branch 'master': bpo-35050: AF_ALG length check off-by-one error (GH-10058) https://github.com/python/cpython/commit/2eb6ad8578fa9d764c21a92acd8e054e3202ad19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:26:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 10:26:39 +0000 Subject: [issue35050] Off-by-one bug in AF_ALG In-Reply-To: <1540299621.45.0.788709270274.issue35050@psf.upfronthosting.co.za> Message-ID: <1544437599.82.0.788709270274.issue35050@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10303 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:26:39 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Dec 2018 10:26:39 +0000 Subject: [issue35451] Incorrect reference counting for sys.warnoptions and sys._xoptions In-Reply-To: <1544433509.38.0.788709270274.issue35451@psf.upfronthosting.co.za> Message-ID: <1544437599.96.0.788709270274.issue35451@psf.upfronthosting.co.za> miss-islington added the comment: New changeset fc79175f5e6424c4978ba9e9b9bc006778cdfd40 by Miss Islington (bot) in branch '3.7': bpo-35451: Fix reference counting for sys.warnoptions and sys._xoptions. (GH-11063) https://github.com/python/cpython/commit/fc79175f5e6424c4978ba9e9b9bc006778cdfd40 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:26:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 10:26:51 +0000 Subject: [issue35050] Off-by-one bug in AF_ALG In-Reply-To: <1540299621.45.0.788709270274.issue35050@psf.upfronthosting.co.za> Message-ID: <1544437611.78.0.788709270274.issue35050@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10304 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:30:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 10:30:23 +0000 Subject: [issue31374] expat: warning: "_POSIX_C_SOURCE" redefined In-Reply-To: <1504737803.67.0.369927535596.issue31374@psf.upfronthosting.co.za> Message-ID: <1544437823.33.0.788709270274.issue31374@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset cf247359d5b7082044eea1fa94b5211a172b1ff6 by Victor Stinner in branch 'master': bpo-31374: Include pyconfig.h earlier in expat (GH-11064) https://github.com/python/cpython/commit/cf247359d5b7082044eea1fa94b5211a172b1ff6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:30:31 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Dec 2018 10:30:31 +0000 Subject: [issue31374] expat: warning: "_POSIX_C_SOURCE" redefined In-Reply-To: <1504737803.67.0.369927535596.issue31374@psf.upfronthosting.co.za> Message-ID: <1544437831.53.0.788709270274.issue31374@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10305 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:30:38 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Dec 2018 10:30:38 +0000 Subject: [issue31374] expat: warning: "_POSIX_C_SOURCE" redefined In-Reply-To: <1504737803.67.0.369927535596.issue31374@psf.upfronthosting.co.za> Message-ID: <1544437838.14.0.788709270274.issue31374@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10306 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:31:15 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Dec 2018 10:31:15 +0000 Subject: [issue31374] expat: warning: "_POSIX_C_SOURCE" redefined In-Reply-To: <1504737803.67.0.369927535596.issue31374@psf.upfronthosting.co.za> Message-ID: <1544437875.4.0.788709270274.issue31374@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10307 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:39:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 10:39:44 +0000 Subject: [issue35452] Make PySys_HasWarnOptions() never raising an exception Message-ID: <1544438384.96.0.788709270274.issue35452@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : While "warnings" was a static variable in Python/sysmodule.c, it was guarantied that PySys_HasWarnOptions() never raises an exception. But since it became a value of the sys dict (see issue30860), it can have an arbitrary type, and PySys_HasWarnOptions() can raise an exception (while returning 0). The proposed PR makes it never raising an exception again. ---------- components: Interpreter Core messages: 331488 nosy: eric.snow, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Make PySys_HasWarnOptions() never raising an exception type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:41:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 10:41:25 +0000 Subject: [issue35452] Make PySys_HasWarnOptions() never raising an exception In-Reply-To: <1544438384.96.0.788709270274.issue35452@psf.upfronthosting.co.za> Message-ID: <1544438485.76.0.788709270274.issue35452@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10308 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:42:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 10:42:15 +0000 Subject: [issue35451] Incorrect reference counting for sys.warnoptions and sys._xoptions In-Reply-To: <1544433509.38.0.788709270274.issue35451@psf.upfronthosting.co.za> Message-ID: <1544438535.72.0.788709270274.issue35451@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 Dec 10 05:45:28 2018 From: report at bugs.python.org (Stefan Bauer (TraceTronic)) Date: Mon, 10 Dec 2018 10:45:28 +0000 Subject: [issue35325] imp.find_module() return value documentation discrepancy In-Reply-To: <1543303624.81.0.788709270274.issue35325@psf.upfronthosting.co.za> Message-ID: <1544438728.59.0.788709270274.issue35325@psf.upfronthosting.co.za> Stefan Bauer (TraceTronic) added the comment: Hi, thank you for your proposal. However, your version still contains the discepancy. Maybe I formulated the problem not clear, so let's try again: The documentation should state that "pathname" will be None (not the empty string) for built-in and frozen modules in order to be in line with the implementation. Thank you very much for your efforts. Kind regards, Stefan ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:47:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 10:47:22 +0000 Subject: [issue35452] Make PySys_HasWarnOptions() to never raise an exception In-Reply-To: <1544438384.96.0.788709270274.issue35452@psf.upfronthosting.co.za> Message-ID: <1544438842.6.0.788709270274.issue35452@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- title: Make PySys_HasWarnOptions() never raising an exception -> Make PySys_HasWarnOptions() to never raise an exception _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:53:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 10:53:13 +0000 Subject: [issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py In-Reply-To: <1540308654.33.0.788709270274.issue35052@psf.upfronthosting.co.za> Message-ID: <1544439193.39.0.788709270274.issue35052@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3fd975583b8e43d8dc23c83d699cd10b1fee6f7f by Victor Stinner in branch '3.6': bpo-35052: Fix handler on xml.dom.minidom.cloneNode() (GH-11061) (GH-11067) https://github.com/python/cpython/commit/3fd975583b8e43d8dc23c83d699cd10b1fee6f7f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:54:42 2018 From: report at bugs.python.org (Cristian Ciupitu) Date: Mon, 10 Dec 2018 10:54:42 +0000 Subject: [issue35453] pathlib.Path: glob and rglob should accept PathLike patterns Message-ID: <1544439282.17.0.788709270274.issue35453@psf.upfronthosting.co.za> New submission from Cristian Ciupitu : pathlib.Path.glob and pathlib.Path.rglob don't work with os.PathLike patterns. Short example: from pathlib import Path, PurePath # fails tuple(Path('/etc').glob(PurePath('passwd'))) # TypeError tuple(Path('/etc').rglob(PurePath('passwd'))) # TypeError tuple(Path('C:\\').glob(PurePath('Windows'))) # AttributeError tuple(Path('C:\\').rglob(PurePath('Windows'))) # AttributeError # works from os import fspath tuple(Path('/etc').glob(fspath(PurePath('passwd')))) tuple(Path('/etc').rglob(fspath(PurePath('passwd')))) tuple(Path('C:\\').glob(fspath(PurePath('Windows')))) tuple(Path('C:\\').rglob(fspath(PurePath('Windows')))) ---------- components: Library (Lib) messages: 331491 nosy: ciupicri priority: normal severity: normal status: open title: pathlib.Path: glob and rglob should accept PathLike patterns versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:56:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 10:56:50 +0000 Subject: [issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py In-Reply-To: <1540308654.33.0.788709270274.issue35052@psf.upfronthosting.co.za> Message-ID: <1544439410.56.0.788709270274.issue35052@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c3cc75134d41c6d436c21d3d315dc069b4826432 by Victor Stinner in branch '3.7': bpo-35052: Fix handler on xml.dom.minidom.cloneNode() (GH-11061) (GH-11066) https://github.com/python/cpython/commit/c3cc75134d41c6d436c21d3d315dc069b4826432 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:56:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 10:56:56 +0000 Subject: [issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py In-Reply-To: <1540308654.33.0.788709270274.issue35052@psf.upfronthosting.co.za> Message-ID: <1544439416.61.0.788709270274.issue35052@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset cecf313d1ef4adc0ee5338dd0ca9be0b98302c87 by Victor Stinner in branch '2.7': bpo-35052: Fix handler on xml.dom.minidom.cloneNode() (GH-11061) (GH-11068) https://github.com/python/cpython/commit/cecf313d1ef4adc0ee5338dd0ca9be0b98302c87 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 05:58:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 10:58:45 +0000 Subject: [issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py In-Reply-To: <1540308654.33.0.788709270274.issue35052@psf.upfronthosting.co.za> Message-ID: <1544439525.02.0.788709270274.issue35052@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks for the bug report and proposed fix Charalampos Stratakis, thanks for the reproducer script Petr Viktorin. Shivank Gautam: > Hey Tal, I am extremely sorry for all delay. actually, due to internship and my university exams, I am unable to dedicate my time to bug(#35052). please consider it and you can tell Charalampos Stratakis in the bug to push his prepared pull request. I hope you will be still supportive when I will return in mid-dec after completing my exams. No problem. Charalampos Stratakis told me that he wanted to see this bug fixed to reduce the number of issues spotted by Coverity, so I fixed it. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 06:12:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 11:12:55 +0000 Subject: [issue35050] Off-by-one bug in AF_ALG In-Reply-To: <1540299621.45.0.788709270274.issue35050@psf.upfronthosting.co.za> Message-ID: <1544440375.02.0.788709270274.issue35050@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset bad41cefef6625807198a813d9dec2c08d59dc60 by Victor Stinner in branch '3.6': bpo-35050: AF_ALG length check off-by-one error (GH-10058) (GH-11070) https://github.com/python/cpython/commit/bad41cefef6625807198a813d9dec2c08d59dc60 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 06:13:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 11:13:04 +0000 Subject: [issue35050] Off-by-one bug in AF_ALG In-Reply-To: <1540299621.45.0.788709270274.issue35050@psf.upfronthosting.co.za> Message-ID: <1544440384.14.0.788709270274.issue35050@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 1a7b62d5571b3742e706d247dfe6509f68f1409d by Victor Stinner in branch '3.7': bpo-35050: AF_ALG length check off-by-one error (GH-10058) (GH-11069) https://github.com/python/cpython/commit/1a7b62d5571b3742e706d247dfe6509f68f1409d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 06:13:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 11:13:53 +0000 Subject: [issue35050] Off-by-one bug in AF_ALG In-Reply-To: <1540299621.45.0.788709270274.issue35050@psf.upfronthosting.co.za> Message-ID: <1544440433.63.0.788709270274.issue35050@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks for the fix Christian! Note: Python 2 is not affected, it doesn't support AF_ALG. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 06:15:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 11:15:58 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1544440558.26.0.788709270274.issue35257@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: Avoid leaking linker flags into distutils. -> Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 06:25:36 2018 From: report at bugs.python.org (Henry Chen) Date: Mon, 10 Dec 2018 11:25:36 +0000 Subject: [issue9633] pdb go stack up/down In-Reply-To: <1282133837.82.0.171010459939.issue9633@psf.upfronthosting.co.za> Message-ID: <1544441136.15.0.788709270274.issue9633@psf.upfronthosting.co.za> Change by Henry Chen : ---------- pull_requests: +10309 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 06:28:24 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Dec 2018 11:28:24 +0000 Subject: [issue31374] expat: warning: "_POSIX_C_SOURCE" redefined In-Reply-To: <1504737803.67.0.369927535596.issue31374@psf.upfronthosting.co.za> Message-ID: <1544441304.44.0.788709270274.issue31374@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 1467a3ac121897c2ad7512d664478d8916a35217 by Miss Islington (bot) in branch '3.7': bpo-31374: Include pyconfig.h earlier in expat (GH-11064) https://github.com/python/cpython/commit/1467a3ac121897c2ad7512d664478d8916a35217 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 06:35:21 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Dec 2018 11:35:21 +0000 Subject: [issue31374] expat: warning: "_POSIX_C_SOURCE" redefined In-Reply-To: <1504737803.67.0.369927535596.issue31374@psf.upfronthosting.co.za> Message-ID: <1544441721.94.0.788709270274.issue31374@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 7215e4857123afa8577f63c1024bcd1889a96305 by Miss Islington (bot) in branch '3.6': bpo-31374: Include pyconfig.h earlier in expat (GH-11064) https://github.com/python/cpython/commit/7215e4857123afa8577f63c1024bcd1889a96305 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 06:38:58 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Dec 2018 11:38:58 +0000 Subject: [issue31374] expat: warning: "_POSIX_C_SOURCE" redefined In-Reply-To: <1504737803.67.0.369927535596.issue31374@psf.upfronthosting.co.za> Message-ID: <1544441938.28.0.788709270274.issue31374@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 7bbf7b02ab0852aa757505a7e4062eb52817037a by Miss Islington (bot) in branch '2.7': bpo-31374: Include pyconfig.h earlier in expat (GH-11064) https://github.com/python/cpython/commit/7bbf7b02ab0852aa757505a7e4062eb52817037a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 06:49:02 2018 From: report at bugs.python.org (Stefan Seefeld) Date: Mon, 10 Dec 2018 11:49:02 +0000 Subject: [issue35449] documenting objects In-Reply-To: <1544377302.47.0.788709270274.issue35449@psf.upfronthosting.co.za> Message-ID: <1544442542.34.0.788709270274.issue35449@psf.upfronthosting.co.za> Stefan Seefeld added the comment: ad 3) sorry, I picked a bad example - I didn't mean to suggest that immutable objects should in fact become mutable by modifying their `__doc__` attribute. ad 1) good, glad to hear that. ad 2) fine. In fact, I'm not even proposing that per-instance docstring generation should be "on" by default. I'm merely asking whether the Python community can't (or even shouldn't) agree on a single convention for how to represent them, such that special tools can then support them, rather than different tools supporting different syntax / conventions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 06:50:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 11:50:24 +0000 Subject: [issue35452] Make PySys_HasWarnOptions() to never raise an exception In-Reply-To: <1544438384.96.0.788709270274.issue35452@psf.upfronthosting.co.za> Message-ID: <1544442624.26.0.788709270274.issue35452@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset dffccc6b594951fc798973e521da205785823f0f by Serhiy Storchaka in branch 'master': bpo-35452: Make PySys_HasWarnOptions() never raising an exception. (GH-11075) https://github.com/python/cpython/commit/dffccc6b594951fc798973e521da205785823f0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 06:50:33 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Dec 2018 11:50:33 +0000 Subject: [issue35452] Make PySys_HasWarnOptions() to never raise an exception In-Reply-To: <1544438384.96.0.788709270274.issue35452@psf.upfronthosting.co.za> Message-ID: <1544442633.6.0.788709270274.issue35452@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10310 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 07:24:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 12:24:55 +0000 Subject: [issue35453] pathlib.Path: glob and rglob should accept PathLike patterns In-Reply-To: <1544439282.17.0.788709270274.issue35453@psf.upfronthosting.co.za> Message-ID: <1544444695.84.0.788709270274.issue35453@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is for purpose. Path is not a glob pattern, and glob pattern is not a path. '*.txt' is a? ordinary file name on Linux and is invalid file name on Windows. If we wanted to accept Path in any place that accepts a string, we would make Path a subclass of str. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 07:30:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 12:30:05 +0000 Subject: [issue35454] Fix miscellaneous issues in error handling Message-ID: <1544445005.88.0.788709270274.issue35454@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The proposed patch fixes miscellaneous issues in error handling. ---------- components: Extension Modules, Interpreter Core messages: 331504 nosy: serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Fix miscellaneous issues in error handling type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 07:32:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 12:32:35 +0000 Subject: [issue35454] Fix miscellaneous issues in error handling In-Reply-To: <1544445005.88.0.788709270274.issue35454@psf.upfronthosting.co.za> Message-ID: <1544445155.01.0.788709270274.issue35454@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10311 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 07:34:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 12:34:37 +0000 Subject: [issue35454] Fix miscellaneous issues in error handling In-Reply-To: <1544445005.88.0.788709270274.issue35454@psf.upfronthosting.co.za> Message-ID: <1544445277.88.0.788709270274.issue35454@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is an extraction from my larger patch. These changes fix real bugs and should be backported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 07:37:11 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Dec 2018 12:37:11 +0000 Subject: [issue35452] Make PySys_HasWarnOptions() to never raise an exception In-Reply-To: <1544438384.96.0.788709270274.issue35452@psf.upfronthosting.co.za> Message-ID: <1544445431.38.0.788709270274.issue35452@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ea773eb1f9e79e9f558ca1fe8909cf6ac1c00371 by Miss Islington (bot) in branch '3.7': bpo-35452: Make PySys_HasWarnOptions() never raising an exception. (GH-11075) https://github.com/python/cpython/commit/ea773eb1f9e79e9f558ca1fe8909cf6ac1c00371 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 07:40:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 12:40:03 +0000 Subject: [issue35452] Make PySys_HasWarnOptions() to never raise an exception In-Reply-To: <1544438384.96.0.788709270274.issue35452@psf.upfronthosting.co.za> Message-ID: <1544445603.31.0.788709270274.issue35452@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 Dec 10 07:52:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 12:52:00 +0000 Subject: [issue31374] expat: warning: "_POSIX_C_SOURCE" redefined In-Reply-To: <1504737803.67.0.369927535596.issue31374@psf.upfronthosting.co.za> Message-ID: <1544446320.1.0.788709270274.issue31374@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 Mon Dec 10 08:07:21 2018 From: report at bugs.python.org (Cristian Ciupitu) Date: Mon, 10 Dec 2018 13:07:21 +0000 Subject: [issue35453] pathlib.Path: glob and rglob should accept PathLike patterns In-Reply-To: <1544439282.17.0.788709270274.issue35453@psf.upfronthosting.co.za> Message-ID: <1544447241.35.0.788709270274.issue35453@psf.upfronthosting.co.za> Cristian Ciupitu added the comment: What if the pattern has some directories in it, e.g. "SourceArt/**/*.png", how do you compose it? The traditional way is to either hardcode the separator (e.g. / or \) or use os.path.combine. I don't see why PurePath can't be used for this, e.g. PurePath('SourceArt')/"**'/'*.png'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 08:10:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 13:10:48 +0000 Subject: [issue27004] Handle script shbang options In-Reply-To: <1462995550.58.0.0858558226193.issue27004@psf.upfronthosting.co.za> Message-ID: <1544447448.21.0.788709270274.issue27004@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 09:06:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 14:06:12 +0000 Subject: [issue32788] Better error handling in sqlite3 In-Reply-To: <1518004914.65.0.467229070634.issue32788@psf.upfronthosting.co.za> Message-ID: <1544450772.1.0.788709270274.issue32788@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset fc662ac332443a316a120fa5287c235dc4f8739b by Serhiy Storchaka in branch 'master': bpo-32788: Better error handling in sqlite3. (GH-3723) https://github.com/python/cpython/commit/fc662ac332443a316a120fa5287c235dc4f8739b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 09:07:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 14:07:04 +0000 Subject: [issue32788] Better error handling in sqlite3 In-Reply-To: <1518004914.65.0.467229070634.issue32788@psf.upfronthosting.co.za> Message-ID: <1544450824.05.0.788709270274.issue32788@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 Dec 10 09:29:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 14:29:13 +0000 Subject: [issue31374] expat: warning: "_POSIX_C_SOURCE" redefined In-Reply-To: <1504737803.67.0.369927535596.issue31374@psf.upfronthosting.co.za> Message-ID: <1544452153.88.0.788709270274.issue31374@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10312 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 09:32:21 2018 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 10 Dec 2018 14:32:21 +0000 Subject: [issue35455] Solaris thread_time doesn't work with current implementation Message-ID: <1544452341.93.0.788709270274.issue35455@psf.upfronthosting.co.za> New submission from Jakub Kulik : Implementation of time.thread_time() doesn't work on Solaris because clock_id CLOCK_THREAD_CPUTIME_ID is not known (it is defined, but clock_gettime returns EINVAL error). Solaris, however, has function gethrvtime() which can substitute this functionality. I attached a possible patch which does work during tests and I further tested it with some basic scripts. ---------- components: Extension Modules files: thread_time.diff keywords: patch messages: 331509 nosy: kulikjak priority: normal severity: normal status: open title: Solaris thread_time doesn't work with current implementation versions: Python 3.7 Added file: https://bugs.python.org/file47984/thread_time.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 09:35:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 14:35:11 +0000 Subject: [issue35425] test_eintr fails randomly on AMD64 FreeBSD 10-STABLE Non-Debug 3.7: TypeError: 'int' object is not callable In-Reply-To: <1544099308.26.0.788709270274.issue35425@psf.upfronthosting.co.za> Message-ID: <1544452511.56.0.788709270274.issue35425@psf.upfronthosting.co.za> STINNER Victor added the comment: Sometimes a test is killed by SIGALRM (signal 14). I don't understand how it can happen, since test_eintr always disarm the ITIMER_REAL timer before restoring the old signal handler (which kills the process when SIGARLM is received). https://buildbot.python.org/all/#/builders/170/builds/190 0:05:34 load avg: 4.19 [102/416/1] test_eintr failed test_flock (__main__.FNTLEINTRTest) ... ok test_lockf (__main__.FNTLEINTRTest) ... ok test_read (__main__.OSEINTRTest) ... ok test_wait (__main__.OSEINTRTest) ... ok test_wait3 (__main__.OSEINTRTest) ... ok test_wait4 (__main__.OSEINTRTest) ... ok test_waitpid (__main__.OSEINTRTest) ... ok test_write (__main__.OSEINTRTest) ... ok test_devpoll (__main__.SelectEINTRTest) ... skipped 'need select.devpoll' test_epoll (__main__.SelectEINTRTest) ... skipped 'need select.epoll' test_kqueue (__main__.SelectEINTRTest) ... ok test_poll (__main__.SelectEINTRTest) ... ok test_select (__main__.SelectEINTRTest) ... test_all (test.test_eintr.EINTRTests) ... --- run eintr_tester.py --- --- eintr_tester.py completed: exit code -14 --- FAIL ====================================================================== FAIL: test_all (test.test_eintr.EINTRTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/test/test_eintr.py", line 31, in test_all self.fail("eintr_tester.py failed") AssertionError: eintr_tester.py failed ---------------------------------------------------------------------- Ran 1 test in 7.889s FAILED (failures=1) test test_eintr failed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 09:48:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 14:48:06 +0000 Subject: [issue31374] expat: warning: "_POSIX_C_SOURCE" redefined In-Reply-To: <1504737803.67.0.369927535596.issue31374@psf.upfronthosting.co.za> Message-ID: <1544453286.48.0.788709270274.issue31374@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10313 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 10:01:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 15:01:05 +0000 Subject: [issue31374] expat: warning: "_POSIX_C_SOURCE" redefined In-Reply-To: <1504737803.67.0.369927535596.issue31374@psf.upfronthosting.co.za> Message-ID: <1544454065.93.0.788709270274.issue31374@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2632df4c3f48f23af85a60bffc61030d52e83ee2 by Victor Stinner in branch '2.7': [2.7] bpo-31374: Include pyconfig.h earlier in expat (GH-11078) https://github.com/python/cpython/commit/2632df4c3f48f23af85a60bffc61030d52e83ee2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 10:06:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 15:06:22 +0000 Subject: [issue31374] expat: warning: "_POSIX_C_SOURCE" redefined In-Reply-To: <1504737803.67.0.369927535596.issue31374@psf.upfronthosting.co.za> Message-ID: <1544454382.19.0.788709270274.issue31374@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b6ef6f69a9afc979640a5f9883f799de1364bff7 by Victor Stinner in branch 'master': bpo-31374: expat doesn't include on Windows (GH-11079) https://github.com/python/cpython/commit/b6ef6f69a9afc979640a5f9883f799de1364bff7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 10:06:32 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Dec 2018 15:06:32 +0000 Subject: [issue31374] expat: warning: "_POSIX_C_SOURCE" redefined In-Reply-To: <1504737803.67.0.369927535596.issue31374@psf.upfronthosting.co.za> Message-ID: <1544454392.67.0.788709270274.issue31374@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10314 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 10:06:40 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Dec 2018 15:06:40 +0000 Subject: [issue31374] expat: warning: "_POSIX_C_SOURCE" redefined In-Reply-To: <1504737803.67.0.369927535596.issue31374@psf.upfronthosting.co.za> Message-ID: <1544454400.31.0.788709270274.issue31374@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10315 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 10:22:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 15:22:14 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544455334.73.0.788709270274.issue35433@psf.upfronthosting.co.za> STINNER Victor added the comment: I reopen the issue since https://github.com/python/cpython/pull/11060 for Python 3.6 is still open. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 10:25:35 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Dec 2018 15:25:35 +0000 Subject: [issue31374] expat: warning: "_POSIX_C_SOURCE" redefined In-Reply-To: <1504737803.67.0.369927535596.issue31374@psf.upfronthosting.co.za> Message-ID: <1544455535.07.0.788709270274.issue31374@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ef1fc0d031c925416d49b407518932ccbf57a0d2 by Miss Islington (bot) in branch '3.7': bpo-31374: expat doesn't include on Windows (GH-11079) https://github.com/python/cpython/commit/ef1fc0d031c925416d49b407518932ccbf57a0d2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 10:41:14 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Dec 2018 15:41:14 +0000 Subject: [issue31374] expat: warning: "_POSIX_C_SOURCE" redefined In-Reply-To: <1504737803.67.0.369927535596.issue31374@psf.upfronthosting.co.za> Message-ID: <1544456474.73.0.788709270274.issue31374@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3acf30de90936fe3714bb62873e2523c0440e652 by Miss Islington (bot) in branch '3.6': bpo-31374: expat doesn't include on Windows (GH-11079) https://github.com/python/cpython/commit/3acf30de90936fe3714bb62873e2523c0440e652 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 10:43:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 15:43:00 +0000 Subject: [issue31374] expat: warning: "_POSIX_C_SOURCE" redefined In-Reply-To: <1504737803.67.0.369927535596.issue31374@psf.upfronthosting.co.za> Message-ID: <1544456580.9.0.788709270274.issue31374@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, the warning should be fixed in all supported branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 10:55:24 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Dec 2018 15:55:24 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544457324.76.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: I'm just waiting on Victor to sign off on PR 11029 (or someone else to do it) so I can merge it and rebase PR 11027. Hopefully then someone will review it today so that we don't have to hold up 3.7.2rc1 any longer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 10:57:28 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 15:57:28 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544457448.63.0.788709270274.issue34977@psf.upfronthosting.co.za> STINNER Victor added the comment: Sorry, I don't have the bandwidth to provide a proper review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 11:11:10 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Dec 2018 16:11:10 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544458270.0.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: Okay, I'll merge the first part now so I can rebase the main one and *hopefully* someone will be willing to review it now it's smaller. Otherwise, I think we're best to go with buildbots and all the testing I've already done. This is my sole job today, so I'll keep an eye on the buildbots. I'll also get the docs updated as Paul suggested for the main PRs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 11:11:26 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Dec 2018 16:11:26 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544458286.5.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 1c3de541e64f75046b20cdd27bada1557e550bcd by Steve Dower in branch 'master': bpo-34977: Use venv redirector instead of original python.exe on Windows (GH-11029) https://github.com/python/cpython/commit/1c3de541e64f75046b20cdd27bada1557e550bcd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 11:11:37 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Dec 2018 16:11:37 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544458297.36.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset b264c609853eae9dbb45c6dbee11e84ae3927e88 by Steve Dower in branch '3.7': [3.7] bpo-34977: Use venv redirector instead of original python.exe on Windows (GH-11029) https://github.com/python/cpython/commit/b264c609853eae9dbb45c6dbee11e84ae3927e88 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 11:17:11 2018 From: report at bugs.python.org (Eddie Elizondo) Date: Mon, 10 Dec 2018 16:17:11 +0000 Subject: [issue35438] Extension modules using non-API functions In-Reply-To: <1544225159.96.0.788709270274.issue35438@psf.upfronthosting.co.za> Message-ID: <1544458631.91.0.788709270274.issue35438@psf.upfronthosting.co.za> Change by Eddie Elizondo : ---------- keywords: +patch pull_requests: +10316 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 11:18:46 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Dec 2018 16:18:46 +0000 Subject: [issue35438] Extension modules using non-API functions In-Reply-To: <1544225159.96.0.788709270274.issue35438@psf.upfronthosting.co.za> Message-ID: <1544458726.03.0.788709270274.issue35438@psf.upfronthosting.co.za> STINNER Victor added the comment: > Three extension modules: _testcapimodule.c, posixmodule.c, and mathmodule.c are using `_PyObject_LookupSpecial` which is not API. I don't understand the issue that you are trying to solve. Yes, Python builtin extensions use private functions of the C API. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 12:08:42 2018 From: report at bugs.python.org (Eddie Elizondo) Date: Mon, 10 Dec 2018 17:08:42 +0000 Subject: [issue35438] Extension modules using non-API functions In-Reply-To: <1544225159.96.0.788709270274.issue35438@psf.upfronthosting.co.za> Message-ID: <1544461722.3.0.788709270274.issue35438@psf.upfronthosting.co.za> Eddie Elizondo added the comment: @vstinner: Sorry for not being clear - The intention of this change is two-fold: 1) Simplify the implementation of these functions. 2) Reduce the surface area of the C-API. Given that the same functionality can be achieved with public functions of the C-API. This is a nice cleanup over the current approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 12:11:10 2018 From: report at bugs.python.org (Eddie Elizondo) Date: Mon, 10 Dec 2018 17:11:10 +0000 Subject: [issue35438] Cleanup extension functions using _PyObject_LookupSpecial In-Reply-To: <1544225159.96.0.788709270274.issue35438@psf.upfronthosting.co.za> Message-ID: <1544461870.53.0.788709270274.issue35438@psf.upfronthosting.co.za> Change by Eddie Elizondo : ---------- title: Extension modules using non-API functions -> Cleanup extension functions using _PyObject_LookupSpecial _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 12:11:35 2018 From: report at bugs.python.org (Eddie Elizondo) Date: Mon, 10 Dec 2018 17:11:35 +0000 Subject: [issue35438] Cleanup extension functions using _PyObject_LookupSpecial In-Reply-To: <1544225159.96.0.788709270274.issue35438@psf.upfronthosting.co.za> Message-ID: <1544461895.63.0.788709270274.issue35438@psf.upfronthosting.co.za> Eddie Elizondo added the comment: I also fixed the title to properly reflect what this is trying to achieve. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 12:11:39 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 10 Dec 2018 17:11:39 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1544461899.73.0.788709270274.issue34616@psf.upfronthosting.co.za> Matthias Bussonnier added the comment: So through time our heuristic to check wether a code should be async or not grew: https://github.com/ipython/ipython/blob/320d21bf56804541b27deb488871e488eb96929f/IPython/core/async_helpers.py#L94-L165 There also seem to be some code that uses `codeop.compile_command` to figure out wether the user code is valid syntax (or not), so that would need some update too. I'm thinking of submitting a talk at PyCon to explain what we've discover so far in IPython. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 12:32:07 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 10 Dec 2018 17:32:07 +0000 Subject: [issue31823] Opaque default value for close_fds argument in Popen.__init__ In-Reply-To: <1508445256.4.0.213398074469.issue31823@psf.upfronthosting.co.za> Message-ID: <1544463127.34.0.788709270274.issue31823@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 12:35:06 2018 From: report at bugs.python.org (pmpp) Date: Mon, 10 Dec 2018 17:35:06 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1544463306.48.0.788709270274.issue34616@psf.upfronthosting.co.za> pmpp added the comment: indeed adding async flag to compile and providing some 'aexec' is a very good idea ! *an async repl is really usefull when stuck with a threadless python* ( specific engines, or emscripten cpython ) "top-level async is invalid syntax" : Rewinding the readline history stack to get code "async'ified" is probably not the best way : readline is specific to some platforms. see https://github.com/pmp-p/aioprompt for a hack using that. First raising an exception "top level code is async" and allowing user to get source code from exception would maybe a nice start to an async repl. ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 12:38:09 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 10 Dec 2018 17:38:09 +0000 Subject: [issue31823] Opaque default value for close_fds argument in Popen.__init__ In-Reply-To: <1508445256.4.0.213398074469.issue31823@psf.upfronthosting.co.za> Message-ID: <1544463489.0.0.788709270274.issue31823@psf.upfronthosting.co.za> Gregory P. Smith added the comment: In 3.6 this help(subprocess.Popen.__init__) is accurate and encourages looking at the docs. In 3.7 and later it'll simply report close_fds=True in the siguature as that is the case in 3.7 onwards. I see nothing to fix here. ---------- nosy: +gregory.p.smith resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 12:53:21 2018 From: report at bugs.python.org (R. David Murray) Date: Mon, 10 Dec 2018 17:53:21 +0000 Subject: [issue35403] support application/wasm in mimetypes and http.server In-Reply-To: <1543911244.97.0.788709270274.issue35403@psf.upfronthosting.co.za> Message-ID: <1544464401.27.0.788709270274.issue35403@psf.upfronthosting.co.za> R. David Murray added the comment: We don't generally add a mime type until it is a de-jure or de-facto standard. If it is still in testing it is probably too soon to add it. For testing, you can always add it yourself in your code via the api that mimetypes provides. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 13:05:03 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 10 Dec 2018 18:05:03 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1544465103.6.0.788709270274.issue34616@psf.upfronthosting.co.za> Matthias Bussonnier added the comment: In IPython we use `prompt_toolkit` which does already provide a async readline alternative. Also have a look at https://github.com/ipython/ipython/blob/320d21bf56804541b27deb488871e488eb96929f/IPython/core/interactiveshell.py#L121-L150 Seem to be equivalent to what you aare trying to do with updating your locals here https://github.com/pmp-p/aioprompt/blob/93a25ea8753975be6ed891e8d45f22db91c52200/aioprompt/__init__.py#L78-L94 It just sets the function to not create a new local scope ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 13:27:24 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 10 Dec 2018 18:27:24 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544466444.24.0.788709270274.issue34977@psf.upfronthosting.co.za> Jeremy Kloth added the comment: See also bpo-35450: venv module doesn't create a copy of python binary by default ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 13:53:41 2018 From: report at bugs.python.org (pmpp) Date: Mon, 10 Dec 2018 18:53:41 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1544468021.67.0.788709270274.issue34616@psf.upfronthosting.co.za> pmpp added the comment: i already use prompt_toolkit on droid as it uses concurrent futures for completion and threads are allowed on that platform, and yeah it is quite good. but no way to use it on emscripten where cpython is 100% async ( it uses dummy_threading to load asyncio ). best you can do is fill an history buffer with the indented input, eval the whole thing when it's done with PyRun_SimpleString. having cpython storing code until sync/async path can be choosen could save a lot of external hacks with minimal impact on original repl loop, unless somebody is willing to make it *fully* async ( i know i can't ). The original repl input loop is really not made for async and i don't know if Sylvain Beuclair's work on "emterpreted" cpython covers also python3. thx for the pointers anyway and your article on async and ast was inspiration. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 14:25:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 19:25:08 +0000 Subject: [issue35438] Cleanup extension functions using _PyObject_LookupSpecial In-Reply-To: <1544225159.96.0.788709270274.issue35438@psf.upfronthosting.co.za> Message-ID: <1544469908.95.0.788709270274.issue35438@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is nothing wrong with using private C API in the implementation of standard CPython extensions. This API was designed for this. In contrary, there are problems with your code: * It is less efficient. String objects are created and destroyed twice per every function call, in PyObject_HasAttrString() and in PyObject_CallMethod(). Format string is parsed in PyObject_CallMethod(). Other temporary objects are created and destroyed. * It uses inherently broken PyObject_HasAttrString(). PyObject_HasAttrString() swallows exceptions (for example a MemoryError raised when create a temporary string object) and can return an incorrect result. * It is not equivalent with the existing code. For example it does not work properly if the dunder method is a static method. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 15:28:32 2018 From: report at bugs.python.org (David Heiberg) Date: Mon, 10 Dec 2018 20:28:32 +0000 Subject: [issue35448] ConfigParser .read() - handling of nonexistent files In-Reply-To: <1544373330.85.0.788709270274.issue35448@psf.upfronthosting.co.za> Message-ID: <1544473712.35.0.788709270274.issue35448@psf.upfronthosting.co.za> Change by David Heiberg : ---------- nosy: +dheiberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 15:31:42 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Dec 2018 20:31:42 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544473902.57.0.788709270274.issue35433@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset f04cc5fc0d2f644cccb57543aae487ee30091924 by Steve Dower (Jeremy Kloth) in branch '3.6': [3.6] bpo-35433: Properly detect installed SDK versions (GH-11009) https://github.com/python/cpython/commit/f04cc5fc0d2f644cccb57543aae487ee30091924 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 15:31:57 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Dec 2018 20:31:57 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544473917.15.0.788709270274.issue35433@psf.upfronthosting.co.za> Change by Steve Dower : ---------- resolution: -> fixed status: open -> closed versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 15:36:09 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Dec 2018 20:36:09 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544474169.52.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: Paul (and anyone else) - the below link should go directly to just the commit with the docs update. I did a slight rearrangement of the install docs to make the options clearer, and wrote up *just* enough info on nuget to help people use it right (I hope). Similarly for the Store package. Any comments appreciated. Still aiming to get this in for 3.7.2rc1 today. https://github.com/python/cpython/pull/11027/commits/7d7ddbc41bd30690de8c6227cebc41c4e0f3cf88 I've also kicked off a custom buildbot run against the 3.7 version of the change. The version in master ran earlier and was clean. Plus I'm running test builds on the release machine, so it should be ready to go. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 16:06:47 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Mon, 10 Dec 2018 21:06:47 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1544476007.12.0.788709270274.issue34616@psf.upfronthosting.co.za> Nathaniel Smith added the comment: > I'm thinking of submitting a talk at PyCon to explain what we've discover so far in IPython. You totally should! Or actually there are two options to think about: you can submit a general talk, or submit a talk to the language summit. (Or write two talks and do both, I guess.) They're pretty different ? the summit is a more informal thing (no video, smaller room), mostly just core devs, more of a working meeting kind of thing where you can argue about technical details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 16:22:31 2018 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 10 Dec 2018 21:22:31 +0000 Subject: [issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__' In-Reply-To: <1459972886.32.0.234738617564.issue26704@psf.upfronthosting.co.za> Message-ID: <1544476951.75.0.788709270274.issue26704@psf.upfronthosting.co.za> Change by Anthony Sottile : ---------- pull_requests: +10317 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 16:23:00 2018 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 10 Dec 2018 21:23:00 +0000 Subject: [issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__' In-Reply-To: <1459972886.32.0.234738617564.issue26704@psf.upfronthosting.co.za> Message-ID: <1544476980.31.0.788709270274.issue26704@psf.upfronthosting.co.za> Anthony Sottile added the comment: I've opened a PR with the test included: https://github.com/python/cpython/pull/11085 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 16:31:29 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Mon, 10 Dec 2018 21:31:29 +0000 Subject: [issue35438] Cleanup extension functions using _PyObject_LookupSpecial In-Reply-To: <1544225159.96.0.788709270274.issue35438@psf.upfronthosting.co.za> Message-ID: <1544477489.63.0.788709270274.issue35438@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Agreed with everything in Serhiy's comments. This patch disregards why _PyObject_LookupSpecial and the various _Py_IDENTIFIER related stuff was created in the first place (to handle a non-trivial task efficiently/correctly) in favor of trying to avoid C-APIs that are explicitly okay to use for the CPython standard extensions. The goal is a mistake in the first place; no patch fix will make the goal correct. Closing as not a bug. ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 16:34:29 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Mon, 10 Dec 2018 21:34:29 +0000 Subject: [issue35338] set union/intersection/difference could accept zero arguments In-Reply-To: <1543416655.98.0.788709270274.issue35338@psf.upfronthosting.co.za> Message-ID: <1544477669.55.0.788709270274.issue35338@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Given the "feature" in question isn't actually an intended feature (just an accident of how unbound methods work), I'm closing this. We're not going to try to make methods callable without self. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 16:38:16 2018 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 10 Dec 2018 21:38:16 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1544477896.38.0.788709270274.issue34616@psf.upfronthosting.co.za> Matthias Bussonnier added the comment: > Or actually there are two options to think about: you can submit a general talk, or submit a talk to the language summit. (Or write two talks and do both, I guess.) They're pretty different ? the summit is a more informal thing (no video, smaller room), mostly just core devs, more of a working meeting kind of thing where you can argue about technical details. Thanks, I may do that then ??if a core dev invite me to do so ? I wouldn't have dared otherwise. I'm not even sure you can suggest a language summit proposal yet. For the normal talk proposal here is what I have so far: https://gist.github.com/Carreau/20881c6c70f1cde9878db7aa247d432a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 16:45:05 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 10 Dec 2018 21:45:05 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1544478305.38.0.788709270274.issue35257@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: The PR is pending another round of review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 16:45:30 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 10 Dec 2018 21:45:30 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544478330.57.0.788709270274.issue35433@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: This commit broke the following (at least) the buildbots: https://buildbot.python.org/all/#/builders/38/builds/751 https://buildbot.python.org/all/#/builders/31/builds/719 can someone work on a fix? Otherwise we would have to revert the commit per our policy with buildbot failures ---------- nosy: +pablogsal status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 16:56:33 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 10 Dec 2018 21:56:33 +0000 Subject: [issue35425] test_eintr fails randomly on AMD64 FreeBSD 10-STABLE Non-Debug 3.7: TypeError: 'int' object is not callable In-Reply-To: <1544099308.26.0.788709270274.issue35425@psf.upfronthosting.co.za> Message-ID: <1544478993.13.0.788709270274.issue35425@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Could it be that there is another test that is sending SIGALRM but does not disarm the ITIMER_REAL timer before restoring the previous handler? --- TypeError: 'int' object is not callable Can it be that thread.file has some custom deallocator/finalizer that fails? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 17:08:33 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 10 Dec 2018 22:08:33 +0000 Subject: [issue35425] test_eintr fails randomly on AMD64 FreeBSD 10-STABLE Non-Debug 3.7: TypeError: 'int' object is not callable In-Reply-To: <1544099308.26.0.788709270274.issue35425@psf.upfronthosting.co.za> Message-ID: <1544479713.36.0.788709270274.issue35425@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: I logged in into the buildbot and try to reproduce that. After 230 iterations of `test_eintr` I cannot reproduce the signal problem. Maybe this is an interaction with some other test.... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 17:14:42 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 10 Dec 2018 22:14:42 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1544480082.07.0.788709270274.issue35412@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +10318 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 17:35:38 2018 From: report at bugs.python.org (David Bolen) Date: Mon, 10 Dec 2018 22:35:38 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544481338.11.0.788709270274.issue35433@psf.upfronthosting.co.za> David Bolen added the comment: I'm not that familiar (ok, at all) with the build process configuration, but in looking at the changes to python.props, it appears to now enforce the minimum in the build process regardless of whether it is found, whereas before the build tool was allowed to pick a default. On my Win8/10 builders, I don't have an SDK that matches anything in the new checks (10586, 14393, 15063), but instead just have a single later (16299) version installed. The Win7 buildbot does, however, also have an earlier 15063. So what happens if none of the checked versions exist? Am I correct that it'll enforce trying to use the minimum (10586) which won't work on my Win8/10 workers since it doesn't exist, while the default behavior to just use the SDK I have would be fine Or is the build tool supposed to ignore the missing SDK and still use a default if later? It seems to me the older default of letting the build tool apply its own defaults if no known matching SDK is found is better than specifying a possibly missing SDK, but obviously the older default caused an issue in Jeremy's original case. And since the prior behavior was just to try to avoid the build tool from defaulting to too old an SDK, another solution to problems in that case might be to remove the oldest SDK, thus moving the default forward. ---------- nosy: +db3l _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 17:53:50 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 10 Dec 2018 22:53:50 +0000 Subject: [issue35426] test_signal.test_interprocess_signal() race condition In-Reply-To: <1544099760.1.0.788709270274.issue35426@psf.upfronthosting.co.za> Message-ID: <1544482430.92.0.788709270274.issue35426@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +10319 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 18:00:24 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Dec 2018 23:00:24 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544482824.97.0.788709270274.issue35401@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: +patch pull_requests: +10320 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 18:20:32 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Dec 2018 23:20:32 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544484032.59.0.788709270274.issue35401@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +10321 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 18:24:15 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Dec 2018 23:24:15 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544484255.44.0.788709270274.issue35433@psf.upfronthosting.co.za> Steve Dower added the comment: I'm also looking at it, so please don't revert it just yet. I just installed 10.0.15063 onto my dev machine to test another 3.6 fix and it worked fine, so perhaps there's an option that is off here? ---------- resolution: fixed -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 18:28:56 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Dec 2018 23:28:56 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544484536.88.0.788709270274.issue35433@psf.upfronthosting.co.za> Steve Dower added the comment: Both io.h and stddef.h are from the UCRT, which *may* go through a different detection process than the rest of the WinSDK. That might be the cause. The "didn't find any supported SDKs" behavior is to try and use the earliest, which should fail, but all the others were going to fail too. I wonder if checking the installed UAP platform data is the wrong check, and we should look for a specific Include file instead? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 18:41:04 2018 From: report at bugs.python.org (David Bolen) Date: Mon, 10 Dec 2018 23:41:04 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544485264.11.0.788709270274.issue35433@psf.upfronthosting.co.za> David Bolen added the comment: Well, correct me if I'm wrong, but installing 15063 would then match one of the checks, and become the selected SDK, so be expected to work fine, right? I think (not sure) that the issue with my Win8/10 workers is they only have the later 16299. So in that case the build process is trying to enforce 10586 as a minimum (due to not finding anything else) which can't work. Assuming I'm interpreting the new WindowsTargetPlatformVersion definition correctly). When you say the "others were going to fail too" I don't think that's correct in all cases. That is, the installed version doesn't match the checked versions, but it's later, so it could work fine. And in this case it's the only version available so the default build tool selection is fine. I'm guessing Jeremy's case was having older (not workable) versions and still not matching one of the checked versions, in which case the build default of oldest would fail. And yes, in that case enforcing a missing version is no real difference since both options fail. Not sure if solving both cases is possible, but at least letting the build tool default to an available SDK if no match is found seems more conservative. It might still fail, but there are cases where it won't. And it seems more likely over time that someone may only have a later SDK than that they'll have an earlier one or a guaranteed match to those being checked. Or if we want to enforce specific versions, publishing them and forcing the build to fail hard would be an option too. I don't think the difference in registry vs. folder checks is an issue, at least not for me. On the Win8/10 workers, both the registry and filesystem are in agreement - the only thing available is 16299. I'm also not sure if it's possible, but it would be great to have some output somewhere about the selection. Right now there's nothing in the compiler stage output of a working vs. failing build to indicate why they are behaving differently. But that's probably a separate topic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 18:47:24 2018 From: report at bugs.python.org (David Bolen) Date: Mon, 10 Dec 2018 23:47:24 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544485644.22.0.788709270274.issue35433@psf.upfronthosting.co.za> David Bolen added the comment: Oh, since my reading comprehension must be low today, it appears like Jeremy actually had a closer situation previously as I'm in now, with a later (not older) version of the SDK that wasn't in the list. Which is interesting, since he got an error about the SDK whereas my workers weren't having an issue at that point. But I guess it still comes down to what to do if the hardcoded list doesn't match what's on the system, but the SDK on the system will actually work. Complain or let the default get used anyway? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 18:49:33 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 10 Dec 2018 23:49:33 +0000 Subject: [issue35454] Fix miscellaneous issues in error handling In-Reply-To: <1544445005.88.0.788709270274.issue35454@psf.upfronthosting.co.za> Message-ID: <1544485773.29.0.788709270274.issue35454@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Maybe a release blocker for 3.7.2 and 3.6.8? ---------- nosy: +cstratak, ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 18:53:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2018 23:53:22 +0000 Subject: [issue35454] Fix miscellaneous issues in error handling In-Reply-To: <1544445005.88.0.788709270274.issue35454@psf.upfronthosting.co.za> Message-ID: <1544486002.9.0.788709270274.issue35454@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: No. It is very hard to reproduce these errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 18:59:11 2018 From: report at bugs.python.org (David Bolen) Date: Mon, 10 Dec 2018 23:59:11 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544486351.47.0.788709270274.issue35433@psf.upfronthosting.co.za> David Bolen added the comment: (sorry for the rapid updates) I'm also fairly sure that none of my workers have update 3 for VS2015. They do however all have VS2017 - but I think VS2015 still gets picked for 3.6 if both are present, right? So that's another variable, in that my workers wouldn't have run into the update 3 issue with the older configuration that Jeremy did. Not sure if there's a way to have the build setup to work for both cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 19:13:23 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 11 Dec 2018 00:13:23 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544487203.07.0.788709270274.issue35433@psf.upfronthosting.co.za> Steve Dower added the comment: So before the change, the 16299 SDK wasn't being detected either, but perhaps the 10240 one was? That had some known issues in the debug UCRT, which is why the version gets printed out towards the end of the build. The only thing I can think of would be the WindowsTargetPlatformVersion setting, which is new. It may be that it is used differently on different MSBuild versions (which roughly match to VS versions) by the built-in target files. Are you able to run "MSBuild pythoncore.vcxproj /t:ShowVersionInfo /flp:v=diag" and upload the MSBuild.log file (or email it to me)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 19:25:18 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 11 Dec 2018 00:25:18 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544487918.46.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: Thanks, Paul. Appreciate it :) Doing a final call before I hit merge in an hour or so. Right now: * full release build works * full test pass on all CI + custom buildbots work * prior test package made it to the store * docs clearly show it may change again Any last pushback? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 20:17:34 2018 From: report at bugs.python.org (David Bolen) Date: Tue, 11 Dec 2018 01:17:34 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544491054.48.0.788709270274.issue35433@psf.upfronthosting.co.za> David Bolen added the comment: > So before the change, the 16299 SDK wasn't being detected either, but perhaps the 10240 one was? So I'm just confused.... It does seems likely that 10240 of the UCRT was being used (based on the attached msbuild logs). Howevr, the UCRT warning in the build process was fine, and said I was using 16299 (see https://buildbot.python.org/all/#/builders/31/builds/717/steps/1/logs/stdio for the last working build on Win10). I'm not sure what to trust - the msbuild log or whatever the ucrtused test is doing for detection? In either case, this issue commmit does seem to force selection of the non-existent 15063 SDK, at least based on msbuild.log - the process doesn't get far enough to run the UCRT version check. Using Win10 for the moment, under "Program Files (x86)" I do seem to have some older UCRT SDKs (in "Microsoft SDKs/Windows Kits/10/ExtensionSDKs/Microsoft.UniversalCRT.Debug") as 10.0.10150.0, 10.0.10240.0 and 10.0.16299.0. Whereas only 10.0.16299.0 exists in the "Windows Kits/10/Platforms/UAP" directory. So I guess msbuild is not strictly picking the "earliest" for UCRT as 10240 isn't quite the earliest. In comparison, my Windows 7 worker also has the 15063 UCRT SDK so the enforced minimum works there for the UCRT path. Of course, the ucrtused test in the build process seems to always say 16299. I ran the requested msbuild command on the Win10 worker as part of PCBuild\build.bat just after the first find_msbuild.bat call. I'm attaching the log files as msbuild-win10-good.log (commit prior to this change) and msbuild-win10-bad.log (after this change). So I guess the question is exactly what do we need to enforce in the build process and/or provide at a minimum on a worker? Should I just install the older 15063 SDK on Win8/10, or should we include some more recent versions in the build time version check? What is a new user trying to build Python likely to have (assuming they're still using VS2015). ---------- Added file: https://bugs.python.org/file47985/msbuild-win10-bad.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 20:18:26 2018 From: report at bugs.python.org (David Bolen) Date: Tue, 11 Dec 2018 01:18:26 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544491106.83.0.788709270274.issue35433@psf.upfronthosting.co.za> David Bolen added the comment: (and the working log) ---------- Added file: https://bugs.python.org/file47986/msbuild-win10-good.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 20:31:22 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 11 Dec 2018 01:31:22 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544491882.48.0.788709270274.issue35433@psf.upfronthosting.co.za> Jeremy Kloth added the comment: A quick look at the good build log does indicate that the 8.1 SDK was being used (vars UseWindows81SDK=true and WindowsTargetPlatformVersion=8.1) which is the default behavior for VS2015 if a matching (from python.props) Win10SDK cannot be found. It seems that the build tools you have installed do not give an error when the selected SDK (WindowsTargetPlatformVersion) isn't found on the system. You've said that you have the Build Tools for VS2015 installed, a quick look at the download date indicates that they were released prior to VS2015 Update 1 (which includes 10.0.10586.0). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 20:38:25 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 11 Dec 2018 01:38:25 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544492305.29.0.788709270274.issue35433@psf.upfronthosting.co.za> Jeremy Kloth added the comment: I forgot to mention that the presence of UseWindows81SDK in the build log indicates that the Build Tools are at most at version 1.2 (included with VS2015 Update 1) which should still work (it's what I tested against), but the difference may be the standalone Build Tools might not include an error for missing SDK whereas the VS2015 Tools do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 21:12:05 2018 From: report at bugs.python.org (David Bolen) Date: Tue, 11 Dec 2018 02:12:05 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544494325.31.0.788709270274.issue35433@psf.upfronthosting.co.za> David Bolen added the comment: Hmm, VS2015 started as a full installation (with UI), probably right from its initial release. The build tools only installation (v141) is for VS2017. Best I can tell I'm at update 1 - my update version in the registry is 14.0.24720 (plus I have a .1 installer still in the filesystem). Not sure why I don't have 10586 if that came with update 1. But I wouldn't be surprised if I'm no further. The last time I used the VS2015 installer it completely messed up one of my workers and took a bunch of time to recover from. When switching to VS2017 I think I thought it was going to be preferred for the 3.x series when available, so I probably treated the VS2015 version as less critical. I guess that didn't end up happening for earlier than 3.7. Anyway, best next steps to close out this issue... I assume my installing any matching SDK (say 15063) would allow the workers to match the build script. Alternatively, including more recent SDKs (16299 is the next in line) in the build script would work with the existing workers. I'm fine either way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 21:33:23 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 11 Dec 2018 02:33:23 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544495603.22.0.788709270274.issue35433@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Well, if VS2015 is installed, the simplest way to have the required SDK(s) is to go to Control Panel -> Uninstall -> Microsoft Visual Studio (Community) 2015 Click Modify. Expand "Windows and Web Development" Expand "Universal Windows App Development Tools" Select at least "Windows 10 SDK (10.0.10586)" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 21:53:09 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 11 Dec 2018 02:53:09 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544496789.23.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 0cd6391fd890368ea1743dac50c366b42f2fd126 by Steve Dower in branch 'master': bpo-34977: Add Windows App Store package (GH-11027) https://github.com/python/cpython/commit/0cd6391fd890368ea1743dac50c366b42f2fd126 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 22:06:35 2018 From: report at bugs.python.org (David Bolen) Date: Tue, 11 Dec 2018 03:06:35 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544497595.23.0.788709270274.issue35433@psf.upfronthosting.co.za> David Bolen added the comment: Oh, it's not the installation itself, I'm just wondering if allowing a newer version is ok too? Of course, it doesn't preclude expanding the build script in the future, so I've installed 15063 to both Win8/10 workers. I don't currently have access to restart builds through the buildbot web interface any more, but if someone who does wants to rerun the last 3.6 build on each builder we can make sure this resolves the issue on those workers. I've done a quick manual build that compiles with the exception of not finding midl.exe for pyshellext, but that seems separate (every SDK has the binary) so I'm assuming it's environmental outside of the regular build environment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 22:18:13 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 11 Dec 2018 03:18:13 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544497595.23.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: Jeremy Kloth added the comment: > Oh, it's not the installation itself, I'm just wondering if allowing a newer version is ok too? The original PR (included in 3.7, 3.x) uses the latest discovered SDK, but Steve stated that that logic broke the Pipelines build, so I reworked to PR to just check for the versions already hard-coded. > Of course, it doesn't preclude expanding the build script in the future, so I've installed 15063 to both Win8/10 workers. For 3.6, this is the last hurrah. It goes into security mode after tonight. Although, it does seem that we might need to add a check for the SDK ourselves instead of relying on MSBuild to do it (it may be a full Visual Studio only thing, not Build Tools). > I don't currently have access to restart builds through the buildbot web interface any more If anyone with the power to do so is watching, this is something that I miss now, too. It seems that the buildbot owners are not given the proper permissions for this task. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 22:29:50 2018 From: report at bugs.python.org (David Bolen) Date: Tue, 11 Dec 2018 03:29:50 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544498990.72.0.788709270274.issue35433@psf.upfronthosting.co.za> David Bolen added the comment: Ah, got it (and see the pipelines comment by Steve). Jeremy, I suspect you might actually be able to restart the most recent 3.6 builds on my builders since you were the committer. It changed in Sep to only allow python-core users and the "owner" of the build. Though I don't think I learned for sure if owner was the author of the commit or just the actual committer. I think Zachary was going to look into it time permitting. We probably need a different GitHub group for buildbot owners or something. Separately, I think in the context of this issue I think it's fair to say that the commit need not be rolled back. I have to imagine that anyone trying to build 3.6 using VS 2015 at this point is going to be better represented by Jeremy's worker than mine (in terms of VS point release and default SDK installation), and I expect to be able to resolve any remaining issues worker-side once some 3.6 builds go through. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 22:52:40 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 11 Dec 2018 03:52:40 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544500360.86.0.788709270274.issue35401@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 4824385fec0a1de99b4183f995a3e4923771bf64 by Steve Dower in branch 'master': bpo-35401: Update Windows build to OpenSSL 1.1.0j (GH-11088) https://github.com/python/cpython/commit/4824385fec0a1de99b4183f995a3e4923771bf64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 22:52:53 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 11 Dec 2018 03:52:53 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544500373.28.0.788709270274.issue35401@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 309d7207f691b3eaa988d2293b9d023943982a9f by Steve Dower in branch '3.6': bpo-35401: Updates Windows build to OpenSSL 1.0.2q (GH-11089) https://github.com/python/cpython/commit/309d7207f691b3eaa988d2293b9d023943982a9f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 22:52:55 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 03:52:55 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544500375.22.0.788709270274.issue35401@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10322 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 22:56:58 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 11 Dec 2018 03:56:58 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544500618.97.0.788709270274.issue35401@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +10323 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 22:58:54 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 11 Dec 2018 03:58:54 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544500734.66.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 0e4ad88ff8956d9289ab0a1314636ac15b374459 by Steve Dower in branch '3.7': bpo-34977: Add Windows App Store package (GH-11027) https://github.com/python/cpython/commit/0e4ad88ff8956d9289ab0a1314636ac15b374459 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 23:06:34 2018 From: report at bugs.python.org (Cristian Ciupitu) Date: Tue, 11 Dec 2018 04:06:34 +0000 Subject: [issue35453] pathlib.Path: glob and rglob should accept PathLike patterns In-Reply-To: <1544439282.17.0.788709270274.issue35453@psf.upfronthosting.co.za> Message-ID: <1544501194.38.0.788709270274.issue35453@psf.upfronthosting.co.za> Cristian Ciupitu added the comment: Err, I meant os.path.join instead of os.path.combine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 23:16:50 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 04:16:50 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544501810.13.0.788709270274.issue35401@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d1fb21209bca0620ece849e05cca97bce861c996 by Miss Islington (bot) in branch '3.7': bpo-35401: Update Windows build to OpenSSL 1.1.0j (GH-11088) https://github.com/python/cpython/commit/d1fb21209bca0620ece849e05cca97bce861c996 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 23:26:35 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 11 Dec 2018 04:26:35 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544502395.51.0.788709270274.issue35401@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 3c8bd22b8f0d7f57261b9d3c90e56447cd5acf94 by Steve Dower in branch '2.7': bpo-35401: Updates Windows build to OpenSSL 1.0.2q (GH-11089) https://github.com/python/cpython/commit/3c8bd22b8f0d7f57261b9d3c90e56447cd5acf94 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 23:37:03 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 11 Dec 2018 04:37:03 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544503023.56.0.788709270274.issue34977@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +10324 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 23:40:29 2018 From: report at bugs.python.org (Yahya Abou Imran) Date: Tue, 11 Dec 2018 04:40:29 +0000 Subject: [issue35456] asyncio.Task.set_result() and set_exception() missing docstrings (and Liskov sub. principle) Message-ID: <1544503229.89.0.788709270274.issue35456@psf.upfronthosting.co.za> New submission from Yahya Abou Imran : In asyncio.Task help: | set_exception(self, exception, /) | Mark the future done and set an exception. | | If the future is already done when this method is called, raises | InvalidStateError. | | set_result(self, result, /) | Mark the future done and set its result. | | If the future is already done when this method is called, raises | InvalidStateError. These doctrings are inherited from asyncio.Future. But in fact it's wrong since: https://github.com/python/cpython/blob/4824385fec0a1de99b4183f995a3e4923771bf64/Lib/asyncio/tasks.py#L161: def set_result(self, result): raise RuntimeError('Task does not support set_result operation') def set_exception(self, exception): raise RuntimeError('Task does not support set_exception operation') Just adding another docstring is not a good solution - at leas for me - because the problem is in fact deeper: This prove by itself that a Task is not a Future in fact, or shouldn't be, because this breaks the Liskov substitution principle. We could have both Future and Task inheriting from some base class like PendingOperation witch would contain all the methods of Future except these two setters. One problem to deal with might be those calls to super().set_result/exception() in Task._step(): https://github.com/python/cpython/blob/4824385fec0a1de99b4183f995a3e4923771bf64/Lib/asyncio/tasks.py#L254 except StopIteration as exc: if self._must_cancel: # Task is cancelled right before coro stops. self._must_cancel = False super().set_exception(exceptions.CancelledError()) else: super().set_result(exc.value) except exceptions.CancelledError: super().cancel() # I.e., Future.cancel(self). except Exception as exc: super().set_exception(exc) except BaseException as exc: super().set_exception(exc) raise One way to deal with that would be to let a Task have a Future. "Prefer composition over inheritance" as they say. I want to work on PR for this if nobody goes against it... PS: I really don't like when some people says that Python core developers are known to have poor knowledge in regard to OOP principles. So I really don't like letting something like this in the standard library... ---------- messages: 331570 nosy: yahya-abou-imran priority: normal severity: normal status: open title: asyncio.Task.set_result() and set_exception() missing docstrings (and Liskov sub. principle) type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 23:40:53 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 11 Dec 2018 04:40:53 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544503253.14.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: Luckily, just noticed that I introduced a bug as part of splitting up the original PR into two. It wasn't going to have an impact until the package was properly installed from the store, but without the proper directory resolution in there (since the variable I removed is never defined now), in some scenarios it wouldn't be possible to launch Python from a process outside of the app package, such as a virtual environment. Testing in a proper app container is difficult, but I'll see if I can come up with a way to do it. It might require a custom buildbot, so I'll see whether there's a way I can do that (historically we've not been able to wire internal work machines - including Azure hosted ones - into other CI systems, but I'll try again). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 23:41:17 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Dec 2018 04:41:17 +0000 Subject: [issue35456] asyncio.Task.set_result() and set_exception() missing docstrings (and Liskov sub. principle) In-Reply-To: <1544503229.89.0.788709270274.issue35456@psf.upfronthosting.co.za> Message-ID: <1544503277.43.0.788709270274.issue35456@psf.upfronthosting.co.za> Change by Ned Deily : ---------- components: +asyncio nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 23:56:11 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 11 Dec 2018 04:56:11 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544504171.48.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset d5a6a389d492c5e3d7933bafbd5252fd86ac4d49 by Steve Dower in branch 'master': bpo-34977: Remove unused preprocessor definition (GH-11092) https://github.com/python/cpython/commit/d5a6a389d492c5e3d7933bafbd5252fd86ac4d49 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 23:56:19 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 04:56:19 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544504179.76.0.788709270274.issue34977@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10325 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 00:05:56 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Dec 2018 05:05:56 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544504756.38.0.788709270274.issue35401@psf.upfronthosting.co.za> Change by Ned Deily : ---------- pull_requests: +10326 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 00:15:01 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 05:15:01 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544505301.54.0.788709270274.issue34977@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 9bb306d586e3f1a48db40bd9519412de4fff3ee8 by Miss Islington (bot) in branch '3.7': bpo-34977: Remove unused preprocessor definition (GH-11092) https://github.com/python/cpython/commit/9bb306d586e3f1a48db40bd9519412de4fff3ee8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 00:18:41 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Dec 2018 05:18:41 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544505521.9.0.788709270274.issue35401@psf.upfronthosting.co.za> Change by Ned Deily : ---------- pull_requests: +10327 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 00:24:08 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 05:24:08 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544505848.72.0.788709270274.issue35401@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3ec982640f89f6ce56dd2699a81e0bd834ae0c95 by Miss Islington (bot) (Ned Deily) in branch 'master': bpo-35401: Update macOS installer to OpenSSL 1.1.0j (GH-11094) https://github.com/python/cpython/commit/3ec982640f89f6ce56dd2699a81e0bd834ae0c95 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 00:24:18 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 05:24:18 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544505858.29.0.788709270274.issue35401@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10328 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 00:37:56 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 05:37:56 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544506676.76.0.788709270274.issue35401@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 419b5ffc2ca46d7adf0be6216ca3a6e40028e50f by Miss Islington (bot) (Ned Deily) in branch '3.6': [3.6] bpo-35401: Update macOS installer to OpenSSL 1.0.2q (GH-11095) https://github.com/python/cpython/commit/419b5ffc2ca46d7adf0be6216ca3a6e40028e50f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 00:38:03 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 05:38:03 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544506683.7.0.788709270274.issue35401@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10329 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 00:43:21 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 05:43:21 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544507001.25.0.788709270274.issue35401@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c37923ece75721c21b06f7e3645d2838c2452e18 by Miss Islington (bot) in branch '3.7': bpo-35401: Update macOS installer to OpenSSL 1.1.0j (GH-11094) https://github.com/python/cpython/commit/c37923ece75721c21b06f7e3645d2838c2452e18 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 00:44:13 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Dec 2018 05:44:13 +0000 Subject: [issue35402] Upgrade macOS (and Windows?) installer to Tcl/Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544507053.8.0.788709270274.issue35402@psf.upfronthosting.co.za> Change by Ned Deily : ---------- keywords: +patch pull_requests: +10330 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 00:54:06 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 05:54:06 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544507646.6.0.788709270274.issue35401@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 55076cc0ffd1b7602d67f3a9a420d6261ffd5c89 by Miss Islington (bot) in branch '2.7': [3.6] bpo-35401: Update macOS installer to OpenSSL 1.0.2q (GH-11095) https://github.com/python/cpython/commit/55076cc0ffd1b7602d67f3a9a420d6261ffd5c89 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 00:56:42 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Dec 2018 05:56:42 +0000 Subject: [issue35401] Upgrade Windows and macOS installers to use OpenSSL 1.1.0j / 1.0.2q In-Reply-To: <1543907432.02.0.788709270274.issue35401@psf.upfronthosting.co.za> Message-ID: <1544507802.47.0.788709270274.issue35401@psf.upfronthosting.co.za> Change by Ned Deily : ---------- assignee: christian.heimes -> priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:07:00 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Dec 2018 06:07:00 +0000 Subject: [issue35402] Upgrade macOS (and Windows?) installer to Tcl/Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544508420.43.0.788709270274.issue35402@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 7cf3d8e25174c8871883e42f3240fd7f01efd3a8 by Ned Deily in branch 'master': bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101) https://github.com/python/cpython/commit/7cf3d8e25174c8871883e42f3240fd7f01efd3a8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:07:09 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 06:07:09 +0000 Subject: [issue35402] Upgrade macOS (and Windows?) installer to Tcl/Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544508429.16.0.788709270274.issue35402@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10331 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:07:17 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 06:07:17 +0000 Subject: [issue35402] Upgrade macOS (and Windows?) installer to Tcl/Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544508437.15.0.788709270274.issue35402@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10332 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:07:24 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 06:07:24 +0000 Subject: [issue35402] Upgrade macOS (and Windows?) installer to Tcl/Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544508444.87.0.788709270274.issue35402@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10333 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:23:47 2018 From: report at bugs.python.org (Chris Withers) Date: Tue, 11 Dec 2018 06:23:47 +0000 Subject: [issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__' In-Reply-To: <1459972886.32.0.234738617564.issue26704@psf.upfronthosting.co.za> Message-ID: <1544509427.15.0.788709270274.issue26704@psf.upfronthosting.co.za> Chris Withers added the comment: Before we get too far: what's the use case for this double patching? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:28:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 06:28:21 +0000 Subject: [issue35444] Unify and optimize the helper for getting a builtin object In-Reply-To: <1544353290.83.0.788709270274.issue35444@psf.upfronthosting.co.za> Message-ID: <1544509701.22.0.788709270274.issue35444@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset bb86bf4c4eaa30b1f5192dab9f389ce0bb61114d by Serhiy Storchaka in branch 'master': bpo-35444: Unify and optimize the helper for getting a builtin object. (GH-11047) https://github.com/python/cpython/commit/bb86bf4c4eaa30b1f5192dab9f389ce0bb61114d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:28:51 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 06:28:51 +0000 Subject: [issue35402] Upgrade macOS (and Windows?) installer to Tcl/Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544509731.24.0.788709270274.issue35402@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3b9a0186c44d0c3e477c38fdc00203ec99aec912 by Miss Islington (bot) in branch '3.7': bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101) https://github.com/python/cpython/commit/3b9a0186c44d0c3e477c38fdc00203ec99aec912 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:29:47 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 06:29:47 +0000 Subject: [issue35402] Upgrade macOS (and Windows?) installer to Tcl/Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544509787.19.0.788709270274.issue35402@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 37607f26697351751165a042f91f04530ce333f7 by Miss Islington (bot) in branch '3.6': bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101) https://github.com/python/cpython/commit/37607f26697351751165a042f91f04530ce333f7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:33:15 2018 From: report at bugs.python.org (Chris Withers) Date: Tue, 11 Dec 2018 06:33:15 +0000 Subject: [issue28054] Diff for visually comparing actual with expected in mock.assert_called_with. In-Reply-To: <1473461073.51.0.19108692382.issue28054@psf.upfronthosting.co.za> Message-ID: <1544509995.56.0.788709270274.issue28054@psf.upfronthosting.co.za> Chris Withers added the comment: This is a tricky one as there's plenty of prior art, with pytest's assertion rewriting [1], testfixtures compare [2] and the stuff that unittest already does [3]. I don't think any solution should rely on a TestCase being used as pytest, which is the most prevalent testing framework now, doesn't want to rely on them (they do come with a lot of baggage ;-)). Can we make use of the pretty diffing stuff in unittest without explicitly making it a requirement? [1] https://docs.pytest.org/en/latest/assert.html [2] https://testfixtures.readthedocs.io/en/latest/comparing.html#dicts [3] https://docs.python.org/3.8/library/unittest.html#unittest.TestCase.assertDictEqual ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:34:51 2018 From: report at bugs.python.org (Chris Withers) Date: Tue, 11 Dec 2018 06:34:51 +0000 Subject: [issue24928] mock.patch.dict spoils order of items in collections.OrderedDict In-Reply-To: <1440443995.19.0.0795335566212.issue24928@psf.upfronthosting.co.za> Message-ID: <1544510091.6.0.788709270274.issue24928@psf.upfronthosting.co.za> Chris Withers added the comment: More tests are generally a good thing, so go for it :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:38:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 06:38:05 +0000 Subject: [issue35454] Fix miscellaneous issues in error handling In-Reply-To: <1544445005.88.0.788709270274.issue35454@psf.upfronthosting.co.za> Message-ID: <1544510285.37.0.788709270274.issue35454@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8905fcc85a6fc3ac394bc89b0bbf40897e9497a6 by Serhiy Storchaka in branch 'master': bpo-35454: Fix miscellaneous minor issues in error handling. (#11077) https://github.com/python/cpython/commit/8905fcc85a6fc3ac394bc89b0bbf40897e9497a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:38:14 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 06:38:14 +0000 Subject: [issue35454] Fix miscellaneous issues in error handling In-Reply-To: <1544445005.88.0.788709270274.issue35454@psf.upfronthosting.co.za> Message-ID: <1544510294.12.0.788709270274.issue35454@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10334 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:39:36 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 06:39:36 +0000 Subject: [issue35402] Upgrade macOS (and Windows?) installer to Tcl/Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544510376.19.0.788709270274.issue35402@psf.upfronthosting.co.za> miss-islington added the comment: New changeset aa580508431d231677cfaa13ac9b6aa37538b9ef by Miss Islington (bot) in branch '2.7': bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101) https://github.com/python/cpython/commit/aa580508431d231677cfaa13ac9b6aa37538b9ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:40:08 2018 From: report at bugs.python.org (hongweipeng) Date: Tue, 11 Dec 2018 06:40:08 +0000 Subject: [issue35448] ConfigParser .read() - handling of nonexistent files In-Reply-To: <1544373330.85.0.788709270274.issue35448@psf.upfronthosting.co.za> Message-ID: <1544510408.25.0.788709270274.issue35448@psf.upfronthosting.co.za> Change by hongweipeng : ---------- nosy: +hongweipeng _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:45:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 06:45:49 +0000 Subject: [issue35454] Fix miscellaneous issues in error handling In-Reply-To: <1544445005.88.0.788709270274.issue35454@psf.upfronthosting.co.za> Message-ID: <1544510749.41.0.788709270274.issue35454@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10335 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:54:10 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Dec 2018 06:54:10 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544511250.37.0.788709270274.issue35402@psf.upfronthosting.co.za> Ned Deily added the comment: The macOS installers will use Tcl 8.6.9 and Tk 8.6.9.1 starting with 3.7.2rc1 and 3.6.8rc1. Due to time constraints, the Windows builds will get updated later. ---------- title: Upgrade macOS (and Windows?) installer to Tcl/Tk 8.6.9.1 -> Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:55:45 2018 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 11 Dec 2018 06:55:45 +0000 Subject: [issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__' In-Reply-To: <1459972886.32.0.234738617564.issue26704@psf.upfronthosting.co.za> Message-ID: <1544511345.65.0.788709270274.issue26704@psf.upfronthosting.co.za> Anthony Sottile added the comment: to be honest, I don't recall exactly given it's been 2 and a half years since the original report with no activity. if I recall correctly, this was encountered while upgrading the `mock` backport in yelp's monolithic repository. I want to say the reason this was hard to "fix" properly was due to some blanket patches being applied in a base test case and then other test cases re-patching those methods to add more specific behaviour. This worked fine in python2.7 and all the way until python3.3 but then was broken by changes in python3.4 Fortunately, they've been fixed in python3.7. I guess I've been encouraged to write a patch with a test so it does not regress in the future ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 02:05:16 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 07:05:16 +0000 Subject: [issue35454] Fix miscellaneous issues in error handling In-Reply-To: <1544445005.88.0.788709270274.issue35454@psf.upfronthosting.co.za> Message-ID: <1544511916.24.0.788709270274.issue35454@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 62674f3a36ec55f86a5f20ee028a37fbd549bd6c by Miss Islington (bot) in branch '3.7': bpo-35454: Fix miscellaneous minor issues in error handling. (GH-11077) https://github.com/python/cpython/commit/62674f3a36ec55f86a5f20ee028a37fbd549bd6c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 02:09:29 2018 From: report at bugs.python.org (Chris Withers) Date: Tue, 11 Dec 2018 07:09:29 +0000 Subject: [issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__' In-Reply-To: <1459972886.32.0.234738617564.issue26704@psf.upfronthosting.co.za> Message-ID: <1544512169.1.0.788709270274.issue26704@psf.upfronthosting.co.za> Chris Withers added the comment: Ah, yeah, I can see the blanket patch and a more local patch in a monorepo being a thing, cool, let's have a look! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 02:10:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 07:10:51 +0000 Subject: [issue35444] Unify and optimize the helper for getting a builtin object In-Reply-To: <1544353290.83.0.788709270274.issue35444@psf.upfronthosting.co.za> Message-ID: <1544512251.29.0.788709270274.issue35444@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10336 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 02:27:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 07:27:54 +0000 Subject: [issue35454] Fix miscellaneous issues in error handling In-Reply-To: <1544445005.88.0.788709270274.issue35454@psf.upfronthosting.co.za> Message-ID: <1544513274.88.0.788709270274.issue35454@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8855d9339858683c9b4fcd50b02a7bca526d4726 by Serhiy Storchaka in branch '3.6': [3.6] bpo-35454: Fix miscellaneous minor issues in error handling. (GH-11077) (GH-11106) https://github.com/python/cpython/commit/8855d9339858683c9b4fcd50b02a7bca526d4726 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 03:51:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 08:51:32 +0000 Subject: [issue35444] Unify and optimize the helper for getting a builtin object In-Reply-To: <1544353290.83.0.788709270274.issue35444@psf.upfronthosting.co.za> Message-ID: <1544518292.52.0.788709270274.issue35444@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3cae16d2e98ffaa89ddd311df70a857dfaff4020 by Serhiy Storchaka in branch '3.7': bpo-35444: Fix error handling when fail to look up builtin "getattr". (GH-11047) (GH-11107) https://github.com/python/cpython/commit/3cae16d2e98ffaa89ddd311df70a857dfaff4020 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 03:52:14 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 08:52:14 +0000 Subject: [issue35444] Unify and optimize the helper for getting a builtin object In-Reply-To: <1544353290.83.0.788709270274.issue35444@psf.upfronthosting.co.za> Message-ID: <1544518334.0.0.788709270274.issue35444@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10337 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 04:10:31 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Dec 2018 09:10:31 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.6 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1544519431.34.0.788709270274.issue15663@psf.upfronthosting.co.za> Change by Ned Deily : ---------- pull_requests: +10338 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 04:15:09 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Dec 2018 09:15:09 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.6 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1544519709.71.0.788709270274.issue15663@psf.upfronthosting.co.za> Change by Ned Deily : ---------- pull_requests: +10339 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 04:22:04 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 11 Dec 2018 09:22:04 +0000 Subject: [issue35456] asyncio.Task.set_result() and set_exception() missing docstrings (and Liskov sub. principle) In-Reply-To: <1544503229.89.0.788709270274.issue35456@psf.upfronthosting.co.za> Message-ID: <1544520124.28.0.788709270274.issue35456@psf.upfronthosting.co.za> INADA Naoki added the comment: > One way to deal with that would be to let a Task have a Future. > "Prefer composition over inheritance" as they say. > > I want to work on PR for this if nobody goes against it... I'm not against it, unless it doesn't have backward incompatibility or performance regression. But I'm not sure you estimate the difficulty correctly: there are C implementation of Future and Task. You need to have deep knowledge of Python/C APIs. > PS: I really don't like when some people says that Python core developers are known to have poor knowledge in regard to OOP principles. So I really don't like letting something like this in the standard library... Personally speaking, I dislike treating OOP principles like Ten Commandments. Principles have some reasons. And these reasons are reasonable not for all cases. When people say "it's bad because it violates principle!", they may have poor knowledge about the prinicple. If they really know the principle, they must describe real-world problem caused by the violation. In this case, I agree that misleading docstring is a small real-world problem caused by the violation. While it can be fixable without fixing the violation. Generally, `set_result` or `set_exception` is called by the creator of the Future. So requiring knowledge of concrete class is not a big problem. On the other hand, awaiting future object without knowing concrete class is common. But Task is awaitable. So there are no problem here. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 04:28:36 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Dec 2018 09:28:36 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.6 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1544520516.08.0.788709270274.issue15663@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset f74cabd9203cf3be97fdb3821a7fa0b74d7b2263 by Ned Deily in branch '3.6': [3.6] bpo-15663: the 10.6+ macOS installers for 3.6/2.7 now provide a private Tcl/Tk 8.6 (GH-11109) https://github.com/python/cpython/commit/f74cabd9203cf3be97fdb3821a7fa0b74d7b2263 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 04:30:47 2018 From: report at bugs.python.org (larsfuse) Date: Tue, 11 Dec 2018 09:30:47 +0000 Subject: [issue35457] robotparser reads empty robots.txt file as "all denied" Message-ID: <1544520647.95.0.788709270274.issue35457@psf.upfronthosting.co.za> New submission from larsfuse : The standard (http://www.robotstxt.org/robotstxt.html) says: > To allow all robots complete access: > User-agent: * > Disallow: > (or just create an empty "/robots.txt" file, or don't use one at all) Here I give python an empty file: $ curl http://10.223.68.186/robots.txt $ Code: rp = robotparser.RobotFileParser() print (robotsurl) rp.set_url(robotsurl) rp.read() print( "fetch /", rp.can_fetch(useragent = "*", url = "/")) print( "fetch /admin", rp.can_fetch(useragent = "*", url = "/admin")) Result: $ ./test.py http://10.223.68.186/robots.txt ('fetch /', False) ('fetch /admin', False) And the result is, robotparser thinks the site is blocked. ---------- components: Library (Lib) messages: 331595 nosy: larsfuse priority: normal severity: normal status: open title: robotparser reads empty robots.txt file as "all denied" type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 04:34:00 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Dec 2018 09:34:00 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.6 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1544520840.63.0.788709270274.issue15663@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset d0d09b511d7a438fb18a9a4703480763119b4eac by Ned Deily in branch '2.7': [2.7] bpo-15663: the 10.6+ macOS installers for 3.6/2.7 now provide a private Tcl/Tk 8.6 (GH-11110) https://github.com/python/cpython/commit/d0d09b511d7a438fb18a9a4703480763119b4eac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 04:38:13 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Dec 2018 09:38:13 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.6 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1544521093.47.0.788709270274.issue15663@psf.upfronthosting.co.za> Ned Deily added the comment: Update: as of 3.6.8rc1 and the eventual 2.7.16rc1, both installer variants (10.9+ and 10.6+) provide a built-in Tcl/Tk 8.6.8. For python.org installers, Tcl/Tk 8.5.x is finally dead! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 05:13:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 10:13:21 +0000 Subject: [issue35444] Unify and optimize the helper for getting a builtin object In-Reply-To: <1544353290.83.0.788709270274.issue35444@psf.upfronthosting.co.za> Message-ID: <1544523201.23.0.788709270274.issue35444@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset be6ec444729f727f304ae10f3a7e2feda3cc3aaa by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-35444: Fix error handling when fail to look up builtin "getattr". (GH-11047) (GH-11107) (GH-11108) https://github.com/python/cpython/commit/be6ec444729f727f304ae10f3a7e2feda3cc3aaa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 05:15:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 10:15:56 +0000 Subject: [issue35444] Unify and optimize the helper for getting a builtin object In-Reply-To: <1544353290.83.0.788709270274.issue35444@psf.upfronthosting.co.za> Message-ID: <1544523356.64.0.788709270274.issue35444@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 tracker _______________________________________ From report at bugs.python.org Tue Dec 11 05:16:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 10:16:26 +0000 Subject: [issue35454] Fix miscellaneous issues in error handling In-Reply-To: <1544445005.88.0.788709270274.issue35454@psf.upfronthosting.co.za> Message-ID: <1544523386.65.0.788709270274.issue35454@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 Dec 11 05:17:32 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 10:17:32 +0000 Subject: [issue33747] Failed separate test_patch_propogrates_exc_on_exit in test_unittest In-Reply-To: <1528027150.62.0.592728768989.issue33747@psf.upfronthosting.co.za> Message-ID: <1544523452.88.0.788709270274.issue33747@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 45a31a1ec11e75cd0ef487dd4cea7f9fc4f885c8 by Miss Islington (bot) in branch '3.7': [3.7] bpo-33747: Avoid mutating the global sys.modules dict in unittest.mock tests (GH-8520) (GH-11031) https://github.com/python/cpython/commit/45a31a1ec11e75cd0ef487dd4cea7f9fc4f885c8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 05:17:41 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 10:17:41 +0000 Subject: [issue33747] Failed separate test_patch_propogrates_exc_on_exit in test_unittest In-Reply-To: <1528027150.62.0.592728768989.issue33747@psf.upfronthosting.co.za> Message-ID: <1544523461.81.0.788709270274.issue33747@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 7d9f21950927e7c7fe69e5edeb06023a963c6f68 by Miss Islington (bot) in branch '3.6': [3.6] bpo-33747: Avoid mutating the global sys.modules dict in unittest.mock tests (GH-8520) (GH-11032) https://github.com/python/cpython/commit/7d9f21950927e7c7fe69e5edeb06023a963c6f68 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 05:19:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 10:19:06 +0000 Subject: [issue33747] Failed separate test_patch_propogrates_exc_on_exit in test_unittest In-Reply-To: <1528027150.62.0.592728768989.issue33747@psf.upfronthosting.co.za> Message-ID: <1544523546.77.0.788709270274.issue33747@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 Dec 11 05:22:59 2018 From: report at bugs.python.org (Jakub Kulik) Date: Tue, 11 Dec 2018 10:22:59 +0000 Subject: [issue35455] Solaris thread_time doesn't work with current implementation In-Reply-To: <1544452341.93.0.788709270274.issue35455@psf.upfronthosting.co.za> Message-ID: <1544523779.87.0.788709270274.issue35455@psf.upfronthosting.co.za> Change by Jakub Kulik : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 05:37:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 10:37:38 +0000 Subject: [issue35458] test_shutil.test_disk_usage() randomly fails when tests are run in parallel Message-ID: <1544524658.21.0.788709270274.issue35458@psf.upfronthosting.co.za> New submission from STINNER Victor : Extract of the test: usage = shutil.disk_usage(os.path.dirname(__file__)) self.assertEqual(usage, shutil.disk_usage(__file__)) The test fails if another process creates or removes data on the disk partition. IMHO "self.assertEqual(usage, shutil.disk_usage(__file__))" must be removed, it cannot be reliable without mocking os.statvfs() / nt._getdiskusage(). Even if tests are run sequentially, the test can fail if a program creates a file between the two lines of code, the test cannot be reliable. https://buildbot.python.org/all/#/builders/85/builds/1882 FAIL: test_disk_usage (test.test_shutil.TestShutil) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/test_shutil.py", line 1366, in test_disk_usage self.assertEqual(usage, shutil.disk_usage(__file__)) AssertionError: usage(total=1925696024576, used=1793793806336, free=131902218240) != usage(total=1925696024576, used=1793793818624, free=131902205952) ---------- components: Tests messages: 331601 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: test_shutil.test_disk_usage() randomly fails when tests are run in parallel versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 05:41:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 10:41:37 +0000 Subject: [issue35458] test_shutil.test_disk_usage() randomly fails when tests are run in parallel In-Reply-To: <1544524658.21.0.788709270274.issue35458@psf.upfronthosting.co.za> Message-ID: <1544524897.9.0.788709270274.issue35458@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10340 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 05:43:46 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 10:43:46 +0000 Subject: [issue35458] test_shutil.test_disk_usage() randomly fails when tests are run in parallel In-Reply-To: <1544524658.21.0.788709270274.issue35458@psf.upfronthosting.co.za> Message-ID: <1544525026.41.0.788709270274.issue35458@psf.upfronthosting.co.za> STINNER Victor added the comment: The new test has been added by PR 9372: commit c8c0249c9e8f61ab7670119a5a5278354df27bbb Author: Joe Pamer Date: Tue Sep 25 10:57:36 2018 -0400 bpo-32557: allow shutil.disk_usage to take a file path on Windows also (GH-9372) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 05:48:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 10:48:12 +0000 Subject: [issue32557] allow shutil.disk_usage to take a file path on Windows also In-Reply-To: <1516030012.51.0.467229070634.issue32557@psf.upfronthosting.co.za> Message-ID: <1544525292.27.0.788709270274.issue32557@psf.upfronthosting.co.za> STINNER Victor added the comment: The new test is unstable: see bpo-35458. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 05:54:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 10:54:17 +0000 Subject: [issue35459] Use PyDict_GetItemWithError() with PyDict_GetItem() Message-ID: <1544525657.6.0.788709270274.issue35459@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : There is an issue with using PyDict_GetItem(). Since it silences all exceptions, it can return incorrect result when an exception like MemoryError or KeyboardInterrupt was raised in the user __hash__() and __eq__(). In addition PyDict_GetItemString() and _PyDict_GetItemId() swallow a MemoryError raised when fail to allocate a temporary string object. In addition, PyDict_GetItemWithError() is a tiny bit faster than PyDict_GetItem(), because it avoids checking the exception state in successful case. The proposed PR replaces most calls of PyDict_GetItem(), PyDict_GetItemString() and _PyDict_GetItemId() with calls of PyDict_GetItemWithError(), _PyDict_GetItemStringWithError() and _PyDict_GetItemIdWithError(). ---------- components: Extension Modules, Interpreter Core messages: 331604 nosy: serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Use PyDict_GetItemWithError() with PyDict_GetItem() versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 05:55:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 10:55:38 +0000 Subject: [issue35459] Use PyDict_GetItemWithError() instead of PyDict_GetItem() In-Reply-To: <1544525657.6.0.788709270274.issue35459@psf.upfronthosting.co.za> Message-ID: <1544525738.76.0.788709270274.issue35459@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- title: Use PyDict_GetItemWithError() with PyDict_GetItem() -> Use PyDict_GetItemWithError() instead of PyDict_GetItem() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 05:56:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 10:56:41 +0000 Subject: [issue35459] Use PyDict_GetItemWithError() instead of PyDict_GetItem() In-Reply-To: <1544525657.6.0.788709270274.issue35459@psf.upfronthosting.co.za> Message-ID: <1544525801.7.0.788709270274.issue35459@psf.upfronthosting.co.za> STINNER Victor added the comment: My previous attempt: bpo-20615. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 05:56:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 10:56:49 +0000 Subject: [issue35459] Use PyDict_GetItemWithError() instead of PyDict_GetItem() In-Reply-To: <1544525657.6.0.788709270274.issue35459@psf.upfronthosting.co.za> Message-ID: <1544525809.21.0.788709270274.issue35459@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10341 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 05:57:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 10:57:55 +0000 Subject: [issue35458] test_shutil.test_disk_usage() randomly fails when tests are run in parallel In-Reply-To: <1544524658.21.0.788709270274.issue35458@psf.upfronthosting.co.za> Message-ID: <1544525875.13.0.788709270274.issue35458@psf.upfronthosting.co.za> STINNER Victor added the comment: Only the master branch is impacted (see bpo-32557). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 06:00:24 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 11 Dec 2018 11:00:24 +0000 Subject: [issue35460] Add PyDict_GetItemStringWithError Message-ID: <1544526024.8.0.788709270274.issue35460@psf.upfronthosting.co.za> New submission from Ronald Oussoren : PyDict_GetItemWithError is a variant of PyDict_GetItem that doesn't swallow unrelated exceptions. While converting a project to use this API I noticed that there is similar variant of PyDict_GetItemString. It would be nice to have PyDict_GetItemStringWithError as a public API to make it easier to convert existing code to the better API. ---------- components: Interpreter Core messages: 331607 nosy: ronaldoussoren priority: normal severity: normal status: open title: Add PyDict_GetItemStringWithError type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 06:03:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 11:03:30 +0000 Subject: [issue35444] Unify and optimize the helper for getting a builtin object In-Reply-To: <1544353290.83.0.788709270274.issue35444@psf.upfronthosting.co.za> Message-ID: <1544526210.11.0.788709270274.issue35444@psf.upfronthosting.co.za> STINNER Victor added the comment: I reopen the issuue. Commit bb86bf4c4eaa30b1f5192dab9f389ce0bb61114d introduced a new compiler warning: gcc -pthread -c -Wno-unused-result -Wsign-compare -g -Og -Wall -O0 -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Objects/object.o Objects/object.c In file included from ./Include/object.h:715, from ./Include/pytime.h:6, from ./Include/Python.h:75, from Objects/object.c:4: ./Include/cpython/object.h:37:51: warning: 'PyId_builtins' defined but not used [-Wunused-variable] #define _Py_IDENTIFIER(varname) _Py_static_string(PyId_##varname, #varname) ^~~~~ ./Include/cpython/object.h:36:66: note: in definition of macro '_Py_static_string' #define _Py_static_string(varname, value) static _Py_Identifier varname = _Py_static_string_init(value) ^~~~~~~ Objects/object.c:20:1: note: in expansion of macro '_Py_IDENTIFIER' _Py_IDENTIFIER(builtins); ^~~~~~~~~~~~~~ ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 06:05:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 11:05:25 +0000 Subject: [issue35458] test_shutil.test_disk_usage() randomly fails when tests are run in parallel In-Reply-To: <1544524658.21.0.788709270274.issue35458@psf.upfronthosting.co.za> Message-ID: <1544526325.15.0.788709270274.issue35458@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset dc525f4315cdbe84693396d3f7a65a00425743bb by Victor Stinner in branch 'master': bpo-35458: Fix test_shutil.test_disk_usage() (GH-11111) https://github.com/python/cpython/commit/dc525f4315cdbe84693396d3f7a65a00425743bb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 06:05:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 11:05:35 +0000 Subject: [issue35458] test_shutil.test_disk_usage() randomly fails when tests are run in parallel In-Reply-To: <1544524658.21.0.788709270274.issue35458@psf.upfronthosting.co.za> Message-ID: <1544526335.1.0.788709270274.issue35458@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 Tue Dec 11 06:12:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 11:12:05 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1544526725.52.0.788709270274.issue33725@psf.upfronthosting.co.za> STINNER Victor added the comment: Would it be safe to run the multiprocessing tests on recent macOS with the OBJC_DISABLE_INITIALIZE_FORK_SAFETY environment variable set? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 06:18:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 11:18:38 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544527118.62.0.788709270274.issue35433@psf.upfronthosting.co.za> STINNER Victor added the comment: The 3.6 change broke the compilation 2 Windows buildbots: Jemery Kloth is investigating the regression: https://github.com/python/cpython/pull/11009#issuecomment-445985774 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 06:31:25 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 11 Dec 2018 11:31:25 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1544527885.44.0.788709270274.issue35412@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset a932d0b496767b5aac14191cbc17093e502b6cb4 by Pablo Galindo in branch 'master': bpo-35412: Skip test_multiprocessing_fork and test_multiprocessing_forkserver on Windows (GH-11086) https://github.com/python/cpython/commit/a932d0b496767b5aac14191cbc17093e502b6cb4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 06:32:14 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 11 Dec 2018 11:32:14 +0000 Subject: [issue35426] test_signal.test_interprocess_signal() race condition In-Reply-To: <1544099760.1.0.788709270274.issue35426@psf.upfronthosting.co.za> Message-ID: <1544527934.76.0.788709270274.issue35426@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset 2ab2afd387084ba38a37f5944fcb0675113b64dc by Pablo Galindo in branch 'master': bpo-35426: Eliminate race condition in test_interprocess_signal (GH-11087) https://github.com/python/cpython/commit/2ab2afd387084ba38a37f5944fcb0675113b64dc ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 06:32:27 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 11:32:27 +0000 Subject: [issue35426] test_signal.test_interprocess_signal() race condition In-Reply-To: <1544099760.1.0.788709270274.issue35426@psf.upfronthosting.co.za> Message-ID: <1544527947.76.0.788709270274.issue35426@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10342 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 06:32:39 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 11:32:39 +0000 Subject: [issue35426] test_signal.test_interprocess_signal() race condition In-Reply-To: <1544099760.1.0.788709270274.issue35426@psf.upfronthosting.co.za> Message-ID: <1544527959.8.0.788709270274.issue35426@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10343 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 06:39:03 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 11:39:03 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1544528343.97.0.788709270274.issue35412@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10344 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 06:39:12 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 11:39:12 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1544528352.58.0.788709270274.issue35412@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10345 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 06:50:36 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 11:50:36 +0000 Subject: [issue35426] test_signal.test_interprocess_signal() race condition In-Reply-To: <1544099760.1.0.788709270274.issue35426@psf.upfronthosting.co.za> Message-ID: <1544529036.64.0.788709270274.issue35426@psf.upfronthosting.co.za> miss-islington added the comment: New changeset f7404a5a08b70ec171279a277c1817e82430fa83 by Miss Islington (bot) in branch '3.7': bpo-35426: Eliminate race condition in test_interprocess_signal (GH-11087) https://github.com/python/cpython/commit/f7404a5a08b70ec171279a277c1817e82430fa83 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 06:56:52 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 11:56:52 +0000 Subject: [issue35426] test_signal.test_interprocess_signal() race condition In-Reply-To: <1544099760.1.0.788709270274.issue35426@psf.upfronthosting.co.za> Message-ID: <1544529412.83.0.788709270274.issue35426@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 869e23e0af806ed3a10d0484827cb1b5f5cd5e5f by Miss Islington (bot) in branch '3.6': bpo-35426: Eliminate race condition in test_interprocess_signal (GH-11087) https://github.com/python/cpython/commit/869e23e0af806ed3a10d0484827cb1b5f5cd5e5f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 07:01:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 12:01:32 +0000 Subject: [issue35444] Unify and optimize the helper for getting a builtin object In-Reply-To: <1544353290.83.0.788709270274.issue35444@psf.upfronthosting.co.za> Message-ID: <1544529692.45.0.788709270274.issue35444@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10346 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 07:14:28 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 12:14:28 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1544530468.41.0.788709270274.issue35412@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d55a896cd63e72e2848c48226d031d612539ea2a by Miss Islington (bot) in branch '3.7': bpo-35412: Skip test_multiprocessing_fork and test_multiprocessing_forkserver on Windows (GH-11086) https://github.com/python/cpython/commit/d55a896cd63e72e2848c48226d031d612539ea2a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 07:22:57 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Dec 2018 12:22:57 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1544530977.5.0.788709270274.issue35412@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 97568761a6adb64d750fb0ea68484f67ae5e54f7 by Miss Islington (bot) in branch '3.6': bpo-35412: Skip test_multiprocessing_fork and test_multiprocessing_forkserver on Windows (GH-11086) https://github.com/python/cpython/commit/97568761a6adb64d750fb0ea68484f67ae5e54f7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 07:48:31 2018 From: report at bugs.python.org (Jakub Kulik) Date: Tue, 11 Dec 2018 12:48:31 +0000 Subject: [issue35455] Solaris thread_time doesn't work with current implementation In-Reply-To: <1544452341.93.0.788709270274.issue35455@psf.upfronthosting.co.za> Message-ID: <1544532511.52.0.788709270274.issue35455@psf.upfronthosting.co.za> Change by Jakub Kulik : ---------- pull_requests: +10347 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:07:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 13:07:03 +0000 Subject: [issue35426] test_signal.test_interprocess_signal() race condition In-Reply-To: <1544099760.1.0.788709270274.issue35426@psf.upfronthosting.co.za> Message-ID: <1544533623.59.0.788709270274.issue35426@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Pablo Galindo for the quick fix! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:14:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 13:14:21 +0000 Subject: [issue35444] Unify and optimize the helper for getting a builtin object In-Reply-To: <1544353290.83.0.788709270274.issue35444@psf.upfronthosting.co.za> Message-ID: <1544534061.27.0.788709270274.issue35444@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 7211d306d4c2f73732540759e20dd17bd18b3361 by Serhiy Storchaka in branch 'master': Remove an unused variable after bpo-35444. (GH-11117) https://github.com/python/cpython/commit/7211d306d4c2f73732540759e20dd17bd18b3361 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:14:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 13:14:34 +0000 Subject: [issue35444] Unify and optimize the helper for getting a builtin object In-Reply-To: <1544353290.83.0.788709270274.issue35444@psf.upfronthosting.co.za> Message-ID: <1544534074.23.0.788709270274.issue35444@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 Dec 11 08:27:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 13:27:28 +0000 Subject: [issue35461] Document C API functions which swallow exceptions Message-ID: <1544534848.15.0.788709270274.issue35461@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : C API functions like PyDict_GetItem() and PyObject_HasAttr() suppresses all errors that may occur, including MemoryError and KeyboardInterrupt. They can return incorrect result when the memory is exhausted or the user presses Ctrl-C. The proposed PR documents such functions and suggests the C API which do not swallow unrelated exceptions. Previous attempt to document this (for PyDict_GetItem() only) was in issue20615. ---------- assignee: docs at python components: Documentation messages: 331620 nosy: docs at python, rhettinger, ronaldoussoren, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Document C API functions which swallow exceptions type: enhancement versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:29:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 13:29:32 +0000 Subject: [issue35461] Document C API functions which swallow exceptions In-Reply-To: <1544534848.15.0.788709270274.issue35461@psf.upfronthosting.co.za> Message-ID: <1544534972.06.0.788709270274.issue35461@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10349 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:31:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 13:31:26 +0000 Subject: [issue35459] Use PyDict_GetItemWithError() instead of PyDict_GetItem() In-Reply-To: <1544525657.6.0.788709270274.issue35459@psf.upfronthosting.co.za> Message-ID: <1544535086.18.0.788709270274.issue35459@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Opened issue35461 for documenting flaws of PyDict_GetItem(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:35:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 13:35:42 +0000 Subject: [issue15095] test_imaplib problem - intermittent skips and LOGINDISABLED not reported In-Reply-To: <1339931394.61.0.931073792835.issue15095@psf.upfronthosting.co.za> Message-ID: <1544535342.53.0.788709270274.issue15095@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see this error recently so I close this old issue. ---------- nosy: +vstinner resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:48:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 13:48:48 +0000 Subject: [issue35460] Add PyDict_GetItemStringWithError In-Reply-To: <1544526024.8.0.788709270274.issue35460@psf.upfronthosting.co.za> Message-ID: <1544536128.55.0.788709270274.issue35460@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PyDict_GetItemString() is an old API from times when dicts could contain only string keys. It is not necessary part of the C API and can be replaced with PyDict_GetItem() in new code. It was kept only as a convenient function. In issue35459 many uses of PyDict_GetItemString() were replaced with PyDict_GetItemWithError() and private _PyDict_GetItemIdWithError(). Only 4 occurrences were replaced with newly added private _PyDict_GetItemStringWithError(). And they could use PyDict_GetItem(). So there are not much use cases for PyDict_GetItemStringWithError(). Before adding PyDict_GetItemStringWithError() we could consider alternatives. *WithError() functions require calling PyErr_Occurred() to distinguish the error case from the "not found" case. This adds an overhead which can be not small in performance critical code. It would be better if the API function returned a three-state value: "found", "not found" and "error". See for example _PyObject_LookupAttr(). I am not sure this is the best design. ---------- dependencies: +Document C API functions which swallow exceptions nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:49:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 13:49:47 +0000 Subject: [issue20118] test_imaplib test_linetoolong fails on 2.7 in SSL test on some buildbots In-Reply-To: <1388787779.06.0.335033013809.issue20118@psf.upfronthosting.co.za> Message-ID: <1544536187.35.0.788709270274.issue20118@psf.upfronthosting.co.za> STINNER Victor added the comment: 4 years later the test is still skipped. That's a good example of "temporary fix" :-) David: Should we just close the issue, or is there anyone around interested to work on a fix? Sadly, the issue doesn't provide the error message and I'm not sure how to reproduce the bug. Maybe the bug has been fixed in the meanwhile? Example of SocketServer fix: commit ba8474b77dd86d8dde40eaa7a4a6715a476d6242 Author: Martin Panter Date: Thu Feb 18 10:43:55 2016 +0000 Issue #26309: Shut down SocketServer request if verify_request() is false Based on patch by Aviv Palivoda. -- On Fedora 29, I tried to reproduce the bug by running many tests in parallel: (*) Run test_linetoolong in a loop, 4 processes: ./python -m test -u all -F -m test.test_imaplib.ThreadedNetworkedTests.test_linetoolong test_imaplib (*) Run test_imaplib in a loop, 4 processes: ./python -m test -u all -v -F test_imaplib (*) Stress the system (run the Python test suite in a loop), 2 processes: ./python -m test -r -u all,-gui -j0 -F (*) Stress the CPU using my script (to ensure that the system load is at least 10) system_load.py 10 7 minutes later, test_linetoolong has been run 11629 times x 4 processes and it's still pass. ---------- nosy: +pablogsal, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:53:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 13:53:25 +0000 Subject: [issue20118] test_imaplib test_linetoolong fails on 2.7 in SSL test on some buildbots In-Reply-To: <1388787779.06.0.335033013809.issue20118@psf.upfronthosting.co.za> Message-ID: <1544536405.48.0.788709270274.issue20118@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10350 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:54:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 13:54:18 +0000 Subject: [issue20118] test_imaplib test_linetoolong fails on 2.7 in SSL test on some buildbots In-Reply-To: <1388787779.06.0.335033013809.issue20118@psf.upfronthosting.co.za> Message-ID: <1544536458.46.0.788709270274.issue20118@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote PR 11120 to reenable the skipped test. If the test will start again, I will try to fix it. If I cannot fix the test, I will skip again the test but close this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:56:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 13:56:03 +0000 Subject: [issue35462] test_imaplib.test_enable_UTF8_True_append() failed on AMD64 FreeBSD 10-STABLE Non-Debug 3.7 Message-ID: <1544536562.99.0.788709270274.issue35462@psf.upfronthosting.co.za> New submission from STINNER Victor : AMD64 FreeBSD 10-STABLE Non-Debug 3.7: https://buildbot.python.org/all/#/builders/170/builds/200 Note: this buildbot is *very* slow. test_enable_UTF8_True_append (test.test_imaplib.NewIMAPTests) ... SENT: b'* OK IMAP4rev1' GOT: b'PJHE0 CAPABILITY' SENT: b'* CAPABILITY IMAP4rev1 ENABLE UTF8=ACCEPT' SENT: b'PJHE0 OK CAPABILITY completed' ERROR (...) ERROR: test_enable_UTF8_True_append (test.test_imaplib.NewIMAPTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/test/test_imaplib.py", line 297, in test_enable_UTF8_True_append code, _ = client.authenticate('MYAUTH', lambda x: b'fake') File "/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/imaplib.py", line 428, in authenticate typ, dat = self._simple_command('AUTHENTICATE', mech) File "/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/imaplib.py", line 1196, in _simple_command return self._command_complete(name, self._command(name, *args)) File "/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/imaplib.py", line 989, in _command while self._get_response(): File "/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/imaplib.py", line 1047, in _get_response resp = self._get_line() File "/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/imaplib.py", line 1151, in _get_line raise self.abort('socket error: EOF') imaplib.IMAP4.abort: socket error: EOF See also bpo-20118 ("test_imaplib test_linetoolong fails on 2.7 in SSL test on some buildbots"). ---------- components: Tests messages: 331626 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: test_imaplib.test_enable_UTF8_True_append() failed on AMD64 FreeBSD 10-STABLE Non-Debug 3.7 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:56:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 13:56:29 +0000 Subject: [issue35462] test_imaplib.test_enable_UTF8_True_append() failed on AMD64 FreeBSD 10-STABLE Non-Debug 3.7 In-Reply-To: <1544536562.99.0.788709270274.issue35462@psf.upfronthosting.co.za> Message-ID: <1544536589.34.0.788709270274.issue35462@psf.upfronthosting.co.za> STINNER Victor added the comment: Note: in the same buildbot build, test_imaplib passed when re-run in verbose mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 09:01:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 14:01:20 +0000 Subject: [issue35462] test_imaplib.test_enable_UTF8_True_append() failed on AMD64 FreeBSD 10-STABLE Non-Debug 3.7 In-Reply-To: <1544536562.99.0.788709270274.issue35462@psf.upfronthosting.co.za> Message-ID: <1544536880.89.0.788709270274.issue35462@psf.upfronthosting.co.za> STINNER Victor added the comment: See also: * bpo-30175, bpo-30648: removed "client x509 certificate" tests using public cyrus.andrew.cmu.edu server * bpo-30231: removed tests since the public server stopped working. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 09:22:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 14:22:10 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1544538130.22.0.788709270274.issue34172@psf.upfronthosting.co.za> STINNER Victor added the comment: I started a thread on python-dev to discuss these issues: https://mail.python.org/pipermail/python-dev/2018-December/155946.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 09:30:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 14:30:29 +0000 Subject: [issue20118] test_imaplib test_linetoolong fails on 2.7 in SSL test on some buildbots In-Reply-To: <1388787779.06.0.335033013809.issue20118@psf.upfronthosting.co.za> Message-ID: <1544538629.34.0.788709270274.issue20118@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, AppVeyor failed on my PR: test_linetoolong (test.test_imaplib.ThreadedNetworkedTestsSSL) ... creating server server created ADDR = ('127.0.0.1', 0) CLASS = test.test_imaplib.SecureTCPServer HDLR = test.test_imaplib.TooLongHandler server running waiting for server done ERROR (...) ERROR: test_linetoolong (test.test_imaplib.ThreadedNetworkedTestsSSL) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_imaplib.py", line 176, in test_linetoolong self.imap_class, *server.server_address) File "C:\projects\cpython\lib\unittest\case.py", line 473, in assertRaises callableObj(*args, **kwargs) File "C:\projects\cpython\lib\imaplib.py", line 1169, in __init__ IMAP4.__init__(self, host, port) File "C:\projects\cpython\lib\imaplib.py", line 203, in __init__ typ, dat = self.capability() File "C:\projects\cpython\lib\imaplib.py", line 377, in capability typ, dat = self._simple_command(name) File "C:\projects\cpython\lib\imaplib.py", line 1091, in _simple_command return self._command_complete(name, self._command(name, *args)) File "C:\projects\cpython\lib\imaplib.py", line 913, in _command_complete typ, data = self._get_tagged_response(tag) File "C:\projects\cpython\lib\imaplib.py", line 1020, in _get_tagged_response self._get_response() File "C:\projects\cpython\lib\imaplib.py", line 932, in _get_response resp = self._get_line() File "C:\projects\cpython\lib\imaplib.py", line 1030, in _get_line line = self.readline() File "C:\projects\cpython\lib\imaplib.py", line 1192, in readline return self.file.readline() File "C:\projects\cpython\lib\socket.py", line 451, in readline data = self._sock.recv(self._rbufsize) File "C:\projects\cpython\lib\ssl.py", line 772, in recv return self.read(buflen) File "C:\projects\cpython\lib\ssl.py", line 659, in read v = self._sslobj.read(len) error: [Errno 10053] An established connection was aborted by the software in your host machine ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 09:47:32 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 11 Dec 2018 14:47:32 +0000 Subject: [issue35463] mock uses incorrect signature for partial and partialmethod with autospec Message-ID: <1544539652.54.0.788709270274.issue35463@psf.upfronthosting.co.za> New submission from Karthikeyan Singaravelan : This is a bug report for https://bugs.python.org/issue17185#msg331149 that I was asked to raise as a separate issue. 1. When we call create_autospec it calls _get_signature_object that gets the signature for the given parameter. With functools.partial it returns a partial object and hence while getting the signature it returns the signature for the constructor of partial instead of the underlying function passed to functools.partial. I think a check needs to be added to make sure not to use func.__init__ when it's a partial object. 2. When we call create_autospect on a class that has a partialmethod the self parameter is not skipped in the signature and thus it creates a signature with self causing error. The fix would be to handle partialmethod also in _must_skip that determines whether to skip self or not. Sample reproducer : from functools import partial, partialmethod from unittest.mock import create_autospec import inspect def foo(a, b): pass p = partial(foo, 1) m = create_autospec(p) m(1, 2, 3) # passes since signature is set as (*args, **kwargs) the signature of functools.partial constructor. This should throw TypeError under autospec class A: def f(self, a, b): print(a, b) g = partialmethod(f, 1) m = create_autospec(A) m().g(1, 2) # passes since signature is set as (self, b) and self is not skipped in _must_skip thus self=1, b=2. This should throw TypeError under autospec since the valid call is m().g(2) ---------- components: Library (Lib) messages: 331631 nosy: cjw296, mariocj89, michael.foord, pablogsal, xtreak priority: normal severity: normal status: open title: mock uses incorrect signature for partial and partialmethod with autospec type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 09:52:03 2018 From: report at bugs.python.org (Or) Date: Tue, 11 Dec 2018 14:52:03 +0000 Subject: [issue35464] json.dumps very unclear exception Message-ID: <1544539923.61.0.788709270274.issue35464@psf.upfronthosting.co.za> New submission from Or : when dumping a value coming from numpy.random.choice([True,False]) the exception raised is very unclear. json.dumps(result) File "/usr/local/Cellar/python at 2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 184, in default raise TypeError(repr(o) + " is not JSON serializable") which prints "True is not JSON serializable" - but it should actually print " is not JSON serializable". ---------- components: Library (Lib) messages: 331632 nosy: orshemy priority: normal severity: normal status: open title: json.dumps very unclear exception type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 10:07:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 15:07:56 +0000 Subject: [issue16039] imaplib: unlimited readline() from connection In-Reply-To: <1348569370.53.0.568109495954.issue16039@psf.upfronthosting.co.za> Message-ID: <1544540876.48.0.788709270274.issue16039@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10351 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 10:21:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 15:21:12 +0000 Subject: [issue35464] json.dumps very unclear exception In-Reply-To: <1544539923.61.0.788709270274.issue35464@psf.upfronthosting.co.za> Message-ID: <1544541672.14.0.788709270274.issue35464@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This was changed in 3.6 (issue26623). Upgrade to 3.6+ for better error messages. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 10:40:15 2018 From: report at bugs.python.org (Jakub Kulik) Date: Tue, 11 Dec 2018 15:40:15 +0000 Subject: [issue35455] Solaris thread_time doesn't work with current implementation In-Reply-To: <1544452341.93.0.788709270274.issue35455@psf.upfronthosting.co.za> Message-ID: <1544542815.31.0.788709270274.issue35455@psf.upfronthosting.co.za> Change by Jakub Kulik : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 10:45:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 15:45:31 +0000 Subject: [issue11617] Sporadic failure in test_httpservers In-Reply-To: <1300640781.99.0.619640847889.issue11617@psf.upfronthosting.co.za> Message-ID: <1544543131.06.0.788709270274.issue11617@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, it seems like this bug still exists in Python 2.7. Error from Fedora CI: test_head_via_send_error (test.test_httpservers.BaseHTTPServerTestCase) ... ERROR (...) ERROR: test_head_via_send_error (test.test_httpservers.BaseHTTPServerTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-2.7.15/Lib/test/test_httpservers.py", line 303, in test_head_via_send_error res = self.con.getresponse() File "/builddir/build/BUILD/Python-2.7.15/Lib/httplib.py", line 1121, in getresponse response.begin() File "/builddir/build/BUILD/Python-2.7.15/Lib/httplib.py", line 438, in begin version, status, reason = self._read_status() File "/builddir/build/BUILD/Python-2.7.15/Lib/httplib.py", line 402, in _read_status raise BadStatusLine(line) BadStatusLine: '' ---------- resolution: fixed -> status: closed -> open versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 10:46:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 15:46:11 +0000 Subject: [issue11617] Sporadic failure in test_httpservers In-Reply-To: <1300640781.99.0.619640847889.issue11617@psf.upfronthosting.co.za> Message-ID: <1544543171.73.0.788709270274.issue11617@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10352 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 11:06:19 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 11 Dec 2018 16:06:19 +0000 Subject: [issue35433] Correctly detect installed SDK versions In-Reply-To: <1544144590.98.0.788709270274.issue35433@psf.upfronthosting.co.za> Message-ID: <1544544379.11.0.788709270274.issue35433@psf.upfronthosting.co.za> Jeremy Kloth added the comment: All the Windows 3.6 windows buildbots are happy! Thanks to all! ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 11:08:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 16:08:36 +0000 Subject: [issue11617] Sporadic failure in test_httpservers In-Reply-To: <1300640781.99.0.619640847889.issue11617@psf.upfronthosting.co.za> Message-ID: <1544544516.51.0.788709270274.issue11617@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 Tue Dec 11 11:08:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2018 16:08:47 +0000 Subject: [issue11617] Sporadic failure in test_httpservers In-Reply-To: <1300640781.99.0.619640847889.issue11617@psf.upfronthosting.co.za> Message-ID: <1544544527.38.0.788709270274.issue11617@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d336b1c8a40d14054145393fafb54b782cc1a549 by Victor Stinner in branch '2.7': bpo-11617: Try to strengthen test_httpservers (GH-11121) https://github.com/python/cpython/commit/d336b1c8a40d14054145393fafb54b782cc1a549 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 11:11:56 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 11 Dec 2018 16:11:56 +0000 Subject: [issue35456] asyncio.Task.set_result() and set_exception() missing docstrings (and Liskov sub. principle) In-Reply-To: <1544503229.89.0.788709270274.issue35456@psf.upfronthosting.co.za> Message-ID: <1544544716.82.0.788709270274.issue35456@psf.upfronthosting.co.za> Yury Selivanov added the comment: -1 on this; there is no clear win in doing this refactoring, only a hard to estimate chance of making a regression. Yahya, feel free to tackle other asyncio bugs or improvements, this one is just something that we aren't comfortable doing right now. ---------- resolution: -> postponed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 11:13:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 16:13:42 +0000 Subject: [issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard In-Reply-To: <1493735445.03.0.987403403044.issue30230@psf.upfronthosting.co.za> Message-ID: <1544544822.44.0.788709270274.issue30230@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Any progress? ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 11:15:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 16:15:10 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1544544910.33.0.788709270274.issue35214@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is this issue completely fixed? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 11:19:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 16:19:46 +0000 Subject: [issue22293] unittest.mock: use slots in MagicMock to reduce memory footprint In-Reply-To: <1409223925.36.0.353064472257.issue22293@psf.upfronthosting.co.za> Message-ID: <1544545186.64.0.788709270274.issue22293@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: James, please confirm that this issue still exists in 3.6 and 3.7. ---------- nosy: +serhiy.storchaka status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 12:07:09 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 11 Dec 2018 17:07:09 +0000 Subject: [issue35394] Add __slots__ = () to asyncio protocols In-Reply-To: <1543874366.92.0.788709270274.issue35394@psf.upfronthosting.co.za> Message-ID: <1544548029.92.0.788709270274.issue35394@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset 5344501ad166c1380be452644a863a4679c4291b by Andrew Svetlov in branch 'master': bpo-35394: Add empty slots to abstract asyncio protocols (#10889) https://github.com/python/cpython/commit/5344501ad166c1380be452644a863a4679c4291b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 13:30:58 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 11 Dec 2018 18:30:58 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1544553058.04.0.788709270274.issue35214@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I believe there are still some issues to deal with. I don't want to close the issue until I've got my buildbot running. ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 13:34:31 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 11 Dec 2018 18:34:31 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544553271.44.0.788709270274.issue35402@psf.upfronthosting.co.za> Steve Dower added the comment: I pushed the raw Tcl and Tk sources for 8.6.9.0 to cpython-source-deps, but it looks like we need some patches to be able to build on Windows (the X11 headers #define some names that the Windows headers want to use as struct members). So far I've needed to #undef and redefine None and ControlMask around #include in winmain.c and tkWin.h, but I think that will be enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 13:46:05 2018 From: report at bugs.python.org (pmpp) Date: Tue, 11 Dec 2018 18:46:05 +0000 Subject: [issue35403] support application/wasm in mimetypes and http.server In-Reply-To: <1543911244.97.0.788709270274.issue35403@psf.upfronthosting.co.za> Message-ID: <1544553965.81.0.788709270274.issue35403@psf.upfronthosting.co.za> pmpp added the comment: Sure, but i was considering the cpython in the browser/webview/electron case where python modules are served as .wasm files, i'm about to do it for my port and pyodide already does. It would make sense to provide the *simplest* environnement for cpython to serve its own components. scientific cpython stack in the browser: https://github.com/iodide-project/pyodide python repl in the browser experiment: http://pmpp.pagesperso-orange.fr/python_em.html Also i think cpython in the browser could be be already beyond testing and so far provides the best sandboxing configuration available around : "run python in a sandbox, not the opposite" ( quoting Victor Stinner ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 14:21:33 2018 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Tue, 11 Dec 2018 19:21:33 +0000 Subject: [issue35465] Document add_signal_handler Message-ID: <1544556093.28.0.788709270274.issue35465@psf.upfronthosting.co.za> New submission from Hrvoje Nik?i? : In https://stackoverflow.com/q/53704709/1600898 a StackOverflow user asked how the add_signal_handler event loop method differs from the signal.signal normally used by Python code. The add_signal_handler documentation is quite brief - if we exclude the parts that explain the exceptions raised and how to pass keyword arguments to the callback, the meat is this sentence: Set callback as the handler for the signum signal. It is only after looking at the source, and understanding asyncio, that one comes to the conclusion that the idea is to run the handler along with other event loop callbacks and coroutines, at the time when it is actually safe to invoke asyncio code. I think this deserves to be mentioned explicitly, for example: Set callback as the handler for the signum signal. The callback will be invoked in the thread that runs the event loop, along with other queued callbacks and runnable coroutines. Unlike signal handlers registered using signal.signal(), a callback registered with this function is allowed to interact with the event loop. ---------- assignee: docs at python components: Documentation messages: 331645 nosy: docs at python, hniksic priority: normal severity: normal status: open title: Document add_signal_handler versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 14:21:39 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Dec 2018 19:21:39 +0000 Subject: [issue35136] test_ssl fails in AMD64 FreeBSD CURRENT Shared 3.6 buildbot In-Reply-To: <1541081962.85.0.788709270274.issue35136@psf.upfronthosting.co.za> Message-ID: <1544556099.82.0.788709270274.issue35136@psf.upfronthosting.co.za> Ned Deily added the comment: FWIW, test_ssl currently passes on the other FreeBSD 3.6 buildbot: FreeBSD 10-STABLE Non-Debug 3.6 buildbot. Among any other differences, the SSL version there is older: ssl.OPENSSL_VERSION: OpenSSL 1.0.1u-freebsd 22 Sep 2016 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 14:26:30 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Dec 2018 19:26:30 +0000 Subject: [issue35136] test_ssl fails in AMD64 FreeBSD CURRENT Shared 3.6 buildbot In-Reply-To: <1541081962.85.0.788709270274.issue35136@psf.upfronthosting.co.za> Message-ID: <1544556390.43.0.788709270274.issue35136@psf.upfronthosting.co.za> Ned Deily added the comment: On the other hand and also FWIW, test_ssl does pass on the AMD64 FreeBSD CURRENT Shared 3.7 buildbot (the same system?) which also has 1.1.1a: ssl.OPENSSL_VERSION: OpenSSL 1.1.1a 20 Nov 2018 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 15:02:00 2018 From: report at bugs.python.org (Brett Cannon) Date: Tue, 11 Dec 2018 20:02:00 +0000 Subject: [issue35450] venv module doesn't create a copy of python binary by default In-Reply-To: <1544378737.46.0.788709270274.issue35450@psf.upfronthosting.co.za> Message-ID: <1544558520.99.0.788709270274.issue35450@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- stage: -> needs patch versions: +Python 3.5, Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 15:03:41 2018 From: report at bugs.python.org (Brett Cannon) Date: Tue, 11 Dec 2018 20:03:41 +0000 Subject: [issue35450] venv module doesn't create a copy of python binary by default In-Reply-To: <1544378737.46.0.788709270274.issue35450@psf.upfronthosting.co.za> Message-ID: <1544558621.22.0.788709270274.issue35450@psf.upfronthosting.co.za> Brett Cannon added the comment: Correct, that should say something like "copy/symlink of the Python binary/binaries (as appropriate by the platform or arguments used at environment creation time)." ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 15:04:13 2018 From: report at bugs.python.org (Brett Cannon) Date: Tue, 11 Dec 2018 20:04:13 +0000 Subject: [issue35450] venv module doesn't create a copy of python binary by default In-Reply-To: <1544378737.46.0.788709270274.issue35450@psf.upfronthosting.co.za> Message-ID: <1544558653.94.0.788709270274.issue35450@psf.upfronthosting.co.za> Brett Cannon added the comment: Obviously if you're willing to create a PR, Marcin, that would be great! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 16:08:07 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 21:08:07 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1544562487.2.0.788709270274.issue34162@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- stage: patch review -> needs patch versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 16:09:46 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 21:09:46 +0000 Subject: [issue35379] IDLE's close fails when io.filename set to None In-Reply-To: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> Message-ID: <1544562586.92.0.788709270274.issue35379@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- components: +macOS nosy: +ned.deily, ronaldoussoren versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 16:10:11 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 21:10:11 +0000 Subject: [issue22121] IDLE should start with HOME as the initial working directory In-Reply-To: <1406966032.01.0.548285467026.issue22121@psf.upfronthosting.co.za> Message-ID: <1544562611.87.0.788709270274.issue22121@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 16:11:24 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 21:11:24 +0000 Subject: [issue35263] Add None handling for get_saved() in IDLE In-Reply-To: <1542349566.92.0.788709270274.issue35263@psf.upfronthosting.co.za> Message-ID: <1544562684.49.0.788709270274.issue35263@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 16:11:41 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Tue, 11 Dec 2018 21:11:41 +0000 Subject: [issue35387] Dialogs on IDLE are accompanied by a small black window In-Reply-To: <1543845582.88.0.788709270274.issue35387@psf.upfronthosting.co.za> Message-ID: <1544562701.91.0.788709270274.issue35387@psf.upfronthosting.co.za> Vlad Tudorache added the comment: I confirm the issue. Screenshot attached. ---------- type: -> behavior Added file: https://bugs.python.org/file47987/Capture d?e?cran 2018-12-11 a? 22.07.30.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 16:11:54 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 21:11:54 +0000 Subject: [issue28775] Option to set startup directory in IDLE In-Reply-To: <1479837252.01.0.0581172301847.issue28775@psf.upfronthosting.co.za> Message-ID: <1544562714.74.0.788709270274.issue28775@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 16:13:21 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 21:13:21 +0000 Subject: [issue35213] IDLE: use 'macOS' where appropriate. In-Reply-To: <1541999174.82.0.788709270274.issue35213@psf.upfronthosting.co.za> Message-ID: <1544562801.63.0.788709270274.issue35213@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Any more changes can be a future issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 16:35:07 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 21:35:07 +0000 Subject: [issue35208] IDLE: Squeezed lines count ignores window width In-Reply-To: <1541834301.3.0.788709270274.issue35208@psf.upfronthosting.co.za> Message-ID: <1544564107.54.0.788709270274.issue35208@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 16:41:18 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Tue, 11 Dec 2018 21:41:18 +0000 Subject: [issue35387] Dialogs on IDLE are accompanied by a small black window In-Reply-To: <1543845582.88.0.788709270274.issue35387@psf.upfronthosting.co.za> Message-ID: <1544564478.66.0.788709270274.issue35387@psf.upfronthosting.co.za> Vlad Tudorache added the comment: At the line 102 in editor.py, I see: self.top = top = window.ListedToplevel(root, menu=self.menubar) Looking at window.py it seems that ListedToplevel builds a new Toplevel (the black one?) instead of adding an existing one (the editor) at the list, I'll check it again, maybe I didn't see right. The second window does not appear for me when using pure Tcl and toplevel widget (from Wish, for exemple) on MacOS, I don't think it's a Tk problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 16:52:27 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Tue, 11 Dec 2018 21:52:27 +0000 Subject: [issue35387] Dialogs on IDLE are accompanied by a small black window In-Reply-To: <1543845582.88.0.788709270274.issue35387@psf.upfronthosting.co.za> Message-ID: <1544565147.68.0.788709270274.issue35387@psf.upfronthosting.co.za> Vlad Tudorache added the comment: No, I'm wrong, the editor window seems created by the ListedToplevel. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 16:55:32 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 11 Dec 2018 21:55:32 +0000 Subject: [issue35423] Signal handling machinery still relies on "pending calls". In-Reply-To: <1544055159.6.0.788709270274.issue35423@psf.upfronthosting.co.za> Message-ID: <1544565332.64.0.788709270274.issue35423@psf.upfronthosting.co.za> Eric Snow added the comment: Correct. The remaining call to Py_AddPendingCall in the signal-handling code is fine. This issue is only indirectly related. I suppose you could consider it a follow-up to #30703. The PR for that issue (GH-2415) switches from using pending calls for signal handlers to using the pending calls machinery without actual pending calls. So here I want to address taking the next step: deal with pending signals separately from pending calls. That separation helps simplify efforts to adapt the pending calls machinery for use in arbitrary threads (rather than the main thread). See #33608. ---------- components: +Interpreter Core nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:10:27 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 11 Dec 2018 22:10:27 +0000 Subject: [issue35466] Use a linked list for the ceval pending calls. Message-ID: <1544566227.12.0.788709270274.issue35466@psf.upfronthosting.co.za> New submission from Eric Snow : Currently the list of pending calls (see Include/internal/pycore_ceval.h) is implemented as a circular buffer. A linked list would be easier to understand and modify. It also allows for removing the restriction on the number of pending calls. ---------- assignee: eric.snow components: Interpreter Core messages: 331655 nosy: eric.snow priority: normal severity: normal stage: needs patch status: open title: Use a linked list for the ceval pending calls. type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:14:08 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 11 Dec 2018 22:14:08 +0000 Subject: [issue35446] incorrect example In-Reply-To: <1544359206.53.0.788709270274.issue35446@psf.upfronthosting.co.za> Message-ID: <1544566448.56.0.788709270274.issue35446@psf.upfronthosting.co.za> Change by Eric Snow : ---------- pull_requests: +10353 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:15:38 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 11 Dec 2018 22:15:38 +0000 Subject: [issue35466] Use a linked list for the ceval pending calls. In-Reply-To: <1544566227.12.0.788709270274.issue35466@psf.upfronthosting.co.za> Message-ID: <1544566538.15.0.788709270274.issue35466@psf.upfronthosting.co.za> Change by Eric Snow : ---------- keywords: +patch pull_requests: +10354 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:16:44 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 11 Dec 2018 22:16:44 +0000 Subject: [issue35446] incorrect example In-Reply-To: <1544359206.53.0.788709270274.issue35446@psf.upfronthosting.co.za> Message-ID: <1544566604.28.0.788709270274.issue35446@psf.upfronthosting.co.za> Change by Eric Snow : ---------- pull_requests: -10353 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:17:37 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 11 Dec 2018 22:17:37 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544566657.12.0.788709270274.issue35402@psf.upfronthosting.co.za> Steve Dower added the comment: Looks like Tix needs similar updates, since it imports the Tk headers. Perhaps it'll be easier to undef immediately after the X11\X.h include? Assuming the values aren't actually being used anywhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:20:17 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Dec 2018 22:20:17 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544566817.12.0.788709270274.issue35402@psf.upfronthosting.co.za> Ned Deily added the comment: Should the problems be reported upstream? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:21:13 2018 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 11 Dec 2018 22:21:13 +0000 Subject: [issue16516] argparse types (and actions) must be hashable In-Reply-To: <1353468507.9.0.0965555550975.issue16516@psf.upfronthosting.co.za> Message-ID: <1544566873.38.0.788709270274.issue16516@psf.upfronthosting.co.za> Guido van Rossum added the comment: Luna and I talked a bit about this offline and we decided not to merge the PR (nor the original patch, which is the same). Instead Luna will add a note to the docs explaining the caveat. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:23:06 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 22:23:06 +0000 Subject: [issue12920] inspect.getsource only works for objects loaded from files, not interactive session In-Reply-To: <1315334278.72.0.69534403863.issue12920@psf.upfronthosting.co.za> Message-ID: <1544566986.09.0.788709270274.issue12920@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Do we really need to say that getsource(object) can only get the object's source if it is accessible from the object? Getsource also fails if a module is loaded from a .pyc with not corresponding .py available. The problem is not the call being in __main__. When I put the three lines (with the 3rd wrapped with print()) in an IDLE editor and run, and re-inspect, I get ======================== RESTART: F:\Python\a\tem3.py ======================== class A: pass >>> inspect.getsource(A) 'class A:\n pass\n' Ditto if I run > py -i -m a.tem3 If I continue in IDLE's Shell >>> class B: pass >>> inspect.getsource(B) Traceback (most recent call last): File "", line 1, in inspect.getsource(B) File "F:\dev\37\lib\inspect.py", line 973, in getsource lines, lnum = getsourcelines(object) File "F:\dev\37\lib\inspect.py", line 955, in getsourcelines lines, lnum = findsource(object) File "F:\dev\37\lib\inspect.py", line 812, in findsource raise OSError('could not find class definition') OSError: could not find class definition If I enter the three lines above in a fress python or IDLEs shell, I get the TypeError above. IDLE does store interactive inputs into linecache, so that tracebacks contain the offending line (unlike interactive python). But it does so on a statement by statement basis, so that each entry is treated as a separate file. In a traceback for an exception in a multiline statement, the line number is relative to the statement. >>> def f(): # line2 of f 1/0 >>> f() Traceback (most recent call last): File "", line 1, in f() File "", line 3, in f 1/0 ZeroDivisionError: division by zero Interactive python displays '' as the file for all entries. IDLE numbers them, so previous statements remained cached. I consider enhanced interactive tracebacks to be an important feature. But I don't see how to attach individual pseudofile names to classes and functions so that getsource could find their source lines. ---------- nosy: +terry.reedy versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:24:08 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 22:24:08 +0000 Subject: [issue35097] IDLE add doc subsection for editor windows In-Reply-To: <1540771358.38.0.788709270274.issue35097@psf.upfronthosting.co.za> Message-ID: <1544567048.02.0.788709270274.issue35097@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 Dec 11 17:26:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 22:26:51 +0000 Subject: [issue5438] test_bigmem.test_from_2G_generator uses more memory than expected In-Reply-To: <1236475515.92.0.849329057425.issue5438@psf.upfronthosting.co.za> Message-ID: <1544567211.78.0.788709270274.issue5438@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: tuple(range(size)) should consume approximately 90 GiB of memory and run for hours. I think this happens because it creates enormous number of integer objects, and this can lead to requesting additional memory for memory pools. If details of memory management for small objects is not the purpose of this test, I think we can replace it with tuple(iter([42]*size)). It executes the same code in tuple creation: allocates a tuple of known size (both range and list iterators have __length_hint__) and fills it with values produced by the iterator. This allows significantly reduce memory requirements (to 16 GiB) and execution time (to 20 seconds on my computer). The proposed PR implements this rewriting. It also fixes memory requirements for other tests, optimizes repr tests for tuples and lists (repr(False) is faster and longer than repr(0)), and expresses memory requirements in terms of character and pointer sizes. ---------- versions: +Python 3.7, Python 3.8 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:27:04 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 22:27:04 +0000 Subject: [issue25219] Update doc for Idle command line options. In-Reply-To: <1442990084.65.0.133912466016.issue25219@psf.upfronthosting.co.za> Message-ID: <1544567224.2.0.788709270274.issue25219@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Rather that leave this open indefinitely, I decided to close until a report or research says that more is needed. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:28:14 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 22:28:14 +0000 Subject: [issue34976] IDLE: Replace the search dialog with a search bar In-Reply-To: <1539464539.46.0.788709270274.issue34976@psf.upfronthosting.co.za> Message-ID: <1544567294.85.0.788709270274.issue34976@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:28:57 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 22:28:57 +0000 Subject: [issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1544567337.27.0.788709270274.issue17535@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:29:46 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 22:29:46 +0000 Subject: [issue21880] IDLE: Ability to run 3rd party code checkers In-Reply-To: <1404066447.3.0.940760126754.issue21880@psf.upfronthosting.co.za> Message-ID: <1544567386.02.0.788709270274.issue21880@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:30:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 22:30:13 +0000 Subject: [issue5438] test_bigmem.test_from_2G_generator uses more memory than expected In-Reply-To: <1236475515.92.0.849329057425.issue5438@psf.upfronthosting.co.za> Message-ID: <1544567413.57.0.788709270274.issue5438@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10355 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:31:14 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 22:31:14 +0000 Subject: [issue34313] IDLE crashes with Tk-related error on macOS with ActiveTcl 8.6 In-Reply-To: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> Message-ID: <1544567474.95.0.788709270274.issue34313@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:31:52 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 22:31:52 +0000 Subject: [issue33065] IDLE debugger: failure stepping through module loading In-Reply-To: <1520917336.65.0.467229070634.issue33065@psf.upfronthosting.co.za> Message-ID: <1544567512.3.0.788709270274.issue33065@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:33:43 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 22:33:43 +0000 Subject: [issue34857] IDLE: SyntaxWarning not handled properly In-Reply-To: <1538338230.46.0.545547206417.issue34857@psf.upfronthosting.co.za> Message-ID: <1544567623.86.0.788709270274.issue34857@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:34:03 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 22:34:03 +0000 Subject: [issue33962] IDLE: use ttk.spinbox with configdialog In-Reply-To: <1529983748.27.0.56676864532.issue33962@psf.upfronthosting.co.za> Message-ID: <1544567643.44.0.788709270274.issue33962@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:37:16 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 22:37:16 +0000 Subject: [issue34708] Odd crashes/freezes when sys.stdout.shell.console is typed In-Reply-To: <1537152781.74.0.956365154283.issue34708@psf.upfronthosting.co.za> Message-ID: <1544567836.59.0.788709270274.issue34708@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:49:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 22:49:40 +0000 Subject: [issue35466] Use a linked list for the ceval pending calls. In-Reply-To: <1544566227.12.0.788709270274.issue35466@psf.upfronthosting.co.za> Message-ID: <1544568580.67.0.788709270274.issue35466@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Was not a circular array used intentionally because this allows to avoid calling malloc()? And the proposed code looks more complicated to me than the current code. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:53:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 22:53:24 +0000 Subject: [issue19348] Building _testcapimodule as a builtin results in compile error In-Reply-To: <1382442846.46.0.759535198419.issue19348@psf.upfronthosting.co.za> Message-ID: <1544568804.38.0.788709270274.issue19348@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 18:02:30 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 11 Dec 2018 23:02:30 +0000 Subject: [issue35466] Use a linked list for the ceval pending calls. In-Reply-To: <1544566227.12.0.788709270274.issue35466@psf.upfronthosting.co.za> Message-ID: <1544569350.54.0.788709270274.issue35466@psf.upfronthosting.co.za> Eric Snow added the comment: I suppose performance could have been a motivator originally. However, I don't see a benefit now that signals handlers are no longer pending calls. If it's a real problem then we can leverage a free list. As to complexity, the motivator for this change was difficulty I had (along with another core dev) in quickly understanding the logic for manipulating the circular buffer. I find the linked list much easier to understand. ---------- nosy: +emilyemorehouse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 18:02:53 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 11 Dec 2018 23:02:53 +0000 Subject: [issue35423] Signal handling machinery still relies on "pending calls". In-Reply-To: <1544055159.6.0.788709270274.issue35423@psf.upfronthosting.co.za> Message-ID: <1544569373.94.0.788709270274.issue35423@psf.upfronthosting.co.za> Change by Eric Snow : ---------- nosy: +emilyemorehouse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 18:17:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 23:17:11 +0000 Subject: [issue10336] test_xmlrpc fails if gzip is not supported by client In-Reply-To: <1289041038.52.0.266218953067.issue10336@psf.upfronthosting.co.za> Message-ID: <1544570231.83.0.788709270274.issue10336@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The server for this test is ran in the different thread of the same process. The test is skipped if gzip is not supported. I don't see a way how it can fail. ---------- nosy: +serhiy.storchaka resolution: -> not a bug status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 18:23:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 23:23:08 +0000 Subject: [issue18799] Resurrect and fix test_404 in Lib/test/test_xmlrpc.py In-Reply-To: <1377100643.52.0.970396135479.issue18799@psf.upfronthosting.co.za> Message-ID: <1544570588.72.0.788709270274.issue18799@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Vajrasky, do you mind to create a pull request on GitHub for your patch? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 18:24:41 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 23:24:41 +0000 Subject: [issue33987] IDLE: add ttk.Frame inside searchbaseToplevel In-Reply-To: <1530158550.76.0.56676864532.issue33987@psf.upfronthosting.co.za> Message-ID: <1544570681.39.0.788709270274.issue33987@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 18:25:05 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Dec 2018 23:25:05 +0000 Subject: [issue27477] IDLE: Switch search dialogs to ttk widgets, and other refinement In-Reply-To: <1468181977.57.0.555586182066.issue27477@psf.upfronthosting.co.za> Message-ID: <1544570705.1.0.788709270274.issue27477@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: +Python 3.7, Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 18:25:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2018 23:25:10 +0000 Subject: [issue17534] unittest keeps references to test cases alive In-Reply-To: <1364076408.77.0.0522248566775.issue17534@psf.upfronthosting.co.za> Message-ID: <1544570710.92.0.788709270274.issue17534@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Does this issue still relevant? ---------- nosy: +serhiy.storchaka status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 18:26:11 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 11 Dec 2018 23:26:11 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544570771.37.0.788709270274.issue35402@psf.upfronthosting.co.za> Steve Dower added the comment: Probably. I'm 99% sure it's a problem with the latest build tools, and nothing to do with Python. Though I haven't checked out whether we're injecting any compile time flags that may be causing extra things to be included - I have no idea why X11 is necessary, for example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 19:25:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 00:25:13 +0000 Subject: [issue35267] reproducible deadlock with multiprocessing.Pool In-Reply-To: <1542416799.14.0.788709270274.issue35267@psf.upfronthosting.co.za> Message-ID: <1544574313.72.0.788709270274.issue35267@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 21:32:04 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Dec 2018 02:32:04 +0000 Subject: [issue35467] IDLE: unrequested pasting into Shell after restart Message-ID: <1544581924.2.0.788709270274.issue35467@psf.upfronthosting.co.za> New submission from Terry J. Reedy : IDLE very occasionally (frequency much less than .01), and AFAIK hapzardly, pastes previous shell output after I enter something at the prompt after a restart. Not fatal but definitly annoying. When it happened today, I decided to open this issue to start accumulating information that might point at where to start. tem3.py: (content likely not relevant) import inspect class A: pass print(inspect.getsource(A)) print(__name__) Shell copy: """ ... OSError: could not find class definition >>> ======================== RESTART: F:\Python\a\tem3.py ======================== class A: pass __main__ >>> 1/0======================== RESTART: F:\Python\a\tem3.py ======================== class A: pass SyntaxError: invalid syntax >>> 1/0 Traceback (most recent call last): ... """ The paste, after '1/0', is the restart line and the first two lines of output (but not the last two). It mixes text from IDLE and from the program, so it is not an echo from the run process). It is colored as if typed in: 'class' and 'pass' are keyword colored, the I believe I hit ENTER and got the paste instead of the exception. I hit Entere after the paste to get the SyntaxError and a clean prompt. Then I reentered 1/0. I did more or less the same thing about 5 times without a repeat of the problem. Possible factors: exception before restart (probably not relevant). restart, prompt, and entry (I believe these are essential elements). running a file (I seldom restart other wise). hitting return Included Content: restart line (I am pretty sure pasted text does not always include this). output from before the restart (ever?). output from after the restart (if always, must have run a file). --- Raymond, I believe you have seen this on Mac. Tal or Sheryl, how about linux? Anyone, more details on other examples are needed to know what is constant and what is incidental. ---------- messages: 331668 nosy: cheryl.sabella, rhettinger, taleinat, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: unrequested pasting into Shell after restart type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 21:33:40 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Dec 2018 02:33:40 +0000 Subject: [issue34055] IDLE Shell: check syntax before smart indent In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1544582020.2.0.788709270274.issue34055@psf.upfronthosting.co.za> Terry J. Reedy added the comment: #35467 is about unwanted auto-pasting. ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 21:34:48 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Dec 2018 02:34:48 +0000 Subject: [issue33963] IDLE macosx: add tests. In-Reply-To: <1529985035.66.0.56676864532.issue33963@psf.upfronthosting.co.za> Message-ID: <1544582088.5.0.788709270274.issue33963@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 21:36:59 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Dec 2018 02:36:59 +0000 Subject: [issue33960] IDLE REPL: Strange indentation In-Reply-To: <1529959217.21.0.56676864532.issue33960@psf.upfronthosting.co.za> Message-ID: <1544582219.32.0.788709270274.issue33960@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: +Python 3.7, Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 21:48:30 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Dec 2018 02:48:30 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1544582910.96.0.788709270274.issue33610@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 22:01:12 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Dec 2018 03:01:12 +0000 Subject: [issue35387] Dialogs on IDLE are accompanied by a small black window In-Reply-To: <1543845582.88.0.788709270274.issue35387@psf.upfronthosting.co.za> Message-ID: <1544583672.05.0.788709270274.issue35387@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Vlad, thank you. The release candidates for 3.7.2 and 3.6.8 are due as soon as Ned can manage. The Mac installers will come with the very recent tcl/tk 8.6.9(.1) releases. Existing tkinter-related issues for Mac should be re-tested when available and installed. ---------- type: behavior -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 23:13:34 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Dec 2018 04:13:34 +0000 Subject: [issue34313] Tkinter crashes with Tk-related error on macOS with ActiveTcl 8.6 In-Reply-To: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> Message-ID: <1544588014.71.0.788709270274.issue34313@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- components: -IDLE title: IDLE crashes with Tk-related error on macOS with ActiveTcl 8.6 -> Tkinter crashes with Tk-related error on macOS with ActiveTcl 8.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 01:23:26 2018 From: report at bugs.python.org (Matthias Klose) Date: Wed, 12 Dec 2018 06:23:26 +0000 Subject: [issue35468] [3.6/3.7] idlelib/help.html mentions 3.8alpha0 docs Message-ID: <1544595806.56.0.788709270274.issue35468@psf.upfronthosting.co.za> New submission from Matthias Klose : [3.6/3.7] idlelib/help.html mentions 3.8alpha0 docs: Seen in the 3.6.8 and 3.7.2 release candidates ---------- assignee: terry.reedy components: IDLE keywords: 3.6regression, 3.7regression messages: 331671 nosy: doko, ned.deily, terry.reedy priority: normal severity: normal status: open title: [3.6/3.7] idlelib/help.html mentions 3.8alpha0 docs versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 01:28:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 06:28:27 +0000 Subject: [issue20800] Cannot run gui tests twice. In-Reply-To: <1393545961.36.0.67475510111.issue20800@psf.upfronthosting.co.za> Message-ID: <1544596107.02.0.788709270274.issue20800@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have just tested on Windows and all works to me. Terry, can you confirm that this issue is gone? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 01:46:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 06:46:50 +0000 Subject: [issue6835] doctest problem with decorated function when decorator is defined in separate file In-Reply-To: <1251989637.01.0.106852845631.issue6835@psf.upfronthosting.co.za> Message-ID: <1544597210.34.0.788709270274.issue6835@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Problem with doctest and decorated functions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 02:54:58 2018 From: report at bugs.python.org (Chris Withers) Date: Wed, 12 Dec 2018 07:54:58 +0000 Subject: [issue17185] unittest mock create_autospec doesn't correctly replace mocksignature In-Reply-To: <1360621900.03.0.519438692167.issue17185@psf.upfronthosting.co.za> Message-ID: <1544601298.56.0.788709270274.issue17185@psf.upfronthosting.co.za> Chris Withers added the comment: New changeset f7fa62ef4422c9deee050a794fd8504640d9f8f4 by Chris Withers (Xtreak) in branch 'master': bpo-17185: Add __signature__ to mock that can be used by inspect for signature (GH11048) https://github.com/python/cpython/commit/f7fa62ef4422c9deee050a794fd8504640d9f8f4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 02:55:39 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Dec 2018 07:55:39 +0000 Subject: [issue17185] unittest mock create_autospec doesn't correctly replace mocksignature In-Reply-To: <1360621900.03.0.519438692167.issue17185@psf.upfronthosting.co.za> Message-ID: <1544601339.16.0.788709270274.issue17185@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10356 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 02:58:18 2018 From: report at bugs.python.org (Chris Withers) Date: Wed, 12 Dec 2018 07:58:18 +0000 Subject: [issue17185] unittest mock create_autospec doesn't correctly replace mocksignature In-Reply-To: <1360621900.03.0.519438692167.issue17185@psf.upfronthosting.co.za> Message-ID: <1544601498.09.0.788709270274.issue17185@psf.upfronthosting.co.za> Change by Chris Withers : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 03:00:07 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Dec 2018 08:00:07 +0000 Subject: [issue35468] [3.6/3.7] idlelib/help.html mentions 3.8alpha0 docs In-Reply-To: <1544595806.56.0.788709270274.issue35468@psf.upfronthosting.co.za> Message-ID: <1544601607.3.0.788709270274.issue35468@psf.upfronthosting.co.za> Terry J. Reedy added the comment: IDLE pays no attention to that part of the html file. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 03:00:15 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 12 Dec 2018 08:00:15 +0000 Subject: [issue32153] mock.create_autospec fails if an attribute is a partial function In-Reply-To: <1511864595.09.0.213398074469.issue32153@psf.upfronthosting.co.za> Message-ID: <1544601615.29.0.788709270274.issue32153@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: @cjw296 since the unit tests were added and the original report is fixed with 3.7 and above can this be closed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 03:03:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 08:03:36 +0000 Subject: [issue8765] Tests unwillingly writing unicocde to raw streams In-Reply-To: <1274271475.93.0.690807793227.issue8765@psf.upfronthosting.co.za> Message-ID: <1544601816.04.0.788709270274.issue8765@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10357 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 03:04:08 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Dec 2018 08:04:08 +0000 Subject: [issue20800] Cannot run gui tests twice. In-Reply-To: <1393545961.36.0.67475510111.issue20800@psf.upfronthosting.co.za> Message-ID: <1544601848.58.0.788709270274.issue20800@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Either test repeated works now. ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 03:05:43 2018 From: report at bugs.python.org (Chris Withers) Date: Wed, 12 Dec 2018 08:05:43 +0000 Subject: [issue32153] mock.create_autospec fails if an attribute is a partial function In-Reply-To: <1511864595.09.0.213398074469.issue32153@psf.upfronthosting.co.za> Message-ID: <1544601943.11.0.788709270274.issue32153@psf.upfronthosting.co.za> Chris Withers added the comment: Yep! Good catch :-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 03:11:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 08:11:49 +0000 Subject: [issue8765] Tests unwillingly writing unicocde to raw streams In-Reply-To: <1274271475.93.0.690807793227.issue8765@psf.upfronthosting.co.za> Message-ID: <1544602309.93.0.788709270274.issue8765@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I agree, that it would be right to accept only binary strings when write to binary stream. But I afraid that it is too late to change this in the 16th bugfix of 2.7. This can break existing code or tests. I suggest to change the behavior only in the Py3k compatibility mode. PR 11127 is based on issue_8765.diff, but emits a warning when run Python with the -3 option. $ ./python -3 -c "import io; io.FileIO('/dev/null', 'w').write(u'')" -c:1: DeprecationWarning: write() argument must be string or buffer, not 'unicode' $ ./python -3 -We -c "import io; io.FileIO('/dev/null', 'w').write(u'')" Traceback (most recent call last): File "", line 1, in DeprecationWarning: write() argument must be string or buffer, not 'unicode' This will help to migrate to Python 3, but keeps the behavior unchanged in normal run. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 03:28:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 08:28:53 +0000 Subject: [issue20127] Race condition in test_threaded_import.task()? In-Reply-To: <1388891894.47.0.893825432716.issue20127@psf.upfronthosting.co.za> Message-ID: <1544603333.03.0.788709270274.issue20127@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Buildbots logs no longer available. Looking at the code, I see nothing suspicious in the finally clause. The size of the done_tasks is increased by 1 in every thread, and at least one thread will call done.set() when len(done_tasks) == N. Could you please provide more information Eric? ---------- nosy: +serhiy.storchaka status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 03:30:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 08:30:43 +0000 Subject: [issue20623] Run test_htmlparser with unbuffered source In-Reply-To: <1392355736.12.0.789515790833.issue20623@psf.upfronthosting.co.za> Message-ID: <1544603443.55.0.788709270274.issue20623@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: behavior -> enhancement versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 03:39:55 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 12 Dec 2018 08:39:55 +0000 Subject: [issue31823] Opaque default value for close_fds argument in Popen.__init__ In-Reply-To: <1508445256.4.0.213398074469.issue31823@psf.upfronthosting.co.za> Message-ID: <1544603995.9.0.788709270274.issue31823@psf.upfronthosting.co.za> Tal Einat added the comment: Gregory, this issue was about the docs, not the doc-string (help()). Are you sure it should be closed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 03:45:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 08:45:22 +0000 Subject: [issue15192] test_bufio failures on Win64 buildbot In-Reply-To: <1340715209.45.0.994879492682.issue15192@psf.upfronthosting.co.za> Message-ID: <1544604322.88.0.788709270274.issue15192@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The implementation of test.support.unlink() was changed since. It tries to change permissions of read-only files, and repeat attempts several times. It looks more reliable now. Is this issue still reproducible? ---------- nosy: +serhiy.storchaka status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 03:53:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 08:53:30 +0000 Subject: [issue13369] timeout with exit code 0 while re-running failed tests In-Reply-To: <1320746276.61.0.134506088825.issue13369@psf.upfronthosting.co.za> Message-ID: <1544604810.74.0.788709270274.issue13369@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 03:58:40 2018 From: report at bugs.python.org (Chris Withers) Date: Wed, 12 Dec 2018 08:58:40 +0000 Subject: [issue17185] unittest mock create_autospec doesn't correctly replace mocksignature In-Reply-To: <1360621900.03.0.519438692167.issue17185@psf.upfronthosting.co.za> Message-ID: <1544605120.14.0.788709270274.issue17185@psf.upfronthosting.co.za> Chris Withers added the comment: New changeset 6a12931c9cb5d472fe6370dbcd2bde72f34dddb4 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-17185: Add __signature__ to mock that can be used by inspect for signature (GH11125) https://github.com/python/cpython/commit/6a12931c9cb5d472fe6370dbcd2bde72f34dddb4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 04:00:26 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Dec 2018 09:00:26 +0000 Subject: [issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__' In-Reply-To: <1459972886.32.0.234738617564.issue26704@psf.upfronthosting.co.za> Message-ID: <1544605226.77.0.788709270274.issue26704@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10358 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 04:01:53 2018 From: report at bugs.python.org (Chris Withers) Date: Wed, 12 Dec 2018 09:01:53 +0000 Subject: [issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__' In-Reply-To: <1459972886.32.0.234738617564.issue26704@psf.upfronthosting.co.za> Message-ID: <1544605313.85.0.788709270274.issue26704@psf.upfronthosting.co.za> Change by Chris Withers : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 04:07:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 09:07:39 +0000 Subject: [issue8314] test_ctypes fails in test_ulonglong on sparc buildbots In-Reply-To: <1270469885.55.0.752027246289.issue8314@psf.upfronthosting.co.za> Message-ID: <1544605659.48.0.788709270274.issue8314@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Starting from 3.7 Python always uses system libffi. 3.4 and 3.5 are in security bugfix only mode. So this issue is only for 2.7 and 3.6. ---------- nosy: +serhiy.storchaka versions: +Python 3.6 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 04:25:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 09:25:10 +0000 Subject: [issue9999] test_shutil cross-file-system tests are fragile (may not test what they purport to test) In-Reply-To: <1285860550.74.0.246130427134.issue9999@psf.upfronthosting.co.za> Message-ID: <1544606710.62.0.788709270274.issue9999@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Starting from issue11560 test_shutil patches os.rename to imitate a failure in cross-file-system move. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 04:39:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 09:39:24 +0000 Subject: [issue9960] test_structmembers fails on s390x (bigendian 64-bit): int/Py_ssize_t issue In-Reply-To: <1285600296.08.0.731959847047.issue9960@psf.upfronthosting.co.za> Message-ID: <1544607564.78.0.788709270274.issue9960@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This was fixed in issue17928. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 04:41:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 09:41:24 +0000 Subject: [issue2661] Mapping tests cannot be passed by user implementations In-Reply-To: <1208642973.7.0.825847798287.issue2661@psf.upfronthosting.co.za> Message-ID: <1544607684.78.0.788709270274.issue2661@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Walter, do you mind to create a PR? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 05:39:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 10:39:03 +0000 Subject: [issue14143] test_ntpath failure on Windows In-Reply-To: <1330369660.88.0.127957807148.issue14143@psf.upfronthosting.co.za> Message-ID: <1544611143.83.0.788709270274.issue14143@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 05:43:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 10:43:18 +0000 Subject: [issue35469] [2.7] time.asctime() regression Message-ID: <1544611398.55.0.788709270274.issue35469@psf.upfronthosting.co.za> New submission from STINNER Victor : It seems like bpo-31339 introduced a regression with commit eeadf5fc231163ec97a8010754d9c995c7c14876 to fix a security issue. Copy of of bencordova's comment from GitHub: https://github.com/python/cpython/pull/3293#issuecomment-446378058 I'm new at commenting on this project so apologies if this is not the appropriate place to do so. >From what I can see (upgrading from python 2.7.13->2.7.15), the string format on line 648 of Modules/timemodule.c causes a different output from time.ctime() and time.asctime(t) for "days of the month < 10" "%s %s%3d %.2d:%.2d:%.2d %d" The "%3d" in this change removes the leading zero on the tm_mday but maintains a leading space. Just looking for feedback on what the intention was and if this is a bug. python 2.7.13: >>> import time >>> t = time.strptime("6 Dec 18", "%d %b %y") >>> time.asctime(t) 'Thu Dec 06 00:00:00 2018' python 2.7.15: >>> import time >>> t = time.strptime("6 Dec 18", "%d %b %y") >>> time.asctime(t) 'Thu Dec 6 00:00:00 2018' Note, the string with this change includes two spaces between "Dec" and "6" which also looks awkward. Original Post: https://github.com/python/cpython/commit/eeadf5fc231163ec97a8010754d9c995c7c14876#r31642310 ---------- components: Library (Lib) messages: 331687 nosy: vstinner priority: normal severity: normal status: open title: [2.7] time.asctime() regression versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 05:47:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 10:47:02 +0000 Subject: [issue15626] unittest.main negates -bb option and programmatic warning configuration In-Reply-To: <1344730376.57.0.519562827761.issue15626@psf.upfronthosting.co.za> Message-ID: <1544611622.42.0.788709270274.issue15626@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Something was changed in 3.7, but I do not see differences in unittest that can cause this. $ python3.6 -bb testbb.py testbb.py:7: BytesWarning: str() on a bytes instance str(b"") . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK $ python3.7 -bb testbb.py E ====================================================================== ERROR: test_foo (__main__.Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "testbb.py", line 7, in test_foo str(b"") BytesWarning: str() on a bytes instance ---------------------------------------------------------------------- Ran 1 test in 0.001s FAILED (errors=1) Perhaps it is related to issue20361. ---------- components: +Library (Lib) -Tests nosy: +ncoghlan, rbcollins, serhiy.storchaka, vstinner versions: +Python 3.6 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 06:00:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 11:00:16 +0000 Subject: [issue11955] 3.3 : test_argparse.py fails 'make test' In-Reply-To: <1304093741.94.0.09129303291.issue11955@psf.upfronthosting.co.za> Message-ID: <1544612416.89.0.788709270274.issue11955@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I can not reproduce failures. Are they still reproducible? ---------- nosy: +serhiy.storchaka status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 06:02:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 11:02:49 +0000 Subject: [issue35469] [2.7] time.asctime() regression In-Reply-To: <1544611398.55.0.788709270274.issue35469@psf.upfronthosting.co.za> Message-ID: <1544612569.74.0.788709270274.issue35469@psf.upfronthosting.co.za> STINNER Victor added the comment: Even if behavior changes in minor Python release are not welcome, IMHO this one was justified and worth it. asctime() has a crappy API: it returns a pointer to a static buffer somewhere in the libc. asctime_r() is better, but it has an undefined behavior for year after 9999. The change has been made to fix a security issue when Python runs on musl (C library). I suggest to close the issue as "not a bug". Use time.strftime() if you want a specific format. On Python 2.7.13, the format depended on the C library. Now Python 2.7 and 3 always have the same output on all platforms (on any C library). > It seems like bpo-31339 introduced a regression with commit eeadf5fc231163ec97a8010754d9c995c7c14876 to fix a security issue. commit eeadf5fc231163ec97a8010754d9c995c7c14876 Author: Victor Stinner Date: Wed Sep 6 01:35:39 2017 +0200 ... Backport and adapt the _asctime() function from the master branch to not depend on the implementation of asctime() and ctime() from the external C library. This change fixes a bug when Python is run using the musl C library. ... python 2.7.13: 'Thu Dec 06 00:00:00 2018' python 2.7.15: 'Thu Dec 6 00:00:00 2018' Python 3.7.1: 'Thu Dec 6 00:00:00 2018' Python 2.7 and 3.7 now have exactly the same output. This format seems to be consistent with asctime() format of glibc 2.28 on my Fedora 29: --- #include #include int main() { char *str; struct tm *tm; time_t t = 0; tm = gmtime(&t); str = asctime(tm); printf("%s", str); return 0; } --- Output: --- Thu Jan 1 00:00:00 1970 --- The Python format comes from bpo-8013: commit b9588b528a48302a4884d0500caec71f1c59280c Author: Alexander Belopolsky Date: Tue Jan 4 16:34:30 2011 +0000 Issue #8013: time.asctime and time.ctime no longer call system asctime and ctime functions. The year range for time.asctime is now 1900 through maxint. The range for time.ctime is the same as for time.localtime. The string produced by these functions is longer than 24 characters when year is greater than 9999. ... + char buf[20]; /* 'Sun Sep 16 01:03:52\0' */ ... + n = snprintf(buf, sizeof(buf), "%.3s %.3s%3d %.2d:%.2d:%.2d", + wday_name[timeptr->tm_wday], + mon_name[timeptr->tm_mon], + timeptr->tm_mday, timeptr->tm_hour, + timeptr->tm_min, timeptr->tm_sec); ... Discussions: * https://mail.python.org/pipermail/python-dev/2011-January/107187.html * https://bugs.python.org/issue8013#msg125281 > Note, the string with this change includes two spaces between "Dec" and "6" which also looks awkward. If you want a specific format, I suggest you to use time.strftime(). You may have a look at the datetime module. > Original Post: Sorry, the correct URL is: https://github.com/python/cpython/commit/eeadf5fc231163ec97a8010754d9c995c7c14876#r31642310 ---------- nosy: +belopolsky, p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 06:06:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 11:06:12 +0000 Subject: [issue20118] test_imaplib test_linetoolong fails on 2.7 in SSL test on some buildbots In-Reply-To: <1388787779.06.0.335033013809.issue20118@psf.upfronthosting.co.za> Message-ID: <1544612772.65.0.788709270274.issue20118@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 16d63202af35dadd652a5e3eae687ea709e95b11 by Victor Stinner in branch '2.7': bpo-16039: CVE-2013-1752: Limit imaplib.IMAP4_SSL.readline() (GH-11120) https://github.com/python/cpython/commit/16d63202af35dadd652a5e3eae687ea709e95b11 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 06:06:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 11:06:12 +0000 Subject: [issue16039] imaplib: unlimited readline() from connection In-Reply-To: <1348569370.53.0.568109495954.issue16039@psf.upfronthosting.co.za> Message-ID: <1544612772.78.0.702299269573.issue16039@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 16d63202af35dadd652a5e3eae687ea709e95b11 by Victor Stinner in branch '2.7': bpo-16039: CVE-2013-1752: Limit imaplib.IMAP4_SSL.readline() (GH-11120) https://github.com/python/cpython/commit/16d63202af35dadd652a5e3eae687ea709e95b11 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 07:42:37 2018 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 12 Dec 2018 12:42:37 +0000 Subject: [issue35470] A deadly decref in _PyImport_FindExtensionObjectEx() Message-ID: <1544618557.73.0.788709270274.issue35470@psf.upfronthosting.co.za> New submission from Zackery Spytz : In _PyImport_FindExtensionObjectEx(), "mod" shouldn't be decrefed if _PyState_AddModule() fails. ---------- components: Interpreter Core messages: 331693 nosy: ZackerySpytz priority: normal severity: normal status: open title: A deadly decref in _PyImport_FindExtensionObjectEx() versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 07:44:40 2018 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 12 Dec 2018 12:44:40 +0000 Subject: [issue35470] A deadly decref in _PyImport_FindExtensionObjectEx() In-Reply-To: <1544618557.73.0.788709270274.issue35470@psf.upfronthosting.co.za> Message-ID: <1544618680.39.0.788709270274.issue35470@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +10359 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 07:46:58 2018 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 12 Dec 2018 12:46:58 +0000 Subject: [issue33106] Deleting a key in a read-only gdbm results in KeyError, not gdbm.error In-Reply-To: <1521495851.1.0.467229070634.issue33106@psf.upfronthosting.co.za> Message-ID: <1544618818.67.0.788709270274.issue33106@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 4fb0b8bc25c52aae8dcb4353e69c1c88999a9a53 by Xiang Zhang in branch 'master': bpo-33106: change dbm key deletion error for readonly file from KeyError to dbm.error (#6295) https://github.com/python/cpython/commit/4fb0b8bc25c52aae8dcb4353e69c1c88999a9a53 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 08:05:50 2018 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 12 Dec 2018 13:05:50 +0000 Subject: [issue33106] Deleting a key in a read-only gdbm results in KeyError, not gdbm.error In-Reply-To: <1521495851.1.0.467229070634.issue33106@psf.upfronthosting.co.za> Message-ID: <1544619950.15.0.788709270274.issue33106@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 08:35:29 2018 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 12 Dec 2018 13:35:29 +0000 Subject: [issue35470] A deadly decref in _PyImport_FindExtensionObjectEx() In-Reply-To: <1544618557.73.0.788709270274.issue35470@psf.upfronthosting.co.za> Message-ID: <1544621729.83.0.788709270274.issue35470@psf.upfronthosting.co.za> Xiang Zhang added the comment: What about version 3.6? ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 10:05:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 15:05:33 +0000 Subject: [issue15626] unittest.main negates -bb option and programmatic warning configuration In-Reply-To: <1344730376.57.0.519562827761.issue15626@psf.upfronthosting.co.za> Message-ID: <1544627133.26.0.788709270274.issue15626@psf.upfronthosting.co.za> STINNER Victor added the comment: > Something was changed in 3.7 Yeah, Python 3.7 handles warning options differently: there is the PEP 565 and this commit: commit 747f48e2e92390c44c72f52a1239959601cde157 Author: Victor Stinner Date: Tue Dec 12 22:59:48 2017 +0100 bpo-32230: Set sys.warnoptions with -X dev (#4820) Rather than supporting dev mode directly in the warnings module, this instead adjusts the initialisation code to add an extra 'default' entry to sys.warnoptions when dev mode is enabled. This ensures that dev mode behaves *exactly* as if `-Wdefault` had been passed on the command line, including in the way it interacts with `sys.warnoptions`, and with other command line flags like `-bb`. Fix also bpo-20361: have -b & -bb options take precedence over any other warnings options. Patch written by Nick Coghlan, with minor modifications of Victor Stinner. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 10:06:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 15:06:55 +0000 Subject: [issue20118] test_imaplib test_linetoolong fails on 2.7 in SSL test on some buildbots In-Reply-To: <1388787779.06.0.335033013809.issue20118@psf.upfronthosting.co.za> Message-ID: <1544627215.51.0.788709270274.issue20118@psf.upfronthosting.co.za> STINNER Victor added the comment: The issue should now be fixed. I will reopen it if the test starts failing on a CI. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 10:10:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 15:10:20 +0000 Subject: [issue16039] imaplib: unlimited readline() from connection In-Reply-To: <1348569370.53.0.568109495954.issue16039@psf.upfronthosting.co.za> Message-ID: <1544627420.51.0.788709270274.issue16039@psf.upfronthosting.co.za> STINNER Victor added the comment: I added imaplib.IMAP4_SSL.readline() to my python-security website: https://python-security.readthedocs.io/vuln/cve-2013-1752_cve-2013-1752_limit_imaplib.imap4_ssl.readline.html I'm now waiting for a Python 2.7.16 release. ---------- priority: release blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 10:22:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 15:22:57 +0000 Subject: [issue35471] Remove macpath module Message-ID: <1544628177.37.0.788709270274.issue35471@psf.upfronthosting.co.za> New submission from STINNER Victor : The module 'macpath' has been deprecated in Python 3.7 by bpo-9850 and scheduled for removal in Python 3.8. Attached PR removes the module. ---------- components: Library (Lib) messages: 331699 nosy: vstinner priority: normal severity: normal status: open title: Remove macpath module versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 10:26:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 15:26:53 +0000 Subject: [issue35471] Remove macpath module In-Reply-To: <1544628177.37.0.788709270274.issue35471@psf.upfronthosting.co.za> Message-ID: <1544628413.03.0.788709270274.issue35471@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10360 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 10:28:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 15:28:10 +0000 Subject: [issue35471] Remove macpath module In-Reply-To: <1544628177.37.0.788709270274.issue35471@psf.upfronthosting.co.za> Message-ID: <1544628490.26.0.788709270274.issue35471@psf.upfronthosting.co.za> STINNER Victor added the comment: According to the PEP 11, MacOS 9 support has been dropped in Python 2.4 (released in 2004: 14 years ago!). So I think that it's now ok to remove the macpath module, especially because it's deprecated since Python 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 10:31:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 15:31:19 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1544628679.21.0.788709270274.issue9850@psf.upfronthosting.co.za> STINNER Victor added the comment: I created bpo-35471: "Remove macpath module". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:00:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 16:00:08 +0000 Subject: [issue35471] Remove macpath module In-Reply-To: <1544628177.37.0.788709270274.issue35471@psf.upfronthosting.co.za> Message-ID: <1544630408.27.0.788709270274.issue35471@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +macOS nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:01:14 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 12 Dec 2018 16:01:14 +0000 Subject: [issue35471] Remove macpath module In-Reply-To: <1544628177.37.0.788709270274.issue35471@psf.upfronthosting.co.za> Message-ID: <1544630474.71.0.788709270274.issue35471@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm in favour of removing macpath. I was against removing the module in the past because parts of the macOS API still used (on probably still use) classic MacOS style paths. Most if not all APIs are by this time deprecated, which makes it less and less like that anyone will use macpath going forward. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:04:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 16:04:17 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1544630657.78.0.788709270274.issue34172@psf.upfronthosting.co.za> STINNER Victor added the comment: The new test_del_pool() test of the fix failed on a buildbot: bpo-35413 "test_multiprocessing_fork: test_del_pool() leaks dangling threads and processes on AMD64 FreeBSD CURRENT Shared 3.x". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:04:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 16:04:20 +0000 Subject: [issue35413] test_multiprocessing_fork: test_del_pool() leaks dangling threads and processes on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1543973756.35.0.788709270274.issue35413@psf.upfronthosting.co.za> Message-ID: <1544630660.66.0.788709270274.issue35413@psf.upfronthosting.co.za> STINNER Victor added the comment: I reverted the change which addd test_del_pool(): https://bugs.python.org/issue34172#msg331198 So this issue can be fixed. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:08:34 2018 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 12 Dec 2018 16:08:34 +0000 Subject: [issue13369] timeout with exit code 0 while re-running failed tests In-Reply-To: <1320746276.61.0.134506088825.issue13369@psf.upfronthosting.co.za> Message-ID: <1544630914.6.0.788709270274.issue13369@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:09:05 2018 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 12 Dec 2018 16:09:05 +0000 Subject: [issue8314] test_ctypes fails in test_ulonglong on sparc buildbots In-Reply-To: <1270469885.55.0.752027246289.issue8314@psf.upfronthosting.co.za> Message-ID: <1544630945.44.0.788709270274.issue8314@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:09:34 2018 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 12 Dec 2018 16:09:34 +0000 Subject: [issue2661] Mapping tests cannot be passed by user implementations In-Reply-To: <1208642973.7.0.825847798287.issue2661@psf.upfronthosting.co.za> Message-ID: <1544630974.47.0.788709270274.issue2661@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:09:57 2018 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 12 Dec 2018 16:09:57 +0000 Subject: [issue14143] test_ntpath failure on Windows In-Reply-To: <1330369660.88.0.127957807148.issue14143@psf.upfronthosting.co.za> Message-ID: <1544630997.61.0.788709270274.issue14143@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:10:22 2018 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 12 Dec 2018 16:10:22 +0000 Subject: [issue11955] 3.3 : test_argparse.py fails 'make test' In-Reply-To: <1304093741.94.0.09129303291.issue11955@psf.upfronthosting.co.za> Message-ID: <1544631022.51.0.788709270274.issue11955@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:11:09 2018 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 12 Dec 2018 16:11:09 +0000 Subject: [issue15626] unittest.main negates -bb option and programmatic warning configuration In-Reply-To: <1344730376.57.0.519562827761.issue15626@psf.upfronthosting.co.za> Message-ID: <1544631069.75.0.788709270274.issue15626@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:11:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 16:11:53 +0000 Subject: [issue11955] 3.3 : test_argparse.py fails 'make test' In-Reply-To: <1304093741.94.0.09129303291.issue11955@psf.upfronthosting.co.za> Message-ID: <1544631113.38.0.788709270274.issue11955@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:12:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 16:12:12 +0000 Subject: [issue14143] test_ntpath failure on Windows In-Reply-To: <1330369660.88.0.127957807148.issue14143@psf.upfronthosting.co.za> Message-ID: <1544631132.89.0.788709270274.issue14143@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:12:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2018 16:12:53 +0000 Subject: [issue13369] timeout with exit code 0 while re-running failed tests In-Reply-To: <1320746276.61.0.134506088825.issue13369@psf.upfronthosting.co.za> Message-ID: <1544631173.7.0.788709270274.issue13369@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:29:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 16:29:27 +0000 Subject: [issue35267] reproducible deadlock with multiprocessing.Pool In-Reply-To: <1542416799.14.0.788709270274.issue35267@psf.upfronthosting.co.za> Message-ID: <1544632167.97.0.788709270274.issue35267@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:30:41 2018 From: report at bugs.python.org (Matthias Klose) Date: Wed, 12 Dec 2018 16:30:41 +0000 Subject: [issue35472] python 3.7.2 rc1 bumped the build requirements for no reason Message-ID: <1544632241.86.0.788709270274.issue35472@psf.upfronthosting.co.za> New submission from Matthias Klose : python 3.7.2 rc1 bumped the build requirements apparently for no reason, now requiring sphinx 1.7 instead of 1.6.x before. This is a major pain, if you want to provide the build including the documentation on a stable release. Pretty please can we avoid such version bumps on the branches? Plus the documentation seems to build fine with 1.6.7. ---------- assignee: docs at python components: Documentation keywords: 3.7regression messages: 331705 nosy: docs at python, doko, ned.deily priority: release blocker severity: normal status: open title: python 3.7.2 rc1 bumped the build requirements for no reason versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:31:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 16:31:24 +0000 Subject: [issue35471] Remove macpath module In-Reply-To: <1544628177.37.0.788709270274.issue35471@psf.upfronthosting.co.za> Message-ID: <1544632284.12.0.788709270274.issue35471@psf.upfronthosting.co.za> STINNER Victor added the comment: > I was against removing the module in the past because parts of the macOS API still used (on probably still use) classic MacOS style paths. Most if not all APIs are by this time deprecated, which makes it less and less like that anyone will use macpath going forward. bpo-9850 has a scary title: "obsolete macpath module dangerously broken and should be removed". Extract: "Even if one did have a need to use the obsolete old-style paths, the macpath module is currently practically unusable for anything other than simple character manipulations of the path. Nearly all of the functions that actually call OS routines are broken in one or more ways." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:32:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 16:32:18 +0000 Subject: [issue35472] python 3.7.2 rc1 bumped the build requirements for no reason In-Reply-To: <1544632241.86.0.788709270274.issue35472@psf.upfronthosting.co.za> Message-ID: <1544632338.78.0.788709270274.issue35472@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:35:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 16:35:30 +0000 Subject: [issue35472] python 3.7.2 rc1 bumped the build requirements for no reason In-Reply-To: <1544632241.86.0.788709270274.issue35472@psf.upfronthosting.co.za> Message-ID: <1544632530.17.0.788709270274.issue35472@psf.upfronthosting.co.za> STINNER Victor added the comment: "for no reason" I guess that it's related to this change: commit c03bf0ae794c3bec9b56f38164535fd1f5bfc04a Author: Adrian Liaw Date: Mon Nov 5 05:04:51 2018 +0800 Doc: Disable smartquotes for zh-tw, zh-cn, fr and ja translations (GH-9423) Extract: diff --git a/Doc/conf.py b/Doc/conf.py index 6060ac176c..eb57ee0c93 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -41,13 +41,18 @@ today_fmt = '%B %d, %Y' # By default, highlight as Python 3. highlight_language = 'python3' -# Require Sphinx 1.2 for build. -needs_sphinx = '1.2' +# Require Sphinx 1.7 for build. +needs_sphinx = '1.7' # Ignore any .rst files in the venv/ directory. venvdir = os.getenv('VENVDIR', 'venv') exclude_patterns = [venvdir+'/*', 'README.rst'] +# Disable Docutils smartquotes for several translations +smartquotes_excludes = { + 'languages': ['ja', 'fr', 'zh_TW', 'zh_CN'], 'builders': ['man', 'text'], +} + According to Sphinx changelog, smartquotes_excludes is a new feature of Sphinx 1.6.6: https://www.sphinx-doc.org/en/master/changes.html#release-1-6-6-released-jan-08-2018 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:43:30 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 12 Dec 2018 16:43:30 +0000 Subject: [issue35465] Document add_signal_handler In-Reply-To: <1544556093.28.0.788709270274.issue35465@psf.upfronthosting.co.za> Message-ID: <1544633010.03.0.788709270274.issue35465@psf.upfronthosting.co.za> Andrew Svetlov added the comment: The proposal sounds great! Would you prepare a pull request for docs update? ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:48:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 16:48:12 +0000 Subject: [issue35346] Modernize Lib/platform.py code In-Reply-To: <1543455759.08.0.788709270274.issue35346@psf.upfronthosting.co.za> Message-ID: <1544633292.42.0.788709270274.issue35346@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b0e0877629e3df4bc3042fd424e96f197b2e9fa4 by Victor Stinner in branch 'master': bpo-35346: Drop Mac OS 9 support from platform (GH-10959) https://github.com/python/cpython/commit/b0e0877629e3df4bc3042fd424e96f197b2e9fa4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:55:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 16:55:05 +0000 Subject: [issue35346] Modernize Lib/platform.py code In-Reply-To: <1543455759.08.0.788709270274.issue35346@psf.upfronthosting.co.za> Message-ID: <1544633705.5.0.788709270274.issue35346@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10361 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:57:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 16:57:36 +0000 Subject: [issue35346] Modernize Lib/platform.py code In-Reply-To: <1543455759.08.0.788709270274.issue35346@psf.upfronthosting.co.za> Message-ID: <1544633856.03.0.788709270274.issue35346@psf.upfronthosting.co.za> STINNER Victor added the comment: > Top-imported warnings is not used. Fixed by commit b8e689a6e8134e88f857a55e50b6a4977967e385. > struct.calcsize('P') is always success. I wrote PR 11130 for that. Note: struct.calcsize('P') always works on Python 2.7 as well. > plistlib is always available. I don't know this module. This module imports many other modules like xml.parsers.expat. I don't think that the try/except ImportError hurts. Feel free to propose a PR if you want. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 12:10:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 17:10:01 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1544634601.09.0.788709270274.issue35412@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10362 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 12:17:07 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 12 Dec 2018 17:17:07 +0000 Subject: [issue35472] python 3.7.2 rc1 bumped the build requirements for no reason In-Reply-To: <1544632241.86.0.788709270274.issue35472@psf.upfronthosting.co.za> Message-ID: <1544635027.28.0.788709270274.issue35472@psf.upfronthosting.co.za> Ned Deily added the comment: Julien can give the definite answer. But, sorry, I don't see this as a release blocker. We've had to bump Sphinx versions for a number of reasons as the documentation has become more sophisticated between cycles and over a release cycle. In fact, we're now using 1.8.2 for release builds. And it shouldn't be an issue at all if one uses the doc Makefile venv target: make venv make html ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 12:22:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 17:22:01 +0000 Subject: [issue34279] RFC: issue a warning in regrtest when no tests have been executed? In-Reply-To: <1532947707.98.0.56676864532.issue34279@psf.upfronthosting.co.za> Message-ID: <1544635321.73.0.788709270274.issue34279@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10363 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 12:22:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 17:22:01 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1544635321.89.0.663665092547.issue35412@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10364 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 12:38:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 17:38:38 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1544636318.53.0.788709270274.issue35412@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 502fe19b10f66235fcf8f13fc1c0308190845def by Victor Stinner in branch 'master': bpo-35412: Add testcase to test_future4 (GH-11131) https://github.com/python/cpython/commit/502fe19b10f66235fcf8f13fc1c0308190845def ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 12:50:27 2018 From: report at bugs.python.org (jamie schnaitter) Date: Wed, 12 Dec 2018 17:50:27 +0000 Subject: [issue35473] Intel compiler (icc) does not fully support C11 Features, including atomics Message-ID: <1544637027.92.0.788709270274.issue35473@psf.upfronthosting.co.za> New submission from jamie schnaitter : I am currently trying to build 3.6.7 and 3.7.1 using Intel 2019 and it is failing because Intel's implementation of C11, in particular stdatomic, is incomplete. I receive many errors similar to the following, when it cannot find 'atomic_uintptr_t', which is not including in Intel's implementation: ``` In file included from ./Include/Python.h(56), from ./Modules/_io/bufferedio.c(11): ./Include/pyatomic.h(33): error: identifier "atomic_uintptr_t" is undefined atomic_uintptr_t _value; ``` The current check in configure.ac is insufficient, as it only checks to see that the header and library exist and that it contains 'atomic_int'. The configure.ac should be changed to either check for all the atomic types it uses (or at least atomic_uintprt_t) or, when `--with-icc` is enabled, it should set 'HAVE_STD_ATOMIC' to 0/false. ---------- components: Build, Installation, Library (Lib), ctypes messages: 331713 nosy: jamie schnaitter priority: normal severity: normal status: open title: Intel compiler (icc) does not fully support C11 Features, including atomics type: compile error versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 13:58:48 2018 From: report at bugs.python.org (Elliot Edmunds) Date: Wed, 12 Dec 2018 18:58:48 +0000 Subject: [issue24053] Define EXIT_SUCCESS and EXIT_FAILURE constants in sys In-Reply-To: <1429890469.94.0.27310602141.issue24053@psf.upfronthosting.co.za> Message-ID: <1544641128.34.0.788709270274.issue24053@psf.upfronthosting.co.za> Elliot Edmunds added the comment: I have personally come across situations where I am calling a Python script from a C program and would like to check the exit codes of the script, and have had to write sys.exit(1) and sys.exit(0) in Python, and compared them to EXIT_SUCCESS/EXIT_FAILURE in C. It would have been easy to introduce a bug where I returned the wrong exit code, so I was hoping they would have been implemented in sys. It seems like a no-brainer to add these, they reduce magic number use and improve the accessibility of Python to people coming from C. I would love to add these if everyone is OK with it. ---------- nosy: +Elliot Edmunds versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 14:06:57 2018 From: report at bugs.python.org (Ryan McCampbell) Date: Wed, 12 Dec 2018 19:06:57 +0000 Subject: [issue35474] mimetypes.guess_all_extensions potentially mutates list Message-ID: <1544641617.77.0.788709270274.issue35474@psf.upfronthosting.co.za> New submission from Ryan McCampbell : The mimetypes.guess_all_extensions function is defined as: def guess_all_extensions(self, type, strict=True): type = type.lower() extensions = self.types_map_inv[True].get(type, []) if not strict: for ext in self.types_map_inv[False].get(type, []): if ext not in extensions: extensions.append(ext) return extensions If any mime type exists in both the strict and non-strict types_map_inv and it is called with strict=False, then it will modify the strict list in-place which effects future calls even with strict=True. While this doesn't manifest as an error for me because the dictionaries are non-overlapping, it is a potential error; it is also vulnerable to people accidentally modifying the returned list. The list should be copied after the first lookup. ---------- components: Library (Lib) messages: 331715 nosy: rmccampbell7 priority: normal severity: normal status: open title: mimetypes.guess_all_extensions potentially mutates list type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 14:11:41 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 12 Dec 2018 19:11:41 +0000 Subject: [issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference. Message-ID: <1544641901.4.0.788709270274.issue35475@psf.upfronthosting.co.za> New submission from Eric Snow : In the C-API documentation the entry for PyImport_AddModuleObject[1] does not indicate that it returns a borrowed reference. [1] https://docs.python.org/3/c-api/import.html#c.PyImport_AddModuleObject ---------- assignee: docs at python components: Documentation keywords: easy messages: 331716 nosy: docs at python, eric.snow priority: normal severity: normal stage: needs patch status: open title: Docs do not show PyImport_AddModuleObject() returns a borrowed reference. type: enhancement versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 14:21:19 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 12 Dec 2018 19:21:19 +0000 Subject: [issue35476] _imp_create_dynamic_impl() does not clear error. Message-ID: <1544642479.77.0.788709270274.issue35476@psf.upfronthosting.co.za> New submission from Eric Snow : In _imp_create_dynamic_impl() [1] the case where _PyImport_FindExtensionObject() returns NULL may leave an error set. Either the error should be raised (like _imp_create_builtin() does) or it should be cleared (via PyErr_Clear()). ---------- components: Interpreter Core messages: 331717 nosy: eric.snow priority: normal severity: normal stage: needs patch status: open title: _imp_create_dynamic_impl() does not clear error. type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 14:25:17 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 12 Dec 2018 19:25:17 +0000 Subject: [issue35470] A deadly decref in _PyImport_FindExtensionObjectEx() In-Reply-To: <1544618557.73.0.788709270274.issue35470@psf.upfronthosting.co.za> Message-ID: <1544642717.62.0.788709270274.issue35470@psf.upfronthosting.co.za> Change by Eric Snow : ---------- nosy: +eric.snow type: -> behavior versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 15:15:52 2018 From: report at bugs.python.org (Vladimir Matveev) Date: Wed, 12 Dec 2018 20:15:52 +0000 Subject: [issue35306] OSError [WinError 123] when testing if pathlib.Path('*') (asterisks) exists In-Reply-To: <1543038959.25.0.788709270274.issue35306@psf.upfronthosting.co.za> Message-ID: <1544645752.12.0.788709270274.issue35306@psf.upfronthosting.co.za> Change by Vladimir Matveev : ---------- keywords: +patch pull_requests: +10365 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 15:18:36 2018 From: report at bugs.python.org (Brett Cannon) Date: Wed, 12 Dec 2018 20:18:36 +0000 Subject: [issue35465] [asyncio] Document loop.add_signal_handler In-Reply-To: <1544556093.28.0.788709270274.issue35465@psf.upfronthosting.co.za> Message-ID: <1544645916.47.0.788709270274.issue35465@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- title: Document add_signal_handler -> [asyncio] Document loop.add_signal_handler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 15:26:54 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Dec 2018 20:26:54 +0000 Subject: [issue24053] Define EXIT_SUCCESS and EXIT_FAILURE constants in sys In-Reply-To: <1429890469.94.0.27310602141.issue24053@psf.upfronthosting.co.za> Message-ID: <1544646414.42.0.788709270274.issue24053@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: -terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 15:54:14 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 12 Dec 2018 20:54:14 +0000 Subject: [issue25430] speed up ipaddress __contain__ method In-Reply-To: <1445083038.14.0.911555841878.issue25430@psf.upfronthosting.co.za> Message-ID: <1544648054.56.0.788709270274.issue25430@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 15:57:26 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 12 Dec 2018 20:57:26 +0000 Subject: [issue35465] [asyncio] Document loop.add_signal_handler In-Reply-To: <1544556093.28.0.788709270274.issue35465@psf.upfronthosting.co.za> Message-ID: <1544648246.45.0.788709270274.issue35465@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- components: +asyncio nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 16:26:57 2018 From: report at bugs.python.org (Julien Palard) Date: Wed, 12 Dec 2018 21:26:57 +0000 Subject: [issue35472] python 3.7.2 rc1 bumped the build requirements for no reason In-Reply-To: <1544632241.86.0.788709270274.issue35472@psf.upfronthosting.co.za> Message-ID: <1544650017.25.0.788709270274.issue35472@psf.upfronthosting.co.za> Julien Palard added the comment: Hi Matthias, Sorry to hear it's a pain for you. Can you explain in more details what hurt your workflow? We bumped Sphinx, as Victor said, to fix rendering issues in those documentation translations: zh-tw, zh-cn, fr and ja, so it's not a feature or an ideology of "being up-to-date", we were fixing an issue in those 4 translations. Please also note that in the near future we'll probably stick to a fresh version of Sphinx as we're expecting other fixes or features to land, I don't have all of them in mind but at least: - https://github.com/sphinx-doc/sphinx/issues/5561 (release in 1.8.2) - https://github.com/sphinx-doc/sphinx/pull/5559 (to be released in 2.0.0) The colspan/rowspan thing is needed for the documentation of Python 3.8, so we'll have to bump to sphinx 2.0 for Python 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 18:08:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 23:08:12 +0000 Subject: [issue35477] multiprocessing.Pool.__enter__() should raise an exception if called twice Message-ID: <1544656092.37.0.788709270274.issue35477@psf.upfronthosting.co.za> New submission from STINNER Victor : On a file, "with file:" fails if it's used a second time: --- fp = open('/etc/issue') with fp: print("first") with fp: print("second") --- fails with "ValueError: I/O operation on closed file", because file.__enter__() raises this exception if the file is closed. I propose to have the same behavior on multiprocessing.Pool.__enter__() to detect when the multiprocessing API is misused. Anyway, after the first "with pool:" block, the pool becomes unusable to schedule now tasks: apply() raise ValueError("Pool not running") in that case for example. ---------- components: Library (Lib) messages: 331719 nosy: vstinner priority: normal severity: normal status: open title: multiprocessing.Pool.__enter__() should raise an exception if called twice versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 18:13:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 23:13:54 +0000 Subject: [issue35477] multiprocessing.Pool.__enter__() should raise an exception if called twice In-Reply-To: <1544656092.37.0.788709270274.issue35477@psf.upfronthosting.co.za> Message-ID: <1544656434.12.0.788709270274.issue35477@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10366 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 18:16:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Dec 2018 23:16:11 +0000 Subject: [issue35477] multiprocessing.Pool.__enter__() should raise an exception if called twice In-Reply-To: <1544656092.37.0.788709270274.issue35477@psf.upfronthosting.co.za> Message-ID: <1544656571.55.0.788709270274.issue35477@psf.upfronthosting.co.za> STINNER Victor added the comment: Currently, the error only occurs when apply() is called: --- import multiprocessing def the_test(): pool = multiprocessing.Pool(1) with pool: print(pool.apply(int, (2,))) with pool: print(pool.apply(int, (3,))) # <-- raise here the_test() --- I would prefer to get an error on at the second "with pool:" line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 18:30:35 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 12 Dec 2018 23:30:35 +0000 Subject: [issue31823] Opaque default value for close_fds argument in Popen.__init__ In-Reply-To: <1508445256.4.0.213398074469.issue31823@psf.upfronthosting.co.za> Message-ID: <1544657435.61.0.788709270274.issue31823@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Only if someone can point to a concrete problem to be fixed in the 3.7+ docs. Looking at all references to close_fds in https://docs.python.org/3/library/subprocess.html I don't see one. (I'm not going to touch the 3.6 docs) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 18:44:01 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Dec 2018 23:44:01 +0000 Subject: [issue35208] IDLE: Squeezed lines count ignores window width In-Reply-To: <1541834301.3.0.788709270274.issue35208@psf.upfronthosting.co.za> Message-ID: <1544658241.61.0.788709270274.issue35208@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Changing the width of the window changes the number of visible lines because of line wrapping. But it does not change the number of logical lines. My understanding is that squeezer currently reports the latter, and that is not necessarily a bug. Not that I am considering replacing line wrapping with a horizontal scrollbar. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 18:45:02 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 12 Dec 2018 23:45:02 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1544658302.55.0.788709270274.issue34977@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 Wed Dec 12 19:29:11 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 13 Dec 2018 00:29:11 +0000 Subject: [issue35467] IDLE: unrequested pasting into Shell after restart In-Reply-To: <1544581924.2.0.788709270274.issue35467@psf.upfronthosting.co.za> Message-ID: <1544660951.89.0.788709270274.issue35467@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I don't believe I've seen this happen, but I'll watch for it. One thing that I noticed while trying to recreate it is that I can press F5 on the Shell window even though there isn't a Run menu. Maybe the issue is somehow related using shortcuts that aren't defined for Shell. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 19:30:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Dec 2018 00:30:51 +0000 Subject: [issue35478] multiprocessing: ApplyResult.get() hangs if the pool is terminated Message-ID: <1544661051.76.0.788709270274.issue35478@psf.upfronthosting.co.za> New submission from STINNER Victor : The following code hangs: --- import multiprocessing, time pool = multiprocessing.Pool(1) result = pool.apply_async(time.sleep, (1.0,)) pool.terminate() result.get() --- pool.terminate() terminates workers before time.sleep(1.0) completes, but the pool doesn't mark result as completed with an error. Would it be possible to mark all pending tasks as failed? For example, "raise" a RuntimeError("pool terminated before task completed"). ---------- components: Library (Lib) messages: 331724 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: multiprocessing: ApplyResult.get() hangs if the pool is terminated versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 19:31:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Dec 2018 00:31:32 +0000 Subject: [issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects In-Reply-To: <1543769012.57.0.788709270274.issue35378@psf.upfronthosting.co.za> Message-ID: <1544661092.01.0.788709270274.issue35378@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-35478: multiprocessing: ApplyResult.get() hangs if the pool is terminated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 19:36:47 2018 From: report at bugs.python.org (Vladimir Matveev) Date: Thu, 13 Dec 2018 00:36:47 +0000 Subject: [issue23057] [Windows] asyncio: support signal handlers on Windows (feature request) In-Reply-To: <1418674256.87.0.827009141117.issue23057@psf.upfronthosting.co.za> Message-ID: <1544661407.7.0.788709270274.issue23057@psf.upfronthosting.co.za> Change by Vladimir Matveev : ---------- keywords: +patch pull_requests: +10367 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 19:36:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Dec 2018 00:36:54 +0000 Subject: [issue35479] multiprocessing.Pool.join() always takes at least 100 ms Message-ID: <1544661414.71.0.788709270274.issue35479@psf.upfronthosting.co.za> New submission from STINNER Victor : The join() method of multiprocessing.Pool calls self._worker_handler.join(): it's a thread running _handle_workers(). The core of this thread function is: while thread._state == RUN or (pool._cache and thread._state != TERMINATE): pool._maintain_pool() time.sleep(0.1) I understand that the delay of 100 ms is used to check regularly the stop condition changed. This sleep causes a mandatory delay of 100 ms on Pool.join(). ---------- components: Library (Lib) messages: 331726 nosy: vstinner priority: normal severity: normal status: open title: multiprocessing.Pool.join() always takes at least 100 ms versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 19:53:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Dec 2018 00:53:48 +0000 Subject: [issue35479] multiprocessing.Pool.join() always takes at least 100 ms In-Reply-To: <1544661414.71.0.788709270274.issue35479@psf.upfronthosting.co.za> Message-ID: <1544662428.48.0.788709270274.issue35479@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10368 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 19:53:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Dec 2018 00:53:48 +0000 Subject: [issue35478] multiprocessing: ApplyResult.get() hangs if the pool is terminated In-Reply-To: <1544661051.76.0.788709270274.issue35478@psf.upfronthosting.co.za> Message-ID: <1544662428.52.0.663665092547.issue35478@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10369 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 20:14:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Dec 2018 01:14:17 +0000 Subject: [issue35479] multiprocessing.Pool.join() always takes at least 100 ms In-Reply-To: <1544661414.71.0.788709270274.issue35479@psf.upfronthosting.co.za> Message-ID: <1544663657.8.0.788709270274.issue35479@psf.upfronthosting.co.za> STINNER Victor added the comment: Attached PR 11136 modify _worker_handler() loop to wait on threading.Event events, so Pool.join() completes as soon as possible. Example: --- import multiprocessing import time def the_test(): start_time = time.monotonic() pool = multiprocessing.Pool(1) res = pool.apply_async(int, ("1",)) pool.close() #pool.terminate() pool.join() dt = time.monotonic() - start_time print("%.3f sec" % dt) the_test() --- Minimum timing with _handle_results() using: * current code (time.sleep(0.1)): min 0.132 sec * time.sleep(1.0): min 1.033 sec * my PR using events (wait(0.1)): min 0.033 sec Currently, join() minimum timing depends on _handle_results() sleep() duration (100 ms). With my PR, it completes as soon as possible: when state change and/or when a result is set. My PR still requires an hardcoded delay of 100 ms to workaround bpo-35478 bug: results are never set if the pool is terminated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 20:15:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Dec 2018 01:15:34 +0000 Subject: [issue35477] multiprocessing.Pool.__enter__() should raise an exception if called twice In-Reply-To: <1544656092.37.0.788709270274.issue35477@psf.upfronthosting.co.za> Message-ID: <1544663734.04.0.788709270274.issue35477@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 08c2ba0717089662132af69bf5948d82277a8a69 by Victor Stinner in branch 'master': bpo-35477: multiprocessing.Pool.__enter__() fails if called twice (GH-11134) https://github.com/python/cpython/commit/08c2ba0717089662132af69bf5948d82277a8a69 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 20:15:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Dec 2018 01:15:47 +0000 Subject: [issue35477] multiprocessing.Pool.__enter__() should raise an exception if called twice In-Reply-To: <1544656092.37.0.788709270274.issue35477@psf.upfronthosting.co.za> Message-ID: <1544663747.51.0.788709270274.issue35477@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 Wed Dec 12 20:41:50 2018 From: report at bugs.python.org (Victor Porton) Date: Thu, 13 Dec 2018 01:41:50 +0000 Subject: [issue9334] argparse: add a full fledged parser as a subparser In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1544665310.2.0.788709270274.issue9334@psf.upfronthosting.co.za> Victor Porton added the comment: Subparsers are added like: subparsers.add_parser('checkout', aliases=['co']) But I want to use a parser BOTH as a subparser and as a full-fledged parser. It is because my program should understand both of the following command line options: boiler chain -t http://www.w3.org/1999/xhtml -W inverseofsum and boiler pipe 'chain -t http://www.w3.org/1999/xhtml -W inverseofsum + transformation http://example.com/ns1'. I split it (at +) into several lists of arguments as explained in https://stackoverflow.com/a/53750697/856090 So I need `chain` both as a subparser and as a standalone parser of `-t http://www.w3.org/1999/xhtml -W inverseofsum`. So, feature which I want: subparsers.add_parser('checkout', aliases=['co'], parser=...) where ... is a reference to a parser object. ---------- nosy: +porton title: argparse does not accept options taking arguments beginning with dash (regression from optparse) -> argparse: add a full fledged parser as a subparser versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 20:44:37 2018 From: report at bugs.python.org (Victor Porton) Date: Thu, 13 Dec 2018 01:44:37 +0000 Subject: [issue35480] argparse: add a full fledged parser as a subparser Message-ID: <1544665477.58.0.788709270274.issue35480@psf.upfronthosting.co.za> New submission from Victor Porton : Subparsers are added like: subparsers.add_parser('checkout', aliases=['co']) But I want to use a parser BOTH as a subparser and as a full-fledged parser. It is because my program should understand both of the following command line options: boiler chain -t http://www.w3.org/1999/xhtml -W inverseofsum and boiler pipe 'chain -t http://www.w3.org/1999/xhtml -W inverseofsum + transformation http://example.com/ns1'. I split it (at +) into several lists of arguments as explained in https://stackoverflow.com/a/53750697/856090 So I need `chain` both as a subparser and as a standalone parser of `-t http://www.w3.org/1999/xhtml -W inverseofsum`. So, feature which I want: subparsers.add_parser('checkout', aliases=['co'], parser=...) where ... is a reference to a parser object. ---------- components: Library (Lib) messages: 331730 nosy: porton priority: normal severity: normal status: open title: argparse: add a full fledged parser as a subparser type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 20:46:21 2018 From: report at bugs.python.org (Victor Porton) Date: Thu, 13 Dec 2018 01:46:21 +0000 Subject: [issue35442] Chain of several subcommands in argparse In-Reply-To: <1544306329.79.0.788709270274.issue35442@psf.upfronthosting.co.za> Message-ID: <1544665581.28.0.788709270274.issue35442@psf.upfronthosting.co.za> Victor Porton added the comment: One of possible solutions: https://bugs.python.org/issue35480 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 20:50:04 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 13 Dec 2018 01:50:04 +0000 Subject: [issue9334] argparse: add a full fledged parser as a subparser In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1544665804.39.0.788709270274.issue9334@psf.upfronthosting.co.za> Eric V. Smith added the comment: Why the title change? The original problem still exists, and I don't see how it's related to subparsers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 20:59:53 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Dec 2018 01:59:53 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1544666393.95.0.788709270274.issue33725@psf.upfronthosting.co.za> Ned Deily added the comment: > Would it be safe to run the multiprocessing tests on recent macOS with the OBJC_DISABLE_INITIALIZE_FORK_SAFETY environment variable set? See Ronald's reply above in msg331101. I believe his point is that there is nothing you can do to make this safe. And it's not a new problem with 10.14 or 10.13. What is new is that Apple is trying to more forcefully make you aware of the danger by causing the runtime to try to catch and crash these cases earlier rather than permit them to perhaps silently cause failures later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 21:01:13 2018 From: report at bugs.python.org (Victor Porton) Date: Thu, 13 Dec 2018 02:01:13 +0000 Subject: [issue35480] argparse: add a full fledged parser as a subparser In-Reply-To: <1544665477.58.0.788709270274.issue35480@psf.upfronthosting.co.za> Message-ID: <1544666473.52.0.788709270274.issue35480@psf.upfronthosting.co.za> Victor Porton added the comment: Oh, I noticed I can do my_subparser = subparsers.add_parser('checkout', aliases=['co']) So resolution invalid. ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 21:24:44 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 13 Dec 2018 02:24:44 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1544666393.95.0.788709270274.issue33725@psf.upfronthosting.co.za> Message-ID: Barry A. Warsaw added the comment: On Dec 12, 2018, at 17:59, Ned Deily wrote: > > Ned Deily added the comment: > >> Would it be safe to run the multiprocessing tests on recent macOS with the OBJC_DISABLE_INITIALIZE_FORK_SAFETY environment variable set? > > See Ronald's reply above in msg331101. I believe his point is that there is nothing you can do to make this safe. And it's not a new problem with 10.14 or 10.13. What is new is that Apple is trying to more forcefully make you aware of the danger by causing the runtime to try to catch and crash these cases earlier rather than permit them to perhaps silently cause failures later. In my experiments at least, setting the env var *does* prevent the crash, but it doesn?t avoid the undefined semantics (i.e. what happens when the ObjC runtime is called at that point?) and I fully expect that Apple will remove that bandaid at some point. The other key thing is that I don?t believe you can set the env var *in process* and have it take effect after the fork. It must be set before the parent process starts. So that probably makes it less useful for the multiprocessing tests by itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 21:28:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Dec 2018 02:28:44 +0000 Subject: [issue35478] multiprocessing: ApplyResult.get() hangs if the pool is terminated In-Reply-To: <1544661051.76.0.788709270274.issue35478@psf.upfronthosting.co.za> Message-ID: <1544668124.48.0.788709270274.issue35478@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10370 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 21:57:54 2018 From: report at bugs.python.org (Anders Kaseorg) Date: Thu, 13 Dec 2018 02:57:54 +0000 Subject: [issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse) In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1544669874.31.0.788709270274.issue9334@psf.upfronthosting.co.za> Anders Kaseorg added the comment: porton: Please don?t steal someone else?s issue to report a different bug. Open a new issue instead. ---------- title: argparse: add a full fledged parser as a subparser -> argparse does not accept options taking arguments beginning with dash (regression from optparse) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 22:30:12 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Dec 2018 03:30:12 +0000 Subject: [issue35467] IDLE: unrequested pasting into Shell after restart In-Reply-To: <1544581924.2.0.788709270274.issue35467@psf.upfronthosting.co.za> Message-ID: <1544671812.72.0.788709270274.issue35467@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thank you for the report. Since I expect you would recognize the issue if you had seen it, I consider it possible that linux IDLE is immune. After running a file, I would like f5 to re-run the same file. Trying to run the contents of Shell, starting with the start-up message, is laughably useless. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 22:41:01 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 13 Dec 2018 03:41:01 +0000 Subject: [issue35467] IDLE: unrequested pasting into Shell after restart In-Reply-To: <1544581924.2.0.788709270274.issue35467@psf.upfronthosting.co.za> Message-ID: <1544672461.14.0.788709270274.issue35467@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, I have this problem every day. Am running on macOS. This behavior has been seen for years and still persists on the latest IDLE that ships with a stock 3.7.1 from python.org. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 22:57:12 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 13 Dec 2018 03:57:12 +0000 Subject: [issue35292] Make SimpleHTTPRequestHandler load mimetypes lazily In-Reply-To: <1542822100.42.0.788709270274.issue35292@psf.upfronthosting.co.za> Message-ID: <1544673432.72.0.788709270274.issue35292@psf.upfronthosting.co.za> Steve Dower added the comment: I have another idea - what if we checked self.extensions_map for overrides but otherwise just called mimetypes.guess_type(path) in the guess_type method? That would be the same behaviour as initializing it lazily, but we don't have to worry about initializing at all, since guess_type() will do it. I also did a bit of a GitHub search (which I generally criticize, but it's a pretty good way to evaluate whether something is in _common_ use). Mostly it looks like code will be unaffected by this change - people set values in extensions_map, but don't expect to be able to read global values out of it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 23:06:00 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Dec 2018 04:06:00 +0000 Subject: [issue34864] In Idle, Mac tabs make editor status line disappear. In-Reply-To: <1538422572.97.0.545547206417.issue34864@psf.upfronthosting.co.za> Message-ID: <1544673960.15.0.788709270274.issue34864@psf.upfronthosting.co.za> Ned Deily added the comment: FWIW: I did a quick check of the 3.7.2rc1 IDLE, that now has Tk 8.6.9.1, with the "prefer tabs" setting on. The newly added check in IDLE does work as designed but it also looked like the original problem has been fixed in Tk, that is, the co-ordinates did seem to show up in the tabs. It's probably fine to leave things as they are but I mention it in case anyone wants to revisit this :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 00:37:30 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Dec 2018 05:37:30 +0000 Subject: [issue35467] IDLE: unrequested pasting into Shell after restart In-Reply-To: <1544581924.2.0.788709270274.issue35467@psf.upfronthosting.co.za> Message-ID: <1544679450.56.0.788709270274.issue35467@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Raymond: I agree that daily would be obnoxious. For me it is more like once a month or maybe less. Can you give any detail about the factors I mentioned? I currently have no idea where to start looking. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 00:43:09 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Dec 2018 05:43:09 +0000 Subject: [issue35208] IDLE: Squeezed lines count ignores window width In-Reply-To: <1541834301.3.0.788709270274.issue35208@psf.upfronthosting.co.za> Message-ID: <1544679789.22.0.788709270274.issue35208@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Note that I *am* considering ... It seems that a reasonable rule might be to squeeze if n lines or the equivalent of n full lines (75 chars each) in total characters. In other words, if lines >= N or chars >= to 75*N: squeeze(). Do we have a rule not to squeeze fewer but longer lines? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 00:58:18 2018 From: report at bugs.python.org (Tim Peters) Date: Thu, 13 Dec 2018 05:58:18 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544680698.1.0.788709270274.issue35431@psf.upfronthosting.co.za> Tim Peters added the comment: My two cents: - Spell it comb(n, k). - TypeError if args aren't ints. - ValueError if not 0 <= k <= n. Not concerned about speed. It's possible to do this with no divisions involving integers bigger than `n` and `k`(*), using O(k) space, but for "practical" arguments I bet that's slower than the dumbest possible loop. (*) Sketch: make lists of the k numerators and k-1 denominators (skip 1). For each prime P <= k, a modulus operation can determine the index of the first multiple of P in each list. For that, and for each P'th later list element, divide out the multiples of P, adding 1 to a running count for numerators, subtracting 1 for denominators, and reducing each list element by the Ps divided out. Then if the final P count isn't 0 (it will always be >= 0), append pow(P, count) to a list of factors. pow() is efficient. After that, all the denominators will be reduced to 1, so can be ignored thereafter. It just remains to multiply all the reduced numerators and prime-power factors. Catenate them all in a single list, heapify it (min heap), and so long as at least 2 factors remain pop the two smallest and push their product. This attempts to balance bit lengths of incoming factors, allowing close-to-best-case-for-it Karatsuba multiplication to kick in. But that's nuts ;-) To get even nutsier, special-case P=2 to use shifts instead, skip adding pow(2, count) to the list of factors, and just shift left by the count at the end. That said, even the "dumbest possible loop" may benefit in C by shifting out all trailing zeroes, multiplying/dividing only odd integers, and shifting left at the end. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 02:00:38 2018 From: report at bugs.python.org (Vladimir Matveev) Date: Thu, 13 Dec 2018 07:00:38 +0000 Subject: [issue31446] _winapi.CreateProcess (used by subprocess) is not thread-safe In-Reply-To: <1505296743.29.0.309150843514.issue31446@psf.upfronthosting.co.za> Message-ID: <1544684438.49.0.788709270274.issue31446@psf.upfronthosting.co.za> Change by Vladimir Matveev : ---------- keywords: +patch pull_requests: +10371 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 02:13:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Dec 2018 07:13:15 +0000 Subject: [issue35459] Use PyDict_GetItemWithError() instead of PyDict_GetItem() In-Reply-To: <1544525657.6.0.788709270274.issue35459@psf.upfronthosting.co.za> Message-ID: <1544685195.88.0.788709270274.issue35459@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Most of changes are straightforward. Just replaced PyDict_GetItem*() with PyDict_GetItem*WithError() and added the check for PyErr_Occurred(). PyDict_GetItemString() with constant argument was replaced with _PyDict_GetItemIdWithError() for performance. Some code was left unchanged. This was mostly in files where errors are very and error checking is not performed or errors are silenced in any case (Python/compile.c, Python/symtable.c, Objects/structseq.c, etc). These cases needed separate issues. The most non-trivial change is in Objects/typeobject.c. The check for duplicated descriptors (in add_methods(), add_members() and add_getset()) was moved after creating the descriptor object. This improves performance by avoiding to create a temporary string objects. Duplicate descriptor names is a very uncommon case -- there were only two cases in the stdlib (besides tests), and one of them already is fixed (PR 11053). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 02:39:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Dec 2018 07:39:11 +0000 Subject: [issue35461] Document C API functions which swallow exceptions In-Reply-To: <1544534848.15.0.788709270274.issue35461@psf.upfronthosting.co.za> Message-ID: <1544686751.78.0.788709270274.issue35461@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 02:39:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Dec 2018 07:39:36 +0000 Subject: [issue35459] Use PyDict_GetItemWithError() instead of PyDict_GetItem() In-Reply-To: <1544525657.6.0.788709270274.issue35459@psf.upfronthosting.co.za> Message-ID: <1544686776.05.0.788709270274.issue35459@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +eric.snow, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 02:51:23 2018 From: report at bugs.python.org (Aaqa Ishtyaq) Date: Thu, 13 Dec 2018 07:51:23 +0000 Subject: [issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference. In-Reply-To: <1544641901.4.0.788709270274.issue35475@psf.upfronthosting.co.za> Message-ID: <1544687483.54.0.788709270274.issue35475@psf.upfronthosting.co.za> Aaqa Ishtyaq added the comment: Hi, I want to work on this issue, but I'm confused about how to apply to PyImport_AddModuleObject. I was also going through c_annotations.py[1]. [1] https://github.com/python/cpython/blob/master/Doc/tools/extensions/c_annotations.py ---------- nosy: +aaqaishtyaq _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 03:04:17 2018 From: report at bugs.python.org (Ammar Askar) Date: Thu, 13 Dec 2018 08:04:17 +0000 Subject: [issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference. In-Reply-To: <1544641901.4.0.788709270274.issue35475@psf.upfronthosting.co.za> Message-ID: <1544688257.93.0.788709270274.issue35475@psf.upfronthosting.co.za> Ammar Askar added the comment: A good place to start might be to search for a function that says it returns a borrowed reference in the source tree. For example, "PyImport_AddModule" says it returns a borrowed reference. In the search you'll find the relevant file here: https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Doc/data/refcounts.dat#L569 ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 03:13:06 2018 From: report at bugs.python.org (Martin Panter) Date: Thu, 13 Dec 2018 08:13:06 +0000 Subject: [issue31823] Opaque default value for close_fds argument in Popen.__init__ In-Reply-To: <1508445256.4.0.213398074469.issue31823@psf.upfronthosting.co.za> Message-ID: <1544688786.13.0.788709270274.issue31823@psf.upfronthosting.co.za> Martin Panter added the comment: The only problem with the 3.7+ documentation is the note about 3.2. Several paragraphs under , it still says ?Changed in version 3.2: The default for ?close_fds? was changed from False to what is described above.? However the description it refers to was removed in 3.6. IMO it would make sense to add the description to the note: ?Changed in version 3.2: The default for ?close_fds? was changed from False to True on Unix. On Windows the default was changed from False to True when stdin/stdout/stderr are None.? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 03:38:30 2018 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 13 Dec 2018 08:38:30 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544690310.25.0.788709270274.issue35431@psf.upfronthosting.co.za> Mark Dickinson added the comment: [Tim] > My two cents: > > - Spell it comb(n, k). > - TypeError if args aren't ints. > - ValueError if not 0 <= k <= n. +1 to all of this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 03:54:45 2018 From: report at bugs.python.org (youngchaos) Date: Thu, 13 Dec 2018 08:54:45 +0000 Subject: [issue35481] Run Tasks cannot Concurrent Message-ID: <1544691285.22.0.788709270274.issue35481@psf.upfronthosting.co.za> Change by youngchaos : ---------- components: asyncio nosy: asvetlov, youngchaos, yselivanov priority: normal severity: normal status: open title: Run Tasks cannot Concurrent type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 03:58:21 2018 From: report at bugs.python.org (youngchaos) Date: Thu, 13 Dec 2018 08:58:21 +0000 Subject: [issue35481] Run Tasks cannot Concurrent Message-ID: <1544691501.96.0.788709270274.issue35481@psf.upfronthosting.co.za> New submission from youngchaos : import struct, asyncio, os async def readdev(dev): while True: buf=os.read(dev, 480) print([struct.unpack('llHHi', buf[i*24:(i+1)*24]) for i in range(len(buf)//24)]) mouse=os.open('/dev/input/event2', os.O_RDONLY) kbd=os.open('/dev/input/event5', os.O_RDONLY) async def main(mouse,kbd): await asyncio.gather(readdev(mouse),readdev(kbd)) asyncio.run(main(mouse,kbd)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 04:09:16 2018 From: report at bugs.python.org (youngchaos) Date: Thu, 13 Dec 2018 09:09:16 +0000 Subject: [issue35481] Run Tasks cannot Concurrent In-Reply-To: <1544691501.96.0.788709270274.issue35481@psf.upfronthosting.co.za> Message-ID: <1544692156.4.0.788709270274.issue35481@psf.upfronthosting.co.za> youngchaos added the comment: #!/usr/bin/env python # coding: utf-8 import struct, asyncio, os async def readdev(dev): while True: buf=os.read(dev, 480) print([struct.unpack('llHHi', buf[i*24:(i+1)*24]) for i in range(len(buf)//24)]) mouse=os.open('/dev/input/event2', os.O_RDONLY) kbd=os.open('/dev/input/event5', os.O_RDONLY) async def main(mouse,kbd): await asyncio.gather(readdev(mouse),readdev(kbd)) asyncio.run(main(mouse,kbd)) ------------ python 3.7.1 Linux 4.19.6-1-MANJARO #1 SMP PREEMPT Sat Dec 1 12:21:26 UTC 2018 x86_64 GNU/Linux run code, output: [(1544681359, 149693, 2, 0, -1), (1544681359, 149693, 2, 1, 1), (1544681359, 149693, 0, 0, 0)] sdffvsdgsdgsdgsdgsdgs mouse move output line1 format, and keyboard press output line2 format await asyncio.gather(readdev(kbd)) and key press can output lists howto both output lists? It is a bug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 04:21:37 2018 From: report at bugs.python.org (James Crowther) Date: Thu, 13 Dec 2018 09:21:37 +0000 Subject: [issue35164] socket.getfqdn and socket.gethostbyname fail on MacOS In-Reply-To: <1541350241.71.0.788709270274.issue35164@psf.upfronthosting.co.za> Message-ID: <1544692897.16.0.788709270274.issue35164@psf.upfronthosting.co.za> James Crowther added the comment: Hi Ronald, I've replied to your comments below >My gut feeling is that this is some issue with your system or environment. I Doubt it, happens with another MacBook air which is literally out of the box, no mods. >Some more questions: >- Is this is a consistent problem, or only on some networks? All networks >- Do you have any custom settings in the Networking preference pane related to name resolution (extra search domains, DNS servers, ...)? No >- Do the domains returned by the DHCP server actually exist? Not sure >- Likewise for the DNS servers likewise not sure >- Does the result of socket.gethostname() look sane? In particular, does this include a domain name? it is given a name that includes the ip address and the name of the router. >- The original message mentions: "and that the DHCP servers provides one ore more domains to be useles for resolution.". What is meant by that? AFAIK the DHCP server can only return 1 domain name, not a full DNS search list (or at least not one that is used by most major platforms). Not sure what was meant by this comment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 04:54:31 2018 From: report at bugs.python.org (Aaqa Ishtyaq) Date: Thu, 13 Dec 2018 09:54:31 +0000 Subject: [issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference. In-Reply-To: <1544641901.4.0.788709270274.issue35475@psf.upfronthosting.co.za> Message-ID: <1544694871.55.0.788709270274.issue35475@psf.upfronthosting.co.za> Aaqa Ishtyaq added the comment: I was going through the source code to understand what is going on, but I can't find any function that returns a borrowed reference for 'PyImport_AddModuleObject'. Also, should I need to familiar with these macros and how they work? https://docs.python.org/3/c-api/refcounting.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 04:54:45 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 13 Dec 2018 09:54:45 +0000 Subject: [issue35164] socket.getfqdn and socket.gethostbyname fail on MacOS In-Reply-To: <1541350241.71.0.788709270274.issue35164@psf.upfronthosting.co.za> Message-ID: <1544694885.0.0.788709270274.issue35164@psf.upfronthosting.co.za> Ronald Oussoren added the comment: >>My gut feeling is that this is some issue with your system or environment. > I Doubt it, happens with another MacBook air which is literally out of the box, no mods. But on the other hand most other users (including myself and Ned) don't have this problem. > >- Does the result of socket.gethostname() look sane? In particular, does this include a domain name? > it is given a name that includes the ip address and the name of the router. Does resolving that name work? If it doesn't that points to a problem with your environment. What's the result of resolving the IP address of your system? That name gets used by the system when available, and that could explain the issue your seeing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 05:19:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Dec 2018 10:19:32 +0000 Subject: [issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference. In-Reply-To: <1544641901.4.0.788709270274.issue35475@psf.upfronthosting.co.za> Message-ID: <1544696372.8.0.788709270274.issue35475@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: docs at python -> serhiy.storchaka nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 05:24:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Dec 2018 10:24:05 +0000 Subject: [issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference. In-Reply-To: <1544641901.4.0.788709270274.issue35475@psf.upfronthosting.co.za> Message-ID: <1544696645.31.0.788709270274.issue35475@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10372 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 05:26:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Dec 2018 10:26:37 +0000 Subject: [issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference. In-Reply-To: <1544641901.4.0.788709270274.issue35475@psf.upfronthosting.co.za> Message-ID: <1544696797.75.0.788709270274.issue35475@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Information about borrowed references is taken from Doc/data/refcounts.dat. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 06:07:56 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 13 Dec 2018 11:07:56 +0000 Subject: [issue31446] _winapi.CreateProcess (used by subprocess) is not thread-safe In-Reply-To: <1505296743.29.0.309150843514.issue31446@psf.upfronthosting.co.za> Message-ID: <1544699276.21.0.788709270274.issue31446@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 06:11:33 2018 From: report at bugs.python.org (Matthias Klose) Date: Thu, 13 Dec 2018 11:11:33 +0000 Subject: [issue35472] python 3.7.2 rc1 bumped the build requirements for no reason In-Reply-To: <1544632241.86.0.788709270274.issue35472@psf.upfronthosting.co.za> Message-ID: <1544699493.81.0.788709270274.issue35472@psf.upfronthosting.co.za> Matthias Klose added the comment: "if one uses the doc Makefile venv target". which is not possible for distributions which are not allowed to use anything but the distro to build the distro. so why bumping the version requirement to 1.7 instead of 1.6.6? Afaicu this is the required version. I don't argue against introducing new build requirements in major versions, but having them introduced on the branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 06:17:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Dec 2018 11:17:34 +0000 Subject: [issue31446] _winapi.CreateProcess (used by subprocess) is not thread-safe In-Reply-To: <1505296743.29.0.309150843514.issue31446@psf.upfronthosting.co.za> Message-ID: <1544699854.88.0.788709270274.issue31446@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 06:39:29 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 13 Dec 2018 11:39:29 +0000 Subject: [issue35208] IDLE: Squeezed lines count ignores window width In-Reply-To: <1541834301.3.0.788709270274.issue35208@psf.upfronthosting.co.za> Message-ID: <1544701169.0.0.788709270274.issue35208@psf.upfronthosting.co.za> Tal Einat added the comment: Squeezer currently does take wrapping into account, i.e. it does take IDLE's "soft" line wrapping into account when counting lines. Therefore the auto-squeeze criterion of "at least X lines" does lead to auto-squeezing for any mixture of very long lines and/or many short lines. However, there is currently a bug in the line counting mechanism which is causing it to not count long, soft-wrapped lines properly in some cases. This issue is about that bug, and the PR fixes it. Merging this fix should result in the originally intended behavior, which is similar to what Terry described in his last comment here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 07:47:21 2018 From: report at bugs.python.org (Windson Yang) Date: Thu, 13 Dec 2018 12:47:21 +0000 Subject: [issue35367] FileExistsError During os.symlink() Displays Arrow in the Wrong Direction In-Reply-To: <1543610582.95.0.788709270274.issue35367@psf.upfronthosting.co.za> Message-ID: <1544705241.46.0.788709270274.issue35367@psf.upfronthosting.co.za> Change by Windson Yang : ---------- pull_requests: +10373 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 07:52:30 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Dec 2018 12:52:30 +0000 Subject: [issue35208] IDLE: Squeezed lines count ignores window width In-Reply-To: <1541834301.3.0.788709270274.issue35208@psf.upfronthosting.co.za> Message-ID: <1544705550.33.0.788709270274.issue35208@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In the example I gave on the PR, 200 70 char lines, the squeezed box says 200 lines with or without line wrapping (before the patch). What is a simple case that you think is buggy? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 08:05:36 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 13 Dec 2018 13:05:36 +0000 Subject: [issue35208] IDLE: Squeezed lines count ignores window width In-Reply-To: <1541834301.3.0.788709270274.issue35208@psf.upfronthosting.co.za> Message-ID: <1544706336.77.0.788709270274.issue35208@psf.upfronthosting.co.za> Tal Einat added the comment: As I mentioned when opening this issue: 'a'*200 (or 'a'*10000). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 08:06:28 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 13 Dec 2018 13:06:28 +0000 Subject: [issue35208] IDLE: Squeezed lines count ignores window width In-Reply-To: <1541834301.3.0.788709270274.issue35208@psf.upfronthosting.co.za> Message-ID: <1544706388.83.0.788709270274.issue35208@psf.upfronthosting.co.za> Tal Einat added the comment: Note the lack of newline at the end; that triggers the problematic path in the current calculation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 08:30:45 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 13 Dec 2018 13:30:45 +0000 Subject: [issue35481] Run Tasks cannot Concurrent In-Reply-To: <1544691501.96.0.788709270274.issue35481@psf.upfronthosting.co.za> Message-ID: <1544707845.12.0.788709270274.issue35481@psf.upfronthosting.co.za> Andrew Svetlov added the comment: A task should have `await` inside to give to loop a chance to switch to another task (or get canceled). It is not an asyncio bug but a part of specified behavior. Your code could be modified as async def readdev(dev): while True: buf=os.read(dev, 480) print([struct.unpack('llHHi', buf[i*24:(i+1)*24]) for i in range(len(buf)//24)]) await asyncio.sleep(0) to use tasks switching ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 08:53:04 2018 From: report at bugs.python.org (Windson Yang) Date: Thu, 13 Dec 2018 13:53:04 +0000 Subject: [issue35267] reproducible deadlock with multiprocessing.Pool In-Reply-To: <1542416799.14.0.788709270274.issue35267@psf.upfronthosting.co.za> Message-ID: <1544709184.56.0.788709270274.issue35267@psf.upfronthosting.co.za> Change by Windson Yang : ---------- keywords: +patch pull_requests: +10374 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 09:34:02 2018 From: report at bugs.python.org (Ma Lin) Date: Thu, 13 Dec 2018 14:34:02 +0000 Subject: [issue35482] python372rc1.chm is ill Message-ID: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> New submission from Ma Lin : python372rc1.chm can't be opened, it seems the compiling is not successful. Compare to python371.chm, the file size reduced a lot: python371.chm 8,534,435 bytes python372rc1.chm 5,766,102 bytes Some files in chm are missing, see attached pictures: 371_chm_files.png 372rc1_chm_files.png After switch "Display compile progress" to Yes in .hhp file, the output is abnormal, see attached pictures: 371_compile_progress.png 372rc1_compile_progress.png ---------- assignee: docs at python components: Documentation files: 371_chm_files.png messages: 331761 nosy: Ma Lin, docs at python priority: normal severity: normal status: open title: python372rc1.chm is ill versions: Python 3.7 Added file: https://bugs.python.org/file47988/371_chm_files.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 09:34:16 2018 From: report at bugs.python.org (Ma Lin) Date: Thu, 13 Dec 2018 14:34:16 +0000 Subject: [issue35482] python372rc1.chm is ill In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1544711656.8.0.788709270274.issue35482@psf.upfronthosting.co.za> Change by Ma Lin : Added file: https://bugs.python.org/file47989/372rc1_chm_files.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 09:34:28 2018 From: report at bugs.python.org (Ma Lin) Date: Thu, 13 Dec 2018 14:34:28 +0000 Subject: [issue35482] python372rc1.chm is ill In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1544711668.34.0.788709270274.issue35482@psf.upfronthosting.co.za> Change by Ma Lin : Added file: https://bugs.python.org/file47990/371_compile_progress.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 09:34:40 2018 From: report at bugs.python.org (Ma Lin) Date: Thu, 13 Dec 2018 14:34:40 +0000 Subject: [issue35482] python372rc1.chm is ill In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1544711680.98.0.788709270274.issue35482@psf.upfronthosting.co.za> Change by Ma Lin : Added file: https://bugs.python.org/file47991/372rc1_compile_progress.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 10:22:39 2018 From: report at bugs.python.org (Michael Brandl) Date: Thu, 13 Dec 2018 15:22:39 +0000 Subject: [issue35483] tarfile.extractall on existing symlink in Ubuntu overwrites target file, not symlink, unlinke GNU tar Message-ID: <1544714559.52.0.788709270274.issue35483@psf.upfronthosting.co.za> New submission from Michael Brandl : In Ubuntu 16.04, with python 3.5, as well as custom built 3.6 and 3.7.1: Given a file foo.txt (with content "foo") and a symlink myLink to it, packed in a tar, and a file bar.txt (with content "bar") with a symlink myLink to it, packed in another tar, unpacking the two tars into the same folder (first foo.tar, then bar.tar) leads to the following behavior: In GNU tar, the directory will contain: foo.txt (content "foo") bar.txt (content "bar") myLink ->bar.txt. Using python's tarfile however, the result of calling tarfile.extractall on the two tars will give: foo.txt (content "bar") bar.txt (content "bar") myLink ->foo.txt. Repro: 1. Unpack the attached symLinkBugRepro.tar.gz into a new folder 2. run > bash repoSymlink.bash (does exactly what is described above) 3. if the last two lines of the output are "bar" and "bar" (instead of "foo" and "bar"), then the content of foo.txt has been overwritten. Note that this is related to issues like https://bugs.python.org/issue23228 https://bugs.python.org/issue1167128 https://bugs.python.org/issue19974 https://bugs.python.org/issue10761 None of these issues target the issue at hand, however. The problem lies in line 2201 of https://github.com/python/cpython/blob/master/Lib/tarfile.py: The assumption is that any exception only comes from the os not supporting symlinks. But here, the exception comes from the symlink already existing, which should be caught separately. The correct behavior is then NOT to extract the member, but rather to overwrite the symlink (as GNU tar does). ---------- components: Library (Lib) files: symLinkBugRepro.tar.gz messages: 331762 nosy: michael.brandl at aid-driving.eu priority: normal severity: normal status: open title: tarfile.extractall on existing symlink in Ubuntu overwrites target file, not symlink, unlinke GNU tar type: behavior versions: Python 3.5, Python 3.6, Python 3.7 Added file: https://bugs.python.org/file47992/symLinkBugRepro.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 10:38:08 2018 From: report at bugs.python.org (Jakub Kulik) Date: Thu, 13 Dec 2018 15:38:08 +0000 Subject: [issue35484] Segmentation fault due to faulthandler on Solaris Message-ID: <1544715488.9.0.788709270274.issue35484@psf.upfronthosting.co.za> New submission from Jakub Kulik : When running tests on Solaris (amd64) I noticed that one test in test_faulthandler.py fails with the segmentation fault. I have attached program reproducing this issue and its core stack trace. Program runs entirely with *Ending* printed as well and segfaults somewhere in the sys.exit() during deallocation. Problem doesn't appear when chain variable is set to False or if faulthandler is unregistered. Also, this bug appears only with --enable-optimizations on, but probably it just doesn't manifest itself in non optimized build (or on sparc). I am not sure how to diagnose it more so I am at least reporting this issue. ---------- components: Extension Modules, Interpreter Core files: crash_stack.txt messages: 331763 nosy: kulikjak priority: normal severity: normal status: open title: Segmentation fault due to faulthandler on Solaris type: crash versions: Python 3.7 Added file: https://bugs.python.org/file47993/crash_stack.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 10:38:47 2018 From: report at bugs.python.org (Jakub Kulik) Date: Thu, 13 Dec 2018 15:38:47 +0000 Subject: [issue35484] Segmentation fault due to faulthandler on Solaris In-Reply-To: <1544715488.9.0.788709270274.issue35484@psf.upfronthosting.co.za> Message-ID: <1544715527.72.0.788709270274.issue35484@psf.upfronthosting.co.za> Change by Jakub Kulik : Added file: https://bugs.python.org/file47994/reproduce.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 10:44:47 2018 From: report at bugs.python.org (Jakub Kulik) Date: Thu, 13 Dec 2018 15:44:47 +0000 Subject: [issue35484] Segmentation fault due to faulthandler on Solaris In-Reply-To: <1544715488.9.0.788709270274.issue35484@psf.upfronthosting.co.za> Message-ID: <1544715887.82.0.788709270274.issue35484@psf.upfronthosting.co.za> Jakub Kulik added the comment: The exact failing test is test_register_chain(). Output of this failed test (as expected for segmentation fault): ====================================================================== FAIL: test_register_chain (test.test_faulthandler.FaultHandlerTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "xxx/Python-3.7.1/Lib/test/test_faulthandler.py", line 708, in test_register_chain self.check_register(chain=True) File "xxx/Python-3.7.1/Lib/test/test_faulthandler.py", line 686, in check_register self.assertEqual(exitcode, 0) AssertionError: -11 != 0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 12:02:46 2018 From: report at bugs.python.org (Yongnan Wu) Date: Thu, 13 Dec 2018 17:02:46 +0000 Subject: [issue34766] BaseProxy cache should be cleaned when Manager client is reconnected In-Reply-To: <1537900896.87.0.545547206417.issue34766@psf.upfronthosting.co.za> Message-ID: <1544720566.97.0.788709270274.issue34766@psf.upfronthosting.co.za> Yongnan Wu added the comment: pong ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 13:24:22 2018 From: report at bugs.python.org (Roundup Robot) Date: Thu, 13 Dec 2018 18:24:22 +0000 Subject: [issue35450] venv module doesn't create a copy of python binary by default In-Reply-To: <1544378737.46.0.788709270274.issue35450@psf.upfronthosting.co.za> Message-ID: <1544725462.31.0.788709270274.issue35450@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +10375 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 13:32:12 2018 From: report at bugs.python.org (Marcin) Date: Thu, 13 Dec 2018 18:32:12 +0000 Subject: [issue35450] venv module doesn't create a copy of python binary by default In-Reply-To: <1544378737.46.0.788709270274.issue35450@psf.upfronthosting.co.za> Message-ID: <1544725932.73.0.788709270274.issue35450@psf.upfronthosting.co.za> Marcin added the comment: I'm very honoured with your request. Doing this for the first time with Python, hope you can accept it despite warnings. https://github.com/python/cpython/pull/11144 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 14:54:27 2018 From: report at bugs.python.org (Roundup Robot) Date: Thu, 13 Dec 2018 19:54:27 +0000 Subject: [issue35465] [asyncio] Document loop.add_signal_handler In-Reply-To: <1544556093.28.0.788709270274.issue35465@psf.upfronthosting.co.za> Message-ID: <1544730867.58.0.788709270274.issue35465@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +10376 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 14:55:57 2018 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Thu, 13 Dec 2018 19:55:57 +0000 Subject: [issue35465] [asyncio] Document loop.add_signal_handler In-Reply-To: <1544556093.28.0.788709270274.issue35465@psf.upfronthosting.co.za> Message-ID: <1544730957.82.0.788709270274.issue35465@psf.upfronthosting.co.za> Hrvoje Nik?i? added the comment: Done, https://github.com/python/cpython/pull/11145 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 14:58:50 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Dec 2018 19:58:50 +0000 Subject: [issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1544731130.22.0.788709270274.issue26317@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 3.5 is and 3.6 will soon be on security fix only status. Robert, please verify that this is still an issue with 3.7 and the current build files. ---------- nosy: +terry.reedy versions: +Python 3.7 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 15:22:39 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Dec 2018 20:22:39 +0000 Subject: [issue35485] Mac: tkinter windows turn black while resized Message-ID: <1544732559.26.0.788709270274.issue35485@psf.upfronthosting.co.za> New submission from Terry J. Reedy : I updated to Mohave and did *not* switch to new dark theme.] I installed 64 bit 3.7.2rc1. Start IDLE. import tkinter root = tkinter.Tk() Black on white Tk window appears. Move mouse until resize arrow appears. Left click. Move mouse. Window turns uniformly black. Ugh. Cannot see contents that am trying to resize to. Release button. Background returns to white. Same thing happens with Text added, and hence with IDLE windows and such dialogs as can be resized. ---------- components: Tkinter, macOS messages: 331769 nosy: ned.deily, ronaldoussoren, terry.reedy, wordtech priority: release blocker severity: normal stage: needs patch status: open title: Mac: tkinter windows turn black while resized type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 15:23:02 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Dec 2018 20:23:02 +0000 Subject: [issue35485] Mac: tkinter windows turn black while resized In-Reply-To: <1544732559.26.0.788709270274.issue35485@psf.upfronthosting.co.za> Message-ID: <1544732582.97.0.788709270274.issue35485@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 16:37:39 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Dec 2018 21:37:39 +0000 Subject: [issue34313] Tkinter crashes with Tk-related error on macOS with ActiveTcl 8.6 In-Reply-To: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> Message-ID: <1544737059.76.0.788709270274.issue34313@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I installed 64-bit 3.7.2rc1 on my Macbook, with 8.6.9, and so far IDLE itself runs fine. (Other than new blackout issue reported in #34313.) I will let someone else test 32/64 bit release, which Ned says also uses 8.6.9. Vlad says in msg323040 "on 8.6.8 I didn't see issues" and in msg326778 "The issues appear with ... Tk 8.6.[:8]". Different 'issues'? In any case, tcl/tk on the every changing macOS graphics seems 'tempermental'. Let me revise, extend, and reword what I said earlier about 'recent releases'. I think the goal of the python x.y.z Mac equivalent of PCbuild should be to make it just as easy to build python with the current 'official' x.y.z version of tcl/tk as PCbuild does. Does the ActiveState licensing allow this? Then we could consider saying that we only support tkinter x.y.z with that tcl/tk, and IDLE patches could be tested against the expected tcl/tk they will be installed with. (This is routine on Windows. If someone breaks IDLE on Windows by replacing the installed tcl/tk, it is basically their problem.) To put it another way, I want tcl/tk to shield me from differences between OS versions. To do that on Mac, we have to use a fairly up-to-date version of the efforts of Kevin and company. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 16:45:01 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 13 Dec 2018 21:45:01 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544737501.66.0.788709270274.issue35402@psf.upfronthosting.co.za> Steve Dower added the comment: Setting DefaultWindowsSdkVersion to 10.0.15063.0 seems to work for the Python 3.7 and 3.8 builds. Unless there's a security reason (which I don't believe there is), there's no need to worry about 3.6. ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 16:52:54 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 13 Dec 2018 21:52:54 +0000 Subject: [issue34313] Tkinter crashes with Tk-related error on macOS with ActiveTcl 8.6 In-Reply-To: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> Message-ID: <1544737974.46.0.788709270274.issue34313@psf.upfronthosting.co.za> Tal Einat added the comment: > Vlad says in msg323040 "on 8.6.8 I didn't see issues" and in msg326778 "The issues appear with ... Tk 8.6.[:8]". Different 'issues'? Nope, same issues: Vlad was saying that 8.6.x versions of Tcl/Tk *before* 8.6.8 displayed these issues, but 8.6.8 is fine. To state this point as directly as possible: Tcl/Tk 8.5.18 and 8.6.8 are fine in this regard, and apparently so is 8.6.9. The issues discussed here occur with Tcl/Tk versions 8.6.x before 8.6.8, as well as 8.5.x other than 8.5.18. macOS users do occasionally install another version of Tcl/Tk, and IDLE will automatically use the system installed Tcl/Tk in many cases. ISTM we should update the docs to recommend the working versions of Tcl/Tk, and warn about versions known to be problematic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:34:19 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Dec 2018 22:34:19 +0000 Subject: [issue34313] Tkinter crashes with Tk-related error on macOS with ActiveTcl 8.6 In-Reply-To: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> Message-ID: <1544740459.86.0.788709270274.issue34313@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I get it now. [:8] meant .0 to .7 inclusive, like range(8). I understand that until last spring, the tcl/tk/tkinter situation on Mac was a bit like the old American wild west. But then Ned more or less tamed it for 3.7 and now 3.6. We no longer install Python to work with system tcl and, I believe, releases compiled against 8.6 would not work with them. Can you suggest a doc change? tkinter has a hard-coded requirement for at least 8.4, IDLE for 8.5 (so ttk works). For future IDLE, that should be at least 8.5.18 or maybe later. I have thought about adding a startup warning if something older that the expected (tested-against) version is used, but that should be once only, requiring a 'hidden' configuration value. So maybe not worth the effort. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:53:36 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 13 Dec 2018 22:53:36 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544741616.89.0.788709270274.issue35402@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +10377 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 18:14:15 2018 From: report at bugs.python.org (David Wilson) Date: Thu, 13 Dec 2018 23:14:15 +0000 Subject: [issue35486] subprocess module breaks backwards compatibility with older import hooks Message-ID: <1544742855.44.0.788709270274.issue35486@psf.upfronthosting.co.za> New submission from David Wilson : The subprocess package since 880d42a3b24 / September 2018 has begun using this idiom: try: import _foo except ModuleNotFoundError: bar However, ModuleNotFoundError may not be thrown by older import hook implementations, since that subclass was only introduced in Python 3.6 -- and so the test above will fail. PEP-302 continues to document ImportError as the appropriate exception that should be raised. https://mitogen.readthedocs.io/en/stable/ is one such import hook that lazily loads packages over the network when they aren't available locally. Current Python subprocess master breaks with Mitogen because when it discovers the master cannot satisfy the import, it throws ImportError. The new exception subtype was introduced in https://bugs.python.org/issue15767 , however very little in the way of rationale was included, and so it's unclear to me what need the new subtype is addressing, whether this is a problem with the subprocess module or the subtype as a whole, or indeed whether any of this should be considered a bug. It seems clear that some kind of regression is in the process of occurring during a minor release, and it also seems clear the new subtype will potentially spawn a whole variety of similar new regressions. I will be updating Mitogen to throw the new subtype if it is available, but I felt it was important to report the regression to see what others think. ---------- components: Library (Lib) messages: 331774 nosy: dw priority: normal severity: normal status: open title: subprocess module breaks backwards compatibility with older import hooks versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 18:15:03 2018 From: report at bugs.python.org (David Wilson) Date: Thu, 13 Dec 2018 23:15:03 +0000 Subject: [issue35486] subprocess module breaks backwards compatibility with older import hooks In-Reply-To: <1544742855.44.0.788709270274.issue35486@psf.upfronthosting.co.za> Message-ID: <1544742903.69.0.788709270274.issue35486@psf.upfronthosting.co.za> David Wilson added the comment: Corrected GitHub link for the commit: https://github.com/python/cpython/commit/880d42a3b24 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 19:02:33 2018 From: report at bugs.python.org (David Wilson) Date: Fri, 14 Dec 2018 00:02:33 +0000 Subject: [issue35486] subprocess module breaks backwards compatibility with import hooks In-Reply-To: <1544742855.44.0.788709270274.issue35486@psf.upfronthosting.co.za> Message-ID: <1544745753.34.0.788709270274.issue35486@psf.upfronthosting.co.za> Change by David Wilson : ---------- title: subprocess module breaks backwards compatibility with older import hooks -> subprocess module breaks backwards compatibility with import hooks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 20:10:25 2018 From: report at bugs.python.org (David Wilson) Date: Fri, 14 Dec 2018 01:10:25 +0000 Subject: [issue35486] subprocess module breaks backwards compatibility with import hooks In-Reply-To: <1544742855.44.0.788709270274.issue35486@psf.upfronthosting.co.za> Message-ID: <1544749825.35.0.788709270274.issue35486@psf.upfronthosting.co.za> David Wilson added the comment: Having considered this for a few hours, it seems the following is clear: - 3.6 introduces ModuleImportError - 3.7 begins using it within importlib - 3.8 first instance of stdlib code catching it - PEP-302 and PEP-451 are the definitive specifications for how sys.meta_path is supposed to work, and neither makes mention of ModuleNotFoundError. It seems at least this should have been flagged during review of the original change, but apparently the name of the exception was more important. - The recent work done to move most of the import machinery on to sys.meta_path has exposed a set of import hooks that don't quite comply to the documented import hook interface - The newly advertised ModuleNotFoundError appearing in stack traces for everyone means that more people will continue to write new cases of "except ModuleNotFoundError:", which while following best practice (catch most specific relevant exception), at present it amounts to relying on an implementation detail of the default importer. GitHub search reveals this to be an accurate reading: https://github.com/search?q=%22except+ModuleNotFoundError%22&type=Code Therefore we are in a position where: - Natural developer habit will cause much more protocol-violating code to exist over time, there is no option to stop this process - New import hooks written against the existing documentation will break in the face of developer habit - Existing import hooks were broken in Python 3.6 and this is not documented anywhere - Python's own import machinery contravenes its specification Options: - Updating PEP-302 to mention introduction of the new exception type - Updating ModuleNotFoundError/ImportError documentation to somehow capture the compatibility issue ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 22:40:14 2018 From: report at bugs.python.org (Kevin Walzer) Date: Fri, 14 Dec 2018 03:40:14 +0000 Subject: [issue35485] Mac: tkinter windows turn black while resized In-Reply-To: <1544732559.26.0.788709270274.issue35485@psf.upfronthosting.co.za> Message-ID: <1544758814.49.0.788709270274.issue35485@psf.upfronthosting.co.za> Kevin Walzer added the comment: Cannot reproduce this with the tip of Tk core-8-6-branch on Mojave and IDLE 3.7.1. Window appears normal and no flickering when resizing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 22:43:32 2018 From: report at bugs.python.org (F. Eugene Aumson) Date: Fri, 14 Dec 2018 03:43:32 +0000 Subject: [issue35487] setup()'s package_data not following directory symlink Message-ID: <1544759012.02.0.788709270274.issue35487@psf.upfronthosting.co.za> New submission from F. Eugene Aumson : I have a package using setup.py. I want the package to include some data files, which are located in my source directory. Building my package in my 3.7.0 environment includes the data files as expected. Building the same exact package in my 3.7.1 environment does NOT include the data files. Attached are two logs demonstrating the `pip install` output. Both were produced with this command: `pip uninstall 0x-json-schemas --yes >pip.log && pip install .[dev] --verbose --verbose --verbose >> pip.log` Also attached is my setup.py script. Also worth noting is that the directory that contains my data files (src/zero_ex/json_schemas/schemas) is a symlink, which I've verified is resolving properly in both environments. And, when I replace the symlink with a real folder, containing the same files, then everything works as expected. So I surmise that the following of symlinks is what's broken here. ---------- components: Distutils files: package_data_symlink_bug.zip messages: 331778 nosy: F. Eugene Aumson, dstufft, eric.araujo priority: normal severity: normal status: open title: setup()'s package_data not following directory symlink versions: Python 3.7 Added file: https://bugs.python.org/file47995/package_data_symlink_bug.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 23:29:25 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Dec 2018 04:29:25 +0000 Subject: [issue35208] IDLE: Squeezed lines count ignores window width In-Reply-To: <1541834301.3.0.788709270274.issue35208@psf.upfronthosting.co.za> Message-ID: <1544761765.59.0.788709270274.issue35208@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There are 2 questions. 1. Should we review squeezer, in light of further complemplation and experience, and possibly patch it in a couple of weeks or so? Yes. 2. Is there such a severe bug that we should possibly rush a fix and ask Ned to cherry-pick something after the well announced deadline? Since I see behavior different from your report, I don't currently see a reason to ask. I have tested with Windows 3.7.1 64 bit installed, Windows 3.7.2c1+ 32 bit repository debug build from yesterday, Mac 3.7.2rc1 64 bit installed. 'a'*200 and 'a'*200 + '\n' both display over 3 lines and are *not* autosqueezed. Both squeeze as 3 lines. Unsqueeze, narrow window, and resqueeze, and the result is *4* lines, not 3. Line single lines with 20000 and 20002 characters, a'*20000 and 400 * (48*'a'+'\n), are autosqueezed, as more than 250 lines, depending on the window width. Note interactive echo uses repr(), so that the '\n' converted to 1 newline is converted back to '\n'. Lines here also depends on width. print(200 * (70*'a'+'\n')) is squeezed as 200 lines regardless of wrapping or not. So the effect of wrapping on line count depends on the number of lines. print(40 * (100*'a'+'\n')) (4000 chars) is not squeezed, even though it would be by the 50 lines * 75 chars/line (3750 chars) rule I suggested. Further experiments shows that autosqueezing only applies to single writes to sys.stdout (and maybe to sys.stderr). print(40 * (100*'a'+'\n'), 40 * (100*'a'+'\n')) prints 40 lines twice with separate write calls and is not autosqueezed. Manual squeeze squeezes contiguous stdout or stderr blocks even if the former is the result of more than one print arg or calls. Stdout blocks separated by an input() response are autosqueezed separately. This all seems fine. The doc could use a few more words. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 23:34:09 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Dec 2018 04:34:09 +0000 Subject: [issue35485] Mac: tkinter windows turn black while resized In-Reply-To: <1544732559.26.0.788709270274.issue35485@psf.upfronthosting.co.za> Message-ID: <1544762049.74.0.788709270274.issue35485@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I presume that tip has patches not in the distributed 8.6.9. Ned, if my system is not unique and this is fixed by an identifiable patch, please consider including it. ---------- keywords: +3.7regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 00:54:31 2018 From: report at bugs.python.org (F. Eugene Aumson) Date: Fri, 14 Dec 2018 05:54:31 +0000 Subject: [issue35487] setup()'s package_data not following directory symlink In-Reply-To: <1544759012.02.0.788709270274.issue35487@psf.upfronthosting.co.za> Message-ID: <1544766871.62.0.788709270274.issue35487@psf.upfronthosting.co.za> F. Eugene Aumson added the comment: The two environments in question (a 3.7.1 one, and a 3.7.0 one) differ in other ways. I have done an apples-to-apples comparison of those two versions, in the same local environment, and this issue does not exist. Sorry for the noise. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 01:40:24 2018 From: report at bugs.python.org (anthony shaw) Date: Fri, 14 Dec 2018 06:40:24 +0000 Subject: [issue35488] pathlib Path.match does not behave as described Message-ID: <1544769623.98.0.788709270274.issue35488@psf.upfronthosting.co.za> New submission from anthony shaw : The documentation for pathlib PurePath.match(needle) says it accepts "glob-style pattern.". For an absolute path with a recursive pattern (**) it doesn't match correct for more than 1 directory level. All of the assertions in the attached file should pass. The issue I've seen is on the attached file. I'm using Python 3.7.1 and have also tested this against Python 3.6.6 with the pathlib module on PyPi. Absolute path glob'ing with a recursive pattern works as expected: entries = pathlib.Path('/var').glob('/var/**/*.log') Once this issue is confirmed, I would be happy to test & contribute a fix ---------- components: Library (Lib) files: test_pathlib.py messages: 331782 nosy: anthony shaw priority: normal severity: normal status: open title: pathlib Path.match does not behave as described versions: Python 3.7 Added file: https://bugs.python.org/file47996/test_pathlib.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 01:48:04 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 14 Dec 2018 06:48:04 +0000 Subject: [issue34313] Tkinter crashes with Tk-related error on macOS with ActiveTcl 8.6 In-Reply-To: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> Message-ID: <1544770084.38.0.788709270274.issue34313@psf.upfronthosting.co.za> Tal Einat added the comment: We already have a warning about Tk versions on macOS, see macosx.tkVersionWarning(). It is currently printed in new shell windows. It would be straightforward to add warnings when using anything other than 8.5.18 or 8.6.8+. I suggest this approach. As for the docs, IMO we should update the "GUI Programming on the Mac" section of https://docs.python.org/3/using/mac.html; I'll prepare a PR. I also suggest updating https://www.python.org/download/mac/tcltk/. The following two current paragraphs should be improved: "If you are using Python (prior to 3.7) from a python.org 64-bit/32-bit Python installer for macOS 10.6 and later, you should only use IDLE or tkinter with an updated third-party Tcl/Tk 8.5 (not 8.6), like ActiveTcl 8.5 installed." "If you are using macOS 10.7 or later, the Apple-supplied Tcl/Tk 8.5 still has serious bugs that can cause application crashes. If you wish to use IDLE or Tkinter, install and use a newer version of Python and of Tcl/Tk." I'm happy to suggest clearer wording; I'm not sure where to post a patch/PR, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 01:57:57 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 14 Dec 2018 06:57:57 +0000 Subject: [issue35208] IDLE: Squeezed lines count ignores window width In-Reply-To: <1541834301.3.0.788709270274.issue35208@psf.upfronthosting.co.za> Message-ID: <1544770677.91.0.788709270274.issue35208@psf.upfronthosting.co.za> Tal Einat added the comment: My mistake on the reproduction; try: print('a'*10000+'\n'). It does not trigger auto-squeezing, though this is an obvious case where it should be triggered. (Manual squeezing also results in showing just 1 as the line count.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 03:11:52 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Fri, 14 Dec 2018 08:11:52 +0000 Subject: [issue34313] Tkinter crashes with Tk-related error on macOS with ActiveTcl 8.6 In-Reply-To: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> Message-ID: <1544775112.64.0.788709270274.issue34313@psf.upfronthosting.co.za> Vlad Tudorache added the comment: The only versions of Tk not showing issues on my Mac are: - 8.5.18 with any Python in 3.5, 3.6, 3.7 on Mojave AND previous versions; - 8.6.8 when built on a 10.13 SDK, with the same Python versions. For 8.6.8 built on Mojave SDK, there's the black background console window issue and for 8.6.9.1 the IDLE's problem showing a little black window. I've seen no crashes yet with 8.5.18, 8.6.8, 8.6.9 (on my Mac). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 03:30:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 08:30:57 +0000 Subject: [issue31446] _winapi.CreateProcess (used by subprocess) is not thread-safe In-Reply-To: <1505296743.29.0.309150843514.issue31446@psf.upfronthosting.co.za> Message-ID: <1544776257.52.0.788709270274.issue31446@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 7b36016a15aeed0d76a4c05a66203e6d7723aace by Serhiy Storchaka (Vladimir Matveev) in branch 'master': bpo-31446: Copy command line that should be passed to CreateProcessW(). (GH-11141) https://github.com/python/cpython/commit/7b36016a15aeed0d76a4c05a66203e6d7723aace ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 03:40:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 08:40:12 +0000 Subject: [issue31446] _winapi.CreateProcess (used by subprocess) is not thread-safe In-Reply-To: <1505296743.29.0.309150843514.issue31446@psf.upfronthosting.co.za> Message-ID: <1544776812.19.0.788709270274.issue31446@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10378 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 03:53:01 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 14 Dec 2018 08:53:01 +0000 Subject: [issue35488] pathlib Path.match does not behave as described In-Reply-To: <1544769623.98.0.788709270274.issue35488@psf.upfronthosting.co.za> Message-ID: <1544777581.76.0.788709270274.issue35488@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 03:53:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 08:53:53 +0000 Subject: [issue35489] Argument Clinic should use "const Py_UNICODE *" for the Py_UNICODE converter Message-ID: <1544777633.51.0.788709270274.issue35489@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Format units "Z" and "Z#" in PyArg_Parse* return a pointer to immutable internal data. Therefor the result of the Py_UNICODE converter in Argument Clinic should has type "const Py_UNICODE *". This would help to catch the bug reported in issue31446. ---------- assignee: serhiy.storchaka components: Argument Clinic messages: 331787 nosy: larry, serhiy.storchaka priority: normal severity: normal status: open title: Argument Clinic should use "const Py_UNICODE *" for the Py_UNICODE converter type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 03:57:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 08:57:49 +0000 Subject: [issue35489] Argument Clinic should use "const Py_UNICODE *" for the Py_UNICODE converter In-Reply-To: <1544777633.51.0.788709270274.issue35489@psf.upfronthosting.co.za> Message-ID: <1544777869.13.0.788709270274.issue35489@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10379 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 04:18:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 09:18:21 +0000 Subject: [issue31446] _winapi.CreateProcess (used by subprocess) is not thread-safe In-Reply-To: <1505296743.29.0.309150843514.issue31446@psf.upfronthosting.co.za> Message-ID: <1544779101.15.0.788709270274.issue31446@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 922b2a0d0d9928af420ea4d5c104f8be72517aa2 by Serhiy Storchaka in branch '3.7': [3.7] bpo-31446: Copy command line that should be passed to CreateProcessW(). (GH-11141). (GH-11149) https://github.com/python/cpython/commit/922b2a0d0d9928af420ea4d5c104f8be72517aa2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 04:19:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 09:19:55 +0000 Subject: [issue35489] Argument Clinic should use "const Py_UNICODE *" for the Py_UNICODE converter In-Reply-To: <1544777633.51.0.788709270274.issue35489@psf.upfronthosting.co.za> Message-ID: <1544779195.3.0.788709270274.issue35489@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset afb3e71a1710c444fbe789b51df43ee16ee9ede7 by Serhiy Storchaka in branch 'master': bpo-35489: Use "const Py_UNICODE *" for the Py_UNICODE converter in AC. (GH-11150) https://github.com/python/cpython/commit/afb3e71a1710c444fbe789b51df43ee16ee9ede7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 04:23:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 09:23:51 +0000 Subject: [issue35489] Argument Clinic should use "const Py_UNICODE *" for the Py_UNICODE converter In-Reply-To: <1544777633.51.0.788709270274.issue35489@psf.upfronthosting.co.za> Message-ID: <1544779431.48.0.788709270274.issue35489@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10380 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 04:25:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 09:25:42 +0000 Subject: [issue31446] _winapi.CreateProcess (used by subprocess) is not thread-safe In-Reply-To: <1505296743.29.0.309150843514.issue31446@psf.upfronthosting.co.za> Message-ID: <1544779542.31.0.788709270274.issue31446@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 Dec 14 04:39:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 09:39:36 +0000 Subject: [issue35490] Remove the DecodeFSDefault return converter in Argument Clinic Message-ID: <1544780376.65.0.788709270274.issue35490@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The DecodeFSDefault return converter is used only in one function, os.ttyname(). It could be used also in os.ctermid(), but in any case there are too small use cases for it, because it is very uncommon to return a bare pointer to static C string. Since it is such uncommon and using this return converter does not add much to readability, I think that it is better to remove it. ---------- components: Argument Clinic messages: 331790 nosy: larry, serhiy.storchaka priority: normal severity: normal status: open title: Remove the DecodeFSDefault return converter in Argument Clinic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 04:42:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 09:42:32 +0000 Subject: [issue35490] Remove the DecodeFSDefault return converter in Argument Clinic In-Reply-To: <1544780376.65.0.788709270274.issue35490@psf.upfronthosting.co.za> Message-ID: <1544780552.33.0.788709270274.issue35490@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10381 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 04:49:03 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 14 Dec 2018 09:49:03 +0000 Subject: [issue35488] pathlib Path.match does not behave as described In-Reply-To: <1544769623.98.0.788709270274.issue35488@psf.upfronthosting.co.za> Message-ID: <1544780943.37.0.788709270274.issue35488@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Is this similar to issue29249 (See also msg285311) and issue34731 ? As I can see in Lib/test/test_pathlib.py there are also no tests for "**" and I think it's good to add one along with documenting it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 04:57:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 09:57:01 +0000 Subject: [issue35489] Argument Clinic should use "const Py_UNICODE *" for the Py_UNICODE converter In-Reply-To: <1544777633.51.0.788709270274.issue35489@psf.upfronthosting.co.za> Message-ID: <1544781421.64.0.788709270274.issue35489@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 45a7b7617e67bd1a8491f5e10ea9d24fe418b52d by Serhiy Storchaka in branch '3.7': [3.7] bpo-35489: Use "const Py_UNICODE *" for the Py_UNICODE converter in AC. (GH-11150). (GH-11151) https://github.com/python/cpython/commit/45a7b7617e67bd1a8491f5e10ea9d24fe418b52d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 04:57:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 09:57:23 +0000 Subject: [issue35489] Argument Clinic should use "const Py_UNICODE *" for the Py_UNICODE converter In-Reply-To: <1544777633.51.0.788709270274.issue35489@psf.upfronthosting.co.za> Message-ID: <1544781443.58.0.788709270274.issue35489@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 Dec 14 05:12:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 10:12:35 +0000 Subject: [issue35478] multiprocessing: ApplyResult.get() hangs if the pool is terminated In-Reply-To: <1544661051.76.0.788709270274.issue35478@psf.upfronthosting.co.za> Message-ID: <1544782355.07.0.788709270274.issue35478@psf.upfronthosting.co.za> STINNER Victor added the comment: Attached PR 11139 sets RuntimeError("Pool terminated") error in pending results if the pool is terminated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:06:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 11:06:45 +0000 Subject: [issue35479] multiprocessing.Pool.join() always takes at least 100 ms In-Reply-To: <1544661414.71.0.788709270274.issue35479@psf.upfronthosting.co.za> Message-ID: <1544785605.97.0.788709270274.issue35479@psf.upfronthosting.co.za> STINNER Victor added the comment: My PR 11136 doesn't work: _maintain_pool() should be called frequently to check when a worker completed. Polling worker exit status seems inefficient :-( asyncio uses SIGCHLD signal to be notified when a child process completes. SafeChildWatcher calls os.waitpid(pid, os.WNOHANG) on each child process, whereas FastChildWatcher() uses os.waitpid(-1, os.WNOHANG). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:10:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 11:10:02 +0000 Subject: [issue35491] multiprocessing: enhance repr() Message-ID: <1544785802.31.0.788709270274.issue35491@psf.upfronthosting.co.za> New submission from STINNER Victor : multiprocessing.Pool has no __repr__() method, multiprocessing.BaseProcess.__repr__() doesn't contain the pid. I propose to enhance repr() in the multiprocessing module to ease debug. commit 2b417fba25f036c2d6139875e389d80e4286ad75 (HEAD -> master, upstream/master) Author: Victor Stinner Date: Fri Dec 14 11:13:18 2018 +0100 Add multiprocessing.Pool.__repr__() (GH-11137) * Add multiprocessing.Pool.__repr__() to ease debug * RUN, CLOSE and TERMINATE constants values are now strings rather than integer to ease debug ---------- components: Library (Lib) messages: 331795 nosy: vstinner priority: normal severity: normal status: open title: multiprocessing: enhance repr() versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:10:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 11:10:12 +0000 Subject: [issue35491] multiprocessing: enhance repr() In-Reply-To: <1544785802.31.0.788709270274.issue35491@psf.upfronthosting.co.za> Message-ID: <1544785812.69.0.788709270274.issue35491@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10382 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:16:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 11:16:02 +0000 Subject: [issue35491] multiprocessing: enhance repr() to ease debugging In-Reply-To: <1544785802.31.0.788709270274.issue35491@psf.upfronthosting.co.za> Message-ID: <1544786162.68.0.788709270274.issue35491@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: multiprocessing: enhance repr() -> multiprocessing: enhance repr() to ease debugging _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:22:35 2018 From: report at bugs.python.org (Jules Lasne) Date: Fri, 14 Dec 2018 11:22:35 +0000 Subject: [issue35492] Missing colon on func statement in library/sys doc Message-ID: <1544786555.59.0.788709270274.issue35492@psf.upfronthosting.co.za> New submission from Jules Lasne : As you can see here, a `:` is missing for the href to be created. https://docs.python.org/3/library/sys.html#sys.get_coroutine_origin_tracking_depth ---------- assignee: docs at python components: Documentation messages: 331796 nosy: docs at python, mdk, seluj78 priority: normal severity: normal status: open title: Missing colon on func statement in library/sys doc versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:23:17 2018 From: report at bugs.python.org (Roundup Robot) Date: Fri, 14 Dec 2018 11:23:17 +0000 Subject: [issue35492] Missing colon on func statement in library/sys doc In-Reply-To: <1544786555.59.0.788709270274.issue35492@psf.upfronthosting.co.za> Message-ID: <1544786597.25.0.788709270274.issue35492@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +10383 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:27:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 11:27:54 +0000 Subject: [issue35493] multiprocessing.Pool._worker_handler(): use SIGCHLD to be notified on worker exit Message-ID: <1544786874.12.0.788709270274.issue35493@psf.upfronthosting.co.za> New submission from STINNER Victor : Currently, multiprocessing.Pool._worker_handler() checks every 100 ms if a worker exited using time.sleep(0.1). It causes a latency if worker exit frequently and the pool has to execute a large number of tasks. Worst case: --- import multiprocessing import time CONCURRENCY = 1 NTASK = 100 def noop(): pass with multiprocessing.Pool(CONCURRENCY, maxtasksperchild=1) as pool: start_time = time.monotonic() results = [pool.apply_async(noop, ()) for _ in range(NTASK)] for result in results: result.get() dt = time.monotonic() - start_time pool.terminate() pool.join() print("Total: %.1f sec" % dt) --- Output: --- Total: 10.2 sec --- The worst case is a pool of 1 process, each worker only executes a single task and the task does nothing (minimize task execution time): the latency is 100 ms per task, which means 10 seconds for 100 tasks. Using SIGCHLD signal to be notified when a worker completes would allow to avoid polling: reduce the latency and reduce CPU usage (the thread doesn't have to be awaken every 100 ms anymore). ---------- components: Library (Lib) messages: 331797 nosy: davin, pablogsal, pitrou, vstinner priority: normal severity: normal status: open title: multiprocessing.Pool._worker_handler(): use SIGCHLD to be notified on worker exit versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:28:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 11:28:34 +0000 Subject: [issue35492] Missing colon on func statement in library/sys doc In-Reply-To: <1544786555.59.0.788709270274.issue35492@psf.upfronthosting.co.za> Message-ID: <1544786914.28.0.788709270274.issue35492@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:28:46 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Dec 2018 11:28:46 +0000 Subject: [issue35492] Missing colon on func statement in library/sys doc In-Reply-To: <1544786555.59.0.788709270274.issue35492@psf.upfronthosting.co.za> Message-ID: <1544786926.41.0.788709270274.issue35492@psf.upfronthosting.co.za> miss-islington added the comment: New changeset cb0f5e29e37c081e9bba91a9858370e2504e9e8e by Miss Islington (bot) (Jules Lasne (jlasne)) in branch 'master': Fixed missing colun in library/sys.po (GH-11153) https://github.com/python/cpython/commit/cb0f5e29e37c081e9bba91a9858370e2504e9e8e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:29:02 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Dec 2018 11:29:02 +0000 Subject: [issue35492] Missing colon on func statement in library/sys doc In-Reply-To: <1544786555.59.0.788709270274.issue35492@psf.upfronthosting.co.za> Message-ID: <1544786942.77.0.788709270274.issue35492@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10385 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:33:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 11:33:11 +0000 Subject: [issue35493] multiprocessing.Pool._worker_handler(): use SIGCHLD to be notified on worker exit In-Reply-To: <1544786874.12.0.788709270274.issue35493@psf.upfronthosting.co.za> Message-ID: <1544787191.86.0.788709270274.issue35493@psf.upfronthosting.co.za> STINNER Victor added the comment: asyncio uses SIGCHLD signal to be notified when a child process completes. SafeChildWatcher calls os.waitpid(pid, os.WNOHANG) on each child process, whereas FastChildWatcher() uses os.waitpid(-1, os.WNOHANG). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:33:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 11:33:27 +0000 Subject: [issue35479] multiprocessing.Pool.join() always takes at least 100 ms In-Reply-To: <1544661414.71.0.788709270274.issue35479@psf.upfronthosting.co.za> Message-ID: <1544787207.34.0.788709270274.issue35479@psf.upfronthosting.co.za> STINNER Victor added the comment: > My PR 11136 doesn't work: _maintain_pool() should be called frequently to check when a worker completed. Polling worker exit status seems inefficient :-( I created bpo-35493: "multiprocessing.Pool._worker_handler(): use SIGCHLD to be notified on worker exit". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:33:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 11:33:41 +0000 Subject: [issue35493] multiprocessing.Pool._worker_handler(): use SIGCHLD to be notified on worker exit In-Reply-To: <1544786874.12.0.788709270274.issue35493@psf.upfronthosting.co.za> Message-ID: <1544787221.13.0.788709270274.issue35493@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-35479: multiprocessing.Pool.join() always takes at least 100 ms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:35:57 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Dec 2018 11:35:57 +0000 Subject: [issue35492] Missing colon on func statement in library/sys doc In-Reply-To: <1544786555.59.0.788709270274.issue35492@psf.upfronthosting.co.za> Message-ID: <1544787357.07.0.788709270274.issue35492@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 527008599dca9377aa3e71da5e5068433ae2222e by Miss Islington (bot) in branch '3.7': Fixed missing colun in library/sys.po (GH-11153) https://github.com/python/cpython/commit/527008599dca9377aa3e71da5e5068433ae2222e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:39:03 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 14 Dec 2018 11:39:03 +0000 Subject: [issue35493] multiprocessing.Pool._worker_handler(): use SIGCHLD to be notified on worker exit In-Reply-To: <1544786874.12.0.788709270274.issue35493@psf.upfronthosting.co.za> Message-ID: <1544787543.41.0.788709270274.issue35493@psf.upfronthosting.co.za> Antoine Pitrou added the comment: How do you use SIGCHLD on Windows? There is actually a portable (and robust) solution: use Process.sentinel https://docs.python.org/3/library/multiprocessing.html#multiprocessing.Process.sentinel There is another issue: Pool is currently subclassed by ThreadPool. You'll probably have to make the two implementations diverge a bit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:48:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 11:48:02 +0000 Subject: [issue35493] multiprocessing.Pool._worker_handler(): use SIGCHLD to be notified on worker exit In-Reply-To: <1544786874.12.0.788709270274.issue35493@psf.upfronthosting.co.za> Message-ID: <1544788082.08.0.788709270274.issue35493@psf.upfronthosting.co.za> STINNER Victor added the comment: > How do you use SIGCHLD on Windows? I'm only proposing to use a signal when it's available, on UNIX. So have multiple implementations of the function, depending on the ability to get notified on completion without polling. On Windows, maybe we could use a dedicated thread to set an event once WaitForSingleObject/WaitForMultipleObjects completes? The design of my bpo-35479 change is to replace polling with one or multiple events. Maybe we can use an event to wakeup _worker_handler() when something happens, but have different wants to signal this event. I have to investigate how Process.sentinel can be used here. I might be interesting to use asyncio internally, but I'm not sure if it's possible ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:56:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 11:56:25 +0000 Subject: [issue35479] multiprocessing.Pool.join() always takes at least 100 ms In-Reply-To: <1544661414.71.0.788709270274.issue35479@psf.upfronthosting.co.za> Message-ID: <1544788585.59.0.788709270274.issue35479@psf.upfronthosting.co.za> STINNER Victor added the comment: _worker_handler has two issues: * It polls the worker status every status every 100 ms: I created bpo-35493 to investigate how to avoid that * After close() or terminate() has been called, it loops until self._cache is empty. I would like to use result.wait(), but a result never completes after terminate(): I created bpo-35478 to see if tasks can be unblocked in that case (to ensure that result.wait() completes after terminate(). ---------- dependencies: +multiprocessing.Pool._worker_handler(): use SIGCHLD to be notified on worker exit, multiprocessing: ApplyResult.get() hangs if the pool is terminated _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:58:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 11:58:56 +0000 Subject: [issue35491] multiprocessing: enhance repr() to ease debugging In-Reply-To: <1544785802.31.0.788709270274.issue35491@psf.upfronthosting.co.za> Message-ID: <1544788736.29.0.788709270274.issue35491@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 7acd50ad8b2a4fe132f7b26980ed3cd209b7ea12 by Victor Stinner in branch 'master': bpo-35491: Enhance multiprocessing.BaseProcess.__repr__() (GH-11138) https://github.com/python/cpython/commit/7acd50ad8b2a4fe132f7b26980ed3cd209b7ea12 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:59:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 11:59:08 +0000 Subject: [issue35491] multiprocessing: enhance repr() to ease debugging In-Reply-To: <1544785802.31.0.788709270274.issue35491@psf.upfronthosting.co.za> Message-ID: <1544788748.44.0.788709270274.issue35491@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 Fri Dec 14 07:05:47 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 14 Dec 2018 12:05:47 +0000 Subject: [issue35493] multiprocessing.Pool._worker_handler(): use SIGCHLD to be notified on worker exit In-Reply-To: <1544786874.12.0.788709270274.issue35493@psf.upfronthosting.co.za> Message-ID: <1544789147.45.0.788709270274.issue35493@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Using asyncio internally would be an interesting long-term goal, at least for the process pool version. Perhaps a first step is to find out how to await a multiprocessing Connection or Queue, or make async versions of these classes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:06:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 12:06:52 +0000 Subject: [issue34279] RFC: issue a warning in regrtest when no tests have been executed? In-Reply-To: <1532947707.98.0.56676864532.issue34279@psf.upfronthosting.co.za> Message-ID: <1544789212.21.0.788709270274.issue34279@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3a8f4fef4a4dd0e4a800545468eef9542e126181 by Victor Stinner in branch 'master': bpo-34279: regrtest consider that skipped tests are ran (GH-11132) https://github.com/python/cpython/commit/3a8f4fef4a4dd0e4a800545468eef9542e126181 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:06:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 12:06:52 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1544789212.34.0.702299269573.issue35412@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3a8f4fef4a4dd0e4a800545468eef9542e126181 by Victor Stinner in branch 'master': bpo-34279: regrtest consider that skipped tests are ran (GH-11132) https://github.com/python/cpython/commit/3a8f4fef4a4dd0e4a800545468eef9542e126181 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:07:04 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Dec 2018 12:07:04 +0000 Subject: [issue34279] RFC: issue a warning in regrtest when no tests have been executed? In-Reply-To: <1532947707.98.0.56676864532.issue34279@psf.upfronthosting.co.za> Message-ID: <1544789224.2.0.788709270274.issue34279@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10386 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:07:04 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Dec 2018 12:07:04 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1544789224.33.0.663665092547.issue35412@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10387 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:07:15 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Dec 2018 12:07:15 +0000 Subject: [issue34279] RFC: issue a warning in regrtest when no tests have been executed? In-Reply-To: <1532947707.98.0.56676864532.issue34279@psf.upfronthosting.co.za> Message-ID: <1544789235.99.0.788709270274.issue34279@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10388 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:07:16 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Dec 2018 12:07:16 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1544789236.13.0.663665092547.issue35412@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10389 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:07:28 2018 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Fri, 14 Dec 2018 12:07:28 +0000 Subject: [issue2661] Mapping tests cannot be passed by user implementations In-Reply-To: <1208642973.7.0.825847798287.issue2661@psf.upfronthosting.co.za> Message-ID: <1544789248.02.0.788709270274.issue2661@psf.upfronthosting.co.za> Change by Walter D?rwald : ---------- pull_requests: +10390 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:08:59 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 14 Dec 2018 12:08:59 +0000 Subject: [issue35493] multiprocessing.Pool._worker_handler(): use SIGCHLD to be notified on worker exit In-Reply-To: <1544786874.12.0.788709270274.issue35493@psf.upfronthosting.co.za> Message-ID: <1544789339.45.0.788709270274.issue35493@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I have to investigate how Process.sentinel can be used here. Look how concurrent.futures uses it: https://github.com/python/cpython/blob/master/Lib/concurrent/futures/process.py#L348 This also means: 1) we could redirect people to ProcessPoolExecutor instead of trying to backport all its features into multiprocessing.Pool 2) we could try to refactor the ProcessPoolExecutor implementation into a common backend for both ProcessPoolExecutor and multiprocessing.Pool ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:11:30 2018 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Fri, 14 Dec 2018 12:11:30 +0000 Subject: [issue2661] Mapping tests cannot be passed by user implementations In-Reply-To: <1208642973.7.0.825847798287.issue2661@psf.upfronthosting.co.za> Message-ID: <1544789490.51.0.788709270274.issue2661@psf.upfronthosting.co.za> Walter D?rwald added the comment: OK, I've created the pull request (11157). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:13:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 12:13:35 +0000 Subject: [issue34279] RFC: issue a warning in regrtest when no tests have been executed? In-Reply-To: <1532947707.98.0.56676864532.issue34279@psf.upfronthosting.co.za> Message-ID: <1544789615.61.0.788709270274.issue34279@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10393 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:13:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 12:13:35 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1544789615.73.0.663665092547.issue35412@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10394 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:14:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 12:14:12 +0000 Subject: [issue35346] Modernize Lib/platform.py code In-Reply-To: <1543455759.08.0.788709270274.issue35346@psf.upfronthosting.co.za> Message-ID: <1544789652.75.0.788709270274.issue35346@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 4aa917c5feaec07a6f6db87b34185ab6180e20ee by Victor Stinner in branch 'master': bpo-35346: Cleanup platform.architecture() (GH-11130) https://github.com/python/cpython/commit/4aa917c5feaec07a6f6db87b34185ab6180e20ee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:15:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 12:15:57 +0000 Subject: [issue35346] Modernize Lib/platform.py code In-Reply-To: <1543455759.08.0.788709270274.issue35346@psf.upfronthosting.co.za> Message-ID: <1544789757.58.0.788709270274.issue35346@psf.upfronthosting.co.za> STINNER Victor added the comment: I close the issue. I made that changes that I wanted :-) Serhiy: reopen the issue or open a new one if you want to remove the try/except ImportError around "import plistlib". ---------- dependencies: -Problems with handling the file command output in platform.architecture() resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:18:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 12:18:25 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1544789905.89.0.788709270274.issue35348@psf.upfronthosting.co.za> STINNER Victor added the comment: I removed the dependency between bpo-35346 and this issue. I don't see how they are related. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:20:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 12:20:39 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1544790039.44.0.788709270274.issue35348@psf.upfronthosting.co.za> STINNER Victor added the comment: > I agreed with Serhiy. I also found the function decode the output with latin-1, I think it will be better to use utf-8 instead. Decoding from UTF-8 can fail with UnicodeDecodeError, whereas decoding from latin-1 never fails. file output is ASCII, so I don't see the point of using UTF-8. Currently, the command displays the filename, but I don't think that we should care of the encoding of the filename. > I think that the "-b" option should be restored. That, or strip/skip the filename in the output? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:27:02 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Dec 2018 12:27:02 +0000 Subject: [issue34279] RFC: issue a warning in regrtest when no tests have been executed? In-Reply-To: <1532947707.98.0.56676864532.issue34279@psf.upfronthosting.co.za> Message-ID: <1544790422.46.0.788709270274.issue34279@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 5f252e1ebc098fff7f88fbf89d203b1dd15fe7fa by Miss Islington (bot) in branch '3.7': bpo-34279: regrtest consider that skipped tests are ran (GH-11132) https://github.com/python/cpython/commit/5f252e1ebc098fff7f88fbf89d203b1dd15fe7fa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:27:02 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Dec 2018 12:27:02 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1544790422.6.0.702299269573.issue35412@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 5f252e1ebc098fff7f88fbf89d203b1dd15fe7fa by Miss Islington (bot) in branch '3.7': bpo-34279: regrtest consider that skipped tests are ran (GH-11132) https://github.com/python/cpython/commit/5f252e1ebc098fff7f88fbf89d203b1dd15fe7fa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:29:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 12:29:41 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1544790581.45.0.788709270274.issue35348@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10395 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:30:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 12:30:56 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1544790656.36.0.788709270274.issue35348@psf.upfronthosting.co.za> STINNER Victor added the comment: -b option added by: https://hg.python.org/cpython/rev/c73b90b6dadd and removed the day after by: https://hg.python.org/cpython/rev/b94a9ff13199 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:33:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 12:33:08 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1544790788.64.0.788709270274.issue35348@psf.upfronthosting.co.za> STINNER Victor added the comment: > -b option added by: > https://hg.python.org/cpython/rev/c73b90b6dadd Oh wait, this change is for the 2.7 branch. The change in master (old "default" branch) didn't add -b, but replaced "-b" with "-b --": https://hg.python.org/cpython/rev/cd026866b333 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:37:28 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 12:37:28 +0000 Subject: [issue35471] Remove macpath module In-Reply-To: <1544628177.37.0.788709270274.issue35471@psf.upfronthosting.co.za> Message-ID: <1544791048.48.0.788709270274.issue35471@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d7538dd5e3e04a8db22e1470cb2ed696bf3be160 by Victor Stinner in branch 'master': bpo-35471: Remove the macpath module (GH-11129) https://github.com/python/cpython/commit/d7538dd5e3e04a8db22e1470cb2ed696bf3be160 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:39:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 12:39:54 +0000 Subject: [issue35471] Remove macpath module In-Reply-To: <1544628177.37.0.788709270274.issue35471@psf.upfronthosting.co.za> Message-ID: <1544791194.08.0.788709270274.issue35471@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 Fri Dec 14 07:42:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 12:42:01 +0000 Subject: [issue35424] multiprocessing.Pool: emit ResourceWarning In-Reply-To: <1544058034.55.0.788709270274.issue35424@psf.upfronthosting.co.za> Message-ID: <1544791321.49.0.788709270274.issue35424@psf.upfronthosting.co.za> STINNER Victor added the comment: See this discussion: [Python-Dev] Usage of the multiprocessing API and object lifetime https://mail.python.org/pipermail/python-dev/2018-December/155946.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:44:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 12:44:12 +0000 Subject: [issue34279] RFC: issue a warning in regrtest when no tests have been executed? In-Reply-To: <1532947707.98.0.56676864532.issue34279@psf.upfronthosting.co.za> Message-ID: <1544791452.41.0.788709270274.issue34279@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 34b7c438b8dc0a1e7e23c9b2d7ce7f8a7c31b4f4 by Victor Stinner in branch '2.7': bpo-34279: regrtest consider that skipped tests are ran (GH-11132) (GH-11158) https://github.com/python/cpython/commit/34b7c438b8dc0a1e7e23c9b2d7ce7f8a7c31b4f4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:44:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 12:44:12 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1544791452.55.0.702299269573.issue35412@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 34b7c438b8dc0a1e7e23c9b2d7ce7f8a7c31b4f4 by Victor Stinner in branch '2.7': bpo-34279: regrtest consider that skipped tests are ran (GH-11132) (GH-11158) https://github.com/python/cpython/commit/34b7c438b8dc0a1e7e23c9b2d7ce7f8a7c31b4f4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 08:30:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 13:30:57 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1544794257.13.0.788709270274.issue35348@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I tested that the "-b" option is supported on Linux, *BSD and OpenIndiana. But it is not a part of POSIX. So perhaps we should fall back to "file" without "-b" if "file -b" failed. We can also check that the output starts with executable+': ' and strip this prefix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 08:34:17 2018 From: report at bugs.python.org (Sebastian Linke) Date: Fri, 14 Dec 2018 13:34:17 +0000 Subject: [issue35494] Inaccurate error message for f-string Message-ID: <1544794457.33.0.788709270274.issue35494@psf.upfronthosting.co.za> New submission from Sebastian Linke : Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> spam = 'spam' >>> f'{spam[0}' File "", line 1 SyntaxError: f-string: expecting '}' The error message seems wrong because a "]" is missing rather than a "}". ---------- components: Interpreter Core messages: 331827 nosy: seblin priority: normal severity: normal status: open title: Inaccurate error message for f-string versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 08:40:48 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 14 Dec 2018 13:40:48 +0000 Subject: [issue35494] Inaccurate error message for f-string In-Reply-To: <1544794457.33.0.788709270274.issue35494@psf.upfronthosting.co.za> Message-ID: <1544794848.32.0.788709270274.issue35494@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- assignee: -> eric.smith nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:04:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 14:04:32 +0000 Subject: [issue35494] Inaccurate error message for f-string In-Reply-To: <1544794457.33.0.788709270274.issue35494@psf.upfronthosting.co.za> Message-ID: <1544796272.84.0.788709270274.issue35494@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I can take this issue if you do not mind. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:21:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 14:21:25 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1544797285.82.0.788709270274.issue35348@psf.upfronthosting.co.za> STINNER Victor added the comment: In 2.7 branch, _syscmd_file() only used -b option during one day (no Python 2.7.x release used -b): * Oct 4, 2012: commit 95038fa526c8b93e42c59b0735edf1c80b7b6449 added -b: "Closes #16112: platform.architecture does not correctly escape argument to /usr/bin/file" * Oct 5, 2012: commit 2699c9d24810196a07e0577215ec3beb7ecfb55b removed -b: "#16112: platform.architecture does not correctly escape argument to /usr/bin/file. Fix original patch" Python 3.2.0 (Feb 2011) to 3.2.3 (Sep 2012) and Python 3.3.0 (Sep 2012) used -b: * Aug 13, 2010: commit ddfb2c3a338a8c1550774648f816e96c41f59de1 added -b: "Omit the filename to avoid enconding issues, especially with non encodable characters in the Python full path." * Oct 5, 2012: commit 685fffa8f427b3a768b232170752565d58c32112 removed -b: "#16112: platform.architecture does not correctly escape argument to /usr/bin/file. Fix original patch" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:27:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 14:27:31 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1544797651.67.0.788709270274.issue35348@psf.upfronthosting.co.za> STINNER Victor added the comment: > We can also check that the output starts with executable+': ' and strip this prefix. Technically, on UNIX, ':' is valid in a filename. Filename examples which contain ':' on my Fedora 29: /usr/share/man/man3/List::Util.3pm.gz /usr/share/usb_modeswitch/0408:f000 /proc/irq/127/ahci[0000:00:17.0] /proc/irq/131/snd_hda_intel:card0 /dev/block/259:3 /sys/kernel/slab/:0002632 /sys/module/psmouse/drivers/serio:psmouse Note: I cannot find a program name which contains ':'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:28:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 14:28:01 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1544797681.68.0.788709270274.issue35348@psf.upfronthosting.co.za> STINNER Victor added the comment: A convervative approach would be to leave stable branches unchanged and use -b in the master branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:36:25 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 14 Dec 2018 14:36:25 +0000 Subject: [issue35494] Inaccurate error message for f-string In-Reply-To: <1544794457.33.0.788709270274.issue35494@psf.upfronthosting.co.za> Message-ID: <1544798185.36.0.788709270274.issue35494@psf.upfronthosting.co.za> Eric V. Smith added the comment: Go ahead, Serhiy. Thanks! ---------- assignee: eric.smith -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:55:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 14:55:24 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1544799324.36.0.788709270274.issue35348@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10396 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:56:07 2018 From: report at bugs.python.org (Sebastian Linke) Date: Fri, 14 Dec 2018 14:56:07 +0000 Subject: [issue35494] Inaccurate error message for f-string In-Reply-To: <1544794457.33.0.788709270274.issue35494@psf.upfronthosting.co.za> Message-ID: <1544799367.09.0.788709270274.issue35494@psf.upfronthosting.co.za> Sebastian Linke added the comment: The same behavior applies to f'{spam[}' and f'{spam(}'. Also to f'{spam{}', but that might be expected. This message is more clear: >>> f'{spam(' File "", line 1 SyntaxError: f-string: mismatched '(', '{', or '[' Perhaps you want to apply that to the above error cases. Then you wouldn't have to catch any type of bracket. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 10:04:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 15:04:04 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1544799844.32.0.788709270274.issue35348@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 11160 is an alternate solution which strips the filename in the output. It does not matter if the filename contains ":", because the format of the output in the POSIX locale is strictly specified. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 10:20:37 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 14 Dec 2018 15:20:37 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1544800837.91.0.788709270274.issue35348@psf.upfronthosting.co.za> Ronald Oussoren added the comment: BTW. A related problem with platform.architecture() is that it doesn't know how to deal with fat binaries (such as those found on macOS). As an example: $ file /usr/bin/python /usr/bin/python: Mach-O universal binary with 2 architectures: [i386:Mach-O executable i386] [x86_64:Mach-O 64-bit executable x86_64] /usr/bin/python (for architecture i386): Mach-O executable i386 /usr/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64 This will be reported as "64-bit" by platform.architecture() because there is '64-bit' in the output of file(1). Using sizeof(void*) or sys.maxsize suffers from the a simular problem: this will only detect the pointer-size of the current proces and not that the binary is capable of running with a different pointer-size as well. P.S. platform.architecture() uses file(1) because you can specify different executables than sys.executable. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 10:59:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 15:59:00 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1544803140.73.0.788709270274.issue35348@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What result of platform.architecture() do you expect for an universal binary? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 10:59:40 2018 From: report at bugs.python.org (Ryan Govostes) Date: Fri, 14 Dec 2018 15:59:40 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument Message-ID: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za> New submission from Ryan Govostes : import argparse parser = argparse.ArgumentParser() parser.add_argument('things', nargs=argparse.REMAINDER, default=['nothing']) parser.parse_args([]) >>> Namespace(things=[]) Since there were no unparsed arguments remaining, the `default` setting for `things` should have been honored. However it silently ignores this setting. If there's a reason why this wouldn't be desirable, it should raise an exception that the options aren't compatible. ---------- components: Library (Lib) messages: 331837 nosy: rgov priority: normal severity: normal status: open title: argparse does not honor default argument for nargs=argparse.REMAINDER argument type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 11:00:12 2018 From: report at bugs.python.org (Ryan Govostes) Date: Fri, 14 Dec 2018 16:00:12 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument In-Reply-To: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za> Message-ID: <1544803212.92.0.788709270274.issue35495@psf.upfronthosting.co.za> Change by Ryan Govostes : ---------- 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 Dec 14 11:06:16 2018 From: report at bugs.python.org (Steve Newcomb) Date: Fri, 14 Dec 2018 16:06:16 +0000 Subject: [issue35496] left-to-right violation in match order Message-ID: <1544803576.39.0.788709270274.issue35496@psf.upfronthosting.co.za> New submission from Steve Newcomb : Documentation for the re module insists that matches are made left-to-right within the alternatives delimited by an "or* | group. I seem to have found a case where the rightmost alternative is matched unless it (and only it) is commented out. See attached script, which is self-explanatory. ---------- files: left-to-right_violation_in_python3_re_match.py messages: 331838 nosy: steve.newcomb priority: normal severity: normal status: open title: left-to-right violation in match order type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file47997/left-to-right_violation_in_python3_re_match.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 11:12:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 16:12:32 +0000 Subject: [issue35494] Inaccurate error message for f-string In-Reply-To: <1544794457.33.0.788709270274.issue35494@psf.upfronthosting.co.za> Message-ID: <1544803952.84.0.788709270274.issue35494@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10397 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 11:13:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 16:13:49 +0000 Subject: [issue35494] Inaccurate error message for f-string In-Reply-To: <1544794457.33.0.788709270274.issue35494@psf.upfronthosting.co.za> Message-ID: <1544804029.41.0.788709270274.issue35494@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 11161 uses an approach similar to issue33306. ---------- dependencies: +Improving SyntaxError for unmatched parentheses _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 11:14:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 16:14:02 +0000 Subject: [issue35494] Inaccurate error message for f-string In-Reply-To: <1544794457.33.0.788709270274.issue35494@psf.upfronthosting.co.za> Message-ID: <1544804042.37.0.788709270274.issue35494@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: -> enhancement versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 11:19:12 2018 From: report at bugs.python.org (Manjusaka) Date: Fri, 14 Dec 2018 16:19:12 +0000 Subject: [issue35497] Libary select docs enhance Message-ID: <1544804352.43.0.788709270274.issue35497@psf.upfronthosting.co.za> New submission from Manjusaka : Since Python 3.7, Python adds a mask variable named EPOLLEXCLUSIVE for select.epoll. The mask variable is supported by the Linux Kernel since Kernel 4.5. So we can add a tip in this part of Python docs to notice the people the case. ---------- components: Library (Lib) messages: 331840 nosy: Manjusaka priority: normal severity: normal status: open title: Libary select docs enhance type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 11:24:29 2018 From: report at bugs.python.org (Manjusaka) Date: Fri, 14 Dec 2018 16:24:29 +0000 Subject: [issue35497] Libary select docs enhance In-Reply-To: <1544804352.43.0.788709270274.issue35497@psf.upfronthosting.co.za> Message-ID: <1544804669.93.0.788709270274.issue35497@psf.upfronthosting.co.za> Change by Manjusaka : ---------- keywords: +patch pull_requests: +10398 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 11:55:17 2018 From: report at bugs.python.org (Joshua Cannon) Date: Fri, 14 Dec 2018 16:55:17 +0000 Subject: [issue35498] Parents objects in pathlib.Path don't support slices as __getitem__ arguments Message-ID: <1544806517.4.0.788709270274.issue35498@psf.upfronthosting.co.za> New submission from Joshua Cannon : I would expect the following to work: ``` >>> import pathlib >>> pathlib.Path.cwd().parents[0:1] Traceback (most recent call last): File "", line 1, in File "...\Python36\lib\pathlib.py", line 593, in __getitem__ if idx < 0 or idx >= len(self): TypeError: '<' not supported between instances of 'slice' and 'int' ``` Since pathlib documents `parents` as a sequence-type, and slicing a sequence is pretty standard behavior. ---------- components: Library (Lib) messages: 331841 nosy: thejcannon priority: normal severity: normal status: open title: Parents objects in pathlib.Path don't support slices as __getitem__ arguments type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 12:05:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 17:05:48 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1544807148.86.0.788709270274.issue35412@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 Fri Dec 14 12:13:18 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 14 Dec 2018 17:13:18 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544807598.43.0.788709270274.issue35402@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset f8e9bd568adf85c1e4aea1dda542a96b027797e2 by Steve Dower in branch 'master': bpo-35402: Update Windows build to use Tcl and Tk 8.6.9 (GH-11146) https://github.com/python/cpython/commit/f8e9bd568adf85c1e4aea1dda542a96b027797e2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 12:13:39 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Dec 2018 17:13:39 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544807619.34.0.788709270274.issue35402@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10399 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 12:20:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 17:20:59 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1544808059.61.0.788709270274.issue35348@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't understand the purpose of the 'linkage' information of platform.architecture(). Does anyone care if Python is an ELF program or a WindowsPE program? Maybe it was useful 20 years ago when there were COFF on Unix, but right now ELF is the defacto standard on Unix, and WindowsPE on Windows. 32-bit and 64-bit information should be enough, no? I would suggest to just return ('%sbit' % bits, '') if executable is not set. Use struct.calcsize('P')*8 or sys.maxsize to get bits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 12:49:13 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 14 Dec 2018 17:49:13 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544809753.87.0.788709270274.issue35402@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 77824ef6e50e8a47a0b57df2d9f3b48bffd414ac by Steve Dower (Miss Islington (bot)) in branch '3.7': bpo-35402: Update Windows build to use Tcl and Tk 8.6.9 (GH-11146) https://github.com/python/cpython/commit/77824ef6e50e8a47a0b57df2d9f3b48bffd414ac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 13:07:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 18:07:58 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1544810878.55.0.788709270274.issue35257@psf.upfronthosting.co.za> STINNER Victor added the comment: There are multiple ways to configure and build Python, we should try most combinations: * ./configure --enable-shared * ./configure --with-lto * ./configure --enable-optimizations * make profile-opt * make * Maybe also: make install Test: * Build Python and make sure that python binary and C extensions (of the stdlib) are compiled with LTO * python-config --cflags and python-config --ldflags don't leak LTO flags * Build a C extension (Pillow) and check that there is no LTO flag in the command lines I'm not how to test cross-compilation :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 13:11:33 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 14 Dec 2018 18:11:33 +0000 Subject: [issue27715] call-matcher breaks if a method is mocked with spec=True In-Reply-To: <1470710605.81.0.432461136624.issue27715@psf.upfronthosting.co.za> Message-ID: <1544811093.45.0.788709270274.issue27715@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I think the original issue with patch.object reported by Carl is different from the one reported by David for autospec. Analyzed the report by David and When we call autospec on a class with instance=True then the spec is modeled on the signature of __call__ instead of __init__ where __call__ has the signature of (self, x) and self is discarded with _eat_self passed as True. But mock also stores _spec_signature that is not aware of skipping self and has the signature as (self, x) and is used for checking signature in mock.assert_called_with. When instance=True then kwargs['_spec_as_instance']=True so does it makes sense to set kwargs['_eat_self'] = True at [0] ? I applied the change and there are no test failures so this deserves a test. This makes __call__ to have a different signature when it's called from mock and when the call is checked with assert_called_with_once. But it's not the case for methods of the class where self is skipped both for mock and _spec_signature. Since __signature__ is set for mock with my PR this makes it little easy to debug. Can this be dealt as a separate issue? I would also love to see if the assertion message can be improved since expected_call and actual_call are printed with repr version of the call object in spite of the signature failure. This has caused confusion here and in other places like issue26752 and issue25312. Sample program to demonstrate difference in signatures : import inspect from unittest import mock class Foo: def __call__(self, x): return x def bar(self, x): pass m = mock.create_autospec(Foo, instance=True) m(7) m.bar(7) print(inspect.signature(m)) print(m._spec_signature) print(inspect.signature(m.bar)) print(m.bar._spec_signature) m.bar.assert_called_once_with(7) # 7 passed as self with no value for x m.assert_called_once_with(7) # Fails due to self (x) (self, x) # self is not skipped in _spec_signature (x) (x) TypeError: missing a required argument: 'x' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "../backups/bpo27715_1.py", line 20, in m.assert_called_once_with(7) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 840, in assert_called_once_with return self.assert_called_with(*args, **kwargs) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 827, in assert_called_with raise AssertionError(_error_message()) from cause AssertionError: Expected call: mock(7) Actual call: mock(7) [0] https://github.com/python/cpython/blob/f8e9bd568adf85c1e4aea1dda542a96b027797e2/Lib/unittest/mock.py#L2199 ---------- nosy: +cjw296, mariocj89 versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 13:25:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 18:25:57 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST Message-ID: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> New submission from STINNER Victor : Makefile.pre.in contains the rule: build_all_generate_profile: $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_GEN_FLAG)" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)" I'm not sure that CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_GEN_FLAG)" is correct: it overrides user $CFLAGS_NODIST variable. I suggest to replace it with CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)": add $(PGO_PROF_GEN_FLAG) to CFLAGS_NODIST, don't copy $CFLAGS to $CFLAGS_NODIST (and add $(PGO_PROF_GEN_FLAG)). The code comes from bpo-23390: commit 2f90aa63666308e7a9b2d0a89110e0be445a393a Author: Gregory P. Smith Date: Wed Feb 4 02:11:56 2015 -0800 Fixes issue23390: make profile-opt causes -fprofile-generate and related flags to end up in distutils CFLAGS. (...) build_all_generate_profile: - $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov" + $(MAKE) all CFLAGS_NODIST="$(CFLAGS) -fprofile-generate" LDFLAGS="-fprofile-generate" LIBS="$(LIBS) -lgcov" (...) CFLAGS_NODIST has been added by bpo-21121: commit acb8c5234302f8057b331abaafb2cc8697daf58f Author: Benjamin Peterson Date: Sat Aug 9 20:01:49 2014 -0700 add -Werror=declaration-after-statement only to stdlib extension modules (closes #21121) Patch from Stefan Krah. This issue is related to bpo-35257: "Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST". ---------- components: Build messages: 331847 nosy: vstinner priority: normal severity: normal status: open title: "make profile-opt" overrides CFLAGS_NODIST versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 13:29:03 2018 From: report at bugs.python.org (A. Skrobov) Date: Fri, 14 Dec 2018 18:29:03 +0000 Subject: [issue26415] Excessive peak memory consumption by the Python parser In-Reply-To: <1456182380.09.0.81920177296.issue26415@psf.upfronthosting.co.za> Message-ID: <1544812143.26.0.788709270274.issue26415@psf.upfronthosting.co.za> A. Skrobov added the comment: I've run pyperformance (0.7.0) with my updated patch, and posted results at the PR page. They look encouraging enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 13:38:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 18:38:51 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1544812731.7.0.788709270274.issue35499@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10400 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 13:45:46 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 14 Dec 2018 18:45:46 +0000 Subject: [issue35500] Align expected and actual calls on mock.assert_called_with error message Message-ID: <1544813146.35.0.788709270274.issue35500@psf.upfronthosting.co.za> New submission from Karthikeyan Singaravelan : Currently, assert_called_with has expected calls list in the same line with AssertionError that causes the visualizing the difference to be hard. It will be great if Expected call occurs on the next line so that the diff is improved. The change has to be made at https://github.com/python/cpython/blob/f8e9bd568adf85c1e4aea1dda542a96b027797e2/Lib/unittest/mock.py#L749 . from unittest import mock m = mock.Mock() m(1, 2) m.assert_called_with(2, 3) Current output : Traceback (most recent call last): File "/tmp/bar.py", line 5, in m.assert_called_with(2, 3) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/mock.py", line 820, in assert_called_with raise AssertionError(_error_message()) from cause AssertionError: Expected call: mock(2, 3) Actual call: mock(1, 2) Proposed output : Traceback (most recent call last): File "/tmp/bar.py", line 5, in m.assert_called_with(2, 3) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 827, in assert_called_with raise AssertionError(_error_message()) from cause AssertionError: Expected call: mock(2, 3) Actual call: mock(1, 2) Some more alignment with the call list starting in the same column AssertionError: Expected call: mock(2, 3) Actual call: mock(1, 2) Originally reported in the GitHub repo at https://github.com/testing-cabal/mock/issues/424 . PR for this was closed since GitHub is used only for backporting (https://github.com/testing-cabal/mock/pull/425). I thought to report it here for discussion. Currently call list output is as per proposed output. AssertionError: Calls not found. Expected: [call(1, 2, 3)] Actual: [call(1, 2)]. ---------- components: Library (Lib) messages: 331849 nosy: cjw296, mariocj89, michael.foord, xtreak priority: normal severity: normal status: open title: Align expected and actual calls on mock.assert_called_with error message type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 13:47:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 18:47:02 +0000 Subject: [issue35501] "make coverage" should use leak coverage flags to third party C extensions Message-ID: <1544813222.33.0.788709270274.issue35501@psf.upfronthosting.co.za> New submission from STINNER Victor : "make coverage" modifies CFLAGS and LIBS, Makefile.pre.in: coverage: @echo "Building with support for coverage checking:" $(MAKE) clean profile-removal $(MAKE) @DEF_MAKE_RULE@ CFLAGS="$(CFLAGS) -O0 -pg -fprofile-arcs -ftest-coverage" LIBS="$(LIBS) -lgcov" CFLAGS_NODIST should be used instead here. I'm not sure about LIBS: do we need LIBS_NODIST, as we have CFLAGS_NODIST? LIBS_NODIST would be used for Python and C extensions of the stdlib, but not for third-party C extensions: not used by distutils. See also bpo-35257: "Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST". ---------- components: Build messages: 331850 nosy: vstinner priority: normal severity: normal status: open title: "make coverage" should use leak coverage flags to third party C extensions versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 13:53:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 18:53:30 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1544813610.22.0.788709270274.issue35499@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote PR 11164 to fix the issue. Example: $ git clean -fdx $ ./configure --with-pydebug $ make profile-opt CFLAGS_NODIST="-O1" (...) gcc -pthread -c -Wno-unused-result -Wsign-compare -g -Og -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fprofile-generate -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Programs/python.o ./Programs/python.c (...) => CFLAGS_NODIST is missing: I don't see -O1 in the command line. With my change: $ git clean -fdx $ ./configure --with-pydebug $ make profile-opt CFLAGS_NODIST="-O1" (...) gcc -pthread -c -Wno-unused-result -Wsign-compare -g -Og -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -O1 -fprofile-generate -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Programs/python.o ./Programs/python.c (...) => CFLAGS_NODIST is used: I see "-O1" in the command line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 13:55:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 18:55:07 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1544813707.93.0.788709270274.issue35257@psf.upfronthosting.co.za> STINNER Victor added the comment: See also: * bpo-35499: "make profile-opt" overrides CFLAGS_NODIST * bpo-35501: "make coverage" should use leak coverage flags to third party C extensions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 14:13:25 2018 From: report at bugs.python.org (Joshua Cannon) Date: Fri, 14 Dec 2018 19:13:25 +0000 Subject: [issue35498] Parents objects in pathlib.Path don't support slices as __getitem__ arguments In-Reply-To: <1544806517.4.0.788709270274.issue35498@psf.upfronthosting.co.za> Message-ID: <1544814805.14.0.788709270274.issue35498@psf.upfronthosting.co.za> Change by Joshua Cannon : ---------- keywords: +patch pull_requests: +10401 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 14:22:09 2018 From: report at bugs.python.org (Joshua Cannon) Date: Fri, 14 Dec 2018 19:22:09 +0000 Subject: [issue35498] Parents objects in pathlib.Path don't support slices as __getitem__ arguments In-Reply-To: <1544806517.4.0.788709270274.issue35498@psf.upfronthosting.co.za> Message-ID: <1544815329.25.0.788709270274.issue35498@psf.upfronthosting.co.za> Joshua Cannon added the comment: If it is deemed a bug which needs to be fixed, I've gone ahead and attached the PR to fix it. CLA signage is pending approval at the company I work for, with most people out for the holidays (so it might be a day or two turnaround). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 14:26:35 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Dec 2018 19:26:35 +0000 Subject: [issue35441] Dead (and buggy) code due to mishandling of PyList_SetItem() errors In-Reply-To: <1544278622.71.0.788709270274.issue35441@psf.upfronthosting.co.za> Message-ID: <1544815595.59.0.788709270274.issue35441@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Can this be closed? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 14:27:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 19:27:36 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1544815656.87.0.788709270274.issue35499@psf.upfronthosting.co.za> STINNER Victor added the comment: I also tested CFLAGS, just in case. Current behavior: $ git clean -fdx $ ./configure --with-pydebug $ make profile-opt CFLAGS="-O1" (...) gcc -pthread -c -Wno-unused-result -Wsign-compare -g -Og -Wall -O1 -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fprofile-generate -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Programs/python.o ./Programs/python.c (...) => CFLAGS is respected: I see -O1 in the command line. With PR 11164: $ git clean -fdx $ ./configure --with-pydebug $ make profile-opt CFLAGS="-O1" (...) gcc -pthread -c -Wno-unused-result -Wsign-compare -g -Og -Wall -O1 -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fprofile-generate -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Programs/python.o ./Programs/python.c (...) => CFLAGS is respected: I see -O1 in the command line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 14:29:04 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Dec 2018 19:29:04 +0000 Subject: [issue35442] Chain of several subcommands in argparse In-Reply-To: <1544306329.79.0.788709270274.issue35442@psf.upfronthosting.co.za> Message-ID: <1544815744.14.0.788709270274.issue35442@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A better place to discuss format and API is python-ideas list. Almost certainly will see responses there. ---------- nosy: +terry.reedy stage: -> test needed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 14:31:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 19:31:26 +0000 Subject: [issue35441] Dead (and buggy) code due to mishandling of PyList_SetItem() errors In-Reply-To: <1544278622.71.0.788709270274.issue35441@psf.upfronthosting.co.za> Message-ID: <1544815886.65.0.788709270274.issue35441@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Needed to backport it to 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 14:37:40 2018 From: report at bugs.python.org (Tim Peters) Date: Fri, 14 Dec 2018 19:37:40 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1544816260.42.0.788709270274.issue35431@psf.upfronthosting.co.za> Tim Peters added the comment: Just for fun, here's a gonzo implementation (without arg-checking) using ideas from the sketch. All factors of 2 are shifted out first, and all divisions are done before any multiplies. For large arguments, this can run much faster than a dumb loop. For example, combp(10**100, 400) takes about a quarter the time of a dumb-loop divide-each-time-thru implementation. # Return number of trailing zeroes in `n`. def tzc(n): result = 0 if n: mask = 1 while n & mask == 0: result += 1 mask <<= 1 return result # Return exponent of prime `p` in prime factorization of # factorial(k). def facexp(k, p): result = 0 k //= p while k: result += k k //= p return result def combp(n, k): from heapq import heappop, heapify, heapreplace if n-k < k: k = n-k if k == 0: return 1 if k == 1: return n firstnum = n - k + 1 nums = list(range(firstnum, n+1)) assert len(nums) == k # Shift all factors of 2 out of numerators. shift2 = 0 for i in range(firstnum & 1, k, 2): val = nums[i] c = tzc(val) assert c nums[i] = val >> c shift2 += c shift2 -= facexp(k, 2) # cancel all 2's in factorial(k) assert shift2 >= 0 # Any prime generator is fine here. `k` can't be # huge, and we only want the primes through `k`. pgen = psieve() p = next(pgen) assert p == 2 for p in pgen: if p > k: break pcount = facexp(k, p) assert pcount # Divide that many p's out of numerators. i = firstnum % p if i: i = p - i for i in range(i, k, p): val, r = divmod(nums[i], p) assert r == 0 pcount -= 1 while pcount: val2, r = divmod(val, p) if r: break else: val = val2 pcount -= 1 nums[i] = val if pcount == 0: break assert pcount == 0 heapify(nums) while len(nums) > 1: a = heappop(nums) heapreplace(nums, a * nums[0]) return nums[0] << shift2 I'm NOT suggesting to adopt this. Just for history in the unlikely case there's worldwide demand for faster `comb` of silly arguments ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 14:57:39 2018 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 14 Dec 2018 19:57:39 +0000 Subject: [issue32810] Expose ags_gen and agt_gen in asynchronous generators In-Reply-To: <1518205773.11.0.467229070634.issue32810@psf.upfronthosting.co.za> Message-ID: <1544817459.01.0.788709270274.issue32810@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +10403 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 14:58:26 2018 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 14 Dec 2018 19:58:26 +0000 Subject: [issue32810] Expose ags_gen and agt_gen in asynchronous generators In-Reply-To: <1518205773.11.0.467229070634.issue32810@psf.upfronthosting.co.za> Message-ID: <1544817506.91.0.788709270274.issue32810@psf.upfronthosting.co.za> Zackery Spytz added the comment: I've created a PR for this issue. ---------- nosy: +ZackerySpytz versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 14:59:00 2018 From: report at bugs.python.org (Jess Johnson) Date: Fri, 14 Dec 2018 19:59:00 +0000 Subject: [issue35502] Memory leak in xml.etree.ElementTree.iterparse Message-ID: <1544817540.85.0.788709270274.issue35502@psf.upfronthosting.co.za> New submission from Jess Johnson : When given xml that that would raise a ParseError, but parsing is stopped before the ParseError is raised, xml.etree.ElementTree.iterparse leaks memory. Example: import gc from io import StringIO import xml.etree.ElementTree as etree import objgraph def parse_xml(): xml = """ """ parser = etree.iterparse(StringIO(initial_value=xml)) for _, elem in parser: if elem.tag == 'LEVEL1': break def run(): parse_xml() gc.collect() uncollected_elems = objgraph.by_type('Element') print(uncollected_elems) objgraph.show_backrefs(uncollected_elems, max_depth=15) if __name__ == "__main__": run() Output: [] Also see this gist which has an image showing the objects that are retained in memory: https://gist.github.com/grokcode/f89d5c5f1831c6bc373be6494f843de3 ---------- components: XML messages: 331861 nosy: jess.j priority: normal severity: normal status: open title: Memory leak in xml.etree.ElementTree.iterparse type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 15:05:29 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Dec 2018 20:05:29 +0000 Subject: [issue35448] ConfigParser .read() - handling of nonexistent files In-Reply-To: <1544373330.85.0.788709270274.issue35448@psf.upfronthosting.co.za> Message-ID: <1544817929.01.0.788709270274.issue35448@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Since the code and doc agree, and since the proposal is to add a call parameter, this would be an enhancement for next release only, not a bug fix. The proposal seems reasonable. I might use it for IDLE. IDLE uses .read within this subclass method. def Load(self): "Load the configuration file from disk." if self.file: # '' for at least some tests self.read(self.file) The default config files in idlelib should be present. (I should see what happens if not. Does every 'get' pass a seeming redundant and possibly inconsistent backup default?) I might use the new parameter here. User override config files and even the config directory are optional, so the current behavior is fine. ---------- nosy: +terry.reedy stage: -> test needed type: behavior -> enhancement versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 15:11:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 20:11:04 +0000 Subject: [issue35502] Memory leak in xml.etree.ElementTree.iterparse In-Reply-To: <1544817540.85.0.788709270274.issue35502@psf.upfronthosting.co.za> Message-ID: <1544818264.77.0.788709270274.issue35502@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote attached run.py which confirms a leak using tracemalloc: $ python3 run.py 1 calls: 15.3B / call (total: 15.3 kB) 100 calls: 15.3B / call (total: 1527.7 kB) 1000 calls: 15.3B / call (total: 15265.0 kB) ---------- nosy: +vstinner Added file: https://bugs.python.org/file47998/run.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 15:11:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 20:11:24 +0000 Subject: [issue35502] Memory leak in xml.etree.ElementTree.iterparse In-Reply-To: <1544817540.85.0.788709270274.issue35502@psf.upfronthosting.co.za> Message-ID: <1544818284.39.0.788709270274.issue35502@psf.upfronthosting.co.za> Change by STINNER Victor : Removed file: https://bugs.python.org/file47998/run.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 15:11:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 20:11:56 +0000 Subject: [issue35502] Memory leak in xml.etree.ElementTree.iterparse In-Reply-To: <1544817540.85.0.788709270274.issue35502@psf.upfronthosting.co.za> Message-ID: <1544818316.98.0.788709270274.issue35502@psf.upfronthosting.co.za> STINNER Victor added the comment: Oops, there was a typo, you should read kB: 1 calls: 15.3 kB / call (total: 15.3 kB) 100 calls: 15.3 kB / call (total: 1527.7 kB) 1000 calls: 15.3 kB / call (total: 15265.0 kB) ---------- Added file: https://bugs.python.org/file47999/run2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 15:28:55 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Dec 2018 20:28:55 +0000 Subject: [issue35450] venv module doesn't create a copy of python binary by default In-Reply-To: <1544378737.46.0.788709270274.issue35450@psf.upfronthosting.co.za> Message-ID: <1544819335.88.0.788709270274.issue35450@psf.upfronthosting.co.za> miss-islington added the comment: New changeset f5107dfd42121ef40b13eb678705802f0ff02cf9 by Miss Islington (bot) (mkkot) in branch 'master': bpo-35450: reflect in docs that venv module is not always creating a ? (GH-11144) https://github.com/python/cpython/commit/f5107dfd42121ef40b13eb678705802f0ff02cf9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 15:29:14 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Dec 2018 20:29:14 +0000 Subject: [issue35450] venv module doesn't create a copy of python binary by default In-Reply-To: <1544378737.46.0.788709270274.issue35450@psf.upfronthosting.co.za> Message-ID: <1544819354.01.0.788709270274.issue35450@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10404 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 15:29:26 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Dec 2018 20:29:26 +0000 Subject: [issue35450] venv module doesn't create a copy of python binary by default In-Reply-To: <1544378737.46.0.788709270274.issue35450@psf.upfronthosting.co.za> Message-ID: <1544819366.3.0.788709270274.issue35450@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10405 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 15:37:47 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 14 Dec 2018 20:37:47 +0000 Subject: [issue35450] venv module doesn't create a copy of python binary by default In-Reply-To: <1544378737.46.0.788709270274.issue35450@psf.upfronthosting.co.za> Message-ID: <1544819867.0.0.788709270274.issue35450@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 1fb312ce1f147ea84ecb6f5993a20d1a85c53dc3 by Brett Cannon (Miss Islington (bot)) in branch '3.6': bpo-35450: reflect in docs that venv module is not always creating a copy of the Python binary (GH-11144) (GH-11168) https://github.com/python/cpython/commit/1fb312ce1f147ea84ecb6f5993a20d1a85c53dc3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 15:38:25 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 14 Dec 2018 20:38:25 +0000 Subject: [issue35450] venv module doesn't create a copy of python binary by default In-Reply-To: <1544378737.46.0.788709270274.issue35450@psf.upfronthosting.co.za> Message-ID: <1544819905.31.0.788709270274.issue35450@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset d5176fe2bcd35dc8d70d13220b58fa7ccd05b47a by Brett Cannon (Miss Islington (bot)) in branch '3.7': bpo-35450: reflect in docs that venv module is not always creating a copy of the Python binary (GH-11144) (GH-11167) https://github.com/python/cpython/commit/d5176fe2bcd35dc8d70d13220b58fa7ccd05b47a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 15:41:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 20:41:59 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1544820119.85.0.788709270274.issue35257@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10406 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 15:42:50 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Dec 2018 20:42:50 +0000 Subject: [issue35449] documenting objects In-Reply-To: <1544377302.47.0.788709270274.issue35449@psf.upfronthosting.co.za> Message-ID: <1544820170.46.0.788709270274.issue35449@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The reason that modules, classes, and functions need a special rule for assigning the .__doc__ attribute is that one cannot get a reference to the module, class, or function within the body of its definition. And putting the docstring at the top of a file or after a header is usually the best place. For modules, the body is the file, leaving nowhere else to put the docstring. For classes and functions, the alternative of an assignment elsewhere, after the object is created, remains. >>> def f(): pass >>> f.__doc__ = 'Docstring outside f body' >>> help(f) Help on function f in module __main__: f() Docstring outside f body This alternative is used in functools.partial and decorators that wrap functions with a function and then copy the original docstring to the wrapper. I think object.doc = 'docstring' is sufficient for other objects and that PEP 224 was wrong to propose otherwise and should have been rejected. So I think that this issue should propose what Steven said: pydoc/help() should be simplified to fetch object.__doc__ with normal lookup, instead of bypassing object if not one of the special types. Stefan Seefeld, can you try patching pydoc to do this? If one wants to add docstrings to builtins, a subclass can work. >>> class Docint(int): pass >>> i,j = Docint(1), Docint(2) >>> i+j 3 >>> i.__doc__ = 'one' We just need help to print i.__doc__ instead of int.__doc__. ---------- nosy: +terry.reedy stage: -> test needed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 15:44:18 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Dec 2018 20:44:18 +0000 Subject: [issue35450] venv module doesn't create a copy of python binary by default In-Reply-To: <1544378737.46.0.788709270274.issue35450@psf.upfronthosting.co.za> Message-ID: <1544820258.96.0.788709270274.issue35450@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Close this? ---------- nosy: +terry.reedy versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 15:45:38 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Dec 2018 20:45:38 +0000 Subject: [issue35453] pathlib.Path: glob and rglob should accept PathLike patterns In-Reply-To: <1544439282.17.0.788709270274.issue35453@psf.upfronthosting.co.za> Message-ID: <1544820338.68.0.788709270274.issue35453@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- stage: -> test needed type: -> enhancement versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 16:08:55 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Dec 2018 21:08:55 +0000 Subject: [issue35457] robotparser reads empty robots.txt file as "all denied" In-Reply-To: <1544520647.95.0.788709270274.issue35457@psf.upfronthosting.co.za> Message-ID: <1544821735.16.0.788709270274.issue35457@psf.upfronthosting.co.za> Terry J. Reedy added the comment: https://docs.python.org/2.7/library/robotparser.html#module-robotparser and https://docs.python.org/3/library/urllib.robotparser.html#module-urllib.robotparser refers users, for file structure, to http://www.robotstxt.org/orig.html. This says nothing about the effect of an empty file, so I don't see this as a bug. Even if it was, I would be dubious about reversing the effect without a deprecation notice first, and definitely not in 2.7. I would propose instead that the doc be changed to refer to the new file, with more and better examples, but add a note that robotparser interprets empty files as 'block all' rather than 'allow all'. Try bringing this up on python-ideas. ---------- nosy: +terry.reedy stage: -> test needed type: behavior -> enhancement versions: +Python 3.8 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 16:16:22 2018 From: report at bugs.python.org (Benjamin Ward) Date: Fri, 14 Dec 2018 21:16:22 +0000 Subject: [issue35503] os.path.islink() works with cygwin installation but not python.org Message-ID: <1544822182.17.0.788709270274.issue35503@psf.upfronthosting.co.za> New submission from Benjamin Ward : I have python.org's Python27 installed on my laptop. In my Documnets/tmp folder/directory I created three "directories" (see below) and performed os.path.islink() on all three. in cmd window: (not dir output and prompt have be been shortened) *\Documents\tmp>dir Volume in drive C is OS Volume Serial Number is B2BB-F7DA Directory of *\Documents\tmp ... 12/14/2018 12:37 PM isDir 12/14/2018 12:37 PM isDirJunction [C:\Users\benjward\Documents\tmp\isDir] 12/14/2018 12:39 PM isDirSymbolicLink [isDir] ... *** using system installed python.org python 2.7 *\Documents\tmp>where python C:\Python27\python.exe python Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.path.islink('isDir') False >>> os.path.islink('isDirJunction') False >>> os.path.islink('isDirSymlink') False >>> *** but ..., using cygwin64 installation of python 2.7 *\Documents\tmp>C:\cygwin64\bin\python2.7 Python 2.7.14 (default, Oct 31 2017, 21:12:13) [GCC 6.4.0] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.path.islink('isDir') False >>> os.path.islink('isDirJunction') True >>> os.path.islink('isDirSymlink') True >>> The latter result is what I was expecting. Granted, my cygwin python is 2.7.14 and system installation is 2.7.15, but is it likely that a capability was lost? ---------- messages: 331871 nosy: bward priority: normal severity: normal status: open title: os.path.islink() works with cygwin installation but not python.org type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 16:27:50 2018 From: report at bugs.python.org (pmpp) Date: Fri, 14 Dec 2018 21:27:50 +0000 Subject: [issue35503] os.path.islink() works with cygwin installation but not python.org In-Reply-To: <1544822182.17.0.788709270274.issue35503@psf.upfronthosting.co.za> Message-ID: <1544822870.06.0.788709270274.issue35503@psf.upfronthosting.co.za> pmpp added the comment: afaik only cygwin and msys2 python flavours can handle *various* links and junctions. ( usefull tool http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html ) and testing symlinks is may be disabled in MSVCRT paths https://github.com/python/cpython/pull/10245/files#diff-2b0d47b7b6809ae1bd1d7fd0c4e36e00R246 as some comment suggest. ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 16:28:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 21:28:39 +0000 Subject: [issue35502] Memory leak in xml.etree.ElementTree.iterparse In-Reply-To: <1544817540.85.0.788709270274.issue35502@psf.upfronthosting.co.za> Message-ID: <1544822919.91.0.788709270274.issue35502@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 16:44:43 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Dec 2018 21:44:43 +0000 Subject: [issue35472] python 3.7.2 rc1 bumped the build requirements for no reason In-Reply-To: <1544632241.86.0.788709270274.issue35472@psf.upfronthosting.co.za> Message-ID: <1544823883.18.0.788709270274.issue35472@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Should we add '(subject to change in any release)' after # Require Sphinx 1.7 for build. Matthias, I presume you are on some Linux. Would a script to temporarily change conf.py to build the docs work for you? To be reasonably sure that 1.6.6 is sufficient for all translations on all systems that care, I would think it should be part of a .rc release first. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 16:48:58 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Dec 2018 21:48:58 +0000 Subject: [issue35480] argparse: add a full fledged parser as a subparser In-Reply-To: <1544665477.58.0.788709270274.issue35480@psf.upfronthosting.co.za> Message-ID: <1544824138.75.0.788709270274.issue35480@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I presume you mean to close this. ---------- nosy: +terry.reedy stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 16:49:51 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Dec 2018 21:49:51 +0000 Subject: [issue35482] python372rc1.chm is ill In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1544824191.48.0.788709270274.issue35482@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 16:52:24 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Dec 2018 21:52:24 +0000 Subject: [issue35486] subprocess module import hooks breaks back compatibility In-Reply-To: <1544742855.44.0.788709270274.issue35486@psf.upfronthosting.co.za> Message-ID: <1544824344.71.0.788709270274.issue35486@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +brett.cannon, eric.snow, ncoghlan stage: -> test needed title: subprocess module breaks backwards compatibility with import hooks -> subprocess module import hooks breaks back compatibility type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 16:55:42 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Dec 2018 21:55:42 +0000 Subject: [issue35492] Missing colon on func statement in library/sys doc In-Reply-To: <1544786555.59.0.788709270274.issue35492@psf.upfronthosting.co.za> Message-ID: <1544824542.48.0.788709270274.issue35492@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 Dec 14 16:57:43 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Dec 2018 21:57:43 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument In-Reply-To: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za> Message-ID: <1544824663.41.0.788709270274.issue35495@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +bethard stage: -> test needed versions: +Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 16:59:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 21:59:01 +0000 Subject: [issue35502] Memory leak in xml.etree.ElementTree.iterparse In-Reply-To: <1544817540.85.0.788709270274.issue35502@psf.upfronthosting.co.za> Message-ID: <1544824741.65.0.788709270274.issue35502@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10407 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:06:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 22:06:17 +0000 Subject: [issue35502] Memory leak in xml.etree.ElementTree.iterparse In-Reply-To: <1544817540.85.0.788709270274.issue35502@psf.upfronthosting.co.za> Message-ID: <1544825177.43.0.788709270274.issue35502@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The problem was with detecting a reference cycle containing a TreeBuilder. ---------- nosy: +eli.bendersky, scoder versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:10:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 22:10:01 +0000 Subject: [issue35502] Memory leak in xml.etree.ElementTree.iterparse In-Reply-To: <1544817540.85.0.788709270274.issue35502@psf.upfronthosting.co.za> Message-ID: <1544825401.12.0.788709270274.issue35502@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10408 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:10:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2018 22:10:01 +0000 Subject: [issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately In-Reply-To: <1447702883.28.0.950037808414.issue25638@psf.upfronthosting.co.za> Message-ID: <1544825401.25.0.663665092547.issue25638@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10409 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:22:24 2018 From: report at bugs.python.org (Bachsau) Date: Fri, 14 Dec 2018 22:22:24 +0000 Subject: [issue35504] `del OSError().characters_written` raises SystemError Message-ID: <1544826144.81.0.788709270274.issue35504@psf.upfronthosting.co.za> New submission from Bachsau : `del OSError().characters_written` raises `SystemError`: "null argument to internal routine" I don't know why anyone should try this in productive code, but since the documentation says, that every `SystemError` should be reported, I'm doing that. My suggestion would be to make that attribute behave like the other ones of `OSError`, e.g. defaulting to `None` and returning to that value on deletion. ---------- components: Interpreter Core messages: 331876 nosy: Bachsau priority: normal severity: normal status: open title: `del OSError().characters_written` raises SystemError versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:23:06 2018 From: report at bugs.python.org (Bachsau) Date: Fri, 14 Dec 2018 22:23:06 +0000 Subject: [issue35504] `del OSError().characters_written` raises `SystemError` In-Reply-To: <1544826144.81.0.788709270274.issue35504@psf.upfronthosting.co.za> Message-ID: <1544826186.22.0.788709270274.issue35504@psf.upfronthosting.co.za> Change by Bachsau : ---------- title: `del OSError().characters_written` raises SystemError -> `del OSError().characters_written` raises `SystemError` _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:40:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 22:40:25 +0000 Subject: [issue35504] `del OSError().characters_written` raises `SystemError` In-Reply-To: <1544826144.81.0.788709270274.issue35504@psf.upfronthosting.co.za> Message-ID: <1544827225.74.0.788709270274.issue35504@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:41:01 2018 From: report at bugs.python.org (Marcin) Date: Fri, 14 Dec 2018 22:41:01 +0000 Subject: [issue35450] venv module doesn't create a copy of python binary by default In-Reply-To: <1544378737.46.0.788709270274.issue35450@psf.upfronthosting.co.za> Message-ID: <1544827261.73.0.788709270274.issue35450@psf.upfronthosting.co.za> Marcin added the comment: Actually the documentation hasn't been regenerated yet. I hope it will over night? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:48:35 2018 From: report at bugs.python.org (anthony shaw) Date: Fri, 14 Dec 2018 22:48:35 +0000 Subject: [issue35488] pathlib Path.match does not behave as described In-Reply-To: <1544769623.98.0.788709270274.issue35488@psf.upfronthosting.co.za> Message-ID: <1544827715.06.0.788709270274.issue35488@psf.upfronthosting.co.za> Change by anthony shaw : ---------- keywords: +patch pull_requests: +10410 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:49:13 2018 From: report at bugs.python.org (anthony shaw) Date: Fri, 14 Dec 2018 22:49:13 +0000 Subject: [issue35488] pathlib Path.match does not behave as described In-Reply-To: <1544769623.98.0.788709270274.issue35488@psf.upfronthosting.co.za> Message-ID: <1544827753.42.0.788709270274.issue35488@psf.upfronthosting.co.za> anthony shaw added the comment: Raised a PR for the test. Will look into doc PR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:53:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 22:53:08 +0000 Subject: [issue35504] `del OSError().characters_written` raises `SystemError` In-Reply-To: <1544826144.81.0.788709270274.issue35504@psf.upfronthosting.co.za> Message-ID: <1544827988.17.0.788709270274.issue35504@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10412 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:56:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2018 22:56:48 +0000 Subject: [issue35504] `del OSError().characters_written` raises `SystemError` In-Reply-To: <1544826144.81.0.788709270274.issue35504@psf.upfronthosting.co.za> Message-ID: <1544828208.24.0.788709270274.issue35504@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 11172 makes deleting characters_written to be as for other non-special attributes. Deleting it will be successful only if it was set before, and will raise an AttributeError otherwise. >>> e = OSError() >>> e.characters_written = 1 >>> del e.characters_written >>> del e.characters_written Traceback (most recent call last): File "", line 1, in AttributeError: characters_written ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:57:20 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 14 Dec 2018 22:57:20 +0000 Subject: [issue35482] python372rc1.chm is ill In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1544828240.83.0.788709270274.issue35482@psf.upfronthosting.co.za> Steve Dower added the comment: You're right, this is doing something weird on master as well. I'll take a look when I get a chance, but if anyone else wants to dive in feel free. In both cases, the doc file cannot be opened. Marking this as a release blocker and adding RM to the bug for awareness. ---------- nosy: +ned.deily priority: normal -> release blocker versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:15:44 2018 From: report at bugs.python.org (Jess Johnson) Date: Sat, 15 Dec 2018 00:15:44 +0000 Subject: [issue35502] Memory leak in xml.etree.ElementTree.iterparse In-Reply-To: <1544817540.85.0.788709270274.issue35502@psf.upfronthosting.co.za> Message-ID: <1544832944.77.0.788709270274.issue35502@psf.upfronthosting.co.za> Change by Jess Johnson : ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:20:22 2018 From: report at bugs.python.org (Petr Stupka) Date: Sat, 15 Dec 2018 00:20:22 +0000 Subject: [issue35505] Test test_imaplib fail in test_imap4_host_default_value Message-ID: <1544833222.75.0.788709270274.issue35505@psf.upfronthosting.co.za> New submission from Petr Stupka : OS: CentOS Linux release 7.6.1810 (Core) ====================================================================== FAIL: test_imap4_host_default_value (test.test_imaplib.TestImaplib) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/stupka/build/Python-3.7.1/Lib/test/test_imaplib.py", line 83, in test_imap4_host_default_value imaplib.IMAP4() AssertionError: OSError not raised Stderr: /home/stupka/build/Python-3.7.1/Lib/socket.py:660: ResourceWarning: unclosed self._sock = None ---------------------------------------------------------------------- This test fails when there is (in my case) dovecot running and listening on ::1, port 143 - expected exception is not raised. With dovecot stopped and nothing listening on port 143 the test passes. It should probably check if there is something listening on ::1:143 and if so then the test can be skipped? ---------- components: Tests messages: 331881 nosy: Petr Stupka priority: normal severity: normal status: open title: Test test_imaplib fail in test_imap4_host_default_value type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:26:59 2018 From: report at bugs.python.org (Bachsau) Date: Sat, 15 Dec 2018 00:26:59 +0000 Subject: [issue35504] `del OSError().characters_written` raises `SystemError` In-Reply-To: <1544826144.81.0.788709270274.issue35504@psf.upfronthosting.co.za> Message-ID: <1544833619.75.0.788709270274.issue35504@psf.upfronthosting.co.za> Bachsau added the comment: Why is it using -1 instead of NULL as the "not-set-indicator"? -1 is a valid python integer, that can be assigned, even if it doesn't make sense in the context, while `None` can not, because it's missing an `__index__` method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 20:38:24 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 15 Dec 2018 01:38:24 +0000 Subject: [issue35506] Doc: fix keyword `as` link from `import` and `try` Message-ID: <1544837904.07.0.788709270274.issue35506@psf.upfronthosting.co.za> New submission from Cheryl Sabella : In the documentation, using the :keyword:`as` role links to the `as` defined for the `with` statement, which could be confusing when it was used in the `import` or `try` section of the docs. https://docs.python.org/3/reference/simple_stmts.html#the-import-statement ---------- assignee: docs at python components: Documentation messages: 331883 nosy: cheryl.sabella, docs at python priority: normal severity: normal status: open title: Doc: fix keyword `as` link from `import` and `try` type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 20:42:30 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 15 Dec 2018 01:42:30 +0000 Subject: [issue35506] Doc: fix keyword `as` link from `import` and `try` In-Reply-To: <1544837904.07.0.788709270274.issue35506@psf.upfronthosting.co.za> Message-ID: <1544838150.29.0.788709270274.issue35506@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +10413 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 21:48:49 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 15 Dec 2018 02:48:49 +0000 Subject: [issue35488] pathlib Path.match does not behave as described In-Reply-To: <1544769623.98.0.788709270274.issue35488@psf.upfronthosting.co.za> Message-ID: <1544842129.99.0.788709270274.issue35488@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 22:05:05 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Dec 2018 03:05:05 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1544843105.53.0.788709270274.issue35402@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thank you both for the updates. After I wrote my previous message, I realized that there is a difference between updating tcl/tk to take advantage of bug fixes (after testing for regressions), and enhancing tkinter to give directly access to new tk features from Python. The latter can still be deferred to the next version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 22:18:12 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Dec 2018 03:18:12 +0000 Subject: [issue35208] IDLE: Squeezed lines count ignores window width In-Reply-To: <1541834301.3.0.788709270274.issue35208@psf.upfronthosting.co.za> Message-ID: <1544843892.16.0.788709270274.issue35208@psf.upfronthosting.co.za> Terry J. Reedy added the comment: My suggest simple rule would sqeeze it. With n = 50 and k = 75, if len(s) > n*k or s.count('\n') > n: squeeze(s) would squeeze at 3750. With k = 50, as 2500. I am not sure yet what to do about wrapping. For development, a count of actual lines might be more helpful than a variable number of wrapped lines. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 23:28:32 2018 From: report at bugs.python.org (Ma Lin) Date: Sat, 15 Dec 2018 04:28:32 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1544848112.72.0.788709270274.issue35482@psf.upfronthosting.co.za> Ma Lin added the comment: python368rc1.chm has the same problem. I did a git bisect. On 3.6 branch, e825b4e1a9bbe1d4c561f4cbbe6857653ef13a15 is the first bad commit On 3.7 branch, 9a75b8470a2e0de5406edcabba140f023c99c6a9 is the first bad commit ---------- title: python372rc1.chm is ill -> can't open python368rc1.chm and python372rc1.chm versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 23:38:28 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 15 Dec 2018 04:38:28 +0000 Subject: [issue34864] In Idle, Mac tabs make editor status line disappear. In-Reply-To: <1538422572.97.0.545547206417.issue34864@psf.upfronthosting.co.za> Message-ID: <1544848708.11.0.788709270274.issue34864@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- pull_requests: +10414 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 23:43:48 2018 From: report at bugs.python.org (Ma Lin) Date: Sat, 15 Dec 2018 04:43:48 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1544849028.14.0.788709270274.issue35482@psf.upfronthosting.co.za> Ma Lin added the comment: These first bad commits come from issue35054 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 23:44:16 2018 From: report at bugs.python.org (sh37211) Date: Sat, 15 Dec 2018 04:44:16 +0000 Subject: [issue35507] multiprocessing: seg fault when creating RawArray from numpy ctypes Message-ID: <1544849056.09.0.788709270274.issue35507@psf.upfronthosting.co.za> New submission from sh37211 : After creating this post on StackOverflow... https://stackoverflow.com/questions/53757856/segmentation-fault-when-creating-multiprocessing-array ...it was suggested by one of the respondents that I file a bug report. The following code produces segmentation faults on certain OSes (Linux: Ubuntu 16.04, 18.04 and Debian) but not others (Mac 10.13.4): import numpy as np from multiprocessing import sharedctypes a = np.ctypeslib.as_ctypes(np.zeros((224,224,3))) b = sharedctypes.RawArray(a._type_, a) The segmentation fault occurs upon the creation of the multiprocessing.sharedctypes.RawArray. As a workaround, one can declare an intermediate variable, e.g. "a2", and write a = np.zeros((224,224,3)) a2 = np.ctypeslib.as_ctypes(a) b = sharedctypes.RawArray(a2._type_, a2) User kabanus seemed to think it was more likely to be an error with multiprocessing than with numpy. Using Anaconda python distribution, Python 3.5 and 3.6. Have not tried 3.7 or 3.8 yet. ---------- components: Library (Lib), ctypes messages: 331888 nosy: sh37211 priority: normal severity: normal status: open title: multiprocessing: seg fault when creating RawArray from numpy ctypes type: crash versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 23:48:42 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Dec 2018 04:48:42 +0000 Subject: [issue34864] In Idle, Mac tabs make editor status line disappear. In-Reply-To: <1538422572.97.0.545547206417.issue34864@psf.upfronthosting.co.za> Message-ID: <1544849322.85.0.788709270274.issue34864@psf.upfronthosting.co.za> Terry J. Reedy added the comment: PR 6665, for #33397 (add font resizing to text view and help viewer) got listed because I discovered that increasing and decreasing font size with control wheel/+/- can cause the [close] button to disappear and reappear. (I hope to use FontSizer for editor texts as well, and don't want it to affect the status bar.) I speculated that there might be some connection to this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 04:02:45 2018 From: report at bugs.python.org (anthony shaw) Date: Sat, 15 Dec 2018 09:02:45 +0000 Subject: [issue35488] pathlib Path.match does not behave as described In-Reply-To: <1544769623.98.0.788709270274.issue35488@psf.upfronthosting.co.za> Message-ID: <1544864565.05.0.788709270274.issue35488@psf.upfronthosting.co.za> anthony shaw added the comment: Yes, this is similar to https://bugs.python.org/issue29249 In that issue, it suggests this feature is not supported, but that is neither documented, nor tested. ---------- nosy: -serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 04:02:55 2018 From: report at bugs.python.org (Neil Booth) Date: Sat, 15 Dec 2018 09:02:55 +0000 Subject: [issue35508] array.index should take optional start and stop indices like for lists Message-ID: <1544864575.4.0.788709270274.issue35508@psf.upfronthosting.co.za> New submission from Neil Booth : list.index has signature: index(value, [start, [stop]]) array.index from the array module should provide the same facility ---------- components: Library (Lib) messages: 331891 nosy: kyuupichan priority: normal severity: normal status: open title: array.index should take optional start and stop indices like for lists type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 04:10:18 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 15 Dec 2018 09:10:18 +0000 Subject: [issue35508] array.index should take optional start and stop indices like for lists In-Reply-To: <1544864575.4.0.788709270274.issue35508@psf.upfronthosting.co.za> Message-ID: <1544865018.36.0.788709270274.issue35508@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Please see issue31956 that has an open PR and discussion. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 04:22:55 2018 From: report at bugs.python.org (Neil Booth) Date: Sat, 15 Dec 2018 09:22:55 +0000 Subject: [issue35508] array.index should take optional start and stop indices like for lists In-Reply-To: <1544864575.4.0.788709270274.issue35508@psf.upfronthosting.co.za> Message-ID: <1544865775.98.0.788709270274.issue35508@psf.upfronthosting.co.za> Neil Booth added the comment: Sorry for the duplicate; a simple search didn't find it. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 04:33:42 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 15 Dec 2018 09:33:42 +0000 Subject: [issue35508] array.index should take optional start and stop indices like for lists In-Reply-To: <1544864575.4.0.788709270274.issue35508@psf.upfronthosting.co.za> Message-ID: <1544866422.15.0.788709270274.issue35508@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: No problem. I adding duplicate as resolution linking to issue31956. Feel free to add yourself on issue31956 to keep track of it. Thanks ---------- resolution: -> duplicate superseder: -> Add start and stop parameters to the array.index() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 06:02:34 2018 From: report at bugs.python.org (Cezary Wagner) Date: Sat, 15 Dec 2018 11:02:34 +0000 Subject: [issue35268] Windows 10 asyncio reading continously stdin and stdout Stockfish In-Reply-To: <1542455574.0.0.788709270274.issue35268@psf.upfronthosting.co.za> Message-ID: <1544871754.46.0.788709270274.issue35268@psf.upfronthosting.co.za> Cezary Wagner added the comment: Stockfish works like that: 1. Run command line and listen stdout. 2. Send some stdin and listen stdin. 3. stdout is asynchronous and continous (there no single output, line is generated every some time). I want to send some stdin than listen stdout response from Stockfish. I tested that first execute of it block all: line = await stockfish.stdout.read() One line is read and application becomes dead. Should show much more lines but it stops in Windows 10. ---------- title: Windows asyncio reading continously stdin and stdout Stockfish -> Windows 10 asyncio reading continously stdin and stdout Stockfish _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 06:09:09 2018 From: report at bugs.python.org (Cezary Wagner) Date: Sat, 15 Dec 2018 11:09:09 +0000 Subject: [issue35268] Windows 10 asyncio reading continously stdin and stdout Stockfish In-Reply-To: <1542455574.0.0.788709270274.issue35268@psf.upfronthosting.co.za> Message-ID: <1544872149.6.0.788709270274.issue35268@psf.upfronthosting.co.za> Cezary Wagner added the comment: See new code example (little changed): It block after first stdout: import asyncio import sys async def run_stockfish(): STOCKFISH_PATH = r'C:\root\chess\stockfish\stockfish 10\stockfish_10_x64_bmi2.exe' stockfish = await asyncio.subprocess.create_subprocess_exec( STOCKFISH_PATH, stdin=asyncio.subprocess.PIPE, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE) stockfish.stdin.write('uci'.encode()) while not stockfish.stdout.at_eof(): # BUG? - blocks at this line line = await stockfish.stdout.readline() print(line.decode()) await stockfish.wait() if sys.platform == "win32": asyncio.set_event_loop_policy( asyncio.WindowsProactorEventLoopPolicy()) asyncio.run(run_stockfish(), debug=True) Output: Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)] on win32 runfile('C:/Users/Cezary Wagner/PycharmProjects/cw_chess_uci/sandbox/async_proxy/s01_async_stockfish.py', wdir='C:/Users/Cezary Wagner/PycharmProjects/cw_chess_uci/sandbox/async_proxy') Stockfish 10 64 BMI2 by T. Romstad, M. Costalba, J. Kiiski, G. Linscott Valid output is: C:\Users\Cezary Wagner>"C:\root\chess\stockfish\stockfish 10\stockfish_10_x64_bmi2.exe" Stockfish 10 64 BMI2 by T. Romstad, M. Costalba, J. Kiiski, G. Linscott uci id name Stockfish 10 64 BMI2 id author T. Romstad, M. Costalba, J. Kiiski, G. Linscott option name Debug Log File type string default option name Contempt type spin default 24 min -100 max 100 option name Analysis Contempt type combo default Both var Off var White var Black var Both option name Threads type spin default 1 min 1 max 512 option name Hash type spin default 16 min 1 max 131072 option name Clear Hash type button option name Ponder type check default false option name MultiPV type spin default 1 min 1 max 500 option name Skill Level type spin default 20 min 0 max 20 option name Move Overhead type spin default 30 min 0 max 5000 option name Minimum Thinking Time type spin default 20 min 0 max 5000 option name Slow Mover type spin default 84 min 10 max 1000 option name nodestime type spin default 0 min 0 max 10000 option name UCI_Chess960 type check default false option name UCI_AnalyseMode type check default false option name SyzygyPath type string default option name SyzygyProbeDepth type spin default 1 min 1 max 100 option name Syzygy50MoveRule type check default true option name SyzygyProbeLimit type spin default 7 min 0 max 7 uciok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 06:12:37 2018 From: report at bugs.python.org (Cezary Wagner) Date: Sat, 15 Dec 2018 11:12:37 +0000 Subject: [issue35268] Windows 10 asyncio reading continously stdin and stdout Stockfish In-Reply-To: <1542455574.0.0.788709270274.issue35268@psf.upfronthosting.co.za> Message-ID: <1544872357.08.0.788709270274.issue35268@psf.upfronthosting.co.za> Cezary Wagner added the comment: Another code try - this time I am using task: import asyncio import sys async def process_line_reader(process, on_line=None, on_eof=None): while not process.stdout.at_eof(): # BUG? after first line it becomes dead line = await process.stdout.readline() if on_line is not None: on_line(line.decode()) if on_eof is not None: on_eof() print('eof') async def run_stockfish(): STOCKFISH_PATH = r'C:\root\chess\stockfish\stockfish 10\stockfish_10_x64_bmi2.exe' stockfish = await asyncio.subprocess.create_subprocess_exec( STOCKFISH_PATH, stdin=asyncio.subprocess.PIPE, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE) stockfish.stdin.write('uci'.encode()) task = asyncio.create_task(process_line_reader( process=stockfish, on_line=lambda line: print(f'{line}') )) # await task await stockfish.wait() if sys.platform == "win32": asyncio.set_event_loop_policy( asyncio.WindowsProactorEventLoopPolicy()) asyncio.run(run_stockfish(), debug=True) print('done') All is blocked after first line (no print of eof or done): C:\root\Python37-64\python.exe "C:/Users/Cezary Wagner/PycharmProjects/cw_chess_uci/sandbox/async_proxy/s02_async_stockfish.py" Stockfish 10 64 BMI2 by T. Romstad, M. Costalba, J. Kiiski, G. Linscott ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 06:45:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Dec 2018 11:45:43 +0000 Subject: [issue35506] Doc: fix keyword `as` link from `import` and `try` In-Reply-To: <1544837904.07.0.788709270274.issue35506@psf.upfronthosting.co.za> Message-ID: <1544874343.15.0.788709270274.issue35506@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10415 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 07:00:20 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 15 Dec 2018 12:00:20 +0000 Subject: [issue35268] Windows 10 asyncio reading continously stdin and stdout Stockfish In-Reply-To: <1542455574.0.0.788709270274.issue35268@psf.upfronthosting.co.za> Message-ID: <1544875220.17.0.788709270274.issue35268@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Sorry, the bug tracker is for working on Python bugs, not on bugs of your programs written with Python. The behavior of subprocesses running is tested intensively, scenarios like you described works well. I don't know sockfish protocol but highly likely the problem is in communicating with the program. For example, are you sure that sending `uci` without endline is enough to start processing the command? Tools like ProcMon https://docs.microsoft.com/en-us/sysinternals/downloads/procmon or WinDbg can help with understanding what data is actually received by a process and what is sent back. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 07:04:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Dec 2018 12:04:07 +0000 Subject: [issue35506] Doc: fix keyword `as` link from `import` and `try` In-Reply-To: <1544837904.07.0.788709270274.issue35506@psf.upfronthosting.co.za> Message-ID: <1544875447.26.0.788709270274.issue35506@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think links from "as" are not needed. They are just refer to the beginning of the same section. In all occurrences of "as" the corresponding "with", "import", or "try"/"except" keywords are mentioned too, and links from them refer to the correct section. I think it is better to remove links from "as" at all. There are same issues with the "else" keyword which is used in the "if", "while", "for" and "try" statements and in the "if" expression. There are same issues with the "if" and "for" keyword in the context of comprehensions, with the "if" keyword in the context of the "if" expression, and with the "in" keyword in the context of "for". The proposed PR removes redundant and incorrect links from keywords. It removes also redundant links if the same keyword is mentioned several times in the single paragraph (in same cases there were up to 5 links to the same target). It fixes also some other minor bugs. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 07:07:48 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sat, 15 Dec 2018 12:07:48 +0000 Subject: [issue35509] Unable to inherit from logging.Formatter Message-ID: <1544875668.42.0.788709270274.issue35509@psf.upfronthosting.co.za> New submission from Chih-Hsuan Yen : The following script runs fine on Python 3.7.1 but not on master (f5107dfd42). import logging class Foo(logging.Formatter): def __init__(self): super().__init__(self) Foo() The output is: Traceback (most recent call last): File "t.py", line 9, in Foo() File "t.py", line 6, in __init__ super().__init__(self) File "/usr/lib/python3.8/logging/__init__.py", line 589, in __init__ self._style.validate() File "/usr/lib/python3.8/logging/__init__.py", line 441, in validate if not self.validation_pattern.search(self._fmt): TypeError: expected string or bytes-like object Most likely there's something wrong in the newly-added validation step (issue34844). /cc the primary reviewer of the aforementioned patch. ---------- components: Library (Lib) messages: 331900 nosy: vinay.sajip, yan12125 priority: normal severity: normal status: open title: Unable to inherit from logging.Formatter type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 08:49:17 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 15 Dec 2018 13:49:17 +0000 Subject: [issue35450] venv module doesn't create a copy of python binary by default In-Reply-To: <1544378737.46.0.788709270274.issue35450@psf.upfronthosting.co.za> Message-ID: <1544881757.19.0.788709270274.issue35450@psf.upfronthosting.co.za> Cheryl Sabella added the comment: It looks like the documentation has regenerated. Thanks! ---------- nosy: +cheryl.sabella resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 09:03:24 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 15 Dec 2018 14:03:24 +0000 Subject: [issue34171] Lib/trace.cover not removed by the clean target In-Reply-To: <1532102937.62.0.56676864532.issue34171@psf.upfronthosting.co.za> Message-ID: <1544882604.4.0.788709270274.issue34171@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 09:32:51 2018 From: report at bugs.python.org (Cezary Wagner) Date: Sat, 15 Dec 2018 14:32:51 +0000 Subject: [issue35268] Windows 10 asyncio reading continously stdin and stdout Stockfish In-Reply-To: <1542455574.0.0.788709270274.issue35268@psf.upfronthosting.co.za> Message-ID: <1544884371.9.0.788709270274.issue35268@psf.upfronthosting.co.za> Cezary Wagner added the comment: It just tested it today and I found in parallel same solution as you suggested. Sometimes it happen even your skilled programmer - at least one time in year :) I was just blind. Let's close it since it is invalid report. I just skipped new line at end of 'uci' should be 'uci\n'. Now I am unblocked to test async pipes more and write very nice program. It looks very promising. Thank you for attention. I am sorry for bad report. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 09:36:09 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 15 Dec 2018 14:36:09 +0000 Subject: [issue35268] Windows 10 asyncio reading continously stdin and stdout Stockfish In-Reply-To: <1542455574.0.0.788709270274.issue35268@psf.upfronthosting.co.za> Message-ID: <1544884569.94.0.788709270274.issue35268@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 10:32:38 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 15 Dec 2018 15:32:38 +0000 Subject: [issue32810] Expose ags_gen and agt_gen in asynchronous generators In-Reply-To: <1518205773.11.0.467229070634.issue32810@psf.upfronthosting.co.za> Message-ID: <1544887958.47.0.788709270274.issue32810@psf.upfronthosting.co.za> Yury Selivanov added the comment: Please don't merge the PR. I'll need some time to think about this before giving it a green light. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 13:37:55 2018 From: report at bugs.python.org (Tal Einat) Date: Sat, 15 Dec 2018 18:37:55 +0000 Subject: [issue35208] IDLE: Squeezed lines count ignores window width In-Reply-To: <1541834301.3.0.788709270274.issue35208@psf.upfronthosting.co.za> Message-ID: <1544899075.34.0.788709270274.issue35208@psf.upfronthosting.co.za> Tal Einat added the comment: Terry, I'm not sure I follow your thinking, but it feels like over-thinking. This is a simple bug with a simple fix. Barring the current bug (which the attached PR fixes), the current logic counts lines, taking soft wrapping into account. This was chosen to make things as simple as possible for the users, in terms of what's displayed on squeezed buttons and in terms of configuring auto-squeezing. The fix is simple and with it Squeezer works quickly and consistently. If you'd like to change the behavior, let's discuss that elsewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 16:04:27 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 15 Dec 2018 21:04:27 +0000 Subject: [issue35504] `del OSError().characters_written` raises `SystemError` In-Reply-To: <1544826144.81.0.788709270274.issue35504@psf.upfronthosting.co.za> Message-ID: <1544907867.85.0.788709270274.issue35504@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- pull_requests: +10416 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 16:05:29 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 15 Dec 2018 21:05:29 +0000 Subject: [issue35504] `del OSError().characters_written` raises `SystemError` In-Reply-To: <1544826144.81.0.788709270274.issue35504@psf.upfronthosting.co.za> Message-ID: <1544907929.44.0.788709270274.issue35504@psf.upfronthosting.co.za> Zackery Spytz added the comment: PR 11175 fixes some other related SystemErrors (and segfaults). ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 16:17:11 2018 From: report at bugs.python.org (Eryk Sun) Date: Sat, 15 Dec 2018 21:17:11 +0000 Subject: [issue29707] os.path.ismount() always returns false for mount --bind on same filesystem In-Reply-To: <1488524974.65.0.103028894103.issue29707@psf.upfronthosting.co.za> Message-ID: <1544908631.29.0.788709270274.issue29707@psf.upfronthosting.co.za> Change by Eryk Sun : ---------- nosy: +eryksun stage: -> needs patch versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 16:25:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Dec 2018 21:25:52 +0000 Subject: [issue35504] `del OSError().characters_written` raises `SystemError` In-Reply-To: <1544826144.81.0.788709270274.issue35504@psf.upfronthosting.co.za> Message-ID: <1544909152.55.0.788709270274.issue35504@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Why is it using -1 instead of NULL as the "not-set-indicator"? Because the field of the C structure has integer type, and it can not be the NULL pointer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 16:26:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Dec 2018 21:26:31 +0000 Subject: [issue35504] `del OSError().characters_written` raises `SystemError` In-Reply-To: <1544826144.81.0.788709270274.issue35504@psf.upfronthosting.co.za> Message-ID: <1544909191.36.0.788709270274.issue35504@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Good catch Zackery! Thank you for your PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 17:05:31 2018 From: report at bugs.python.org (Eryk Sun) Date: Sat, 15 Dec 2018 22:05:31 +0000 Subject: [issue29707] os.path.ismount() always returns false for mount --bind on same filesystem In-Reply-To: <1488524974.65.0.103028894103.issue29707@psf.upfronthosting.co.za> Message-ID: <1544911531.48.0.788709270274.issue29707@psf.upfronthosting.co.za> Eryk Sun added the comment: It's also inconsistent. ismount() is true for a bind mount to the parent directory (e.g. dir/mount -> dir). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 17:27:29 2018 From: report at bugs.python.org (Mario Corchero) Date: Sat, 15 Dec 2018 22:27:29 +0000 Subject: [issue35500] Align expected and actual calls on mock.assert_called_with error message In-Reply-To: <1544813146.35.0.788709270274.issue35500@psf.upfronthosting.co.za> Message-ID: <1544912849.62.0.788709270274.issue35500@psf.upfronthosting.co.za> Mario Corchero added the comment: Makes sense! I'd not align them though but that might be my view as I generally don't like aligning text like that. Also if you feel that the exceptions read "weird" with the first sentence is empty, an option might be to say the calls don't match, to make it symmetric with the assert_calls message. Example: Traceback (most recent call last): File "/tmp/bar.py", line 5, in m.assert_called_with(2, 3) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 827, in assert_called_with raise AssertionError(_error_message()) from cause AssertionError: Expected call not found. Expected call: mock(2, 3) Actual call: mock(1, 2) This way all error reports give you the issue in the first line of the message and further details in the next lines. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 19:58:46 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 16 Dec 2018 00:58:46 +0000 Subject: [issue35496] left-to-right violation in match order In-Reply-To: <1544803576.39.0.788709270274.issue35496@psf.upfronthosting.co.za> Message-ID: <1544921926.07.0.788709270274.issue35496@psf.upfronthosting.co.za> Steven D'Aprano added the comment: > See attached script, which is self-explanatory. I'm glad one of us thinks so, because I find it clear as mud. I spent *way* longer on this than I should have, but I simplified your sample code to the best of my ability. (See attached.) As far as I can tell, your code and mine does roughly the same thing, but please check that you agree. I agree that with the IPV6 portion of the regex removed, it matches on "208.123.4.22", but with the IPV6 portion included, it matches on "::ffff:208.123.4.22". But I'm not sure that's a bug. I think it is working as designed. For example: py> import re py> text = 'green pepper' py> re.search('pepper|green pepper', text).group(0) 'green pepper' seems to be analogous to your example, but simpler. Do you agree? If not, it would also help a lot if you could find a simpler regex that demonstrates the issue. See http://www.sscce.org/ In your case, I believe that the rightmost alternative matches from position 1 of the text, while the leftmost alternative doesn't match until position 8. So starting from position 0, the IPV6 check matches first, and so wins. It is possible you were expecting that the IPV4 check would be tested against position 0, then position 1, then position 2, then ... and so on until the end of the string, and only then the IPV6 check tested against position 0, then 1 etc. ---------- nosy: +steven.daprano Added file: https://bugs.python.org/file48000/logcheck3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 20:12:56 2018 From: report at bugs.python.org (Eryk Sun) Date: Sun, 16 Dec 2018 01:12:56 +0000 Subject: [issue29707] os.path.ismount() always returns false for mount --bind on same filesystem In-Reply-To: <1488524974.65.0.103028894103.issue29707@psf.upfronthosting.co.za> Message-ID: <1544922776.85.0.788709270274.issue29707@psf.upfronthosting.co.za> Change by Eryk Sun : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 20:34:29 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 16 Dec 2018 01:34:29 +0000 Subject: [issue23228] The tarfile module crashes when tarfile contains a symlink and unpack directory contain it too In-Reply-To: <1421139302.16.0.710158118765.issue23228@psf.upfronthosting.co.za> Message-ID: <1544924069.86.0.788709270274.issue23228@psf.upfronthosting.co.za> Martin Panter added the comment: The problem with WindowsError should only exist in 3.4+. 2.7 doesn?t support creating symlinks on Windows. Michael?s fix is the same as already done in 2.7 for Issue 10761 and (part of) Issue 12088. However I?m not sure that is the best approach for a bug fix. Also see Issue 19974 proposing to replace existing directory entries in all cases, including replacing empty subdirectories, and not just when extracting symlinks. I suspect Michael has only fixed the recursive loop on Unix. What happens if an exception is raised because symlinks are not supported (e.g. Windows)? Possible test case: data = BytesIO() writer = tarfile.TarFile(fileobj=data, mode='w') selflink = tarfile.TarInfo('self') selflink.size = 0 selflink.type = tarfile.SYMTYPE selflink.linkname = selflink.name writer.addfile(selflink) writer.close() data.seek(0) tarfile.TarFile(fileobj=data).extractall() ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 20:40:42 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 16 Dec 2018 01:40:42 +0000 Subject: [issue19974] tarfile doesn't overwrite symlink by directory In-Reply-To: <1386935948.7.0.893963676407.issue19974@psf.upfronthosting.co.za> Message-ID: <1544924442.57.0.788709270274.issue19974@psf.upfronthosting.co.za> Martin Panter added the comment: I?m not sure if this should be considered a bug fix, but if it goes into 2.7 it would overlap with Issue 10761 and Issue 12088. In 2.7 existing directory entries (including broken symlinks, but not including subdirectories) may be replaced by symbolic and hard links. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 20:45:59 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 16 Dec 2018 01:45:59 +0000 Subject: [issue35483] tarfile.extractall on existing symlink in Ubuntu overwrites target file, not symlink, unlinke GNU tar In-Reply-To: <1544714559.52.0.788709270274.issue35483@psf.upfronthosting.co.za> Message-ID: <1544924759.69.0.788709270274.issue35483@psf.upfronthosting.co.za> Martin Panter added the comment: The first aspect, incorrectly assuming the OS does not support symlinks, is described at . Lars proposed a fix which will let the OS exception escape to the caller. However I think that patch needs more work. The second aspect is replacing existing symlinks and other directory entries. This was implemented in 2.7 in Issue 10761 and Issue 12088 (only when replacing non-subdirectories with symbolic links and hard links), and is discussed more generally in Issue 19974. I suggest to close this in favour of resolving Issue 23228 and Issue 19974. ---------- nosy: +lars.gustaebel, martin.panter superseder: -> The tarfile module crashes when tarfile contains a symlink and unpack directory contain it too _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 22:22:21 2018 From: report at bugs.python.org (Satrajit S Ghosh) Date: Sun, 16 Dec 2018 03:22:21 +0000 Subject: [issue35510] pickling derived dataclasses Message-ID: <1544930541.77.0.788709270274.issue35510@psf.upfronthosting.co.za> New submission from Satrajit S Ghosh : I'm not sure if this is intended behavior or an error. I'm creating dataclasses dynamically and trying to pickle those classes or objects containing instances of those classes. This was resulting in an error, so I trimmed it down to this example. ``` import pickle as pk import dataclasses as dc @dc.dataclass class A: pass pk.dumps(A) # --> this is fine B = dc.make_dataclass('B', [], bases=(A,)) pk.dumps(B) # --> results in an error # PicklingError: Can't pickle : attribute lookup B on types failed ``` is this expected behavior? and if so, is there a way to create a dynamic dataclass that pickles? ---------- components: Library (Lib) messages: 331914 nosy: satra priority: normal severity: normal status: open title: pickling derived dataclasses type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 23:36:54 2018 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 16 Dec 2018 04:36:54 +0000 Subject: [issue18799] Resurrect and fix test_404 in Lib/test/test_xmlrpc.py In-Reply-To: <1377100643.52.0.970396135479.issue18799@psf.upfronthosting.co.za> Message-ID: <1544935014.32.0.788709270274.issue18799@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Serhiy, okay, I'll create a pull request soon (in 2-3 days). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 23:41:54 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 16 Dec 2018 04:41:54 +0000 Subject: [issue35510] pickling derived dataclasses In-Reply-To: <1544930541.77.0.788709270274.issue35510@psf.upfronthosting.co.za> Message-ID: <1544935314.42.0.788709270274.issue35510@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 00:05:01 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 16 Dec 2018 05:05:01 +0000 Subject: [issue35500] Align expected and actual calls on mock.assert_called_with error message In-Reply-To: <1544813146.35.0.788709270274.issue35500@psf.upfronthosting.co.za> Message-ID: <1544936701.06.0.788709270274.issue35500@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks Mario for the feedback. The alignment was just a personal preference of mine. I agree with you on adding "Expected call not found" next to AssertionError. I will wait if others have more feedback on this before proceeding on the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 01:00:48 2018 From: report at bugs.python.org (4-launchpad-kalvdans-no-ip-org) Date: Sun, 16 Dec 2018 06:00:48 +0000 Subject: [issue35238] Alleviate memory reservation of fork_exec in subprocess.Popen via forkserver In-Reply-To: <1542144595.84.0.788709270274.issue35238@psf.upfronthosting.co.za> Message-ID: <1544940048.41.0.788709270274.issue35238@psf.upfronthosting.co.za> Change by 4-launchpad-kalvdans-no-ip-org : ---------- nosy: +4-launchpad-kalvdans-no-ip-org _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 01:48:23 2018 From: report at bugs.python.org (bombs) Date: Sun, 16 Dec 2018 06:48:23 +0000 Subject: [issue35511] Some methods of profile.Profile are not supported but the docs doesn't mention it. Message-ID: <1544942903.87.0.788709270274.issue35511@psf.upfronthosting.co.za> New submission from bombs : Currently enable, disable methods are only supported by Profile class of cProfile module, not profile module. But the docs doesn't give this information. I think we should, at least mention it, in the docs. ---------- assignee: docs at python components: Documentation messages: 331917 nosy: asvetlov, bluewhale8202, docs at python priority: normal severity: normal status: open title: Some methods of profile.Profile are not supported but the docs doesn't mention it. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 01:49:06 2018 From: report at bugs.python.org (bombs) Date: Sun, 16 Dec 2018 06:49:06 +0000 Subject: [issue35511] Some methods of profile.Profile are not supported but the docs doesn't mention it. In-Reply-To: <1544942903.87.0.788709270274.issue35511@psf.upfronthosting.co.za> Message-ID: <1544942946.02.0.788709270274.issue35511@psf.upfronthosting.co.za> Change by bombs : ---------- keywords: +patch pull_requests: +10417 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 01:54:02 2018 From: report at bugs.python.org (bombs) Date: Sun, 16 Dec 2018 06:54:02 +0000 Subject: [issue35511] Some methods of profile.Profile are not supported but the docs doesn't mention it. In-Reply-To: <1544942903.87.0.788709270274.issue35511@psf.upfronthosting.co.za> Message-ID: <1544943242.4.0.788709270274.issue35511@psf.upfronthosting.co.za> bombs added the comment: To elaborate, the docs simply says "Both the profile and cProfile modules provide the following functions... enable(), disable(), create_stats() ..." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 02:39:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2018 07:39:41 +0000 Subject: [issue35510] pickling derived dataclasses In-Reply-To: <1544930541.77.0.788709270274.issue35510@psf.upfronthosting.co.za> Message-ID: <1544945981.16.0.788709270274.issue35510@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You need to set the __module__ attribute. B.__module__ = __name__ ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 03:16:24 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 16 Dec 2018 08:16:24 +0000 Subject: [issue31855] mock_open is not compatible with read(n) (and pickle.load) In-Reply-To: <1508792590.83.0.213398074469.issue31855@psf.upfronthosting.co.za> Message-ID: <1544948184.42.0.788709270274.issue31855@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Internally mock_open implementation uses line based iteration [0] to keep track of the state change between read calls. So readline too ignores the argument. There is issue25690 for an alternate mock_open implementation but the code change is large and adds a lot of features. A simpler approach would be to use StringIO or BytesIO to keep track of state changes and they provide read, readline and readlines API. mock_open docs mentions about using a customized mock for complex cases but I don't know if worthy enough to make this enhancement given the internal implementation change to support the API or to document this behavior. Looking further there also seems to be a test case for it [1] which will fail if this is fixed since this returns all characters instead of first 10 like using open().read(10). def test_mock_open_read_with_argument(self): # At one point calling read with an argument was broken # for mocks returned by mock_open some_data = 'foo\nbar\nbaz' mock = mock_open(read_data=some_data) self.assertEqual(mock().read(10), some_data) $ echo -n 'foo\nbar\nbaz' > /tmp/a.txt $ ./python.exe Python 3.8.0a0 (heads/master:f5107dfd42, Dec 16 2018, 13:41:57) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> with open('/tmp/a.txt') as f: ... actual = f.read(10) ... actual, len(actual) ... ('foo\nbar\nba', 10) >>> with open('/tmp/a.txt') as f: ... from unittest.mock import mock_open ... mock = mock_open(read_data=f.read()) ... mock_data = mock().read(10) ... mock_data, len(mock_data) ... ('foo\nbar\nbaz', 11) [0] https://github.com/python/cpython/blob/f5107dfd42121ef40b13eb678705802f0ff02cf9/Lib/unittest/mock.py#L2349 [1] https://github.com/python/cpython/blob/f5107dfd42121ef40b13eb678705802f0ff02cf9/Lib/unittest/test/testmock/testwith.py#L284 ---------- nosy: +cjw296, mariocj89, xtreak versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 04:03:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2018 09:03:22 +0000 Subject: [issue29707] os.path.ismount() always returns false for mount --bind on same filesystem In-Reply-To: <1488524974.65.0.103028894103.issue29707@psf.upfronthosting.co.za> Message-ID: <1544951002.03.0.788709270274.issue29707@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I do not think that we should use /proc/mounts or getmntent ,because they are not portable. os.path.ismount() uses the traditional way to detect mountpoints which is not able to detect bind mounts. But what is the problem with getting False for bind mounts on the same filesystem? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 04:51:48 2018 From: report at bugs.python.org (Eryk Sun) Date: Sun, 16 Dec 2018 09:51:48 +0000 Subject: [issue29707] os.path.ismount() always returns false for mount --bind on same filesystem In-Reply-To: <1488524974.65.0.103028894103.issue29707@psf.upfronthosting.co.za> Message-ID: <1544953908.77.0.788709270274.issue29707@psf.upfronthosting.co.za> Eryk Sun added the comment: > what is the problem with getting False for bind mounts > on the same filesystem? Probably there's no problem if it's consistently false for all bind mounts on the same file system, but ismount() is true for a bind mount to the parent directory on the same file system, since the inodes match. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 05:57:29 2018 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 16 Dec 2018 10:57:29 +0000 Subject: [issue35509] Unable to inherit from logging.Formatter In-Reply-To: <1544875668.42.0.788709270274.issue35509@psf.upfronthosting.co.za> Message-ID: <1544957849.56.0.788709270274.issue35509@psf.upfronthosting.co.za> Change by Vinay Sajip : ---------- nosy: +BNMetrics versions: +Python 3.6 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 06:27:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2018 11:27:04 +0000 Subject: [issue35498] Parents objects in pathlib.Path don't support slices as __getitem__ arguments In-Reply-To: <1544806517.4.0.788709270274.issue35498@psf.upfronthosting.co.za> Message-ID: <1544959624.44.0.788709270274.issue35498@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue21041. First than add support for slices, we should make a decision about negative indices. In any case this is a new feature, which can be only added in the future 3.8 release. ---------- dependencies: +pathlib.PurePath.parents rejects negative indexes nosy: +serhiy.storchaka versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 06:27:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2018 11:27:24 +0000 Subject: [issue21041] pathlib.PurePath.parents rejects negative indexes In-Reply-To: <1395613011.22.0.29152070109.issue21041@psf.upfronthosting.co.za> Message-ID: <1544959644.86.0.788709270274.issue21041@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: behavior -> enhancement versions: +Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 06:34:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2018 11:34:46 +0000 Subject: [issue20164] Undocumented KeyError from os.path.expanduser In-Reply-To: <1389111327.1.0.12442170212.issue20164@psf.upfronthosting.co.za> Message-ID: <1544960086.02.0.788709270274.issue20164@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The behavior was changed in f2f4555d8287ad217a1dba7bbd93103ad4daf3a8 as a part of issue10496. ---------- nosy: +serhiy.storchaka, vstinner status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 07:33:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2018 12:33:20 +0000 Subject: [issue22166] test_codecs leaks references In-Reply-To: <1407444567.64.0.0425446064781.issue22166@psf.upfronthosting.co.za> Message-ID: <1544963600.5.0.788709270274.issue22166@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 07:34:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2018 12:34:18 +0000 Subject: [issue22166] test_codecs leaks references In-Reply-To: <1407444567.64.0.0425446064781.issue22166@psf.upfronthosting.co.za> Message-ID: <1544963657.98.0.788709270274.issue22166@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Do you mind to create a PR Victor? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 09:38:25 2018 From: report at bugs.python.org (Satrajit S Ghosh) Date: Sun, 16 Dec 2018 14:38:25 +0000 Subject: [issue35510] pickling derived dataclasses In-Reply-To: <1544930541.77.0.788709270274.issue35510@psf.upfronthosting.co.za> Message-ID: <1544971105.05.0.788709270274.issue35510@psf.upfronthosting.co.za> Satrajit S Ghosh added the comment: thank you + serhiy.storchaka while that works in an interactive namespace, it fails in the following setting, which is closer to my dynamic use case. ``` class A: def __init__(self, fields=None): self.B = dc.make_dataclass('B', fields or []) self.B.__module__ = __name__ # ... self.C = self.B() ``` now pickling A() fails. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 10:00:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2018 15:00:01 +0000 Subject: [issue35510] pickling derived dataclasses In-Reply-To: <1544930541.77.0.788709270274.issue35510@psf.upfronthosting.co.za> Message-ID: <1544972401.64.0.788709270274.issue35510@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Dataclasses are pickled by name, as well as other classes. Pickling classes which can not be accessed by name is not supported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 10:16:26 2018 From: report at bugs.python.org (Satrajit S Ghosh) Date: Sun, 16 Dec 2018 15:16:26 +0000 Subject: [issue35510] pickling derived dataclasses In-Reply-To: <1544930541.77.0.788709270274.issue35510@psf.upfronthosting.co.za> Message-ID: <1544973386.87.0.788709270274.issue35510@psf.upfronthosting.co.za> Satrajit S Ghosh added the comment: Thank you. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 11:07:37 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sun, 16 Dec 2018 16:07:37 +0000 Subject: [issue35509] Unable to inherit from logging.Formatter In-Reply-To: <1544875668.42.0.788709270274.issue35509@psf.upfronthosting.co.za> Message-ID: <1544976457.67.0.788709270274.issue35509@psf.upfronthosting.co.za> Chih-Hsuan Yen added the comment: Hi Vinay Sajip, thanks for notifying the patch author. Just a question: is there a reason to remove 3.8 from affected versions? My sample program is indeed broken on Python 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 11:35:30 2018 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 16 Dec 2018 16:35:30 +0000 Subject: [issue21041] pathlib.PurePath.parents rejects negative indexes In-Reply-To: <1395613011.22.0.29152070109.issue21041@psf.upfronthosting.co.za> Message-ID: <1544978130.69.0.788709270274.issue21041@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 12:00:46 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Dec 2018 17:00:46 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1544979646.39.0.788709270274.issue35499@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 640ed520dd6a43a8bf470b79542f58b5d57af9de by Victor Stinner in branch 'master': bpo-35499: make profile-opt don't override CFLAGS_NODIST (GH-11164) https://github.com/python/cpython/commit/640ed520dd6a43a8bf470b79542f58b5d57af9de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 13:00:02 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 16 Dec 2018 18:00:02 +0000 Subject: [issue25430] speed up ipaddress __contain__ method In-Reply-To: <1445083038.14.0.911555841878.issue25430@psf.upfronthosting.co.za> Message-ID: <1544983202.66.0.788709270274.issue25430@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Though this is out of the scope of the issue I tried converting num_addresses, __hash__, __getitem__ and __eq__ as per Serhiy's idea for IPv6Network replacing the stdlib implementation's int calls with _ip in a custom class. I can see up to 50% speedups as below and no test case failures converting rest of the call sites to use _ip instead of int in stdlib. But some of the methods may not be used as frequently as in this benchmark like thus being not worthy enough of change. Shall I open a new issue for further discussion? $ python3.7 bpo25430_1.py ipv6 test num_addresses with int 1.54065761 ipv6 test num_addresses without int 0.8266360819999998 ipv6 test hash with int 1.320016881 ipv6 test hash without int 0.6266323200000001 ipv6 test equality with int 1.6104001990000008 ipv6 test equality without int 1.0374885390000008 ipv6 test get item with int 2.092343390000001 ipv6 test get item without int 1.5606673410000003 $ bpo25430_1.py import ipaddress import timeit class IPv6Network2(ipaddress.IPv6Network): @property def num_addresses(self): return self.broadcast_address._ip - self.network_address._ip + 1 def __hash__(self): return hash(self.network_address._ip ^ self.netmask._ip) def __eq__(self, other): try: return (self._version == other._version and self.network_address == other.network_address and self.netmask._ip == other.netmask._ip) except AttributeError: return NotImplemented def __getitem__(self, n): network = self.network_address._ip broadcast = self.broadcast_address._ip if n >= 0: if network + n > broadcast: raise IndexError('address out of range') return self._address_class(network + n) else: n += 1 if broadcast + n < network: raise IndexError('address out of range') return self._address_class(broadcast + n) ipv6_test_net = ipaddress.IPv6Network("::/0") ipv6_test_net2 = IPv6Network2("::/0") def test1_num_address(): return ipv6_test_net.num_addresses def test2_num_address(): return ipv6_test_net2.num_addresses def test1_hash_address(): return hash(ipv6_test_net) def test2_hash_address(): return hash(ipv6_test_net2) if __name__ == "__main__": t = timeit.Timer("test1_num_address()", "from __main__ import test1_num_address") print("ipv6 test num_addresses with int", t.timeit(number=1000000)) t = timeit.Timer("test2_num_address()", "from __main__ import test2_num_address") print("ipv6 test num_addresses without int", t.timeit(number=1000000)) t = timeit.Timer("test1_hash_address()", "from __main__ import test1_hash_address") print("ipv6 test hash with int", t.timeit(number=1000000)) t = timeit.Timer("test2_hash_address()", "from __main__ import test2_hash_address") print("ipv6 test hash without int", t.timeit(number=1000000)) t = timeit.Timer("ipv6_test_net == ipv6_test_net", "from __main__ import ipv6_test_net") print("ipv6 test equality with int", t.timeit(number=1000000)) t = timeit.Timer("ipv6_test_net2 == ipv6_test_net2", "from __main__ import ipv6_test_net2") print("ipv6 test equality without int", t.timeit(number=1000000)) t = timeit.Timer("ipv6_test_net[10000]", "from __main__ import ipv6_test_net") print("ipv6 test get item with int", t.timeit(number=1000000)) t = timeit.Timer("ipv6_test_net2[10000]", "from __main__ import ipv6_test_net2") print("ipv6 test get item without int", t.timeit(number=1000000)) assert test1_num_address() == test2_num_address() assert hash(ipv6_test_net2) == hash(ipv6_test_net) assert ipv6_test_net2 == ipv6_test_net assert ipv6_test_net[10000] == ipv6_test_net2[10000] ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 13:36:05 2018 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 16 Dec 2018 18:36:05 +0000 Subject: [issue16516] argparse types (and actions) must be hashable In-Reply-To: <1353468507.9.0.0965555550975.issue16516@psf.upfronthosting.co.za> Message-ID: <1544985365.88.0.788709270274.issue16516@psf.upfronthosting.co.za> Guido van Rossum added the comment: Luna discovered that has actually been fixed in 3.8 (i.e. the master branch), by making {}.get hashable. So I'm closing this as fixed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 13:36:22 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Dec 2018 18:36:22 +0000 Subject: [issue34864] In Idle, Mac tabs make editor status line disappear. In-Reply-To: <1538422572.97.0.545547206417.issue34864@psf.upfronthosting.co.za> Message-ID: <1544985382.61.0.788709270274.issue34864@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ned, the warning is non-specific as to what might go wrong. I would not want to remove it until I had tested everything possibly relevant with tabbing set. And there is still the possibility that people will run IDLE with earlier tk releases. The #33397 issue of the close button disappearing was solved by packing the close button first. In the editor, the status bar is already packed into the ListedTopLevel first, before the text frame (perhaps for the same reason). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 14:00:38 2018 From: report at bugs.python.org (Anthony Sottile) Date: Sun, 16 Dec 2018 19:00:38 +0000 Subject: [issue35507] multiprocessing: seg fault when creating RawArray from numpy ctypes In-Reply-To: <1544849056.09.0.788709270274.issue35507@psf.upfronthosting.co.za> Message-ID: <1544986838.41.0.788709270274.issue35507@psf.upfronthosting.co.za> Anthony Sottile added the comment: This appears to be a bug with numpy, I've made a PR for them: https://github.com/numpy/numpy/pull/12566 ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 14:34:12 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 16 Dec 2018 19:34:12 +0000 Subject: [issue35511] Some methods of profile.Profile are not supported but the docs doesn't mention it. In-Reply-To: <1544942903.87.0.788709270274.issue35511@psf.upfronthosting.co.za> Message-ID: <1544988852.54.0.788709270274.issue35511@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset b912f9342e7a37d170ba659c13c959115c11545a by Andrew Svetlov (Beomsoo Kim) in branch 'master': bpo-35511: Trivial docs updates for profile and resource library modules. (GH-11124) https://github.com/python/cpython/commit/b912f9342e7a37d170ba659c13c959115c11545a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 14:57:12 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 16 Dec 2018 19:57:12 +0000 Subject: [issue35511] Some methods of profile.Profile are not supported but the docs doesn't mention it. In-Reply-To: <1544942903.87.0.788709270274.issue35511@psf.upfronthosting.co.za> Message-ID: <1544990232.37.0.788709270274.issue35511@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 Sun Dec 16 15:30:01 2018 From: report at bugs.python.org (Steve Newcomb) Date: Sun, 16 Dec 2018 20:30:01 +0000 Subject: [issue35496] left-to-right violation in match order In-Reply-To: <1544803576.39.0.788709270274.issue35496@psf.upfronthosting.co.za> Message-ID: <1544992201.18.0.788709270274.issue35496@psf.upfronthosting.co.za> Steve Newcomb added the comment: I'm very grateful for your time and attention, and sorry to have distracted you. You're correct when you say: Steven D'Aprano: ...the rightmost alternative matches from position 1 of the text, while the leftmost alternative doesn't match until position 8. So starting from position 0, the IPV6 check matches first, and so wins. I see now that what I was trying to do is simply not possible. I was looking for a way to do a kind of hat trick: to keep a matched substring ("::ffff:") out of matchObject.group(0). I guess I just don't get to do that. It would be a nice feature to add: a "consume-and-forget" or "suppress" extension group type. Non-capturing groups forget about themselves, but they don't suppress their matched contents. It's a nice thing to be able to do because some software accepts regular expressions as configuration items but doesn't allow configuration of selection among the groups that may appear within it. (I admit there aren't many occasions when suppression of substrings from group(0) is really necessary, but I think they do occur.) ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 15:43:27 2018 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 16 Dec 2018 20:43:27 +0000 Subject: [issue35512] patch.dict resolves in_dict eagerly (should be late resolved) Message-ID: <1544993007.41.0.788709270274.issue35512@psf.upfronthosting.co.za> New submission from Jason R. Coombs : Originally [reported in testing-cabal/mock#405](https://github.com/testing-cabal/mock/issues/405), I believe I've discovered an inconsistency that manifests as a flaw: `patch` and `patch.object` allow the target to be specified as string referring to the target object and this object is resolved at the time the patch effected, not when the patch is declared. `patch.dict` contrarily seems to resolve the dict eagerly, when the patch is declared. Observe with this pytest: ``` import mock target = dict(a=1) @mock.patch.dict('test_patch_dict.target', dict(b=2)) def test_after_patch(): assert target == dict(a=2, b=2) target = dict(a=2) ``` Here's the output: ``` $ rwt mock pytest -- -m pytest test_patch_dict.py Collecting mock Using cached mock-2.0.0-py2.py3-none-any.whl Collecting pbr>=0.11 (from mock) Using cached pbr-3.0.0-py2.py3-none-any.whl Collecting six>=1.9 (from mock) Using cached six-1.10.0-py2.py3-none-any.whl Installing collected packages: pbr, six, mock Successfully installed mock-2.0.0 pbr-3.0.0 six-1.10.0 ====================================== test session starts ======================================= platform darwin -- Python 3.6.1, pytest-3.0.5, py-1.4.33, pluggy-0.4.0 rootdir: /Users/jaraco, inifile: collected 1 items test_patch_dict.py F ============================================ FAILURES ============================================ ________________________________________ test_after_patch ________________________________________ @mock.patch.dict('test_patch_dict.target', dict(b=2)) def test_after_patch(): > assert target == dict(a=2, b=2) E assert {'a': 2} == {'a': 2, 'b': 2} E Omitting 1 identical items, use -v to show E Right contains more items: E {'b': 2} E Use -v to get the full diff test_patch_dict.py:8: AssertionError ==================================== 1 failed in 0.05 seconds ==================================== ``` The target is unpatched because `test_patch_dict.target` was resolved during decoration rather than during test run. Removing the initial assignment of `target = dict(a=1)`, the failure is thus: ``` ______________________________ ERROR collecting test_patch_dict.py _______________________________ ImportError while importing test module '/Users/jaraco/test_patch_dict.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/rwt-pcm3552g/mock/mock.py:1197: in _dot_lookup return getattr(thing, comp) E AttributeError: module 'test_patch_dict' has no attribute 'target' During handling of the above exception, another exception occurred: :942: in _find_and_load_unlocked ??? E AttributeError: module 'test_patch_dict' has no attribute '__path__' During handling of the above exception, another exception occurred: test_patch_dict.py:4: in @mock.patch.dict('test_patch_dict.target', dict(b=2)) /var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/rwt-pcm3552g/mock/mock.py:1708: in __init__ in_dict = _importer(in_dict) /var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/rwt-pcm3552g/mock/mock.py:1210: in _importer thing = _dot_lookup(thing, comp, import_path) /var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/rwt-pcm3552g/mock/mock.py:1199: in _dot_lookup __import__(import_path) E ModuleNotFoundError: No module named 'test_patch_dict.target'; 'test_patch_dict' is not a package !!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!! ==================================== 1 error in 0.41 seconds ===================================== ``` Is there any reason `patch.dict` doesn't have a similar deferred resolution behavior as its sister methods? ---------- components: Library (Lib) messages: 331937 nosy: jason.coombs priority: normal severity: normal status: open title: patch.dict resolves in_dict eagerly (should be late resolved) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 16:54:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Dec 2018 21:54:38 +0000 Subject: [issue35491] multiprocessing: enhance repr() to ease debugging In-Reply-To: <1544785802.31.0.788709270274.issue35491@psf.upfronthosting.co.za> Message-ID: <1544997278.02.0.788709270274.issue35491@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10418 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 16:59:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Dec 2018 21:59:17 +0000 Subject: [issue20164] Undocumented KeyError from os.path.expanduser In-Reply-To: <1389111327.1.0.12442170212.issue20164@psf.upfronthosting.co.za> Message-ID: <1544997557.8.0.788709270274.issue20164@psf.upfronthosting.co.za> STINNER Victor added the comment: Even if it's not exactly a duplicate of bpo-10496, the reported bug has been fixed. I close the issue. ---------- resolution: -> duplicate stage: test needed -> resolved status: pending -> closed superseder: -> Python startup should not require passwd entry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 17:00:20 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 16 Dec 2018 22:00:20 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1544997620.15.0.788709270274.issue35499@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10419 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 17:05:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Dec 2018 22:05:49 +0000 Subject: [issue35513] Lib/test/lock_tests.py should not use time.time(), but time.monotonic() Message-ID: <1544997949.57.0.788709270274.issue35513@psf.upfronthosting.co.za> New submission from STINNER Victor : https://buildbot.python.org/all/#/builders/145/builds/956 Unhandled exception in thread started by .task at 0x111775cb0> Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/test/lock_tests.py", line 41, in task f() File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/test/lock_tests.py", line 591, in f self.assertTimeout(dt, 0.1) File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/test/lock_tests.py", line 80, in assertTimeout self.assertGreaterEqual(actual, expected * 0.6) File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/unittest/case.py", line 1283, in assertGreaterEqual self.fail(self._formatMessage(msg, standardMsg)) File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/unittest/case.py", line 719, in fail raise self.failureException(msg) AssertionError: -0.24049997329711914 not greater than or equal to 0.06 test_waitfor_timeout (test.test_threading.ConditionTests) ... FAIL test_waitfor_timeout(): ... dt = time.time() result = cond.wait_for(lambda : state==4, timeout=0.1) dt = time.time() - dt self.assertFalse(result) self.assertTimeout(dt, 0.1) ... with: def assertTimeout(self, actual, expected): ... self.assertGreaterEqual(actual, expected * 0.6) ... It seems like time.time() gone backward on the buildbot. The test must use time.monotonic() to measure time difference. Attached PR fix the issue. ---------- components: Tests messages: 331939 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: Lib/test/lock_tests.py should not use time.time(), but time.monotonic() versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 17:24:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Dec 2018 22:24:09 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1544999049.06.0.788709270274.issue35499@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 9a4758550d96030ee7e7f7c7c68b435db1a2a825 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-35499: make profile-opt don't override CFLAGS_NODIST (GH-11164) (GH-11179) https://github.com/python/cpython/commit/9a4758550d96030ee7e7f7c7c68b435db1a2a825 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 17:38:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Dec 2018 22:38:25 +0000 Subject: [issue35513] Lib/test/lock_tests.py should not use time.time(), but time.monotonic() In-Reply-To: <1544997949.57.0.788709270274.issue35513@psf.upfronthosting.co.za> Message-ID: <1544999905.19.0.788709270274.issue35513@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10420 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 17:40:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Dec 2018 22:40:51 +0000 Subject: [issue35491] multiprocessing: enhance repr() to ease debugging In-Reply-To: <1544785802.31.0.788709270274.issue35491@psf.upfronthosting.co.za> Message-ID: <1545000051.98.0.788709270274.issue35491@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2dfe3511fe310c559d5571c52dcac381f33fd3a6 by Victor Stinner in branch 'master': bpo-35491, multiprocessing: replace "RUN" with RUN (GH-11178) https://github.com/python/cpython/commit/2dfe3511fe310c559d5571c52dcac381f33fd3a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 17:42:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Dec 2018 22:42:45 +0000 Subject: [issue35513] Lib/test/lock_tests.py should not use time.time(), but time.monotonic() In-Reply-To: <1544997949.57.0.788709270274.issue35513@psf.upfronthosting.co.za> Message-ID: <1545000165.31.0.788709270274.issue35513@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10421 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 17:53:32 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 16 Dec 2018 22:53:32 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1545000812.75.0.788709270274.issue35412@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10422 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 19:20:42 2018 From: report at bugs.python.org (Grant Jenks) Date: Mon, 17 Dec 2018 00:20:42 +0000 Subject: [issue35196] IDLE text squeezer is too aggressive and is slow In-Reply-To: <1541757652.98.0.788709270274.issue35196@psf.upfronthosting.co.za> Message-ID: <1545006042.51.0.788709270274.issue35196@psf.upfronthosting.co.za> Change by Grant Jenks : ---------- nosy: +grantjenks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 20:39:39 2018 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 17 Dec 2018 01:39:39 +0000 Subject: [issue25667] Supply dual-stack (IPv4/IPv6) socket bind routine In-Reply-To: <1447939973.83.0.965937708444.issue25667@psf.upfronthosting.co.za> Message-ID: <1545010779.5.0.788709270274.issue25667@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I believe this issue is a duplicate of 17561, which I stumbled onto today. ---------- resolution: -> duplicate superseder: -> Add socket.create_server_sock() convenience function _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 20:42:28 2018 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 17 Dec 2018 01:42:28 +0000 Subject: [issue17561] Add socket.create_server_sock() convenience function In-Reply-To: <1364402909.97.0.467946240817.issue17561@psf.upfronthosting.co.za> Message-ID: <1545010948.05.0.788709270274.issue17561@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I do believe this issue is still important and relevant. See issue25667 for a duplicate ticket (and references to implementations) and issue24209 for another issue where this could have been applied. ---------- nosy: +jason.coombs versions: +Python 3.8 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 21:47:20 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 17 Dec 2018 02:47:20 +0000 Subject: [issue17561] Add socket.create_server_sock() convenience function In-Reply-To: <1364402909.97.0.467946240817.issue17561@psf.upfronthosting.co.za> Message-ID: <1545014840.96.0.788709270274.issue17561@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Interesting. Yes, I agree this proposal is still desirable. We can reuse socket.create_server_sock() in smtpd, ftplib, socketserver (issue20215) and http.server (issue24209) modules which will inherit dual-stack IPv4/6 capabilities for free. I should be able to provide a PR sometime during this month. ---------- assignee: -> giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 22:47:13 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 17 Dec 2018 03:47:13 +0000 Subject: [issue35397] Undeprecate and document urllib.parse.unwrap In-Reply-To: <1543879550.52.0.788709270274.issue35397@psf.upfronthosting.co.za> Message-ID: <1545018433.57.0.788709270274.issue35397@psf.upfronthosting.co.za> ?ric Araujo added the comment: I suspect the only reason was that unwrap was caught in the bag of ?undocumented functions (that don?t seem useful)?. Personally I think I see more bare URLs than URLs in angle brackets these days, and `URL:` feels like an archaic marker :) But I don?t see any harm in un-deprecating and documenting the function now that you say you would find it useful. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 23:45:31 2018 From: report at bugs.python.org (bombs) Date: Mon, 17 Dec 2018 04:45:31 +0000 Subject: [issue35514] Docs on reference count detail. enhancement. Message-ID: <1545021931.75.0.788709270274.issue35514@psf.upfronthosting.co.za> New submission from bombs : https://docs.python.org/3/c-api/intro.html#reference-count-details When I read that section of the docs first time, I found it hard to grasp what transferring of ownership is, which is an important and repeating concept throughout the docs. Some explanations were confusing. For example, > When a function passes ownership of a reference on to its caller, the > caller is said to receive a new reference This part tries to explain what is to receive a new reference, in terms of passing ownership, when readers have no ideas of what transferring of ownership is. I think it is kind of a circular definition fallacy. I think this section should've explained transferring of ownership, a high level concept, in terms of reference count changes, which are concrete operations. (original version) When a function passes ownership of a reference on to its caller, the caller is said to receive a new reference. When no ownership is transferred, the caller is said to borrow the reference. Nothing needs to be done for a borrowed reference. Conversely, when a calling function passes in a reference to an object, there are two possibilities: the function steals a reference to the object, or it does not. Stealing a reference means that when you pass a reference to a function, that function assumes that it now owns that reference, and you are not responsible for it any longer. (revision) When a function returns an object and effectively increases the reference count of it, the function is said to give ownership of a new reference to its caller. When a function returns an object without changing the reference count of it, the caller is said to borrow the reference. Nothing needs to be done for a borrowed reference. Conversely, if a function decreases the reference count of an object, it is said to steal the ownership of the reference from its owner. Stealing a reference means that when you pass a reference to a stealing function, that function assumes that it now owns that reference, and you are not responsible for it any longer. ---------- assignee: docs at python components: Documentation messages: 331946 nosy: bluewhale8202, docs at python priority: normal severity: normal status: open title: Docs on reference count detail. enhancement. type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 02:07:25 2018 From: report at bugs.python.org (Scott Stevens) Date: Mon, 17 Dec 2018 07:07:25 +0000 Subject: [issue35360] [Windows] Update SQLite dependency In-Reply-To: <1543580070.45.0.788709270274.issue35360@psf.upfronthosting.co.za> Message-ID: <1545030445.3.0.788709270274.issue35360@psf.upfronthosting.co.za> Scott Stevens added the comment: With the discovery of the SQLite "Magellan" bug, could the version be upgraded to 3.26 for all Python versions? As far as I know, the security case is restricted to where the user is allowing aribitrary SQL execution without arbitrary Python execution, but in that case I do believe remote code execution is possible. https://blade.tencent.com/magellan/index_en.html ---------- nosy: +Scott Stevens _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 02:10:35 2018 From: report at bugs.python.org (Scott Stevens) Date: Mon, 17 Dec 2018 07:10:35 +0000 Subject: [issue34916] include sqlite-3.25+ (with window functions) In-Reply-To: <1538846966.09.0.545547206417.issue34916@psf.upfronthosting.co.za> Message-ID: <1545030635.55.0.788709270274.issue34916@psf.upfronthosting.co.za> Scott Stevens added the comment: Due to the SQLite "Magellan" bug, I'd suggest this be 3.26+. Details: https://blade.tencent.com/magellan/index_en.html See also: https://bugs.python.org/issue35360 ---------- nosy: +Scott Stevens _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 02:59:12 2018 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 17 Dec 2018 07:59:12 +0000 Subject: [issue35186] distutils.command.upload uses deprecated platform.dist with bdist_rpm In-Reply-To: <1541642171.78.0.788709270274.issue35186@psf.upfronthosting.co.za> Message-ID: <1545033552.39.0.788709270274.issue35186@psf.upfronthosting.co.za> Petr Viktorin added the comment: New changeset 4e80f5cbeaee87a26e49bc9623c92a10e28dbbd9 by Petr Viktorin (Paul Ganssle) in branch 'master': bpo-35186: Remove "built with" comment in setup.py upload (GH-10414) https://github.com/python/cpython/commit/4e80f5cbeaee87a26e49bc9623c92a10e28dbbd9 ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 03:34:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 08:34:13 +0000 Subject: [issue35412] test_future4 ran no test In-Reply-To: <1543963037.14.0.788709270274.issue35412@psf.upfronthosting.co.za> Message-ID: <1545035653.11.0.788709270274.issue35412@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2d91a1325f7def1cc3762cadf5f5a99a55dac78a by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-35412: Add testcase to test_future4 (GH-11131) (GH-11183) https://github.com/python/cpython/commit/2d91a1325f7def1cc3762cadf5f5a99a55dac78a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 03:36:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 08:36:42 +0000 Subject: [issue35513] Lib/test/lock_tests.py should not use time.time(), but time.monotonic() In-Reply-To: <1544997949.57.0.788709270274.issue35513@psf.upfronthosting.co.za> Message-ID: <1545035802.54.0.788709270274.issue35513@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2cf4c202ffeb30787c944365ba54013688b854c2 by Victor Stinner in branch 'master': bpo-35513: Replace time.time() with time.monotonic() in tests (GH-11182) https://github.com/python/cpython/commit/2cf4c202ffeb30787c944365ba54013688b854c2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 03:37:03 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Dec 2018 08:37:03 +0000 Subject: [issue35513] Lib/test/lock_tests.py should not use time.time(), but time.monotonic() In-Reply-To: <1544997949.57.0.788709270274.issue35513@psf.upfronthosting.co.za> Message-ID: <1545035823.79.0.788709270274.issue35513@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10423 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 03:45:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 08:45:13 +0000 Subject: [issue19974] tarfile doesn't overwrite symlink by directory In-Reply-To: <1386935948.7.0.893963676407.issue19974@psf.upfronthosting.co.za> Message-ID: <1545036313.38.0.788709270274.issue19974@psf.upfronthosting.co.za> STINNER Victor added the comment: Martin: you review a patch written 4 years ago at https://bugs.python.org/review/19974/diff/11106/Lib/tarfile.py Oh wow, I didn't know that Rietveld was still working :-D It's maybe time to convert the old patch to a proper pull request on GitHub, no? :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 04:01:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 09:01:41 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1545037301.14.0.788709270274.issue35348@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10424 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 04:02:06 2018 From: report at bugs.python.org (Michael Brandl) Date: Mon, 17 Dec 2018 09:02:06 +0000 Subject: [issue35483] tarfile.extractall on existing symlink in Ubuntu overwrites target file, not symlink, unlinke GNU tar In-Reply-To: <1544714559.52.0.788709270274.issue35483@psf.upfronthosting.co.za> Message-ID: <1545037326.77.0.788709270274.issue35483@psf.upfronthosting.co.za> Michael Brandl added the comment: Sounds good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 04:03:08 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Dec 2018 09:03:08 +0000 Subject: [issue35513] Lib/test/lock_tests.py should not use time.time(), but time.monotonic() In-Reply-To: <1544997949.57.0.788709270274.issue35513@psf.upfronthosting.co.za> Message-ID: <1545037388.43.0.788709270274.issue35513@psf.upfronthosting.co.za> miss-islington added the comment: New changeset be69ff232df23b6ee165d7c34df5435d497cb79b by Miss Islington (bot) in branch '3.7': bpo-35513: Replace time.time() with time.monotonic() in tests (GH-11182) https://github.com/python/cpython/commit/be69ff232df23b6ee165d7c34df5435d497cb79b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 04:04:28 2018 From: report at bugs.python.org (Arnaud) Date: Mon, 17 Dec 2018 09:04:28 +0000 Subject: [issue35515] Matrix operator star creates a false matrix Message-ID: <1545037468.26.0.788709270274.issue35515@psf.upfronthosting.co.za> New submission from Arnaud : It seems that the definition of a matrix like this: a=[[0,0]]*4 does not create the matrix correctly by create 4 times the same pointer. After the matrix creation, a print(a) gives the following result: [[0, 0], [0, 0], [0, 0], [0, 0]] which looks normal print(type(a)) and print(type(a[1]) give also the correct result: list But when we try to change a matrix element: a[2][0]=1 print(a) gives a false result: [[1, 0], [1, 0], [1, 0], [1, 0]] When the matrix definition is done like this: a=[[0, 0], [0, 0], [0, 0], [0, 0]] the behavior is "as expected" a[2][0]=1 print(a) gives the correct result: [[0, 0], [0, 0], [1, 0], [0, 0]] ---------- components: Interpreter Core files: python_bugreport.py messages: 331955 nosy: xda at abalgo.com priority: normal severity: normal status: open title: Matrix operator star creates a false matrix type: behavior versions: Python 2.7, Python 3.5, Python 3.6 Added file: https://bugs.python.org/file48001/python_bugreport.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 04:06:47 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 17 Dec 2018 09:06:47 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1545037607.88.0.788709270274.issue35348@psf.upfronthosting.co.za> Ronald Oussoren added the comment: > What result of platform.architecture() do you expect for an universal binary? I honestly don't know. What is the purpose of this functionality in the first place? I have never had a problem where using this function was the right solution. To be honest I have the same problem with a number of other APIs in this module. As an example, platform.system_alias() looks interesting but has an API that won't work in general (macOS release version cannot be calculated from platform.uname() information, likewise for linux distribution information). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 04:09:23 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 17 Dec 2018 09:09:23 +0000 Subject: [issue35515] Matrix operator star creates a false matrix In-Reply-To: <1545037468.26.0.788709270274.issue35515@psf.upfronthosting.co.za> Message-ID: <1545037763.06.0.788709270274.issue35515@psf.upfronthosting.co.za> Christian Heimes added the comment: [[0,0]]*4 is not a matrix definition. You are defining a list that shares the same list object four times. It's a common misunderstanding how list works, see https://stackoverflow.com/questions/240178/list-of-lists-changes-reflected-across-sublists-unexpectedly ---------- nosy: +christian.heimes resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 04:13:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 09:13:54 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1545038034.39.0.788709270274.issue35348@psf.upfronthosting.co.za> STINNER Victor added the comment: Ronald Oussoren gave more info on my previous PR 10780 ("platform.platform() uses mac_ver() on macOS"): https://github.com/python/cpython/pull/10780#issuecomment-444529371 """ The information does not include data about fat binaries, resulting amongst others in the following inconsistency: ronald at Menegroth[0]$ arch -i386 python3.6 -m platform Darwin-18.2.0-x86_64-i386-64bit ronald at Menegroth[0]$ arch -i386 python3.6 -c 'import sys; print(sys.maxsize)' 2147483647 This platform output includes "64bit" because the binary for python3.6 includes support for both i386 and x86_64, and doesn't show that the command is using i386 instructions. """ I made some tests: $ file /usr/local/bin/python3 /usr/local/bin/python3: Mach-O universal binary with 2 architectures: [i386:Mach-O executable i386] [x86_64:Mach-O 64-bit executable x86_64] /usr/local/bin/python3 (for architecture i386): Mach-O executable i386 /usr/local/bin/python3 (for architecture x86_64): Mach-O 64-bit executable x86_64 $ /usr/local/bin/python3 -c 'import struct, sys, platform; print(platform.architecture(), struct.calcsize("P"), sys.maxsize)' ('64bit', '') 8 9223372036854775807 $ arch -x86_64 /usr/local/bin/python3 -c 'import struct, sys, platform; print(platform.architecture(), struct.calcsize("P"), sys.maxsize)' ('64bit', '') 8 9223372036854775807 $ arch -i386 /usr/local/bin/python3 -c 'import struct, sys, platform; print(platform.architecture(), struct.calcsize("P"), sys.maxsize)' ('64bit', '') 4 2147483647 IMHO platform.architecture() should return 32bit when running "arch -i386 /usr/local/bin/python3" to be consistent with struct.calcsize("P") == 4 and sys.maxsize == 2147483647. Otherwise, how would you notice that you are using the 32-bit flavor of Python? My PR 11186 implements this fix. Ronald Oussoren: > Using sizeof(void*) or sys.maxsize suffers from the a simular problem: this will only detect the pointer-size of the current proces and not that the binary is capable of running with a different pointer-size as well. Right, but I don't think that it's possible to report that Python executable is FAT binary in platform.architecture() result. If you want to provide such information, IMHO you should write a new function or at least add a new parameter to platform.architecture(). IMHO it's more consistent to report "32bit" for "arch -i386 python3" and "64bit" for "arch -x86_64 python3". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 04:30:17 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 17 Dec 2018 09:30:17 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1545039017.44.0.788709270274.issue35348@psf.upfronthosting.co.za> Ronald Oussoren added the comment: > IMHO platform.architecture() should return 32bit when running "arch -i386 /usr/local/bin/python3" to be consistent with struct.calcsize("P") == 4 and sys.maxsize == 2147483647. Otherwise, how would you notice that you are using the 32-bit flavor of Python? I don't agree. Platform.architecture() is defined to look at a specified binary, not the currently running process. That can lead to inconsistencies like this and is not something you can avoid. > Ronald Oussoren: > > Using sizeof(void*) or sys.maxsize suffers from the a simular problem: this will only detect the pointer-size of the current proces and not that the binary is capable of running with a different pointer-size as well. > Right, but I don't think that it's possible to report that Python executable is FAT binary in platform.architecture() result. If you want to provide such information, IMHO you should write a new function or at least add a new parameter to platform.architecture(). > IMHO it's more consistent to report "32bit" for "arch -i386 python3" and "64bit" for "arch -x86_64 python3". This doesn't necessarily need a new function, platform.architecture could also return something like "32bit,64bit". But as I mentioned in my previous message I don't know why anyone would want to use this function in the first place. There are better ways to determine information about the current process (struct.calcsize, sys.maxsize, sys.byteorder), and I have never had a need to determine information about executable files that I couldn't get in a better way using other libraries (like macholib and pyelftools) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 04:31:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 09:31:27 +0000 Subject: [issue35516] platform.system_alias(): add macOS support Message-ID: <1545039087.64.0.788709270274.issue35516@psf.upfronthosting.co.za> New submission from STINNER Victor : platform.system_alias() documentation: Returns ``(system, release, version)`` aliased to common marketing names used for some systems. It also does some reordering of the information in some cases where it would otherwise cause confusion. IMHO "macOS" and macOS release are more appropriate than darwin and darwin release for platform.system_alias(). I propose to make a similar change in system_alias() than the platform.mac_ver() change made in bpo-35344. ---------- components: Library (Lib) messages: 331960 nosy: vstinner priority: normal severity: normal status: open title: platform.system_alias(): add macOS support versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 04:32:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 09:32:55 +0000 Subject: [issue35516] platform.system_alias(): add macOS support In-Reply-To: <1545039087.64.0.788709270274.issue35516@psf.upfronthosting.co.za> Message-ID: <1545039175.29.0.788709270274.issue35516@psf.upfronthosting.co.za> STINNER Victor added the comment: > than the platform.mac_ver() change made in bpo-35344 Oops, this issue changed platform.platform() (not platform.mac_ver()). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 04:35:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 09:35:43 +0000 Subject: [issue35516] platform.system_alias(): add macOS support In-Reply-To: <1545039087.64.0.788709270274.issue35516@psf.upfronthosting.co.za> Message-ID: <1545039343.65.0.788709270274.issue35516@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10425 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 04:36:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 09:36:26 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1545039386.86.0.788709270274.issue35348@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-35516: "platform.system_alias(): add macOS support". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:02:06 2018 From: report at bugs.python.org (larsfuse) Date: Mon, 17 Dec 2018 10:02:06 +0000 Subject: [issue35457] robotparser reads empty robots.txt file as "all denied" In-Reply-To: <1544520647.95.0.788709270274.issue35457@psf.upfronthosting.co.za> Message-ID: <1545040926.74.0.788709270274.issue35457@psf.upfronthosting.co.za> larsfuse added the comment: > (...) refers users, for file structure, to http://www.robotstxt.org/orig.html. This says nothing about the effect of an empty file, so I don't see this as a bug. That is incorrect. From that url you can find: > The presence of an empty "/robots.txt" file has no explicit associated semantics, it will be treated as if it was not present, i.e. all robots will consider themselves welcome. So this is definitely a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:09:06 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 17 Dec 2018 10:09:06 +0000 Subject: [issue35516] platform.system_alias(): add macOS support In-Reply-To: <1545039087.64.0.788709270274.issue35516@psf.upfronthosting.co.za> Message-ID: <1545041346.53.0.788709270274.issue35516@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The patch does not use the version information passed in to calculate the marketing version. That's a problem when passing in low-level information from a system running a different version of macOS (for example passing in the low-level version information from a macOS 10.8 system while the script is running on a macOS 10.14 system). ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:15:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 10:15:35 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1545041735.48.0.788709270274.issue35348@psf.upfronthosting.co.za> STINNER Victor added the comment: > I don't agree. Platform.architecture() is defined to look at a specified binary, not the currently running process. That can lead to inconsistencies like this and is not something you can avoid. architecture() looks at running Python executable by default and documents a special case when executable equals to sys.executable: "(...) then only if the executable points to the Python interpreter. Reasonable defaults are used when the above needs are not met." https://docs.python.org/dev/library/platform.html#platform.architecture > This doesn't necessarily need a new function, platform.architecture could also return something like "32bit,64bit". As an user, I don't need for this information. architecture() already contains a note: """ On Mac OS X (and perhaps other platforms), executable files may be universal files containing multiple architectures. To get at the ?64-bitness? of the current interpreter, it is more reliable to query the sys.maxsize attribute: is_64bits = sys.maxsize > 2**32 """ > But as I mentioned in my previous message I don't know why anyone would want to use this function in the first place. There are better ways to determine information about the current process (struct.calcsize, sys.maxsize, sys.byteorder), and I have never had a need to determine information about executable files that I couldn't get in a better way using other libraries (like macholib and pyelftools) platform.architecture() has multiple issues: * It rely on the external program "file". It is not available on Windows. It is likely missing on small Linux containers. It doensn't report an error if the program is missing but "should be available". * Calling an external program can lead to security issues. * Parsing file output is not reliable, even if PR 11159 should make the parsing more reliable. For example, file output is locale dependent and the -b option is not standard. * The expected output on a macOS universal binary is unclear. * The purpose of the function seems to be unclear to most developers... Another solution is to deprecate the function. I agree with Ronald that sys.maxsize is enough for most use cases (get "bits"). For more accurate information, platform.architecture() is wrong and a third-party module is required. By the way, platform.architecture() is not used in the stdlib which is a sign that maybe the function is not really helpful. Moreover, sysconfig and distutils.util contain the following code: # We can't use "platform.architecture()[0]" because a # bootstrap problem. We use a dict to get an error # if some suspicious happens. bitness = {2147483647:"32bit", 9223372036854775807:"64bit"} machine += ".%s" % bitness[sys.maxsize] Serhiy, Ronald: What do you think of deprecating platform.architecture() instead of trying to fix it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:19:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 10:19:42 +0000 Subject: [issue35516] platform.system_alias(): add macOS support In-Reply-To: <1545039087.64.0.788709270274.issue35516@psf.upfronthosting.co.za> Message-ID: <1545041982.28.0.788709270274.issue35516@psf.upfronthosting.co.za> STINNER Victor added the comment: > The patch does not use the version information passed in to calculate the marketing version. That's a problem when passing in low-level information from a system running a different version of macOS (for example passing in the low-level version information from a macOS 10.8 system while the script is running on a macOS 10.14 system). Right. The function has a weird API. Maybe the function shouldn't be fixed in this case. If we don't fix it, I would like to at least document why the function doesn't replace Darwin with macOS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:24:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 10:24:35 +0000 Subject: [issue22166] test_codecs leaks references In-Reply-To: <1407444567.64.0.0425446064781.issue22166@psf.upfronthosting.co.za> Message-ID: <1545042275.51.0.788709270274.issue22166@psf.upfronthosting.co.za> STINNER Victor added the comment: > Do you mind to create a PR Victor? I completely forgot this issue and I don't plan to fix it in the short-term. Feel free to write PR if you want. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:30:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 10:30:43 +0000 Subject: [issue35513] Lib/test/lock_tests.py should not use time.time(), but time.monotonic() In-Reply-To: <1544997949.57.0.788709270274.issue35513@psf.upfronthosting.co.za> Message-ID: <1545042643.14.0.788709270274.issue35513@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8db5b54463118e5eb60cb3582e3108623f01f5df by Victor Stinner in branch 'master': bpo-35513, unittest: TextTestRunner uses time.perf_counter() (GH-11180) https://github.com/python/cpython/commit/8db5b54463118e5eb60cb3582e3108623f01f5df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:30:56 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Dec 2018 10:30:56 +0000 Subject: [issue35513] Lib/test/lock_tests.py should not use time.time(), but time.monotonic() In-Reply-To: <1544997949.57.0.788709270274.issue35513@psf.upfronthosting.co.za> Message-ID: <1545042656.76.0.788709270274.issue35513@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10426 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:31:38 2018 From: report at bugs.python.org (Manjusaka) Date: Mon, 17 Dec 2018 10:31:38 +0000 Subject: [issue35517] enhhance for selector.EpollSelector Message-ID: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> New submission from Manjusaka : Add a keyword argument for selector.EpollSelector with default value. This can help people use the EPOLLEXCLUSIVE since Python 3.7 and Linux Kernel 4.5 to avoid the herd effect like this def register(self, fileobj, events, data=None, exclusive=False): key = super().register(fileobj, events, data) epoll_events = 0 if events & EVENT_READ: epoll_events |= select.EPOLLIN if events & EVENT_WRITE: epoll_events |= select.EPOLLOUT try: if exclusive and hasattr(select, "EPOLLEXCLUSIVE"): epoll_events |= select.EPOLLEXCLUSIVE self._epoll.register(key.fd, epoll_events) except BaseException: super().unregister(fileobj) raise return key ---------- components: Library (Lib) messages: 331969 nosy: Manjusaka priority: normal severity: normal status: open title: enhhance for selector.EpollSelector type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:34:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 10:34:08 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545042848.92.0.788709270274.issue35517@psf.upfronthosting.co.za> STINNER Victor added the comment: > Add a keyword argument for selector.EpollSelector with default value. I suggest to use a keyword-only parameter: def register(self, fileobj, events, data=None, *, exclusive=False): Do you want to work on a pull request? ---------- nosy: +giampaolo.rodola, vstinner title: enhhance for selector.EpollSelector -> selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:36:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 10:36:01 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545042961.35.0.788709270274.issue35517@psf.upfronthosting.co.za> STINNER Victor added the comment: EPOLLEXCLUSIVE doc from Linux manual page: """ EPOLLEXCLUSIVE (since Linux 4.5) Sets an exclusive wakeup mode for the epoll file descriptor that is being attached to the target file descriptor, fd. When a wakeup event occurs and multiple epoll file descriptors are attached to the same target file using EPOLLEXCLUSIVE, one or more of the epoll file descriptors will receive an event with epoll_wait(2). The default in this scenario (when EPOLLEXCLU? SIVE is not set) is for all epoll file descriptors to receive an event. EPOLLEXCLUSIVE is thus useful for avoiding thundering herd problems in certain scenarios. If the same file descriptor is in multiple epoll instances, some with the EPOLLEXCLUSIVE flag, and others without, then events will be provided to all epoll instances that did not specify EPOLLEXCLUSIVE, and at least one of the epoll instances that did specify EPOLLEXCLUSIVE. The following values may be specified in conjunction with EPOLLEXCLUSIVE: EPOLLIN, EPOLLOUT, EPOLLWAKEUP, and EPOLLET. EPOLLHUP and EPOLLERR can also be specified, but this is not required: as usual, these events are always reported if they occur, regardless of whether they are specified in events. Attempts to specify other values in events yield an error. EPOLLEXCLUSIVE may be used only in an EPOLL_CTL_ADD operation; attempts to employ it with EPOLL_CTL_MOD yield an error. If EPOLLEXCLUSIVE has been set using epoll_ctl(), then a subsequent EPOLL_CTL_MOD on the same epfd, fd pair yields an error. A call to epoll_ctl() that specifies EPOLLEXCLUSIVE in events and spec? ifies the target file descriptor fd as an epoll instance will likewise fail. The error in all of these cases is EINVAL. """ See also https://lwn.net/Articles/633422/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:36:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 10:36:49 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545043009.76.0.788709270274.issue35517@psf.upfronthosting.co.za> STINNER Victor added the comment: if exclusive and hasattr(select, "EPOLLEXCLUSIVE"): epoll_events |= select.EPOLLEXCLUSIVE Maybe NotImplementedError would be more appropriate rather than silently ignore the error? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:37:46 2018 From: report at bugs.python.org (Manjusaka) Date: Mon, 17 Dec 2018 10:37:46 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545043066.11.0.788709270274.issue35517@psf.upfronthosting.co.za> Manjusaka added the comment: I will work on a PR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:38:19 2018 From: report at bugs.python.org (Manjusaka) Date: Mon, 17 Dec 2018 10:38:19 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545043099.25.0.788709270274.issue35517@psf.upfronthosting.co.za> Manjusaka added the comment: "a keyword-only parameter" is good I'll take it done ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:42:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 10:42:03 +0000 Subject: [issue31784] Implementation of the PEP 564: Add time.time_ns() In-Reply-To: <1507930455.75.0.213398074469.issue31784@psf.upfronthosting.co.za> Message-ID: <1545043323.18.0.788709270274.issue31784@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10427 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:48:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 10:48:04 +0000 Subject: [issue23451] Deprecation warnings building 3.5 Visual Studio Windows 8.1 64 bit In-Reply-To: <1423697646.35.0.470486317043.issue23451@psf.upfronthosting.co.za> Message-ID: <1545043684.05.0.788709270274.issue23451@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10428 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:48:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 10:48:04 +0000 Subject: [issue22117] Rewrite pytime.h to work on nanoseconds In-Reply-To: <1406848093.52.0.5184372094.issue22117@psf.upfronthosting.co.za> Message-ID: <1545043684.17.0.663665092547.issue22117@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10429 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:49:24 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Dec 2018 10:49:24 +0000 Subject: [issue35513] Lib/test/lock_tests.py should not use time.time(), but time.monotonic() In-Reply-To: <1544997949.57.0.788709270274.issue35513@psf.upfronthosting.co.za> Message-ID: <1545043764.35.0.788709270274.issue35513@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 9ade4cbc0f54fc0e2970e4e202f09ab83f5e3b77 by Miss Islington (bot) in branch '3.7': bpo-35513, unittest: TextTestRunner uses time.perf_counter() (GH-11180) https://github.com/python/cpython/commit/9ade4cbc0f54fc0e2970e4e202f09ab83f5e3b77 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:54:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 10:54:06 +0000 Subject: [issue35513] Lib/test/lock_tests.py should not use time.time(), but time.monotonic() In-Reply-To: <1544997949.57.0.788709270274.issue35513@psf.upfronthosting.co.za> Message-ID: <1545044046.91.0.788709270274.issue35513@psf.upfronthosting.co.za> STINNER Victor added the comment: I searched from "time.time" and "from time import(...)time" in the Python standard library (in the master branch) and it seems like all usage of time.time() are now appropriate. I close the issue. Sometimes, I'm not sure that if time.monotonic() or time.perf_counter() should be used, but at least both functions are monotonic and so are not affected by this issue (clock going backwards). ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 05:59:10 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 17 Dec 2018 10:59:10 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545044350.65.0.788709270274.issue35517@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I'm not sure I understand what EPOLLEXCLUSIVE is about. Could you provide a use case? Also, there are other constants which may also be useful such as EPOLLWAKEUP and EPOLLONESHOT: http://man7.org/linux/man-pages/man2/epoll_ctl.2.html So perhaps it makes more sense to expose a lower-level "extra_events" argument instead, which is more flexible and also saves us from the hassle of describing what the new argument is about (which really is a Linux kernel thing) in the doc: >>> s.register(fd, EVENT_READ, extra_events=select.EPOLLEXCLUSIVE | select.EPOLLONESHOT) That raises the question whether we should also have an "extra_events" argument for modify() method (probably yes). But again, I think it makes sense to understand what's the use case of these constants first, because if they are rarely used maybe who needs them can simply look at the source and use s._selector.modify() directly. ---------- nosy: +neologix, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:08:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 11:08:35 +0000 Subject: [issue35518] test_timeout uses blackhole.snakebite.net domain which doesn't exist anymore Message-ID: <1545044915.94.0.788709270274.issue35518@psf.upfronthosting.co.za> New submission from STINNER Victor : snakebite.net and blackhole.snakebite.net domains don't exist anymore, but test_timeout uses it: def testConnectTimeout(self): # Testing connect timeout is tricky: we need to have IP connectivity # to a host that silently drops our packets. We can't simulate this # from Python because it's a function of the underlying TCP/IP stack. # So, the following Snakebite host has been defined: blackhole = resolve_address('blackhole.snakebite.net', 56666) (...) If I recall properly, snakebite.net was a service provided by Trent Nelson to test CPython on various operating systems (Solaris, IRIX, HP-UX, etc.). It seems like the service is now completely down. Article from 2009: https://conferences.oreilly.com/oscon/oscon2009/public/schedule/detail/8268 "Snakebite is a culmination of ten months of secretive work, seven trips to Michigan State University, six blown fuses and about $60,000. The end result? A network of around 37-ish servers of all different shapes and sizes, specifically geared towards the development needs of open source projects. Get the inside scoop from Snakebite's Founder, Trent Nelson, and MSU Director Dr. Titus Brown." ---------- components: Tests messages: 331978 nosy: vstinner priority: normal severity: normal status: open title: test_timeout uses blackhole.snakebite.net domain which doesn't exist anymore versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:09:02 2018 From: report at bugs.python.org (Manjusaka) Date: Mon, 17 Dec 2018 11:09:02 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545044942.1.0.788709270274.issue35517@psf.upfronthosting.co.za> Manjusaka added the comment: Hello rodola Here's detail: In the server, we use multiprocess to handle the request with share the same FD. OK, when a request comes, all the process wake up and try to accept the request but only one process will accept success and the others will raise an Exception if we use the epoll without EPOLLEXCLUSIVE. That means there will waste the performance. This effect is named thundering herd. But if we use epoll with EPOLLEXCLUSIVE, when the envents happen, only one process will wake and try to handle the event. So, I think it's necessary to support the EPOLLEXCLUSIVE in selectors.EpollSelector Actually, Python support EPOLLEXCLUSIVE official since 3.7. It's time to support it in selectors ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:10:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 11:10:12 +0000 Subject: [issue35518] test_timeout uses blackhole.snakebite.net domain which doesn't exist anymore In-Reply-To: <1545044915.94.0.788709270274.issue35518@psf.upfronthosting.co.za> Message-ID: <1545045012.16.0.788709270274.issue35518@psf.upfronthosting.co.za> STINNER Victor added the comment: We should either recreate this "blackhole" service on pythontest.net (server controlled by the PSF) or drop the test. @Benjamin: Hi, do you know who maintain pythontest.net? Who can add a "black hole" service? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:10:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 11:10:31 +0000 Subject: [issue35518] test_timeout uses blackhole.snakebite.net domain which doesn't exist anymore In-Reply-To: <1545044915.94.0.788709270274.issue35518@psf.upfronthosting.co.za> Message-ID: <1545045031.23.0.788709270274.issue35518@psf.upfronthosting.co.za> STINNER Victor added the comment: CC Pablo who loves black holes ;-) ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:12:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 11:12:36 +0000 Subject: [issue23451] Deprecation warnings building 3.5 Visual Studio Windows 8.1 64 bit In-Reply-To: <1423697646.35.0.470486317043.issue23451@psf.upfronthosting.co.za> Message-ID: <1545045156.06.0.788709270274.issue23451@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3ab064e80a9be1e6e9c62437fffb92bde9c5e1fb by Victor Stinner in branch 'master': bpo-23451: Update time.monotonic() documentation (GH-11190) https://github.com/python/cpython/commit/3ab064e80a9be1e6e9c62437fffb92bde9c5e1fb ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:12:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 11:12:36 +0000 Subject: [issue22117] Rewrite pytime.h to work on nanoseconds In-Reply-To: <1406848093.52.0.5184372094.issue22117@psf.upfronthosting.co.za> Message-ID: <1545045156.26.0.702299269573.issue22117@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3ab064e80a9be1e6e9c62437fffb92bde9c5e1fb by Victor Stinner in branch 'master': bpo-23451: Update time.monotonic() documentation (GH-11190) https://github.com/python/cpython/commit/3ab064e80a9be1e6e9c62437fffb92bde9c5e1fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:12:54 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Dec 2018 11:12:54 +0000 Subject: [issue23451] Deprecation warnings building 3.5 Visual Studio Windows 8.1 64 bit In-Reply-To: <1423697646.35.0.470486317043.issue23451@psf.upfronthosting.co.za> Message-ID: <1545045174.48.0.788709270274.issue23451@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10430 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:12:54 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Dec 2018 11:12:54 +0000 Subject: [issue22117] Rewrite pytime.h to work on nanoseconds In-Reply-To: <1406848093.52.0.5184372094.issue22117@psf.upfronthosting.co.za> Message-ID: <1545045174.67.0.663665092547.issue22117@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10431 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:13:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 11:13:29 +0000 Subject: [issue35276] Document thread safety In-Reply-To: <1542628208.58.0.788709270274.issue35276@psf.upfronthosting.co.za> Message-ID: <1545045209.32.0.788709270274.issue35276@psf.upfronthosting.co.za> STINNER Victor added the comment: About system-wide: see also PR 11190, "time.monotonic() is now always available and always system-wide." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:17:32 2018 From: report at bugs.python.org (Julien Palard) Date: Mon, 17 Dec 2018 11:17:32 +0000 Subject: [issue35472] python 3.7.2 rc1 bumped the build requirements for no reason In-Reply-To: <1544632241.86.0.788709270274.issue35472@psf.upfronthosting.co.za> Message-ID: <1545045452.16.0.788709270274.issue35472@psf.upfronthosting.co.za> Julien Palard added the comment: Hi Matthias, I agree that for the smartquotes issue the 1.6.6 should be enough. But we had multiple small issues fixed in some versions of Sphinx. But mostly for translation and I don't think you're building the translations? Also the needs_sphinx is only the minimum required version to build, it won't disallow me using sphinx 1.7 or 1.8 on docs.python.org to build the documentation. The needs_sphinx flag only supports "micro" value since 1.4, but looks compatible with it before (04a8c26eabba3e728a5b74afd15f328f9235b2d0 in the sphinx repo). So it looks OK to allow 1.6.6 as a minimum required version for 3.7, opening a PR on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:22:16 2018 From: report at bugs.python.org (Julien Palard) Date: Mon, 17 Dec 2018 11:22:16 +0000 Subject: [issue35472] python 3.7.2 rc1 bumped the build requirements for no reason In-Reply-To: <1544632241.86.0.788709270274.issue35472@psf.upfronthosting.co.za> Message-ID: <1545045736.15.0.788709270274.issue35472@psf.upfronthosting.co.za> Change by Julien Palard : ---------- keywords: +patch pull_requests: +10432 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:22:21 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 11:22:21 +0000 Subject: [issue35337] Check index in PyTuple_GET_ITEM/PyTuple_SET_ITEM in debug mode In-Reply-To: <1543411028.15.0.788709270274.issue35337@psf.upfronthosting.co.za> Message-ID: <1545045741.22.0.788709270274.issue35337@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, I abandon my change. ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:24:13 2018 From: report at bugs.python.org (Julien Palard) Date: Mon, 17 Dec 2018 11:24:13 +0000 Subject: [issue35472] python 3.7.2 rc1 bumped sphinx requirements a bit too much In-Reply-To: <1544632241.86.0.788709270274.issue35472@psf.upfronthosting.co.za> Message-ID: <1545045853.4.0.788709270274.issue35472@psf.upfronthosting.co.za> Change by Julien Palard : ---------- title: python 3.7.2 rc1 bumped the build requirements for no reason -> python 3.7.2 rc1 bumped sphinx requirements a bit too much _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:27:40 2018 From: report at bugs.python.org (Manjusaka) Date: Mon, 17 Dec 2018 11:27:40 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545046060.81.0.788709270274.issue35517@psf.upfronthosting.co.za> Change by Manjusaka : ---------- keywords: +patch pull_requests: +10433 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:28:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 11:28:01 +0000 Subject: [issue35266] Add _PyPreConfig and rework _PyCoreConfig and _PyMainInterpreterConfig In-Reply-To: <1542379446.44.0.788709270274.issue35266@psf.upfronthosting.co.za> Message-ID: <1545046081.74.0.788709270274.issue35266@psf.upfronthosting.co.za> STINNER Victor added the comment: When I looked again at this issue, I'm not sure how what should be done, what is the proper design, what should stay after Python initialization, etc. I prefer to abandon this change and maybe retry to write it later. I have a more advanced version in this branch of my fork: https://github.com/vstinner/cpython/commits/pre_config_next ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:30:36 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 17 Dec 2018 11:30:36 +0000 Subject: [issue35518] test_timeout uses blackhole.snakebite.net domain which doesn't exist anymore In-Reply-To: <1545044915.94.0.788709270274.issue35518@psf.upfronthosting.co.za> Message-ID: <1545046236.23.0.788709270274.issue35518@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Related : issue31562 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:31:05 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Dec 2018 11:31:05 +0000 Subject: [issue23451] Deprecation warnings building 3.5 Visual Studio Windows 8.1 64 bit In-Reply-To: <1423697646.35.0.470486317043.issue23451@psf.upfronthosting.co.za> Message-ID: <1545046265.9.0.788709270274.issue23451@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c367d52a74781b2c9ffd9e29722fbdfc0234408c by Miss Islington (bot) in branch '3.7': bpo-23451: Update time.monotonic() documentation (GH-11190) https://github.com/python/cpython/commit/c367d52a74781b2c9ffd9e29722fbdfc0234408c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:31:06 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Dec 2018 11:31:06 +0000 Subject: [issue22117] Rewrite pytime.h to work on nanoseconds In-Reply-To: <1406848093.52.0.5184372094.issue22117@psf.upfronthosting.co.za> Message-ID: <1545046266.11.0.702299269573.issue22117@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c367d52a74781b2c9ffd9e29722fbdfc0234408c by Miss Islington (bot) in branch '3.7': bpo-23451: Update time.monotonic() documentation (GH-11190) https://github.com/python/cpython/commit/c367d52a74781b2c9ffd9e29722fbdfc0234408c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:34:29 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 17 Dec 2018 11:34:29 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545046469.33.0.788709270274.issue35517@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I see. Then I would say it's a matter of deciding what's the best API to provide. Another possibility is to promote the underlying epoll() instance as a public property, so one can do: >>> s = selectors.EpollSelector() >>> s.register(fd, EVENT_READ) >>> s.selector.modify(fd, select.EPOLLEXCLUSIVE) That raises the question whether all selector classes should have a public "selector" attribute. poll() and devpoll() related classes may need it for POLLPRI, POLLRDHUP, POLLWRBAND or others (whatever their use case is). kqueue() also has it's own specific constants (KQ_FILTER_* and KQ_EV_*). The only one where a public "selector" property would be useless is SelectSelector. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:35:16 2018 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 17 Dec 2018 11:35:16 +0000 Subject: [issue35519] Can not run test without test module for tests which import random module Message-ID: <1545046516.28.0.788709270274.issue35519@psf.upfronthosting.co.za> New submission from Vajrasky Kok : $ git clone git at github.com:python/cpython.git cpython2 $ cd cpython2 $ ./configure --with-pydebug $ make -j $ ./python Lib/test/test_xmlrpc.py Traceback (most recent call last): File "Lib/test/test_xmlrpc.py", line 8, in import xmlrpc.client as xmlrpclib File "/opt/Code/python/cpython2/Lib/xmlrpc/client.py", line 136, in import http.client File "/opt/Code/python/cpython2/Lib/http/client.py", line 71, in import email.parser File "/opt/Code/python/cpython2/Lib/email/parser.py", line 12, in from email.feedparser import FeedParser, BytesFeedParser File "/opt/Code/python/cpython2/Lib/email/feedparser.py", line 27, in from email._policybase import compat32 File "/opt/Code/python/cpython2/Lib/email/_policybase.py", line 9, in from email.utils import _has_surrogates File "/opt/Code/python/cpython2/Lib/email/utils.py", line 28, in import random File "/opt/Code/python/cpython2/Lib/random.py", line 47, in import bisect as _bisect File "/opt/Code/python/cpython2/Lib/test/bisect.py", line 27, in import tempfile File "/opt/Code/python/cpython2/Lib/tempfile.py", line 45, in from random import Random as _Random ImportError: cannot import name 'Random' from 'random' (/opt/Code/python/cpython2/Lib/random.py) I know about running test this way: $ ./python -m test -v test_xmlrpc And it works. I am just wondering whether I should be able to run test this way: ./python Lib/test/test_blabla.py? Because running other tests without test module works, for example: ./python Lib/test/test_ast.py. Only test which imports random module fails. ---------- components: Tests messages: 331992 nosy: vajrasky priority: normal severity: normal status: open title: Can not run test without test module for tests which import random module versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:39:40 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 11:39:40 +0000 Subject: [issue35519] [2.7] Can not run test without test module for tests which import random module In-Reply-To: <1545046516.28.0.788709270274.issue35519@psf.upfronthosting.co.za> Message-ID: <1545046780.91.0.788709270274.issue35519@psf.upfronthosting.co.za> STINNER Victor added the comment: Your problem is that you have the Lib/test/bisect.py file. I renamed it to Lib/test/bisect_cmd.py. Workarounds: * Run the test using: ./python -m test test_xmlrpc * Rename Lib/test/bisect.py to Lib/test/bisect_cmd.py This bug is already fixed in the 2.7. You have to wait for the next 2.7 release to get the fix. ---------- nosy: +vstinner resolution: -> fixed stage: -> resolved status: open -> closed title: Can not run test without test module for tests which import random module -> [2.7] Can not run test without test module for tests which import random module versions: +Python 2.7 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:42:06 2018 From: report at bugs.python.org (Manjusaka) Date: Mon, 17 Dec 2018 11:42:06 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545046926.3.0.788709270274.issue35517@psf.upfronthosting.co.za> Manjusaka added the comment: In my opinion selectors is an abstract for select, so I don't think allow people use select.* in selector is a good idea. like this > s.register(fd, EVENT_READ, extra_events=select.EPOLLEXCLUSIVE | select.EPOLLONESHOT) Because the multiple epoll's params are supported in different Python version and Linux Kernel version. So, I think it's a good idea to support different epoll's params by keyword-only param in register method. It's also convenient to check the params ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:44:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 11:44:25 +0000 Subject: [issue31562] snakebite.net is not available In-Reply-To: <1506188809.66.0.0162069541224.issue31562@psf.upfronthosting.co.za> Message-ID: <1545047065.75.0.788709270274.issue31562@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I found the same bug: bpo-35518. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:47:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 11:47:11 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545047231.19.0.788709270274.issue35517@psf.upfronthosting.co.za> STINNER Victor added the comment: I prefer Giampaolo since discussed flags are very specific to epoll(): select() doesn't support them for example, nor kqueue nor devpoll (not *yet*). If we add a keyword-parameter, to me, it sounds like it's something "portable" working on multiple platforms and then you need hasattr(): if exclusive and hasattr(select, "EPOLLEXCLUSIVE"): epoll_events |= select.EPOLLEXCLUSIVE If the caller pass select.EPOLLEXCLUSIVE, hasattr() is useless. Moreover, we directly support any EPOLL constant exposed in the select module. No need to change the API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:48:50 2018 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 17 Dec 2018 11:48:50 +0000 Subject: [issue35520] Python won't build with dtrace enabled on some systems. Message-ID: <1545047330.52.0.788709270274.issue35520@psf.upfronthosting.co.za> New submission from Jakub Kulik : Python won't build on Solaris with dtrace support enabled. Solaris is one of those systems where it is necessary to generate dtrace object files with dtrace -G. While this need is included in python configure and Makefiles, it doesn't work correctly. First, configure tests -G support on file with not completely valid content of just BEGIN inside. Valid should have BEGIN{}. This is not a problem for systems that don't require dtrace object files as this test should fail for them anyway, however it incorrectly detects those like Solaris. And second, Makefile is not ready for dtrace as the DTRACE_DEPS variable doesn't include all the necessary files. ---------- components: Build messages: 331997 nosy: kulikjak priority: normal severity: normal status: open title: Python won't build with dtrace enabled on some systems. type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 06:55:08 2018 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 17 Dec 2018 11:55:08 +0000 Subject: [issue35520] Python won't build with dtrace enabled on some systems. In-Reply-To: <1545047330.52.0.788709270274.issue35520@psf.upfronthosting.co.za> Message-ID: <1545047708.84.0.788709270274.issue35520@psf.upfronthosting.co.za> Change by Jakub Kulik : ---------- keywords: +patch pull_requests: +10434 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 07:05:07 2018 From: report at bugs.python.org (Manjusaka) Date: Mon, 17 Dec 2018 12:05:07 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545048307.07.0.788709270274.issue35517@psf.upfronthosting.co.za> Manjusaka added the comment: OK, I will change my code ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 07:54:07 2018 From: report at bugs.python.org (Manjusaka) Date: Mon, 17 Dec 2018 12:54:07 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545051247.96.0.788709270274.issue35517@psf.upfronthosting.co.za> Manjusaka added the comment: Vicor: > Moreover, we directly support any EPOLL constant exposed in the select module. No need to change the API. I don't think so In class _PollLikeSelector ,here's register method def register(self, fileobj, events, data=None): key = super().register(fileobj, events, data) poller_events = 0 if events & EVENT_READ: poller_events |= self._EVENT_READ if events & EVENT_WRITE: poller_events |= self._EVENT_WRITE this code filter the event that people push in it. It only supports select.EPOLLIN and select.EPOLLOUT ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 08:02:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 13:02:48 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545051768.08.0.788709270274.issue35517@psf.upfronthosting.co.za> STINNER Victor added the comment: I mean that using extra_events to get access to EPOLLEXCLUSIVE, there is no need later to add a new parameter for select.EPOLLONESHOT: it would be "future proof"! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 08:07:59 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Dec 2018 13:07:59 +0000 Subject: [issue35415] fileno argument to socket.socket is not validated In-Reply-To: <1543999272.31.0.788709270274.issue35415@psf.upfronthosting.co.za> Message-ID: <1545052079.74.0.788709270274.issue35415@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e991270363435da12049ecfe70bb69bd9c14b535 by Miss Islington (bot) (Dima Tisnek) in branch 'master': bpo-35415: validate fileno argument to socket.socket (GH-10917) https://github.com/python/cpython/commit/e991270363435da12049ecfe70bb69bd9c14b535 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 08:08:34 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 17 Dec 2018 13:08:34 +0000 Subject: [issue35415] fileno argument to socket.socket is not validated In-Reply-To: <1543999272.31.0.788709270274.issue35415@psf.upfronthosting.co.za> Message-ID: <1545052114.19.0.788709270274.issue35415@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 Dec 17 08:13:04 2018 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 17 Dec 2018 13:13:04 +0000 Subject: [issue35519] [2.7] Can not run test without test module for tests which import random module In-Reply-To: <1545046516.28.0.788709270274.issue35519@psf.upfronthosting.co.za> Message-ID: <1545052384.7.0.788709270274.issue35519@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Okay, thanks, Victor. Your suggestion to rename Lib/test/bisect.py to Lib/test/bisect_cmd.py works. My question is why you fixed in 2.7 branch only? This problem persists in master (3.8). Ah, I think because I use cpython2 directory name, you thought I used Python 2. cpython2 is just a directory name. It has nothing to do with Python 2. I used master when finding this bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 08:41:17 2018 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 17 Dec 2018 13:41:17 +0000 Subject: [issue18799] Resurrect and fix test_404 in Lib/test/test_xmlrpc.py In-Reply-To: <1377100643.52.0.970396135479.issue18799@psf.upfronthosting.co.za> Message-ID: <1545054077.46.0.788709270274.issue18799@psf.upfronthosting.co.za> Change by Vajrasky Kok : ---------- pull_requests: +10435 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 08:47:02 2018 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 17 Dec 2018 13:47:02 +0000 Subject: [issue19974] tarfile doesn't overwrite symlink by directory In-Reply-To: <1386935948.7.0.893963676407.issue19974@psf.upfronthosting.co.za> Message-ID: <1545054422.32.0.788709270274.issue19974@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Martin Panter, thank you for reviewing my patch. Let me rework it. It has been a while (4 years!!!). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 09:18:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Dec 2018 14:18:42 +0000 Subject: [issue18799] Resurrect and fix test_404 in Lib/test/test_xmlrpc.py In-Reply-To: <1377100643.52.0.970396135479.issue18799@psf.upfronthosting.co.za> Message-ID: <1545056322.9.0.788709270274.issue18799@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Vajrasky. The restored test is passed locally and on CI. Let try it on buildbots. ---------- versions: +Python 3.8 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 09:43:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Dec 2018 14:43:19 +0000 Subject: [issue35504] `del OSError().characters_written` raises `SystemError` In-Reply-To: <1544826144.81.0.788709270274.issue35504@psf.upfronthosting.co.za> Message-ID: <1545057799.99.0.788709270274.issue35504@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset e2af34fcf84b41189b54e1f2912faded5daabaca by Serhiy Storchaka in branch 'master': bpo-35504: Fix a SystemError when delete the characters_written attribute of an OSError. (GH-11172) https://github.com/python/cpython/commit/e2af34fcf84b41189b54e1f2912faded5daabaca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 09:47:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Dec 2018 14:47:47 +0000 Subject: [issue35490] Remove the DecodeFSDefault return converter in Argument Clinic In-Reply-To: <1544780376.65.0.788709270274.issue35490@psf.upfronthosting.co.za> Message-ID: <1545058067.91.0.788709270274.issue35490@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4db62e115891425db2a974142a72d8eaaf95eecb by Serhiy Storchaka in branch 'master': bpo-35490: Remove the DecodeFSDefault return converter in AC. (#11152) https://github.com/python/cpython/commit/4db62e115891425db2a974142a72d8eaaf95eecb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 09:52:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Dec 2018 14:52:47 +0000 Subject: [issue35504] `del OSError().characters_written` raises `SystemError` In-Reply-To: <1544826144.81.0.788709270274.issue35504@psf.upfronthosting.co.za> Message-ID: <1545058367.93.0.788709270274.issue35504@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 842acaab1376c5c84fd5966bb6070e289880e1ca by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. (GH-11175) https://github.com/python/cpython/commit/842acaab1376c5c84fd5966bb6070e289880e1ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 09:53:02 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Dec 2018 14:53:02 +0000 Subject: [issue35504] `del OSError().characters_written` raises `SystemError` In-Reply-To: <1544826144.81.0.788709270274.issue35504@psf.upfronthosting.co.za> Message-ID: <1545058382.93.0.788709270274.issue35504@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10436 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 10:06:05 2018 From: report at bugs.python.org (Joshua Cannon) Date: Mon, 17 Dec 2018 15:06:05 +0000 Subject: [issue21041] pathlib.PurePath.parents rejects negative indexes In-Reply-To: <1395613011.22.0.29152070109.issue21041@psf.upfronthosting.co.za> Message-ID: <1545059165.15.0.788709270274.issue21041@psf.upfronthosting.co.za> Joshua Cannon added the comment: I created issue35498 about .parents rejecting slices as well. (It was pointed out this discussion would probably decide that issue's fate) I think that .parents looking like a duck, but not quacking like one isn't very pythonic. Besides, the fact that p.parents[len(p.parents)-2] is allowed but p.parents[-2] is not just seems like extra steps. There's also list(p.parents)[-2], which is still not ideal. In either case, I'd imagine authors to put a comment like "PathLib .parents doesn't support negative indexes", which goes to show clients are expecting negative indices to work. I see that this issue is several years old. I'm happy to shepherd it if it needs further contributions. ---------- nosy: +thejcannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 10:10:24 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Dec 2018 15:10:24 +0000 Subject: [issue35504] `del OSError().characters_written` raises `SystemError` In-Reply-To: <1544826144.81.0.788709270274.issue35504@psf.upfronthosting.co.za> Message-ID: <1545059424.01.0.788709270274.issue35504@psf.upfronthosting.co.za> miss-islington added the comment: New changeset cb272843f2d5dfc4ef996ba952b99a3e30c88bbc by Miss Islington (bot) in branch '3.7': bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. (GH-11175) https://github.com/python/cpython/commit/cb272843f2d5dfc4ef996ba952b99a3e30c88bbc ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 10:28:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Dec 2018 15:28:06 +0000 Subject: [issue35504] `del OSError().characters_written` raises `SystemError` In-Reply-To: <1544826144.81.0.788709270274.issue35504@psf.upfronthosting.co.za> Message-ID: <1545060486.04.0.788709270274.issue35504@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 Dec 17 10:30:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Dec 2018 15:30:06 +0000 Subject: [issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference. In-Reply-To: <1544641901.4.0.788709270274.issue35475@psf.upfronthosting.co.za> Message-ID: <1545060606.01.0.788709270274.issue35475@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset bdabb0737c631835b246c9823852d20331243315 by Serhiy Storchaka in branch 'master': bpo-35475: Add more PyImport* functions in refcounts.dat. (GH-11142) https://github.com/python/cpython/commit/bdabb0737c631835b246c9823852d20331243315 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 10:30:20 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Dec 2018 15:30:20 +0000 Subject: [issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference. In-Reply-To: <1544641901.4.0.788709270274.issue35475@psf.upfronthosting.co.za> Message-ID: <1545060620.83.0.788709270274.issue35475@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10437 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 10:30:36 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Dec 2018 15:30:36 +0000 Subject: [issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference. In-Reply-To: <1544641901.4.0.788709270274.issue35475@psf.upfronthosting.co.za> Message-ID: <1545060636.39.0.788709270274.issue35475@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10438 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 10:30:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Dec 2018 15:30:57 +0000 Subject: [issue35490] Remove the DecodeFSDefault return converter in Argument Clinic In-Reply-To: <1544780376.65.0.788709270274.issue35490@psf.upfronthosting.co.za> Message-ID: <1545060657.65.0.788709270274.issue35490@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 Mon Dec 17 10:34:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Dec 2018 15:34:17 +0000 Subject: [issue33306] Improving SyntaxError for unmatched parentheses In-Reply-To: <1524043340.4.0.682650639539.issue33306@psf.upfronthosting.co.za> Message-ID: <1545060857.24.0.788709270274.issue33306@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 94cf308ee231bfbfaa9ddc50b9764545a1318773 by Serhiy Storchaka in branch 'master': bpo-33306: Improve SyntaxError messages for unbalanced parentheses. (GH-6516) https://github.com/python/cpython/commit/94cf308ee231bfbfaa9ddc50b9764545a1318773 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 10:40:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 15:40:12 +0000 Subject: [issue35519] [2.7] Can not run test without test module for tests which import random module In-Reply-To: <1545046516.28.0.788709270274.issue35519@psf.upfronthosting.co.za> Message-ID: <1545061212.9.0.788709270274.issue35519@psf.upfronthosting.co.za> STINNER Victor added the comment: > Ah, I think because I use cpython2 directory name, you thought I used Python 2. cpython2 is just a directory name. It has nothing to do with Python 2. I used master when finding this bug. Ah right, I can reproduce the issue in master: vstinner at apu$ ./python Lib/test/test_xmlrpc.py Traceback (most recent call last): File "Lib/test/test_xmlrpc.py", line 8, in import xmlrpc.client as xmlrpclib File "/home/vstinner/prog/python/master/Lib/xmlrpc/client.py", line 136, in import http.client File "/home/vstinner/prog/python/master/Lib/http/client.py", line 71, in import email.parser File "/home/vstinner/prog/python/master/Lib/email/parser.py", line 12, in from email.feedparser import FeedParser, BytesFeedParser File "/home/vstinner/prog/python/master/Lib/email/feedparser.py", line 27, in from email._policybase import compat32 File "/home/vstinner/prog/python/master/Lib/email/_policybase.py", line 9, in from email.utils import _has_surrogates File "/home/vstinner/prog/python/master/Lib/email/utils.py", line 28, in import random File "/home/vstinner/prog/python/master/Lib/random.py", line 47, in import bisect as _bisect File "/home/vstinner/prog/python/master/Lib/test/bisect.py", line 27, in import tempfile File "/home/vstinner/prog/python/master/Lib/tempfile.py", line 45, in from random import Random as _Random ImportError: cannot import name 'Random' from 'random' (/home/vstinner/prog/python/master/Lib/random.py) Hum. We should either rename Lib/test/bisect.py to Lib/test/bisect_cmd.py or move the feature into libregrtest. ---------- nosy: +pablogsal resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 10:40:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 15:40:17 +0000 Subject: [issue35519] Can not run test without test module for tests which import random module In-Reply-To: <1545046516.28.0.788709270274.issue35519@psf.upfronthosting.co.za> Message-ID: <1545061217.53.0.788709270274.issue35519@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: [2.7] Can not run test without test module for tests which import random module -> Can not run test without test module for tests which import random module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 10:44:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 15:44:12 +0000 Subject: [issue35519] Can not run test without test module for tests which import random module In-Reply-To: <1545046516.28.0.788709270274.issue35519@psf.upfronthosting.co.za> Message-ID: <1545061452.44.0.788709270274.issue35519@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10439 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 10:46:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Dec 2018 15:46:14 +0000 Subject: [issue33306] Improving SyntaxError for unmatched parentheses In-Reply-To: <1524043340.4.0.682650639539.issue33306@psf.upfronthosting.co.za> Message-ID: <1545061574.55.0.788709270274.issue33306@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 Dec 17 10:48:31 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Dec 2018 15:48:31 +0000 Subject: [issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference. In-Reply-To: <1544641901.4.0.788709270274.issue35475@psf.upfronthosting.co.za> Message-ID: <1545061711.53.0.788709270274.issue35475@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 605ef6e534f05925ff826f65518abf163ed3900a by Miss Islington (bot) in branch '3.7': bpo-35475: Add more PyImport* functions in refcounts.dat. (GH-11142) https://github.com/python/cpython/commit/605ef6e534f05925ff826f65518abf163ed3900a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 10:52:56 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Dec 2018 15:52:56 +0000 Subject: [issue35360] [Windows] Update SQLite dependency In-Reply-To: <1543580070.45.0.788709270274.issue35360@psf.upfronthosting.co.za> Message-ID: <1545061976.18.0.788709270274.issue35360@psf.upfronthosting.co.za> Steve Dower added the comment: SQLite updates and changes for us almost always get stuck on someone being willing to verify that nothing has broken (and stand by their analysis). Without an active expert (I just nosied ghaering in case they are around), I'm not confident to make this change in any version prior to 3.8. ---------- nosy: +ghaering _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 12:47:28 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 17:47:28 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1545068848.71.0.788709270274.issue35348@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0af9c33262fb43f39a6558e3f155689e83e10706 by Victor Stinner in branch 'master': bpo-35348: Fix platform.architecture() (GH-11159) https://github.com/python/cpython/commit/0af9c33262fb43f39a6558e3f155689e83e10706 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 13:45:51 2018 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 17 Dec 2018 18:45:51 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1545072351.24.0.788709270274.issue35348@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Guys, please read the doc-string of the platform.architecture() function (or ask the person who wrote most of the module). It clearly refers to inspecting a specific executable and only uses the Python interpreter as default. The running process can provide some sane defaults, but is not necessarily using the same values as the given executable. The function does not support multi-architecture executables. This is simply out of scope for the function. Victor: AFAIK, I still own this module, so if you want to deprecate something, please ping me first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 13:48:45 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 17 Dec 2018 18:48:45 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545072525.61.0.788709270274.issue35517@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I took a look at your PR. As the PR currently stands it only works with epoll() selector. For the other selectors this is just an extra argument which does nothing, so it complicates the API of 2 methods for no real gain. Also, a single argument is not compatible with kqueue() because kqueue() requires two distinct `KQ_FILTER_*` and `KQ_EV_*` constants which cannot be ORed together. Instead, I think simply turning the underlying selector instance into a public property is more flexible and less complex. On Linux you'll do: >>> s = selectors.EpollSelector() >>> s.register(fd, EVENT_READ) >>> s.selector.modify(fd, select.EPOLLEXCLUSIVE) ``` ...and on BSD: >>> s = selectors.KqueueSelector() >>> s.register(fd, EVENT_READ) >>> k = s.selector.kevent(fd, select.KQ_FILTER_READ, select.KQ_EV_CLEAR) >>> s.selector.control([k], 0, 0) ``` Alternatively we could just keep `DefaultSelector._selector` private and document it. Personally I'd also be OK with that even though I'm not sure if there if there are precedents of documenting private APIs. ---------- nosy: +asvetlov, gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 14:06:17 2018 From: report at bugs.python.org (Manjusaka) Date: Mon, 17 Dec 2018 19:06:17 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545073577.04.0.788709270274.issue35517@psf.upfronthosting.co.za> Manjusaka added the comment: Actually, in my implementation, it also supports POLL with the different event. I don't think to make selector be a public property is a good idea. It will break the whole system integrity. Please think about it, if people want to use epoll/poll with some special event, they must use it like this. > s = selectors.EpollSelector() > s.selector.register(fd,select.EPOLLIN | select.EPOLLEXCLUSIVE) > s.selector.modify(fd,select.EPOLLOU | select.EPOLLEXCLUSIVE) Here's a question, why we support the register? I think it will make people don't care about the detail. So, as you say, it's a little bit complicated, but it will help people don't care about the selector property detail, they just use the argument when they want to use it. I think it's worth it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 14:08:48 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 17 Dec 2018 19:08:48 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545073728.67.0.788709270274.issue35517@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 14:14:50 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 17 Dec 2018 19:14:50 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545074090.83.0.788709270274.issue35517@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Hmm, I forgot kqueue usage details: it operated not only with int flags but more complex structures. Giampaolo, thanks for pointing on! Please let me sleep on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 14:16:55 2018 From: report at bugs.python.org (Manjusaka) Date: Mon, 17 Dec 2018 19:16:55 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545074215.83.0.788709270274.issue35517@psf.upfronthosting.co.za> Change by Manjusaka : ---------- nosy: -asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 15:50:15 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Dec 2018 20:50:15 +0000 Subject: [issue35238] Alleviate memory reservation of fork_exec in subprocess.Popen via forkserver In-Reply-To: <1542144595.84.0.788709270274.issue35238@psf.upfronthosting.co.za> Message-ID: <1545079815.89.0.788709270274.issue35238@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not sure I understand the proposed solution. Do you mean you would replace this: Parent -> forkserver -> fork child then exec with: Parent -> forkserver -> posix_spawn child? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 15:57:15 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Dec 2018 20:57:15 +0000 Subject: [issue35238] Alleviate memory reservation of fork_exec in subprocess.Popen via forkserver In-Reply-To: <1542144595.84.0.788709270274.issue35238@psf.upfronthosting.co.za> Message-ID: <1545080235.35.0.788709270274.issue35238@psf.upfronthosting.co.za> Antoine Pitrou added the comment: At any rate, given the constraints you're working with (thousands of child processes, memory conservation issues), I suggest you abandon the idea of using multiprocessing and write your own subprocess-server instead. I would suggest doing so using asyncio, which should allow you to control as many subprocesses as you want without spawning countless threads or intermediate processes: https://docs.python.org/3/library/asyncio-subprocess.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 16:06:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 21:06:13 +0000 Subject: [issue35519] Can not run test without test module for tests which import random module In-Reply-To: <1545046516.28.0.788709270274.issue35519@psf.upfronthosting.co.za> Message-ID: <1545080773.65.0.788709270274.issue35519@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 1dd035954bb03c41b954ebbd63969b4bcb0e106e by Victor Stinner in branch 'master': bpo-35519: Rename test.bisect to test.bisect_cmd (GH-11200) https://github.com/python/cpython/commit/1dd035954bb03c41b954ebbd63969b4bcb0e106e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 16:06:26 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Dec 2018 21:06:26 +0000 Subject: [issue35519] Can not run test without test module for tests which import random module In-Reply-To: <1545046516.28.0.788709270274.issue35519@psf.upfronthosting.co.za> Message-ID: <1545080786.22.0.788709270274.issue35519@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10440 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 16:12:24 2018 From: report at bugs.python.org (Oscar Esteban) Date: Mon, 17 Dec 2018 21:12:24 +0000 Subject: [issue35238] Alleviate memory reservation of fork_exec in subprocess.Popen via forkserver In-Reply-To: <1542144595.84.0.788709270274.issue35238@psf.upfronthosting.co.za> Message-ID: <1545081144.87.0.788709270274.issue35238@psf.upfronthosting.co.za> Oscar Esteban added the comment: Thanks for your response. The idea would be to enable ``subprocess.Popen`` to use an existing fork server in its fork_exec. The rationale: I can start a pool of n workers very early in the execution flow. They will have ~350MB memory fingerprint in the beginning and they will be reset to that every ``maxtasksperchild``. So this is basically the amount of VM allocated (doubled) when forking. Pretty small. Currently, as the fork is done from some process with all the python stack of the app loaded in memory (1.7GB in our case), then some additional 1.7GB of VM are allocated on each fork. This could be avoided if the fork was done from the forkserver pool. As you mention, we have been considering such a "shell" server on top of asyncio, so your response just confirms our intuition. I'll close this idea for now since I agree that any investment on this problem should be directed to the asyncio solution. Please note that the idea proposed would work for Python < 3 (as opposed to anything based on asyncio). ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 16:16:15 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Dec 2018 21:16:15 +0000 Subject: [issue35238] Alleviate memory reservation of fork_exec in subprocess.Popen via forkserver In-Reply-To: <1542144595.84.0.788709270274.issue35238@psf.upfronthosting.co.za> Message-ID: <1545081375.51.0.788709270274.issue35238@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way you could open an issue so that subprocess uses posix_spawn() where possible. (or you could ask to reopen issue31814, which is basically that request but for a different reason than yours) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 16:23:47 2018 From: report at bugs.python.org (Matej Cepl) Date: Mon, 17 Dec 2018 21:23:47 +0000 Subject: [issue34032] Add platlibdir to allow distinction between /usr/lib and /usr/lib64 for Linux In-Reply-To: <1530630040.09.0.56676864532.issue34032@psf.upfronthosting.co.za> Message-ID: <1545081827.8.0.788709270274.issue34032@psf.upfronthosting.co.za> Matej Cepl added the comment: @carlos.velasco ... OK, so build of 3.7.2rc1 on x86_64 doesn't pass the testsuite (see the attached log). ---------- Added file: https://bugs.python.org/file48002/_log.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 16:24:56 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Dec 2018 21:24:56 +0000 Subject: [issue35519] Can not run test without test module for tests which import random module In-Reply-To: <1545046516.28.0.788709270274.issue35519@psf.upfronthosting.co.za> Message-ID: <1545081896.59.0.788709270274.issue35519@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 05dfa0cc96f6b72b1e72f57b1b5f4b37764a382d by Miss Islington (bot) in branch '3.7': bpo-35519: Rename test.bisect to test.bisect_cmd (GH-11200) https://github.com/python/cpython/commit/05dfa0cc96f6b72b1e72f57b1b5f4b37764a382d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 16:38:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 21:38:27 +0000 Subject: [issue35519] Can not run test without test module for tests which import random module In-Reply-To: <1545046516.28.0.788709270274.issue35519@psf.upfronthosting.co.za> Message-ID: <1545082707.65.0.788709270274.issue35519@psf.upfronthosting.co.za> STINNER Victor added the comment: I renamed Lib/test/bisect.py to Lib/test/bisect_cmd.py ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 16:43:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2018 21:43:16 +0000 Subject: [issue35238] Alleviate memory reservation of fork_exec in subprocess.Popen via forkserver In-Reply-To: <1542144595.84.0.788709270274.issue35238@psf.upfronthosting.co.za> Message-ID: <1545082996.36.0.788709270274.issue35238@psf.upfronthosting.co.za> STINNER Victor added the comment: > By the way you could open an issue so that subprocess uses posix_spawn() where possible. FYI I'm working on an implementation of this ;-) ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 16:49:06 2018 From: report at bugs.python.org (Brett Cannon) Date: Mon, 17 Dec 2018 21:49:06 +0000 Subject: [issue35486] subprocess module import hooks breaks back compatibility In-Reply-To: <1544742855.44.0.788709270274.issue35486@psf.upfronthosting.co.za> Message-ID: <1545083346.81.0.788709270274.issue35486@psf.upfronthosting.co.za> Brett Cannon added the comment: RE: "PEP-302 and PEP-451 are the definitive specifications for how sys.meta_path is supposed to work" That's actually not true. In the case of import the language reference is considered the reference for import: https://docs.python.org/3/reference/import.html (and true for PEPs in general once they are implemented). ---------- nosy: +davin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 16:49:59 2018 From: report at bugs.python.org (Brett Cannon) Date: Mon, 17 Dec 2018 21:49:59 +0000 Subject: [issue35488] pathlib Path.match does not behave as described In-Reply-To: <1544769623.98.0.788709270274.issue35488@psf.upfronthosting.co.za> Message-ID: <1545083399.95.0.788709270274.issue35488@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 16:52:04 2018 From: report at bugs.python.org (Brett Cannon) Date: Mon, 17 Dec 2018 21:52:04 +0000 Subject: [issue35498] Parents objects in pathlib.Path don't support slices as __getitem__ arguments In-Reply-To: <1544806517.4.0.788709270274.issue35498@psf.upfronthosting.co.za> Message-ID: <1545083524.79.0.788709270274.issue35498@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 16:56:47 2018 From: report at bugs.python.org (Oscar Esteban) Date: Mon, 17 Dec 2018 21:56:47 +0000 Subject: [issue35238] Alleviate memory reservation of fork_exec in subprocess.Popen via forkserver In-Reply-To: <1542144595.84.0.788709270274.issue35238@psf.upfronthosting.co.za> Message-ID: <1545083807.34.0.788709270274.issue35238@psf.upfronthosting.co.za> Oscar Esteban added the comment: Hi Victor, That would be great. However, we played a bit with an alternative implementation of posix_spawn (one I got from one related bpo), and it didn't seem to make any difference in terms of memory allocation. Then, we found out that posix_spawn uses fork by default (Linux implementation). So the large memory allocations still happen. One can set the vFork option, but that is apparently a very bad idea, as far as we read. Is that correct? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 18:08:32 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Mon, 17 Dec 2018 23:08:32 +0000 Subject: [issue19217] Calling assertEquals for moderately long list takes too long In-Reply-To: <1381410286.72.0.514206486634.issue19217@psf.upfronthosting.co.za> Message-ID: <1545088112.43.0.788709270274.issue19217@psf.upfronthosting.co.za> Change by Emmanuel Arias : ---------- pull_requests: +10441 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 19:31:46 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 18 Dec 2018 00:31:46 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1545093106.63.0.788709270274.issue35482@psf.upfronthosting.co.za> Steve Dower added the comment: I did a quick look and couldn't find anything obvious in logs while building, so I guess the next step is to try taking out those new index entries to figure out which one causes the problem. (Adding Serhiy for awareness, not necessarily trying to nominate him to do the work unless he wants to.) ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 19:45:28 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 18 Dec 2018 00:45:28 +0000 Subject: [issue35521] IDLE: Add doc section for Code Conext Message-ID: <1545093928.09.0.788709270274.issue35521@psf.upfronthosting.co.za> New submission from Cheryl Sabella : Item D1 from #33610. D1: idle.rst subsection on Code Context ---------- assignee: terry.reedy components: IDLE messages: 332032 nosy: cheryl.sabella, terry.reedy priority: normal severity: normal status: open title: IDLE: Add doc section for Code Conext type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 19:47:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 00:47:08 +0000 Subject: [issue35238] Alleviate memory reservation of fork_exec in subprocess.Popen via forkserver In-Reply-To: <1545083807.34.0.788709270274.issue35238@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: See bpo-34663 for posix_spawn() & vfork. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 19:47:39 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 18 Dec 2018 00:47:39 +0000 Subject: [issue35521] IDLE: Add doc section for Code Conext In-Reply-To: <1545093928.09.0.788709270274.issue35521@psf.upfronthosting.co.za> Message-ID: <1545094059.76.0.788709270274.issue35521@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +10442 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 19:48:07 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 18 Dec 2018 00:48:07 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1545094087.37.0.788709270274.issue33610@psf.upfronthosting.co.za> Cheryl Sabella added the comment: D1 in issue35521. ---------- dependencies: +IDLE: Add doc section for Code Conext _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 19:52:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 00:52:14 +0000 Subject: [issue35501] "make coverage" should not leak coverage compiler flags to third party C extensions In-Reply-To: <1544813222.33.0.788709270274.issue35501@psf.upfronthosting.co.za> Message-ID: <1545094334.62.0.788709270274.issue35501@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: "make coverage" should use leak coverage flags to third party C extensions -> "make coverage" should not leak coverage compiler flags to third party C extensions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 19:52:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 00:52:33 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1545094353.33.0.788709270274.issue35499@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 Mon Dec 17 19:53:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 00:53:19 +0000 Subject: [issue35469] [2.7] time.asctime() regression In-Reply-To: <1544611398.55.0.788709270274.issue35469@psf.upfronthosting.co.za> Message-ID: <1545094399.97.0.788709270274.issue35469@psf.upfronthosting.co.za> STINNER Victor added the comment: The change is deliberate and is not a bug. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 20:12:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 01:12:54 +0000 Subject: [issue35368] [2.7] Make PyMem_Malloc() thread-safe in debug mode In-Reply-To: <1543619268.28.0.788709270274.issue35368@psf.upfronthosting.co.za> Message-ID: <1545095574.1.0.788709270274.issue35368@psf.upfronthosting.co.za> STINNER Victor added the comment: Let's continue discussion on serialno atomicity on bpo-31473. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 21:44:36 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 18 Dec 2018 02:44:36 +0000 Subject: [issue35518] test_timeout uses blackhole.snakebite.net domain which doesn't exist anymore In-Reply-To: <1545044915.94.0.788709270274.issue35518@psf.upfronthosting.co.za> Message-ID: <1545101076.64.0.788709270274.issue35518@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think it might be better to rewrite the test to use a local tcp server. At least on Linux, I think trying to connect to a socket with a full accept queue should have equivalent beahvior. You could also be fancier, set up a network namespace, and actually drop all SYN packets with iptables. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 21:50:31 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 18 Dec 2018 02:50:31 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545101431.08.0.788709270274.issue35517@psf.upfronthosting.co.za> Xiang Zhang added the comment: > I don't think to make selector be a public property is a good idea. It will break the whole system integrity. If exposing a private property is not a good idea, another choice may be construct a selector with a customized I/O multiplexer, adding an optional parameter to the __init__. But actually I'm -1 to this change. `selectors` makes underlying implementations irrelavant to most users since we can simply use `DefaultSelector`(maybe why only read/write events are valid now?). But you are seeking to add implementation specific details back. If you know you want to add EPOLL_EXCLUSIVE, why not just use `select.epoll`? A single selector doesn't do much more than the underlying multiplexer. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 22:20:03 2018 From: report at bugs.python.org (Manjusaka) Date: Tue, 18 Dec 2018 03:20:03 +0000 Subject: [issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE In-Reply-To: <1545042698.49.0.788709270274.issue35517@psf.upfronthosting.co.za> Message-ID: <1545103203.45.0.788709270274.issue35517@psf.upfronthosting.co.za> Manjusaka added the comment: > `selectors` makes underlying implementations irrelavant to most users since we can simply use `DefaultSelector` I agree with this. > If you know you want to add EPOLL_EXCLUSIVE, why not just use `select.epoll`? I don't think so. If I use the `select` directly, that means I have to give up all the features what `selectors` support such as binding a `data` to a fd, that also means I have to do some repeat work myself. I don't think it's a good idea. So, why not change this API when we can keep the compatibility? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 00:26:30 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 18 Dec 2018 05:26:30 +0000 Subject: [issue35497] Libary select docs enhance In-Reply-To: <1544804352.43.0.788709270274.issue35497@psf.upfronthosting.co.za> Message-ID: <1545110790.14.0.788709270274.issue35497@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, xiang.zhang versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 00:32:36 2018 From: report at bugs.python.org (Rohit Biswas) Date: Tue, 18 Dec 2018 05:32:36 +0000 Subject: [issue35522] os.stat().st_ctime and time.time() mismatch Message-ID: <1545111156.21.0.788709270274.issue35522@psf.upfronthosting.co.za> New submission from Rohit Biswas : Related Stack Overflow Question: https://stackoverflow.com/questions/53810984/mismatch-between-file-creation-time-and-current-time-in-python ---------- components: Library (Lib) messages: 332040 nosy: belopolsky, rbiswas143 priority: normal severity: normal status: open title: os.stat().st_ctime and time.time() mismatch type: behavior versions: Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 01:05:24 2018 From: report at bugs.python.org (Ma Lin) Date: Tue, 18 Dec 2018 06:05:24 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <5C188E20.5E3BFF.24870@m50-138.163.com> Ma Lin added the comment: > I guess the next step is to try taking out those new index entries to figure out which one causes the problem. Very big amount of work..., I would suggest to revert them. chm is a successful product, but it out of support, and no replacement yet, it's regrettable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 01:41:12 2018 From: report at bugs.python.org (Dima Tisnek) Date: Tue, 18 Dec 2018 06:41:12 +0000 Subject: [issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers In-Reply-To: <1485909545.04.0.650924943503.issue29406@psf.upfronthosting.co.za> Message-ID: <1545115272.43.0.788709270274.issue29406@psf.upfronthosting.co.za> Dima Tisnek added the comment: ping... ---------- nosy: +Dima.Tisnek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 04:57:52 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 18 Dec 2018 09:57:52 +0000 Subject: [issue35522] os.stat().st_ctime and time.time() mismatch In-Reply-To: <1545111156.21.0.788709270274.issue35522@psf.upfronthosting.co.za> Message-ID: <1545127072.82.0.788709270274.issue35522@psf.upfronthosting.co.za> Steven D'Aprano added the comment: In the future, please describe your problem here, on the bug tracker, not just by linking to Stackoverflow. You asked: "Why is the file creation time [less than] the time measured before it is created?" (You actually say "greater than" on Stackoverflow, but the example given shows you mean less than). ctime does not mean "creation time" on Linux systems. https://www.unix.com/tips-and-tutorials/20526-mtime-ctime-atime.html https://stackoverflow.com/questions/27549217/ctime-atime-and-mtime-how-to-interpret-them As for the ctime being earlier than the pre-recorded timestamp, I'm confident that will have something to do with the resolution of ctime versus time.time. The time.time() function may have a resolution of as little as 1 second on some systems: https://docs.python.org/3/library/time.html#time.time so the fraction after the decimal point could be more or less random. Alternatively, the resolution of ctime may not be the same as time.time(). See the documentation: https://docs.python.org/3/library/os.html#os.stat_result I don't think this is a bug, I think this is an unavoidable consequence of the interaction between two different time measurements with slightly different resolutions. If you believe differently, can you explain why you think it is a bug? Since time.time() simply returns the time according to the OS, and os.stat gives the ctime as recorded by the file system, I don't think there is anything Python can do about this even if it is a bug. It would be a bug in the OS or file system. If you disagree, please explain why. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 05:09:51 2018 From: report at bugs.python.org (Paul Wilkinson) Date: Tue, 18 Dec 2018 10:09:51 +0000 Subject: [issue31727] FTP_TLS errors when use certain subcommands In-Reply-To: <1507482521.5.0.213398074469.issue31727@psf.upfronthosting.co.za> Message-ID: <1545127791.31.0.788709270274.issue31727@psf.upfronthosting.co.za> Paul Wilkinson added the comment: This issue does appear to be related to the FTP server (or presumably the SSL library on the FTP server). A test against `test.rebex.net` works with OpenSSL 1.0.1t (on Debian) and LibreSSL 2.2.7 (macOS 10.14.2) while a test against my web host fails on both those systems. ---------- nosy: +paulw11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 05:45:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 10:45:17 +0000 Subject: [issue31784] Implementation of the PEP 564: Add time.time_ns() In-Reply-To: <1507930455.75.0.213398074469.issue31784@psf.upfronthosting.co.za> Message-ID: <1545129917.18.0.788709270274.issue31784@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 62a68b762a479a72c3defba9ace5f72a0063c5c6 by Victor Stinner in branch 'master': bpo-31784: Use time.time_ns() in uuid.uuid1() (GH-11189) https://github.com/python/cpython/commit/62a68b762a479a72c3defba9ace5f72a0063c5c6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 05:51:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2018 10:51:11 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1545130271.1.0.788709270274.issue35482@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10443 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 05:52:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 10:52:38 +0000 Subject: [issue35516] platform.system_alias(): add macOS support In-Reply-To: <1545039087.64.0.788709270274.issue35516@psf.upfronthosting.co.za> Message-ID: <1545130358.64.0.788709270274.issue35516@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10444 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 05:53:55 2018 From: report at bugs.python.org (Rohit Biswas) Date: Tue, 18 Dec 2018 10:53:55 +0000 Subject: [issue35522] os.stat().st_ctime and time.time() mismatch In-Reply-To: <1545111156.21.0.788709270274.issue35522@psf.upfronthosting.co.za> Message-ID: <1545130435.27.0.788709270274.issue35522@psf.upfronthosting.co.za> Rohit Biswas added the comment: Thanks for your reply. It makes sense to me and was very informative. I understand and would explain the problem in the bug tracker itself in the future. I reported this as a potential bug but it seems like it isn't really. So, I'm resolving it as not a bug. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 05:54:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 10:54:37 +0000 Subject: [issue35516] platform.system_alias(): add macOS support In-Reply-To: <1545039087.64.0.788709270274.issue35516@psf.upfronthosting.co.za> Message-ID: <1545130477.22.0.788709270274.issue35516@psf.upfronthosting.co.za> STINNER Victor added the comment: Ronald Oussoren: > The patch does not use the version information passed in to calculate the marketing version. That's a problem when passing in low-level information from a system running a different version of macOS (for example passing in the low-level version information from a macOS 10.8 system while the script is running on a macOS 10.14 system). I abandonned my PR 11187 and I wrote PR 11207 to add a comment explaining why Darwin is not replaced with macOS. Well, use platform.platform() or platform.mac_ver() to get the macOS version ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 05:54:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2018 10:54:38 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1545130478.36.0.788709270274.issue35482@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The breakage was caused by the index entry for ''' (triple single quote). After removing it a correct CHM file is created. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 06:06:17 2018 From: report at bugs.python.org (Ma Lin) Date: Tue, 18 Dec 2018 11:06:17 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1545131177.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Ma Lin added the comment: amazing, you did find it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 06:06:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 11:06:34 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1545131194.71.0.788709270274.issue35348@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10445 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 06:12:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 11:12:59 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1545131579.29.0.788709270274.issue35348@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, I closed my PR 11186 which modified architecture() to only return struct.calcsize('P') if the executable argument is equal to sys.executable. > please read the doc-string of the platform.architecture() function (or ask the person who wrote most of the module). It clearly refers to inspecting a specific executable and only uses the Python interpreter as default. The running process can provide some sane defaults, but is not necessarily using the same values as the given executable. I see the platform module as a module to get info about the operating system and Python, but it seems like I misunderstood the purpose of the specific case of the architecture() function. I propose a small addition to the doc to avoid confusion: https://github.com/python/cpython/pull/11208/files ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 06:20:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 11:20:42 +0000 Subject: [issue35502] Memory leak in xml.etree.ElementTree.iterparse In-Reply-To: <1544817540.85.0.788709270274.issue35502@psf.upfronthosting.co.za> Message-ID: <1545132042.5.0.788709270274.issue35502@psf.upfronthosting.co.za> STINNER Victor added the comment: Oops, my PR 11169 used the wrong issue number: bpo-35257 instead of bpo-35502. Anyway, I closed it, the change is too complex. -- IMHO the root issue is the handling of the SyntaxError exception in XMLPullParser.feed(). I wrote a fix, but I don't have the bandwidth to write an unit test checking that the reference cycle is broken. commit 9f3354d36a89d7898bdb631e5119cc37e9a74840 (fix_etree_leak) Author: Victor Stinner Date: Fri Dec 14 22:03:16 2018 +0100 bpo-35257: Fix memory leak in XMLPullParser.feed() Fix memory leak in XMLPullParser.feed() of xml.etree: on syntax error, clear the traceback to break a reference cycle. diff --git a/Lib/xml/etree/ElementTree.py b/Lib/xml/etree/ElementTree.py index c1cf483cf5..f17c52541b 100644 --- a/Lib/xml/etree/ElementTree.py +++ b/Lib/xml/etree/ElementTree.py @@ -1266,6 +1266,8 @@ class XMLPullParser: try: self._parser.feed(data) except SyntaxError as exc: + # bpo-35502: Break reference cycle + #exc.__traceback__ = None self._events_queue.append(exc) def _close_and_return_root(self): I don't see any behavior difference in XMLPullParser.read_events() which raise again the exception: events = self._events_queue while events: event = events.popleft() if isinstance(event, Exception): raise event else: yield event -- PR 11170 is also a nice enhancement (fix treebuilder_gc_traverse()), but maybe we should also prevent creating reference cycles in the first place? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 06:53:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2018 11:53:29 +0000 Subject: [issue35502] Memory leak in xml.etree.ElementTree.iterparse In-Reply-To: <1544817540.85.0.788709270274.issue35502@psf.upfronthosting.co.za> Message-ID: <1545134009.87.0.788709270274.issue35502@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is not easy to avoid reference cycles if use a generator function. And generator function is much faster than an implementation as a class with the __next__ method. We need to access the iterator object from the code of the generator function, and this creates a cycle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 06:57:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2018 11:57:19 +0000 Subject: [issue35461] Document C API functions which swallow exceptions In-Reply-To: <1544534848.15.0.788709270274.issue35461@psf.upfronthosting.co.za> Message-ID: <1545134239.53.0.788709270274.issue35461@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3fcc1e08db6fb7e17acc4a8f63be3e42f52f094b by Serhiy Storchaka in branch 'master': bpo-35461: Document C API functions which suppress exceptions. (GH-11119) https://github.com/python/cpython/commit/3fcc1e08db6fb7e17acc4a8f63be3e42f52f094b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 06:57:40 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 18 Dec 2018 11:57:40 +0000 Subject: [issue35461] Document C API functions which swallow exceptions In-Reply-To: <1544534848.15.0.788709270274.issue35461@psf.upfronthosting.co.za> Message-ID: <1545134260.8.0.788709270274.issue35461@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10446 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 06:57:47 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 18 Dec 2018 11:57:47 +0000 Subject: [issue35461] Document C API functions which swallow exceptions In-Reply-To: <1544534848.15.0.788709270274.issue35461@psf.upfronthosting.co.za> Message-ID: <1545134267.31.0.788709270274.issue35461@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10447 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 07:04:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 12:04:01 +0000 Subject: [issue35523] Remove ctypes old workaround: creating the first instance of a callback Message-ID: <1545134641.38.0.788709270274.issue35523@psf.upfronthosting.co.za> New submission from STINNER Victor : ctypes._reset_cache() contains the following code: # XXX for whatever reasons, creating the first instance of a callback # function is needed for the unittests on Win64 to succeed. This MAY # be a compiler bug, since the problem occurs only when _ctypes is # compiled with the MS SDK compiler. Or an uninitialized variable? CFUNCTYPE(c_int)(lambda: None) This code has been added 11 years ago: commit 674e9389e9fdadd622829f4833367ac3b38475b5 Author: Thomas Heller Date: Fri Aug 31 13:06:44 2007 +0000 Add a workaround for a strange bug on win64, when _ctypes is compiled with the SDK compiler. This should fix the failing Lib\ctypes\test\test_as_parameter.py test. diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py index cdf6d36e47..f55d194b8f 100644 --- a/Lib/ctypes/__init__.py +++ b/Lib/ctypes/__init__.py @@ -535,3 +535,9 @@ for kind in [c_ushort, c_uint, c_ulong, c_ulonglong]: elif sizeof(kind) == 4: c_uint32 = kind elif sizeof(kind) == 8: c_uint64 = kind del(kind) + +# XXX for whatever reasons, creating the first instance of a callback +# function is needed for the unittests on Win64 to succeed. This MAY +# be a compiler bug, since the problem occurs only when _ctypes is +# compiled with the MS SDK compiler. Or an uninitialized variable? +CFUNCTYPE(c_int)(lambda: None) -- This call is removed from Fedora package by the following patch: https://src.fedoraproject.org/rpms/python3/blob/master/f/00155-avoid-ctypes-thunks.patch Extract of Fedora python3.spec: # 00155 # # Avoid allocating thunks in ctypes unless absolutely necessary, to avoid # generating SELinux denials on "import ctypes" and "import uuid" when # embedding Python within httpd # See https://bugzilla.redhat.com/show_bug.cgi?id=814391 Patch155: 00155-avoid-ctypes-thunks.patch The patch has been added 6 years ago in Fedora: commit 8a28107df1670a03a12cf6a7787160f103d8d8c8 Author: David Malcolm Date: Fri Apr 20 15:28:39 2012 -0400 3.2.3-4: avoid allocating thunks in ctypes unless absolutely necessary (patch 155; rhbz#814391) * Fri Apr 20 2012 David Malcolm - 3.2.3-4 - avoid allocating thunks in ctypes unless absolutely necessary, to avoid generating SELinux denials on "import ctypes" and "import uuid" when embedding Python within httpd (patch 155; rhbz#814391) https://src.fedoraproject.org/rpms/python3/c/8a28107df1670a03a12cf6a7787160f103d8d8c8?branch=master -- I don't understand the purpose of the workaround and ctypes is working well on Fedora. I propose to also remove the workaround in the master branch. In case of doubt, I prefer to keep the workaround in Python 3.7. Attached PR removes the workaround. ---------- components: Library (Lib) messages: 332054 nosy: vstinner priority: normal severity: normal status: open title: Remove ctypes old workaround: creating the first instance of a callback versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 07:15:02 2018 From: report at bugs.python.org (Jules Lasne) Date: Tue, 18 Dec 2018 12:15:02 +0000 Subject: [issue35524] using/windows launcher image might be deprecated Message-ID: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> New submission from Jules Lasne : https://docs.python.org/3/_images/win_installer.png This image corresponds to the Python 3.5 installer. Would it be useful to get a new screenshot of the latest installer ? I can do it if needed ---------- assignee: docs at python components: Documentation messages: 332055 nosy: docs at python, seluj78 priority: normal severity: normal status: open title: using/windows launcher image might be deprecated type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 07:20:56 2018 From: report at bugs.python.org (Jules Lasne) Date: Tue, 18 Dec 2018 12:20:56 +0000 Subject: [issue35524] using/windows launcher image might be deprecated In-Reply-To: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Message-ID: <1545135656.26.0.788709270274.issue35524@psf.upfronthosting.co.za> Jules Lasne added the comment: There is also a conflict between the image and the text: Under `Selecting a custom install`, a line says ``` To perform an all-users installation, you should select ?Customize installation?. In this case: ``` But the screenshot of the installer shows that you can select an option on the main menu to install for all users. What should be done about this conflict ? I cannot currently run the latest installer on Windows but will be able to tonight or tomorrow to check it if no one did before. ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 07:29:45 2018 From: report at bugs.python.org (Luna Chen) Date: Tue, 18 Dec 2018 12:29:45 +0000 Subject: [issue35509] Unable to inherit from logging.Formatter In-Reply-To: <1544875668.42.0.788709270274.issue35509@psf.upfronthosting.co.za> Message-ID: <1545136185.25.0.788709270274.issue35509@psf.upfronthosting.co.za> Luna Chen added the comment: Hi Chih-Hsuan Yen, I will check this out and let you know the outcome. Thanks! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 07:53:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 12:53:11 +0000 Subject: [issue35523] Remove ctypes old workaround: creating the first instance of a callback In-Reply-To: <1545134641.38.0.788709270274.issue35523@psf.upfronthosting.co.za> Message-ID: <1545137591.54.0.788709270274.issue35523@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +10448 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 07:57:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 12:57:10 +0000 Subject: [issue35523] Remove old ctypes callback workaround: creating the first instance of a callback In-Reply-To: <1545134641.38.0.788709270274.issue35523@psf.upfronthosting.co.za> Message-ID: <1545137830.05.0.788709270274.issue35523@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: Remove ctypes old workaround: creating the first instance of a callback -> Remove old ctypes callback workaround: creating the first instance of a callback _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 07:59:23 2018 From: report at bugs.python.org (Luna Chen) Date: Tue, 18 Dec 2018 12:59:23 +0000 Subject: [issue35509] Unable to inherit from logging.Formatter In-Reply-To: <1544875668.42.0.788709270274.issue35509@psf.upfronthosting.co.za> Message-ID: <1545137963.74.0.788709270274.issue35509@psf.upfronthosting.co.za> Luna Chen added the comment: Hi Chih-Hsuan Yen, I have noticed in your `__init__` method, you have `super().__init__(self)`, I'm just wondering if the `self` argument is intentional, as the `Foo` object is to become the format itself? Because inheritance seems to work fine for me with `super().__init__()`, as super() is used for the parent class object, so I don't need to pass in the `self` for the object itself. the `self` in `super().__init__(self)` becomes the value of `fmt` argument.. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 08:47:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 13:47:29 +0000 Subject: [issue35523] Remove old ctypes callback workaround: creating the first instance of a callback In-Reply-To: <1545134641.38.0.788709270274.issue35523@psf.upfronthosting.co.za> Message-ID: <1545140849.87.0.788709270274.issue35523@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e6b247c8e524dbe5fc03b3492f628d0d5348bc49 by Victor Stinner in branch 'master': bpo-35523: Remove ctypes callback workaround (GH-11211) https://github.com/python/cpython/commit/e6b247c8e524dbe5fc03b3492f628d0d5348bc49 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 09:00:16 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 18 Dec 2018 14:00:16 +0000 Subject: [issue30525] Expose SCTs on TLS connections In-Reply-To: <1496233312.72.0.638169189351.issue30525@psf.upfronthosting.co.za> Message-ID: <1545141616.86.0.788709270274.issue30525@psf.upfronthosting.co.za> Christian Heimes added the comment: I looked into the matter. It's certainly doable to have simple CT validation. A custom CT policy is a bit more work, as I would have to provide a callback and two new types. * a method to load CT log config, SSL_CTX_set_ctlog_list_file() * a method to enable CT verification mode, SSL_CTX_enable_ct() * an optional callback to handle SCTs and enforce policies. * wrappers for CT_POLICY_EVAL_CTX and SCT structs There is also the issue of CT log list configuration. Neither Fedora nor Debian ship a CT log file [1]. Without a CT log configuration, SCT validation doesn't work. I created [2] to generate a config file from Chrome's known CT list. The configuration isn't static and list needs to be updated regularly. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=876403 https://github.com/tiran/ct_log_list ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 09:10:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 14:10:26 +0000 Subject: [issue35523] Remove old ctypes callback workaround: creating the first instance of a callback In-Reply-To: <1545134641.38.0.788709270274.issue35523@psf.upfronthosting.co.za> Message-ID: <1545142226.17.0.788709270274.issue35523@psf.upfronthosting.co.za> STINNER Victor added the comment: I will keep an eye on buildbots next days. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 09:28:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 14:28:02 +0000 Subject: [issue17679] sysconfig generation uses some env variables multiple times In-Reply-To: <1365515508.55.0.936246153534.issue17679@psf.upfronthosting.co.za> Message-ID: <1545143282.64.0.788709270274.issue17679@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't think that the attached patch is correct. See attached install.diff: difference without/with 00178-dont-duplicate-flags-in-sysconfig.patch on Python installed in /usr/bin/python3. Example of bug: 'TESTRUNNER': 'LD_LIBRARY_PATH=/builddir/build/BUILD/Python-3.7.1/build/optimized ' - './python ' - '/builddir/build/BUILD/Python-3.7.1/Tools/scripts/run_tests.py', + './python /Tools/scripts/run_tests.py', The /Tools directory doesn't exist :-/ > I think that this is not the correct behaviour, but not sure, maybe I'm doing something wrong. Technically, it's perfectly fine to pass the same flag multiple times. It's common to pass -O0 -Og to gcc for example: gcc uses the last -O option value (which overrides the previous ones). -- This patch is used in the python3 package of Fedora: https://src.fedoraproject.org/rpms/python3/blob/master/f/00178-dont-duplicate-flags-in-sysconfig.patch Patch added by: commit 58f477b403222ea6c13d5d7358551b606cddc0f8 Author: Bohuslav Kabrda Date: Wed Apr 10 14:30:09 2013 +0200 Updated to Python 3.3.1. - Refreshed patches: 55 (systemtap), 111 (no static lib), 146 (hashlib fips), 153 (fix test_gdb noise), 157 (uid, gid overflow - fixed upstream, just keeping few more downstream tests) - Removed patches: 3 (audiotest.au made it to upstream tarball) - Removed workaround for http://bugs.python.org/issue14774, discussed in http://bugs.python.org/issue15298 and fixed in revision 24d52d3060e8. https://src.fedoraproject.org/rpms/python3/c/58f477b403222ea6c13d5d7358551b606cddc0f8?branch=master ---------- nosy: +vstinner Added file: https://bugs.python.org/file48003/install.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 09:29:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 14:29:32 +0000 Subject: [issue17679] sysconfig generation uses some env variables multiple times In-Reply-To: <1365515508.55.0.936246153534.issue17679@psf.upfronthosting.co.za> Message-ID: <1545143372.33.0.788709270274.issue17679@psf.upfronthosting.co.za> STINNER Victor added the comment: build.diff: Difference without/with the patch on Python build from source. Example: - CPPFLAGS = "-I. -I./Include" + CPPFLAGS = "-I. -I/Include" This change is wrong: /Include directory doesn't exist. Another example: - LIBPL = "/usr/local/lib/python3.8/config-3.8dm-x86_64-linux-gnu" + LIBPL = "/usr/local/lib/python3.8/config-dm-x86_64-linux-gnu" I don't understand why "3.8" is removed from the path. ---------- Added file: https://bugs.python.org/file48004/build.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 09:39:30 2018 From: report at bugs.python.org (Jason) Date: Tue, 18 Dec 2018 14:39:30 +0000 Subject: [issue34238] When BROWSER is set on Mac webbrowser.register_standard_browsers doesn't work In-Reply-To: <1543779669.75.0.788709270274.issue34238@psf.upfronthosting.co.za> Message-ID: Jason added the comment: Yes, it does. I haven't tried that code, but it looks similar to a fix I implemented locally. Jason O'Gray On Sun, Dec 2, 2018 at 2:41 PM Karthikeyan Singaravelan < report at bugs.python.org> wrote: > > Karthikeyan Singaravelan added the comment: > > > However, I think there might be a bug with the implementation that > doesn't correctly respect the BROWSER preference. Notice how the > webbrowser._tryorder has two 'lynx' items and both of them > are last. If you look at the comment in the code, it says that it should > be prepended to _tryorder because it's the preferred browser > > @ograycode Is this similar to issue35308 ? > > ---------- > nosy: +xtreak > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 10:18:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 15:18:09 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1545146289.04.0.788709270274.issue10496@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 17d0c0595e101c4ce76b58e55de37e6b5083e6cd by Victor Stinner in branch 'master': bpo-10496: distutils check_environ() handles getpwuid() error (GH-10931) https://github.com/python/cpython/commit/17d0c0595e101c4ce76b58e55de37e6b5083e6cd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 10:18:10 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 18 Dec 2018 15:18:10 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1545146290.69.0.788709270274.issue10496@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10449 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 10:28:06 2018 From: report at bugs.python.org (Colin McPhail) Date: Tue, 18 Dec 2018 15:28:06 +0000 Subject: [issue35525] Incorrect keyword name in NNTP.starttls() documentation Message-ID: <1545146886.62.0.788709270274.issue35525@psf.upfronthosting.co.za> New submission from Colin McPhail : The library documentation for nntplib.NNTP.starttls() says that it takes a keyword parameter called ssl_context. The source code referenced via the link at the top of the nntplib documentation shows the keyword is actually called context. The result is a TypeError if the documented name is used: TypeError: starttls() got an unexpected keyword argument 'ssl_context' ---------- assignee: docs at python components: Documentation messages: 332066 nosy: cmcp22, docs at python priority: normal severity: normal status: open title: Incorrect keyword name in NNTP.starttls() documentation versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 10:34:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 15:34:26 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1545147266.91.0.788709270274.issue10496@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10450 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 10:34:56 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 18 Dec 2018 15:34:56 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1545147296.42.0.788709270274.issue10496@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6e96fb44f12c2e9d7ab0d14a21f2aa85ecaa2f83 by Miss Islington (bot) in branch '3.7': bpo-10496: distutils check_environ() handles getpwuid() error (GH-10931) https://github.com/python/cpython/commit/6e96fb44f12c2e9d7ab0d14a21f2aa85ecaa2f83 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 10:56:04 2018 From: report at bugs.python.org (ChrisRands) Date: Tue, 18 Dec 2018 15:56:04 +0000 Subject: [issue35526] __future__.barry_as_FLUFL documented as mandatory for Python 3.9 Message-ID: <1545148564.43.0.788709270274.issue35526@psf.upfronthosting.co.za> New submission from ChrisRands : A festive bug report: >>> from __future__ import barry_as_FLUFL >>> barry_as_FLUFL.mandatory (3, 9, 0, 'alpha', 0) So barry_as_FLUFL is documented to become mandatory for Python 3.9. Note that mandatory here means that the feature becomes permanent without the __future__ import and cannot be switched off. In this case, this means the '!=' operator becomes a SynaxError, with obvious consequences for existing python code. Now of course this is just an Easter egg, but given that 3.9 is surely on the horizon now, isn't it time to modify the joke, or maybe I'm missing the point and the joke is on me? ---------- messages: 332068 nosy: ChrisRands priority: normal severity: normal status: open title: __future__.barry_as_FLUFL documented as mandatory for Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 11:05:27 2018 From: report at bugs.python.org (ChrisRands) Date: Tue, 18 Dec 2018 16:05:27 +0000 Subject: [issue35526] __future__.barry_as_FLUFL documented as mandatory for Python 3.9 In-Reply-To: <1545148564.43.0.788709270274.issue35526@psf.upfronthosting.co.za> Message-ID: <1545149127.43.0.788709270274.issue35526@psf.upfronthosting.co.za> ChrisRands added the comment: SO question where this derived from: https://stackoverflow.com/questions/53830960/can-all-future-statements-be-removed-from-a-python-code-without-affecting-i ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 11:34:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 16:34:59 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1545150899.1.0.788709270274.issue10496@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset ea6b322829c62951362f267d7afdd262aa2b3e2c by Victor Stinner in branch '2.7': bpo-10496: distutils check_environ() handles getpwuid() error (GH-10931) (GH-11213) https://github.com/python/cpython/commit/ea6b322829c62951362f267d7afdd262aa2b3e2c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 11:37:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 16:37:38 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1545151058.42.0.788709270274.issue10496@psf.upfronthosting.co.za> STINNER Victor added the comment: A few minor tests are still failing when the uid doesn't exist in the password database, but the main issue in pwdhas been fixed and distutils should work more or lesss. I close this 8 years old issue. Thanks to everyone who has been involved in helping to fix it! ---------- components: +Library (Lib), Tests -None resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 11:40:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 16:40:49 +0000 Subject: [issue35348] Problems with handling the file command output in platform.architecture() In-Reply-To: <1543494814.29.0.788709270274.issue35348@psf.upfronthosting.co.za> Message-ID: <1545151249.8.0.788709270274.issue35348@psf.upfronthosting.co.za> STINNER Victor added the comment: The initial issue has been fixed, I close the issue. Thanks for the review and feedback! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 11:41:48 2018 From: report at bugs.python.org (Zachary Ware) Date: Tue, 18 Dec 2018 16:41:48 +0000 Subject: [issue35524] using/windows launcher image might be deprecated In-Reply-To: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Message-ID: <1545151308.41.0.788709270274.issue35524@psf.upfronthosting.co.za> Change by Zachary Ware : ---------- assignee: docs at python -> steve.dower components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 12:01:19 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 18 Dec 2018 17:01:19 +0000 Subject: [issue35526] __future__.barry_as_FLUFL documented as mandatory for Python 3.9 In-Reply-To: <1545148564.43.0.788709270274.issue35526@psf.upfronthosting.co.za> Message-ID: <1545152479.39.0.788709270274.issue35526@psf.upfronthosting.co.za> Change by Eric Snow : ---------- nosy: +barry, brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 13:14:46 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 18 Dec 2018 18:14:46 +0000 Subject: [issue35524] using/windows launcher image might be deprecated In-Reply-To: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Message-ID: <1545156886.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Steve Dower added the comment: That option is only for the py.exe launcher and not the whole installation (notice the target path is still under C:\Users). Having an updated image would be fine, though the only difference should be the version number. If you can provide a similar sized image of the 3.7 installer (screen scaling at 100%) then I'll add the drop shadow, cover the username and update the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 13:23:50 2018 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 18 Dec 2018 18:23:50 +0000 Subject: [issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers In-Reply-To: <1485909545.04.0.650924943503.issue29406@psf.upfronthosting.co.za> Message-ID: <1545157430.88.0.788709270274.issue29406@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 13:34:33 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 18 Dec 2018 18:34:33 +0000 Subject: [issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers In-Reply-To: <1485909545.04.0.650924943503.issue29406@psf.upfronthosting.co.za> Message-ID: <1545158073.9.0.788709270274.issue29406@psf.upfronthosting.co.za> Yury Selivanov added the comment: Dima, we'll likely address this in 3.8, when we land new SSL implementation. Meanwhile you can use uvloop where all these bugs should be fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 13:47:07 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 18 Dec 2018 18:47:07 +0000 Subject: [issue35526] __future__.barry_as_FLUFL documented as mandatory for Python 3.9 In-Reply-To: <1545148564.43.0.788709270274.issue35526@psf.upfronthosting.co.za> Message-ID: <1545158827.18.0.788709270274.issue35526@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Let's extend the "joke" and make it mandatory in Python 4! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 13:51:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 18:51:41 +0000 Subject: [issue35516] platform.system_alias(): add macOS support In-Reply-To: <1545039087.64.0.788709270274.issue35516@psf.upfronthosting.co.za> Message-ID: <1545159101.76.0.788709270274.issue35516@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 60875db2f67815d7d181c552bfac59e8c97619e3 by Victor Stinner in branch 'master': bpo-35516: platform.system_alias() don't replace Darwin (GH-11207) https://github.com/python/cpython/commit/60875db2f67815d7d181c552bfac59e8c97619e3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 13:51:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 18:51:54 +0000 Subject: [issue35516] platform.system_alias(): add macOS support In-Reply-To: <1545039087.64.0.788709270274.issue35516@psf.upfronthosting.co.za> Message-ID: <1545159114.97.0.788709270274.issue35516@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 Tue Dec 18 13:59:16 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 18 Dec 2018 18:59:16 +0000 Subject: [issue22703] Idle Code Context menu entrie(s) In-Reply-To: <1414023415.32.0.701318253357.issue22703@psf.upfronthosting.co.za> Message-ID: <1545159556.67.0.788709270274.issue22703@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +10451 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 14:35:20 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 18 Dec 2018 19:35:20 +0000 Subject: [issue17561] Add socket.create_server_sock() convenience function In-Reply-To: <1364402909.97.0.467946240817.issue17561@psf.upfronthosting.co.za> Message-ID: <1545161720.5.0.788709270274.issue17561@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- pull_requests: +10452 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 14:53:53 2018 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 18 Dec 2018 19:53:53 +0000 Subject: [issue17561] Add socket.create_server_sock() convenience function In-Reply-To: <1364402909.97.0.467946240817.issue17561@psf.upfronthosting.co.za> Message-ID: <1545162833.25.0.788709270274.issue17561@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 15:24:43 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 18 Dec 2018 20:24:43 +0000 Subject: [issue35461] Document C API functions which swallow exceptions In-Reply-To: <1544534848.15.0.788709270274.issue35461@psf.upfronthosting.co.za> Message-ID: <1545164683.22.0.788709270274.issue35461@psf.upfronthosting.co.za> miss-islington added the comment: New changeset f265afec1c2a5acb8cb9c9ddb6cd45f7465c6eb5 by Miss Islington (bot) in branch '3.7': bpo-35461: Document C API functions which suppress exceptions. (GH-11119) https://github.com/python/cpython/commit/f265afec1c2a5acb8cb9c9ddb6cd45f7465c6eb5 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 15:29:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2018 20:29:16 +0000 Subject: [issue35502] Memory leak in xml.etree.ElementTree.iterparse In-Reply-To: <1544817540.85.0.788709270274.issue35502@psf.upfronthosting.co.za> Message-ID: <1545164956.7.0.788709270274.issue35502@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d2a75c67830d7c9f59e4e9b60f36974234c829ef by Serhiy Storchaka in branch 'master': bpo-35502: Fix reference leaks in ElementTree.TreeBuilder. (GH-11170) https://github.com/python/cpython/commit/d2a75c67830d7c9f59e4e9b60f36974234c829ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 15:29:31 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 18 Dec 2018 20:29:31 +0000 Subject: [issue35502] Memory leak in xml.etree.ElementTree.iterparse In-Reply-To: <1544817540.85.0.788709270274.issue35502@psf.upfronthosting.co.za> Message-ID: <1545164971.65.0.788709270274.issue35502@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10453 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 15:43:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 20:43:22 +0000 Subject: [issue17561] Add socket.create_server_sock() convenience function In-Reply-To: <1364402909.97.0.467946240817.issue17561@psf.upfronthosting.co.za> Message-ID: <1545165802.36.0.788709270274.issue17561@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:01:19 2018 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Dec 2018 21:01:19 +0000 Subject: [issue35526] __future__.barry_as_FLUFL documented as mandatory for Python 3.9 In-Reply-To: <1545148564.43.0.788709270274.issue35526@psf.upfronthosting.co.za> Message-ID: <1545166879.09.0.788709270274.issue35526@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +10454 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:03:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 21:03:29 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1545167009.74.0.788709270274.issue35499@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh wait, "make build_all_generate_profile" and "make profile-opt" have another issue. They modify LDFLAGS, whereas PGO flags seem to be very specific to the compiler, not to the linker. I reopen the issue. build_all_generate_profile: $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)" profile-opt: profile-run-stamp ... $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_USE_FLAG)" LDFLAGS="$(LDFLAGS)" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG)" of "make build_all_generate_profile" looks harmless: passing PGO flags to the linker works since gcc is used as the linker. Except that LDFLAGS is exported and used by distutils, and passing PGO flags to build third party code is not ok: see bpo-35257. For "make profile-opt", LDFLAGS="$(LDFLAGS)" looks useless. PGO flags depend on the compiler: * clang * PGO_PROF_GEN_FLAG="-fprofile-instr-generate" * PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd" * gcc: * PGO_PROF_GEN_FLAG="-fprofile-instr-generate" * PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd" * ICC: * PGO_PROF_GEN_FLAG="-prof-gen" * PGO_PROF_USE_FLAG="-prof-use" * Default: * PGO_PROF_GEN_FLAG="-fprofile-generate" * PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction" I don't think that any of these flags should be passed to the LDFLAGS. Passing these flags to CFLAGS should be enough. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:05:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 21:05:17 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1545167117.62.0.788709270274.issue35499@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10455 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:13:53 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 18 Dec 2018 21:13:53 +0000 Subject: [issue35527] Make fields selectively immutable in dataclasses Message-ID: <1545167633.41.0.788709270274.issue35527@psf.upfronthosting.co.za> New submission from Raymond Hettinger : The unsafe_hash option is unsafe only because it doesn't afford mutability protections. This can be mitigated with selective immutability. @dataclass class Person: ssn: int = field(immutable=True) birth_city: int = field(immutable=True) name: str # A person can change their name address: str # A person can move age: int # An age can change This would generate something like this: def __setattr__(self, attr, value): if attr in {'ssn', 'birth_city'} and hasattr(self, attr): raise TypeError( f'{attr!r} is not settable after initialization') return object.__setattr__(self, name, attr) A number of APIs are possible -- the important thing to be able to selectively block updates to particular fields (particularly those used in hashing and ordering). ---------- assignee: eric.smith components: Library (Lib) messages: 332080 nosy: eric.smith, rhettinger priority: normal severity: normal status: open title: Make fields selectively immutable in dataclasses type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:17:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 21:17:54 +0000 Subject: [issue35526] __future__.barry_as_FLUFL documented as mandatory for Python 3.9 In-Reply-To: <1545148564.43.0.788709270274.issue35526@psf.upfronthosting.co.za> Message-ID: <1545167874.86.0.788709270274.issue35526@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:31:37 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 18 Dec 2018 21:31:37 +0000 Subject: [issue35465] [asyncio] Document loop.add_signal_handler In-Reply-To: <1544556093.28.0.788709270274.issue35465@psf.upfronthosting.co.za> Message-ID: <1545168697.05.0.788709270274.issue35465@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset e3666fc8effb05b555121f4ab7388df59e21f8b4 by Yury Selivanov (Hrvoje Nik?i?) in branch 'master': bpo-35465: Document _UnixSelectorEventLoop.add_signal_handler. (GH-11145) https://github.com/python/cpython/commit/e3666fc8effb05b555121f4ab7388df59e21f8b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:31:41 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 18 Dec 2018 21:31:41 +0000 Subject: [issue35465] [asyncio] Document loop.add_signal_handler In-Reply-To: <1544556093.28.0.788709270274.issue35465@psf.upfronthosting.co.za> Message-ID: <1545168701.59.0.788709270274.issue35465@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10456 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:32:08 2018 From: report at bugs.python.org (Brett Cannon) Date: Tue, 18 Dec 2018 21:32:08 +0000 Subject: [issue35520] Python won't build with dtrace enabled on some systems. In-Reply-To: <1545047330.52.0.788709270274.issue35520@psf.upfronthosting.co.za> Message-ID: <1545168728.89.0.788709270274.issue35520@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:32:49 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 18 Dec 2018 21:32:49 +0000 Subject: [issue35465] [asyncio] Document loop.add_signal_handler In-Reply-To: <1544556093.28.0.788709270274.issue35465@psf.upfronthosting.co.za> Message-ID: <1545168769.04.0.788709270274.issue35465@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:40:27 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 18 Dec 2018 21:40:27 +0000 Subject: [issue35502] Memory leak in xml.etree.ElementTree.iterparse In-Reply-To: <1544817540.85.0.788709270274.issue35502@psf.upfronthosting.co.za> Message-ID: <1545169227.93.0.788709270274.issue35502@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 60c919b58bd3cf8730947a00ddc6a527d6922ff1 by Miss Islington (bot) in branch '3.7': bpo-35502: Fix reference leaks in ElementTree.TreeBuilder. (GH-11170) https://github.com/python/cpython/commit/60c919b58bd3cf8730947a00ddc6a527d6922ff1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:40:38 2018 From: report at bugs.python.org (ChrisRands) Date: Tue, 18 Dec 2018 21:40:38 +0000 Subject: [issue34764] Improve documentation example for using iter() with sentinel value In-Reply-To: <1537544491.72.0.956365154283.issue34764@psf.upfronthosting.co.za> Message-ID: <1545169238.08.0.788709270274.issue34764@psf.upfronthosting.co.za> Change by ChrisRands : ---------- keywords: +patch pull_requests: +10457 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:44:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 21:44:01 +0000 Subject: [issue35424] multiprocessing.Pool: emit ResourceWarning In-Reply-To: <1544058034.55.0.788709270274.issue35424@psf.upfronthosting.co.za> Message-ID: <1545169441.16.0.788709270274.issue35424@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10458 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:47:20 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 18 Dec 2018 21:47:20 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1545169640.13.0.788709270274.issue35482@psf.upfronthosting.co.za> Steve Dower added the comment: It looks like generally the ' entity does not work in the CHM index - there should be b' and u' entries as well, but they show up as b and u (whereas b" and u" are fine). Substituting ' seems to work fine, but I had to do that manually in the hhk file and then rebuild the hhp directly. I'm not sure the best way to integrate it into our entire build process is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:50:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 21:50:59 +0000 Subject: [issue34833] [CI] Azure Pipeline: Initialize Agent failed In-Reply-To: <1538140188.61.0.545547206417.issue34833@psf.upfronthosting.co.za> Message-ID: <1545169859.59.0.788709270274.issue34833@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see the failure recently, so I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:52:40 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 18 Dec 2018 21:52:40 +0000 Subject: [issue35465] [asyncio] Document loop.add_signal_handler In-Reply-To: <1544556093.28.0.788709270274.issue35465@psf.upfronthosting.co.za> Message-ID: <1545169960.67.0.788709270274.issue35465@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 12f3979b3807b448ca070b44bbc1597cf800f8a4 by Yury Selivanov (Miss Islington (bot)) in branch '3.7': bpo-35465: Document _UnixSelectorEventLoop.add_signal_handler. (GH-11145) (GH-11221) https://github.com/python/cpython/commit/12f3979b3807b448ca070b44bbc1597cf800f8a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:53:28 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 18 Dec 2018 21:53:28 +0000 Subject: [issue35527] Make fields selectively immutable in dataclasses In-Reply-To: <1545167633.41.0.788709270274.issue35527@psf.upfronthosting.co.za> Message-ID: <1545170008.15.0.788709270274.issue35527@psf.upfronthosting.co.za> Yury Selivanov added the comment: +1. I've tried to use `field(frozen=True)` today and was surprised it's not supported. ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:55:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 21:55:24 +0000 Subject: [issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1527865087.2.0.81473610881.issue33735@psf.upfronthosting.co.za> Message-ID: <1545170124.29.0.788709270274.issue33735@psf.upfronthosting.co.za> STINNER Victor added the comment: Even if the code isn't perfect, I didn't see the failure recently. So I close the bug again. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:56:19 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2018 21:56:19 +0000 Subject: [issue23057] [Windows] asyncio: support signal handlers on Windows (feature request) In-Reply-To: <1418674256.87.0.827009141117.issue23057@psf.upfronthosting.co.za> Message-ID: <1545170179.5.0.788709270274.issue23057@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset b5c8cfa1da17c6f3acac80a0afca7f7104fb9589 by Andrew Svetlov (Vladimir Matveev) in branch 'master': bpo-23057: add loop self socket as wakeup fd for signals (#11135) https://github.com/python/cpython/commit/b5c8cfa1da17c6f3acac80a0afca7f7104fb9589 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:56:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 21:56:34 +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: <1545170194.03.0.788709270274.issue32706@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, let's keep this permanent temporary fix (test skipped until someone finds a solution). I close the issue. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:58:01 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2018 21:58:01 +0000 Subject: [issue23057] [Windows] asyncio: support signal handlers on Windows (feature request) In-Reply-To: <1418674256.87.0.827009141117.issue23057@psf.upfronthosting.co.za> Message-ID: <1545170281.77.0.788709270274.issue23057@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:59:58 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2018 21:59:58 +0000 Subject: [issue35394] Add __slots__ = () to asyncio protocols In-Reply-To: <1543874366.92.0.788709270274.issue35394@psf.upfronthosting.co.za> Message-ID: <1545170398.33.0.788709270274.issue35394@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 Tue Dec 18 17:04:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2018 22:04:03 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1545170643.72.0.788709270274.issue35482@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think this is a Sphinx bug. It should work around limitations of the CHM compiler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:15:46 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 18 Dec 2018 22:15:46 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1545171346.21.0.788709270274.issue35482@psf.upfronthosting.co.za> Steve Dower added the comment: I've got an alternate PR to do the fixup in an extension, as well as fixing two other minor build problems for docs (on Windows). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:16:17 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 18 Dec 2018 22:16:17 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1545171377.45.0.788709270274.issue35482@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +10459 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:22:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 22:22:38 +0000 Subject: [issue31731] [2.7] test_io: race condition in test_interrupted_write_text() (test_io hangs on x86 Gentoo Refleaks 2.7) In-Reply-To: <1507533205.95.0.213398074469.issue31731@psf.upfronthosting.co.za> Message-ID: <1545171758.13.0.788709270274.issue31731@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10460 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:34:32 2018 From: report at bugs.python.org (jfbu) Date: Tue, 18 Dec 2018 22:34:32 +0000 Subject: [issue35528] [DOC] [LaTeX] Sphinx 2.0 uses GNU FreeFont as default for xelatex Message-ID: <1545172472.78.0.788709270274.issue35528@psf.upfronthosting.co.za> New submission from jfbu : Not sure if any issue at all, but as said in title, starting with Sphinx 2.0 (Spring 2019), XeLaTeX will be configured to use by default GNU FreeFont, (see https://github.com/sphinx-doc/sphinx/blob/master/CHANGES), and this means new dependency (for documentation builds on Ubuntu, package fonts-freefont-otf; for builds on Fedora 29 it is texlive-gnu-freefont). Indeed currently CPython PDFs are built using ``xelatex``. ---------- assignee: docs at python components: Documentation messages: 332092 nosy: docs at python, jfbu priority: normal severity: normal status: open title: [DOC] [LaTeX] Sphinx 2.0 uses GNU FreeFont as default for xelatex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:36:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 22:36:41 +0000 Subject: [issue31731] [2.7] test_io: race condition in test_interrupted_write_text() (test_io hangs on x86 Gentoo Refleaks 2.7) In-Reply-To: <1507533205.95.0.213398074469.issue31731@psf.upfronthosting.co.za> Message-ID: <1545172601.04.0.788709270274.issue31731@psf.upfronthosting.co.za> STINNER Victor added the comment: > AMD64 FreeBSD 10.x Shared 3.7 issue: I wrote PR 11225 which may fix it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:38:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 22:38:14 +0000 Subject: [issue14094] ntpath.realpath() should use GetFinalPathNameByHandle() In-Reply-To: <1329954470.08.0.180096078595.issue14094@psf.upfronthosting.co.za> Message-ID: <1545172694.67.0.788709270274.issue14094@psf.upfronthosting.co.za> STINNER Victor added the comment: Any update on this issue? ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:51:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 22:51:02 +0000 Subject: [issue35012] [3.7] test_multiprocessing_spawn hangs randomly on AppVeyor In-Reply-To: <1539845245.85.0.788709270274.issue35012@psf.upfronthosting.co.za> Message-ID: <1545173462.88.0.788709270274.issue35012@psf.upfronthosting.co.za> STINNER Victor added the comment: I haven't seen this bug for 2 months, I'm unable to reproduce the bug and I don't know how to fix it. I close the bug as out of date. Reopen it if it comes back. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:52:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 22:52:43 +0000 Subject: [issue31731] [2.7] test_io: race condition in test_interrupted_write_text() (test_io hangs on x86 Gentoo Refleaks 2.7) In-Reply-To: <1507533205.95.0.213398074469.issue31731@psf.upfronthosting.co.za> Message-ID: <1545173563.05.0.788709270274.issue31731@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 05c9d31eb62cc45dc3c55a5cdb7cbc713d0421db by Victor Stinner in branch 'master': bpo-31731: Fix test_io.check_interrupted_write() (GH-11225) https://github.com/python/cpython/commit/05c9d31eb62cc45dc3c55a5cdb7cbc713d0421db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:52:53 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 18 Dec 2018 22:52:53 +0000 Subject: [issue31731] [2.7] test_io: race condition in test_interrupted_write_text() (test_io hangs on x86 Gentoo Refleaks 2.7) In-Reply-To: <1507533205.95.0.213398074469.issue31731@psf.upfronthosting.co.za> Message-ID: <1545173573.93.0.788709270274.issue31731@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10461 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:54:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 22:54:35 +0000 Subject: [issue35424] multiprocessing.Pool: emit ResourceWarning In-Reply-To: <1544058034.55.0.788709270274.issue35424@psf.upfronthosting.co.za> Message-ID: <1545173675.3.0.788709270274.issue35424@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 6cdce3ddef805e11d75142f3e20e23c3fe21fdf4 by Victor Stinner in branch 'master': bpo-35424: Fix test_multiprocessing_main_handling (GH-11223) https://github.com/python/cpython/commit/6cdce3ddef805e11d75142f3e20e23c3fe21fdf4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:54:43 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 18 Dec 2018 22:54:43 +0000 Subject: [issue35424] multiprocessing.Pool: emit ResourceWarning In-Reply-To: <1544058034.55.0.788709270274.issue35424@psf.upfronthosting.co.za> Message-ID: <1545173683.13.0.788709270274.issue35424@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10462 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:57:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 22:57:04 +0000 Subject: [issue31731] [2.7] test_io: race condition in test_interrupted_write_text() (test_io hangs on x86 Gentoo Refleaks 2.7) In-Reply-To: <1507533205.95.0.213398074469.issue31731@psf.upfronthosting.co.za> Message-ID: <1545173824.65.0.788709270274.issue31731@psf.upfronthosting.co.za> STINNER Victor added the comment: The test can be fixed in Python 2.7 by exposing pthread_sigmask() somehow, or at least pthread_sigmask(SIG_BLOCK, [SIGALARM]), but honestly, I don't think that it's worth it. The test only very rarely hangs, and the bug has already been fixed in Python 3. I close the issue. I fixed a race condition in test_io of Python 3. (The bot will shortly backport the fix to 3.7). ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 18:10:49 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 18 Dec 2018 23:10:49 +0000 Subject: [issue31731] [2.7] test_io: race condition in test_interrupted_write_text() (test_io hangs on x86 Gentoo Refleaks 2.7) In-Reply-To: <1507533205.95.0.213398074469.issue31731@psf.upfronthosting.co.za> Message-ID: <1545174649.9.0.788709270274.issue31731@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 729fc5d2acab9eb672c4804092236af5362a4c66 by Miss Islington (bot) in branch '3.7': bpo-31731: Fix test_io.check_interrupted_write() (GH-11225) https://github.com/python/cpython/commit/729fc5d2acab9eb672c4804092236af5362a4c66 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 18:38:46 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 18 Dec 2018 23:38:46 +0000 Subject: [issue10320] printf %qd is nonstandard In-Reply-To: <1288946289.37.0.37131892978.issue10320@psf.upfronthosting.co.za> Message-ID: <1545176326.97.0.788709270274.issue10320@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10463 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 18:43:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Dec 2018 23:43:31 +0000 Subject: [issue35424] multiprocessing.Pool: emit ResourceWarning In-Reply-To: <1544058034.55.0.788709270274.issue35424@psf.upfronthosting.co.za> Message-ID: <1545176611.25.0.788709270274.issue35424@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c74e7c48ba4f8437d4c8b402098b8cefc33a28a9 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-35424: Fix test_multiprocessing_main_handling (GH-11223) (GH-11227) https://github.com/python/cpython/commit/c74e7c48ba4f8437d4c8b402098b8cefc33a28a9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 18:44:22 2018 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 18 Dec 2018 23:44:22 +0000 Subject: [issue35529] A reference counting bug in ctypes Message-ID: <1545176662.95.0.788709270274.issue35529@psf.upfronthosting.co.za> New submission from Zackery Spytz : In PyCFuncPtr_FromDll(), "dll" will leak if an error occurs in _validate_paramflags() or GenericPyCData_new(). ---------- components: Extension Modules, ctypes messages: 332101 nosy: ZackerySpytz priority: normal severity: normal status: open title: A reference counting bug in ctypes type: behavior versions: Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 18:49:56 2018 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 18 Dec 2018 23:49:56 +0000 Subject: [issue35529] A reference counting bug in ctypes In-Reply-To: <1545176662.95.0.788709270274.issue35529@psf.upfronthosting.co.za> Message-ID: <1545176996.26.0.788709270274.issue35529@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +10464 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 18:51:06 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 18 Dec 2018 23:51:06 +0000 Subject: [issue10320] printf %qd is nonstandard In-Reply-To: <1288946289.37.0.37131892978.issue10320@psf.upfronthosting.co.za> Message-ID: <1545177066.71.0.788709270274.issue10320@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 53e2248a94cd89e65326c5cfd400f74a88552d8c by Miss Islington (bot) in branch '2.7': bpo-10320: Replace nonstandard sprintf() length modifier in ctypes' PyCArg_repr(). (GH-10853) https://github.com/python/cpython/commit/53e2248a94cd89e65326c5cfd400f74a88552d8c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 19:09:09 2018 From: report at bugs.python.org (Victor Porton) Date: Wed, 19 Dec 2018 00:09:09 +0000 Subject: [issue35530] Counter-intuitive logging API Message-ID: <1545178149.93.0.788709270274.issue35530@psf.upfronthosting.co.za> New submission from Victor Porton : The following script: #/usr/bin/env python3 import logging logger = logging.getLogger(name='main') logger.setLevel(logging.INFO) logger.error('XXX') logging.error('ZZZ') logger.error('XXX') outputs XXX ERROR:root:ZZZ ERROR:main:XXX That is counter-intuitive: two logger.error('XXX') operators should output the same string, not two different strings "XXX" and "ERROR:main:XXX". Please discuss how to make Python behave as a user could expect. ---------- components: Library (Lib) messages: 332103 nosy: porton priority: normal severity: normal status: open title: Counter-intuitive logging API type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 19:19:00 2018 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 19 Dec 2018 00:19:00 +0000 Subject: [issue10320] printf %qd is nonstandard In-Reply-To: <1288946289.37.0.37131892978.issue10320@psf.upfronthosting.co.za> Message-ID: <1545178740.94.0.788709270274.issue10320@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- pull_requests: +10465 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 19:24:10 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 19 Dec 2018 00:24:10 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1545179050.76.0.788709270274.issue35499@psf.upfronthosting.co.za> Gregory P. Smith added the comment: But the `build_all_generate_profile` build is an intermediate instrumented interpreter build, it isn't shipped and things like PGO often require flags that the linker sees in order to generate the instrumented binary. If those are left off of the link step, you won't have an instrumented binary and won't generate profile data. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 20:19:56 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 19 Dec 2018 01:19:56 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1545182395.99.0.788709270274.issue33610@psf.upfronthosting.co.za> Cheryl Sabella added the comment: For M1 and M2 - #22703. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 20:49:24 2018 From: report at bugs.python.org (Justin) Date: Wed, 19 Dec 2018 01:49:24 +0000 Subject: [issue35531] xml.etree.ElementTree Elment.find bug, fails to find tag Message-ID: <1545184164.65.0.788709270274.issue35531@psf.upfronthosting.co.za> New submission from Justin : When the following text it loaded in to an ElementTree Element, the find method is unable to find one of the elements without a namespace assigned to it. ``` import xml.etree.ElementTree as ElementTree xml_text = """ a:ActionNotSupportedThe message with Action \'\' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None). """ xml = ElementTree.fromstring(xml_text) ele = xml.find('faultstring') ele == None #True ``` ---------- components: XML messages: 332106 nosy: spacether priority: normal severity: normal status: open title: xml.etree.ElementTree Elment.find bug, fails to find tag type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 21:21:36 2018 From: report at bugs.python.org (Justin) Date: Wed, 19 Dec 2018 02:21:36 +0000 Subject: [issue35531] xml.etree.ElementTree Elment.find bug, fails to find tag In-Reply-To: <1545184164.65.0.788709270274.issue35531@psf.upfronthosting.co.za> Message-ID: <1545186096.8.0.788709270274.issue35531@psf.upfronthosting.co.za> Justin added the comment: Issue was user error. I though that find did a full search of the tree when it only searches children. Solution is: ele = xml.find('.//faultstring') ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 22:00:55 2018 From: report at bugs.python.org (Ma Lin) Date: Wed, 19 Dec 2018 03:00:55 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1545188454.99.0.788709270274.issue35482@psf.upfronthosting.co.za> Ma Lin added the comment: ' comes from html.escape(s, quote=True) https://github.com/python/cpython/blob/4a9ee26750aa8cb37b5072b2bb4dd328819febb4/Lib/html/__init__.py#L24 Of course, it's not a bug. It would be better to patch in Sphinx, I will do it at some point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 01:01:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 06:01:45 +0000 Subject: [issue10320] printf %qd is nonstandard In-Reply-To: <1288946289.37.0.37131892978.issue10320@psf.upfronthosting.co.za> Message-ID: <1545199305.6.0.788709270274.issue10320@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 838645dc4191c4109e2b300cf9ed9d481b55509f by Serhiy Storchaka (Zackery Spytz) in branch '2.7': bpo-10320: Use PY_FORMAT_LONG_LONG in ctypes' PyCArg_repr(). (GH-11230) https://github.com/python/cpython/commit/838645dc4191c4109e2b300cf9ed9d481b55509f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 01:09:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 06:09:48 +0000 Subject: [issue35506] Doc: fix keyword `as` link from `import` and `try` In-Reply-To: <1544837904.07.0.788709270274.issue35506@psf.upfronthosting.co.za> Message-ID: <1545199788.41.0.788709270274.issue35506@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 2b57c43f21f891df4c6f2294a3b9e1b9029a16b6 by Serhiy Storchaka in branch 'master': bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) https://github.com/python/cpython/commit/2b57c43f21f891df4c6f2294a3b9e1b9029a16b6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 01:14:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 06:14:45 +0000 Subject: [issue35506] Doc: fix keyword `as` link from `import` and `try` In-Reply-To: <1544837904.07.0.788709270274.issue35506@psf.upfronthosting.co.za> Message-ID: <1545200085.76.0.788709270274.issue35506@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10466 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 01:22:22 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Wed, 19 Dec 2018 06:22:22 +0000 Subject: [issue35509] Unable to inherit from logging.Formatter In-Reply-To: <1544875668.42.0.788709270274.issue35509@psf.upfronthosting.co.za> Message-ID: <1545200542.22.0.788709270274.issue35509@psf.upfronthosting.co.za> Chih-Hsuan Yen added the comment: Oh so that's a simple Python question. Yep it works if `self` is removed. Thank you very much for the comment and sorry for bothering. I'll fix the code I'm using. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 02:28:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 07:28:16 +0000 Subject: [issue35506] Doc: fix keyword `as` link from `import` and `try` In-Reply-To: <1544837904.07.0.788709270274.issue35506@psf.upfronthosting.co.za> Message-ID: <1545204496.24.0.788709270274.issue35506@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 1e47fbcf78c4d66fbe1fc7b4ea91a6b147ff83d2 by Serhiy Storchaka in branch '3.7': [3.7] bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174). (GH-11232) https://github.com/python/cpython/commit/1e47fbcf78c4d66fbe1fc7b4ea91a6b147ff83d2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 02:28:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 07:28:48 +0000 Subject: [issue35506] Doc: fix keyword `as` link from `import` and `try` In-Reply-To: <1544837904.07.0.788709270274.issue35506@psf.upfronthosting.co.za> Message-ID: <1545204528.56.0.788709270274.issue35506@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 Dec 19 04:06:30 2018 From: report at bugs.python.org (=?utf-8?b?6IOh5aaC6Zuq?=) Date: Wed, 19 Dec 2018 09:06:30 +0000 Subject: [issue35532] numpy-stl library problem, class stl.base.BaseMesh lacks function 'is_closed()' Message-ID: <1545210390.66.0.788709270274.issue35532@psf.upfronthosting.co.za> Change by ??? : ---------- components: Library (Lib) nosy: ??? priority: normal severity: normal status: open title: numpy-stl library problem, class stl.base.BaseMesh lacks function 'is_closed()' type: resource usage versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 04:17:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 09:17:48 +0000 Subject: [issue35532] numpy-stl library problem, class stl.base.BaseMesh lacks function 'is_closed()' Message-ID: <1545211068.83.0.788709270274.issue35532@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : This tracker is for bugs in CPython itself. stl.base.BaseMesh is not a part of the standard Python library. Use an appropriate bug tracker for reporting this issue. ---------- nosy: +serhiy.storchaka resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 04:18:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 09:18:08 +0000 Subject: [issue10320] printf %qd is nonstandard In-Reply-To: <1288946289.37.0.37131892978.issue10320@psf.upfronthosting.co.za> Message-ID: <1545211088.98.0.788709270274.issue10320@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 Dec 19 04:24:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 09:24:15 +0000 Subject: [issue35461] Document C API functions which swallow exceptions In-Reply-To: <1544534848.15.0.788709270274.issue35461@psf.upfronthosting.co.za> Message-ID: <1545211455.06.0.788709270274.issue35461@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are too much differences in the C API and the documentation between 3.x and 2.7, so backporting to 2.7 is not practical. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 04:25:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 09:25:41 +0000 Subject: [issue34238] When BROWSER is set on Mac webbrowser.register_standard_browsers doesn't work In-Reply-To: <1532623484.23.0.56676864532.issue34238@psf.upfronthosting.co.za> Message-ID: <1545211541.64.0.788709270274.issue34238@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 04:27:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 09:27:20 +0000 Subject: [issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference. In-Reply-To: <1544641901.4.0.788709270274.issue35475@psf.upfronthosting.co.za> Message-ID: <1545211640.45.0.788709270274.issue35475@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 Dec 19 04:28:37 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 19 Dec 2018 09:28:37 +0000 Subject: [issue18799] Resurrect and fix test_404 in Lib/test/test_xmlrpc.py In-Reply-To: <1377100643.52.0.970396135479.issue18799@psf.upfronthosting.co.za> Message-ID: <1545211717.87.0.788709270274.issue18799@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10467 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 04:29:11 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 19 Dec 2018 09:29:11 +0000 Subject: [issue35530] Counter-intuitive logging API In-Reply-To: <1545178149.93.0.788709270274.issue35530@psf.upfronthosting.co.za> Message-ID: <1545211751.94.0.788709270274.issue35530@psf.upfronthosting.co.za> Steven D'Aprano added the comment: The call to logging.error() is irrelevant, since there's no expectation that the module-level function will necessarily output the same as a method of a specific instance logger.error(). I agree that is it quite curious that the first call to logger.error outputs something different from the second. The documentation says: The default format set by basicConfig() for messages is: severity:logger name:message ( Paragraph just above this: https://docs.python.org/3.5/howto/logging.html#logging-flow ) but you don't call basicConfig. I'm not sure that it is mandatory though. It looks like a bug to *me*, but I'm not a logging expert. I'm seeing the same behaviour in 3.5 and 3.7, but in 2.7.1 the first call to logger.error prints an error message: No handlers could be found for logger "main" ---------- nosy: +steven.daprano, vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 04:41:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 09:41:30 +0000 Subject: [issue22166] test_codecs leaks references In-Reply-To: <1407444567.64.0.0425446064781.issue22166@psf.upfronthosting.co.za> Message-ID: <1545212490.05.0.788709270274.issue22166@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 04:46:27 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 19 Dec 2018 09:46:27 +0000 Subject: [issue18799] Resurrect and fix test_404 in Lib/test/test_xmlrpc.py In-Reply-To: <1377100643.52.0.970396135479.issue18799@psf.upfronthosting.co.za> Message-ID: <1545212787.07.0.788709270274.issue18799@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 9e1c7ed9aaa4dea413f1b3ed92bb79cccb2f50eb by Miss Islington (bot) in branch '3.7': bpo-18799: Resurrect test_404 in test_xmlrpc. (GH-11196) https://github.com/python/cpython/commit/9e1c7ed9aaa4dea413f1b3ed92bb79cccb2f50eb ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 04:48:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 09:48:51 +0000 Subject: [issue18799] Resurrect and fix test_404 in Lib/test/test_xmlrpc.py In-Reply-To: <1377100643.52.0.970396135479.issue18799@psf.upfronthosting.co.za> Message-ID: <1545212931.89.0.788709270274.issue18799@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 Dec 19 05:02:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 10:02:07 +0000 Subject: [issue35441] Dead (and buggy) code due to mishandling of PyList_SetItem() errors In-Reply-To: <1544278622.71.0.788709270274.issue35441@psf.upfronthosting.co.za> Message-ID: <1545213727.79.0.788709270274.issue35441@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10468 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 05:02:38 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Wed, 19 Dec 2018 10:02:38 +0000 Subject: [issue35530] Counter-intuitive logging API In-Reply-To: <1545178149.93.0.788709270274.issue35530@psf.upfronthosting.co.za> Message-ID: <1545213758.22.0.788709270274.issue35530@psf.upfronthosting.co.za> Emmanuel Arias added the comment: > The call to logging.error() is irrelevant, since there's no expectation that the module-level function will necessarily output the same as a method of a specific instance logger.error(). That's true. Maybe and warning or Exception can be raise? > It looks like a bug to *me*, but I'm not a logging expert. I'm seeing the same behaviour in 3.5 and 3.7, but in 2.7.1 the first call to logger.error prints an error message: and 3.8? ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 05:03:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 10:03:34 +0000 Subject: [issue26415] Excessive peak memory consumption by the Python parser In-Reply-To: <1456182380.09.0.81920177296.issue26415@psf.upfronthosting.co.za> Message-ID: <1545213814.52.0.788709270274.issue26415@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 05:14:59 2018 From: report at bugs.python.org (Julien Palard) Date: Wed, 19 Dec 2018 10:14:59 +0000 Subject: [issue35472] python 3.7.2 rc1 bumped sphinx requirements a bit too much In-Reply-To: <1544632241.86.0.788709270274.issue35472@psf.upfronthosting.co.za> Message-ID: <1545214499.37.0.788709270274.issue35472@psf.upfronthosting.co.za> Julien Palard added the comment: New changeset a9ed8fcdbaeccdb82593525b170fb0544202eeda by Julien Palard in branch '3.7': bpo-35472: Doc: For Python 3.7 Sphinx 1.6.6 is enough. (GH-11192) https://github.com/python/cpython/commit/a9ed8fcdbaeccdb82593525b170fb0544202eeda ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 05:18:01 2018 From: report at bugs.python.org (Julien Palard) Date: Wed, 19 Dec 2018 10:18:01 +0000 Subject: [issue35472] python 3.7.2 rc1 bumped sphinx requirements a bit too much In-Reply-To: <1544632241.86.0.788709270274.issue35472@psf.upfronthosting.co.za> Message-ID: <1545214681.85.0.788709270274.issue35472@psf.upfronthosting.co.za> Julien Palard added the comment: Matthias, I downgraded the needs_sphinx to 1.6.6, as it does not disallow me to use an up-to-date sphinx in the doc server I'm ok with this. Hope it helps. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 05:30:21 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 19 Dec 2018 10:30:21 +0000 Subject: [issue35530] Counter-intuitive logging API In-Reply-To: <1545178149.93.0.788709270274.issue35530@psf.upfronthosting.co.za> Message-ID: <1545215421.77.0.788709270274.issue35530@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: The output is the same in 3.8. I think this is due to propagation to the root logger after logging.error call. When logger.error is called with no handler attached to it then root logger handler is called and root handler's format is used. The fix would be to do logger.propagate = False after logger initialization. In your code in first call for logger.error just prints the message, root handler is initialized during logging.error and thus the earlier call works fine but the next call to logger calls the root logger's handler. The fix in the reported case would be to add logger.propagate = False after calling logging.error. I think logging.error has does something to define root logger handler? Hopefully Vinay has a better explanation of this behavior. Sample code : import logging logging.basicConfig(format="root logger handler: %(message)s") logger = logging.getLogger(name='main') logger.setLevel(logging.INFO) logger1 = logging.getLogger(name='main1') logger1.setLevel(logging.INFO) ch = logging.StreamHandler() logger1_formatter = logging.Formatter('logger 1 handler : %(message)s') ch.setFormatter(logger1_formatter) logger1.addHandler(ch) logger.error('logger XXX') # calls root logger's handler logging.error('root logger XXX') # calls root logger's handler logger1.error('logger 1 XXX') # Calls ch and then root logger's handler logger1.propagate = False logger1.error('logger 1 XXX') # Calls only ch since propagation is set to False and root handler is not called Output on 3.8 : root logger handler: logger XXX root logger handler: root logger XXX logger 1 handler : logger 1 XXX root logger handler: logger 1 XXX logger 1 handler : logger 1 XXX ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 05:37:22 2018 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 19 Dec 2018 10:37:22 +0000 Subject: [issue35530] Counter-intuitive logging API In-Reply-To: <1545178149.93.0.788709270274.issue35530@psf.upfronthosting.co.za> Message-ID: <1545215842.65.0.788709270274.issue35530@psf.upfronthosting.co.za> Mark Dickinson added the comment: The call to `logging.error` is *not* irrelevant here. It's causing an implicit, and surprising (albeit documented), call to `logging.basicConfig`. https://bugs.python.org/issue34350 is essentially the same issue. That issue was closed as "not a bug", though I think a more appropriate resolution would have been "won't fix". In my mind, this is a design flaw in logging, and it's one that's caused my colleagues and me real-world pain on multiple occasions. There may be backwards compatibility constraints that make it impossible to fix this. I haven't looked into what would be needed. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 05:43:47 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 19 Dec 2018 10:43:47 +0000 Subject: [issue35530] Counter-intuitive logging API In-Reply-To: <1545213758.22.0.788709270274.issue35530@psf.upfronthosting.co.za> Message-ID: <20181219104341.GE13061@ando.pearwood.info> Steven D'Aprano added the comment: > That's true. Maybe and warning or Exception can be raise? Why would we raise a warning or exception for expected behaviour? logging.error() and some_instance.error() don't necessarily produce the same output. What would the exception say? FatalError: no error occurred *wink* > and 3.8? If you have 3.8 installed, feel free to test the code yourself and report what happens. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 05:48:18 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 19 Dec 2018 10:48:18 +0000 Subject: [issue34589] Py_Initialize() and Py_Main() should not enable C locale coercion In-Reply-To: <1536176195.07.0.56676864532.issue34589@psf.upfronthosting.co.za> Message-ID: <1545216498.74.0.788709270274.issue34589@psf.upfronthosting.co.za> Nick Coghlan added the comment: I still think the current Python 3.7 behaviour makes the CPython runtime a badly behaved C library, since we may end up changing the active libc locale even when it isn't the main application, and a change hasn't been explicitly requested by the embedding app. However, the only way to encounter that misbehaviour is to be running a Unicode-unfriendly embedding application that leaves the C locale in place on a Unicode-unfriendly operating system that doesn't set a more sensible locale in the first place. I've also gone through a few iterations on https://github.com/python/cpython/pull/9257 now, and respecting the -E and -I options *without* deferring locale coercion until the same point where UTF-8 mode is checked for turns out to require duplication of an irritatingly large amount of argument processing code (as even if all you're checking for is two options that don't take arguments, you still need to correctly skip over all the other permitted arguments, stop at the arguments that terminate the python option list, and find the options of interest even when they're in a combined option string like "-vI"). Accordingly, I no longer think it's worth pursuing this change purely to assuage my sense of responsibility to developers of applications embedding the Python runtime - instead, we can leave the Python 3.7.0 solution in place for 3.8 as well, until such time as we have embedding application authors actually reporting bug reports against the Python 3.7 behaviour. To be completely honest, I expect the odds of that actually happening in practice to be incredibly low, and even if it does happen, our answer may well be to point to the in-development multi-phase configuration API rather than allowing it to be disabled when using Py_Initialize() and/or Py_Main(). ---------- resolution: -> postponed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 05:48:39 2018 From: report at bugs.python.org (Jules Lasne) Date: Wed, 19 Dec 2018 10:48:39 +0000 Subject: [issue35524] using/windows launcher image might be deprecated In-Reply-To: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Message-ID: <1545216519.16.0.788709270274.issue35524@psf.upfronthosting.co.za> Jules Lasne added the comment: Here is the image, it should be the same size (by a few pixels). Oddly enough, I couldn't get the bottom part to unfold and I can't figure out why ---------- Added file: https://bugs.python.org/file48005/win_install_python.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 05:57:10 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 19 Dec 2018 10:57:10 +0000 Subject: [issue35530] Counter-intuitive logging API In-Reply-To: <1545215842.65.0.788709270274.issue35530@psf.upfronthosting.co.za> Message-ID: <20181219105705.GF13061@ando.pearwood.info> Steven D'Aprano added the comment: On Wed, Dec 19, 2018 at 10:37:22AM +0000, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > The call to `logging.error` is *not* irrelevant here. It's causing an > implicit, and surprising (albeit documented), call to > `logging.basicConfig`. Ah, thanks. And of course the documentation you refer to is right there in the paragraph above the one I linked to earlier, and I completely missed it. Ouch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 06:11:18 2018 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 19 Dec 2018 11:11:18 +0000 Subject: [issue35530] Counter-intuitive logging API In-Reply-To: <1545178149.93.0.788709270274.issue35530@psf.upfronthosting.co.za> Message-ID: <1545217878.42.0.788709270274.issue35530@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I completely missed it. You're not alone. Authors of many of the libraries that we work with on a day-to-day basis missed it, too. And that results in logging being accidentally configured as a side-effect halfway through a long test run, when one of those libraries happens to be imported. That it turn leads to heisenbug-like test failures (e.g., tests that fail locally but pass on Travis CI or Appveyor, or vice versa, just because one test accidentally configures logging, another test checks for particular logged messages, and unittest happened to run the tests in different orders in different setups). This is a real problem for Enthought, where we write large, well-tested (our test suites commonly include thousands of tests) applications. In those circumstances, test interactions (tests that fail after some other test has been run, but don't fail when run standalone) are one of the biggest sources of pain. Vinay claims in the #34350 discussion that: > that's just like any other bug introduced because of a typo. It would presumably get caught in testing. This isn't true in practice. The "bug" here is accidental configuration of logging by a library (possibly by one's own code, possibly by a third-party library that's being sued directly or indirectly). And unless you know about this possibility in advance, you're not going to test for it. If it does get caught in testing, it's in the form of the unpleasant test interactions described above. I've witnessed various third-party libraries configuring logging accidentally and not realising it; it doesn't tend to cause problems for the library directly - it causes problems for the downstream users of those libraries. If this behaviour can't be changed for backwards compatibility reasons, then so be it. But I think it would be disingenuous to claim it's not a design flaw. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 06:32:48 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Wed, 19 Dec 2018 11:32:48 +0000 Subject: [issue35530] Counter-intuitive logging API In-Reply-To: <1545178149.93.0.788709270274.issue35530@psf.upfronthosting.co.za> Message-ID: <1545219168.45.0.788709270274.issue35530@psf.upfronthosting.co.za> Emmanuel Arias added the comment: > What would the exception say? > > FatalError: no error occurred haha, I mean a message that tell you something to avoid have some weird behave (like here). :-) > If you have 3.8 installed, feel free to test the code yourself and report what happens. Ok! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 06:47:10 2018 From: report at bugs.python.org (Philip Rowlands) Date: Wed, 19 Dec 2018 11:47:10 +0000 Subject: [issue35533] argparse standard error usage for exit / error Message-ID: <1545220030.92.0.788709270274.issue35533@psf.upfronthosting.co.za> New submission from Philip Rowlands : Because error() mentions standard error and exit() does not, I assumed exit() did not use stderr, but it does. Please mention standard error in the description of exit(). Relevant code at: https://github.com/python/cpython/blob/3.7/Lib/argparse.py#L2482 ---------- assignee: docs at python components: Documentation messages: 332128 nosy: docs at python, philiprowlands priority: normal severity: normal status: open title: argparse standard error usage for exit / error type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 06:53:03 2018 From: report at bugs.python.org (Marcin Gozdalik) Date: Wed, 19 Dec 2018 11:53:03 +0000 Subject: [issue35534] SIGSEGV in stackdepth_walk Message-ID: <1545220383.87.0.788709270274.issue35534@psf.upfronthosting.co.za> New submission from Marcin Gozdalik : When running /usr/bin/python /usr/bin/pip install --upgrade "pip < 10" the interpreter crashed in stackdepth_walk. I've seen this crash multiple times, especially in our custom-compiled CPythons. Here it's reproduced with stock Ubuntu Xenial Python. It looks like it happens much more often on AMD Ryzens although it happens also on Intel CPUs. The Ryzen is otherwise stable. Sys details: Python 2.7.12 (default, Nov 12 2018, 14:36:49) [GCC 5.4.0 20160609] on linux2 Package python-minimal 2.7.12-1~16.04 from Ubuntu Xenial ---------- components: Interpreter Core files: core.pip.8270.1545144472.xz messages: 332129 nosy: gozdal priority: normal severity: normal status: open title: SIGSEGV in stackdepth_walk type: crash versions: Python 2.7, Python 3.6 Added file: https://bugs.python.org/file48006/core.pip.8270.1545144472.xz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 06:55:39 2018 From: report at bugs.python.org (Marcin Gozdalik) Date: Wed, 19 Dec 2018 11:55:39 +0000 Subject: [issue35534] SIGSEGV in stackdepth_walk In-Reply-To: <1545220383.87.0.788709270274.issue35534@psf.upfronthosting.co.za> Message-ID: <1545220539.15.0.788709270274.issue35534@psf.upfronthosting.co.za> Marcin Gozdalik added the comment: #0 0x00000000004f4af3 in stackdepth_walk (maxdepth=5, depth=3, b=, c=) at ../Python/compile.c:3436 #1 stackdepth_walk (maxdepth=, depth=0, b=, c=0x7fff4f5b84f0) at ../Python/compile.c:3456 #2 stackdepth (c=0x7fff4f5b84f0) at ../Python/compile.c:3486 #3 makecode.isra.19 (c=0x7fff4f5b84f0) at ../Python/compile.c:3854 #4 assemble.lto_priv () at ../Python/compile.c:3960 #5 0x00000000004e31ad in compiler_mod (mod=0x10456d8, c=0x7fff4f5b84f0) at ../Python/compile.c:1212 #6 PyAST_Compile () at ../Python/compile.c:292 #7 0x000000000051e6b0 in Py_CompileStringFlags ( str=0x11c9e54 "try:\n from urllib.parse import urljoin\nexcept ImportError:\n from urlparse import urljoin\n\n\ntry:\n import cPickle as pickle\nexcept ImportError:\n import pickle\n\n\n# Handle the case where the r"..., filename=filename at entry=0x7f42be6fb054 "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/compat.py", start=start at entry=257, flags=flags at entry=0x0) at ../Python/pythonrun.c:1433 #8 0x000000000051c924 in compile_source ( source='try:\n from urllib.parse import urljoin\nexcept ImportError:\n from urlparse import urljoin\n\n\ntry:\n import cPickle as pickle\nexcept ImportError:\n import pickle\n\n\n# Handle the case where the requests module has been patched to not have\n# urllib3 bundled as part of its source.\ntry:\n from requests.packages.urllib3.response import HTTPResponse\nexcept ImportError:\n from urllib3.response import HTTPResponse\n\ntry:\n from requests.packages.urllib3.util import is_fp_closed\nexcept ImportError:\n from urllib3.util import is_fp_closed\n', pathname=0x7f42be6fb054 "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/compat.py") at ../Modules/zipimport.c:1148 #9 get_code_from_data.isra.2 ( toc_entry=('/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/compat.py', 8, 216, 548, 7375, 42352, 18741, 1691478637), mtime=, isbytecode=0) at ../Modules/zipimport.c:1222 #10 get_module_code.lto_priv () at ../Modules/zipimport.c:1263 #11 0x0000000000532b72 in zipimporter_load_module.lto_priv () at ../Modules/zipimport.c:320 #12 0x00000000004a587e in PyObject_Call () at ../Objects/abstract.c:2546 #13 0x00000000004cdd9d in call_function_tail (args=('pip._vendor.cachecontrol.compat',), callable=) at ../Objects/abstract.c:2578 #14 PyObject_CallMethod () at ../Objects/abstract.c:2653 #15 0x00000000004a4be1 in import_submodule.lto_priv () at ../Python/import.c:2722 #16 0x00000000004a42d9 in load_next (p_buflen=, buf=0x1042cf0 "pip._vendor.cachecontrol.compat", p_name=, altmod=, mod=) at ../Python/import.c:2537 #17 import_module_level.isra.3 (level=0, fromlist=('HTTPResponse', 'pickle'), globals=, name=) at ../Python/import.c:2246 #18 PyImport_ImportModuleLevel () at ../Python/import.c:2310 #19 0x00000000004a5ae4 in builtin___import__ () at ../Python/bltinmodule.c:49 #20 0x00000000004a587e in PyObject_Call () at ../Objects/abstract.c:2546 #21 0x00000000004c5ef0 in PyEval_CallObjectWithKeywords () at ../Python/ceval.c:4219 #22 0x00000000004bec4b in PyEval_EvalFrameEx () at ../Python/ceval.c:2622 #23 0x00000000004b9b66 in PyEval_EvalCodeEx () at ../Python/ceval.c:3582 #24 0x00000000004b9856 in PyEval_EvalCode (co=, globals=, locals=) at ../Python/ceval.c:669 #25 0x00000000004b978f in PyImport_ExecCodeModuleEx () at ../Python/import.c:731 #26 0x0000000000532bd0 in zipimporter_load_module.lto_priv () at ../Modules/zipimport.c:360 #27 0x00000000004a587e in PyObject_Call () at ../Objects/abstract.c:2546 #28 0x00000000004cdd9d in call_function_tail (args=('pip._vendor.cachecontrol.serialize',), callable=) at ../Objects/abstract.c:2578 #29 PyObject_CallMethod () at ../Objects/abstract.c:2653 #30 0x00000000004a4be1 in import_submodule.lto_priv () at ../Python/import.c:2722 #31 0x00000000004a42d9 in load_next (p_buflen=, buf=0x1040cd0 "pip._vendor.cachecontrol.serialize", p_name=, altmod=, mod=) at ../Python/import.c:2537 #32 import_module_level.isra.3 (level=0, fromlist=('Serializer',), globals=, name=) at ../Python/import.c:2246 #33 PyImport_ImportModuleLevel () at ../Python/import.c:2310 #34 0x00000000004a5ae4 in builtin___import__ () at ../Python/bltinmodule.c:49 #35 0x00000000004a587e in PyObject_Call () at ../Objects/abstract.c:2546 #36 0x00000000004c5ef0 in PyEval_CallObjectWithKeywords () at ../Python/ceval.c:4219 #37 0x00000000004bec4b in PyEval_EvalFrameEx () at ../Python/ceval.c:2622 #38 0x00000000004b9b66 in PyEval_EvalCodeEx () at ../Python/ceval.c:3582 #39 0x00000000004b9856 in PyEval_EvalCode (co=, globals=, locals=) at ../Python/ceval.c:669 #40 0x00000000004b978f in PyImport_ExecCodeModuleEx () at ../Python/import.c:731 #41 0x0000000000532bd0 in zipimporter_load_module.lto_priv () at ../Modules/zipimport.c:360 #42 0x00000000004a587e in PyObject_Call () at ../Objects/abstract.c:2546 #43 0x00000000004cdd9d in call_function_tail (args=('pip._vendor.cachecontrol.controller',), callable=) at ../Objects/abstract.c:2578 #44 PyObject_CallMethod () at ../Objects/abstract.c:2653 #45 0x00000000004a4be1 in import_submodule.lto_priv () at ../Python/import.c:2722 #46 0x00000000004a42d9 in load_next (p_buflen=, buf=0x105edb0 "pip._vendor.cachecontrol.controller", p_name=, altmod=, mod=) at ../Python/import.c:2537 #47 import_module_level.isra.3 (level=0, fromlist=('CacheController',), globals=, name=) at ../Python/import.c:2246 #48 PyImport_ImportModuleLevel () at ../Python/import.c:2310 #49 0x00000000004a5ae4 in builtin___import__ () at ../Python/bltinmodule.c:49 #50 0x00000000004a587e in PyObject_Call () at ../Objects/abstract.c:2546 #51 0x00000000004c5ef0 in PyEval_CallObjectWithKeywords () at ../Python/ceval.c:4219 #52 0x00000000004bec4b in PyEval_EvalFrameEx () at ../Python/ceval.c:2622 #53 0x00000000004b9b66 in PyEval_EvalCodeEx () at ../Python/ceval.c:3582 #54 0x00000000004b9856 in PyEval_EvalCode (co=, globals=, locals=) at ../Python/ceval.c:669 #55 0x00000000004b978f in PyImport_ExecCodeModuleEx () at ../Python/import.c:731 #56 0x0000000000532bd0 in zipimporter_load_module.lto_priv () at ../Modules/zipimport.c:360 #57 0x00000000004a587e in PyObject_Call () at ../Objects/abstract.c:2546 #58 0x00000000004cdd9d in call_function_tail (args=('pip._vendor.cachecontrol.caches.file_cache',), callable=) at ../Objects/abstract.c:2578 #59 PyObject_CallMethod () at ../Objects/abstract.c:2653 #60 0x00000000004a4be1 in import_submodule.lto_priv () at ../Python/import.c:2722 #61 0x00000000004a42d9 in load_next (p_buflen=, buf=0x11addf0 "pip._vendor.cachecontrol.caches.file_cache", p_name=, altmod=, mod=) at ../Python/import.c:2537 #62 import_module_level.isra.3 (level=0, fromlist=('FileCache',), globals=, name=) at ../Python/import.c:2246 #63 PyImport_ImportModuleLevel () at ../Python/import.c:2310 #64 0x00000000004a5ae4 in builtin___import__ () at ../Python/bltinmodule.c:49 #65 0x00000000004a587e in PyObject_Call () at ../Objects/abstract.c:2546 #66 0x00000000004c5ef0 in PyEval_CallObjectWithKeywords () at ../Python/ceval.c:4219 #67 0x00000000004bec4b in PyEval_EvalFrameEx () at ../Python/ceval.c:2622 #68 0x00000000004b9b66 in PyEval_EvalCodeEx () at ../Python/ceval.c:3582 #69 0x00000000004b9856 in PyEval_EvalCode (co=, globals=, locals=) at ../Python/ceval.c:669 #70 0x00000000004b978f in PyImport_ExecCodeModuleEx () at ../Python/import.c:731 #71 0x0000000000532bd0 in zipimporter_load_module.lto_priv () at ../Modules/zipimport.c:360 #72 0x00000000004a587e in PyObject_Call () at ../Objects/abstract.c:2546 #73 0x00000000004cdd9d in call_function_tail (args=('pip._vendor.cachecontrol.caches',), callable=) at ../Objects/abstract.c:2578 #74 PyObject_CallMethod () at ../Objects/abstract.c:2653 #75 0x00000000004a4be1 in import_submodule.lto_priv () at ../Python/import.c:2722 #76 0x00000000004a4667 in load_next (p_buflen=, buf=, p_name=, altmod=, mod=) at ../Python/import.c:2537 #77 import_module_level.isra.3 (level=0, fromlist=('FileCache',), globals=, name=) at ../Python/import.c:2254 #78 PyImport_ImportModuleLevel () at ../Python/import.c:2310 #79 0x00000000004a5ae4 in builtin___import__ () at ../Python/bltinmodule.c:49 #80 0x00000000004a587e in PyObject_Call () at ../Objects/abstract.c:2546 #81 0x00000000004c5ef0 in PyEval_CallObjectWithKeywords () at ../Python/ceval.c:4219 #82 0x00000000004bec4b in PyEval_EvalFrameEx () at ../Python/ceval.c:2622 #83 0x00000000004b9b66 in PyEval_EvalCodeEx () at ../Python/ceval.c:3582 #84 0x00000000004b9856 in PyEval_EvalCode (co=, globals=, locals=) at ../Python/ceval.c:669 #85 0x00000000004b978f in PyImport_ExecCodeModuleEx () at ../Python/import.c:731 #86 0x00000000004b2bc6 in load_source_module.lto_priv () at ../Python/import.c:1121 #87 0x00000000004a4be1 in import_submodule.lto_priv () at ../Python/import.c:2722 #88 0x00000000004a4667 in load_next (p_buflen=, buf=, p_name=, altmod=, mod=) at ../Python/import.c:2537 #89 import_module_level.isra.3 (level=0, fromlist=('path_to_url',), globals=, name=) at ../Python/import.c:2254 #90 PyImport_ImportModuleLevel () at ../Python/import.c:2310 #91 0x00000000004a5ae4 in builtin___import__ () at ../Python/bltinmodule.c:49 #92 0x00000000004a587e in PyObject_Call () at ../Objects/abstract.c:2546 #93 0x00000000004c5ef0 in PyEval_CallObjectWithKeywords () at ../Python/ceval.c:4219 #94 0x00000000004bec4b in PyEval_EvalFrameEx () at ../Python/ceval.c:2622 #95 0x00000000004b9b66 in PyEval_EvalCodeEx () at ../Python/ceval.c:3582 #96 0x00000000004b9856 in PyEval_EvalCode (co=, globals=, locals=) at ../Python/ceval.c:669 #97 0x00000000004b978f in PyImport_ExecCodeModuleEx () at ../Python/import.c:731 #98 0x00000000004b2bc6 in load_source_module.lto_priv () at ../Python/import.c:1121 #99 0x00000000004a4be1 in import_submodule.lto_priv () at ../Python/import.c:2722 #100 0x00000000004a80e5 in ensure_fromlist.lto_priv () at ../Python/import.c:2628 #101 0x00000000004a4028 in import_module_level.isra.3 (level=0, fromlist=('git', 'mercurial', 'subversion', 'bazaar'), globals=, name=) at ../Python/import.c:2291 #102 PyImport_ImportModuleLevel () at ../Python/import.c:2310 #103 0x00000000004a5ae4 in builtin___import__ () at ../Python/bltinmodule.c:49 #104 0x00000000004a587e in PyObject_Call () at ../Objects/abstract.c:2546 #105 0x00000000004c5ef0 in PyEval_CallObjectWithKeywords () at ../Python/ceval.c:4219 #106 0x00000000004bec4b in PyEval_EvalFrameEx () at ../Python/ceval.c:2622 #107 0x00000000004b9b66 in PyEval_EvalCodeEx () at ../Python/ceval.c:3582 #108 0x00000000004b9856 in PyEval_EvalCode (co=, globals=, locals=) at ../Python/ceval.c:669 #109 0x00000000004b978f in PyImport_ExecCodeModuleEx () at ../Python/import.c:731 #110 0x00000000004b2bc6 in load_source_module.lto_priv () at ../Python/import.c:1121 #111 0x00000000004b40ec in load_package.lto_priv () at ../Python/import.c:1188 #112 0x00000000004a4be1 in import_submodule.lto_priv () at ../Python/import.c:2722 #113 0x00000000004a3f74 in load_next (p_buflen=, buf=0xcb6610 "pip", p_name=, altmod=, mod=) at ../Python/import.c:2537 #114 import_module_level.isra.3 (level=-1, fromlist=('main',), globals=, name=0x0) at ../Python/import.c:2246 #115 PyImport_ImportModuleLevel () at ../Python/import.c:2310 #116 0x00000000004a5ae4 in builtin___import__ () at ../Python/bltinmodule.c:49 #117 0x00000000004a587e in PyObject_Call () at ../Objects/abstract.c:2546 #118 0x00000000004c5ef0 in PyEval_CallObjectWithKeywords () at ../Python/ceval.c:4219 #119 0x00000000004bec4b in PyEval_EvalFrameEx () at ../Python/ceval.c:2622 #120 0x00000000004b9b66 in PyEval_EvalCodeEx () at ../Python/ceval.c:3582 #121 0x00000000004eb69f in PyEval_EvalCode ( locals={'__builtins__': , '__file__': '/usr/bin/pip', '__package__': None, 'sys': , '__name__': '__main__', '__doc__': None}, globals={'__builtins__': , '__file__': '/usr/bin/pip', '__package__': None, 'sys': , '__name__': '__main__', '__doc__': None}, co=0x7f42c028d8b0) at ../Python/ceval.c:669 #122 run_mod.lto_priv () at ../Python/pythonrun.c:1376 #123 0x00000000004e58f2 in PyRun_FileExFlags () at ../Python/pythonrun.c:1362 #124 0x00000000004e41a6 in PyRun_SimpleFileExFlags () at ../Python/pythonrun.c:948 #125 0x00000000004938ce in Py_Main () at ../Modules/main.c:640 #126 0x00007f42bfbb7830 in __libc_start_main (main=0x493370
, argc=5, argv=0x7fff4f5bc368, init=, fini=, rtld_fini=, stack_end=0x7fff4f5bc358) at ../csu/libc-start.c:291 #127 0x0000000000493299 in _start () ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 06:59:55 2018 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 19 Dec 2018 11:59:55 +0000 Subject: [issue35497] Libary select docs enhance In-Reply-To: <1544804352.43.0.788709270274.issue35497@psf.upfronthosting.co.za> Message-ID: <1545220795.87.0.788709270274.issue35497@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 92330c0b6d6c253c41a133cc50caea4853c7e311 by Xiang Zhang (Manjusaka) in branch 'master': bpo-35497: add versionadded tag for EPOLLEXCLUSIVE (GH-11162) https://github.com/python/cpython/commit/92330c0b6d6c253c41a133cc50caea4853c7e311 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 07:00:04 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 19 Dec 2018 12:00:04 +0000 Subject: [issue35497] Libary select docs enhance In-Reply-To: <1544804352.43.0.788709270274.issue35497@psf.upfronthosting.co.za> Message-ID: <1545220804.1.0.788709270274.issue35497@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10469 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 07:01:33 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 19 Dec 2018 12:01:33 +0000 Subject: [issue35530] Counter-intuitive logging API In-Reply-To: <1545178149.93.0.788709270274.issue35530@psf.upfronthosting.co.za> Message-ID: <1545220893.83.0.788709270274.issue35530@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: > If you have 3.8 installed, feel free to test the code yourself and report what happens. I tested it on master and it's the same as per the original report. ? cpython git:(master) cat ../backups/bpo35530_1.py import logging logger = logging.getLogger(name='main') logger.setLevel(logging.INFO) logger.error('XXX') logging.error('ZZZ') logger.error('XXX') ? cpython git:(master) ./python.exe Python 3.8.0a0 (heads/master:1dd035954b, Dec 18 2018, 10:12:34) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> ^D ? cpython git:(master) ./python.exe ../backups/bpo35530_1.py XXX ERROR:root:ZZZ ERROR:main:XXX root is parent for all logger objects created down the inheritance chain. When there is no root handler for logger then it resorts to lastResort handler (As per name called on last resort when there is no handler even for root) whose format is "%(message)s". Calling logging.error sets the root's handler (like doing logging.basicConfig). When there is a root with handler then subsequent logger calls the root's handler but lastResort is not called since it has found the root handler. I agree with Mark that this could affect downstream and is very hard to debug when libraries have wrong configuration. import logging logger = logging.getLogger(name='main') logger.setLevel(logging.INFO) logger.error('XXX') print("logger parent ", logger.parent) # Root is always the parent by default print("logger parent handlers ", logger.parent.handlers) # No root handler since root is not configured which logging error does below print("logger handler ", logger.handlers) # Empty and no parent (root) handler so calls lastResort logging.error('ZZZ') # Sets the root handler print("logger parent after logging ", logger.parent) # Root is parent print("logger parent handlers after logging ", logger.parent.handlers) # Root handler is set print("logger handler after logging ", logger.handlers) # Empty but has parent (root) handler so lastResort is not called logger.error('XXX') Output : XXX logger parent logger parent handlers [] logger handler [] ERROR:root:ZZZ logger parent after logging logger parent handlers after logging [ (NOTSET)>] logger handler after logging [] ERROR:main:XXX ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 07:05:52 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 19 Dec 2018 12:05:52 +0000 Subject: [issue35497] Libary select docs enhance In-Reply-To: <1544804352.43.0.788709270274.issue35497@psf.upfronthosting.co.za> Message-ID: <1545221152.27.0.788709270274.issue35497@psf.upfronthosting.co.za> miss-islington added the comment: New changeset a11d44056e4f9b64d28efec295e1c1c45d4cb9e1 by Miss Islington (bot) in branch '3.7': bpo-35497: add versionadded tag for EPOLLEXCLUSIVE (GH-11162) https://github.com/python/cpython/commit/a11d44056e4f9b64d28efec295e1c1c45d4cb9e1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 07:06:44 2018 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 19 Dec 2018 12:06:44 +0000 Subject: [issue35497] Libary select docs enhance In-Reply-To: <1544804352.43.0.788709270274.issue35497@psf.upfronthosting.co.za> Message-ID: <1545221204.83.0.788709270274.issue35497@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 07:21:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Dec 2018 12:21:49 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1545222109.33.0.788709270274.issue35499@psf.upfronthosting.co.za> STINNER Victor added the comment: > (...) things like PGO often require flags that the linker sees in order to generate the instrumented binary. If those are left off of the link step, you won't have an instrumented binary and won't generate profile data. Oh, I didn't try my PR... $ ./configure --enable-optimizations $ make ... /usr/bin/ld: libpython3.8m.a(myreadline.o):(.data+0xa0): undefined reference to `__gcov_merge_add' ... My PR simply doesn't work: we have to pass PGO flags to the linker. At least for the first step generating a profile. My bad, sorry, I close my PR 11219. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 07:22:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Dec 2018 12:22:20 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1545222140.29.0.788709270274.issue35499@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 Wed Dec 19 07:54:20 2018 From: report at bugs.python.org (Paul Keating) Date: Wed, 19 Dec 2018 12:54:20 +0000 Subject: [issue35535] time.strptime() unexpectedly gives the same result for %U and %W for 2018 Message-ID: <1545224060.23.0.788709270274.issue35535@psf.upfronthosting.co.za> New submission from Paul Keating : This was originally reported on StackOverflow (53829118) and I believe the poster has found a genuine issue. He reported a problem converting from Python 2.3 to Python 2.7 in which strptime() produced a different result for %U in the two versions. For lack of an old enough copy of Python, I can not reproduce the Python 2.3 result, which he reports as follows: Python 2.3.4 ------------ >>> dw='51 0 18' # 51 week number, 0 for Sunday and 18 for year 2018 >>> date=time.strptime(dw,"%U %w %y") >>> print date (2018, 12, 16, 0, 0, 0, 6, 350, -1) # 2018 12 16 [Remark: This output looks like Python 2.1 to me, but the issue is not the datatype of the result but the value of the result.] Python 2.7.5 ------------ >>> dw='51 0 18' # 51 week number, 0 for Sunday and 18 for year 2018 >>> date=time.strptime(dw,"%U %w %y") >>> print date time.struct_time(tm_year=2018, tm_mon=12, tm_mday=23, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=6, tm_yday=357, tm_isdst=-1) The point here is that the day of the month has shifted from 16 December to 23 December, and I believe that 16 December is correct. In ISO week numbers, week 51 in 2018 runs from Monday 17 to Sunday 23 December. So the Python 2.7.5 result is correct for ISO week numbers. Only, ISO week numbers are provided by directive %W. %U is supposed to work with the week numbering system common (as I understand it) in North America, where (according to Wikipedia) week 1 begins on a Sunday, and contains both 1 January and the first Saturday of the year. While I am not familiar with that system, Excel 2016 is, and it reports =WEEKNUM(DATE(2018,12,16)) as 51 =ISOWEEKNUM(DATE(2018,12,16)) as 50 But if I do the following in Python (2.6, 2.7 or 3.5) I get the week numbers reported as the same: >>> dw='51 0 18' # 51 week number, 0 for Sunday and 18 for year 2018 >>> time.strptime(dw,"%U %w %y") == time.strptime(dw,"%W %w %y") True [Should be False] So directives %U and %W are producing the equal results for this date, and further checking shows that the same unexpected equality appears for all Sundays in 2018. And I get the same unexpected equality for the Sunday of the 51st week of years 2063, 2057, 2052, 2046, 2035, 2027, 2007, 2001. It looks to recur when 1 January of a given year is a Monday. Now, it may be going too far to say that Excel is right and the Python standard library is wrong. It is clear that the algorithms are just systematically different. On the other hand, it appears that Python 2.3 did it the way that Excel does, and that raises the question of why Python does it differently now. A bit of searching reveals that people who complain that Excel's WEEKNUM function is wrong are generally just unaware that there are competing systems. So this difference is not in the same category as Excel's numbering of days before 1 March 1900. ---------- components: Library (Lib) messages: 332135 nosy: Paul Keating priority: normal severity: normal status: open title: time.strptime() unexpectedly gives the same result for %U and %W for 2018 type: behavior versions: Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 08:15:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 13:15:41 +0000 Subject: [issue29707] os.path.ismount() always returns false for mount --bind on same filesystem In-Reply-To: <1488524974.65.0.103028894103.issue29707@psf.upfronthosting.co.za> Message-ID: <1545225341.62.0.788709270274.issue29707@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10470 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 08:18:49 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Wed, 19 Dec 2018 13:18:49 +0000 Subject: [issue35302] create_connection with local_addr misses valid socket bindings In-Reply-To: <1542997853.2.0.788709270274.issue35302@psf.upfronthosting.co.za> Message-ID: <1545225529.2.0.788709270274.issue35302@psf.upfronthosting.co.za> twisteroid ambassador added the comment: IMO macOS is at fault here, for even allowing an IPv6 socket to bind to an IPv4 address. ;-) I have given some thought about this issue when writing my happy eyeballs library. My current solution is closest to Neil's first suggestion, i.e. each pair of remote addrinfo and local addrinfo is tried in a connection attempt. ---------- nosy: +twisteroid ambassador _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 08:19:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 13:19:16 +0000 Subject: [issue29707] os.path.ismount() always returns false for mount --bind on same filesystem In-Reply-To: <1488524974.65.0.103028894103.issue29707@psf.upfronthosting.co.za> Message-ID: <1545225556.31.0.788709270274.issue29707@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I am not sure that we need to change ismount(), but its behavior should be documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 08:34:28 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Wed, 19 Dec 2018 13:34:28 +0000 Subject: [issue35302] create_connection with local_addr misses valid socket bindings In-Reply-To: <1542997853.2.0.788709270274.issue35302@psf.upfronthosting.co.za> Message-ID: <1545226468.89.0.788709270274.issue35302@psf.upfronthosting.co.za> Change by twisteroid ambassador : ---------- keywords: +patch pull_requests: +10471 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 08:38:26 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 19 Dec 2018 13:38:26 +0000 Subject: [issue15626] unittest.main negates -bb option and programmatic warning configuration In-Reply-To: <1344730376.57.0.519562827761.issue15626@psf.upfronthosting.co.za> Message-ID: <1545226706.38.0.788709270274.issue15626@psf.upfronthosting.co.za> Nick Coghlan added the comment: Aye, the relevant change here would be the fact that -b and -bb now modify sys.warnoptions, rather than the warnings module being aware of those command line options specifically: https://docs.python.org/3/whatsnew/3.7.html#warnings As a result, unittest.main will see a non-empty sys.warnoptions in 3.7+ when -bb is passed. That means most of Ben's original request has been implemented, with the one remaining aspect being the request for an officially documented and supported way to tell unittest.main to leave the warnings filters alone (regardless of the value of sys.warnoptions) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 08:52:49 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 19 Dec 2018 13:52:49 +0000 Subject: [issue35486] subprocess module import hooks breaks back compatibility In-Reply-To: <1544742855.44.0.788709270274.issue35486@psf.upfronthosting.co.za> Message-ID: <1545227569.28.0.788709270274.issue35486@psf.upfronthosting.co.za> Nick Coghlan added the comment: The two errors mean different things: ModuleNotFoundError means literally that the module could not be found at all (i.e. no import hook offered to try to load it) A plain ImportError then means that the module was located, but attempting to actually load it failed. find_spec()/find_loader()/find_module() implementations on import plugins shouldn't be raising exceptions for modules they don't offer, and hence shouldn't be needing to raise ModuleNotFoundError directly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 08:55:10 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 19 Dec 2018 13:55:10 +0000 Subject: [issue35486] subprocess module import hooks breaks back compatibility In-Reply-To: <1544742855.44.0.788709270274.issue35486@psf.upfronthosting.co.za> Message-ID: <1545227710.91.0.788709270274.issue35486@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note that the above distinction is also the rationale for introducing the new subtype: so that it's easy to tell the difference between "that module was not found at all" (ModuleNotFoundError) and "the module was found, but attempting to actually load it failed" (other cases of ImportError) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 09:01:24 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 19 Dec 2018 14:01:24 +0000 Subject: [issue35524] using/windows launcher image might be deprecated In-Reply-To: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Message-ID: <1545228084.39.0.788709270274.issue35524@psf.upfronthosting.co.za> Steve Dower added the comment: It looks like display scaling, which you'll need to disable for this. The UI for the installer is slightly aware of scaling, but not enough to resize multiline elements automatically. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 09:11:26 2018 From: report at bugs.python.org (Jules Lasne) Date: Wed, 19 Dec 2018 14:11:26 +0000 Subject: [issue35524] using/windows launcher image might be deprecated In-Reply-To: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Message-ID: <1545228686.65.0.788709270274.issue35524@psf.upfronthosting.co.za> Jules Lasne added the comment: Here it is again, with display scaling disabled ! :) ---------- Added file: https://bugs.python.org/file48007/Screenshot_2.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 09:48:47 2018 From: report at bugs.python.org (Julian Sivertsen) Date: Wed, 19 Dec 2018 14:48:47 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1545230927.85.0.788709270274.issue34160@psf.upfronthosting.co.za> Julian Sivertsen added the comment: I don't understand why this library should go out of its way to support the old behavior when it seems like the only thing it breaks is tests that assume something that was never guaranteed and where you can get the old behavior in just two lines of Python: for node in root.iter(): node.attrib = dict(sorted(node.items())) Kind regards from confused Pythoner that just wonted the attribute order to make sense ---------- nosy: +sivert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 09:54:21 2018 From: report at bugs.python.org (=?utf-8?b?0J3QuNC60LjRgtCwINCh0LjRgNCz0LjQtdC90LrQvg==?=) Date: Wed, 19 Dec 2018 14:54:21 +0000 Subject: [issue35536] Calling built-in locals() and globals() in C++ leads to SystemError Message-ID: <1545231260.91.0.788709270274.issue35536@psf.upfronthosting.co.za> New submission from ?????? ????????? : System: Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic Arch: x86_64 Compilier: g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0 Python versions: Python 3.6.7-1 Python 2.7.15rc1 Description: This C++ code: PyObject* pBuiltin = PyImport_ImportModule("builtins"); PyObject* py_globals_fun = PyObject_GetAttrString(pBuiltin,"locals"); PyObject* globals = PyObject_CallObject(py_globals_fun, NULL); produces "SystemError: frame does not exist". For function "globals" output is "SystemError: returned NULL without setting an error". For python2 this code produces similar errors (descriptions of error little different). Another functions with arguments, like "abs", works fine. And calling function with optional argument, like "int", "float" works with this code (with null parameter) without problem. ---------- components: Library (Lib) messages: 332144 nosy: ?????? ????????? priority: normal severity: normal status: open title: Calling built-in locals() and globals() in C++ leads to SystemError type: behavior versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 10:11:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 15:11:06 +0000 Subject: [issue35441] Dead (and buggy) code due to mishandling of PyList_SetItem() errors In-Reply-To: <1544278622.71.0.788709270274.issue35441@psf.upfronthosting.co.za> Message-ID: <1545232266.27.0.788709270274.issue35441@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 89b5ea297d67f5efeb8fca0b63fa3d9f7030b2f0 by Serhiy Storchaka in branch '2.7': [2.7] bpo-35441: Remove dead and buggy code related to PyList_SetItem(). (GH-11033) (GH-11234) https://github.com/python/cpython/commit/89b5ea297d67f5efeb8fca0b63fa3d9f7030b2f0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 10:33:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 15:33:52 +0000 Subject: [issue35441] Dead (and buggy) code due to mishandling of PyList_SetItem() errors In-Reply-To: <1544278622.71.0.788709270274.issue35441@psf.upfronthosting.co.za> Message-ID: <1545233632.44.0.788709270274.issue35441@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 Dec 19 10:50:48 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 19 Dec 2018 15:50:48 +0000 Subject: [issue35535] time.strptime() unexpectedly gives the same result for %U and %W for 2018 In-Reply-To: <1545224060.23.0.788709270274.issue35535@psf.upfronthosting.co.za> Message-ID: <1545234648.09.0.788709270274.issue35535@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: The results from ruby are the same as Python master as a data point. From the docs %U - Week number of the year (Sunday as the first day of the week) as a zero padded decimal number. All days in a new year preceding the first Sunday are considered to be in week 0. %W - Week number of the year (Monday as the first day of the week) as a decimal number. All days in a new year preceding the first Monday are considered to be in week 0. %w - Weekday as a decimal number, where 0 is Sunday and 6 is Saturday. So with 51 (%U) strptime is returning week number 51 of the year (51st sunday, 23/12/2018) with Sunday as the first day of the week and with %w (first weekday with 0 as Sunday) as 0 it returns 23/12/2018 which is the first sunday. With 51 (%W) strptime is returning week number 51 of the year with Monday (51st Monday, 17/12/2018) as the first day of the week (2018 starts with Monday) and hence with %w as 0 it returns the next sunday (23/12/2018) as first weekday (sunday). Where it goes little counter-intuitive is time.strptime('51 1 2018',"%W %w %Y") returns 17/12/2018, Monday of the 51st monday as week number that returns the 17/12/2018 but time.strptime('51 0 2018',"%W %w %Y") returns 23/12/2018 so first weekday is higher than the second weekday. CPython master $ ./python.exe Python 3.8.0a0 (heads/master:1dd035954b, Dec 18 2018, 10:12:34) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> dw='51 0 18' >>> time.strptime(dw,"%U %w %y") time.struct_time(tm_year=2018, tm_mon=12, tm_mday=23, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=6, tm_yday=357, tm_isdst=-1) >>> time.strptime(dw,"%W %w %y") time.struct_time(tm_year=2018, tm_mon=12, tm_mday=23, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=6, tm_yday=357, tm_isdst=-1) >>> time.strptime(dw,"%U %w %y") == time.strptime(dw,"%W %w %y") True Ruby $ irb irb(main):001:0> require 'date' => true irb(main):002:0> DateTime::strptime("51 0 18", "%W %w %y") => # irb(main):003:0> DateTime::strptime("51 0 18", "%U %w %y") => # irb(main):004:0> DateTime::strptime("51 0 18", "%U %w %y") == DateTime::strptime("51 0 18", "%W %w %y") => true ---------- nosy: +belopolsky, p-ganssle, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 11:12:53 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 19 Dec 2018 16:12:53 +0000 Subject: [issue35302] create_connection with local_addr misses valid socket bindings In-Reply-To: <1542997853.2.0.788709270274.issue35302@psf.upfronthosting.co.za> Message-ID: <1545235973.45.0.788709270274.issue35302@psf.upfronthosting.co.za> Ronald Oussoren added the comment: A better workaround is IMHO to force the socket to be IPV6 only: sd = socket.socket(socket.AF_INET6, socket.SOCK_STREAM, 0) sd.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 1) That avoids the ordering problem as well as having to try all possible combinations of source and destination addreses. I've tested that setting this option makes it impossible to bind a IPv6 socket to an IPv4 address. This is on macOS 10.14.2, I haven't checked other versions of macOS. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 11:19:41 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 19 Dec 2018 16:19:41 +0000 Subject: [issue35526] __future__.barry_as_FLUFL documented as mandatory for Python 3.9 In-Reply-To: <1545148564.43.0.788709270274.issue35526@psf.upfronthosting.co.za> Message-ID: <1545236381.95.0.788709270274.issue35526@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset 55cc34500e5abbfedb89adc95e3f94d53c544933 by Barry Warsaw (Chris Rands) in branch 'master': bpo-35526: make __future__.barry_as_FLUFL mandatory for Python 4.0 (#11218) https://github.com/python/cpython/commit/55cc34500e5abbfedb89adc95e3f94d53c544933 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 11:20:03 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 19 Dec 2018 16:20:03 +0000 Subject: [issue35526] __future__.barry_as_FLUFL documented as mandatory for Python 3.9 In-Reply-To: <1545148564.43.0.788709270274.issue35526@psf.upfronthosting.co.za> Message-ID: <1545236403.18.0.788709270274.issue35526@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 Wed Dec 19 11:23:37 2018 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 19 Dec 2018 16:23:37 +0000 Subject: [issue35420] how to migrate a c-extension module to one that supports subinerpreters? In-Reply-To: <1544037399.3.0.788709270274.issue35420@psf.upfronthosting.co.za> Message-ID: <1545236617.63.0.788709270274.issue35420@psf.upfronthosting.co.za> Petr Viktorin added the comment: Hi (and sorry for the delay -- it's a busy time of year). Unfortunately, there's no good documentation yet. Python's standard library itself is not free of global state, and I don't think we want to start documenting before that's fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 11:38:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Dec 2018 16:38:36 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545237516.13.0.788709270274.issue35257@psf.upfronthosting.co.za> STINNER Victor added the comment: TL; DR PR 10900 passed my manual tests ;-) I made some tests on PR 10900, commit d1655f939d0eeeca24c2a4fee635da087e0d499b, using 3 shell scripts. (1) step1.sh: -- set -x -e git clean -fdx ./configure CC=clang --with-lto --prefix /opt/py38 make 2>&1|tee log grep -E -- '-o python|-o Python/bltinmodule.o|Modules/_asynciomodule.o' log|grep -c lto # 4 expected: -flto passed to compiler *and* linker -- (2) step2.sh: -- set -e -x rm -rf /opt/py38 mkdir /opt/py38 make install /opt/py38/bin/python3.8-config --cflags --ldflags --libs|grep -c lto ||: # "0" expected here: no LTO LD_LIBRARY_PATH=/opt/py38/lib /opt/py38/bin/python3.8 -c 'import sysconfig; print("lto" in sysconfig.get_config_var("LDFLAGS"))' # "False" expected: no LTO in LDFLAGS -- (3) step3.sh: -- set -e -x tar -xf ../Pillow-5.3.0.tar.gz cd Pillow-5.3.0/ LD_LIBRARY_PATH=/opt/py38/lib /opt/py38/bin/python3.8 setup.py install 2>&1|tee log grep -c lto log -- Get Pillow tarball using: wget https://files.pythonhosted.org/packages/1b/e1/1118d60e9946e4e77872b69c58bc2f28448ec02c99a2ce456cd1a272c5fd/Pillow-5.3.0.tar.gz == master == master branch, ./configure CC=clang --with-lto: (1) 4 (2) 0, True => ERR (3) 5 => ERR master branch, ./configure CC=clang --with-lto --enable-shared: (1) 4 (2) 0, True => ERR (3) 5 => ERR == PR == With PR 10900, ./configure CC=clang --with-lto: (1) 4 (2) 0, False => OK! (3) 0 => OK! With PR 10900, ./configure CC=clang --with-lto --enable-shared: (1) 4 (2) 0, False => OK! (3) 0 => OK! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 11:47:59 2018 From: report at bugs.python.org (Joannah Nanjekye) Date: Wed, 19 Dec 2018 16:47:59 +0000 Subject: [issue35537] use os.posix_spawn in subprocess Message-ID: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> New submission from Joannah Nanjekye : On Linux, posix_spawn() uses vfork() instead of fork() which blocks the parent process. The child process executes exec() early and so we don't pay the price of duplicating the memory pages (the thing which tracks memory pages of a process). On macOS, posix_spawn() is a system call, so the kernel is free to use fast-paths to optimize it as they want. posix_spawn() is faster but it's also safer: it allows us to do a lot of "actions" before exec(), before executing the new program. For example, you can close files and control signals. Again, on macOS, these actions are "atomic" since it's a system call. On Linux, glibc uses a very good implementation which has no race condition. Currently, Python uses a C extension _posixsubprocess which more or less reimplements posix_spawn(): close file descriptors, make some file descriptors inheritable or not, etc. It is very tricky to write correct code: code run around fork() is very fragile. In theory, the POSIX specification only allows to use "async-signal-safe" functions after fork()... So it would be great to avoid _posixsubprocess whenever possible for (1) speed (2) correctness. ---------- components: Library (Lib) messages: 332151 nosy: nanjekyejoannah, vstinner priority: normal pull_requests: 10472 severity: normal status: open title: use os.posix_spawn in subprocess type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 12:02:23 2018 From: report at bugs.python.org (Mathew M.) Date: Wed, 19 Dec 2018 17:02:23 +0000 Subject: [issue32077] Documentation: Some Unicode object functions don't indicate whether they return a new reference In-Reply-To: <1511136014.35.0.213398074469.issue32077@psf.upfronthosting.co.za> Message-ID: <1545238943.29.0.788709270274.issue32077@psf.upfronthosting.co.za> Change by Mathew M. : ---------- pull_requests: +10473 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 12:03:44 2018 From: report at bugs.python.org (Vladimir Matveev) Date: Wed, 19 Dec 2018 17:03:44 +0000 Subject: [issue14094] ntpath.realpath() should use GetFinalPathNameByHandle() In-Reply-To: <1329954470.08.0.180096078595.issue14094@psf.upfronthosting.co.za> Message-ID: <1545239024.23.0.788709270274.issue14094@psf.upfronthosting.co.za> Vladimir Matveev added the comment: I can give it a try. ---------- nosy: +v2m _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 12:05:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Dec 2018 17:05:29 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545239129.6.0.788709270274.issue35257@psf.upfronthosting.co.za> STINNER Victor added the comment: PGO+LTO build with PR 10900: I see PGO options (-fprofile-instr-generate then -fprofile-instr-use=code.profclangd) and LTO option (-flto) passed to the compiler and to the linker, as expected: $ git clean -fdx $ ./configure CC=clang --with-lto --prefix /opt/py38 --enable-optimizations $ sed -i -e 's/^PROFILE_TASK=.*/PROFILE_TASK=-c pass/' Makefile $ make ... # compile Python core clang ... -flto ... -fprofile-instr-generate ... Modules/main.c ... # link ./python program clang -pthread -flto -g -fprofile-instr-generate -Xlinker -export-dynamic -o python Programs/python.o libpython3.8m.a -lpthread -ldl -lutil -lm -lm ... # compile stdlib C extension clang ... -flto ... -fprofile-instr-generate ... -c /home/vstinner/prog/python/master/Modules/_heapqmodule.c ... ... rm -f profile-gen-stamp ... # compile Python core clang ... -flto ... -fprofile-instr-use=code.profclangd ... -o Programs/python.o ./Programs/python.c ... # link ./python program clang -pthread -flto -g -Xlinker -export-dynamic -o python Programs/python.o libpython3.8m.a -lpthread -ldl -lutil -lm -lm ... # build struct extension clang ... -flto ... -fprofile-instr-use=code.profclangd ... -c /home/vstinner/prog/python/master/Modules/_struct.c -o build/temp.linux-x86_64-3.8/home/vstinner/prog/python/master/Modules/_struct.o warning: no profile data available for file "_struct.c" [-Wprofile-instr-unprofiled] 1 warning generated. clang -pthread -shared -flto -g build/temp.linux-x86_64-3.8/home/vstinner/prog/python/master/Modules/_struct.o -L/opt/py38/lib -L/usr/local/lib -o build/lib.linux-x86_64-3.8/_struct.cpython-38m-x86_64-linux-gnu.so ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 12:06:58 2018 From: report at bugs.python.org (Paul Ganssle) Date: Wed, 19 Dec 2018 17:06:58 +0000 Subject: [issue35535] time.strptime() unexpectedly gives the same result for %U and %W for 2018 In-Reply-To: <1545224060.23.0.788709270274.issue35535@psf.upfronthosting.co.za> Message-ID: <1545239218.26.0.788709270274.issue35535@psf.upfronthosting.co.za> Paul Ganssle added the comment: I don't really know what Python was doing in version 2.3, and I don't have immediate access to a Python 2.3 interpreter, but at least for %U and %W, datetime is calling the platform's `strftime` under the hood, so presumably if this is a bug it's a bug in glibc and the other providers of `strftime`. Digging a bit more, %U and %W appear to be the the same for all Sundays if (and only if) the year starts on a Monday: import calendar from datetime import datetime from dateutil import rrule rr = rrule.rrule(freq=rrule.WEEKLY, byweekday=rrule.SU, dtstart=datetime(1900, 1, 1), until=datetime(2100, 1, 1)) for dt in rr: is_same = dt.strftime("%U") == dt.strftime("%W") year_starts_monday = calendar.weekday(dt.year, 1, 1) == 0 assert is_same == year_starts_monday This seems to be the right behavior, because %U and %W count all days before their respective "first day of the week" as "week 0", and week 1 starts with the relevant day of the week. If the year starts with Monday, week 1 is 1 January - 7 January according to %W (year starts on Monday), and week 1 is 7 January - 13 January according to %U (year starts on Sunday), thus all Sundays will be in the same "week number" in both systems. > %U is supposed to work with the week numbering system common (as I understand it) in North America, where (according to Wikipedia) week 1 begins on a Sunday, and contains both 1 January and the first Saturday of the year. While I am not familiar with that system, Excel 2016 is, and it reports The documentation for %U says: > Week number of the year (Sunday as the first day of the week) as a zero padded decimal number. All days in a new year preceding the first Sunday are considered to be in week 0. This means that week 1 would only contain the first Saturday of the month and January 1st on years that start on Sunday. The Python documentation is consistent with the man page for strftime(3): http://man7.org/linux/man-pages/man3/strftime.3.html ---------- versions: +Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 12:19:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Dec 2018 17:19:05 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545239945.73.0.788709270274.issue35257@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset cf10a750f4b50b6775719cfb17bee00bc3a9c60b by Victor Stinner (stratakis) in branch 'master': bpo-35257: Avoid leaking LTO linker flags into distutils (GH-10900) https://github.com/python/cpython/commit/cf10a750f4b50b6775719cfb17bee00bc3a9c60b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 12:19:36 2018 From: report at bugs.python.org (Lew Kurtz) Date: Wed, 19 Dec 2018 17:19:36 +0000 Subject: [issue33460] "..." is used to confusingly indicate many different things in chapter 3 In-Reply-To: <1525995197.73.0.682650639539.issue33460@psf.upfronthosting.co.za> Message-ID: <1545239976.25.0.788709270274.issue33460@psf.upfronthosting.co.za> Lew Kurtz added the comment: Removed the ellipses from the examples, so not confused with continuation prompt. Is clearer now. ---------- resolution: -> fixed stage: patch review -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 12:39:35 2018 From: report at bugs.python.org (Devika Sondhi) Date: Wed, 19 Dec 2018 17:39:35 +0000 Subject: [issue35538] splitext does not seems to handle filepath ending in . Message-ID: <1545241175.47.0.788709270274.issue35538@psf.upfronthosting.co.za> New submission from Devika Sondhi : posixpath.splitext('.blah.') returns ('.blah', '.') while the expectation was to return an empty extension at the end. ---------- messages: 332157 nosy: Devika Sondhi priority: normal severity: normal status: open title: splitext does not seems to handle filepath ending in . versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 13:25:47 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Wed, 19 Dec 2018 18:25:47 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545243947.91.0.788709270274.issue35537@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- nosy: +gregory.p.smith, izbyshev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 13:31:11 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 19 Dec 2018 18:31:11 +0000 Subject: [issue29081] time.strptime() return wrong result In-Reply-To: <1482833112.13.0.0168836521105.issue29081@psf.upfronthosting.co.za> Message-ID: <1545244271.95.0.788709270274.issue29081@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: This causes the round trip to be a ValueError. ./python.exe Python 3.8.0a0 (heads/master:1dd035954b, Dec 18 2018, 10:12:34) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> value = '2016 51 0' >>> format = '%Y %W %w' >>> time.strftime(format, time.strptime('2016 51 0', format)) == value True >>> time.strptime('2016 52 0', format) time.struct_time(tm_year=2017, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=6, tm_yday=367, tm_isdst=-1) >>> time.strftime(format, time.strptime('2016 52 0', format)) == value Traceback (most recent call last): File "", line 1, in ValueError: day of year out of range On Ruby this causes runtime error irb(main):005:0> DateTime::strptime("2016 52 0", "%Y %W %w") Traceback (most recent call last): 3: from /usr/local/bin/irb:11:in `
' 2: from (irb):5 1: from (irb):5:in `strptime' ArgumentError (invalid date) With C it returns 2016 00 5 on Mac OS 10.10.4 and 2017 00 0 on Ubuntu #include #include int main() { struct tm ltm = {0}; char buf[] = "2016 52 0"; strptime(buf, "%Y %W %w", <m); time_t ptm = mktime(<m); printf("tm year %d\n", ltm.tm_year); printf("tm yday %d\n", ltm.tm_yday); printf("tm wday %d\n", ltm.tm_wday); char str[50]; struct tm *tm_info = localtime(&ptm); strftime(str, 50, "%Y %W %w", tm_info); printf("%s\n", str); } Output : Mac tm year 116 tm yday 0 tm wday 5 2016 00 5 Ubuntu tm year 117 tm yday 0 tm wday 0 2017 00 0 ---------- nosy: +belopolsky, p-ganssle versions: +Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 13:43:27 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 19 Dec 2018 18:43:27 +0000 Subject: [issue35538] splitext does not seems to handle filepath ending in . In-Reply-To: <1545241175.47.0.788709270274.issue35538@psf.upfronthosting.co.za> Message-ID: <1545245007.38.0.788709270274.issue35538@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Is this similar to previous discussions about leading and trailing dots ? https://bugs.python.org/issue34931#msg328820 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 13:51:39 2018 From: report at bugs.python.org (Matthew Barnett) Date: Wed, 19 Dec 2018 18:51:39 +0000 Subject: [issue35538] splitext does not seems to handle filepath ending in . In-Reply-To: <1545241175.47.0.788709270274.issue35538@psf.upfronthosting.co.za> Message-ID: <1545245499.81.0.788709270274.issue35538@psf.upfronthosting.co.za> Matthew Barnett added the comment: It always returns the dot. For example: >>> posixpath.splitext('.blah.txt') ('.blah', '.txt') If there's no extension (no dot): >>> posixpath.splitext('blah') ('blah', '') Not a bug. ---------- nosy: +mrabarnett resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 14:10:30 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 19 Dec 2018 19:10:30 +0000 Subject: [issue30802] datetime.datetime.strptime('200722', '%Y%U') In-Reply-To: <1498726688.6.0.920894490968.issue30802@psf.upfronthosting.co.za> Message-ID: <1545246630.61.0.788709270274.issue30802@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak versions: +Python 3.7, Python 3.8 -Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 14:13:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 19:13:25 +0000 Subject: [issue32077] Documentation: Some Unicode object functions don't indicate whether they return a new reference In-Reply-To: <1511136014.35.0.213398074469.issue32077@psf.upfronthosting.co.za> Message-ID: <1545246805.59.0.788709270274.issue32077@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b2f642ccd2f65d2f3bf77bbaa103dd2bc2733734 by Serhiy Storchaka (Mat M) in branch 'master': bpo-32077: Update refcounts.dat for Unicode object functions. (GH-11243) https://github.com/python/cpython/commit/b2f642ccd2f65d2f3bf77bbaa103dd2bc2733734 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 14:13:27 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 19 Dec 2018 19:13:27 +0000 Subject: [issue32077] Documentation: Some Unicode object functions don't indicate whether they return a new reference In-Reply-To: <1511136014.35.0.213398074469.issue32077@psf.upfronthosting.co.za> Message-ID: <1545246807.32.0.788709270274.issue32077@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10474 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 14:13:33 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 19 Dec 2018 19:13:33 +0000 Subject: [issue32077] Documentation: Some Unicode object functions don't indicate whether they return a new reference In-Reply-To: <1511136014.35.0.213398074469.issue32077@psf.upfronthosting.co.za> Message-ID: <1545246813.25.0.788709270274.issue32077@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10475 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 15:01:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 20:01:42 +0000 Subject: [issue18085] Verifying refcounts.dat In-Reply-To: <1369768958.38.0.697954786488.issue18085@psf.upfronthosting.co.za> Message-ID: <1545249702.67.0.788709270274.issue18085@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10476 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 15:01:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 20:01:47 +0000 Subject: [issue18085] Verifying refcounts.dat In-Reply-To: <1369768958.38.0.697954786488.issue18085@psf.upfronthosting.co.za> Message-ID: <1545249707.51.0.788709270274.issue18085@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10476, 10477 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 15:01:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 20:01:49 +0000 Subject: [issue18085] Verifying refcounts.dat In-Reply-To: <1369768958.38.0.697954786488.issue18085@psf.upfronthosting.co.za> Message-ID: <1545249709.87.0.788709270274.issue18085@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +10476, 10477, 10478 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 15:03:25 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 19 Dec 2018 20:03:25 +0000 Subject: [issue32077] Documentation: Some Unicode object functions don't indicate whether they return a new reference In-Reply-To: <1511136014.35.0.213398074469.issue32077@psf.upfronthosting.co.za> Message-ID: <1545249805.72.0.788709270274.issue32077@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 29d4e309b1b4dfb26d65d83c683002911c066dec by Miss Islington (bot) in branch '3.7': bpo-32077: Update refcounts.dat for Unicode object functions. (GH-11243) https://github.com/python/cpython/commit/29d4e309b1b4dfb26d65d83c683002911c066dec ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 15:13:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 20:13:42 +0000 Subject: [issue32077] Documentation: Some Unicode object functions don't indicate whether they return a new reference In-Reply-To: <1511136014.35.0.213398074469.issue32077@psf.upfronthosting.co.za> Message-ID: <1545250422.43.0.788709270274.issue32077@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, I forget about this issue and remembered it only after creating similar patch from scratch. PR 11247 is what left from it after merging your patch. ---------- 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 Wed Dec 19 15:23:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 20:23:05 +0000 Subject: [issue18085] Verifying refcounts.dat In-Reply-To: <1369768958.38.0.697954786488.issue18085@psf.upfronthosting.co.za> Message-ID: <1545250985.03.0.788709270274.issue18085@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -10477 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 15:23:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 20:23:19 +0000 Subject: [issue18085] Verifying refcounts.dat In-Reply-To: <1369768958.38.0.697954786488.issue18085@psf.upfronthosting.co.za> Message-ID: <1545250999.4.0.788709270274.issue18085@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -10478 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 15:24:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2018 20:24:57 +0000 Subject: [issue18085] Verifying refcounts.dat In-Reply-To: <1369768958.38.0.697954786488.issue18085@psf.upfronthosting.co.za> Message-ID: <1545251097.17.0.788709270274.issue18085@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 11247 adds more functions and fixes some errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 15:35:52 2018 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Wed, 19 Dec 2018 20:35:52 +0000 Subject: [issue35539] Cannot properly close terminated process Message-ID: <1545251752.03.0.788709270274.issue35539@psf.upfronthosting.co.za> New submission from Hrvoje Nik?i? : It seems impossible to correctly close() an asyncio Process on which terminate has been invoked. Take the following coroutine: async def test(): proc = await asyncio.create_subprocess_shell( "sleep 1", stdout=asyncio.subprocess.PIPE) proc.terminate() await proc.wait() After running it with asyncio.run(), Python prints a warning about "Event loop is closed" exception ignored in BaseSubprocessTransport.__del__. The code does wait for the process to exit, and neither proc nor proc.stdout have a close() method, so the warning seems spurious. Commenting out proc.terminate() makes the program finish without an exception (but then it waits for a full second, of course). Runnable example attached. ---------- components: asyncio files: terminate.py messages: 332165 nosy: asvetlov, hniksic, yselivanov priority: normal severity: normal status: open title: Cannot properly close terminated process versions: Python 3.7 Added file: https://bugs.python.org/file48008/terminate.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:06:44 2018 From: report at bugs.python.org (Will T) Date: Wed, 19 Dec 2018 22:06:44 +0000 Subject: [issue35540] dataclasses.asdict breaks with defaultdict fields Message-ID: <1545257204.19.0.788709270274.issue35540@psf.upfronthosting.co.za> New submission from Will T : _asdict_inner attempts to manually recursively deepcopy dicts by calling type(obj) with a generator of transformed keyvalue tuples @ https://github.com/python/cpython/blob/b2f642ccd2f65d2f3bf77bbaa103dd2bc2733734/Lib/dataclasses.py#L1080 . defaultdicts are dicts so this runs but unlike other dicts their first arg has to be a callable or None: import collections import dataclasses as dc @dc.dataclass() class C: d: dict c = C(collections.defaultdict(lambda: 3, {})) d = dc.asdict(c) assert isinstance(d['d'], collections.defaultdict) assert d['d']['a'] == 3 => Traceback (most recent call last): File "boom.py", line 9, in d = dc.asdict(c) File "/Users/spinlock/.pyenv/versions/3.7.1/lib/python3.7/dataclasses.py", line 1019, in asdict return _asdict_inner(obj, dict_factory) File "/Users/spinlock/.pyenv/versions/3.7.1/lib/python3.7/dataclasses.py", line 1026, in _asdict_inner value = _asdict_inner(getattr(obj, f.name), dict_factory) File "/Users/spinlock/.pyenv/versions/3.7.1/lib/python3.7/dataclasses.py", line 1058, in _asdict_inner for k, v in obj.items()) TypeError: first argument must be callable or None I understand that it isn't this bit of code's job to support every dict (and list etc.) subclass under the sun but given defaultdict is stdlib it's imo worth supporting explicitly. ---------- components: Library (Lib) messages: 332166 nosy: wrmsr priority: normal severity: normal status: open title: dataclasses.asdict breaks with defaultdict fields versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:23:34 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 19 Dec 2018 22:23:34 +0000 Subject: [issue17972] inspect module docs omits many functions In-Reply-To: <1368501068.91.0.677640111487.issue17972@psf.upfronthosting.co.za> Message-ID: <1545258214.58.0.788709270274.issue17972@psf.upfronthosting.co.za> Cheryl Sabella added the comment: issue12317 discusses inspect.getabsfile() ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:32:30 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 19 Dec 2018 22:32:30 +0000 Subject: [issue35540] dataclasses.asdict breaks with defaultdict fields In-Reply-To: <1545257204.19.0.788709270274.issue35540@psf.upfronthosting.co.za> Message-ID: <1545258750.97.0.788709270274.issue35540@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- assignee: -> eric.smith nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 00:29:09 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 20 Dec 2018 05:29:09 +0000 Subject: [issue35530] Counter-intuitive logging API In-Reply-To: <1545178149.93.0.788709270274.issue35530@psf.upfronthosting.co.za> Message-ID: <1545283749.19.0.788709270274.issue35530@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: -> vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 00:35:20 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Dec 2018 05:35:20 +0000 Subject: [issue35521] IDLE: Add doc section for Code Context and ref links. In-Reply-To: <1545093928.09.0.788709270274.issue35521@psf.upfronthosting.co.za> Message-ID: <1545284120.09.0.788709270274.issue35521@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 00:35:04 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Dec 2018 05:35:04 +0000 Subject: [issue35521] IDLE: Add doc section for Code Context and ref links. In-Reply-To: <1545093928.09.0.788709270274.issue35521@psf.upfronthosting.co.za> Message-ID: <1545284104.82.0.788709270274.issue35521@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Great. Since you included half of the other needed ref links in the PR, and I mentioned them in the blurb, I am going to include the other half in this PR as a followup PR. ---------- title: IDLE: Add doc section for Code Conext -> IDLE: Add doc section for Code Context and ref links. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 00:38:59 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Dec 2018 05:38:59 +0000 Subject: [issue35521] IDLE: Add doc section for Code Context and ref links. In-Reply-To: <1545093928.09.0.788709270274.issue35521@psf.upfronthosting.co.za> Message-ID: <1545284338.99.0.788709270274.issue35521@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 01421bec1e0d25df17599cfa1160adbbcd08e949 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-35521: IDLE: Add code context section to docs (#11205) https://github.com/python/cpython/commit/01421bec1e0d25df17599cfa1160adbbcd08e949 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 00:39:08 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 20 Dec 2018 05:39:08 +0000 Subject: [issue35521] IDLE: Add doc section for Code Context and ref links. In-Reply-To: <1545093928.09.0.788709270274.issue35521@psf.upfronthosting.co.za> Message-ID: <1545284348.0.0.788709270274.issue35521@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10482 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 00:39:15 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 20 Dec 2018 05:39:15 +0000 Subject: [issue35521] IDLE: Add doc section for Code Context and ref links. In-Reply-To: <1545093928.09.0.788709270274.issue35521@psf.upfronthosting.co.za> Message-ID: <1545284355.02.0.788709270274.issue35521@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10483 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 00:39:47 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 20 Dec 2018 05:39:47 +0000 Subject: [issue35526] __future__.barry_as_FLUFL documented as mandatory for Python 3.9 In-Reply-To: <1545148564.43.0.788709270274.issue35526@psf.upfronthosting.co.za> Message-ID: <1545284387.9.0.788709270274.issue35526@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Good thing we don't need a barry_as_GUIDO alias. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 00:41:46 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 20 Dec 2018 05:41:46 +0000 Subject: [issue35536] Calling built-in locals() and globals() in C++ leads to SystemError In-Reply-To: <1545231260.91.0.788709270274.issue35536@psf.upfronthosting.co.za> Message-ID: <1545284506.1.0.788709270274.issue35536@psf.upfronthosting.co.za> Benjamin Peterson added the comment: What behavior are you expecting? If there isn't any Python code in the callback, globals() and locals() are meaningless. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 00:49:26 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Dec 2018 05:49:26 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1545284966.02.0.788709270274.issue34162@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +10484 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 00:59:29 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 20 Dec 2018 05:59:29 +0000 Subject: [issue35521] IDLE: Add doc section for Code Context and ref links. In-Reply-To: <1545093928.09.0.788709270274.issue35521@psf.upfronthosting.co.za> Message-ID: <1545285569.16.0.788709270274.issue35521@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3f9338312738b4b6d909fa7d5e7bb02f2efc08a5 by Miss Islington (bot) in branch '3.7': bpo-35521: IDLE: Add code context section to docs (GH-11205) https://github.com/python/cpython/commit/3f9338312738b4b6d909fa7d5e7bb02f2efc08a5 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 01:01:04 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Dec 2018 06:01:04 +0000 Subject: [issue35521] IDLE: Add doc section for Code Context and ref links. In-Reply-To: <1545093928.09.0.788709270274.issue35521@psf.upfronthosting.co.za> Message-ID: <1545285664.31.0.788709270274.issue35521@psf.upfronthosting.co.za> Terry J. Reedy added the comment: No more 3.6 backports. ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 01:03:51 2018 From: report at bugs.python.org (=?utf-8?b?0J3QuNC60LjRgtCwINCh0LjRgNCz0LjQtdC90LrQvg==?=) Date: Thu, 20 Dec 2018 06:03:51 +0000 Subject: [issue35536] Calling built-in locals() and globals() in C++ leads to SystemError In-Reply-To: <1545231260.91.0.788709270274.issue35536@psf.upfronthosting.co.za> Message-ID: <1545285831.71.0.788709270274.issue35536@psf.upfronthosting.co.za> ?????? ????????? added the comment: I run some Python code before this moment, so I expect, that globals variable will be a PyDictObject with results of 'globals()' command: '__name__', '__doc__', global variables, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 01:06:01 2018 From: report at bugs.python.org (Armandas) Date: Thu, 20 Dec 2018 06:06:01 +0000 Subject: [issue35541] CLI error when .python_history contains unicode characters Message-ID: <1545285961.64.0.788709270274.issue35541@psf.upfronthosting.co.za> New submission from Armandas : OS: Windows 10 Python version: Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit (Intel)] on win32 Traceback: Failed calling sys.__interactivehook__ Traceback (most recent call last): File "C:\Users\owner\AppData\Local\Programs\Python\Python37-32\lib\site.py", line 439, in register_readline readline.read_history_file(history) File "C:\Users\owner\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyreadline\rlmain.py", line 165, in read_history_file self.mode._history.read_history_file(filename) File "C:\Users\owner\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyreadline\lineeditor\history.py", line 82, in read_history_file for line in open(filename, 'r'): File "C:\Users\owner\AppData\Local\Programs\Python\Python37-32\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2: character maps to How to reproduce: On a Windows machine, add the following line to your .python_history: "?".isalpha() I believe the issue stems from the fact that the history file is opened with the "default" encoding, which on windows is cp1252. ---------- components: Library (Lib) messages: 332179 nosy: armandas priority: normal severity: normal status: open title: CLI error when .python_history contains unicode characters type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 01:07:12 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Dec 2018 06:07:12 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1545286032.45.0.788709270274.issue34162@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 87ec1104b369865c3c41d2d91ac7aee29cfb632e by Terry Jan Reedy in branch 'master': bpo-34162: Update idlelib/NEWS.txt to 2018-12-20. (#11255) https://github.com/python/cpython/commit/87ec1104b369865c3c41d2d91ac7aee29cfb632e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 01:21:15 2018 From: report at bugs.python.org (Dima Tisnek) Date: Thu, 20 Dec 2018 06:21:15 +0000 Subject: [issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE In-Reply-To: <1532867889.16.0.56676864532.issue34271@psf.upfronthosting.co.za> Message-ID: <1545286875.08.0.788709270274.issue34271@psf.upfronthosting.co.za> Dima Tisnek added the comment: Perhaps https://stackoverflow.com/questions/42332792/chrome-not-firefox-are-not-dumping-to-sslkeylogfile-variable is outdated, but it suggests that: in firefox, this feature os not on by default in chrome, this feature is not available I would be vary of "too much magic"... Though I'd use this in development, I feel that's a bit risky for desktop apps, production, etc... ---------- nosy: +Dima.Tisnek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 01:22:34 2018 From: report at bugs.python.org (Mike Pagel) Date: Thu, 20 Dec 2018 06:22:34 +0000 Subject: [issue35148] cannot activate a venv environment on a Swiss German windows In-Reply-To: <1541176783.96.0.788709270274.issue35148@psf.upfronthosting.co.za> Message-ID: <1545286954.25.0.788709270274.issue35148@psf.upfronthosting.co.za> Mike Pagel added the comment: Dear developers on the nosy list: Would it be possible that someone does a quick review of my related fix in https://github.com/python/cpython/pull/10696? It is extremely simple and has minimal side effects, but would relieve us from getting this annoying error in the future. I know this is a minor thing but each time I start a venv in Germany, I am reminded of this... :-) Thanks a lot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 01:23:52 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Dec 2018 06:23:52 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1545287032.43.0.788709270274.issue34162@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +10485 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 01:53:17 2018 From: report at bugs.python.org (shuoz) Date: Thu, 20 Dec 2018 06:53:17 +0000 Subject: [issue35542] stack exhaustion in 3.6.7 Message-ID: <1545288797.27.0.788709270274.issue35542@psf.upfronthosting.co.za> New submission from shuoz : stack exhaustion in 3.6.7. in python 3.6.7 set recursive depth 20000 will exhaustion stack and get Segmentation fault. But this dont happen in python 2.7 ``` import sys sys.setrecursionlimit(20000) def f(): f() f() ``` ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 332183 nosy: shuoz priority: normal severity: normal status: open title: stack exhaustion in 3.6.7 type: security versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:06:06 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 20 Dec 2018 07:06:06 +0000 Subject: [issue35542] stack exhaustion in 3.6.7 In-Reply-To: <1545288797.27.0.788709270274.issue35542@psf.upfronthosting.co.za> Message-ID: <1545289566.25.0.788709270274.issue35542@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Related older issue : issue1110055 https://docs.python.org/3/library/sys.html#sys.setrecursionlimit > The highest possible limit is platform-dependent. A user may need to set the limit higher when they have a program that requires deep recursion and a platform that supports a higher limit. This should be done with care, because a too-high limit can lead to a crash. I think this is a known case where the stack limit is hit depending on the operating system before RecursionError can be raised when a higher recursion limit is set. On my machine (Mac 10.10.4) this segfaults on 2.7 but raises RecurstionError on Python 3.7.1. Increasing the limit to 200000 causes segfault on 3.7.1. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:09:07 2018 From: report at bugs.python.org (Eryk Sun) Date: Thu, 20 Dec 2018 07:09:07 +0000 Subject: [issue35541] CLI error when .python_history contains unicode characters In-Reply-To: <1545285961.64.0.788709270274.issue35541@psf.upfronthosting.co.za> Message-ID: <1545289747.05.0.788709270274.issue35541@psf.upfronthosting.co.za> Eryk Sun added the comment: pyreadline is a third-party package. Refer to issue 55 at its GitHub repo: https://github.com/pyreadline/pyreadline/issues/55 ---------- nosy: +eryksun resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:12:12 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Dec 2018 07:12:12 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1545289932.31.0.788709270274.issue34162@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 93f5694bb0c147ae48da492d6eb6244447562f8d by Terry Jan Reedy in branch '3.7': [3.7] bpo-34162: Update idlelib/NEWS.txt to 2018-12-20 (GH-11255) (#11256) https://github.com/python/cpython/commit/93f5694bb0c147ae48da492d6eb6244447562f8d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:12:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 07:12:16 +0000 Subject: [issue35541] CLI error when .python_history contains unicode characters In-Reply-To: <1545285961.64.0.788709270274.issue35541@psf.upfronthosting.co.za> Message-ID: <1545289936.64.0.788709270274.issue35541@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:15:34 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Dec 2018 07:15:34 +0000 Subject: [issue35521] IDLE: Add doc section for Code Context and ref links. In-Reply-To: <1545093928.09.0.788709270274.issue35521@psf.upfronthosting.co.za> Message-ID: <1545290134.62.0.788709270274.issue35521@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +10486 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:17:02 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Dec 2018 07:17:02 +0000 Subject: [issue35521] IDLE: Add doc section for Code Context and ref links. In-Reply-To: <1545093928.09.0.788709270274.issue35521@psf.upfronthosting.co.za> Message-ID: <1545290222.36.0.788709270274.issue35521@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I did not find the references in the text I remembered, but found 2 more involving the menu section. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:25:10 2018 From: report at bugs.python.org (shuoz) Date: Thu, 20 Dec 2018 07:25:10 +0000 Subject: [issue35542] stack exhaustion in 3.6.7 In-Reply-To: <1545288797.27.0.788709270274.issue35542@psf.upfronthosting.co.za> Message-ID: <1545290710.67.0.788709270274.issue35542@psf.upfronthosting.co.za> shuoz added the comment: thank you for your reply. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed type: security -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:25:40 2018 From: report at bugs.python.org (Devika Sondhi) Date: Thu, 20 Dec 2018 07:25:40 +0000 Subject: [issue35538] splitext does not seems to handle filepath ending in . In-Reply-To: <1545241175.47.0.788709270274.issue35538@psf.upfronthosting.co.za> Message-ID: <1545290740.93.0.788709270274.issue35538@psf.upfronthosting.co.za> Devika Sondhi added the comment: Linux (unlike Windows) allows naming a file with a trailing dot. The issue with file name such as '.blah.' is that it does not have an extension and one would expect the base-name without extension to be returned as '.blah.' and not as '.blah' splitext returns ('.blah','.') ---------- resolution: not a bug -> status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:34:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 07:34:00 +0000 Subject: [issue18085] Verifying refcounts.dat In-Reply-To: <1369768958.38.0.697954786488.issue18085@psf.upfronthosting.co.za> Message-ID: <1545291240.34.0.788709270274.issue18085@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 83dd4e87a62311cfea5fdd37e8a945b6b07bccee by Serhiy Storchaka in branch 'master': bpo-18085: Update refcounts.dat. (GH-11247) https://github.com/python/cpython/commit/83dd4e87a62311cfea5fdd37e8a945b6b07bccee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:34:10 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 20 Dec 2018 07:34:10 +0000 Subject: [issue18085] Verifying refcounts.dat In-Reply-To: <1369768958.38.0.697954786488.issue18085@psf.upfronthosting.co.za> Message-ID: <1545291250.17.0.788709270274.issue18085@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10487 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:34:22 2018 From: report at bugs.python.org (Vladimir Matveev) Date: Thu, 20 Dec 2018 07:34:22 +0000 Subject: [issue14094] ntpath.realpath() should use GetFinalPathNameByHandle() In-Reply-To: <1329954470.08.0.180096078595.issue14094@psf.upfronthosting.co.za> Message-ID: <1545291262.39.0.788709270274.issue14094@psf.upfronthosting.co.za> Change by Vladimir Matveev : ---------- keywords: +patch pull_requests: +10488 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:34:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 07:34:53 +0000 Subject: [issue5438] test_bigmem.test_from_2G_generator uses more memory than expected In-Reply-To: <1236475515.92.0.849329057425.issue5438@psf.upfronthosting.co.za> Message-ID: <1545291293.81.0.788709270274.issue5438@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b13a20f50789e153c18ed8efb4fbc5eecc50f2cd by Serhiy Storchaka in branch 'master': bpo-5438: Update memory requirements and optimize test_bigmem.py. (GH-11123) https://github.com/python/cpython/commit/b13a20f50789e153c18ed8efb4fbc5eecc50f2cd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:35:01 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 20 Dec 2018 07:35:01 +0000 Subject: [issue5438] test_bigmem.test_from_2G_generator uses more memory than expected In-Reply-To: <1236475515.92.0.849329057425.issue5438@psf.upfronthosting.co.za> Message-ID: <1545291301.07.0.788709270274.issue5438@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10489 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:43:29 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 20 Dec 2018 07:43:29 +0000 Subject: [issue18085] Verifying refcounts.dat In-Reply-To: <1369768958.38.0.697954786488.issue18085@psf.upfronthosting.co.za> Message-ID: <1545291809.7.0.788709270274.issue18085@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 73fc14d1f8441aef5ee03be627c63e74a6d915d6 by Miss Islington (bot) in branch '3.7': bpo-18085: Update refcounts.dat. (GH-11247) https://github.com/python/cpython/commit/73fc14d1f8441aef5ee03be627c63e74a6d915d6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:50:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 07:50:08 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1545292208.92.0.788709270274.issue22831@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: ?ric, could you please take a look at PR 10921? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:52:59 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 20 Dec 2018 07:52:59 +0000 Subject: [issue5438] test_bigmem.test_from_2G_generator uses more memory than expected In-Reply-To: <1236475515.92.0.849329057425.issue5438@psf.upfronthosting.co.za> Message-ID: <1545292379.7.0.788709270274.issue5438@psf.upfronthosting.co.za> miss-islington added the comment: New changeset a26201cd8ef17dc81431f768846291c9f4337550 by Miss Islington (bot) in branch '3.7': bpo-5438: Update memory requirements and optimize test_bigmem.py. (GH-11123) https://github.com/python/cpython/commit/a26201cd8ef17dc81431f768846291c9f4337550 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:54:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 07:54:30 +0000 Subject: [issue30455] Generate all tokens related code and docs from Grammar/Tokens In-Reply-To: <1495628509.86.0.512362155714.issue30455@psf.upfronthosting.co.za> Message-ID: <1545292470.72.0.788709270274.issue30455@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If there are no objections I am going to merge PR 10370 in few days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 03:05:14 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Thu, 20 Dec 2018 08:05:14 +0000 Subject: [issue33234] Improve list() pre-sizing for inputs with known lengths In-Reply-To: <1522964813.15.0.682650639539.issue33234@psf.upfronthosting.co.za> Message-ID: <1545293114.75.0.788709270274.issue33234@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- pull_requests: +10490 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 03:13:34 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 20 Dec 2018 08:13:34 +0000 Subject: [issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE In-Reply-To: <1532867889.16.0.56676864532.issue34271@psf.upfronthosting.co.za> Message-ID: <1545293614.07.0.788709270274.issue34271@psf.upfronthosting.co.za> Nathaniel Smith added the comment: It's confusing, but AFAICT what happened is that Mozilla started to disable it in release builds, but got a bunch of pushback from users and changed their minds and decided to keep it enabled. But then there was a snafu tracking the patch for that, so there ended up being a few releases where it was disabled, before everything got sorted out. But, it is enabled by default now. The very confusing thread is here: https://bugzilla.mozilla.org/show_bug.cgi?id=1188657 And I don't see how this is any riskier than other envvars like PYTHONSTARTUP, which lets you name an arbitrary file that the interpreter will execute at startup. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 03:14:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 08:14:48 +0000 Subject: [issue18085] Verifying refcounts.dat In-Reply-To: <1369768958.38.0.697954786488.issue18085@psf.upfronthosting.co.za> Message-ID: <1545293688.23.0.788709270274.issue18085@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 03:20:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 08:20:58 +0000 Subject: [issue35538] splitext does not seems to handle filepath ending in . In-Reply-To: <1545241175.47.0.788709270274.issue35538@psf.upfronthosting.co.za> Message-ID: <1545294058.87.0.788709270274.issue35538@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Not a bug. The current behavior is consistent and unsurprising. ---------- nosy: +serhiy.storchaka resolution: -> not a bug status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 03:26:30 2018 From: report at bugs.python.org (Sagar) Date: Thu, 20 Dec 2018 08:26:30 +0000 Subject: [issue35543] re.sub is only replacing max. of 2 string found by regexp. Message-ID: <1545294390.75.0.788709270274.issue35543@psf.upfronthosting.co.za> New submission from Sagar : Below are the logs: >>> dat = '"10GE" "4x" "AMPC" "B3" "BUILTIN" "DOWN" "LU" "SFP+" "ether" "xe" "DOWN" "MPC" "BUILTIN"' >>> type = re.subn(r'\"BUILTIN\"|\"B\d\"|\"I\d\"|\"LU\"|\"Trinity\"|\"Trio\"|\"DOWN\"|\"UNKNOWN\"|' ... r'^AND$|\"Q\"|\"MPC\"|\"EA\d\"|\"3D\"', '', dat, re.I) >>> type ('"10GE" "4x" "AMPC" "DOWN" "LU" "SFP+" "ether" "xe" "DOWN" "MPC" "BUILTIN"', 2) >>> dat = '"10GE" "4x" "AMPC" "DOWN" "LU" "SFP+" "ether" "xe" "DOWN" "MPC" "BUILTIN"' >>> type = re.subn(r'\"BUILTIN\"|\"B\d\"|\"I\d\"|\"LU\"|\"Trinity\"|\"Trio\"|\"DOWN\"|\"UNKNOWN\"|' ... r'^AND$|\"Q\"|\"MPC\"|\"EA\d\"|\"3D\"', '', dat, re.I) >>> type ('"10GE" "4x" "AMPC" "SFP+" "ether" "xe" "DOWN" "MPC" "BUILTIN"', 2) >>> dat = '"10GE" "4x" "AMPC" "SFP+" "ether" "xe" "DOWN" "MPC" "BUILTIN"' >>> type = re.subn(r'\"BUILTIN\"|\"B\d\"|\"I\d\"|\"LU\"|\"Trinity\"|\"Trio\"|\"DOWN\"|\"UNKNOWN\"|' ... r'^AND$|\"Q\"|\"MPC\"|\"EA\d\"|\"3D\"', '', dat, re.I) >>> type ('"10GE" "4x" "AMPC" "SFP+" "ether" "xe" "BUILTIN"', 2) >>> dat = '"10GE" "4x" "AMPC" "SFP+" "ether" "xe" "BUILTIN"' >>> type = re.subn(r'\"BUILTIN\"|\"B\d\"|\"I\d\"|\"LU\"|\"Trinity\"|\"Trio\"|\"DOWN\"|\"UNKNOWN\"|' ... r'^AND$|\"Q\"|\"MPC\"|\"EA\d\"|\"3D\"', '', dat, re.I) >>> type ('"10GE" "4x" "AMPC" "SFP+" "ether" "xe" ', 1) >>> ---------- components: Library (Lib) messages: 332198 nosy: saga priority: normal severity: normal status: open title: re.sub is only replacing max. of 2 string found by regexp. type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 03:29:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 08:29:45 +0000 Subject: [issue35529] A reference counting bug in ctypes In-Reply-To: <1545176662.95.0.788709270274.issue35529@psf.upfronthosting.co.za> Message-ID: <1545294585.33.0.788709270274.issue35529@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d77d97c9a1f593fe161afab97e2a3e2292ab88b9 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-35529: Fix a reference counting bug in PyCFuncPtr_FromDll(). (GH-11229) https://github.com/python/cpython/commit/d77d97c9a1f593fe161afab97e2a3e2292ab88b9 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 03:29:49 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 20 Dec 2018 08:29:49 +0000 Subject: [issue35529] A reference counting bug in ctypes In-Reply-To: <1545176662.95.0.788709270274.issue35529@psf.upfronthosting.co.za> Message-ID: <1545294589.06.0.788709270274.issue35529@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10491 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 03:29:58 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 20 Dec 2018 08:29:58 +0000 Subject: [issue35529] A reference counting bug in ctypes In-Reply-To: <1545176662.95.0.788709270274.issue35529@psf.upfronthosting.co.za> Message-ID: <1545294598.5.0.788709270274.issue35529@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10492 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 03:32:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 08:32:12 +0000 Subject: [issue35543] re.sub is only replacing max. of 2 string found by regexp. In-Reply-To: <1545294390.75.0.788709270274.issue35543@psf.upfronthosting.co.za> Message-ID: <1545294732.15.0.788709270274.issue35543@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The third argument of re.sub() is the maximal number of replacements. re.I == 2. sub(pattern, repl, string, count=0, flags=0) Return the string obtained by replacing the leftmost non-overlapping occurrences of the pattern in string by the replacement repl. repl can be either a string or a callable; if a string, backslash escapes in it are processed. If it is a callable, it's passed the Match object and must return a replacement string to be used. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 03:48:06 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 20 Dec 2018 08:48:06 +0000 Subject: [issue35529] A reference counting bug in ctypes In-Reply-To: <1545176662.95.0.788709270274.issue35529@psf.upfronthosting.co.za> Message-ID: <1545295686.03.0.788709270274.issue35529@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 4b6caaca41def86d80819f1f93c647918e98393f by Miss Islington (bot) in branch '3.7': bpo-35529: Fix a reference counting bug in PyCFuncPtr_FromDll(). (GH-11229) https://github.com/python/cpython/commit/4b6caaca41def86d80819f1f93c647918e98393f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 03:51:56 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 20 Dec 2018 08:51:56 +0000 Subject: [issue35529] A reference counting bug in ctypes In-Reply-To: <1545176662.95.0.788709270274.issue35529@psf.upfronthosting.co.za> Message-ID: <1545295916.97.0.788709270274.issue35529@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3752bc96c0ea1ecf28903cc34cdcd75c658e92ce by Miss Islington (bot) in branch '2.7': bpo-35529: Fix a reference counting bug in PyCFuncPtr_FromDll(). (GH-11229) https://github.com/python/cpython/commit/3752bc96c0ea1ecf28903cc34cdcd75c658e92ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 04:18:56 2018 From: report at bugs.python.org (radiocane) Date: Thu, 20 Dec 2018 09:18:56 +0000 Subject: [issue35544] unicode.encode docstring says return value can be unicode Message-ID: <1545297536.15.0.788709270274.issue35544@psf.upfronthosting.co.za> New submission from radiocane : In Python 2.7.15rc1 the docstring for unicode.encode starts with: "S.encode([encoding[,errors]]) -> string or unicode" But if this answer https://stackoverflow.com/a/449281/5397695 is correct, then unicode.encode will never return a unicode object. Am I right? ---------- components: Unicode messages: 332203 nosy: ezio.melotti, radiocane, vstinner priority: normal severity: normal status: open title: unicode.encode docstring says return value can be unicode versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 04:19:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 09:19:58 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545297598.24.0.788709270274.issue35537@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- assignee: -> vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 04:35:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 09:35:24 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545298524.44.0.788709270274.issue35537@psf.upfronthosting.co.za> STINNER Victor added the comment: "posix_spawn() is faster" This assumption needs a benchmark! I ran a benchmark on Linux (Fedora 29, Linux kernel 4.19.9-300.fc29.x86_64, glibc 2.28) using attached subprocess_bench.py. I rebased the PR 11242 on master and run the benchmark in virtual environment: git co pr/11242 # current branch: PR 11242 make distclean ./configure make ./python -m venv env env/bin/python -m pip install perf env/bin/python subprocess_bench.py -v -o posix_spawn.json git co master env/bin/python subprocess_bench.py -v -o fork_exec.json env/bin/python -m perf compare_to fork_exec.json posix_spawn.json The result is quite explicit: the PR makes subprocess.Popen 61x faster!!! $ env/bin/python -m perf compare_to fork_exec.json posix_spawn.json Mean +- std dev: [fork_exec] 27.1 ms +- 0.4 ms -> [posix_spawn] 447 us +- 163 us: 60.55x faster (-98%) That's the best case: * The parent process (Python) allocated 2 GiB of memory: that's not uncommon for large application. On OpenStack for example, it's common that a process takes more than 1 GiB. * The child process has a short execution time and allocates few memory. On my config (Fedora 29, Linux kernel 4.19.9-300.fc29.x86_64, glibc 2.28), os.posix_spawn() uses vfork(): $ strace -o trace ./python -c 'import subprocess; subprocess.run(["/bin/true"], close_fds=False, restore_signals=False)' $ grep clone trace clone(child_stack=0x7fab28ac0ff0, flags=CLONE_VM|CLONE_VFORK|SIGCHLD) = 23073 I guess that the 61x speedup mostly comes from vfork(). See also bpo-34663 for previous discussion about vfork() and os.posix_spawn(). In short, the glibc is smart and detects when vfork() can be used or not. ---------- Added file: https://bugs.python.org/file48011/subprocess_bench.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 04:48:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 09:48:13 +0000 Subject: [issue35544] unicode.encode docstring says return value can be unicode In-Reply-To: <1545297536.15.0.788709270274.issue35544@psf.upfronthosting.co.za> Message-ID: <1545299293.01.0.788709270274.issue35544@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 04:57:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 09:57:27 +0000 Subject: [issue30455] Generate all tokens related code and docs from Grammar/Tokens In-Reply-To: <1495628509.86.0.512362155714.issue30455@psf.upfronthosting.co.za> Message-ID: <1545299847.12.0.788709270274.issue30455@psf.upfronthosting.co.za> STINNER Victor added the comment: > If there are no objections I am going to merge PR 10370 in few days. LGTM. I guess that PR 9343 should be closed once PR 10370 is merged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 05:12:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 10:12:24 +0000 Subject: [issue35544] unicode.encode docstring says return value can be unicode In-Reply-To: <1545297536.15.0.788709270274.issue35544@psf.upfronthosting.co.za> Message-ID: <1545300744.71.0.788709270274.issue35544@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is no code that prevents unicode.encode() from returning the result of arbitrary type. Seems all standard codecs return str, but you can not be sure about custom codecs. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 05:13:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 10:13:12 +0000 Subject: [issue35529] A reference counting bug in ctypes In-Reply-To: <1545176662.95.0.788709270274.issue35529@psf.upfronthosting.co.za> Message-ID: <1545300792.77.0.788709270274.issue35529@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Zackery. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 05:18:44 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 20 Dec 2018 10:18:44 +0000 Subject: [issue35544] unicode.encode docstring says return value can be unicode In-Reply-To: <1545297536.15.0.788709270274.issue35544@psf.upfronthosting.co.za> Message-ID: <1545301124.81.0.788709270274.issue35544@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Encoding and decoding, in the most general sense, can include unicode -> unicode and bytestring -> bytestring. I can't see any standard unicode->unicode encodings in Python 2.7 https://docs.python.org/2/library/codecs.html but we can create one: py> import codecs py> class NullCodec(codecs.Codec): # "do nothing" codec ... def encode(self, input, errors='strict'): ... return (input, len(input)) ... def decode(self, input, errors='strict'): ... return (input, len(input)) ... py> def getregentry(name): ... return codecs.CodecInfo( ... name='null', ... encode=NullCodec().encode, ... decode=NullCodec().decode, ... incrementalencoder=None, ... incrementaldecoder=None, ... streamwriter=None, ... streamreader=None, ... ) ... py> codecs.register(getregentry) py> u'unicode text'.encode('null') u'unicode text' so the documentation is correct, and the Stackoverflow answer is not. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 05:25:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 10:25:30 +0000 Subject: [issue35544] unicode.encode docstring says return value can be unicode In-Reply-To: <1545297536.15.0.788709270274.issue35544@psf.upfronthosting.co.za> Message-ID: <1545301530.83.0.788709270274.issue35544@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 05:48:56 2018 From: report at bugs.python.org (radiocane) Date: Thu, 20 Dec 2018 10:48:56 +0000 Subject: [issue35544] unicode.encode docstring says return value can be unicode In-Reply-To: <1545297536.15.0.788709270274.issue35544@psf.upfronthosting.co.za> Message-ID: <1545302936.41.0.788709270274.issue35544@psf.upfronthosting.co.za> radiocane added the comment: Given that: 1) No standard codec returns unicode 2) I consider as "most common scenario" the case where a user wants to encode a unicode object using some character encoding and get back an str-like object I'll keep on finding "-> string or unicode" misleading. I'd rather have the same as str.encode i.e. "-> object". Anyway thanks for your time and attention :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 05:50:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 10:50:04 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545303004.68.0.788709270274.issue35537@psf.upfronthosting.co.za> STINNER Victor added the comment: Benchmark on macOS Mojave (10.14.2), x86_64: $ ./python.exe -m perf compare_to fork_exec.json posix_spawn.json Mean +- std dev: [fork_exec] 2.79 ms +- 0.06 ms -> [posix_spawn] 1.64 ms +- 0.03 ms: 1.70x faster (-41%) The speedup is "only" 1.7x faster, it's less impressive. Maybe fork()+exec() is more efficient on macOS than on Linux. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 05:56:50 2018 From: report at bugs.python.org (=?utf-8?b?0JzQsNC60YHQuNC8INCQ0YDQuNGB0YLQvtCy?=) Date: Thu, 20 Dec 2018 10:56:50 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses Message-ID: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> New submission from ?????? ??????? : loop.create_connection doesn't handle ipv6 RFC4007 addresses right since 3.7 TEST CASE # Set up listener on link-local address fe80::1%lo sudo ip a add dev lo fe80::1 # 3.6 handles everything fine socat file:/dev/null tcp6-listen:12345,REUSEADDR & python3.6 -c 'import asyncio;loop=asyncio.get_event_loop();loop.run_until_complete(loop.create_connection(lambda:asyncio.Protocol(),host="fe80::1%lo",port="12345"))' # 3.7 and later fails socat file:/dev/null tcp6-listen:12345,REUSEADDR & python3.7 -c 'import asyncio;loop=asyncio.get_event_loop();loop.run_until_complete(loop.create_connection(lambda:asyncio.Protocol(),host="fe80::1%lo",port="12345"))' Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.7/asyncio/base_events.py", line 576, in run_until_complete return future.result() File "/usr/lib/python3.7/asyncio/base_events.py", line 951, in create_connection raise exceptions[0] File "/usr/lib/python3.7/asyncio/base_events.py", line 938, in create_connection await self.sock_connect(sock, address) File "/usr/lib/python3.7/asyncio/selector_events.py", line 475, in sock_connect return await fut File "/usr/lib/python3.7/asyncio/selector_events.py", line 480, in _sock_connect sock.connect(address) OSError: [Errno 22] Invalid argument CAUSE Upon asyncio.base_events.create_connection _ensure_resolved is called twice, first time here: https://github.com/python/cpython/blob/3.7/Lib/asyncio/base_events.py#L908 then here through sock_connect: https://github.com/python/cpython/blob/3.7/Lib/asyncio/base_events.py#L946 https://github.com/python/cpython/blob/3.7/Lib/asyncio/selector_events.py#L458 _ensure_resolved calls getaddrinfo, but in 3.7 implementation changed: % python3.6 -c 'import socket;print(socket.getaddrinfo("fe80::1%lo",12345)[0][4])' ('fe80::1%lo', 12345, 0, 1) % python3.7 -c 'import socket;print(socket.getaddrinfo("fe80::1%lo",12345)[0][4])' ('fe80::1', 12345, 0, 1) _ensure_connect only considers host and port parts of the address tuple: https://github.com/python/cpython/blob/3.7/Lib/asyncio/base_events.py#L1272 In case of 3.7 first call to _ensure_resolved returns ('fe80::1', 12345, 0, 1) then second call returns ('fe80::1', 12345, 0, 0) Notice that scope is now completely lost and is set to 0, thus actual call to socket.connect is wrong In case of 3.6 both first and second call to _ensure_resolved return ('fe80::1%lo', 12345, 0, 1) because in 3.6 case scope info is preserved in address and second call can derive correct address tuple ---------- components: asyncio messages: 332211 nosy: asvetlov, yselivanov, ?????? ??????? priority: normal severity: normal status: open title: asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 06:01:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 11:01:05 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545303665.93.0.788709270274.issue35537@psf.upfronthosting.co.za> STINNER Victor added the comment: Benchmark on FreeBSD: $ env/bin/python -m perf compare_to fork_exec.json posix_spawn.json Mean +- std dev: [fork_exec] 52.8 ms +- 4.7 ms -> [posix_spawn] 499 us +- 45 us: 105.91x faster (-99%) Wow! 106x faster! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 06:05:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 11:05:05 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545303905.0.0.788709270274.issue35537@psf.upfronthosting.co.za> STINNER Victor added the comment: See also: "How a fix in Go 1.9 sped up our Gitaly service by 30x" (hint: posix_spawn) https://about.gitlab.com/2018/01/23/how-a-fix-in-go-19-sped-up-our-gitaly-service-by-30x/ fork/exec vs. posix_spawn benchmarks: https://github.com/rtomayko/posix-spawn#benchmarks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 06:06:32 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Dec 2018 11:06:32 +0000 Subject: [issue35521] IDLE: Add doc section for Code Context and ref links. In-Reply-To: <1545093928.09.0.788709270274.issue35521@psf.upfronthosting.co.za> Message-ID: <1545303992.92.0.788709270274.issue35521@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 292cd6e33104d9f458232a14998fe5c62f7f7e81 by Terry Jan Reedy in branch 'master': bpo-35521: Add more cross-refs to IDLE docs (#11257) https://github.com/python/cpython/commit/292cd6e33104d9f458232a14998fe5c62f7f7e81 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 06:06:38 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 20 Dec 2018 11:06:38 +0000 Subject: [issue35521] IDLE: Add doc section for Code Context and ref links. In-Reply-To: <1545093928.09.0.788709270274.issue35521@psf.upfronthosting.co.za> Message-ID: <1545303998.98.0.788709270274.issue35521@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10493 _______________________________________ Python tracker _______________________________________ From mal at egenix.com Thu Dec 20 06:07:09 2018 From: mal at egenix.com (M.-A. Lemburg) Date: Thu, 20 Dec 2018 12:07:09 +0100 Subject: [issue35544] unicode.encode docstring says return value can be unicode In-Reply-To: <1545302936.41.0.788709270274.issue35544@psf.upfronthosting.co.za> References: <1545302936.41.0.788709270274.issue35544@psf.upfronthosting.co.za> Message-ID: You can install any codec you like and those essentially decide on what to return as type. However, the unicode methods only allow strings or unicode to be returned in Python 2. In Python 3, .encode() only allows bytes. You can still get the full codec encode/decode functionality via the codecs encode/decode methods in Python 3. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, Dec 20 2018) >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ >>> Python Database Interfaces ... http://products.egenix.com/ >>> Plone/Zope Database Interfaces ... http://zope.egenix.com/ ________________________________________________________________________ ::: We implement business ideas - efficiently in both time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ http://www.malemburg.com/ From report at bugs.python.org Thu Dec 20 06:07:14 2018 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 20 Dec 2018 11:07:14 +0000 Subject: [issue35544] unicode.encode docstring says return value can be unicode In-Reply-To: <1545302936.41.0.788709270274.issue35544@psf.upfronthosting.co.za> Message-ID: Marc-Andre Lemburg added the comment: You can install any codec you like and those essentially decide on what to return as type. However, the unicode methods only allow strings or unicode to be returned in Python 2. In Python 3, .encode() only allows bytes. You can still get the full codec encode/decode functionality via the codecs encode/decode methods in Python 3. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, Dec 20 2018) >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ >>> Python Database Interfaces ... http://products.egenix.com/ >>> Plone/Zope Database Interfaces ... http://zope.egenix.com/ ________________________________________________________________________ ::: We implement business ideas - efficiently in both time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ http://www.malemburg.com/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 06:15:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 11:15:37 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545304536.99.0.788709270274.issue35537@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: We need to add tests for all corner cases. I.e. disabling any of conditions for posix_spawn should cause the failure. We need to do also something with PyOS_BeforeFork/PyOS_AfterFork_Child/PyOS_AfterFork_Parent. ---------- nosy: +pablogsal, pitrou, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 06:19:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 11:19:53 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545304793.71.0.788709270274.issue35537@psf.upfronthosting.co.za> STINNER Victor added the comment: > We need to add tests for all corner cases. I.e. disabling any of conditions for posix_spawn should cause the failure. Do you mean running tests twice, one with posix_spawn(), one without? > We need to do also something with PyOS_BeforeFork/PyOS_AfterFork_Child/PyOS_AfterFork_Parent. Can you please elaborate? posix_spawn() may or may not use fork() internally. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 06:25:10 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 20 Dec 2018 11:25:10 +0000 Subject: [issue35521] IDLE: Add doc section for Code Context and ref links. In-Reply-To: <1545093928.09.0.788709270274.issue35521@psf.upfronthosting.co.za> Message-ID: <1545305110.29.0.788709270274.issue35521@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 5d0498a6967d45042b7a9345f6d871047edbaa25 by Miss Islington (bot) in branch '3.7': bpo-35521: Add more cross-refs to IDLE docs (GH-11257) https://github.com/python/cpython/commit/5d0498a6967d45042b7a9345f6d871047edbaa25 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 06:34:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 11:34:31 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545305671.78.0.788709270274.issue35537@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Do you mean running tests twice, one with posix_spawn(), one without? I mean that after writing tests they can be tested manually by disabling conditions for posix_spawn one by one. I.e. some tests should fail if remove "stdout is None" and some tests should fail if remove "not close_fds", etc. > Can you please elaborate? posix_spawn() may or may not use fork() internally. _posixsubprocess.fork_exec() calls PyOS_BeforeFork/PyOS_AfterFork_Child/PyOS_AfterFork_Parent. If use os.posix_spawn(), these calls will be omitted. This is a behavior change. We should either call these functions manually before/after os.posix_spawn() (but I do not know what to do with PyOS_AfterFork_Child), or disable using os.posix_spawn() if non-trivial callbacks were added, or use other methods for calling registered callbacks. But the stdlib already adds callbacks in the threading and random modules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 06:56:17 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 20 Dec 2018 11:56:17 +0000 Subject: [issue35544] unicode.encode docstring says return value can be unicode In-Reply-To: <1545302936.41.0.788709270274.issue35544@psf.upfronthosting.co.za> Message-ID: <20181220115610.GJ13061@ando.pearwood.info> Steven D'Aprano added the comment: > I'll keep on finding "-> string or unicode" misleading. How is it misleading when its true? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 07:28:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 12:28:17 +0000 Subject: [issue25184] "python -m pydoc -w" fails in nondecodable directory In-Reply-To: <1442696845.13.0.851195404942.issue25184@psf.upfronthosting.co.za> Message-ID: <1545308897.16.0.788709270274.issue25184@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could you please create a PR for your path Martin? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 07:28:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 12:28:32 +0000 Subject: [issue25184] "python -m pydoc -w" fails in nondecodable directory In-Reply-To: <1442696845.13.0.851195404942.issue25184@psf.upfronthosting.co.za> Message-ID: <1545308912.61.0.788709270274.issue25184@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 07:42:49 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Thu, 20 Dec 2018 12:42:49 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545309769.41.0.788709270274.issue35537@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: Serhiy, PyOS_* functions are called only if preexec_fn != None. But it will never be possible to implement support for preexec_fn (and some other subprocess features, e.g. close_fds) if processes are run via posix_spawn, so I don't see why anything should be done with those functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 07:54:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 12:54:20 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545310460.57.0.788709270274.issue35537@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, nice! So this is not an obstacle for using os.posix_spawn(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 08:02:23 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Thu, 20 Dec 2018 13:02:23 +0000 Subject: [issue35302] create_connection with local_addr misses valid socket bindings In-Reply-To: <1542997853.2.0.788709270274.issue35302@psf.upfronthosting.co.za> Message-ID: <1545310943.78.0.788709270274.issue35302@psf.upfronthosting.co.za> twisteroid ambassador added the comment: I don't have a Mac, so I have not tested Ronald's workaround. Assuming it works, we will have to either i) implement platform-specific behavior and only apply IPV6_V6ONLY on macOS for each AF_INET6 socket created, or ii) apply it to all AF_INET6 sockets on all platforms, ideally after testing the option on all these platforms to make sure it doesn't have any undesirable side effect. Linux's man page of ipv6 (http://man7.org/linux/man-pages/man7/ipv6.7.html ) has this to say about IPV6_V6ONLY: If this flag is set to true (nonzero), then the socket is re? stricted to sending and receiving IPv6 packets only. In this case, an IPv4 and an IPv6 application can bind to a single port at the same time. If this flag is set to false (zero), then the socket can be used to send and receive packets to and from an IPv6 address or an IPv4-mapped IPv6 address. So setting IPV6_V6ONLY might break some use cases? I have no idea how prevalent that may be. The upside of this solution, as well as the second suggestion in Neil's OP (filter out local addrinfos with mismatching family), is that they should not increase connect time for normal cases. My solution (for which I have already submitted a PR) probably has a negligible increase in connection time and resource usage, because a fresh socket object is created for each pair of remote and local addrinfo. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 08:06:44 2018 From: report at bugs.python.org (radiocane) Date: Thu, 20 Dec 2018 13:06:44 +0000 Subject: [issue35544] unicode.encode docstring says return value can be unicode In-Reply-To: <1545297536.15.0.788709270274.issue35544@psf.upfronthosting.co.za> Message-ID: <1545311204.56.0.788709270274.issue35544@psf.upfronthosting.co.za> radiocane added the comment: >> I'll keep on finding "-> string or unicode" misleading. > How is it misleading when its true? [I promise this is the last reply: I won't waste more of your time] me: How fast does this car go? docstring: 100 km/h or 300 km/h me: actually most people use it to do 100km/h and I don't know how to do 300 km/h people: no physical law forbids 300 km/h so it's true people2: if you remove the seats, the lights, the windshield etc and basically end up with a chassis with four wheels and a motor, it can do 300 km/h ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 08:24:44 2018 From: report at bugs.python.org (Windson Yang) Date: Thu, 20 Dec 2018 13:24:44 +0000 Subject: [issue35324] ssl: FileNotFoundError when do handshake In-Reply-To: <1543300721.51.0.788709270274.issue35324@psf.upfronthosting.co.za> Message-ID: <1545312284.95.0.788709270274.issue35324@psf.upfronthosting.co.za> Windson Yang added the comment: >From the docs Changed in version 3.7: Hostname or IP address is matched by OpenSSL during handshake. The function match_hostname() is no longer used. In case OpenSSL refuses a hostname or IP address, the handshake is aborted early and a TLS alert message is send to the peer. I guess OpenSSL refuse your IP address and port. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 08:54:16 2018 From: report at bugs.python.org (Windson Yang) Date: Thu, 20 Dec 2018 13:54:16 +0000 Subject: [issue35105] Document that CPython accepts "invalid" identifiers In-Reply-To: <1540815891.13.0.788709270274.issue35105@psf.upfronthosting.co.za> Message-ID: <1545314056.09.0.788709270274.issue35105@psf.upfronthosting.co.za> Change by Windson Yang : ---------- keywords: +patch pull_requests: +10494 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 09:07:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 14:07:13 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545314833.18.0.788709270274.issue35257@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10495 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 09:12:44 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 20 Dec 2018 14:12:44 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545315164.2.0.788709270274.issue35257@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: This change fixes a regression introduced in 3.6.8rc1 with https://bugs.python.org/issue31354 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 09:13:07 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 20 Dec 2018 14:13:07 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545315187.48.0.788709270274.issue35257@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: And also 3.7.2rc1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 09:18:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 14:18:34 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545315514.49.0.788709270274.issue35257@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10496 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 09:18:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 14:18:34 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1545315514.65.0.663665092547.issue35499@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10497 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 09:20:15 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 14:20:15 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545315615.16.0.788709270274.issue35257@psf.upfronthosting.co.za> STINNER Victor added the comment: Ned: We have to do something with this issue before 3.6 and 3.7 releases. Either revert or backport fixes (merge PR 11264 and PR 11265). ---------- priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 09:30:59 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 20 Dec 2018 14:30:59 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545316259.13.0.788709270274.issue35257@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Small correction. This regression has been on 3.7 for some time now (since it was the master branch then), but then I requested to have the buggy commit backported to 3.6 to fix the --with-lto flag there. Which unfortunately introduced the issue to 3.6 anyway. Master branch is fixed now and backports are open for 3.7 and 3.6 if those are to be accepted by the release manager. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 09:41:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 14:41:00 +0000 Subject: [issue35546] String formatting produces incorrect result with left-aligned zero-padded format Message-ID: <1545316860.16.0.788709270274.issue35546@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Compare printf-style string formatting and new-style string formatting. >>> '%-020d' % 42 '42 ' >>> format(42, '<020') '42000000000000000000' >>> format(42, '<020d') '42000000000000000000' >>> '%-020x' % 42 '2a ' >>> format(42, '<020x') '2a000000000000000000' >>> '%-020g' % 1.2e-8 '1.2e-08 ' >>> format(1.2e-8, '<020') '1.2e-080000000000000' >>> format(1.2e-8, '<020g') '1.2e-080000000000000' >>> format(1.2e-8, '<020e') '1.200000e-0800000000' New-style string formatting produces the result that looks like a correctly formatted number, but it represents incorrect number. I think that zero padding should not be allowed for left-aligned format for numbers (except the 'f' format). Zero padding is already disallowed for complex numbers. ---------- components: Interpreter Core messages: 332231 nosy: eric.smith, serhiy.storchaka priority: normal severity: normal status: open title: String formatting produces incorrect result with left-aligned zero-padded format _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 10:02:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 15:02:36 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545318156.17.0.788709270274.issue35257@psf.upfronthosting.co.za> STINNER Victor added the comment: I repeated the same tests for Python 3.7 on PR 11264. I replaced "38" with "37" and "3.8" and 3.7" and my 3 scripts :-) I modified step1.sh for PGO+LTO with -O0: set -x -e git clean -fdx ./configure CC=clang --with-lto --prefix /opt/py37 --enable-optimizations sed -i -e 's/^PROFILE_TASK=.*/PROFILE_TASK=-c pass/' Makefile sed -i -e 's/-O3/-O0/' Makefile make 2>&1|tee log grep -E -- '-o python|-o Python/bltinmodule.o|Modules/_asynciomodule.o' log|grep -c lto # 4 expected: -flto passed to compiler *and* linker Test results: ./configure CC=clang --with-lto --prefix /opt/py38 (1) 4 (2) 0, False => OK! (3) 0 => OK! ./configure CC=clang --with-lto --enable-shared (1) 4 (2) 0, False => OK! (3) 0 => OK! ./configure CC=clang --with-lto --enable-optimizations (1) 8 => OK! (2) 0, False => OK! (3) 0 => OK! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 10:03:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 15:03:04 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545318184.97.0.788709270274.issue35257@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0198f52ea2328fd932622ad2299381f617a041f2 by Victor Stinner in branch '3.7': bpo-35257: Avoid leaking LTO linker flags into distutils (GH-10900) (GH-11264) https://github.com/python/cpython/commit/0198f52ea2328fd932622ad2299381f617a041f2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 10:24:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 15:24:26 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545319466.07.0.788709270274.issue35257@psf.upfronthosting.co.za> STINNER Victor added the comment: I repeated the same tests for Python 3.6 on PR 11265: all tests are ok! I replaced "38" with "36" and "3.8" and 3.6" and my 3 scripts :-) I modified step1.sh for PGO+LTO and to compile with -O0 (just to make tests faster): similar script than in my previous message. ./configure CC=clang --with-lto --prefix /opt/py36 (1) 4 => OK! (2) 0, False => OK! (3) 0 => OK! ./configure CC=clang --with-lto --prefix /opt/py36 --enable-shared (1) 4 => OK! (2) 0, False => OK! (3) 0 => OK! ./configure CC=clang --with-lto --prefix /opt/py36 --enable-optimizations (1) 8 => OK! (2) 0, False => OK! (3) 0 => OK! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 10:50:50 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Thu, 20 Dec 2018 15:50:50 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545321050.72.0.788709270274.issue35537@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: Victor and Joannah, thanks for working on adding vfork() support to subprocess. Regarding speedups in the real world, I can share a personal anecdote. Back at the time when AOSP was built with make (I think it was AOSP 5) I've observed ~2x slowdown (or something close to that) if fork() is used instead of vfork() in make. This is the slowdown of the *whole* build (not just process creation time), and it's dramatic given the amount of pure computation (compilation of C++/Java code) involved in building AOSP. The underlying reason was that make merged all AOSP subproject makefiles into a single gigantic one, so make consumed more than 1 GB of RAM, and each shell invocation in recipes resulted in copying a large page table. That said, I'm not sure that the chosen approach of adding posix_spawn() "fast paths" for particular combinations of arguments is an optimal way to expose vfork() benefits to most users. For example, close_fds is True by default in subprocess, and I don't think there is a reliable way to use posix_spawn() in this case. So users would need to use "magic" combinations of arguments to subprocess.Popen to benefit from vfork(). Another example is "cwd" parameter: there is no standard posix_spawn file action to change the working directory in the child, so such a seemingly trivial operation would trigger the "slow" fork-exec path. Another approach would be to use vfork-exec instead fork-exec in _posixsubprocess. I know that previous discussions were resolved against vfork(), but I'm still not convinced and suggest to reevaluate those decisions again. Some arguments: 1. While POSIX contain scare-wording forbidding to do pretty anything in a vfork-spawned child, real systems where posix_spawn() is not a system call call vfork() and then execute all specified actions in the child. Cases where vfork() is avoided seem to be a quality-of-implementation issue, not a fundamental issue (for example, until recently glibc used fork() in some cases because of heap memory allocations, but they could be avoided). In practice, there is no problem with calling at least async-signal-safe functions in vfork-children, and there is no technical reason why there would be any problem. 2. _posixsubprocess is already very careful and calls only async-signal-safe functions in almost all cases (an obvious exception is preexec_fn, which is discouraged anyway). 3. Our use case for vfork() is restricted, so some concerns don't apply to us. For example, the setuid() problem outlined in Rich Felker's post (https://ewontfix.com/7) doesn't seem to apply. The problem with signal handlers from the same post should be possible to avoid except for preexec_fn, but we'd have to fallback to fork() in this case anyway due to memory allocation. 4. In the standard example of fork() unsafety in multithreaded processes (state of memory-based locks is copied to the child, and there could be nobody to unlock them), vfork() is *safer* than fork() because it still shares memory with the parent, and all threads other than the parent one are running. In particular, it should be perfectly safe to use any memory allocator that protects its state with something like futexes and atomics in a vfork-child even if other threads of the parent are using it concurrently. 5. Other language runtimes are already using vfork(). Java has been doing it for ages, and Victor referenced Go. Some possible counter-arguments: 1. We seem to be reimplementing posix_spawn(). In fact, due to (2) above, we can fully reuse the existing fork-exec code, with additional tweaks that doesn't seem hard at this point. 2. My points above are based on Linux, but I don't know much about other Unix-likes, so in theory additional complications could exist. I can't, however, imagine any fundamental complication. In the end, I think that migrating subprocess to vfork-exec would have more impact for users than adding "fast paths" and have consistent performance regardless of subprocess.Popen arguments (with few exceptions). Please consider it. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 11:06:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 16:06:01 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545321961.08.0.788709270274.issue35537@psf.upfronthosting.co.za> STINNER Victor added the comment: > In the end, I think that migrating subprocess to vfork-exec would have more impact for users than adding "fast paths" and have consistent performance regardless of subprocess.Popen arguments (with few exceptions). Please consider it. Thanks! I'm open to experiment to use vfork() in _posixsubprocess, but I still want to use posix_spawn(): * it's standard * it's safer * it can be more efficient On macOS, posix_spawn() is implemented as a syscall. Using vfork() can cause new issues: that's why there is a POSIX_SPAWN_USE_VFORK flag (the caller had to explicitly enable it). See also bpo-34663 the history of vfork in posix_spawn() in the glibc. I'm not against using it, but I'm not sure that vfork() can be used in all cases, when all subprocess options are used. Maybe you will end up with the same state: vfork() used or not depending on subprocess.Popen options... > For example, close_fds is True by default in subprocess, and I don't think there is a reliable way to use posix_spawn() in this case. Since PEP 446 has been implemented in Python 3.4, I would be interested to revisit close_fds default value: don't close by default... But I'm not sure if it's *safe* to change the default... At least, we may promote close_fds=False in the doc explaining that it's faster and should be safer in the common case. > Another example is "cwd" parameter: there is no standard posix_spawn file action to change the working directory in the child, so such a seemingly trivial operation would trigger the "slow" fork-exec path. I don't think that it's a bug that subprocess have different performances depending on the flags. It would be a bug if the behavior would be diffrent. I don't think that it's the case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 11:23:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 16:23:03 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1545322983.89.0.788709270274.issue35499@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10498 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 11:30:47 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Thu, 20 Dec 2018 16:30:47 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545323447.83.0.788709270274.issue35537@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: > I'm open to experiment to use vfork() in _posixsubprocess Are you going to do experiments? If not, I can try to do some in early January. > Using vfork() can cause new issues: that's why there is a POSIX_SPAWN_USE_VFORK flag (the caller had to explicitly enable it). See also bpo-34663 the history of vfork in posix_spawn() in the glibc. I've studied that, and that's what I referred to as "quality-of-implementation" problem. After glibc devs removed heap allocations and tweaked some other things, they could use vfork() in all cases. "musl" libc never had those problems and used vfork() from the beginning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 11:35:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 16:35:43 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545323743.97.0.788709270274.issue35537@psf.upfronthosting.co.za> STINNER Victor added the comment: > Are you going to do experiments? If not, I can try to do some in early January. I'm only interested to use posix_spawn(). If you want to experiment vfork() in _posixsubprocess: please go ahead! > I've studied that, and that's what I referred to as "quality-of-implementation" problem. After glibc devs removed heap allocations and tweaked some other things, they could use vfork() in all cases. "musl" libc never had those problems and used vfork() from the beginning. _posixsubprocess shouldn't allocate memory on the heap *after* fork(), only before. If it does, it's a bug. Last time I checked _posixsubprocess, it looked to be written properly. But the subprocess module has the crazy 'preexec_fn' option which makes things complicated... Maybe we should deprecate (and then remove) it, it's dangerous and it can be avoided in many cases. Using a launcher program is safer than relying on preexec_fn. In OpenStack, I reimplemented prlimit in pure Python. It's an example of launcher to set an option in the child process: https://github.com/openstack/oslo.concurrency/blob/master/oslo_concurrency/prlimit.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 11:42:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 16:42:39 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545324159.74.0.788709270274.issue35537@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy Storchaka, Alexey Izbyshev: I read and understood your valid concerns. restore_signals=True will be quickly implemented, and so posix_spawn() code path will be tested by more tests of test_subprocess. If not, I will ensure that missing tests will be added. Enhance _posixsubprocess to use vfork() is an interesting project, but IMHO it's complementary and doesn't replace all advantages of posix_spawn(). I am going to merge the PR tomorrow, except if someone sees a good reason to not merge it. I prefer to merge the PR early in the 3.8 development cycle to have more time to handle any issue if someone notice bugs. If something goes badly, we will be able to easily revert the change. Don't worry, I like to revert changes ;-) Again, I'm mentoring Joannah who is learning Python, so I prefer to move step by step (with small steps :-)). We will support more and more subprocess.Popen options. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 12:00:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 17:00:17 +0000 Subject: [issue22831] Use "with" to avoid possible fd leaks In-Reply-To: <1415560947.71.0.445590332058.issue22831@psf.upfronthosting.co.za> Message-ID: <1545325217.15.0.788709270274.issue22831@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c5d5dfdb223efb0e668e3f317d31b8b70ae96aa6 by Serhiy Storchaka in branch 'master': bpo-22831: Use "with" to avoid possible fd leaks in distutils. (GH-10921) https://github.com/python/cpython/commit/c5d5dfdb223efb0e668e3f317d31b8b70ae96aa6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 12:01:09 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Dec 2018 17:01:09 +0000 Subject: [issue35521] IDLE: Add doc section for Code Context and ref links. In-Reply-To: <1545093928.09.0.788709270274.issue35521@psf.upfronthosting.co.za> Message-ID: <1545325269.02.0.788709270274.issue35521@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 Dec 20 12:27:14 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 20 Dec 2018 17:27:14 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1545326834.56.0.788709270274.issue35482@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10499 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 12:27:18 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 20 Dec 2018 17:27:18 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1545326838.55.0.788709270274.issue35482@psf.upfronthosting.co.za> miss-islington added the comment: New changeset aae2e85af772a409bf8904bddc17efe9bf809174 by Miss Islington (bot) in branch '3.7': bpo-35482: Fixes HTML escaping in CHM index and build location of NEWS file (GH-11224) https://github.com/python/cpython/commit/aae2e85af772a409bf8904bddc17efe9bf809174 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 12:38:54 2018 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 20 Dec 2018 17:38:54 +0000 Subject: [issue35504] `del OSError().characters_written` raises `SystemError` In-Reply-To: <1544826144.81.0.788709270274.issue35504@psf.upfronthosting.co.za> Message-ID: <1545327534.46.0.788709270274.issue35504@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- pull_requests: +10500 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 12:38:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 17:38:56 +0000 Subject: [issue35504] `del OSError().characters_written` raises `SystemError` In-Reply-To: <1544826144.81.0.788709270274.issue35504@psf.upfronthosting.co.za> Message-ID: <1545327536.7.0.788709270274.issue35504@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f347c6eb75ca46990cd7ad3efbe02002603d8460 by Serhiy Storchaka (Zackery Spytz) in branch '2.7': bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. (GH-11175) (GH-11249) https://github.com/python/cpython/commit/f347c6eb75ca46990cd7ad3efbe02002603d8460 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 12:54:07 2018 From: report at bugs.python.org (Martijn Pieters) Date: Thu, 20 Dec 2018 17:54:07 +0000 Subject: [issue35547] email.parser / email.policy does correctly handle multiple RFC2047 encoded-word tokens across RFC5322 folded headers Message-ID: <1545328447.76.0.788709270274.issue35547@psf.upfronthosting.co.za> New submission from Martijn Pieters : The From header in the following email headers is not correctly decoded; both the subject and from headers contain UTF-8 encoded data encoded with RFC2047 encoded-words, in both cases a multi-byte UTF-8 codepoint has been split between the two encoded-word tokens: >>> msgdata = '''\ From: =?utf-8?b?4ZuX4Zqr4Zqx4ZuP4ZuB4ZuD4Zq+4ZuI4ZuB4ZuW4ZuP4ZuW4Zo=?= =?utf-8?b?seGbiw==?= Subject: =?utf-8?b?c8qHdcSxb2THnXBvyZQgOC3ihLLiiqXiiKkgx53Kh8qOcS3E?= =?utf-8?b?scqHyoNuya8gyaXKh8Sxyo0gx53Gg8mQc3PHncmvIMqHc8edyocgybnHncaDdW/Kgw==?= ''' >>> from io import StringIO >>> from email.parser import Parser >>> from email import policy >>> msg = Parser(policy=policy.default).parse(StringIO(msgdata)) >>> print(msg['Subject']) # correct s?u?od?po? 8-??? ???q-???n? ???? ???ss?? ?s?? ???uo? >>> print(msg['From']) # incorrect ????????????? ?? Note the two FFFD placeholders in the From line. The issue is that the raw value of the From and Subject contain the folding space at the start of the continuation lines: >>> for name, value in msg.raw_items(): ... if name in {'Subject', 'From'}: ... print(name, repr(value)) ... >From '=?utf-8?b?4ZuX4Zqr4Zqx4ZuP4ZuB4ZuD4Zq+4ZuI4ZuB4ZuW4ZuP4ZuW4Zo=?=\n =?utf-8?b?seGbiw==?= ' Subject '=?utf-8?b?c8qHdcSxb2THnXBvyZQgOC3ihLLiiqXiiKkgx53Kh8qOcS3E?=\n =?utf-8?b?scqHyoNuya8gyaXKh8Sxyo0gx53Gg8mQc3PHncmvIMqHc8edyocgybnHncaDdW/Kgw==?=' For the Subject header, _header_value_parser.get_unstructured is used, which *expects* there to be spaces between encoded words; it inserts EWWhiteSpaceTerminal tokens in between which are turned into empty strings. But for the From header, AddressHeader parser does not, the space at the start of the line is retained, and the surrogate escapes at the end of one encoded-word and the start start of the next encoded-word never ajoin, so the later handling of turning surrogates back into proper data fails. Since unstructured header parsing doesn't mind if a space is missing between encoded-word atoms, the work-around is to explicitly remove the space at the start of every line; this can be done in a custom policy: import re from email.policy import EmailPolicy class UnfoldingHeaderEmailPolicy(EmailPolicy): def header_fetch_parse(self, name, value): # remove any leading whitespace from header lines # before further processing value = re.sub(r'(?<=[\n\r])([\t ])', '', value) return super().header_fetch_parse(name, value) custom_policy = UnfoldingHeaderEmailPolicy() after which the From header comes out without placeholders: >>> msg = Parser(policy=custom_policy).parse(StringIO(msgdata)) >>> msg['from'] '?????????????? ' >>> msg['subject'] 's?u?od?po? 8-??? ???q-???n? ???? ???ss?? ?s?? ???uo?' This issue was found by way of https://stackoverflow.com/q/53868584/100297 ---------- messages: 332243 nosy: mjpieters priority: normal severity: normal status: open title: email.parser / email.policy does correctly handle multiple RFC2047 encoded-word tokens across RFC5322 folded headers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 13:11:09 2018 From: report at bugs.python.org (Matthew Barnett) Date: Thu, 20 Dec 2018 18:11:09 +0000 Subject: [issue35546] String formatting produces incorrect result with left-aligned zero-padded format In-Reply-To: <1545316860.16.0.788709270274.issue35546@psf.upfronthosting.co.za> Message-ID: <1545329469.67.0.788709270274.issue35546@psf.upfronthosting.co.za> Matthew Barnett added the comment: A similar issue exists with centring: >>> format(42, '^020') '00000000042000000000' ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 14:07:15 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 20 Dec 2018 19:07:15 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1545332835.4.0.788709270274.issue35482@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +10501 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 14:09:27 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 20 Dec 2018 19:09:27 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1545332967.29.0.788709270274.issue35482@psf.upfronthosting.co.za> Steve Dower added the comment: The 3.6 PR is blocked from merging, so looking to Ned to resolve. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 14:11:53 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Dec 2018 19:11:53 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1545333113.91.0.788709270274.issue35482@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 789b0ee023f14385a2fd635272768c3b55a99773 by Ned Deily (Steve Dower) in branch '3.6': bpo-35482: Fixes HTML escaping in CHM index and build location of NEWS file (GH-11224) (GH-11251) https://github.com/python/cpython/commit/789b0ee023f14385a2fd635272768c3b55a99773 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 14:31:52 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Dec 2018 19:31:52 +0000 Subject: [issue35485] Mac: tkinter windows turn black while resized In-Reply-To: <1544732559.26.0.788709270274.issue35485@psf.upfronthosting.co.za> Message-ID: <1545334312.09.0.788709270274.issue35485@psf.upfronthosting.co.za> Ned Deily added the comment: I'm seeing the same behavior, Terry. The installer's version was built from the Tk 8.6.9.1 release. I'll try building Tk from the core-8-6-branch unless Kevin has a better idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 14:33:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 19:33:57 +0000 Subject: [issue35424] multiprocessing.Pool: emit ResourceWarning In-Reply-To: <1544058034.55.0.788709270274.issue35424@psf.upfronthosting.co.za> Message-ID: <1545334437.83.0.788709270274.issue35424@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 9a8d1d7562b11969034b92217fe66aab7a951fb6 by Victor Stinner in branch 'master': bpo-35424: emit ResourceWarning at multiprocessing.Pool destruction (GH-10974) https://github.com/python/cpython/commit/9a8d1d7562b11969034b92217fe66aab7a951fb6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 14:34:35 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Dec 2018 19:34:35 +0000 Subject: [issue35485] Mac: tkinter windows turn black while resized In-Reply-To: <1544732559.26.0.788709270274.issue35485@psf.upfronthosting.co.za> Message-ID: <1545334475.1.0.788709270274.issue35485@psf.upfronthosting.co.za> Ned Deily added the comment: Also, to be clear, I'm seeing any IDLE window turn completely black while resizing including IDLE's shell window; the "import tkinter" ... commands aren't necessary to see the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 14:37:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 19:37:22 +0000 Subject: [issue35424] multiprocessing.Pool: emit ResourceWarning In-Reply-To: <1544058034.55.0.788709270274.issue35424@psf.upfronthosting.co.za> Message-ID: <1545334642.71.0.788709270274.issue35424@psf.upfronthosting.co.za> STINNER Victor added the comment: The first implementation of my PR also emitted ResourceWarning when .join() hasn't been called, but the merged PR only emit a warning if .close() and .terminated() have not been called: if the pool is still running. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 14:45:55 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 20 Dec 2018 19:45:55 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1545335155.43.0.788709270274.issue21478@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I think this should be handled in _check_and_set_parent where if value's type is FunctionType then value.mock should be used against which parent and name should be set since create_autospec returns function with mock attached to 'mock' attribute and all helper methods attached. There could be a case where a function is directly attached to mock where value will be of FunctionType but value.mock will not be set since it's not created with create_autospec and the AttributeError has to silenced. I think the below patch will handle both scenarios. This doesn't cause any test failure and hence it will be good to convert the original report as a unit test. Feedback welcome on the approach. I will raise a PR with tests and I am updating the relevant versions where this fix can be applied. Sample program from unittest import mock def foo(a, b): pass parent = mock.Mock() a = mock.create_autospec(foo) parent.child = a # 'a' is FunctionType and has a.mock attribute set (create_autospec -> _set_signature -> _setup_func) parent.child_func = foo # 'foo' is FunctionType with no mock attribute set that could cause AttributeError parent.child(1, 2) # Recorded parent.child_func(2, 3) # Not recorded since it's actual call to child_func and has no parent set due to AttributeError print(parent.method_calls) # [call.child(1, 2)] Patch : diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index 38189c9aec..143263722d 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -321,6 +321,12 @@ class _CallList(list): def _check_and_set_parent(parent, value, name, new_name): + if isinstance(value, FunctionTypes): + try: + value = value.mock + except AttributeError: + pass + if not _is_instance_mock(value): return False if ((value._mock_name or value._mock_new_name) or ---------- nosy: +cjw296, mariocj89, xtreak versions: +Python 3.7, Python 3.8 -Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 14:46:11 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Dec 2018 19:46:11 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1545335171.12.0.788709270274.issue35499@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 782e1d537778d93eb4cba1343f71bfc51e7e3c00 by Ned Deily (Victor Stinner) in branch '3.6': bpo-35499: make profile-opt don't override CFLAGS_NODIST (GH-11164) (GH-11267) https://github.com/python/cpython/commit/782e1d537778d93eb4cba1343f71bfc51e7e3c00 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:15:16 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Dec 2018 20:15:16 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1545336916.04.0.788709270274.issue35499@psf.upfronthosting.co.za> Change by Ned Deily : ---------- pull_requests: -10497 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:21:28 2018 From: report at bugs.python.org (Brett Cannon) Date: Thu, 20 Dec 2018 20:21:28 +0000 Subject: [issue22166] test_codecs leaks references In-Reply-To: <1407444567.64.0.0425446064781.issue22166@psf.upfronthosting.co.za> Message-ID: <1545337288.08.0.788709270274.issue22166@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:26:06 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Dec 2018 20:26:06 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1545337566.63.0.788709270274.issue31715@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset c7b7a43cd8964a90669bb37735cdafc5b0ec60cc by Ned Deily (Myles Borins) in branch '3.7': [3.7] bpo-31715 Add mimetype for extension .mjs (GH-3908) (GH-10977) https://github.com/python/cpython/commit/c7b7a43cd8964a90669bb37735cdafc5b0ec60cc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:28:32 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Dec 2018 20:28:32 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1545337712.04.0.788709270274.issue31715@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 70db385944ecf2ceed10ed7d91fce68399f9ca8a by Ned Deily (Myles Borins) in branch '3.6': [3.6] bpo-31715 Add mimetype for extension .mjs (GH-3908) (GH-10976) https://github.com/python/cpython/commit/70db385944ecf2ceed10ed7d91fce68399f9ca8a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:29:36 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Dec 2018 20:29:36 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1545337776.23.0.788709270274.issue31715@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset d9a2aca839b1326e011ecca17ba7b45123c47a64 by Ned Deily (Myles Borins) in branch '2.7': [2.7] bpo-31715 Add mimetype for extension .mjs (GH-3908) (GH-10978) https://github.com/python/cpython/commit/d9a2aca839b1326e011ecca17ba7b45123c47a64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:30:11 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Dec 2018 20:30:11 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1545337811.83.0.788709270274.issue31715@psf.upfronthosting.co.za> Change by Ned Deily : ---------- versions: +Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:31:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 20:31:24 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1545337884.14.0.788709270274.issue35499@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +10503 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:34:02 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Dec 2018 20:34:02 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1545338042.19.0.788709270274.issue35499@psf.upfronthosting.co.za> Change by Ned Deily : ---------- pull_requests: -10503 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:39:51 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Dec 2018 20:39:51 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545338391.14.0.788709270274.issue35257@psf.upfronthosting.co.za> Ned Deily added the comment: Also cherry-picked to 3.6 in commit a21bedf9edeacce6f0de3b2df0783e2ad6aa3b18 [3.6] bpo-35257: Avoid leaking LTO linker flags into distutils (GH-10900) (GH-11265) ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:48:16 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 20 Dec 2018 20:48:16 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1545338896.89.0.788709270274.issue35482@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 Thu Dec 20 15:50:02 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Dec 2018 20:50:02 +0000 Subject: [issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference. In-Reply-To: <1544641901.4.0.788709270274.issue35475@psf.upfronthosting.co.za> Message-ID: <1545339002.3.0.788709270274.issue35475@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 75f187478603de33c15f501a947207bfe8ba833f by Ned Deily (Miss Islington (bot)) in branch '3.6': bpo-35475: Add more PyImport* functions in refcounts.dat. (GH-11142) (GH-11199) https://github.com/python/cpython/commit/75f187478603de33c15f501a947207bfe8ba833f ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:56:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 20:56:27 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545339387.22.0.788709270274.issue35257@psf.upfronthosting.co.za> STINNER Victor added the comment: Just in case, I checked again 3.6 and 3.7 branches with "./configure CC=clang --with-lto --enable-shared": they still pass my manual tests ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 16:11:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 21:11:05 +0000 Subject: [issue35259] Py_FinalizeEx unconditionally exists in Py_LIMITED_API In-Reply-To: <1542306291.56.0.788709270274.issue35259@psf.upfronthosting.co.za> Message-ID: <1545340265.85.0.788709270274.issue35259@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3e8f962e63c2f929604443531a9a3aced242f3e8 by Serhiy Storchaka (Arthur Neufeld) in branch 'master': bpo-35259: Limit `Py_FinalizeEx()` to `Py_LIMITED_API >= 0x03060000`. (GH-10620) https://github.com/python/cpython/commit/3e8f962e63c2f929604443531a9a3aced242f3e8 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 16:11:15 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 20 Dec 2018 21:11:15 +0000 Subject: [issue35259] Py_FinalizeEx unconditionally exists in Py_LIMITED_API In-Reply-To: <1542306291.56.0.788709270274.issue35259@psf.upfronthosting.co.za> Message-ID: <1545340275.42.0.788709270274.issue35259@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10504 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 16:11:21 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 20 Dec 2018 21:11:21 +0000 Subject: [issue35259] Py_FinalizeEx unconditionally exists in Py_LIMITED_API In-Reply-To: <1542306291.56.0.788709270274.issue35259@psf.upfronthosting.co.za> Message-ID: <1545340281.92.0.788709270274.issue35259@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +10505 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 16:22:12 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Dec 2018 21:22:12 +0000 Subject: [issue35360] Update SQLite to 3.26 in Windows and macOS installer builds In-Reply-To: <1543580070.45.0.788709270274.issue35360@psf.upfronthosting.co.za> Message-ID: <1545340932.83.0.788709270274.issue35360@psf.upfronthosting.co.za> Ned Deily added the comment: We should look at doing this for the next set of maintenance updates. This doesn't appear to be critical enough to delay current releases unless someone can show how this exploit could be used in a typical Python application. ---------- components: +macOS nosy: +ned.deily, ronaldoussoren priority: normal -> high title: [Windows] Update SQLite dependency -> Update SQLite to 3.26 in Windows and macOS installer builds versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 16:28:32 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Dec 2018 21:28:32 +0000 Subject: [issue35461] Document C API functions which swallow exceptions In-Reply-To: <1544534848.15.0.788709270274.issue35461@psf.upfronthosting.co.za> Message-ID: <1545341312.96.0.788709270274.issue35461@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset ff740db42326082fac7d415ae9aff148628a83ed by Ned Deily (Miss Islington (bot)) in branch '3.6': bpo-35461: Document C API functions which suppress exceptions. (GH-11119) (GH-11210) https://github.com/python/cpython/commit/ff740db42326082fac7d415ae9aff148628a83ed ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 16:29:51 2018 From: report at bugs.python.org (Erwan Le Pape) Date: Thu, 20 Dec 2018 21:29:51 +0000 Subject: [issue34686] Add `-r`, as opposed to `-R` to Python core interpreter In-Reply-To: <1536946920.27.0.956365154283.issue34686@psf.upfronthosting.co.za> Message-ID: <1545341391.78.0.788709270274.issue34686@psf.upfronthosting.co.za> Erwan Le Pape added the comment: As mentioned by Benjamin Peterson, this is a duplicate of #34722, which already has an implementation proposal by Peter Ebden. While implementation specifics change, the aim is the same and #34722 is the better solution (again, credit to Benjamin Peterson). ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 16:39:39 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 20 Dec 2018 21:39:39 +0000 Subject: [issue35259] Py_FinalizeEx unconditionally exists in Py_LIMITED_API In-Reply-To: <1542306291.56.0.788709270274.issue35259@psf.upfronthosting.co.za> Message-ID: <1545341979.13.0.788709270274.issue35259@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d1e717588728a23d576c4ead775f7dbd68149696 by Miss Islington (bot) in branch '3.7': bpo-35259: Limit `Py_FinalizeEx()` to `Py_LIMITED_API >= 0x03060000`. (GH-10620) https://github.com/python/cpython/commit/d1e717588728a23d576c4ead775f7dbd68149696 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 16:41:18 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 20 Dec 2018 21:41:18 +0000 Subject: [issue35546] String formatting produces incorrect result with left-aligned zero-padded format In-Reply-To: <1545316860.16.0.788709270274.issue35546@psf.upfronthosting.co.za> Message-ID: <1545342078.75.0.788709270274.issue35546@psf.upfronthosting.co.za> Eric V. Smith added the comment: I think this falls in to the consenting adults category. You can also do things like: >>> format(42, '->3') '-42' But why bother preventing this? It is unfortunate that %-formatting and .__format__() are different in this regard, but at this point I wouldn't recommend making any changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 16:45:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 21:45:36 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545342336.19.0.788709270274.issue35537@psf.upfronthosting.co.za> STINNER Victor added the comment: I wasn't sure how posix_spawn() handles file descriptors of standard streams with O_CLOEXEC flag set. I wrote a test. Result: _posixsubprocess and os.posix_spawn() have the same behavior! If fd 2 (stderr) is marked with O_CLOEXEC, the fd 2 is closed in the child process, as expected. (There is no black magic to keep it open.) $ cat x.py import subprocess, sys, os args = [sys.executable, 'y.py'] os.set_inheritable(2, False) subprocess.run(args, close_fds=False, restore_signals=False) $ cat y.py import os def fd_valid(fd): try: os.fstat(fd) return True except OSError: return False for fd in (0, 1, 2): print("fd %s valid? %s" % (fd, fd_valid(fd))) $ python3 x.py # unpatched fd 0 valid? True fd 1 valid? True fd 2 valid? False $ ./python x.py # patched, use posix_spawn() fd 0 valid? True fd 1 valid? True fd 2 valid? False ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 16:52:13 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Dec 2018 21:52:13 +0000 Subject: [issue35259] Py_FinalizeEx unconditionally exists in Py_LIMITED_API In-Reply-To: <1542306291.56.0.788709270274.issue35259@psf.upfronthosting.co.za> Message-ID: <1545342733.97.0.788709270274.issue35259@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 5241ecff161ccf34083b6a824d1ae6d79917d889 by Ned Deily (Miss Islington (bot)) in branch '3.6': bpo-35259: Limit `Py_FinalizeEx()` to `Py_LIMITED_API >= 0x03060000`. (GH-10620) (GH-11269) https://github.com/python/cpython/commit/5241ecff161ccf34083b6a824d1ae6d79917d889 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 16:52:47 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Dec 2018 21:52:47 +0000 Subject: [issue35485] Mac: tkinter windows turn black while resized In-Reply-To: <1544732559.26.0.788709270274.issue35485@psf.upfronthosting.co.za> Message-ID: <1545342767.24.0.788709270274.issue35485@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The point of the minimal code snippet is that the behavior is tk/tkinter generic and not specific to Texts or IDLE or particular non-default parameters or geometry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 16:58:30 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Dec 2018 21:58:30 +0000 Subject: [issue35485] Mac: tkinter windows turn black while resized In-Reply-To: <1544732559.26.0.788709270274.issue35485@psf.upfronthosting.co.za> Message-ID: <1545343110.25.0.788709270274.issue35485@psf.upfronthosting.co.za> Ned Deily added the comment: > The point of the minimal code snippet is that the behavior is tk/tkinter generic Ah! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 16:58:46 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 21:58:46 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545343126.93.0.788709270274.issue35537@psf.upfronthosting.co.za> STINNER Victor added the comment: Options that should be easy to support later: * relative executable: use shutil.which() or expose C posix_spawnp() function as os.posix_spawnp() * env: just pass it as the 3rd argument of os.posix_spawn() (trivial patch) * restore_signals: use setsigdef (Joannah has a patch) I don't see how to support following options: * preexec_fn: I really hate this feature... * cwd * start_new_session * close_fds: there is posix_spawn_file_actions_addclose(), but I'm not sure that we can create a list of file descriptor in a reliable way, since a different thread can open a FD in the meanwhile... Currently, _posixsubprocess iterates on /proc/self/fd/ *after* the fork, when there is a single thread. * pass_fds: there is not API to mark a fd as inheritable (clear O_CLOEXEC flag). We cannot just change the O_CLOEXEC temporarily since a different thread can spawn a child process "at the same time". The GIL doesn't protect C threads which don't use the GIL. For pipes like stdout=PIPE or stdout=fd, I didn't look yet how to implement that properly. Maybe one way to work around the pass_fds limitation in an applicaton is to mark the FDs to pass as inheritable (os.set_inheritable(fd, True)) and use close_fds=False: fd = ... subprocess.Popen(..., pass_fds={fd}) os.close(fd) would become: fd = ... os.set_inheritable(fd, True) subprocess.Popen(..., close_fds=False) os.close(fd) But this pattern is not thread if the application has other threads. So that should be the responsibility of the developer, not of Python, to write "unsafe" code" which requires the knownledge of the application behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 17:03:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 22:03:37 +0000 Subject: =?utf-8?q?=5Bissue27772=5D_Refer_to_actual_format_string_when_creating_?= =?utf-8?q?=E2=80=9Czero_padding=E2=80=9D_error_message?= In-Reply-To: <1471322118.97.0.225723730885.issue27772@psf.upfronthosting.co.za> Message-ID: <1545343417.0.0.788709270274.issue27772@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10506 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 17:10:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 22:10:12 +0000 Subject: =?utf-8?q?=5Bissue27772=5D_Refer_to_actual_format_string_when_creating_?= =?utf-8?q?=E2=80=9Czero_padding=E2=80=9D_error_message?= In-Reply-To: <1471322118.97.0.225723730885.issue27772@psf.upfronthosting.co.za> Message-ID: <1545343812.13.0.788709270274.issue27772@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 11270 fixes this issue by making such format valid. Preceding the width field by '0' no longer affects the default alignment for strings, i.e. no longer sets the alignment to invalid '=' if it is not specified explicitly. >>> format('abc', '<8') 'abc ' >>> format('abc', '8') 'abc ' >>> format('abc', '<08') 'abc00000' >>> format('abc', '08') 'abc00000' This does not contradict the documentation, which specifies this case for numeric types, but not for strings. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 17:10:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2018 22:10:31 +0000 Subject: =?utf-8?q?=5Bissue27772=5D_Refer_to_actual_format_string_when_creating_?= =?utf-8?q?=E2=80=9Czero_padding=E2=80=9D_error_message?= In-Reply-To: <1471322118.97.0.225723730885.issue27772@psf.upfronthosting.co.za> Message-ID: <1545343831.28.0.788709270274.issue27772@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +Interpreter Core versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 17:11:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2018 22:11:25 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545343885.0.0.788709270274.issue35537@psf.upfronthosting.co.za> STINNER Victor added the comment: > I am going to merge the PR tomorrow, except if someone sees a good reason to not merge it. I changed my mind and I decided to wait until I'm back from holiday instead :-) https://github.com/python/cpython/pull/11242#issuecomment-449151524 The function is more tricky than what I expected! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 17:32:04 2018 From: report at bugs.python.org (Chase N Peterson) Date: Thu, 20 Dec 2018 22:32:04 +0000 Subject: [issue34745] asyncio ssl memory leak In-Reply-To: <1537396860.59.0.956365154283.issue34745@psf.upfronthosting.co.za> Message-ID: <1545345124.08.0.788709270274.issue34745@psf.upfronthosting.co.za> Chase N Peterson added the comment: I ran the code snippet below using uvloop/master in a docker container. As it ran, the container continually leaked memory. I included a graph with the memory usage. Environment: # cat /etc/*-release PRETTY_NAME="Debian GNU/Linux 9 (stretch)" NAME="Debian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" # uname -r 4.18.16-300.fc29.x86_64 # python -V Python 3.7.1 # pip freeze asyncio==3.4.3 Cython==0.29.2 idna==2.8 multidict==4.5.2 uvloop==0.12.0rc2 yarl==1.3.0 I had to tweak the code a bit to run in a docker container successfully, but here is the code I used: import asyncio import logging import ssl import socket import sys import yarl import uvloop CREDENTIAL = '' URLS = { 'https://s3.us-west-2.amazonaws.com/archpi.dabase.com/style.css': { 'method': 'get', 'headers': {'User-Agent': 'Botocore/1.8.21 Python/3.6.4 Darwin/17.5.0', 'X-Amz-Date': '20180518T025044Z', 'X-Amz-Content-SHA256': 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'Authorization': f'AWS4-HMAC-SHA256 Credential={CREDENTIAL}/20180518/us-west-2/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=ae552641b9aa9a7a267fcb4e36960cd5863e55d91c9b45fd39b30fdcd2e81489', 'Accept-Encoding': 'identity'} }, 'https://s3.ap-southeast-1.amazonaws.com/archpi.dabase.com/doesnotexist': { 'method': 'GET' if sys.argv[1] == 'get_object' else 'HEAD', 'headers': {'User-Agent': 'Botocore/1.8.21 Python/3.6.4 Darwin/17.5.0', 'X-Amz-Date': '20180518T025221Z', 'X-Amz-Content-SHA256': 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'Authorization': f'AWS4-HMAC-SHA256 Credential={CREDENTIAL}/20180518/ap-southeast-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=7a7675ef6d70cb647ed59e02d532ffa80d437fb03976d8246ea9ef102d118794', 'Accept-Encoding': 'identity'} } } asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) class HttpClient(asyncio.streams.FlowControlMixin): transport = None def __init__(self, *args, **kwargs): self.__url = kwargs.pop('url') self.__logger = logging.getLogger() super().__init__() def connection_made(self, transport): self.transport = transport url_parts = yarl.URL(self.__url) entry = URLS[self.__url] body = f'{entry["method"]} {url_parts.path} HTTP/1.1\r\nAccept: */*\r\nHost: {url_parts.host}\r\n' for name, value in entry['headers'].items(): body += f'{name}: {value}\r\n' body += '\r\n' self.transport.write(body.encode('ascii')) self.__logger.info(f'data sent: {body}') def data_received(self, data): self.__logger.info(f'data received: {data}') self.transport.close() # asyncio.get_event_loop().call_later(1.0, ) def eof_received(self): self.__logger.info('eof_received') def connection_lost(self, exc): self.__logger.info(f'connection lost: {exc}') super().connection_lost(exc) @classmethod def create_factory(cls, url: str): def factory(*args, **kwargs): return cls(*args, url=url, **kwargs) return factory async def test_asyncio(ssl_context): loop = asyncio.get_event_loop() url = 'https://s3.ap-southeast-1.amazonaws.com/archpi.dabase.com/doesnotexist' url_parts = yarl.URL(url) port = url_parts.port or (80 if url_parts.scheme == 'http' else 443) infos = await loop.getaddrinfo(url_parts.host, port, family=socket.AF_INET) family, type, proto, canonname, sockaddr = infos[0] await loop.create_connection(HttpClient.create_factory(url), sockaddr[0], port, ssl=ssl_context, family=family, proto=proto, flags=socket.AI_NUMERICHOST, server_hostname=url_parts.host, local_addr=None) async def asyncio_test(): ssl_context = ssl.create_default_context() while True: await test_asyncio(ssl_context) def main(): print('running') loop = asyncio.get_event_loop() loop.run_until_complete(asyncio_test()) main() ---------- nosy: +cnpeterson Added file: https://bugs.python.org/file48012/memory_usage.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 17:34:52 2018 From: report at bugs.python.org (Alexander Mohr) Date: Thu, 20 Dec 2018 22:34:52 +0000 Subject: [issue34745] asyncio ssl memory leak In-Reply-To: <1537396860.59.0.956365154283.issue34745@psf.upfronthosting.co.za> Message-ID: <1545345292.29.0.788709270274.issue34745@psf.upfronthosting.co.za> Change by Alexander Mohr : ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 17:59:10 2018 From: report at bugs.python.org (Kevin Walzer) Date: Thu, 20 Dec 2018 22:59:10 +0000 Subject: [issue35485] Mac: tkinter windows turn black while resized In-Reply-To: <1544732559.26.0.788709270274.issue35485@psf.upfronthosting.co.za> Message-ID: <1545346750.93.0.788709270274.issue35485@psf.upfronthosting.co.za> Kevin Walzer added the comment: http://core.tcl.tk/tk/tktview?name=ef9c3730e3 has some useful information on this from the Tk side. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 18:08:59 2018 From: report at bugs.python.org (Erwan Le Pape) Date: Thu, 20 Dec 2018 23:08:59 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1545347339.18.0.788709270274.issue35545@psf.upfronthosting.co.za> Erwan Le Pape added the comment: While the 3.7+ getaddrinfo isn't the best human representation of an IPv6 address, I believe it does make the most sense to keep it that way. In any case, this is a regression and changing return values of getaddrinfo for 3.7 isn't something that should be considered. The issue stems from the refactoring of the underlying socketmodule.c handling of IPv4/IPv6 addresses with dedicated make_ipv4_addr and make_ipv6_addr functions which returns proper tuples of: str/int for IPv4: https://github.com/python/cpython/blob/master/Modules/socketmodule.c#L1270 str/int/int/int for IPv6: https://github.com/python/cpython/blob/master/Modules/socketmodule.c#L1325 The actual issue is that _ensure_resolved naively assumes IPv4 and truncates the address to its first 2 members https://github.com/python/cpython/blob/3.7/Lib/asyncio/base_events.py#L1269 and never redefines them again in the case where they were set. I'd suggest passing the remaining elements of address in a packed *args or an optional flowinfo=0, scopeid=0 to _ipaddr_info since fundamentally, that's the method stripping valuable information. ---------- nosy: +lepaperwan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 18:21:45 2018 From: report at bugs.python.org (Erwan Le Pape) Date: Thu, 20 Dec 2018 23:21:45 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1545348105.82.0.788709270274.issue35545@psf.upfronthosting.co.za> Change by Erwan Le Pape : ---------- keywords: +patch pull_requests: +10507 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 19:15:26 2018 From: report at bugs.python.org (Martijn Pieters) Date: Fri, 21 Dec 2018 00:15:26 +0000 Subject: [issue35547] email.parser / email.policy does correctly handle multiple RFC2047 encoded-word tokens across RFC5322 folded headers In-Reply-To: <1545328447.76.0.788709270274.issue35547@psf.upfronthosting.co.za> Message-ID: <1545351326.54.0.788709270274.issue35547@psf.upfronthosting.co.za> Change by Martijn Pieters : ---------- components: +email nosy: +barry, r.david.murray type: -> behavior versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 19:52:03 2018 From: report at bugs.python.org (Martijn Pieters) Date: Fri, 21 Dec 2018 00:52:03 +0000 Subject: [issue35547] email.parser / email.policy does correctly handle multiple RFC2047 encoded-word tokens across RFC5322 folded headers In-Reply-To: <1545328447.76.0.788709270274.issue35547@psf.upfronthosting.co.za> Message-ID: <1545353523.78.0.788709270274.issue35547@psf.upfronthosting.co.za> Martijn Pieters added the comment: Right, re-educating myself on the MIME RFCs, and found https://bugs.python.org/issue1372770 where the same issue is being discussed for previous incarnations of the email library. Removing the FWS after CRLF is the wrong thing to do, **unless** RFC2047 separating encoded-word tokens. The work-around regex is a bit more complicated, but ideally the EW handling should use a specialist FWS token to delimit encoded-word sections that renders to '' as is done in unstructured headers, but everywhere. Because in practice, there are email clients out there that use EW in structured headers, regardless. Regex to work around this # crude CRLF-FWS-between-encoded-word matching value = re.sub(r'(?<=\?=(\r\n|\n|\r))([\t ]+)(?==\?)', '', value) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 20:11:19 2018 From: report at bugs.python.org (Martijn Pieters) Date: Fri, 21 Dec 2018 01:11:19 +0000 Subject: [issue35547] email.parser / email.policy does correctly handle multiple RFC2047 encoded-word tokens across RFC5322 folded headers In-Reply-To: <1545328447.76.0.788709270274.issue35547@psf.upfronthosting.co.za> Message-ID: <1545354679.78.0.788709270274.issue35547@psf.upfronthosting.co.za> Martijn Pieters added the comment: That regex is incorrect, I should not post untested code from a mobile phone. Corrected workaround with more context: import re from email.policy import EmailPolicy class UnfoldingEncodedStringHeaderPolicy(EmailPolicy): def header_fetch_parse(self, name, value): # remove any leading whitespace from header lines # that separates apparent encoded-word token before further processing # using somewhat crude CRLF-FWS-between-encoded-word matching value = re.sub(r'(?<=\?=)((?:\r\n|[\r\n])[\t ]+)(?==\?)', '', value) return super().header_fetch_parse(name, value) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 00:13:30 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Dec 2018 05:13:30 +0000 Subject: [issue35208] IDLE: Squeezed lines count ignores window width In-Reply-To: <1541834301.3.0.788709270274.issue35208@psf.upfronthosting.co.za> Message-ID: <1545369210.89.0.788709270274.issue35208@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Tal, trying to understand your confused description of what behavior you want to fix required me to experiment and think. There are at least 2 separate issues: triggering of auto-squeeze and lines reported (regardless of what triggers squeezing). The following pair of experiments exhibits inconsistency in both respects. >>> print('a'*3920) # Fills 49 80-char lines, correctly not squeezed. ... >>> print('a'*3921) # Wrapped to 50 lines, correctly auto squeezed. [Squeezed text (50 lines).] # Correct number when reporting wrapped lines. >>> print('a'*3921+'\n') # Ditto, but not auto-squeezed. ... # Squeeze manually [Squeezed text (1 line).] # Different line count -- of output lines. >>> print('a'*3920+'\na') # Not initially squeezed, '2 lines'. >From msg331784 it appears that you are more concerned here with auto squeeze triggering than with line count. Now that I think I know what you are trying to fix, I can review the code change. I agree to consider the ambiguity between output lines and display lines, and the effect on line count, later. Part of my thinking with the simple auto-squeeze formula, besides just simplifying the code, it this. Raymond claimed that squeezing slows down printing. If measurably true, one way to avoid a slow down would be to use a simple heuristic formula to estimate the number of wrapped lines instead of exactly counting. This would be a separate issue, if needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 00:52:06 2018 From: report at bugs.python.org (era) Date: Fri, 21 Dec 2018 05:52:06 +0000 Subject: [issue35547] email.parser / email.policy does correctly handle multiple RFC2047 encoded-word tokens across RFC5322 folded headers In-Reply-To: <1545328447.76.0.788709270274.issue35547@psf.upfronthosting.co.za> Message-ID: <1545371526.56.0.788709270274.issue35547@psf.upfronthosting.co.za> era added the comment: I don't think this is a bug. My impression is that encoded words should be decodable in isolation. ---------- nosy: +era _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 01:18:19 2018 From: report at bugs.python.org (Ilya Kulakov) Date: Fri, 21 Dec 2018 06:18:19 +0000 Subject: [issue35548] memoryview needlessly (?) requires represented object to be hashable Message-ID: <1545373099.64.0.788709270274.issue35548@psf.upfronthosting.co.za> New submission from Ilya Kulakov : Implementation of memoryview's hashing method [1] imposes the following constraints in order to be hashable (per documentation): > One-dimensional memoryviews of hashable (read-only) types with formats ?B?, ?b? or ?c? are also hashable. The hash is defined as hash(m) == hash(m.tobytes()): However it's not clear why original type needs to be hashable given that memoryview deals with 1-dimensional read-only bytes representation of an object. Not only it requires the developer to make an extra copy of C-bytes, but also calls __hash__ of a represented object without using the result other than to detect an error. My particular use case involves a memory view of a readonly numpy's ndarray. My view satisfies the following constraints: >>> print(data.format, data.readonly, data.shape, data.c_contiguous) b True (25,) True But nevertheless the hashing fails because ndarray itself is not hashable. Stefan Krah wrote [2]: > Note that memory_hash() raises an error if the exporter *itself* is not hashable, so it only hashes immutable objects by design. But while __hash__ indeed tells that object is (supposed to be) immutable, there is no requirement for all immutable objects to have __hash__. Both threads I have found ([3], [4]) are quite lengthy and show certain discord in opinions regarding the issue. Perhaps after 6 years since the release of the feature the view on the problem has changed? 1: https://github.com/python/cpython/blob/d1e717588728a23d576c4ead775f7dbd68149696/Objects/memoryobject.c#L2829-L2876 2: https://bugs.python.org/issue15814#msg169510 3: https://bugs.python.org/issue15573 4: https://bugs.python.org/issue15573 ---------- components: Library (Lib) messages: 332280 nosy: Kentzo, skrah priority: normal severity: normal status: open title: memoryview needlessly (?) requires represented object to be hashable versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 01:21:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Dec 2018 06:21:02 +0000 Subject: [issue35259] Py_FinalizeEx unconditionally exists in Py_LIMITED_API In-Reply-To: <1542306291.56.0.788709270274.issue35259@psf.upfronthosting.co.za> Message-ID: <1545373262.29.0.788709270274.issue35259@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 Dec 21 01:31:43 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Dec 2018 06:31:43 +0000 Subject: [issue22703] Idle Code Context menu entrie(s) In-Reply-To: <1414023415.32.0.701318253357.issue22703@psf.upfronthosting.co.za> Message-ID: <1545373903.68.0.788709270274.issue22703@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is a dependency of #33610. ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 01:45:10 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 21 Dec 2018 06:45:10 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1545374710.33.0.788709270274.issue21478@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +10508 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 02:39:38 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 21 Dec 2018 07:39:38 +0000 Subject: [issue24928] mock.patch.dict spoils order of items in collections.OrderedDict In-Reply-To: <1440443995.19.0.0795335566212.issue24928@psf.upfronthosting.co.za> Message-ID: <1545377978.61.0.788709270274.issue24928@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thinking about it further the attached test is based on the ordering of dict and hence works only on 3.6 and above. But this test will be backported to mock on PyPI where this will fail on 2.7 and 3.4, 3.5. Is it okay to apply the fix that makes backporting easy though it has no effect on current CPython implementation or to only apply the test since it's fixed in CPython due to dict implementation detail and make sure the cabal backporting is done with this detail taken into account to run test only on 3.6+. But the latter makes the issue still prevalent in cabal's mock repo. I think it's better to apply the fix along with the test that will make it easy on both ends. I am not aware of the backport process for mock on PyPI so feedback will be helpful on this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 04:47:37 2018 From: report at bugs.python.org (Roman Inflianskas) Date: Fri, 21 Dec 2018 09:47:37 +0000 Subject: [issue35549] Add partial_match: bool = False argument to unicodedata.lookup Message-ID: <1545385657.75.0.788709270274.issue35549@psf.upfronthosting.co.za> New submission from Roman Inflianskas : I propose to add partial_match: bool = False argument to unicodedata.lookup so that the programmer could search Unicode symbols using partial_names. ---------- components: Unicode messages: 332283 nosy: ezio.melotti, rominf, vstinner priority: normal severity: normal status: open title: Add partial_match: bool = False argument to unicodedata.lookup type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 05:08:03 2018 From: report at bugs.python.org (Jakub Kulik) Date: Fri, 21 Dec 2018 10:08:03 +0000 Subject: [issue35550] Some define guards for Solaris are wrong Message-ID: <1545386883.42.0.788709270274.issue35550@psf.upfronthosting.co.za> New submission from Jakub Kulik : Python source code uses on several places ifdef sun or defined(sun) without the underscores, which is not standard compliant and shouldn't be used. Our recent Solaris python build ended up skipping these sections resulting in some obvious problems. Defines should check for __sun instead. (link: http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system#Solaris) ---------- components: Build messages: 332284 nosy: kulikjak priority: normal severity: normal status: open title: Some define guards for Solaris are wrong versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 05:08:12 2018 From: report at bugs.python.org (BLKSerene) Date: Fri, 21 Dec 2018 10:08:12 +0000 Subject: [issue35551] Encoding and alias issues Message-ID: <1545386892.27.0.788709270274.issue35551@psf.upfronthosting.co.za> New submission from BLKSerene : There're some minor issues about encodings supported by Python. 1. "tis260" is the alias for "tactis", where "tis260" might be a typo, which should be tis620. And "tactis" is not a supported encoding by Python (and I can't find any information about this encoding on Google). 2. "mac_latin2" and "mac_centeuro" refer to the same encoding (the decoding tables are identical), but they are provided as two encodings in different names ("maccentraleurope" is an alias for "mac_latin2", but "mac_centeuro" isn't). 3. The same problem for "latin_1" and "iso8859_1" ("iso_8859_1" is an alias for "latin_1", but "iso8859_1" isn't). ---------- components: Unicode messages: 332285 nosy: blkserene, ezio.melotti, vstinner priority: normal severity: normal status: open title: Encoding and alias issues type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 05:10:12 2018 From: report at bugs.python.org (Jakub Kulik) Date: Fri, 21 Dec 2018 10:10:12 +0000 Subject: [issue35550] Some define guards for Solaris are wrong In-Reply-To: <1545386883.42.0.788709270274.issue35550@psf.upfronthosting.co.za> Message-ID: <1545387012.89.0.788709270274.issue35550@psf.upfronthosting.co.za> Change by Jakub Kulik : ---------- keywords: +patch pull_requests: +10509 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 05:14:38 2018 From: report at bugs.python.org (Mario Corchero) Date: Fri, 21 Dec 2018 10:14:38 +0000 Subject: [issue24928] mock.patch.dict spoils order of items in collections.OrderedDict In-Reply-To: <1440443995.19.0.0795335566212.issue24928@psf.upfronthosting.co.za> Message-ID: <1545387278.86.0.788709270274.issue24928@psf.upfronthosting.co.za> Mario Corchero added the comment: I would suggest applying the fix with the latest version in mind to keep the codebase clean. If you want to backport it to previous versions of Python you can do it manually through a PR targetting the right branch. I think the process is to set up a label and then use https://github.com/python/core-workflow/tree/master/cherry_picker as I'd expect the tests to fail to apply the patch "manually. Alternative 1: Might be easier is to send a patch that works in all version and another one that "modernises" it to python3.7. Basically, write all tests with OrderedDict and then just shoot an extra PR that converts that to a plain dict. Alternative 2: This is only a problem on versions on versions < 3.6, isn't it? If so you might want to close this issue or just have a PR that targets the 3.5 if worth backporting and/or PyPI's. (This is my conservative mind as you know I usually push for changing as less as possible hehe). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 06:04:46 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Fri, 21 Dec 2018 11:04:46 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1545390286.81.0.788709270274.issue35545@psf.upfronthosting.co.za> twisteroid ambassador added the comment: I think the root cause of this bug is a bit of confusion. The "customer-facing" asyncio API, create_connection(), takes two arguments: host and port. The lower-level API that actually deal with connecting sockets, socket.connect() and loop.sock_connect(), takes one argument: the address tuple. These are *not the same thing*, despite an IPv4 address tuple having two elements (host, port), and must not be mixed. _ensure_resolved() is the function responsible for turning host + port into an address tuple, and it does the right thing, turning host="fe80::1%lo",port=12345 into ('fe80::1', 12345, 0, 1) correctly. The mistake is taking the address tuple and passing it through _ensure_resolved() again, since that's not the correct input type for it: the only correct input type is host + port. So I think the appropriate fix for this bug is to make sure _ensure_resolved is only called once. In particular, BaseSelectorEventLoop.sock_connect() https://github.com/python/cpython/blob/3bc0ebab17bf5a2c29d2214743c82034f82e6573/Lib/asyncio/selector_events.py#L458 should not call _ensure_resolved(). It might be a good idea to add some comments clarifying that sock_connect() takes an address tuple argument, not host + port, and likewise for sock_connect() on each event loop implementation. ---------- nosy: +twisteroid ambassador _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 06:10:28 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Fri, 21 Dec 2018 11:10:28 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1545390628.18.0.788709270274.issue35545@psf.upfronthosting.co.za> twisteroid ambassador added the comment: Also I believe it's a good idea to change the arguments of _ensure_resolved() from (address, *, ...) to (host, port, *, ...), and go through all its usages, making sure we're not mixing host + port with address tuples everywhere in asyncio. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 06:15:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Dec 2018 11:15:59 +0000 Subject: [issue35552] Do not read memory past the specified limit in PyUnicode_FromFormat() and PyBytes_FromFormat() Message-ID: <1545390959.35.0.788709270274.issue35552@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Format characters %s and %V in PyUnicode_FromFormat() and %s PyBytes_FromFormat() allow to limit the number of bytes read from the argument. For example PyUnicode_FromFormat("must be string, not '%.50s'", obj->ob_type->tp_name) will use not more than 50 bytes from obj->ob_type->tp_name for creating a message. But while the number of bytes used for creating the resulting Unicode or bytes object is limited, the current implementation can read past this limit. It uses strlen() for searching the first null byte, and bounds the result to the specified limit. If the input is not null terminated, this can cause a crash. The proposed PR makes the code never reading past the specified limit. ---------- components: Interpreter Core messages: 332289 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Do not read memory past the specified limit in PyUnicode_FromFormat() and PyBytes_FromFormat() type: crash versions: Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 06:34:21 2018 From: report at bugs.python.org (Martijn Pieters) Date: Fri, 21 Dec 2018 11:34:21 +0000 Subject: [issue35547] email.parser / email.policy does not correctly handle multiple RFC2047 encoded-word tokens across RFC5322 folded headers In-Reply-To: <1545328447.76.0.788709270274.issue35547@psf.upfronthosting.co.za> Message-ID: <1545392061.32.0.788709270274.issue35547@psf.upfronthosting.co.za> Martijn Pieters added the comment: While RFC2047 clearly states that an encoder MUST not split multi-byte encodings in the middle of a character (section 5, "Each 'encoded-word' MUST represent an integral number of characters. A multi-octet character may not be split across adjacent 'encoded-word's.), it also states that to fit length restrictions, CRLF SPACE is used as a delimiter between encoded words (section 2, "If it is desirable to encode more text than will fit in an 'encoded-word' of 75 characters, multiple 'encoded-word's (separated by CRLF SPACE) may be used."). In section 6.2 it states When displaying a particular header field that contains multiple 'encoded-word's, any 'linear-white-space' that separates a pair of adjacent 'encoded-word's is ignored. (This is to allow the use of multiple 'encoded-word's to represent long strings of unencoded text, without having to separate 'encoded-word's where spaces occur in the unencoded text.) (linear-white-space is the RFC822 term for foldable whitespace). The parser is leaving spaces between two encoded-word tokens in place, where it must remove them instead. And it is doing so correctly for unstructured headers, just not in get_bare_quoted_string, get_atom and get_dot_atom. Then there is Postel's law (*be liberal in what you accept from others*), and the email package already applies that principle to RFC2047 elsewhere; RFC2047 also states that "An 'encoded-word' MUST NOT appear within a 'quoted-string'." yet email._header_value_parser's handling of quoted-string will process EW sections. ---------- title: email.parser / email.policy does correctly handle multiple RFC2047 encoded-word tokens across RFC5322 folded headers -> email.parser / email.policy does not correctly handle multiple RFC2047 encoded-word tokens across RFC5322 folded headers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 06:35:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Dec 2018 11:35:00 +0000 Subject: [issue35552] Do not read memory past the specified limit in PyUnicode_FromFormat() and PyBytes_FromFormat() In-Reply-To: <1545390959.35.0.788709270274.issue35552@psf.upfronthosting.co.za> Message-ID: <1545392100.51.0.788709270274.issue35552@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10510 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 07:45:28 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 21 Dec 2018 12:45:28 +0000 Subject: [issue24928] mock.patch.dict spoils order of items in collections.OrderedDict In-Reply-To: <1440443995.19.0.0795335566212.issue24928@psf.upfronthosting.co.za> Message-ID: <1545396328.34.0.788709270274.issue24928@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks Mario, I will convert the unit test as a PR before closing the issue since I feel the test is a good one for inclusion and can help if dict order guarantee is changed in future. I will raise a backport PR to cabal's mock repo where the fix with test can be merged with reference to this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 18:13:25 2018 From: report at bugs.python.org (Ernest W. Durbin III) Date: Fri, 21 Dec 2018 23:13:25 +0000 Subject: [issue35554] Test Message-ID: New submission from Ernest W. Durbin III : Testing mailgateway ---------- messages: 332307 nosy: EWDurbin priority: normal severity: normal status: open title: Test _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 18:13:45 2018 From: report at bugs.python.org (Ernest W. Durbin III) Date: Fri, 21 Dec 2018 23:13:45 +0000 Subject: [issue35554] Test In-Reply-To: Message-ID: Ernest W. Durbin III added the comment: Test Reply On December 21, 2018 at 6:13:30 PM, Ernest W. Durbin III (report at bugs.python.org) wrote: New submission from Ernest W. Durbin III : Testing mailgateway ---------- messages: 332307 nosy: EWDurbin priority: normal severity: normal status: open title: Test _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 18:14:12 2018 From: report at bugs.python.org (Ernest W. Durbin III) Date: Fri, 21 Dec 2018 23:14:12 +0000 Subject: [issue35554] Test In-Reply-To: Message-ID: <1545434052.03.0.98272194251.issue35554@roundup.psfhosted.org> Change by Ernest W. Durbin III : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 18:21:07 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 21 Dec 2018 23:21:07 +0000 Subject: [issue31503] Enhance dir(module) to be informed by __all__ by updating module.__dir__ In-Reply-To: <1505701236.05.0.735759478714.issue31503@psf.upfronthosting.co.za> Message-ID: <1545434467.13.0.98272194251.issue31503@roundup.psfhosted.org> Cheryl Sabella added the comment: The OP commented on the PR that a feature close enough to the original request was being implemented in PEP562, so I will close this issue with that one as a superseder. ---------- nosy: +cheryl.sabella resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Implement PEP 562: module __getattr__ and __dir__ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 18:36:59 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 21 Dec 2018 23:36:59 +0000 Subject: [issue35485] Mac: tkinter windows turn black while resized In-Reply-To: <1544732559.26.0.788709270274.issue35485@psf.upfronthosting.co.za> Message-ID: <1545435419.64.0.98272194251.issue35485@roundup.psfhosted.org> Ned Deily added the comment: Based on the discussion here and in Issue35387, I built and tested macOS installers for 3.7.2rc1+ and 3.6.8rc1+ using the current tip of the Tk core-8-6-branch (https://core.tcl.tk/tk/info/deb6ecc05e4202e3); I continued to build Tcl from the Tcl 8.6.9 release tarball. As a reminder, for 3.7.2rc1 and 3.6.8rc1, I used the Tk 8.6.9.1 release tarball with Tcl 8.6.9. With the current Tk tip, the problem described in this issue seems to have been fixed: Tk windows did not turn black while they were being resized. However, new regressions appeared. First, the problem described in Issue35387 is now visible, that is, a separate blank window appears when selecting either "About IDLE" or "Preferences" from the application cascade in the application's menu bar at the top of the screen. (Note that when launching IDLE.app (by double-clicking on the IDLE icon, for example), that menu cascade is normally labeled "IDLE" but when launching IDLE from the command line, for example, with "python -m idledlib" the menu cascade will usually be labeled "Python" instead of "IDLE"; this is normal behavior.) These days, it is also possible to bring up the IDLE's Preferences window by using the Options -> Configure IDLE menu. In that case, the spurious blank window does *not* appear. If I recall correctly, both the About menu item and the Preferences menu items (but not the Options menu items) are special menu items automatically provided by Tk and/or macOS and that IDLE has code to customize, so that may be a good lead. Second, I happened to notice that, when running a Python program with a syntax error from an IDLE edit window, the syntax error pop-down message appears twice. A sequence to reproduce: !. Open a new edit window (cmd-N). 2. Type: x = $1 3. Save to a file (cmd-S). 4. Run the program (F5). 5. The expected "Invalid syntax" panel pulls down on the edit window. 6. Click the OK button in the panel to dismiss. 7. The panel disappears but is immediately replaced by a second and identical "Invalid syntax" panel. (This is new and incorrect behavior). 8. Again click the OK button in the panel to dismiss. This time the panel goes away and does not reappear. Third, running Python test_idle causes a segfault. From the traceback displayed, it appears that the failing test is calling idlelib/configdialog.py so I wouldn't be surprised if this failure is related to the first issue above, i.e. the appearance of the blank window when Preferences is chosen. To reproduce, from a Terminal command line: /path/to/python -m test -w -uall -j3 test_idle where /path/to/python might be /usr/local/bin/python3.6 (or 3.7) To make it easier to reproduce the problems, I've made test installers built with the Tk core-8-6-branch temporarily available on python.org. These are similar to but not exactly the same as what is planned for 3.7.2 final and 3.6.8 final. https://www.python.org/ftp/python/devtest/python-3.7.2rc1+-macosx10.9.pkg https://www.python.org/ftp/python/devtest/python-3.6.8rc1+-macosx10.9.pkg ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 18:43:16 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 21 Dec 2018 23:43:16 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows Message-ID: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> New submission from Cheryl Sabella : M3 from #33610. Gray out menu entry when not applicable. ---------- assignee: terry.reedy components: IDLE messages: 332311 nosy: cheryl.sabella, terry.reedy priority: normal severity: normal status: open title: IDLE: Gray out Code Context on non-editor windows type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 18:55:48 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 21 Dec 2018 23:55:48 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1545436548.63.0.98272194251.issue33610@roundup.psfhosted.org> Cheryl Sabella added the comment: For M3 - #35555. ---------- dependencies: +IDLE: Gray out Code Context on non-editor windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 19:05:15 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 22 Dec 2018 00:05:15 +0000 Subject: [issue35485] Mac: tkinter windows turn black while resized In-Reply-To: <1544732559.26.0.788709270274.issue35485@psf.upfronthosting.co.za> Message-ID: <1545437115.94.0.98272194251.issue35485@roundup.psfhosted.org> Ned Deily added the comment: At the moment, I am holding the 3.7.2 and 3.6.8 final releases for this and another unrelated regression. I don't want to hold up these releases for all platforms just for issues related to use of Tk, tkinter, and/or IDLE on macOS. There doesn't seem to be any one really good option, though, pending real fixes or workarounds. The options I see are: 1. revert to Tcl/Tk 8.6.8 as was used with 3.7.1 and 3.6.7. At this point, I don't remember all of the problems seen with that version of Tk, though I believe one was the scrolling problem described in Issue34370. 2. continue with Tk 8.6.9.1 as shipped with 3.7.2rc1 and 3.6.8rc1. As far as a I know at the moment, the only regression there is the problem originally described in this issue, that is, windows temporarily turning black while being resized. 3. use the tip of Tk core-8-6-branch despite the problems described above. 4. look at reverting to Tcl/Tk 8.5.x and hope it works on the latest releases of macOS. (Note that the macOS Installers and the Tcl/Tk they use are built on macOS 10.9 and 10.6 depending on the installer variant.) 5. hold the release for Tk and/or tkinter and/or IDLE fixes None of those are really good options. I would rule out option 3 based on my quick tests. I don't think going to 8.5.x is a viable option at this point, either, and certainly not desirable. I really don't want to hold the release for a permanent fix or fixes unless they were likely to be available in the next 24 hours or so, since this is strictly a python.org macOS issue (although other distributors of Python and Tk on macOS will likely run into these problems). That leaves either option 1 or 2. Of the 2, at this point, I lean towards option 2 assuming no other regressions are noted, it wouldn't be the end of the world to live for awhile with the temporary black window while resizing. It's ugly but probably not as ugly as the scrolling problems that would remain with option 1. In any case, if we do go ahead and release with one of these compromises, I would document it in the release notes and would also push to release updated installers for these releases as soon as fixes are available, with the proviso that the updated installers vary from the original release installers only in Tk code and any necessary tkinter or IDLE change(s) to correct these issues, i.e. no changes in any other components in the release. Any other opinions?? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 19:06:19 2018 From: report at bugs.python.org (Brett Cannon) Date: Sat, 22 Dec 2018 00:06:19 +0000 Subject: [issue35556] See if frozen modules can use relative imports Message-ID: <1545437177.52.0.98272194251.issue35556@roundup.psfhosted.org> New submission from Brett Cannon : https://gregoryszorc.com/blog/2018/12/18/distributing-standalone-python-applications/ claims it doesn't work. ---------- components: Library (Lib) messages: 332314 nosy: brett.cannon priority: low severity: normal stage: test needed status: open title: See if frozen modules can use relative imports type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 19:14:44 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 22 Dec 2018 00:14:44 +0000 Subject: [issue35387] Dialogs on IDLE are accompanied by a small black window In-Reply-To: <1543845582.88.0.788709270274.issue35387@psf.upfronthosting.co.za> Message-ID: <1545437684.58.0.98272194251.issue35387@roundup.psfhosted.org> Ned Deily added the comment: Using the current tip of Tk core-8-6-branch, I also now see the problem of the extra blank (not necessarily black) window appearing (also it looks like a blank window at least sometimes briefly appears and disappears when IDLE launches). This problem hasn't been seen with the release tarballs for 8.6.8 or 8.6.9.1. But there are other, serious problems seen with the current tip of Tk core-8-6-branch. See the discussion in Issue35485 for more information and for followup discussion. For the moment, I'm going to close this issue as a duplicate of Issue35485 so we don't have the discussion spread out over multiple issues. If necessary, we can update and/or re-open this one. ---------- priority: normal -> deferred blocker resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Mac: tkinter windows turn black while resized versions: +Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 19:15:52 2018 From: report at bugs.python.org (Ilya Kulakov) Date: Sat, 22 Dec 2018 00:15:52 +0000 Subject: [issue35548] memoryview needlessly (?) requires represented object to be hashable In-Reply-To: <1545373099.64.0.788709270274.issue35548@psf.upfronthosting.co.za> Message-ID: <1545437752.55.0.98272194251.issue35548@roundup.psfhosted.org> Ilya Kulakov added the comment: True, but perhaps it's too strict to require both memoryview and the represented object to be immutable? The logic is as follows: Every object in Python can be seen as a view of some outside data (in memory, on disk etc.). And while Python's runtime may attempt to guarantee immutability of its objects, it cannot guarantee immutability of the outside data. Therefore a hashable object is an object immutable from the perspective of Python's runtime. Memory views connect Python objects with outside data. They can be marked as immutable by Python's runtime. Therefore it should be sufficient to be hashable regardless of volatility of outside data. In your example the immutability of the ndarray is indeed bypassed via a view created beforehand. But that's implementation detail and may actually be a flaw (i.e. being unable to propagate the change). The documentation [1] somewhat warns your that this behavior might change: > However, **currently**, locking a base object does not lock any views that already reference it, so under that circumstance it is possible to alter the contents of a locked array via a previously created writeable view onto it. 1: https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.ndarray.flags.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 19:37:08 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 22 Dec 2018 00:37:08 +0000 Subject: [issue35549] Add partial_match: bool = False argument to unicodedata.lookup In-Reply-To: <1545385657.75.0.788709270274.issue35549@psf.upfronthosting.co.za> Message-ID: <1545439028.86.0.98272194251.issue35549@roundup.psfhosted.org> Steven D'Aprano added the comment: I love the idea, but dislike the proposed interface. As a general rule of thumb, Guido dislikes "constant bool parameters", where you pass a literal True or False to a parameter to a function to change its behaviour. Obviously this is not a hard rule, there are functions in the stdlib that do this, but like Guido I think we should avoid them in general. Instead, I think we should allow the name to include globbing symbols * ? etc. (I think full blown re syntax is overkill.) I have an implementation which I use: lookup(name) -> single character # the current behaviour lookup(name_with_glob_symbols) -> list of characters For example lookup('latin * Z') returns: ['LATIN CAPITAL LETTER Z', 'LATIN SMALL LETTER Z', 'LATIN CAPITAL LETTER D WITH SMALL LETTER Z', 'LATIN LETTER SMALL CAPITAL Z', 'LATIN CAPITAL LETTER VISIGOTHIC Z', 'LATIN SMALL LETTER VISIGOTHIC Z'] A straight substring match takes at worst twelve extra characters: lookup('*' + name + '*') and only two if the name is a literal: lookup('*spam*') This is less than `partial_match=True` (18 characters) and more flexible and powerful. There's no ambiguity between the two styles of call because the globbing symbols * ? and [] are never legal in Unicode names. See section 4.8 of http://www.unicode.org/versions/Unicode11.0.0/ch04.pdf ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 20:01:27 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 22 Dec 2018 01:01:27 +0000 Subject: [issue35549] Add partial_match: bool = False argument to unicodedata.lookup In-Reply-To: <1545385657.75.0.788709270274.issue35549@psf.upfronthosting.co.za> Message-ID: <1545440487.14.0.98272194251.issue35549@roundup.psfhosted.org> Steven D'Aprano added the comment: Here's my implementation: from unicodedata import name from unicodedata import lookup as _lookup from fnmatch import translate from re import compile, I _NAMES = None def getnames(): global _NAMES if _NAMES is None: _NAMES = [] for i in range(0x110000): s = name(chr(i), '') if s: _NAMES.append(s) return _NAMES def lookup(name_or_glob): if any(c in name_or_glob for c in '*?['): match = compile(translate(name_or_glob), flags=I).match return [name for name in getnames() if match(name)] else: return _lookup(name_or_glob) The major limitation of my implementation is that it doesn't match name aliases or sequences. http://www.unicode.org/Public/11.0.0/ucd/NameAliases.txt http://www.unicode.org/Public/11.0.0/ucd/NamedSequences.txt For example: lookup('TAMIL SYLLABLE TAA?') # NamedSequence ought to return ['??'] but doesn't. Parts of the Unicode documentation uses the convention that canonical names are in UPPERCASE, aliases are lowercase, and sequences are in Mixed Case. and I think that we should follow that convention: http://www.unicode.org/charts/aboutcharindex.html That makes it easy to see what is the canonical name and what isn't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 20:42:25 2018 From: report at bugs.python.org (INADA Naoki) Date: Sat, 22 Dec 2018 01:42:25 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545442945.98.0.98272194251.issue11566@roundup.psfhosted.org> Change by INADA Naoki : ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 21:49:43 2018 From: report at bugs.python.org (Dylan Houlihan) Date: Sat, 22 Dec 2018 02:49:43 +0000 Subject: [issue35557] Allow lowercase hexadecimal characters in base64.b16decode() Message-ID: <1545446982.53.0.98272194251.issue35557@roundup.psfhosted.org> New submission from Dylan Houlihan : Currently, the `base64` method `b16decode` does not decode a hexadecimal string with lowercase characters by default. To do so requires passing `casefold=True` as the second argument. I propose a change to the `b16decode` method to allow it to accept hexadecimal strings containing lowercase characters without requiring the `casefold` argument. The revision itself is straightforward. We simply have to amend the regular expression to match the lowercase characters a-f in addition to A-F. Likewise the corresponding tests in Lib/base64.py also need to be changed to account for the lack of a second argument. Therefore there are two files total which need to be refactored. In my view, there are several compelling reasons for this change: 1. There is a nontrivial performance improvement. I've already made the changes on my own test branch[1] and I see a mean decoding performance improvement of approximately 9.4% (tested by taking the average of 1,000,000 hexadecimal string encodings). The testing details are included in a file attached to this issue. 2. Hexadecimal strings are case insensitive, i.e. 8DEF is equivalent to 8def. This is the particularly motivating reason why I've written the patch - there have been many times when I've been momentarily confounded by a hexadecimal string that won't decode only to realize I'm yet again passing in a lowercase string. 3. The behavior of the underlying method in `binascii`, `unhexlify`, accepts both uppercase and lowercase characters by default without requiring a second parameter. From the perspective of code hygiene and language consistency, I think it's both more practical and more elegant for the language to behave in the same, predictable manner (particularly because `base64.py` simply calls `binascii.c` under the hood). Additionally, the `binascii` method `hexlify` actually outputs strings in lowercase encoding, meaning that any use of both `binascii` and `base64` in the same application will have to consistently do a `casefold` conversion if output from `binascii.hexlify` is fed back as input to `base64.b16decode` for some reason. There are two arguments against this patch, as far as I can see it: 1. In the relevant IETF reference documentation (RFC3548[2], referenced directly in the `b16decode` docstring; and RFC4648[3] with supersedes it), under Security Considerations the author Simon Josefsson claims that there exists a potential side channel security issue intrinsic to accepting case insensitive hexadecimal strings in a decoding function. While I'm not dismissing this out of hand, I personally do not find the claimed vulnerability compelling, and Josefsson does not clarify a real world attack scenario or threat model. I think it's important we challenge this assumption in light of the potential nontrivial improvements to both language consistency and performance. I would be very interested in hearing a real threat model here that would practically exist outside of a very contrived scenario. Moreover if this is such a security issue, why is the behavior already evident in `binascii.unhexlify`? 2. The other reason may be that there's simply no reason to make such a change. An argument can be put forward that a developer won't frequently have to deal with this issue because the opposite method, `b16encode`, produces hexadecimal strings with uppercase characters. However, in my experience hexadecimal strings with lowercase characters are extremely common in situations where developers haven't produced the strings themselves in the language. As I mentioned, I have already written the changes on my own patch branch. I'll open a pull request once this issue has been created and reference the issue in the pull request on GitHub. References: 1. https://github.com/djhoulihan/cpython/tree/base64_case_sensitivity 2. https://tools.ietf.org/html/rfc3548 3. https://tools.ietf.org/html/rfc4648 ---------- components: Library (Lib) files: testing_data.txt messages: 332319 nosy: djhoulihan priority: normal severity: normal status: open title: Allow lowercase hexadecimal characters in base64.b16decode() type: performance versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file48013/testing_data.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 22:01:23 2018 From: report at bugs.python.org (Dylan Houlihan) Date: Sat, 22 Dec 2018 03:01:23 +0000 Subject: [issue35557] Allow lowercase hexadecimal characters in base64.b16decode() In-Reply-To: <1545446982.53.0.98272194251.issue35557@roundup.psfhosted.org> Message-ID: <1545447683.14.0.98272194251.issue35557@roundup.psfhosted.org> Change by Dylan Houlihan : ---------- keywords: +patch pull_requests: +10512 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 22:39:46 2018 From: report at bugs.python.org (Nils Lindemann) Date: Sat, 22 Dec 2018 03:39:46 +0000 Subject: [issue35558] venv: running activate.bat gives ' parameter format not correct - 65001' Message-ID: <1545449984.07.0.98272194251.issue35558@roundup.psfhosted.org> New submission from Nils Lindemann : Windows 7, Python 3.7.1:260ec2c36a after doing C:\python\python -m venv C:\myvenv and then C:\>myvenv\Scripts\activate.bat it prints parameter format not correct - 65001 However, it activates the venv - the prompt shows (myvenv) C:\> and C:\myvenv\Scripts; gets prepended to PATH. When i outcomment for /f "tokens=2 delims=:" %%a in ('"%SystemRoot%\System32\chcp.com"') do ( set "_OLD_CODEPAGE=%%a" ) in the activate.bat then the message wont show up. related: https://stackoverflow.com/questions/51358202/python-3-7-activate-venv-error-parameter-format-not-correct-65001-windows ---------- messages: 332320 nosy: Nils-Hero priority: normal severity: normal status: open title: venv: running activate.bat gives ' parameter format not correct - 65001' type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 22:52:07 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 22 Dec 2018 03:52:07 +0000 Subject: [issue35558] venv: running activate.bat gives ' parameter format not correct - 65001' In-Reply-To: <1545449984.07.0.98272194251.issue35558@roundup.psfhosted.org> Message-ID: <1545450727.3.0.98272194251.issue35558@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 23:42:42 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Dec 2018 04:42:42 +0000 Subject: [issue35485] Mac: tkinter windows turn black while resized In-Reply-To: <1544732559.26.0.788709270274.issue35485@psf.upfronthosting.co.za> Message-ID: <1545453762.03.0.98272194251.issue35485@roundup.psfhosted.org> Terry J. Reedy added the comment: Raymond, as Ned explains above, there seem to be no really good options for the upcoming releases on Mac. The *ed paragraph below has my best guess at to whether a Mac-IDLE user should install or ignore. --- Basic options A, to hold up the release (indefinitely) on all platforms, has precedents, but usually because of bug(s) affecting more than one platform, and usually AFAIK for at most a week. We have already closed 3.6 to routine maintenance and merged multiple patches into the future 3.7.3. Withholding the current set of bug fixes does no one any good except possibly for people using resizable tkinter windows on Mac. Option B, to hold up the release on only one platform is unprecedented as far as I know. Option C, to release with one more known bug than we would like is relatively normal. Given the indefiniteness of a fix, I agree with C. AS for which version of C, I agree that option 2 above seems least bad. The main issue with option 1, staying with 8.6.8, is how it performs (or rather, fails to perform) on the new macOS Mohave. Before opening this issue, I did fairly extensive testing of IDLE 3.7.2rc1 on Mohave and this was the only problem I encountered. * As far as IDLE goes, what's new in 3.7.2/3.6.8 are mostly doc changes that are already online. A user who has not upgraded to Mohave could consider staying with the existing releases. I suspect that a user running Mohave will be happier with the new releases with the tcl/tk upgrade. I thought of augmenting the the interactive splash notice, but this would give too much attention and emphasis to only 1 of many known but unfixed bugs, and 1 that only affects resizable tkinter windows on Mac. Perhaps the hopefully temporary Mac installers should be labeled internally and on the splash screen as ...rc2 even if temporarily included on the 'final' download page with the final releases for other platforms. I believe some people would object is two slightly different releases were called '3.6.8' and '3.7.2'. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 01:03:03 2018 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 22 Dec 2018 06:03:03 +0000 Subject: [issue35530] Counter-intuitive logging API In-Reply-To: <1545178149.93.0.788709270274.issue35530@psf.upfronthosting.co.za> Message-ID: <1545458583.72.0.98272194251.issue35530@roundup.psfhosted.org> Vinay Sajip added the comment: > If this behaviour can't be changed for backwards compatibility reasons, then so be it. It can't be changed for this reason. > But I think it would be disingenuous to claim it's not a design flaw. Do you think *I'm* being disingenuous, Mark? I don't mean to be. As well as developers from Enthought, who write large, well-tested libraries, logging also has to satisfy the newbie who writes a one-off script that probably won't even be tested via a test runner. For that use case, logging.debug() and friends call basicConfig() under the hood so that simple usage is as easy as possible. So the "accidental" configuring of logging only occurs if nothing has previously been configured and logging.debug() or similar is called. This is documented, as has been mentioned. Libraries are not supposed to configure logging except using a NullHandler, and this is also documented, but there are numerous authors of libraries that ignore that advice. If this causes problems to users of those libraries, that is down to the authors of those libraries rather than logging itself, and issues should be logged against those libraries. I maintain that calling basicConfig() in logging.XXX() is not accidental or a design flaw that crept in somehow, but was considered specifically in the context of logging in simple cases. This is documented in the PEP: https://www.python.org/dev/peps/pep-0282/#id30 This PEP was the basis for discussion on python-dev before the logging package was accepted into Python. What guidelines does Enthought provide to its developers for configuring Python logging and its usage in libraries and unit tests? If this is public, I would be interested to see it. Are there any specific third-party libraries you have come across which Enthought uses regularly/repeatedly, which misconfigure logging in the way you describe? I would also be curious to know about those. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 01:09:06 2018 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 22 Dec 2018 06:09:06 +0000 Subject: [issue35558] venv: running activate.bat gives ' parameter format not correct - 65001' In-Reply-To: <1545449984.07.0.98272194251.issue35558@roundup.psfhosted.org> Message-ID: <1545458946.54.0.98272194251.issue35558@roundup.psfhosted.org> Vinay Sajip added the comment: This seems related to bpo-32409. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 01:09:56 2018 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 22 Dec 2018 06:09:56 +0000 Subject: [issue32409] venv activate.bat is UTF-8 encoded but uses current console codepage In-Reply-To: <1513938975.69.0.213398074469.issue32409@psf.upfronthosting.co.za> Message-ID: <1545458996.69.0.98272194251.issue32409@roundup.psfhosted.org> Vinay Sajip added the comment: See also bpo-35558. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 01:14:21 2018 From: report at bugs.python.org (Roman Inflianskas) Date: Sat, 22 Dec 2018 06:14:21 +0000 Subject: [issue35549] Add globbing to unicodedata.lookup In-Reply-To: <1545385657.75.0.788709270274.issue35549@psf.upfronthosting.co.za> Message-ID: <1545459261.99.0.98272194251.issue35549@roundup.psfhosted.org> Roman Inflianskas added the comment: I like your proposal with globbing, steven.daprano. I updated the title. ---------- title: Add partial_match: bool = False argument to unicodedata.lookup -> Add globbing to unicodedata.lookup _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 01:31:51 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 22 Dec 2018 06:31:51 +0000 Subject: [issue35557] Allow lowercase hexadecimal characters in base64.b16decode() In-Reply-To: <1545446982.53.0.98272194251.issue35557@roundup.psfhosted.org> Message-ID: <1545460311.81.0.98272194251.issue35557@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the report. A couple of points as below : * This changes the interface of the function by removing a parameter. Thus it will break compatibility with Python 2 and also earlier versions of Python 3. Removing a parameter in the signature has to go through a deprecation cycle if this is going to be accepted. * Please don't use time.time and mean for benchmarks that can be misleading. There are modules like timeit and perf (https://pypi.org/project/perf/) that are more reliable. I looked for some more inefficiencies and I can see re.search for every run. Perhaps re.compile can be used to store the compiled regex at module level and then to match against the string. This makes the function 25% faster without changing the interface. In case casefold=False then an extra call to make the string upper case is avoided giving some more benefit. With re.search inside the function $ python3.7 -m perf timeit -s 'import base64; hex_data="806903d098eb50957b1b376385f233bb3a5d54f54191c8536aefee21fc9ba3ca"' 'base64.b16decode(hex_data, casefold=True)' ..................... Mean +- std dev: 3.08 us +- 0.22 us $ python3.7 -m perf timeit -s 'import base64; hex_data="806903d098eb50957b1b376385f233bb3a5d54f54191c8536aefee21fc9ba3ca".upper()' 'base64.b16decode(hex_data)' ..................... Mean +- std dev: 2.93 us +- 0.20 us With the regex compiled to a variable at the module level $ python3.7 -m perf timeit -s 'import base64; hex_data="806903d098eb50957b1b376385f233bb3a5d54f54191c8536aefee21fc9ba3ca"' 'base64.b16decode(hex_data, casefold=True)' ..................... Mean +- std dev: 2.08 us +- 0.15 us $ python3.7 -m perf timeit -s 'import base64; hex_data="806903d098eb50957b1b376385f233bb3a5d54f54191c8536aefee21fc9ba3ca".upper()' 'base64.b16decode(hex_data)' ..................... Mean +- std dev: 1.98 us +- 0.17 us Since this is a comparison of fixed set of elements I tried using a set of elements and any to short-circuit but it seems to be slower $ python3.7 -m perf timeit -s 'import base64; hex_data="806903d098eb50957b1b376385f233bb3a5d54f54191c8536aefee21fc9ba3ca"' 'base64.b16decode(hex_data, casefold=True)' ..................... Mean +- std dev: 8.21 us +- 0.66 us I am opening a PR to use the compiled regex at the module level since I see it as a net win of 25-30% without any interface change or test case changes required. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 01:47:40 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Dec 2018 06:47:40 +0000 Subject: [issue22703] Idle Code Context menu entrie(s) In-Reply-To: <1414023415.32.0.701318253357.issue22703@psf.upfronthosting.co.za> Message-ID: <1545461260.51.0.98272194251.issue22703@roundup.psfhosted.org> Terry J. Reedy added the comment: Both pr-11214 and the pr-11286 (3.7 backport, not listed below) have been merged. Tal: I am pretty sure the Options menu should continue to work on Macs, but a test to verify would be helpful. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 01:47:59 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Dec 2018 06:47:59 +0000 Subject: [issue22703] Idle Code Context menu entrie(s) In-Reply-To: <1414023415.32.0.701318253357.issue22703@psf.upfronthosting.co.za> Message-ID: <1545461279.49.0.98272194251.issue22703@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 01:54:55 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Dec 2018 06:54:55 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows In-Reply-To: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> Message-ID: <1545461695.24.0.98272194251.issue35555@roundup.psfhosted.org> Terry J. Reedy added the comment: PR 11282 should have been listed above. ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 02:13:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2018 07:13:42 +0000 Subject: [issue35557] Allow lowercase hexadecimal characters in base64.b16decode() In-Reply-To: <1545446982.53.0.98272194251.issue35557@roundup.psfhosted.org> Message-ID: <1545462822.41.0.98272194251.issue35557@roundup.psfhosted.org> Serhiy Storchaka added the comment: This is compatibility breaking change. Furthermore, it changes the purposed behavior that was from the initial version (4c904d1bf71d01bc22fbb123493f975050560e9c). Since currently there is an option which allows to accept lowercase hexadecimal characters, I do not see a need in this change. You can also use bytes.fromhex(). ---------- nosy: +barry, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 02:29:10 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 22 Dec 2018 07:29:10 +0000 Subject: [issue35559] Optimize base64.b16decode to use compiled regex Message-ID: <1545463748.16.0.98272194251.issue35559@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : I came across this as a result of issue35557 and thought to make a new issue to keep the discussion separate. Currently the b16decode function uses a regex with re.search that can be compiled at the module level as a static variable to give up to 30% improvement when executed on Python 3.7. I am proposing a PR for this change since it looks safe to me. $ python3 -m perf compare_to default.json optimized.json --table +--------------------+---------+------------------------------+ | Benchmark | default | optimized | +====================+=========+==============================+ | b16decode | 2.97 us | 2.03 us: 1.46x faster (-32%) | +--------------------+---------+------------------------------+ | b16decode_casefold | 3.18 us | 2.19 us: 1.45x faster (-31%) | +--------------------+---------+------------------------------+ Benchmark script : import perf import re import binascii import base64 _B16DECODE_PAT = re.compile(b'[^0-9A-F]') def b16decode_re_compiled_search(s, casefold=False): s = base64._bytes_from_decode_data(s) if casefold: s = s.upper() if _B16DECODE_PAT.search(s): raise binascii.Error('Non-base16 digit found') return binascii.unhexlify(s) if __name__ == "__main__": hex_data = "806903d098eb50957b1b376385f233bb3a5d54f54191c8536aefee21fc9ba3ca" hex_data_upper = hex_data.upper() assert base64.b16decode(hex_data_upper) == b16decode_re_compiled_search(hex_data_upper) assert base64.b16decode(hex_data, casefold=True) == b16decode_re_compiled_search(hex_data, casefold=True) runner = perf.Runner() if True: # toggle to False for default.json runner.timeit(name="b16decode", stmt="b16decode_re_compiled_search(hex_data_upper)", setup="from __main__ import b16decode_re_compiled_search, hex_data, hex_data_upper") runner.timeit(name="b16decode_casefold", stmt="b16decode_re_compiled_search(hex_data, casefold=True)", setup="from __main__ import b16decode_re_compiled_search, hex_data, hex_data_upper") else: runner.timeit(name="b16decode", stmt="base64.b16decode(hex_data_upper)", setup="from __main__ import hex_data, hex_data_upper; import base64") runner.timeit(name="b16decode_casefold", stmt="base64.b16decode(hex_data, casefold=True)", setup="from __main__ import hex_data, hex_data_upper; import base64") ---------- assignee: xtreak components: Library (Lib) messages: 332330 nosy: djhoulihan, serhiy.storchaka, xtreak priority: normal severity: normal status: open title: Optimize base64.b16decode to use compiled regex type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 02:42:06 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 22 Dec 2018 07:42:06 +0000 Subject: [issue35559] Optimize base64.b16decode to use compiled regex In-Reply-To: <1545463748.16.0.98272194251.issue35559@roundup.psfhosted.org> Message-ID: <1545464526.85.0.98272194251.issue35559@roundup.psfhosted.org> Stefan Behnel added the comment: One regex related code pattern that I generally like is to assign bound methods to good names and use those. In this case, I would write _has_non_base16_digits = re.compile(b'[^0-9A-F]').search ... if _has_non_base16_digits(s): raise ... ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 02:49:40 2018 From: report at bugs.python.org (Antti Haapala) Date: Sat, 22 Dec 2018 07:49:40 +0000 Subject: [issue35469] [2.7] time.asctime() regression In-Reply-To: <1544611398.55.0.788709270274.issue35469@psf.upfronthosting.co.za> Message-ID: <1545464980.62.0.98272194251.issue35469@roundup.psfhosted.org> Antti Haapala added the comment: C11 specifies the format used by asctime as being exactly "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n", which matches the *new* output with space padding, less the newline. As always, Microsoft got it wrong: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/asctime-wasctime?view=vs-2017 - even if deliberately saying 1-31 instead of 01-31 in the table. ---------- nosy: +ztane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 02:55:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2018 07:55:19 +0000 Subject: [issue35559] Optimize base64.b16decode to use compiled regex In-Reply-To: <1545463748.16.0.98272194251.issue35559@roundup.psfhosted.org> Message-ID: <1545465319.73.0.98272194251.issue35559@roundup.psfhosted.org> Serhiy Storchaka added the comment: How this affects the import time (use -X importtime)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 03:03:08 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 22 Dec 2018 08:03:08 +0000 Subject: [issue35559] Optimize base64.b16decode to use compiled regex In-Reply-To: <1545463748.16.0.98272194251.issue35559@roundup.psfhosted.org> Message-ID: <1545465788.83.0.98272194251.issue35559@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks @scoder . I took the convention since most of the places I have seen capitalized variable ending with PAT but this looks more readable to me. I have made the changes in my PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 03:10:28 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 22 Dec 2018 08:10:28 +0000 Subject: [issue35559] Optimize base64.b16decode to use compiled regex In-Reply-To: <1545463748.16.0.98272194251.issue35559@roundup.psfhosted.org> Message-ID: <1545466228.49.0.98272194251.issue35559@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: > How this affects the import time (use -X importtime)? Is there reliable way to benchmark this? On multiple runs with regex for python3 -X importtime -c 'import base64' import time: 677 | 11151 | base64 On multiple runs without regex for python3 -X importtime -c 'import base64' import time: 551 | 5726 | base64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 03:32:44 2018 From: report at bugs.python.org (Antti Haapala) Date: Sat, 22 Dec 2018 08:32:44 +0000 Subject: [issue13927] Extra spaces in the output of time.ctime In-Reply-To: <1328215776.48.0.974828105123.issue13927@psf.upfronthosting.co.za> Message-ID: <1545467564.16.0.98272194251.issue13927@roundup.psfhosted.org> Antti Haapala added the comment: This should be added to `asctime` too. The space-padded behaviour complies with the C standard which was the intent - after all, before it was using C `asctime` directly, and says that unlike C asctime, it doesn't have the newline character, meaning that as a rule, it should then behave similar to it, and only exception is marked. Unfortunately MSVC asctime has been incorrectly using leading zeros (https://stackoverflow.com/q/53894148/918959). ---------- nosy: +ztane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 03:35:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2018 08:35:07 +0000 Subject: [issue24307] [Python 2] pip error on windows whose current user name contains non-ascii characters In-Reply-To: <1432779659.79.0.171307025039.issue24307@psf.upfronthosting.co.za> Message-ID: <1545467707.87.0.98272194251.issue24307@roundup.psfhosted.org> Serhiy Storchaka added the comment: Even if you encode the Unicode default for output, the user can not specify the same value, unless you use custom converter. For example, if you encode u"???" as string "\xe6\x97\xa9\xe4\xb8\x8a\xe5\xa5\xbd" (in UTF-8), the user can only specify the argument as a 8-bit string "\xe6\x97\xa9\xe4\xb8\x8a\xe5\xa5\xbd" which differs from a Unicode string u"???". Even if you use a custom converter which decodes 8-bit strings to Unicode, it makes sense to specify the default value as encoded string, because it will be pass to the converter. Non-ascii unicode values never supported as default values. This issue is rather a feature request than a bug report. It is too late to add new features in 2.7. The right solution is to upgrade to Python 3. Eventually, solving similar issues was one of purposes of creating Python 3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 03:39:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2018 08:39:32 +0000 Subject: [issue35009] argparse throws UnicodeEncodeError for printing help with unicode choices In-Reply-To: <1539767876.78.0.788709270274.issue35009@psf.upfronthosting.co.za> Message-ID: <1545467972.25.0.98272194251.issue35009@roundup.psfhosted.org> Serhiy Storchaka added the comment: Even if you encode default values for output, you can not pass unicode values from command line. You can pass a 8-bit string '\xe6\x97\xa9\xe4\xb8\x8a\xe5\xa5\xbd' which differs from a Unicode string u"???". Even after resolving the output issue, unicode choices will never work. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 03:55:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2018 08:55:41 +0000 Subject: [issue35559] Optimize base64.b16decode to use compiled regex In-Reply-To: <1545463748.16.0.98272194251.issue35559@roundup.psfhosted.org> Message-ID: <1545468941.25.0.98272194251.issue35559@roundup.psfhosted.org> Serhiy Storchaka added the comment: According to your results, you will save 0.94 us per call of b16decode, but loss 126 us at import time. You will get a benefit if b16decode is used more than 130 time. Currently, if the performance is critical, the user can use binascii.unhexlify() directly or use bytes.fromhex(). base64.b16decode() is only needed if you need to ensure that the input strictly conforms to RFC 3548. Other options, which will maximize the performance while keeping the validation is to add an option to binascii.unhexlify() for making it more strict. At the time of writing the base64 module its performance was not considered critical, and additional checks and preprocessing was implemented in Python. ---------- nosy: +barry, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 04:00:51 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 22 Dec 2018 09:00:51 +0000 Subject: [issue35009] argparse throws UnicodeEncodeError for printing help with unicode choices In-Reply-To: <1539767876.78.0.788709270274.issue35009@psf.upfronthosting.co.za> Message-ID: <1545469251.39.0.98272194251.issue35009@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks Serhiy, I have limited knowledge of unicode and hence I thought this to be a fix. I am closing this as per msg332337 and the PR I opened for issue24307 (Feel free to close issue24307 as per Victor's resolution if needed) ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 04:20:04 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 22 Dec 2018 09:20:04 +0000 Subject: [issue35559] Optimize base64.b16decode to use compiled regex In-Reply-To: <1545463748.16.0.98272194251.issue35559@roundup.psfhosted.org> Message-ID: <1545470404.03.0.98272194251.issue35559@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks Serhiy, the other issue noted about performance improvement removing casefold and I thought re.search per call to be inefficient. My bad that I didn't consider the cost of moving the compilation to module level that affects import time and about using -X importtime. I agree that the cost is not worthy given that regex is used only inside b16decode. I will keep these factors in mind when I am doing similar sort of work and try to do a better analysis. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 04:26:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2018 09:26:57 +0000 Subject: [issue30455] Generate all tokens related code and docs from Grammar/Tokens In-Reply-To: <1495628509.86.0.512362155714.issue30455@psf.upfronthosting.co.za> Message-ID: <1545470817.23.0.98272194251.issue30455@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 05:13:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2018 10:13:09 +0000 Subject: [issue24307] [Python 2] pip error on windows whose current user name contains non-ascii characters In-Reply-To: <1432779659.79.0.171307025039.issue24307@psf.upfronthosting.co.za> Message-ID: <1545473589.52.0.98272194251.issue24307@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> third party stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 05:20:44 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 22 Dec 2018 10:20:44 +0000 Subject: [issue35560] format(float(123), "00") causes segfault in debug builds Message-ID: <1545474042.87.0.98272194251.issue35560@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : I was looking into format issues and came across msg99839 . The example causes segfault in master, 3.7 and 3.6 branches. This used to pass in 3.7 and 3.6. I searched for open issues and cannot come across an issue for this. I guess this is caused due to issue33954 which adds an assert as I can see from the segfault. Compiling in release mode works fine but debug build fails. Are asserts removed in release builds? $ python3.7 Python 3.7.1rc2 (v3.7.1rc2:6c06ef7dc3, Oct 13 2018, 05:10:29) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> format(float(123), "00") '123.0' Master master $ ./python.exe Python 3.8.0a0 (heads/35559:c1b4b0f616, Dec 22 2018, 15:00:08) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> format(float(123), "00") Assertion failed: (0 <= min_width), function _PyUnicode_InsertThousandsGrouping, file Objects/unicodeobject.c, line 9394. Python 3.6 cpython git:(5241ecff16) ./python.exe Python 3.6.8rc1+ (remotes/upstream/3.6:5241ecff16, Dec 22 2018, 15:05:57) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> format(float(123), "00") Assertion failed: (0 <= min_width), function _PyUnicode_InsertThousandsGrouping, file Objects/unicodeobject.c, line 9486. [1] 33859 abort ./python.exe Python 3.7 cpython git:(c046d6b618) ./python.exe Python 3.7.2rc1+ (remotes/upstream/3.7:c046d6b618, Dec 22 2018, 15:07:24) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> format(float(123), "00") Assertion failed: (0 <= min_width), function _PyUnicode_InsertThousandsGrouping, file Objects/unicodeobject.c, line 9369. [1] 42710 abort ./python.exe Latest master, 3.6 and 3.7 branch has this bug in debug mode with this being last Python 3.6 bug fix release. Commenting out the assert line gives me the correct result but I have limited knowledge of the C code and I guess release builds remove asserts where it cannot be reproduced? I am tagging issue33954 devs who might have a better understanding of this and there might be limited bandwidth for someone to look into this along with other cases since it's holiday season. # Release mode works fine ./python.exe -c 'print(format(float(123), "00"))' 123.0 ---------- messages: 332342 nosy: eric.smith, serhiy.storchaka, vstinner, xtreak priority: normal severity: normal status: open title: format(float(123), "00") causes segfault in debug builds type: crash versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 05:23:48 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 22 Dec 2018 10:23:48 +0000 Subject: [issue35432] str.format and string.Formatter bug with French (and other) locale In-Reply-To: <1544133264.0.0.788709270274.issue35432@psf.upfronthosting.co.za> Message-ID: <1545474228.08.0.98272194251.issue35432@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 06:24:08 2018 From: report at bugs.python.org (Stefan Krah) Date: Sat, 22 Dec 2018 11:24:08 +0000 Subject: [issue35548] memoryview needlessly (?) requires represented object to be hashable In-Reply-To: <1545373099.64.0.788709270274.issue35548@psf.upfronthosting.co.za> Message-ID: <1545477848.09.0.98272194251.issue35548@roundup.psfhosted.org> Stefan Krah added the comment: The feature would violate fundamental Python invariants. If you modify the example above: >>> t = (m,) >>> b"\001\002\003" in t True >>> x[0] = 100 >>> b"\001\002\003" in t False This is simply never supposed to happen in Python. If an immutable object (Bytes) is regarded as being a member of a tuple, it should stay in that tuple. The issue has to be fixed on the NumPy side: They could implement a scheme that allows hashing of a specific ndarray if a new flag "IMMUTABLE" is set that locks the exporter and all exports. I don't thing NumPy's current behavior can be regarded as a bug. As I said, "readonly" never meant "immutable", it was always a property of a single view. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 06:38:56 2018 From: report at bugs.python.org (Stefan Krah) Date: Sat, 22 Dec 2018 11:38:56 +0000 Subject: [issue35548] memoryview needlessly (?) requires represented object to be hashable In-Reply-To: <1545373099.64.0.788709270274.issue35548@psf.upfronthosting.co.za> Message-ID: <1545478736.56.0.98272194251.issue35548@roundup.psfhosted.org> Stefan Krah added the comment: Sorry I meant the above example to use a dict, which currently does not work: >>> d = {m: "1"} Traceback (most recent call last): File "", line 1, in TypeError: unhashable type: 'numpy.ndarray' Then the feature would allow to change the dict key. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 07:16:54 2018 From: report at bugs.python.org (Stefan Krah) Date: Sat, 22 Dec 2018 12:16:54 +0000 Subject: [issue35548] memoryview needlessly (?) requires represented object to be hashable In-Reply-To: <1545373099.64.0.788709270274.issue35548@psf.upfronthosting.co.za> Message-ID: <1545481014.11.0.98272194251.issue35548@roundup.psfhosted.org> Stefan Krah added the comment: I'll leave the issue up for a couple of days in case someone supports it, but I think this one of the rare cases where all core devs would reject the feature unanimously. ---------- resolution: -> not a bug status: open -> pending type: -> enhancement _______________________________________ Python tracker _______________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 09:49:54 2018 From: cpython at roundup.psfhosted.org (Ernest W. Durbin III) Date: Fri, 21 Dec 2018 14:49:54 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1545403794.1.0.443784625336.issue2771@roundup.psfhosted.org> Ernest W. Durbin III added the comment: Testing after hosting migration completion ---------- ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 10:35:23 2018 From: cpython at roundup.psfhosted.org (Steve Dower) Date: Fri, 21 Dec 2018 15:35:23 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545406523.86.0.443784625336.issue11566@roundup.psfhosted.org> Steve Dower added the comment: The change in PR 880 looks fine to me. I dislike defining names without a Py prefix in public headers. And PRs are not where we do general discussion or ping for attention. Make sure the nosy list includes the relevant experts (in this case probably me) and post on the issue. Posting on python-dev is also okay, though linking the bug is preferable to the PR. ---------- nosy: +steve.dower ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 10:38:03 2018 From: cpython at roundup.psfhosted.org (STINNER Victor) Date: Fri, 21 Dec 2018 15:38:03 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1545406683.93.0.443784625336.issue34172@roundup.psfhosted.org> STINNER Victor added the comment: multiprocessing.Pool destructor now emits a ResourceWarning if it is still running: if .close() nor .terminate() have been called, see bpo- 35424. It is a first alarm that the problematic example is wrong. Should reconsider to fix this bug in the master branch? If yes, we should carefully document this backward incompatible change. ---------- ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 11:17:53 2018 From: cpython at roundup.psfhosted.org (Terry J. Reedy) Date: Fri, 21 Dec 2018 16:17:53 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545409073.29.0.443784625336.issue11566@roundup.psfhosted.org> Terry J. Reedy added the comment: What current 3.x versions have this issue? This issue was opened against 2.7. This was changed to 3.3 in 2013 (3.3 should have just been added with control-click). I reverted to 2.7 and tentatively added 3.8, but this needs to be checked. The PR is against 2.7, though not so marked in the title. (I will fix this.) Since the move to GitHub, we usually fix on master first and then backport. Something is not right with the PR 880 linkage. For me, anyway, Steve's reference is actually linked to 10880 (closed). ---------- nosy: +terry.reedy versions: +Python 2.7, Python 3.8 -Python 3.3 ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 12:49:59 2018 From: cpython at roundup.psfhosted.org (R. David Murray) Date: Fri, 21 Dec 2018 17:49:59 +0000 Subject: [issue35547] email.parser / email.policy does not correctly handle multiple RFC2047 encoded-word tokens across RFC5322 folded headers In-Reply-To: <1545328447.76.0.788709270274.issue35547@psf.upfronthosting.co.za> Message-ID: <1545414599.16.0.857683086682.issue35547@roundup.psfhosted.org> R. David Murray added the comment: Here's a patch that makes the example work correctly. This is not a fix, a real fix will be more complicated. This just demonstrates the kind of thing that needs fixing and where. The existing parser produces a sub-optimal parse tree as its result...the parse tree is hard to inspect and manipulate because there are so many special cases. A good fix here would create some sort of function that could be passed an existing TokenList, the new token to add to that list, and the function would check all the special cases and do the EWWhiteSpaceTerminal substitution when and as appropriate. This could then be used in the unstructured parser as well as Phrase...and some thought should be given to where else it might be needed. It has been long enough since I've held the RFCs in my head that I don't remember if there is anywhere else. I haven't looked at the actual character string, so I don't know if we need to also be detecting and posting a defect about a split character or not, but we don't *have* to answer that question to fix this. diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py index e805a75..d5d5986 100644 --- a/Lib/email/_header_value_parser.py +++ b/Lib/email/_header_value_parser.py @@ -199,6 +199,10 @@ class CFWSList(WhiteSpaceTokenList): class Atom(TokenList): + @property + def has_encoded_word(self): + return any(t.token_type=='encoded-word' for t in self) + token_type = 'atom' @@ -1382,6 +1386,12 @@ def get_phrase(value): "comment found without atom")) else: raise + if token.has_encoded_word: + assert phrase[-1].token_type == 'atom', phrase[-1] + assert phrase[-1][-1].token_type == 'cfws' + assert phrase[-1][-1][-1].token_type == 'fws' + if phrase[-1].has_encoded_word: + phrase[-1][-1] = EWWhiteSpaceTerminal(phrase[-1][-1][-1], 'fws') phrase.append(token) return phrase, value ---------- ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 12:56:37 2018 From: cpython at roundup.psfhosted.org (Ivan Levkivskyi) Date: Fri, 21 Dec 2018 17:56:37 +0000 Subject: [issue35540] dataclasses.asdict breaks with defaultdict fields In-Reply-To: <1545257204.19.0.788709270274.issue35540@psf.upfronthosting.co.za> Message-ID: <1545414997.09.0.857683086682.issue35540@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- nosy: +levkivskyi ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 15:36:15 2018 From: cpython at roundup.psfhosted.org (Daniel Fetchinson) Date: Fri, 21 Dec 2018 20:36:15 +0000 Subject: =?utf-8?q?=5Bissue34823=5D_libffi_detection_doesn=E2=80=99t_work_in_my_se?= =?utf-8?q?tup?= In-Reply-To: <1538067503.8.0.545547206417.issue34823@psf.upfronthosting.co.za> Message-ID: <1545424575.33.0.857683086682.issue34823@roundup.psfhosted.org> Daniel Fetchinson added the comment: I have the exact same issue, trying to compile 3.7.1 with a custom libffi location. Note that I must build libffi from source and can't install binaries provided by my distro, I believe this is the origin of the problem. Probably the python build system checks for libffi in some "standard" locations and it doesn't seem possible to use libffi from a custom location. This is where libffi gets installed after passing --prefix=$HOME/opt to ./configure: $HOME/opt/lib64/libffi.so.6.0.4 $HOME/opt/lib64/libffi.a $HOME/opt/lib64/libffi.la $HOME/opt/lib64/libffi.so.6 $HOME/opt/lib64/libffi.so $HOME/opt/lib/pkgconfig/libffi.pc $HOME/opt/lib/libffi-3.2.1/include/ffi.h $HOME/opt/lib/libffi-3.2.1/include/ffitarget.h $HOME/opt/share/info/libffi.info In any case, just to be sure, I've copied the header files to $HOME/opt/include/ffi.h $HOME/opt/include/ffitarget.h And pkg-config works: [fetch at fetch opt]$ pkg-config --libs libffi -L/home/fetch/opt/lib/../lib64 -lffi [fetch at fetch opt]$ pkg-config --cflags libffi -I/home/fetch/opt/lib/libffi-3.2.1/include These environment variables are also set: LD_LIBRARY_PATH=/home/fetch/opt/lib:/home/fetch/opt/lib64 C_INCLUDE_PATH=/home/fetch/opt/include And still _ctypes fails to build (but python itself (minus _ctypes) compiles successful and works perfectly well). ---------- nosy: +fetchinson ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 15:37:49 2018 From: cpython at roundup.psfhosted.org (Daniel Fetchinson) Date: Fri, 21 Dec 2018 20:37:49 +0000 Subject: =?utf-8?q?=5Bissue34823=5D_libffi_detection_doesn=E2=80=99t_work_in_my_se?= =?utf-8?q?tup?= In-Reply-To: <1538067503.8.0.545547206417.issue34823@psf.upfronthosting.co.za> Message-ID: <1545424669.68.0.857683086682.issue34823@roundup.psfhosted.org> Daniel Fetchinson added the comment: It would be really great if this could be sorted out because at the moment this bug prevents me from using numpy/scipy with python 3.7.1 (they need _ctypes). ---------- ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 15:57:07 2018 From: cpython at roundup.psfhosted.org (Karthikeyan Singaravelan) Date: Fri, 21 Dec 2018 20:57:07 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1545425827.97.0.857683086682.issue35121@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Looking further into this the domain validation makes it little more stricter and can have wider implications. For example requests library uses cookiejar to maintain cookies between sessions. One more case is that `domain` can be empty so only non-empty domains can be prefixed with dot. A simple server that sets Cookie with value `A=LDJDSFLKSDJLDSF` import SimpleHTTPServer import logging class MyHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): def do_GET(self): self.cookieHeader = self.headers.get('Cookie') SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self) def end_headers(self): self.send_my_headers() SimpleHTTPServer.SimpleHTTPRequestHandler.end_headers(self) def send_my_headers(self): self.send_header('Set-Cookie', 'A=LDJDSFLKSDJLDSF') if __name__ == '__main__': SimpleHTTPServer.test(HandlerClass=MyHTTPRequestHandler) Add below host entry to `/etc/hosts` 127.0.0.1 test.com 127.0.0.1 1.test.com 127.0.0.1 footest.com Sample script to demonstrate requests behavior change import requests with requests.Session() as s: cookies = dict(cookies_are='working') m = s.get("http://test.com:8000", cookies=cookies) print(m.request.headers) m = s.get("http://1.test.com:8000", cookies=cookies) print(m.request.headers) m = s.get("http://footest.com:8000", cookies=cookies) print(m.request.headers) Before patch : {'User-Agent': 'python-requests/2.11.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Cookie': 'cookies_are=working'} {'User-Agent': 'python-requests/2.11.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Cookie': 'A=LDJDSFLKSDJLDSF; cookies_are=working'} {'User-Agent': 'python-requests/2.11.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Cookie': 'A=LDJDSFLKSDJLDSF; cookies_are=working'} After patch : {'User-Agent': 'python-requests/2.11.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Cookie': 'cookies_are=working'} {'User-Agent': 'python-requests/2.11.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Cookie': 'A=LDJDSFLKSDJLDSF; cookies_are=working'} {'User-Agent': 'python-requests/2.11.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Cookie': 'cookies_are=working'} As with my patch since the cookie is set on `test.com` while making a request to `footest.com` the cookie is skipped as part of the patch since footest is not a subdomain of test.com but 1.test.com is a subdomain. This is a behavior change to be decided whether worth doing or to document this since in a client with session like requests module connecting to lot of hosts this can potentially pass cookies of test.com to footest.com. A discussion on requests repo on providing the option for user to set a stricter cookie policy : https://github.com/requests/requests/issues/2576 On testing with curl cookie-jar it seems that the cookies are passed even for the subdomain only when it's set and not as part of top level domain. ---------- ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 16:02:16 2018 From: cpython at roundup.psfhosted.org (Matthew McCormick) Date: Fri, 21 Dec 2018 21:02:16 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545426136.87.0.857683086682.issue11566@roundup.psfhosted.org> Matthew McCormick added the comment: > What current 3.x versions have this issue? This issue was opened against 2.7. Yes, this is just for 2.7. ---------- versions: -Python 3.8 ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 16:31:26 2018 From: cpython at roundup.psfhosted.org (Kay Hayen) Date: Fri, 21 Dec 2018 21:31:26 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545427886.38.0.377332604947.issue11566@roundup.psfhosted.org> Change by Kay Hayen : ---------- nosy: -Kay.Hayen ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 16:41:47 2018 From: cpython at roundup.psfhosted.org (Terry J. Reedy) Date: Fri, 21 Dec 2018 21:41:47 +0000 Subject: [issue35500] Align expected and actual calls on mock.assert_called_with error message In-Reply-To: <1544813146.35.0.788709270274.issue35500@psf.upfronthosting.co.za> Message-ID: <1545428507.82.0.377332604947.issue35500@roundup.psfhosted.org> Terry J. Reedy added the comment: We don't usually wrap error messages, but this is plausible. With the addition to the first line, we don't need to repeat 'call'. We can line things up without violating the PEP 8 recommendation against doing so with spaces. Also, the convention is to not capitolize the phrase after ':'. AssertionError: expected call not found. Expect: mock(2, 3) Actual: mock(1, 2) ---------- nosy: +terry.reedy ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 16:44:11 2018 From: cpython at roundup.psfhosted.org (Terry J. Reedy) Date: Fri, 21 Dec 2018 21:44:11 +0000 Subject: [issue35514] Docs on reference count detail. enhancement. In-Reply-To: <1545021931.75.0.788709270274.issue35514@psf.upfronthosting.co.za> Message-ID: <1545428651.99.0.377332604947.issue35514@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +serhiy.storchaka ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 16:46:31 2018 From: cpython at roundup.psfhosted.org (Terry J. Reedy) Date: Fri, 21 Dec 2018 21:46:31 +0000 Subject: [issue35533] argparse standard error usage for exit / error In-Reply-To: <1545220030.92.0.788709270274.issue35533@psf.upfronthosting.co.za> Message-ID: <1545428791.1.0.377332604947.issue35533@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +bethard versions: +Python 3.8 ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 16:47:33 2018 From: cpython at roundup.psfhosted.org (Terry J. Reedy) Date: Fri, 21 Dec 2018 21:47:33 +0000 Subject: [issue35548] memoryview needlessly (?) requires represented object to be hashable In-Reply-To: <1545373099.64.0.788709270274.issue35548@psf.upfronthosting.co.za> Message-ID: <1545428853.74.0.377332604947.issue35548@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.8 -Python 3.4, Python 3.5, Python 3.6 ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 17:00:07 2018 From: cpython at roundup.psfhosted.org (Karthikeyan Singaravelan) Date: Fri, 21 Dec 2018 22:00:07 +0000 Subject: [issue35500] Align expected and actual calls on mock.assert_called_with error message In-Reply-To: <1544813146.35.0.788709270274.issue35500@psf.upfronthosting.co.za> Message-ID: <1545429607.12.0.377332604947.issue35500@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the feedback. I personally prefer 'expected' than 'expect' though it comes at the cost that this cannot be aligned with 'actual'. Other places use 'expected' and it reads more natural in test case scenarios. ---------- ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 17:17:57 2018 From: cpython at roundup.psfhosted.org (Ernest W. Durbin III) Date: Fri, 21 Dec 2018 22:17:57 +0000 Subject: [issue35553] Test Message-ID: New submission from Ernest W. Durbin III : Test ---------- messages: 332304 nosy: EWDurbin priority: normal severity: normal status: open title: Test ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 17:18:10 2018 From: cpython at roundup.psfhosted.org (Ernest W. Durbin III) Date: Fri, 21 Dec 2018 22:18:10 +0000 Subject: [issue35553] Test In-Reply-To: Message-ID: <1545430690.0.0.377332604947.issue35553@roundup.psfhosted.org> Change by Ernest W. Durbin III : ---------- stage: -> resolved status: open -> closed ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 17:40:41 2018 From: cpython at roundup.psfhosted.org (Stefan Krah) Date: Fri, 21 Dec 2018 22:40:41 +0000 Subject: [issue35548] memoryview needlessly (?) requires represented object to be hashable In-Reply-To: <1545373099.64.0.788709270274.issue35548@psf.upfronthosting.co.za> Message-ID: <1545432041.85.0.377332604947.issue35548@roundup.psfhosted.org> Stefan Krah added the comment: The reason is that unfortunately readonly != immutable, as the following example shows: >>> import numpy as np >>> x = np.array([1,2,3], dtype='B') >>> y = x[:] >>> y.flags['WRITEABLE'] = False >>> m = memoryview(y) >>> m.readonly True >>> m.tolist() [1, 2, 3] >>> x[0] = 100 >>> m.tolist() [100, 2, 3] An object like 'y' is allowed to re-export memory, using its own flags. ---------- ______________________________________________ Python tracker ______________________________________________ From cpython at roundup.psfhosted.org Fri Dec 21 17:51:45 2018 From: cpython at roundup.psfhosted.org (Cheryl Sabella) Date: Fri, 21 Dec 2018 22:51:45 +0000 Subject: [issue32326] Update Build projects to version 10.0.16299.0 of the Windows 10 SDK. In-Reply-To: <1513283155.41.0.213398074469.issue32326@psf.upfronthosting.co.za> Message-ID: <1545432705.21.0.377332604947.issue32326@roundup.psfhosted.org> Cheryl Sabella added the comment: The PR was closed as not needed, so should this ticket also be closed? Thanks! ---------- nosy: +cheryl.sabella ______________________________________________ Python tracker ______________________________________________ From report at bugs.python.org Sat Dec 22 09:42:21 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 22 Dec 2018 14:42:21 +0000 Subject: [issue35560] format(float(123), "00") causes segfault in debug builds In-Reply-To: <1545474042.87.0.98272194251.issue35560@roundup.psfhosted.org> Message-ID: <1545489741.85.0.0770528567349.issue35560@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Looking into the code min_width is returned as -2 and hence the assert fails. spec->n_min_width is passed as min_width to _PyUnicode_InsertThousandsGrouping that is used in the assert statement and I came across below comment that min_width can go negative and it's okay. So is the assert statement validating for it to be always greater than or equal to zero not needed? https://github.com/python/cpython/blob/59423e3ddd736387cef8f7632c71954c1859bed0/Python/formatter_unicode.c#L529 /* min_width can go negative, that's okay. format->width == -1 means we don't care. */ if (format->fill_char == '0' && format->align == '=') spec->n_min_width = format->width - n_non_digit_non_padding; else spec->n_min_width = 0; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 10:22:43 2018 From: report at bugs.python.org (Nikolaus Rath) Date: Sat, 22 Dec 2018 15:22:43 +0000 Subject: [issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s) Message-ID: <1545492162.72.0.0770528567349.issue35561@roundup.psfhosted.org> New submission from Nikolaus Rath : With current git master, configured --with-valgrind --with-pydebug, I get: ==31074== Command: /home/nikratio/clones/cpython/python /home/nikratio/in-progress/pyfuse3/test/../examples/hello.py /tmp/pytest-of-nikratio/pytest-11/test_hello_hello_py_0 ==31074== ==31074== Syscall param epoll_ctl(event) points to uninitialised byte(s) ==31074== at 0x584906A: epoll_ctl (syscall-template.S:84) ==31074== by 0xBDAA493: pyepoll_internal_ctl (selectmodule.c:1392) ==31074== by 0xBDAA59F: select_epoll_register_impl (selectmodule.c:1438) ==31074== by 0xBDAA5F8: select_epoll_register (selectmodule.c.h:599) ==31074== by 0x174E15: _PyMethodDef_RawFastCallKeywords (call.c:658) ==31074== by 0x300BCA: _PyMethodDescr_FastCallKeywords (descrobject.c:290) ==31074== by 0x21FC05: call_function (ceval.c:4611) ==31074== by 0x22B5E7: _PyEval_EvalFrameDefault (ceval.c:3183) ==31074== by 0x2206FF: PyEval_EvalFrameEx (ceval.c:533) ==31074== by 0x173B61: function_code_fastcall (call.c:285) ==31074== by 0x174737: _PyFunction_FastCallKeywords (call.c:410) ==31074== by 0x21FDF4: call_function (ceval.c:4634) ==31074== Address 0xffeffeb4c is on thread 1's stack ==31074== in frame #1, created by pyepoll_internal_ctl (selectmodule.c:1379) To reproduce: $ python-dev -m pip install --user pyfuse3 # for dependencies $ git clone https://github.com/libfuse/pyfuse3.git $ valgrind --trace-children=yes "--trace-children-skip=*mount*" python-dev -m pytest test/ pyfuse3 provides a C extension module, but I believe the problem is in the interpreter core as the stacktrace does not include anything from the extension. ---------- components: Interpreter Core messages: 332348 nosy: nikratio priority: normal severity: normal status: open title: Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s) type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 10:32:09 2018 From: report at bugs.python.org (Nikolaus Rath) Date: Sat, 22 Dec 2018 15:32:09 +0000 Subject: [issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s) In-Reply-To: <1545492162.72.0.0770528567349.issue35561@roundup.psfhosted.org> Message-ID: <1545492729.51.0.0770528567349.issue35561@roundup.psfhosted.org> Nikolaus Rath added the comment: Same error with 3.7.1 and 3.6.7 (though line numbers differ slightly). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 10:41:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2018 15:41:50 +0000 Subject: [issue35560] format(float(123), "00") causes segfault in debug builds In-Reply-To: <1545474042.87.0.98272194251.issue35560@roundup.psfhosted.org> Message-ID: <1545493310.16.0.0770528567349.issue35560@roundup.psfhosted.org> Serhiy Storchaka added the comment: Yes, seems the simplest way to fix this issue is to remove that assert. Do you mind to create a PR? Tests should be added to cover this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 10:43:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2018 15:43:23 +0000 Subject: [issue35560] format(float(123), "00") causes segfault in debug builds In-Reply-To: <1545474042.87.0.98272194251.issue35560@roundup.psfhosted.org> Message-ID: <1545493403.2.0.0770528567349.issue35560@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- components: +Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 10:44:44 2018 From: report at bugs.python.org (Stefan Krah) Date: Sat, 22 Dec 2018 15:44:44 +0000 Subject: [issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s) In-Reply-To: <1545492162.72.0.0770528567349.issue35561@roundup.psfhosted.org> Message-ID: <1545493484.34.0.0770528567349.issue35561@roundup.psfhosted.org> Stefan Krah added the comment: "--with-valgrind --with-pydebug" looks suspicious, it essentially mixes two different memory checkers. 1) CFLAGS="-O0 -g" --without-pymalloc 2) CFLAGS="-O0 -g" --with-valgrind should both work. Can you try if this fixes the error? ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 10:51:17 2018 From: report at bugs.python.org (Nikolaus Rath) Date: Sat, 22 Dec 2018 15:51:17 +0000 Subject: [issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s) In-Reply-To: <1545492162.72.0.0770528567349.issue35561@roundup.psfhosted.org> Message-ID: <1545493877.57.0.0770528567349.issue35561@roundup.psfhosted.org> Nikolaus Rath added the comment: $ ./configure CFLAGS="-O0 -g" --with-valgrind && make -j8 still gives ==13281== Memcheck, a memory error detector ==13281== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==13281== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info ==13281== Command: /home/nikratio/clones/cpython/python /home/nikratio/in-progress/pyfuse3/test/../examples/hello.py /tmp/pytest-of-nikratio/pytest-15/test_hello_hello_py_0 ==13281== ==13281== Syscall param epoll_ctl(event) points to uninitialised byte(s) ==13281== at 0x584906A: epoll_ctl (syscall-template.S:84) ==13281== by 0xB5C07FA: pyepoll_internal_ctl (selectmodule.c:1392) ==13281== by 0xB5C08CB: select_epoll_register_impl (selectmodule.c:1438) ==13281== by 0xB5C112A: select_epoll_register (selectmodule.c.h:599) ==13281== by 0x173031: _PyMethodDef_RawFastCallKeywords (call.c:658) ==13281== by 0x2FEFCD: _PyMethodDescr_FastCallKeywords (descrobject.c:290) ==13281== by 0x21ED25: call_function (ceval.c:4611) ==13281== by 0x21AB4E: _PyEval_EvalFrameDefault (ceval.c:3183) ==13281== by 0x21007C: PyEval_EvalFrameEx (ceval.c:533) ==13281== by 0x17245F: function_code_fastcall (call.c:285) ==13281== by 0x1728B5: _PyFunction_FastCallKeywords (call.c:410) ==13281== by 0x21EDF4: call_function (ceval.c:4634) ==13281== Address 0xffeff2d94 is on thread 1's stack ==13281== in frame #1, created by pyepoll_internal_ctl (selectmodule.c:1379) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 10:58:13 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 22 Dec 2018 15:58:13 +0000 Subject: [issue35560] format(float(123), "00") causes segfault in debug builds In-Reply-To: <1545474042.87.0.98272194251.issue35560@roundup.psfhosted.org> Message-ID: <1545494293.38.0.0770528567349.issue35560@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Sure, I will create one shortly. There were some other cases with different values of negative numbers that I will add since I couldn't see any tests failing on my debug builds. * Are there chances that bugs like these are present since I guess we use release builds in our CI? * Is this a release blocker for next RC since current set of 3.6.8 RC1 bugs fixes are complete I hope ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 11:14:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2018 16:14:26 +0000 Subject: [issue35560] format(float(123), "00") causes segfault in debug builds In-Reply-To: <1545474042.87.0.98272194251.issue35560@roundup.psfhosted.org> Message-ID: <1545495266.24.0.0770528567349.issue35560@roundup.psfhosted.org> Serhiy Storchaka added the comment: This bug is not new, and this is the first report for it. It can be treated as a security issue if an application allows user to specify format string. But using a format string from untrusted source causes a security issue itself, because this allows to spend memory and CPU time for creating an arbitrary large string object. Also, unlikely debug builds be used in production. I would backport the solution of this issue to 3.6, but it is not bad if it will be not backported. I think this is not a release blocker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 12:07:11 2018 From: report at bugs.python.org (Amir Aslan Haghrah) Date: Sat, 22 Dec 2018 17:07:11 +0000 Subject: [issue35562] Issue in sizeof() function Message-ID: <1545498428.94.0.0770528567349.issue35562@roundup.psfhosted.org> New submission from Amir Aslan Haghrah : If you define a structure which contains an 'c_int' and a 'c_double' member. Then run the sizeof() function for it you get 16 as result as follows: --------------------------------------------- from ctypes import c_int from ctypes import c_double from ctypes import sizeof from ctypes import Structure from struct import Struct class issueInSizeof(Structure): _fields_ = [('KEY', c_int), ('VALUE', c_double)] print(sizeof(issueInSizeof)) --------------------------------------------- output: 16 --------------------------------------------- In continue if you add another 'c_int' to your structure and run sizeof() function as follows. It return 16 too. --------------------------------------------- from ctypes import c_int from ctypes import c_double from ctypes import sizeof from ctypes import Structure from struct import Struct class issueInSizeof(Structure): _fields_ = [('Index', c_int), ('KEY', c_int), ('VALUE', c_double)] print(sizeof(issueInSizeof)) --------------------------------------------- output: 16 --------------------------------------------- If python assume the size of 'c_int' 4, then it should return 12 in the first run. Also if it assume the size of 'c_int' 8 then it should return 24 in the second run. thanks in advance. ---------- components: ctypes messages: 332355 nosy: Amir Aslan Haghrah priority: normal severity: normal status: open title: Issue in sizeof() function type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 12:17:09 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 22 Dec 2018 17:17:09 +0000 Subject: [issue35560] format(float(123), "00") causes segfault in debug builds In-Reply-To: <1545474042.87.0.98272194251.issue35560@roundup.psfhosted.org> Message-ID: <1545499029.66.0.0770528567349.issue35560@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: > This bug is not new, and this is the first report for it. It can be treated as a security issue if an application allows user to specify format string. But using a format string from untrusted source causes a security issue itself, because this allows to spend memory and CPU time for creating an arbitrary large string object. Also, unlikely debug builds be used in production. My initial thought was that since the assert failed it has exposed some bug or behavior change. Also I didn't know release builds remove assert statements. Since it's a case of debug build being a problem I agree with you that impact is low since it shouldn't be used in production. > I would backport the solution of this issue to 3.6, but it is not bad if it will be not backported. I think this is not a release blocker. Thanks, I have created a PR with tests https://github.com/python/cpython/pull/11288 . For some reason it's not linked to the issue. ---------- keywords: +patch pull_requests: +10513 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 12:19:36 2018 From: report at bugs.python.org (Ammar Askar) Date: Sat, 22 Dec 2018 17:19:36 +0000 Subject: [issue35562] Issue in sizeof() function In-Reply-To: <1545498428.94.0.0770528567349.issue35562@roundup.psfhosted.org> Message-ID: <1545499176.32.0.0770528567349.issue35562@roundup.psfhosted.org> Ammar Askar added the comment: This has to do with C struct packing and alignment. You are likely on a 64-bit computer and thus your structs are aligned to 8 byte (64 bit) boundaries. https://docs.python.org/2/library/ctypes.html#structure-union-alignment-and-byte-order Create an equivalent C program and you will notice the same behavior. ---------- nosy: +ammar2 resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 12:43:51 2018 From: report at bugs.python.org (Amir Aslan Haghrah) Date: Sat, 22 Dec 2018 17:43:51 +0000 Subject: [issue35562] Issue in sizeof() function In-Reply-To: <1545498428.94.0.0770528567349.issue35562@roundup.psfhosted.org> Message-ID: <1545500631.11.0.0770528567349.issue35562@roundup.psfhosted.org> Amir Aslan Haghrah added the comment: Thank you for your response. I noticed this issue while working with 'mmap' and memory sharing. As you said I check it in 'C++' and I got the same result for my struct as Python. --------------------------------------------------------------------- I used the 'sizeof' function to calculate my struct size to read it from mapped memory and I get wrong output in reading memory because of this aligning procedure. Question: Structs map to memory unaligned but sizeof return the aligned size of struct. How we can calculate the sizeof struct to use it in reading from memory? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 12:56:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2018 17:56:17 +0000 Subject: [issue35560] format(float(123), "00") causes segfault in debug builds In-Reply-To: <1545474042.87.0.98272194251.issue35560@roundup.psfhosted.org> Message-ID: <1545501377.08.0.0770528567349.issue35560@roundup.psfhosted.org> Serhiy Storchaka added the comment: min_width ?an be large negative number, and there are subtractions from it. It may be safer to replace the assert with something like min_width = Py_MAX(0, min_width). Or ensure that it is non-negative before calling _PyUnicode_InsertThousandsGrouping(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 13:03:23 2018 From: report at bugs.python.org (Ammar Askar) Date: Sat, 22 Dec 2018 18:03:23 +0000 Subject: [issue35562] Issue in sizeof() function In-Reply-To: <1545498428.94.0.0770528567349.issue35562@roundup.psfhosted.org> Message-ID: <1545501803.5.0.0770528567349.issue35562@roundup.psfhosted.org> Ammar Askar added the comment: Iterating over _fields_ and adding up the sizeof() for each type could be one solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 13:09:44 2018 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 22 Dec 2018 18:09:44 +0000 Subject: [issue35560] format(float(123), "00") causes segfault in debug builds In-Reply-To: <1545474042.87.0.98272194251.issue35560@roundup.psfhosted.org> Message-ID: <1545502184.13.0.0770528567349.issue35560@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 13:21:24 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 22 Dec 2018 18:21:24 +0000 Subject: [issue35560] format(float(123), "00") causes segfault in debug builds In-Reply-To: <1545474042.87.0.98272194251.issue35560@roundup.psfhosted.org> Message-ID: <1545502884.66.0.0770528567349.issue35560@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: > min_width ?an be large negative number, and there are subtractions from it. It may be safer to replace the assert with something like min_width = Py_MAX(0, min_width). Or ensure that it is non-negative before calling _PyUnicode_InsertThousandsGrouping() Looking at the code the loop seems to operate on the assumption that min_width is >= 0 in the beginning with the assert statement until both remaining and min_width are negative to break out of the loop. Applying Py_MAX(0, min_width) causes no test failures but maybe I have missed adding a case where large negative min_width might have triggered other issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 13:33:30 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 22 Dec 2018 18:33:30 +0000 Subject: [issue35563] Doc: warnings.rst - add links to references Message-ID: <1545503608.31.0.0770528567349.issue35563@roundup.psfhosted.org> New submission from Cheryl Sabella : In the docs for the warnings module, there is some text referencing other areas of the documentation that would be more helpful as links. ---------- assignee: docs at python components: Documentation messages: 332362 nosy: cheryl.sabella, docs at python priority: normal severity: normal status: open title: Doc: warnings.rst - add links to references versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 14:04:31 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 22 Dec 2018 19:04:31 +0000 Subject: [issue35563] Doc: warnings.rst - add links to references In-Reply-To: <1545503608.31.0.0770528567349.issue35563@roundup.psfhosted.org> Message-ID: <1545505471.15.0.0770528567349.issue35563@roundup.psfhosted.org> Cheryl Sabella added the comment: I created a pull request for this, but it didn't attach it: https://github.com/python/cpython/pull/11289 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 14:13:50 2018 From: report at bugs.python.org (Manjusaka) Date: Sat, 22 Dec 2018 19:13:50 +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: <1545506030.14.0.0770528567349.issue30698@roundup.psfhosted.org> Manjusaka added the comment: Ping! Agree with Wei-Cheng. The leak still bothers me for times, and still bother for third-party like https://aiohttp.readthedocs.io/en/stable/client_reference.html#tcpconnector Yury, I think it's worth working on it. Using uvloop should not be a good idea for some people. ---------- nosy: +Manjusaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 14:24:26 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 22 Dec 2018 19:24:26 +0000 Subject: [issue35563] Doc: warnings.rst - add links to references In-Reply-To: <1545503608.31.0.0770528567349.issue35563@roundup.psfhosted.org> Message-ID: <1545506666.94.0.0770528567349.issue35563@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +10514 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 14:29:51 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 22 Dec 2018 19:29:51 +0000 Subject: [issue35563] Doc: warnings.rst - add links to references In-Reply-To: <1545503608.31.0.0770528567349.issue35563@roundup.psfhosted.org> Message-ID: <1545506991.22.0.0770528567349.issue35563@roundup.psfhosted.org> Cheryl Sabella added the comment: @xtreak, thanks for adding the PR link. I was going to ask you how to do it, but I see it now. Completely missed it before. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 14:38:17 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 22 Dec 2018 19:38:17 +0000 Subject: [issue35563] Doc: warnings.rst - add links to references In-Reply-To: <1545503608.31.0.0770528567349.issue35563@roundup.psfhosted.org> Message-ID: <1545507497.24.0.0770528567349.issue35563@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: @cheryl.sabella You're welcome. PR was not automatically added to couple of my issues too today though the PR description and issue number check was updated by bedevere-bot. I don't know if it's a random issue. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 14:43:32 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 22 Dec 2018 19:43:32 +0000 Subject: [issue35563] Doc: warnings.rst - add links to references In-Reply-To: <1545503608.31.0.0770528567349.issue35563@roundup.psfhosted.org> Message-ID: <1545507812.9.0.0770528567349.issue35563@roundup.psfhosted.org> Cheryl Sabella added the comment: @xtreak, maybe it's related to the maintenance Ernest did yesterday on the bugs.python.org server? Not sure the best way to ping him. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 14:44:16 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 22 Dec 2018 19:44:16 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows In-Reply-To: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> Message-ID: <1545507856.9.0.0770528567349.issue35555@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +10515 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 15:25:50 2018 From: report at bugs.python.org (Nils Lindemann) Date: Sat, 22 Dec 2018 20:25:50 +0000 Subject: [issue35558] venv: running activate.bat gives ' parameter format not correct - 65001' In-Reply-To: <1545449984.07.0.98272194251.issue35558@roundup.psfhosted.org> Message-ID: <1545510350.63.0.0770528567349.issue35558@roundup.psfhosted.org> Change by Nils Lindemann : ---------- resolution: -> duplicate stage: -> resolved status: -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 15:39:48 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 22 Dec 2018 20:39:48 +0000 Subject: [issue35563] Doc: warnings.rst - add links to references In-Reply-To: <1545503608.31.0.0770528567349.issue35563@roundup.psfhosted.org> Message-ID: <1545511188.19.0.0770528567349.issue35563@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: You can bring this up at https://python.zulipchat.com/#narrow/stream/116501-workflow and someone might help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 16:06:11 2018 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 22 Dec 2018 21:06:11 +0000 Subject: [issue2771] Test issue In-Reply-To: Message-ID: Ezio Melotti added the comment: test message via email ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 16:12:48 2018 From: report at bugs.python.org (Zachary Ware) Date: Sat, 22 Dec 2018 21:12:48 +0000 Subject: [issue28791] update SQLite libraries for Windows and macOS installers In-Reply-To: <1480017928.89.0.263397799958.issue28791@psf.upfronthosting.co.za> Message-ID: <1545513168.47.0.0770528567349.issue28791@roundup.psfhosted.org> Zachary Ware added the comment: Since we have a more recent "update SQLite" issue in bpo-35360, I'm going to go ahead and close this one. ---------- assignee: benjamin.peterson -> resolution: -> fixed stage: patch review -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 16:13:16 2018 From: report at bugs.python.org (Zachary Ware) Date: Sat, 22 Dec 2018 21:13:16 +0000 Subject: [issue28791] update SQLite libraries for Windows and macOS installers In-Reply-To: <1480017928.89.0.263397799958.issue28791@psf.upfronthosting.co.za> Message-ID: <1545513196.63.0.0770528567349.issue28791@roundup.psfhosted.org> Change by Zachary Ware : ---------- priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 16:21:40 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 22 Dec 2018 21:21:40 +0000 Subject: [issue35559] Optimize base64.b16decode to use compiled regex In-Reply-To: <1545463748.16.0.98272194251.issue35559@roundup.psfhosted.org> Message-ID: <1545513700.96.0.0770528567349.issue35559@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +10516 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 16:22:22 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 22 Dec 2018 21:22:22 +0000 Subject: [issue35559] Optimize base64.b16decode to use compiled regex In-Reply-To: <1545463748.16.0.98272194251.issue35559@roundup.psfhosted.org> Message-ID: <1545513742.23.0.0770528567349.issue35559@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: -10516 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 16:22:49 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 22 Dec 2018 21:22:49 +0000 Subject: [issue35559] Optimize base64.b16decode to use compiled regex In-Reply-To: <1545463748.16.0.98272194251.issue35559@roundup.psfhosted.org> Message-ID: <1545513769.31.0.0770528567349.issue35559@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +10517 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 16:24:11 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 22 Dec 2018 21:24:11 +0000 Subject: [issue35514] Docs on reference count detail. enhancement. In-Reply-To: <1545021931.75.0.788709270274.issue35514@psf.upfronthosting.co.za> Message-ID: <1545513851.2.0.0770528567349.issue35514@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +10518 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 16:26:07 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 22 Dec 2018 21:26:07 +0000 Subject: [issue23057] [Windows] asyncio: support signal handlers on Windows (feature request) In-Reply-To: <1418674256.87.0.827009141117.issue23057@psf.upfronthosting.co.za> Message-ID: <1545513967.8.0.0770528567349.issue23057@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +10519 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 16:29:59 2018 From: report at bugs.python.org (jfbu) Date: Sat, 22 Dec 2018 21:29:59 +0000 Subject: [issue35564] [DOC] Sphinx 2.0 will require master_doc variable set in conf.py Message-ID: <1545514198.61.0.0770528567349.issue35564@roundup.psfhosted.org> New submission from jfbu : When building CPython doc with master branch of dev repo of Sphinx (future Sphinx 2.0) one gets this warning: WARNING: Since v2.0, Sphinx uses "index" as master_doc by default. Please add "master_doc = 'contents'" to your conf.py. Fix will be to do as Sphinx says :) ---------- assignee: docs at python components: Documentation messages: 332371 nosy: docs at python, jfbu priority: normal severity: normal status: open title: [DOC] Sphinx 2.0 will require master_doc variable set in conf.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 16:39:32 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Dec 2018 21:39:32 +0000 Subject: [issue35559] Optimize base64.b16decode to use compiled regex In-Reply-To: <1545463748.16.0.98272194251.issue35559@roundup.psfhosted.org> Message-ID: <1545514772.28.0.0770528567349.issue35559@roundup.psfhosted.org> Antoine Pitrou added the comment: I don't think performance of base16 encoding is important enough to increase import times. I would recommend rejection. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 16:52:51 2018 From: report at bugs.python.org (Ilya Kulakov) Date: Sat, 22 Dec 2018 21:52:51 +0000 Subject: [issue35548] memoryview needlessly (?) requires represented object to be hashable In-Reply-To: <1545373099.64.0.788709270274.issue35548@psf.upfronthosting.co.za> Message-ID: <1545515571.43.0.0770528567349.issue35548@roundup.psfhosted.org> Ilya Kulakov added the comment: Perhaps another path is optionally allow hashing of memoryviews (all current conditions - hashability of the original object) via a parameter? Like unsafe_hash like in dataclass. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 17:45:15 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 22 Dec 2018 22:45:15 +0000 Subject: [issue24390] Python 3.4.3 64 bits is not "high dpi aware" In-Reply-To: <1433582426.79.0.462452103713.issue24390@psf.upfronthosting.co.za> Message-ID: <1545518715.42.0.0770528567349.issue24390@roundup.psfhosted.org> Cheryl Sabella added the comment: IDLE added a call to the Windows API in #33656. Other than that, as Amaury stated, there isn't any UI in Python, so closing this as not a bug. ---------- nosy: +cheryl.sabella resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 18:37:23 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 22 Dec 2018 23:37:23 +0000 Subject: [issue35548] memoryview needlessly (?) requires represented object to be hashable In-Reply-To: <1545373099.64.0.788709270274.issue35548@psf.upfronthosting.co.za> Message-ID: <1545521843.87.0.0770528567349.issue35548@roundup.psfhosted.org> Raymond Hettinger added the comment: Mark, do you have thoughts on the subject? > Perhaps another path is optionally allow hashing of memoryviews > (all current conditions - hashability of the original object) > via a parameter? Like unsafe_hash like in dataclass. I suspect this would open a can worms and that we would regret it. If a user intentionally creates an unsafe tool using dataclasses, they have to do so explicitly. Built-in tools such as memoryview shouldn't cross that line (especially as a default behavior). Also, tools like memoryview() are implemented in C and generally have tighter requirements (thread-safety, protecting invariants, not segfaulting, etc) than pure python code that can't kill the interpreter or affect C extensions. > I'll leave the issue up for a couple of days in case someone supports > it, but I think this one of the rare cases where all core devs > would reject the feature unanimously. I concur with Stefan. > My particular use case involves a memory view of a readonly numpy's ndarray. As Stefan mentioned, this could be "fixed" on the Numpy side if they thought it was a useful behavior (I suspect not). ---------- nosy: +mark.dickinson, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 19:19:30 2018 From: report at bugs.python.org (Dylan Houlihan) Date: Sun, 23 Dec 2018 00:19:30 +0000 Subject: [issue35557] Allow lowercase hexadecimal characters in base64.b16decode() In-Reply-To: <1545446982.53.0.98272194251.issue35557@roundup.psfhosted.org> Message-ID: <1545524370.67.0.0770528567349.issue35557@roundup.psfhosted.org> Change by Dylan Houlihan : ---------- versions: -Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 19:21:31 2018 From: report at bugs.python.org (Dylan Houlihan) Date: Sun, 23 Dec 2018 00:21:31 +0000 Subject: [issue35557] Allow lowercase hexadecimal characters in base64.b16decode() In-Reply-To: <1545446982.53.0.98272194251.issue35557@roundup.psfhosted.org> Message-ID: <1545524491.77.0.0770528567349.issue35557@roundup.psfhosted.org> Change by Dylan Houlihan : ---------- type: performance -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 19:33:11 2018 From: report at bugs.python.org (Dylan Houlihan) Date: Sun, 23 Dec 2018 00:33:11 +0000 Subject: [issue35557] Allow lowercase hexadecimal characters in base64.b16decode() In-Reply-To: <1545446982.53.0.98272194251.issue35557@roundup.psfhosted.org> Message-ID: <1545525191.27.0.0770528567349.issue35557@roundup.psfhosted.org> Dylan Houlihan added the comment: Karthikeyan, Thank you for taking the time to respond so thoroughly. In particular, in the future I'll be more careful to qualify and quantify potential performance improvements using `timeit` or `perf`. That being said, as I mentioned the primary motivation for this is not a performance improvement - I just felt that was a nice potential side effect. Rather, this enhancement brings `base64.b16decode` into behavioral consistency with `binascii.unhexlify`. The `binascii` method already accepts both uppercase and lowercase hexadecimal characters by default. However I can definitely understand what you and Serhiy are saying about this being a breaking change. Therefore I'd like to amend my proposal to the following: 1. Keep the `casefold` argument and corresponding logic, but keep the revised regex that will match against both uppercase and lowercase characters; and 2. Only put this change in for Python 3.8, this way existing code which uses the explicit argument on versions <= 3.7 does not break (but will still function normally). I've altered this issue to reflect my amended proposal, targeting only version 3.8 and editing the type to be behavior instead of performance. In this way, the change will still make `base64.b16decode` consistent with `binascii.unhexlify` (and the case insensitivity of hexadecimal encoding more generally) without breaking existing code or requiring developers to change workflows using `casefold`. Naturally there would be additional logic that *enforces* the case sensitivity if `casefold=false` is passed to the method, and this will likewise not break existing workflows either. If this change is considered agreeable, I will amend my open pull request to roll back the breaking change and refactor the way `casefold` is processed. From my perspective this amended proposal offers an upside in language consistency without any downside. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 20:19:23 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 23 Dec 2018 01:19:23 +0000 Subject: [issue35565] Add detail to an assertion failure message in wsgiref Message-ID: <1545527961.69.0.0770528567349.issue35565@roundup.psfhosted.org> New submission from Raymond Hettinger : On line 236 in Lib/wsgiref/handlers.py, we get the assertion message, "Hop-by-hop headers not allowed". That message should should show the *name* and *value* that triggered the failure. Otherwise, it is difficult to know which header caused the problem (in my case, it was Connection: close). ---------- assignee: cheryl.sabella components: Library (Lib) keywords: easy messages: 332378 nosy: cheryl.sabella, rhettinger priority: normal severity: normal status: open title: Add detail to an assertion failure message in wsgiref type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 20:23:13 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 23 Dec 2018 01:23:13 +0000 Subject: [issue35566] DOC: Add links to annotation glossary term Message-ID: <1545528192.75.0.0770528567349.issue35566@roundup.psfhosted.org> New submission from Cheryl Sabella : Add links to glossary term when `annotation` is used. ---------- assignee: docs at python components: Documentation messages: 332379 nosy: cheryl.sabella, docs at python priority: normal severity: normal status: open title: DOC: Add links to annotation glossary term type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 20:24:24 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 23 Dec 2018 01:24:24 +0000 Subject: [issue35567] Convert membership test from dict-of-constants to a set Message-ID: <1545528262.75.0.0770528567349.issue35567@roundup.psfhosted.org> New submission from Raymond Hettinger : On line 164 in Lib/wsgiref/utils.py, there is a dictionary called *_hoppish* that should be a set object. ---------- assignee: cheryl.sabella components: Library (Lib) keywords: easy messages: 332380 nosy: cheryl.sabella, rhettinger priority: normal severity: normal status: open title: Convert membership test from dict-of-constants to a set versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 20:26:17 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 23 Dec 2018 01:26:17 +0000 Subject: [issue35566] DOC: Add links to annotation glossary term In-Reply-To: <1545528192.75.0.0770528567349.issue35566@roundup.psfhosted.org> Message-ID: <1545528377.83.0.0770528567349.issue35566@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +10521 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 21:03:57 2018 From: report at bugs.python.org (Katsuhiko YOSHIDA) Date: Sun, 23 Dec 2018 02:03:57 +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: <1545530637.0.0.0770528567349.issue33661@roundup.psfhosted.org> Katsuhiko YOSHIDA added the comment: Hi, I agree with this suggestion. First, section 6.4. "Redirection 3xx" of RFC 7231 doesn't explicitly explain whether to send all headers (including Authorization). I have confirmed that some third-party-library, tool, Programing Language and web browser did NOT forward the Authorization header at redirect. - urllib3 (after 1.23, PR: https://github.com/urllib3/urllib3/pull/1346) - curl (after 7.58.0, ref: https://curl.haxx.se/docs/CVE-2018-1000007.html) - net/http package of Golang (ref: https://github.com/golang/go/blob/release-branch.go1.11/src/net/http/client.go#L41-L46) - Safari Version 12.0.2 (13606.3.4.1.4) - Google Chrome Version 71.0.3578.98 (Official Build) (64-bit) In other words, these are being on the safe side. Actually, HTTPBasicAuthHandler of urllib2 doesn't forward the Authorization header at redirect. If this suggestion is rejected, I think that it should be changed. ---------- keywords: +patch nosy: +kyoshidajp pull_requests: +10522 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 21:34:31 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 23 Dec 2018 02:34:31 +0000 Subject: [issue35565] Add detail to an assertion failure message in wsgiref In-Reply-To: <1545527961.69.0.0770528567349.issue35565@roundup.psfhosted.org> Message-ID: <1545532471.36.0.0770528567349.issue35565@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +10523 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 22:55:57 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Sun, 23 Dec 2018 03:55:57 +0000 Subject: [issue35568] Expose the C raise() function in the signal module, for use on Windows Message-ID: <1545537356.71.0.0770528567349.issue35568@roundup.psfhosted.org> New submission from Nathaniel Smith : Suppose we want to test how a program responds to control-C. We'll want to write a test that delivers a SIGINT to our process at a time of our choosing, and then checks what happens. For example, asyncio and Trio both have tests like this, and Trio even does a similar thing at run-time to avoid dropping signals in an edge case [1]. So, how can we deliver a signal to our process? On POSIX platforms, you can use `os.kill(os.getpid(), signal.SIGINT)`, and that works fine. But on Windows, things are much more complicated: https://github.com/python/cpython/pull/11274#issuecomment-449543725 The simplest solution is to use the raise() function. On POSIX, raise(signum) is just a shorthand for kill(getpid(), signum). But, that's only on POSIX. On Windows, kill() doesn't even exist... but raise() does. In fact raise() is specified in C89, so *every* C runtime has to provide raise(), no matter what OS it runs on. So, you might think, that's ok, if we need to generate synthetic signals on Windows then we'll just use ctypes/cffi to access raise(). *But*, Windows has multiple C runtime libraries (for example: regular and debug), and you have to load raise() from the same library that Python is linked against. And I don't know of any way for a Python script to figure out which runtime it's linked against. (I know how to detect whether the interpreter is configured in debug mode, but that's not necessarily the same as being linked against the debug CRT.) So on the one platform where you really need to use raise(), there's AFAICT no reliable way to get access to it. This would all be much simpler if the signal module wrapped the raise() function, so that we could just do 'signal.raise_(signal.SIGINT)'. We should do that. ------- [1] Specifically, consider the following case (I'll use asyncio terminology for simplicity): (1) the user calls loop.add_signal_handler(...) to register a custom signal handler. (2) a signal arrives, and is written to the wakeup pipe. (3) but, before the loop reads the wakeup pipe, the user calls loop.remove_signal_handler(...) to remove the custom handler and restore the original signal settings. (4) now the loop reads the wakeup pipe, and discovers that a signal has arrived, that it no longer knows how to handle. Now what? In this case trio uses raise() to redeliver the signal, so that the new signal handler has a chance to run. ---------- messages: 332382 nosy: njs, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Expose the C raise() function in the signal module, for use on Windows type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 00:19:06 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 23 Dec 2018 05:19:06 +0000 Subject: [issue35568] Expose the C raise() function in the signal module, for use on Windows In-Reply-To: <1545537356.71.0.0770528567349.issue35568@roundup.psfhosted.org> Message-ID: <1545542346.33.0.0770528567349.issue35568@roundup.psfhosted.org> Steve Dower added the comment: Sounds fine to me. Any particular reason to put it in signal rather than os/posixmodule? If it's just to avoid treating os/posixmodule like a dumping ground for C89/POSIX APIs... well... too late :) I say keep dumping them there. But I don't have a strong opinion about this, and would approve a PR to either location. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 00:39:34 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 23 Dec 2018 05:39:34 +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: <1545543574.78.0.0770528567349.issue33661@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 00:47:47 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Sun, 23 Dec 2018 05:47:47 +0000 Subject: [issue35568] Expose the C raise() function in the signal module, for use on Windows In-Reply-To: <1545537356.71.0.0770528567349.issue35568@roundup.psfhosted.org> Message-ID: <1545544067.51.0.0770528567349.issue35568@roundup.psfhosted.org> Nathaniel Smith added the comment: It probably doesn't matter too much either way, but almost all the signal-related wrappers are in signal. os.kill is the only exception AFAIK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 02:12:30 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Sun, 23 Dec 2018 07:12:30 +0000 Subject: [issue35568] Expose the C raise() function in the signal module, for use on Windows In-Reply-To: <1545537356.71.0.0770528567349.issue35568@roundup.psfhosted.org> Message-ID: <1545549150.38.0.0770528567349.issue35568@roundup.psfhosted.org> Nathaniel Smith added the comment: Vladimir Matveev pointed out that there's already a wrapper in _testcapimodule.c: https://github.com/python/cpython/blob/f06fba5965b4265c42291d10454f387b76111f26/Modules/_testcapimodule.c#L3862-L3879 So if we do add this to signalmodule.c, we can drop that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 05:14:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Dec 2018 10:14:12 +0000 Subject: [issue32067] Deprecate accepting unrecognized braces in regular expressions In-Reply-To: <1511003547.89.0.213398074469.issue32067@psf.upfronthosting.co.za> Message-ID: <1545560052.12.0.0770528567349.issue32067@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 05:52:07 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 23 Dec 2018 10:52:07 +0000 Subject: [issue35564] [DOC] Sphinx 2.0 will require master_doc variable set in conf.py In-Reply-To: <1545514198.61.0.0770528567349.issue35564@roundup.psfhosted.org> Message-ID: <1545562327.21.0.0770528567349.issue35564@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 06:15:34 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 23 Dec 2018 11:15:34 +0000 Subject: [issue35208] IDLE: Squeezed lines count ignores window width In-Reply-To: <1541834301.3.0.788709270274.issue35208@psf.upfronthosting.co.za> Message-ID: <1545563734.94.0.0770528567349.issue35208@roundup.psfhosted.org> Tal Einat added the comment: > Part of my thinking with the simple auto-squeeze formula, besides just simplifying the code, it this. Raymond claimed that squeezing slows down printing. If measurably true, one way to avoid a slow down would be to use a simple heuristic formula to estimate the number of wrapped lines instead of exactly counting. This would be a separate issue, if needed. After Raymond opened issue #35196, I checked and found several places where the auto-squeeze code was being inefficient. There's a PR ready with those optimizations attached to that issue (GH-10454). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 06:51:08 2018 From: report at bugs.python.org (jfbu) Date: Sun, 23 Dec 2018 11:51:08 +0000 Subject: [issue35564] [DOC] Sphinx 2.0 will require master_doc variable set in conf.py In-Reply-To: <1545514198.61.0.0770528567349.issue35564@roundup.psfhosted.org> Message-ID: <1545565868.76.0.0770528567349.issue35564@roundup.psfhosted.org> jfbu added the comment: GitHub PR #11290 has been merged into master ---------- keywords: +patch pull_requests: +10524 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 06:53:56 2018 From: report at bugs.python.org (jfbu) Date: Sun, 23 Dec 2018 11:53:56 +0000 Subject: [issue35564] [DOC] Sphinx 2.0 will require master_doc variable set in conf.py In-Reply-To: <1545514198.61.0.0770528567349.issue35564@roundup.psfhosted.org> Message-ID: <1545566036.19.0.0770528567349.issue35564@roundup.psfhosted.org> Change by jfbu : ---------- pull_requests: -10524 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 06:57:15 2018 From: report at bugs.python.org (jfbu) Date: Sun, 23 Dec 2018 11:57:15 +0000 Subject: [issue35564] [DOC] Sphinx 2.0 will require master_doc variable set in conf.py In-Reply-To: <1545514198.61.0.0770528567349.issue35564@roundup.psfhosted.org> Message-ID: <1545566235.31.0.0770528567349.issue35564@roundup.psfhosted.org> jfbu added the comment: sorry for previous message whose text mentioned the GitHub pull request number but this links to bpo issue of that number, of course completely unrelated ---------- pull_requests: +10525 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 07:00:48 2018 From: report at bugs.python.org (chrysn) Date: Sun, 23 Dec 2018 12:00:48 +0000 Subject: [issue35569] OSX: Enable IPV6_RECVPKTINFO Message-ID: <1545566447.14.0.0770528567349.issue35569@roundup.psfhosted.org> New submission from chrysn : Python builds on MacOS do not expose the IPV6_RECVPKTINFO flag specified in [RFC3842], which is required for UDP protocols that need control over their servers' sending ports like [CoAP]. While I don't own Apple hardware and thus can't test it, the [nginx] code indicates that this API is available on OSX and is just gated behind `-D__APPLE_USE_RFC_3542`. Searching the web for that define indicates that other interpreted langues and applications use the flag as well (PHP, Ruby; PowerDNS, nmap, libcoap). Please consider enabling this on future releases of Python on OSX. [RFC3542]: https://tools.ietf.org/html/rfc3542 [CoAP]: https://github.com/chrysn/aiocoap/issues/69 [nginx]: http://hg.nginx.org/nginx/rev/9fb994513776 ---------- components: IO messages: 332389 nosy: chrysn priority: normal severity: normal status: open title: OSX: Enable IPV6_RECVPKTINFO type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 07:58:39 2018 From: report at bugs.python.org (Hanno Boeck) Date: Sun, 23 Dec 2018 12:58:39 +0000 Subject: [issue35570] 2to3 creates code using deprecated imp module Message-ID: <1545569917.75.0.0770528567349.issue35570@roundup.psfhosted.org> New submission from Hanno Boeck : 2to3 (in python 3.6.6) will rewrite the reload function to use the imp module. However according to [1] "Deprecated since version 3.4: The imp package is pending deprecation in favor of importlib." Also running the code with warnings enabled will show a deprecation warning. Example, take this minimal script: #!/usr/bin/python import sys reload(sys) Running to 2to3 ends up with: #!/usr/bin/python import sys import imp imp.reload(sys) $ PYTHONWARNINGS=d python3 foo.py test.py:3: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp [1] https://docs.python.org/3/library/imp.html ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 332390 nosy: hanno priority: normal severity: normal status: open title: 2to3 creates code using deprecated imp module versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 09:06:47 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 23 Dec 2018 14:06:47 +0000 Subject: [issue35567] Convert membership test from dict-of-constants to a set In-Reply-To: <1545528262.75.0.0770528567349.issue35567@roundup.psfhosted.org> Message-ID: <1545574007.79.0.0770528567349.issue35567@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +10526 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 10:15:46 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 23 Dec 2018 15:15:46 +0000 Subject: [issue35569] OSX: Enable IPV6_RECVPKTINFO In-Reply-To: <1545566447.14.0.0770528567349.issue35569@roundup.psfhosted.org> Message-ID: <1545578146.09.0.0770528567349.issue35569@roundup.psfhosted.org> Ronald Oussoren added the comment: #include in the macOS 10.14 SDK says: /* * RFC 3542 define the following socket options in a manner incompatible * with RFC 2292: * IPV6_PKTINFO * IPV6_HOPLIMIT * IPV6_NEXTHOP * IPV6_HOPOPTS * IPV6_DSTOPTS * IPV6_RTHDR * * To use the new IPv6 Sockets options introduced by RFC 3542 * the constant __APPLE_USE_RFC_3542 must be defined before * including * * To use the old IPv6 Sockets options from RFC 2292 * the constant __APPLE_USE_RFC_2292 must be defined before * including * * Note that eventually RFC 3542 is going to be the * default and RFC 2292 will be obsolete. */ My conclusion from reading this: the name might suggest that this is an internal macro, but should be safe to use. ---------- components: +macOS nosy: +ned.deily, ronaldoussoren stage: -> needs patch versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 11:43:10 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 23 Dec 2018 16:43:10 +0000 Subject: [issue35567] Convert membership test from dict-of-constants to a set In-Reply-To: <1545528262.75.0.0770528567349.issue35567@roundup.psfhosted.org> Message-ID: <1545583390.61.0.0770528567349.issue35567@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 13:05:08 2018 From: report at bugs.python.org (Stefan Volz) Date: Sun, 23 Dec 2018 18:05:08 +0000 Subject: [issue35571] Parallel Timeout Class Message-ID: <1545588307.5.0.0770528567349.issue35571@roundup.psfhosted.org> New submission from Stefan Volz : Hello, I'm currently writing my finals project using Python and needed a feature that threading.Timer could nearly but not quite fulfill: Execute a function after given time *with arguments provided and have the timer resettable*. So I did it myself and today I had the idea that it may be a good addition to the standartlibrary. The class is attached, on the bottom is a small test. ---------- components: Extension Modules files: Timeout.py messages: 332392 nosy: Stefan Volz priority: normal severity: normal status: open title: Parallel Timeout Class type: enhancement versions: Python 3.8 Added file: https://bugs.python.org/file48014/Timeout.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 14:12:46 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 23 Dec 2018 19:12:46 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545592366.23.0.0770528567349.issue35537@roundup.psfhosted.org> Alexey Izbyshev added the comment: > * cwd posix_spawn_file_actions_addchdir_np() is scheduled for glibc 2.29 [1] and exists in Solaris [2] (though its suffix indicates that it's "non-portable" -- not in POSIX). POSIX also has a bug for this [7]. > * start_new_session posix_spawnattr_setflags() supports POSIX_SPAWN_SETSID in musl [3] and glibc 2.26 [4] and is scheduled to be added into POSIX. Solaris also has POSIX_SPAWN_SETSID_NP. > * pass_fds: there is not API to mark a fd as inheritable (clear O_CLOEXEC flag) POSIX has a bug for this [5]. It's marked fixed, but the current POSIX docs doesn't reflect the changes. The idea is to make posix_spawn_file_actions_adddup2() clear O_CLOEXEC if the source and the destination are the same (unlike dup2(), which would do nothing). musl has already implemented the new behavior [6], but glibc hasn't. Another alternative (also described in the POSIX bug report) is to remove O_CLOEXEC via a side-effect of posix_spawn_file_actions_adddup2() to a dummy descriptor and then dup2() it back again. This is not correct in general case -- record locks (fcntl(F_SETLK)) associated with the file referred to by the descriptor are released on the second dup2() -- but in our case those locks are not preserved for the new process anyway, so this is not a problem. I'm not aware of other correctness problems with this, but one needs to check for platforms where a file descriptor may have associated flags other than O_CLOEXEC (such flags would be cleared by dup2). > For pipes like stdout=PIPE or stdout=fd, I didn't look yet how to implement that properly You'd need to reimplement the corresponding logic from _posixsubprocess. Basically, posix_spawn_file_actions_adddup2() and posix_spawn_file_actions_addclose() do the job, but you need to avoid corner cases regarding low fds (0, 1, 2) that might have been reused for pipes. I don't know correct solutions for close_fds. It is already hard: it's implemented in async-safe way only for Linux now (and only if /proc is available) or if /proc is not available and the brute-force implementation is used. And of course, in theory you could implement any of the above by a helper binary as you did for prlimit. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=17405 [2] https://docs.oracle.com/cd/E88353_01/html/E37843/posix-spawn-file-actions-addchdir-np-3c.html [3] https://git.musl-libc.org/cgit/musl/commit/?id=bb439bb17108b67f3df9c9af824d3a607b5b059d [4] https://www.sourceware.org/ml/libc-alpha/2017-08/msg00010.html [5] http://austingroupbugs.net/view.php?id=411 [6] https://git.musl-libc.org/cgit/musl/commit/?id=6fc6ca1a323bc0b6b9e9cdc8fa72221ae18fe206 [7] http://austingroupbugs.net/view.php?id=1208 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 14:23:00 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 23 Dec 2018 19:23:00 +0000 Subject: [issue28108] Python configure fails to detect tzname on platforms that have it. In-Reply-To: <1473708835.14.0.84620259167.issue28108@psf.upfronthosting.co.za> Message-ID: <1545592980.59.0.0770528567349.issue28108@roundup.psfhosted.org> Alexey Izbyshev added the comment: The resolution of this [1] glibc bug report effectively says that the use of global variables tzname, timezone and daylight is not supported by glibc unless a POSIX-style TZ setting is used (which is probably never in real world). [1] https://sourceware.org/bugzilla/show_bug.cgi?id=23859 ---------- nosy: +izbyshev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 15:49:03 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 23 Dec 2018 20:49:03 +0000 Subject: [issue35570] 2to3 creates code using deprecated imp module In-Reply-To: <1545569917.75.0.0770528567349.issue35570@roundup.psfhosted.org> Message-ID: <1545598143.01.0.0770528567349.issue35570@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Seems this came up when the original version of fixer was added as noted in https://bugs.python.org/issue11797#msg206884 . Looking further this seems to be similar to https://bugs.python.org/issue21446 where it was fixed in 3.7 and master to use importlib.reload . Since 3.6 is having it's last bug fix release I am not sure of the backport. Adding benjamin.peterson to the issue . ---------- nosy: +benjamin.peterson, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 16:59:51 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 23 Dec 2018 21:59:51 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows In-Reply-To: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> Message-ID: <1545602391.48.0.0770528567349.issue35555@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 17:35:24 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 23 Dec 2018 22:35:24 +0000 Subject: [issue24814] Idle: Disable menu items when not applicable In-Reply-To: <1438921273.62.0.917598140136.issue24814@psf.upfronthosting.co.za> Message-ID: <1545604524.86.0.0770528567349.issue24814@roundup.psfhosted.org> Cheryl Sabella added the comment: #35555 - Show/Hide Code Context ---------- dependencies: +IDLE: Gray out Code Context on non-editor windows nosy: +cheryl.sabella versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 17:37:30 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 23 Dec 2018 22:37:30 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows In-Reply-To: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> Message-ID: <1545604650.62.0.0770528567349.issue35555@roundup.psfhosted.org> Terry J. Reedy added the comment: Thank you. The backport is PR 11300. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 17:47:03 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 23 Dec 2018 22:47:03 +0000 Subject: [issue35208] IDLE: Squeezed line count ignores wrapping before newline In-Reply-To: <1541834301.3.0.788709270274.issue35208@psf.upfronthosting.co.za> Message-ID: <1545605223.62.0.0770528567349.issue35208@roundup.psfhosted.org> Terry J. Reedy added the comment: The specific bug being fixed here is that wrapped lines before newline are ignored because after if s[pos] == '\n': linecount += 1 current_column = 0 this block if current_column > 0: lines, column = divmod(current_column - 1, linewidth) linecount += lines current_column = column + 1 has no effect. The fix, in the PR, is to put the linecount increment in the \n block before resetting current_column. (Since the column>0 block also has no net effect after \t, I removed it) ---------- title: IDLE: Squeezed lines count ignores window width -> IDLE: Squeezed line count ignores wrapping before newline _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 21:30:10 2018 From: report at bugs.python.org (Sergey Bon.) Date: Mon, 24 Dec 2018 02:30:10 +0000 Subject: [issue30802] datetime.datetime.strptime('200722', '%Y%U') In-Reply-To: <1498726688.6.0.920894490968.issue30802@psf.upfronthosting.co.za> Message-ID: <1545618610.47.0.0770528567349.issue30802@roundup.psfhosted.org> Sergey Bon. added the comment: Documentation says: %U - Week number of the year (Sunday as the first day of the week) %W - Week number of the year (Monday as the first day of the week) It wouldn't be intuitive if %U assumed Sunday when weekday provided and Monday otherwise. There are two separate directives specifically to distinguish these two cases, so which day of the week is the first one should be determined on the used directive: >>> datetime.strptime ('2018 Mon 52', '%Y %a %W') datetime.datetime(2018, 12, 24, 0, 0) >>> datetime.strptime ('2018 52', '%Y %W') datetime.datetime(2018, 12, 24, 0, 0) >>> datetime.strptime ('2018 Sun 52', '%Y %a %U') datetime.datetime(2018, 12, 30, 0, 0) >>> datetime.strptime ('2018 52', '%Y %U') datetime.datetime(2018, 12, 30, 0, 0) ---------- nosy: +sergey-bon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 21:46:06 2018 From: report at bugs.python.org (Sergey Bon.) Date: Mon, 24 Dec 2018 02:46:06 +0000 Subject: [issue30802] datetime.datetime.strptime('200722', '%Y%U') In-Reply-To: <1498726688.6.0.920894490968.issue30802@psf.upfronthosting.co.za> Message-ID: <1545619566.96.0.0770528567349.issue30802@roundup.psfhosted.org> Sergey Bon. added the comment: Not following msg332388 would lead to this: # Sunday of the week 53 >>> datetime.strptime ('2017 Sun 53', '%Y %a %U') datetime.datetime(2017, 12, 31, 0, 0) # First day of the week 53 # oops! assumed Monday is the first day of the week but 2017 ends on Sunday >>> datetime.strptime ('2017 53', '%Y %U') datetime.datetime(2018, 1, 1, 0, 0) >>> datetime.strptime ('2017 Mon 53', '%Y %a %U') datetime.datetime(2018, 1, 1, 0, 0) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 22:05:31 2018 From: report at bugs.python.org (Solomon Ucko) Date: Mon, 24 Dec 2018 03:05:31 +0000 Subject: [issue35572] Logging module cleanup Message-ID: <1545620729.24.0.0770528567349.issue35572@roundup.psfhosted.org> New submission from Solomon Ucko : The logging module should be changed to use snake_case (as opposed to camelCase). Also, logger.basicConfig should list keyword arguments and defaults in the argument list, as opposed to using `**kwargs` and `dict.pop` (for readability and improved inspection capabilities). These should both be relatively easy changes to make. The case conversion should leave the camelCase versions as deprecated but left for backwards compatibility (as in the operator module). ---------- components: Extension Modules messages: 332401 nosy: Solomon Ucko priority: normal severity: normal status: open title: Logging module cleanup 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 Sun Dec 23 22:37:48 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Dec 2018 03:37:48 +0000 Subject: [issue35572] Logging module cleanup In-Reply-To: <1545620729.24.0.0770528567349.issue35572@roundup.psfhosted.org> Message-ID: <1545622668.99.0.0770528567349.issue35572@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +vinay.sajip versions: -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 22:42:28 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Dec 2018 03:42:28 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1545622948.25.0.0770528567349.issue35121@roundup.psfhosted.org> Change by Ned Deily : ---------- keywords: +security_issue priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 22:44:50 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Dec 2018 03:44:50 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1545623090.56.0.0770528567349.issue35121@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 22:53:08 2018 From: report at bugs.python.org (Divya Rani) Date: Mon, 24 Dec 2018 03:53:08 +0000 Subject: [issue35573] is_HDN is returns false positive and false negative value for two test cases respectively Message-ID: <1545623586.83.0.0770528567349.issue35573@roundup.psfhosted.org> Change by Divya Rani : ---------- components: Library (Lib) nosy: Divya Rani priority: normal severity: normal status: open title: is_HDN is returns false positive and false negative value for two test cases respectively type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 22:53:27 2018 From: report at bugs.python.org (Solomon Ucko) Date: Mon, 24 Dec 2018 03:53:27 +0000 Subject: [issue35574] Coconut support Message-ID: <1545623606.14.0.0770528567349.issue35574@roundup.psfhosted.org> New submission from Solomon Ucko : Any chance we could integrate [Coconut](http://coconut-lang.org/) into Python? Any sain Python code should work with Coconut and Coconut allows making code *so* much more readable. IMO, the reason not many people use Coconut is that they haven't heard of it and because of its lack of IDE support. (I would use it if it had more IDE support than just syntax highlighting.) The reason it has so little IDE support is that not many people use it. Making it a part of Python would alleviate these concerns. ---------- messages: 332402 nosy: Solomon Ucko, benjamin.peterson, brett.cannon, yselivanov priority: normal severity: normal status: open title: Coconut support type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 22:54:20 2018 From: report at bugs.python.org (Solomon Ucko) Date: Mon, 24 Dec 2018 03:54:20 +0000 Subject: [issue35575] Improved range syntax Message-ID: <1545623659.43.0.0770528567349.issue35575@roundup.psfhosted.org> New submission from Solomon Ucko : 3 independent but related proposals. (#4 requires #3.) The main issue for #2 and #4 is the readability of a mix of square and round brackets, especially within nested brackets. This would be less of an issue with [Coconut support](https://bugs.python.org/issue35574). #1. Range inclusive/exclusive keyword arguments (mostly backward compatible) Inclusive/exclusive options for range as keyword arguments (defaulting to `inc_start=True, inc_stop=False`). Code that processes range objects will ignore these unless using `in` tests. The semantics would be as follows: ```python class range: ... def __iter__(self): if self.inc_start: yield self.start i = self.start + self.step while i < self.stop if self.step > 0 else i > self.stop: yield i i += self.step if self.inc_stop and i == self.stop: yield i ``` This would allow for control over the slightly controversial decision of inclusivity/exclusivity for ranges on a case-by-case basis. Any existing code that creates ranges would not be impacted. #2. Range syntax (fully backward compatible) Maybe `(start:stop)`, `(start:stop]`, `[start:stop)` and `[start:stop]` could be used to represent ranges? (`(` = exclusive; `[` = inclusive.) Step notation would also be legal. (E.g. `(start:stop:step)`.) This would allow for a concise, familiar notation for ranges. #3. Slice inclusive/exclusive keyword arguments (mostly backward compatible) This is analogous to #1, except with `slice` instead of `range`. #4. Slice inclusive/exclusive syntax (would require a __future__ in Python 3) As opposed to forcing half-open intervals, a mix of round parentheses and square brackets could be allowed to be used for slices, analogously to #2. Since square brackets with a colon currently represent half-open intervals, this would have to require a __future__ import in Python 3. This could become the default in Python 4. ---------- components: Interpreter Core messages: 332403 nosy: Solomon Ucko, benjamin.peterson, brett.cannon, yselivanov priority: normal severity: normal status: open title: Improved range syntax type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 23:06:07 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 24 Dec 2018 04:06:07 +0000 Subject: [issue35573] is_HDN is returns false positive and false negative value for two test cases respectively Message-ID: <1545624367.54.0.0770528567349.issue35573@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : Can you please add a reproducible test case and a description to the issue explaining expected behavior and actual behavior? Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 23:12:14 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Mon, 24 Dec 2018 04:12:14 +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: <1545624734.51.0.0770528567349.issue33678@roundup.psfhosted.org> twisteroid ambassador added the comment: Looks like this bug is also cause by using _ensure_resolved() more than once for a given host+port, so it can probably be fixed together with https://bugs.python.org/issue35545 . Masking sock.type should not be necessary anymore since https://bugs.python.org/issue32331 fixed it. ---------- nosy: +twisteroid ambassador _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 23:18:03 2018 From: report at bugs.python.org (Divya Rani) Date: Mon, 24 Dec 2018 04:18:03 +0000 Subject: [issue35573] is_HDN is returns false positive and false negative value for two test cases respectively In-Reply-To: <1545624367.54.0.0770528567349.issue35573@roundup.psfhosted.org> Message-ID: <1545625083.15.0.0770528567349.issue35573@roundup.psfhosted.org> Divya Rani added the comment: import cookiejar cookiejar.is_HDN("foo!bar.com") Output: True cookiejar.is_HDN("woo.com.") Output: False Test cases taken from: 1. https://github.com/google/guava/blob/581ba1436ebaa54a7f5d0f1db8cc4da0ca72127e/android/guava-tests/test/com/google/common/net/InternetDomainNameTest.java#L81 2. https://github.com/google/guava/blob/581ba1436ebaa54a7f5d0f1db8cc4da0ca72127e/android/guava-tests/test/com/google/common/net/InternetDomainNameTest.java#L65 ---------- nosy: -xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 23:52:34 2018 From: report at bugs.python.org (Divya Rani) Date: Mon, 24 Dec 2018 04:52:34 +0000 Subject: [issue35576] function splitextTest does not return expected value Message-ID: <1545627152.16.0.0770528567349.issue35576@roundup.psfhosted.org> New submission from Divya Rani : 1. For input ".blah." output is "." 2. For input "..." output is "..." results produced by the function are wrong according to the test suite provided by guava. 1. https://github.com/google/guava/blob/1e072a7922a0b3f7b45b9f53405a233834175177/guava-tests/test/com/google/common/io/FilesTest.java#L644 2. https://github.com/google/guava/blob/1e072a7922a0b3f7b45b9f53405a233834175177/guava-tests/test/com/google/common/io/FilesTest.java#L628 ---------- components: Library (Lib) messages: 332407 nosy: Divya Rani priority: normal severity: normal status: open title: function splitextTest does not return expected value type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 00:19:11 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Dec 2018 05:19:11 +0000 Subject: [issue35566] DOC: Add links to annotation glossary term In-Reply-To: <1545528192.75.0.0770528567349.issue35566@roundup.psfhosted.org> Message-ID: <1545628751.33.0.0770528567349.issue35566@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 00:20:51 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Dec 2018 05:20:51 +0000 Subject: [issue34764] Improve documentation example for using iter() with sentinel value In-Reply-To: <1537544491.72.0.956365154283.issue34764@psf.upfronthosting.co.za> Message-ID: <1545628851.78.0.0770528567349.issue34764@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 00:30:27 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Mon, 24 Dec 2018 05:30:27 +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: <1545629427.16.0.0770528567349.issue33661@roundup.psfhosted.org> Emmanuel Arias added the comment: Hi!, Like say Katsuhiko YOSHIDA (https://github.com/python/cpython/pull/11292#issuecomment-449667371) this should be filter other sensitive header. I think that is reasonable if we think on a complete solution to this issue. Maybe this issue could be apply on 3.5+ version? ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 00:38:50 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 24 Dec 2018 05:38:50 +0000 Subject: [issue35573] is_HDN is returns false positive and false negative value for two test cases respectively In-Reply-To: <1545624367.54.0.0770528567349.issue35573@roundup.psfhosted.org> Message-ID: <1545629930.83.0.0770528567349.issue35573@roundup.psfhosted.org> Steven D'Aprano added the comment: What is the module "cookiejar" you are importing? Is that a third-party module? It doesn't seem to be in the standard library. There is a module `http.cookiejar` but it doesn't seem to have an `is_HDN` function. If this is a third-party library, please close this and report it to the maintainers of that library. Can you please explain *why* these are "false positive" and "false negative", and which is which? In particular, do you know for a fact that the test cases you reference actually pass, and are correct if they pass? I'm not an expert, but I don't think domain names can end with a dot, and the "woo.com." test case is the *only* one which ends with a dot, so I suspect it may be a typo, and the test case doesn't actually pass. (Or if it does pass, perhaps it shouldn't.) ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 00:47:16 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 24 Dec 2018 05:47:16 +0000 Subject: [issue35576] function splitextTest does not return expected value In-Reply-To: <1545627152.16.0.0770528567349.issue35576@roundup.psfhosted.org> Message-ID: <1545630436.1.0.0770528567349.issue35576@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the report > 1. For input ".blah." output is "." Please see issue35538 > 2. For input "..." output is "..." Please find the tests at https://github.com/python/cpython/blob/master/Lib/test/test_posixpath.py#L111 For completeness this is the behavior in master ./python.exe Python 3.8.0a0 (heads/master:284b787612, Dec 23 2018, 23:11:33) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.path.splitext("...") ('...', '') >>> os.path.splitext(".blah.") ('.blah', '.') You can find links to other discussions in mailing list and other issues raised about this behavior at https://bugs.python.org/issue34931#msg328820 . Though this might be different from the behavior of guava I think this is something discussed extensively in the mailing list and finally to go with this behavior. So I don't think this is a bug but a behavior difference between guava and CPython implementation. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 00:51:15 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 24 Dec 2018 05:51:15 +0000 Subject: [issue35576] function splitextTest does not return expected value In-Reply-To: <1545627152.16.0.0770528567349.issue35576@roundup.psfhosted.org> Message-ID: <1545630675.56.0.0770528567349.issue35576@roundup.psfhosted.org> Steven D'Aprano added the comment: Please provide a proper reproducible bug report. Don't make us GUESS what function you are referring to. I don't know any "splitextTest" function that you describe in the bug report title. Do you mean os.path.splitext? Then you should say so. If not, then what function are you referring to? What results do you expect, why do you expect them, and what results do you get? Why should we care what test results some Java library returns? Maybe they've got it wrong, or maybe their function just works differently from ours. Unless this function is documented as being exactly compatible with the Java code you link to, I don't think it is very important what guava does. Perhaps you should raise a bug report at Guava and tell them that according to the Python language, their function is wrong. The os.path.splitext function is documented as returning the file extension as either the empty string "" or beginning with a single period, and leading dots are not part of the extension. So the examples you show are correct, if you are talking about os.path.splitext. If you are talking about something else, please explain what. https://docs.python.org/3/library/os.path.html#os.path.splitext ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 01:02:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2018 06:02:32 +0000 Subject: [issue35576] function splitextTest does not return expected value In-Reply-To: <1545627152.16.0.0770528567349.issue35576@roundup.psfhosted.org> Message-ID: <1545631352.13.0.0770528567349.issue35576@roundup.psfhosted.org> Serhiy Storchaka added the comment: As Karthikeyan said, (1) is a duplicate of issue35538. This is expected behavior. (2) is a duplicate of issue35183 which is still discussed. I do not know what relations do tests for third-party Java library have with the Python stdlib. Note that that tests imply that the extension of ".." is ".", that is considered obviously wrong. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> os.path.splitext documentation needs typical example _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 01:02:38 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 24 Dec 2018 06:02:38 +0000 Subject: [issue35573] is_HDN is returns false positive and false negative value for two test cases respectively In-Reply-To: <1545624367.54.0.0770528567349.issue35573@roundup.psfhosted.org> Message-ID: <1545631358.88.0.0770528567349.issue35573@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: > What is the module "cookiejar" you are importing? Is that a third-party module? It doesn't seem to be in the standard library. There is a module `http.cookiejar` but it doesn't seem to have an `is_HDN` function. is_HDN does exist in http.cookiejar [0] which I assume OP is referring to but it's undocumented and used internally in other functions. From the comments and given it was added in 2a6ba9097ee (2004) this may not be as extensive as the guava implementation which I assume is at [1] IPV4_RE = re.compile(r"\.\d+$", re.ASCII) def is_HDN(text): """Return True if text is a host domain name.""" # XXX # This may well be wrong. Which RFC is HDN defined in, if any (for # the purposes of RFC 2965)? # For the current implementation, what about IPv6? Remember to look # at other uses of IPV4_RE also, if change this. if IPV4_RE.search(text): return False if text == "": return False if text[0] == "." or text[-1] == ".": return False return True [0] https://github.com/python/cpython/blob/b7105c9c9663637e4500bfcac75c911e78d9a1c0/Lib/http/cookiejar.py#L521 [1] https://github.com/google/guava/blob/1e072a7922a0b3f7b45b9f53405a233834175177/guava/src/com/google/common/net/InternetDomainName.java#L132 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 01:03:32 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 24 Dec 2018 06:03:32 +0000 Subject: [issue35574] Coconut support In-Reply-To: <1545623606.14.0.0770528567349.issue35574@roundup.psfhosted.org> Message-ID: <1545631412.77.0.0770528567349.issue35574@roundup.psfhosted.org> Steven D'Aprano added the comment: Do you have agreement from the maintainer(s) of Coconut that they are willing to put Coconut into the Python language and/or std library? Given that Coconut is effectively a radically different language from Python (a superset of Python) this is not a small change. While it is at least possible that we would consider individual features from Coconut, integrating the two languages is unlikely. That would basically turn Python into Coconut and make Python obsolete. In any case, as a radical change, possibly as big as the move from Python 2 to 3, this will absolutely need a PEP. https://www.python.org/dev/peps/ You say: "Coconut allows making code *so* much more readable." but that's your opinion, I'm sure that there are many people who don't like or appreciate the sort of functional idioms which Coconut specializes in. But having said that, I personally do like *some* of the Coconut syntax. I think a more productive approach will be to propose *individual* enhancements, allowing each enhancement to be considered on its own merits, rather than suggesting the two languages be integrated. That sort of "everything or nothing" approach is almost certainly going to get the response "OK, nothing". As for the IDE support, that's not our problem. We're not responsible for convincing IDEs to provide better support for every experimental third-party language. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 01:06:33 2018 From: report at bugs.python.org (Divya Rani) Date: Mon, 24 Dec 2018 06:06:33 +0000 Subject: [issue35573] is_HDN is returns false positive and false negative value for two test cases respectively In-Reply-To: <1545624367.54.0.0770528567349.issue35573@roundup.psfhosted.org> Message-ID: <1545631593.86.0.0770528567349.issue35573@roundup.psfhosted.org> Divya Rani added the comment: The function link is here: https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Lib/http/cookiejar.py#L521 The function returned true for "foo!bar.com" which is false positive and the test case is taken from the list of invalid domain names present in Guava test suite https://github.com/google/guava/blob/581ba1436ebaa54a7f5d0f1db8cc4da0ca72127e/android/guava-tests/test/com/google/common/net/InternetDomainNameTest.java#L81 Domain names with dots at the end are fully qualified domain names. (reference: 1.https://stackoverflow.com/questions/19480767/domain-names-with-dots-at-the-end#answer-19498025 2. https://en.wikipedia.org/wiki/Fully_qualified_domain_name#Syntax ) the function returned false for "woo.com." which is a false negative. The test case is again taken from list of valid domain names provided by guava test suite (https://github.com/google/guava/blob/581ba1436ebaa54a7f5d0f1db8cc4da0ca72127e/android/guava-tests/test/com/google/common/net/InternetDomainNameTest.java#L65) ---------- nosy: -xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 01:09:39 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 24 Dec 2018 06:09:39 +0000 Subject: [issue35574] Coconut support In-Reply-To: <1545623606.14.0.0770528567349.issue35574@roundup.psfhosted.org> Message-ID: <1545631779.93.0.0770528567349.issue35574@roundup.psfhosted.org> Steven D'Aprano added the comment: One more thing: if you intend to proceed with this, either as individual enhancements or a PEP, you should discuss them on the Python-Ideas mailing list first, to see how much or little community support the proposals have. Until then, I'm closing this as "Postponed". ---------- resolution: -> postponed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 01:37:50 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 24 Dec 2018 06:37:50 +0000 Subject: [issue35575] Improved range syntax In-Reply-To: <1545623659.43.0.0770528567349.issue35575@roundup.psfhosted.org> Message-ID: <1545633470.07.0.0770528567349.issue35575@roundup.psfhosted.org> Steven D'Aprano added the comment: These proposals probably should be discussed on Python-Ideas first. You should also familiarize yourself with previous proposals to enhance range, such as https://mail.python.org/pipermail/python-ideas/2018-November/054510.html and the bug report #35200 For what it is worth, Guido was generally (slightly) opposed to "constant bool parameters", functions that take a parameter which is generally given as a literal True/False flag. That's often (not always) a design smell. I agree with him, so I would be very wary about adding not one but two such constant bool parameters. Especially for such a trivial enhancement. There's nothing in the `inc_start=True, inc_stop=False` functionality which can't be more easily done by simply adding one to the appropriate range arguments: # same as inc_start=False, inc_stop=True but easier range(start+1, end+1) You say: "a mix of round parentheses and square brackets could be allowed" but I think such a proposal would run foul of the requirement that Python's grammar be no more complex than LL(1). (Someone will correct me if I'm wrong.) ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 01:38:47 2018 From: report at bugs.python.org (Vladimir Matveev) Date: Mon, 24 Dec 2018 06:38:47 +0000 Subject: [issue35568] Expose the C raise() function in the signal module, for use on Windows In-Reply-To: <1545537356.71.0.0770528567349.issue35568@roundup.psfhosted.org> Message-ID: <1545633527.06.0.0770528567349.issue35568@roundup.psfhosted.org> Change by Vladimir Matveev : ---------- nosy: +v2m _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 01:55:58 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Dec 2018 06:55:58 +0000 Subject: [issue30561] sync-up gammavariate and expovariate code In-Reply-To: <1496520990.41.0.958054362061.issue30561@psf.upfronthosting.co.za> Message-ID: <1545634558.86.0.0770528567349.issue30561@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 02:42:11 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Dec 2018 07:42:11 +0000 Subject: [issue35105] Document that CPython accepts "invalid" identifiers In-Reply-To: <1540815891.13.0.788709270274.issue35105@psf.upfronthosting.co.za> Message-ID: <1545637331.58.0.0770528567349.issue35105@roundup.psfhosted.org> Raymond Hettinger added the comment: I don't think we can mark this as an implementation detail for setattr(). The details are downstream and determined by the target object, not by setattr() itself. Suggested wording: ''' Note, setattr() attempts to update the object with the given attr/value pair. Whether this succeeds and what its affect is is determined by the target object. If an object's class defines `__slots__`, the attribute may not be writeable. If an object's class defines property with a setter method, the *setattr()* will trigger the setter method which may or may not actually write the attribute. For objects that have a regular dictionary (which is the typical case), the *setattr()* call can make any string keyed update allowed by the dictionary including keys that aren't valid identifiers -- for example setattr(a, '1', 'one') will be the equivalent of vars()['1'] ='one'. This issue has little to do with setattr() and is more related to the fact that instance dictionaries can hold any valid key. In a way, it is no different than a user writing a.__dict__['1'] = 'one'. That has always been allowed and the __dict__ attribute is documented as writeable, so a user is also allowed to write `a.dict = {'1': 'one'}. ''' In short, we can talk about this in the setattr() docs but it isn't really a setattr() issue. Also, the behavior is effectively guaranteed by the other things users are allowed to do, so there is no merit in marking this as an implementation detail. Non-identifier keys can make it into an instance dictionary via multiple paths that are guaranteed to work. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 02:47:56 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Dec 2018 07:47:56 +0000 Subject: [issue32070] Clarify the behavior of the staticmethod builtin In-Reply-To: <1511028255.0.0.213398074469.issue32070@psf.upfronthosting.co.za> Message-ID: <1545637676.83.0.0770528567349.issue32070@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 02:59:38 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Dec 2018 07:59:38 +0000 Subject: [issue29886] links between binascii.{un,}hexlify / bytes.{,to}hex In-Reply-To: <1490282084.27.0.505150099985.issue29886@psf.upfronthosting.co.za> Message-ID: <1545638378.96.0.0770528567349.issue29886@roundup.psfhosted.org> Raymond Hettinger added the comment: This is a reasonable suggestion. Will apply the patch shortly. ---------- nosy: +rhettinger resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 03:02:34 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Dec 2018 08:02:34 +0000 Subject: [issue35105] Document that CPython accepts "invalid" identifiers In-Reply-To: <1540815891.13.0.788709270274.issue35105@psf.upfronthosting.co.za> Message-ID: <1545638554.95.0.0770528567349.issue35105@roundup.psfhosted.org> Raymond Hettinger added the comment: FWIW, the only restriction added by setattr() is that *name* must be a string. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 03:06:31 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Dec 2018 08:06:31 +0000 Subject: [issue35575] Improved range syntax In-Reply-To: <1545623659.43.0.0770528567349.issue35575@roundup.psfhosted.org> Message-ID: <1545638791.05.0.0770528567349.issue35575@roundup.psfhosted.org> Raymond Hettinger added the comment: A Steven noted, this will need to go to Python ideas. FWIW, there are a number of rejected PEPs on this subject. Please have a look at those to see what has been previously discusses and decided. ---------- nosy: +rhettinger resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 04:07:15 2018 From: report at bugs.python.org (Harmandeep Singh) Date: Mon, 24 Dec 2018 09:07:15 +0000 Subject: [issue13927] Extra spaces in the output of time.ctime In-Reply-To: <1328215776.48.0.974828105123.issue13927@psf.upfronthosting.co.za> Message-ID: <1545642435.86.0.0770528567349.issue13927@roundup.psfhosted.org> Harmandeep Singh added the comment: I have created the PR as mentioned, I have added the example for time.ctime() and also added the note to time.asctime. ---------- pull_requests: +10527 stage: -> patch review 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 Dec 24 04:59:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2018 09:59:22 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1545645562.17.0.0770528567349.issue35121@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +ned.deily priority: high -> release blocker type: behavior -> security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 07:22:01 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 24 Dec 2018 12:22:01 +0000 Subject: [issue35208] IDLE: Squeezed line count ignores wrapping before newline In-Reply-To: <1541834301.3.0.788709270274.issue35208@psf.upfronthosting.co.za> Message-ID: <1545654121.67.0.0770528567349.issue35208@roundup.psfhosted.org> Change by Tal Einat : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 07:35:44 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Dec 2018 12:35:44 +0000 Subject: [issue35485] Mac: tkinter windows turn black while resized In-Reply-To: <1544732559.26.0.788709270274.issue35485@psf.upfronthosting.co.za> Message-ID: <1545654944.2.0.0770528567349.issue35485@roundup.psfhosted.org> Ned Deily added the comment: Update: After producing release installers for 3.7.2 and 3.6.8 using Tk 8.6.9.1 (option 2 above), I ran into a new and much more severe regression. For macOS 10.14 (Mojave), the only regression I know of remains the "window turning black while resizing" issue. However, when I did a quick test with macOS 10.13 and a few older systems, I found that, while they didn't exhibit the resizing issue, attempts to open IDLE's Settings (Preferences) window or the "About IDLE" window caused IDLE to become inoperative, requiring a Force Quit to exit. 10.14 does not seem to exhibit this behavior. Given that, I felt we had no choice but to fall back to Tcl/Tk 8.6.8 (option 1). When linked with 8.6.8, IDLE exhibited neither the screen size issue nor the inoperative issue on the systems I quick tested (10.8, 10.13, and 10.14). Needless to say, this has not been very encouraging. I think someone (not me) needs to follow up on these issues with the Tk folks, perhaps open issues on the Tk tracker especially if they can be duplicated without Python. We also can't rule out the need for IDLE or tkinter changes to accommodate Tk fixes for long standing problems. I will leave available the test installers I produced last week with the top of trunk 8.6.x to make it easier to experiment with. ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:14:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2018 13:14:23 +0000 Subject: [issue34193] Fix pluralization in TypeError messages in getargs.c In-Reply-To: <1532325256.19.0.56676864532.issue34193@psf.upfronthosting.co.za> Message-ID: <1545657263.04.0.712150888896.issue34193@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 6326278e8a3a4b6ac41a74effa63331b1b9fdf5c by Serhiy Storchaka (Xtreak) in branch 'master': bpo-34193: Fix pluralization in getargs.c and test cases. (GH-8438) https://github.com/python/cpython/commit/6326278e8a3a4b6ac41a74effa63331b1b9fdf5c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:15:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2018 13:15:43 +0000 Subject: [issue33830] Error in the output of one example in the httplib docs In-Reply-To: <1528713903.44.0.592728768989.issue33830@psf.upfronthosting.co.za> Message-ID: <1545657343.29.0.712150888896.issue33830@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset f0af4c54e32d963e1ccbac005bcbcab1913e051f by Serhiy Storchaka (Xtreak) in branch 'master': bpo-33830: Fix an example in http.client docs for 404. (GH-7780) https://github.com/python/cpython/commit/f0af4c54e32d963e1ccbac005bcbcab1913e051f ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:16:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2018 13:16:36 +0000 Subject: [issue33830] Error in the output of one example in the httplib docs In-Reply-To: <1528713903.44.0.592728768989.issue33830@psf.upfronthosting.co.za> Message-ID: <1545657396.49.0.712150888896.issue33830@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset f0af4c54e32d963e1ccbac005bcbcab1913e051f by Serhiy Storchaka (Xtreak) in branch 'master': bpo-33830: Fix an example in http.client docs for 404. (GH-7780) https://github.com/python/cpython/commit/f0af4c54e32d963e1ccbac005bcbcab1913e051f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:16:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2018 13:16:57 +0000 Subject: [issue33830] Error in the output of one example in the httplib docs In-Reply-To: <1528713903.44.0.592728768989.issue33830@psf.upfronthosting.co.za> Message-ID: <1545657417.38.0.712150888896.issue33830@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset f0af4c54e32d963e1ccbac005bcbcab1913e051f by Serhiy Storchaka (Xtreak) in branch 'master': bpo-33830: Fix an example in http.client docs for 404. (GH-7780) https://github.com/python/cpython/commit/f0af4c54e32d963e1ccbac005bcbcab1913e051f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:17:14 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 13:17:14 +0000 Subject: [issue33830] Error in the output of one example in the httplib docs In-Reply-To: <1528713903.44.0.592728768989.issue33830@psf.upfronthosting.co.za> Message-ID: <1545657434.53.0.712150888896.issue33830@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10528 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:18:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2018 13:18:25 +0000 Subject: [issue34193] Fix pluralization in TypeError messages in getargs.c In-Reply-To: <1532325256.19.0.56676864532.issue34193@psf.upfronthosting.co.za> Message-ID: <1545657505.69.0.712150888896.issue34193@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:25:03 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 13:25:03 +0000 Subject: [issue33830] Error in the output of one example in the httplib docs In-Reply-To: <1528713903.44.0.592728768989.issue33830@psf.upfronthosting.co.za> Message-ID: <1545657903.25.0.712150888896.issue33830@roundup.psfhosted.org> miss-islington added the comment: New changeset 26ab036098cc0f9e884ef87894f064268a24da0f by Miss Islington (bot) in branch '3.7': bpo-33830: Fix an example in http.client docs for 404. (GH-7780) https://github.com/python/cpython/commit/26ab036098cc0f9e884ef87894f064268a24da0f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:25:22 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 13:25:22 +0000 Subject: [issue33830] Error in the output of one example in the httplib docs In-Reply-To: <1528713903.44.0.592728768989.issue33830@psf.upfronthosting.co.za> Message-ID: <1545657922.0.0.712150888896.issue33830@roundup.psfhosted.org> miss-islington added the comment: New changeset 26ab036098cc0f9e884ef87894f064268a24da0f by Miss Islington (bot) in branch '3.7': bpo-33830: Fix an example in http.client docs for 404. (GH-7780) https://github.com/python/cpython/commit/26ab036098cc0f9e884ef87894f064268a24da0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:25:39 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 13:25:39 +0000 Subject: [issue33830] Error in the output of one example in the httplib docs In-Reply-To: <1528713903.44.0.592728768989.issue33830@psf.upfronthosting.co.za> Message-ID: <1545657939.02.0.712150888896.issue33830@roundup.psfhosted.org> miss-islington added the comment: New changeset 26ab036098cc0f9e884ef87894f064268a24da0f by Miss Islington (bot) in branch '3.7': bpo-33830: Fix an example in http.client docs for 404. (GH-7780) https://github.com/python/cpython/commit/26ab036098cc0f9e884ef87894f064268a24da0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:26:12 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 13:26:12 +0000 Subject: [issue33830] Error in the output of one example in the httplib docs In-Reply-To: <1528713903.44.0.592728768989.issue33830@psf.upfronthosting.co.za> Message-ID: <1545657972.01.0.712150888896.issue33830@roundup.psfhosted.org> miss-islington added the comment: New changeset 26ab036098cc0f9e884ef87894f064268a24da0f by Miss Islington (bot) in branch '3.7': bpo-33830: Fix an example in http.client docs for 404. (GH-7780) https://github.com/python/cpython/commit/26ab036098cc0f9e884ef87894f064268a24da0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:26:30 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 13:26:30 +0000 Subject: [issue33830] Error in the output of one example in the httplib docs In-Reply-To: <1528713903.44.0.592728768989.issue33830@psf.upfronthosting.co.za> Message-ID: <1545657990.71.0.712150888896.issue33830@roundup.psfhosted.org> miss-islington added the comment: New changeset 26ab036098cc0f9e884ef87894f064268a24da0f by Miss Islington (bot) in branch '3.7': bpo-33830: Fix an example in http.client docs for 404. (GH-7780) https://github.com/python/cpython/commit/26ab036098cc0f9e884ef87894f064268a24da0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:27:02 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 13:27:02 +0000 Subject: [issue33830] Error in the output of one example in the httplib docs In-Reply-To: <1528713903.44.0.592728768989.issue33830@psf.upfronthosting.co.za> Message-ID: <1545658022.42.0.712150888896.issue33830@roundup.psfhosted.org> miss-islington added the comment: New changeset 26ab036098cc0f9e884ef87894f064268a24da0f by Miss Islington (bot) in branch '3.7': bpo-33830: Fix an example in http.client docs for 404. (GH-7780) https://github.com/python/cpython/commit/26ab036098cc0f9e884ef87894f064268a24da0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:27:28 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 13:27:28 +0000 Subject: [issue33830] Error in the output of one example in the httplib docs In-Reply-To: <1528713903.44.0.592728768989.issue33830@psf.upfronthosting.co.za> Message-ID: <1545658048.46.0.712150888896.issue33830@roundup.psfhosted.org> miss-islington added the comment: New changeset 26ab036098cc0f9e884ef87894f064268a24da0f by Miss Islington (bot) in branch '3.7': bpo-33830: Fix an example in http.client docs for 404. (GH-7780) https://github.com/python/cpython/commit/26ab036098cc0f9e884ef87894f064268a24da0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:27:46 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 13:27:46 +0000 Subject: [issue33830] Error in the output of one example in the httplib docs In-Reply-To: <1528713903.44.0.592728768989.issue33830@psf.upfronthosting.co.za> Message-ID: <1545658066.68.0.712150888896.issue33830@roundup.psfhosted.org> miss-islington added the comment: New changeset 26ab036098cc0f9e884ef87894f064268a24da0f by Miss Islington (bot) in branch '3.7': bpo-33830: Fix an example in http.client docs for 404. (GH-7780) https://github.com/python/cpython/commit/26ab036098cc0f9e884ef87894f064268a24da0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:00:05 2018 From: report at bugs.python.org (Matthew McCormick) Date: Mon, 24 Dec 2018 14:00:05 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660005.89.0.712150888896.issue11566@roundup.psfhosted.org> Change by Matthew McCormick : ---------- pull_requests: +10529 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:04:52 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:04:52 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660292.58.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:05:59 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:05:59 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660359.67.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:06:37 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:06:37 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660397.42.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:06:54 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:06:54 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660414.82.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:07:17 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:07:17 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660414.82.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71 ---------- pull_requests: +10530 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:07:29 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:07:29 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660449.86.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:07:51 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:07:51 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660449.86.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:07:53 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:07:53 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660473.13.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:08:25 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:08:25 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660504.99.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:09:10 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:09:10 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660550.03.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:09:35 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:09:35 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660550.03.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:09:37 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:09:37 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660577.05.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:10:07 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:10:07 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660607.74.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:11:57 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:11:57 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660717.35.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7': bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283) https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:12:17 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:12:17 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660717.35.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7': bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283) https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:12:19 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:12:19 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660739.0.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:12:35 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:12:35 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660755.39.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7': bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283) https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:13:24 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:13:24 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660804.18.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7': bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283) https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:13:46 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:13:46 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660804.18.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7': bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283) https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:13:48 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:13:48 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660828.4.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7': bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283) https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:14:40 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:14:40 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660880.41.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7': bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283) https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:15:20 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:15:20 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545660920.0.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:18:46 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:18:46 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545661126.49.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7': bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283) https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:19:05 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:19:05 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545661126.49.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7': bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283) https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:19:08 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 14:19:08 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545661148.06.0.712150888896.issue11566@roundup.psfhosted.org> miss-islington added the comment: New changeset c046d6b6187e4de98a29e67ccbfd9b1b8790ee2f by Miss Islington (bot) in branch '3.7': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/c046d6b6187e4de98a29e67ccbfd9b1b8790ee2f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:19:31 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 14:19:31 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545661148.06.0.712150888896.issue11566@roundup.psfhosted.org> miss-islington added the comment: New changeset c046d6b6187e4de98a29e67ccbfd9b1b8790ee2f by Miss Islington (bot) in branch '3.7': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/c046d6b6187e4de98a29e67ccbfd9b1b8790ee2f ---------- nosy: +miss-islington, miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:19:33 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 14:19:33 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545661173.24.0.712150888896.issue11566@roundup.psfhosted.org> miss-islington added the comment: New changeset c046d6b6187e4de98a29e67ccbfd9b1b8790ee2f by Miss Islington (bot) in branch '3.7': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/c046d6b6187e4de98a29e67ccbfd9b1b8790ee2f ---------- nosy: +miss-islington, miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:21:13 2018 From: report at bugs.python.org (Sergey Bon.) Date: Mon, 24 Dec 2018 14:21:13 +0000 Subject: [issue30802] datetime.datetime.strptime('200722', '%Y%U') In-Reply-To: <1498726688.6.0.920894490968.issue30802@psf.upfronthosting.co.za> Message-ID: <1545661273.09.0.712150888896.issue30802@roundup.psfhosted.org> Sergey Bon. added the comment: If %W and %U are allowed to be used without specifying the weekday by assuming it to be the first day of the week, then the same rule should apply to %V (ISO 8601 week) for consistency. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:37:30 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 14:37:30 +0000 Subject: [issue22703] Idle Code Context menu entrie(s) In-Reply-To: <1414023415.32.0.701318253357.issue22703@psf.upfronthosting.co.za> Message-ID: <1545662250.39.0.712150888896.issue22703@roundup.psfhosted.org> miss-islington added the comment: New changeset c1b4b0f6160e1919394586f44b12538505fed300 by Miss Islington (bot) (Cheryl Sabella) in branch 'master': bpo-22703: IDLE: Improve Code Context and Zoom Height menu labels (GH-11214) https://github.com/python/cpython/commit/c1b4b0f6160e1919394586f44b12538505fed300 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:37:43 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 14:37:43 +0000 Subject: [issue22703] Idle Code Context menu entrie(s) In-Reply-To: <1414023415.32.0.701318253357.issue22703@psf.upfronthosting.co.za> Message-ID: <1545662263.37.0.712150888896.issue22703@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10531 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:45:14 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 14:45:14 +0000 Subject: [issue22703] Idle Code Context menu entrie(s) In-Reply-To: <1414023415.32.0.701318253357.issue22703@psf.upfronthosting.co.za> Message-ID: <1545662714.88.0.712150888896.issue22703@roundup.psfhosted.org> miss-islington added the comment: New changeset 48a206978c890387aa573991cfe992d0c1951048 by Miss Islington (bot) in branch '3.7': bpo-22703: IDLE: Improve Code Context and Zoom Height menu labels (GH-11214) https://github.com/python/cpython/commit/48a206978c890387aa573991cfe992d0c1951048 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:48:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2018 14:48:06 +0000 Subject: [issue30455] Generate all tokens related code and docs from Grammar/Tokens In-Reply-To: <1495628509.86.0.512362155714.issue30455@psf.upfronthosting.co.za> Message-ID: <1545662886.92.0.712150888896.issue30455@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 8ac658114dec4964479baecfbc439fceb40eaa79 by Serhiy Storchaka in branch 'master': bpo-30455: Generate all token related code and docs from Grammar/Tokens. (GH-10370) https://github.com/python/cpython/commit/8ac658114dec4964479baecfbc439fceb40eaa79 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:54:38 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 14:54:38 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545663278.23.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7': bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283) https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:57:29 2018 From: report at bugs.python.org (Julien Palard) Date: Mon, 24 Dec 2018 14:57:29 +0000 Subject: [issue35564] [DOC] Sphinx 2.0 will require master_doc variable set in conf.py In-Reply-To: <1545514198.61.0.0770528567349.issue35564@roundup.psfhosted.org> Message-ID: <1545663449.65.0.712150888896.issue35564@roundup.psfhosted.org> Julien Palard added the comment: New changeset fc8284e22074af8154e9865c8391b955f13a308b by Julien Palard (Jean-Fran?ois B) in branch 'master': bpo-35564: add master_doc='contents' to conf.py (GH-11290) https://github.com/python/cpython/commit/fc8284e22074af8154e9865c8391b955f13a308b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:15:39 2018 From: report at bugs.python.org (Adnan Umer) Date: Mon, 24 Dec 2018 15:15:39 +0000 Subject: [issue35500] Align expected and actual calls on mock.assert_called_with error message In-Reply-To: <1544813146.35.0.788709270274.issue35500@psf.upfronthosting.co.za> Message-ID: <1545664539.9.0.712150888896.issue35500@roundup.psfhosted.org> Adnan Umer added the comment: When a method/bounded function is mocked and side_effect is supplied to it, the side_effect function doesn't get the reference to the instance. Suppose we have something like this class SomeClass: def do_something(self, x): pass def some_function(x): cls = SomeClass() y = class.do_something(x) return y And the test for some_function will be def do_something_side_effect(x): retrun x def test_some_function(): with mock.path("SomeCass.do_something") as do_something_mock: do_something_mock.side_effect = do_something_side_effect assert some_function(1) Here do_something_side_effect mock will not have access to SomeClass instance. ---------- nosy: +Adnan Umer versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:19:01 2018 From: report at bugs.python.org (Adnan Umer) Date: Mon, 24 Dec 2018 15:19:01 +0000 Subject: [issue35577] side_effect mocked method lose reference to instance Message-ID: <1545664740.73.0.712150888896.issue35577@roundup.psfhosted.org> New submission from Adnan Umer : When a method/bounded function is mocked and side_effect is supplied to it, the side_effect function doesn't get the reference to the instance. Suppose we have something like this class SomeClass: def do_something(self, x): pass def some_function(x): cls = SomeClass() y = class.do_something(x) return y And the test for some_function will be def do_something_side_effect(x): retrun x def test_some_function(): with mock.path("SomeCass.do_something") as do_something_mock: do_something_mock.side_effect = do_something_side_effect assert some_function(1) Here do_something_side_effect mock will not have access to SomeClass instance. ---------- components: Library (Lib) messages: 332463 nosy: Adnan Umer priority: normal severity: normal status: open title: side_effect mocked method lose reference to instance 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 Mon Dec 24 10:19:58 2018 From: report at bugs.python.org (Julien Palard) Date: Mon, 24 Dec 2018 15:19:58 +0000 Subject: [issue35564] [DOC] Sphinx 2.0 will require master_doc variable set in conf.py In-Reply-To: <1545514198.61.0.0770528567349.issue35564@roundup.psfhosted.org> Message-ID: <1545664798.37.0.712150888896.issue35564@roundup.psfhosted.org> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:20:18 2018 From: report at bugs.python.org (Adnan Umer) Date: Mon, 24 Dec 2018 15:20:18 +0000 Subject: [issue35500] Align expected and actual calls on mock.assert_called_with error message In-Reply-To: <1544813146.35.0.788709270274.issue35500@psf.upfronthosting.co.za> Message-ID: <1545664818.3.0.712150888896.issue35500@roundup.psfhosted.org> Adnan Umer added the comment: Please ignore my above message. I accidentally added that here. Sorry :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:30:42 2018 From: report at bugs.python.org (Chris Withers) Date: Mon, 24 Dec 2018 15:30:42 +0000 Subject: [issue35500] Align expected and actual calls on mock.assert_called_with error message In-Reply-To: <1544813146.35.0.788709270274.issue35500@psf.upfronthosting.co.za> Message-ID: <1545665442.47.0.712150888896.issue35500@roundup.psfhosted.org> Change by Chris Withers : ---------- Removed message: https://bugs.python.org/msg332462 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:30:55 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Dec 2018 15:30:55 +0000 Subject: [issue35567] Convert membership test from dict-of-constants to a set In-Reply-To: <1545528262.75.0.0770528567349.issue35567@roundup.psfhosted.org> Message-ID: <1545665455.89.0.712150888896.issue35567@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 68151553845199136794bd60dcec238d8bfe0bdb by Raymond Hettinger (Cheryl Sabella) in branch 'master': bpo-35567: Convert dict of constants to a set (GH-11296) https://github.com/python/cpython/commit/68151553845199136794bd60dcec238d8bfe0bdb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:31:02 2018 From: report at bugs.python.org (Chris Withers) Date: Mon, 24 Dec 2018 15:31:02 +0000 Subject: [issue35500] Align expected and actual calls on mock.assert_called_with error message In-Reply-To: <1544813146.35.0.788709270274.issue35500@psf.upfronthosting.co.za> Message-ID: <1545665462.17.0.712150888896.issue35500@roundup.psfhosted.org> Change by Chris Withers : ---------- Removed message: https://bugs.python.org/msg332464 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:34:44 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Dec 2018 15:34:44 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545665684.1.0.712150888896.issue35257@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +10532 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:36:18 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 15:36:18 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545665778.57.0.712150888896.issue35257@roundup.psfhosted.org> miss-islington added the comment: New changeset 44a3ee07e30e18d83e2730c093d8b0e930f0a06c by Miss Islington (bot) (Ned Deily) in branch 'master': bpo-35257: fix broken BLDSHARED - needs LDFLAGS too (GH-11297) https://github.com/python/cpython/commit/44a3ee07e30e18d83e2730c093d8b0e930f0a06c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:36:54 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 15:36:54 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545665814.48.0.712150888896.issue35257@roundup.psfhosted.org> miss-islington added the comment: New changeset 44a3ee07e30e18d83e2730c093d8b0e930f0a06c by Miss Islington (bot) (Ned Deily) in branch 'master': bpo-35257: fix broken BLDSHARED - needs LDFLAGS too (GH-11297) https://github.com/python/cpython/commit/44a3ee07e30e18d83e2730c093d8b0e930f0a06c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:37:24 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 15:37:24 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545665844.49.0.712150888896.issue35257@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10533 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:38:04 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 24 Dec 2018 15:38:04 +0000 Subject: [issue35568] Expose the C raise() function in the signal module, for use on Windows In-Reply-To: <1545537356.71.0.0770528567349.issue35568@roundup.psfhosted.org> Message-ID: <1545665884.4.0.712150888896.issue35568@roundup.psfhosted.org> Steve Dower added the comment: That implementation will require some more of our usual macros around the call itself (for GIL and invalid values), and maybe clinicisation, as well as more through tests, which are probably going to be the hardest part. Nathaniel - were you planning to do this? Or should we put the "easy (C)" keyword on it and wait for some sprints? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:38:43 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 15:38:43 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545665923.27.0.712150888896.issue35257@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10534 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:40:51 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 15:40:51 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545666051.31.0.712150888896.issue35257@roundup.psfhosted.org> miss-islington added the comment: New changeset 3d4b4b80f290e622b05ca219ad6dabc07b49421a by Miss Islington (bot) in branch '3.7': bpo-35257: fix broken BLDSHARED - needs LDFLAGS too (GH-11297) https://github.com/python/cpython/commit/3d4b4b80f290e622b05ca219ad6dabc07b49421a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:41:43 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Dec 2018 15:41:43 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545666103.44.0.712150888896.issue35257@roundup.psfhosted.org> Ned Deily added the comment: New changeset 68f5dfd955ee7a16fabf90d7c370159cc0ca9b75 by Ned Deily (Miss Islington (bot)) in branch '3.6': bpo-35257: fix broken BLDSHARED - needs LDFLAGS too (GH-11297) (GH-11299) https://github.com/python/cpython/commit/68f5dfd955ee7a16fabf90d7c370159cc0ca9b75 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:42:46 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Dec 2018 15:42:46 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows In-Reply-To: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> Message-ID: <1545666166.8.0.712150888896.issue35555@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 8874f511e7473b08d6b0ccd9261dd415a072a34d by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-35555: IDLE: Gray out Code Context menu item on non-editors (#11282) https://github.com/python/cpython/commit/8874f511e7473b08d6b0ccd9261dd415a072a34d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:43:37 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 15:43:37 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows In-Reply-To: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> Message-ID: <1545666217.28.0.712150888896.issue35555@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10535 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:45:03 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Dec 2018 15:45:03 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows In-Reply-To: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> Message-ID: <1545666303.12.0.712150888896.issue35555@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset d4f7616da3c9aa870e9e2580e1019d6a62173e12 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-35555: IDLE: Gray out Code Context menu item on non-editors (GH-11282) (GH-11300) https://github.com/python/cpython/commit/d4f7616da3c9aa870e9e2580e1019d6a62173e12 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:49:27 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Dec 2018 15:49:27 +0000 Subject: [issue34764] Improve documentation example for using iter() with sentinel value In-Reply-To: <1537544491.72.0.956365154283.issue34764@psf.upfronthosting.co.za> Message-ID: <1545666567.84.0.712150888896.issue34764@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset d378b1f8ed7919f65a89f026bc899204be3773d4 by Raymond Hettinger (Chris Rands) in branch 'master': bpo-34764: improve docs example of iter() with sentinel value (GH-11222) https://github.com/python/cpython/commit/d378b1f8ed7919f65a89f026bc899204be3773d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:50:06 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 15:50:06 +0000 Subject: [issue34764] Improve documentation example for using iter() with sentinel value In-Reply-To: <1537544491.72.0.956365154283.issue34764@psf.upfronthosting.co.za> Message-ID: <1545666606.02.0.712150888896.issue34764@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10536 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:04:45 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Dec 2018 16:04:45 +0000 Subject: [issue35566] DOC: Add links to annotation glossary term In-Reply-To: <1545528192.75.0.0770528567349.issue35566@roundup.psfhosted.org> Message-ID: <1545667485.64.0.712150888896.issue35566@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset b7105c9c9663637e4500bfcac75c911e78d9a1c0 by Raymond Hettinger (Cheryl Sabella) in branch 'master': bpo-35566: Add links to annotation glossary term (GH-11291) https://github.com/python/cpython/commit/b7105c9c9663637e4500bfcac75c911e78d9a1c0 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:06:13 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 16:06:13 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545667573.82.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7': bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283) https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:06:37 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 16:06:37 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545667573.82.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7': bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283) https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:06:38 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 16:06:38 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545667598.4.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7': bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283) https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:06:59 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 16:06:59 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545667598.4.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7': bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283) https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:07:01 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 24 Dec 2018 16:07:01 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1545667621.93.0.712150888896.issue11566@roundup.psfhosted.org> INADA Naoki added the comment: New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master': bpo-11566: Extension build errors on Windows for _hypot (GH-11283) https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:07:38 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 16:07:38 +0000 Subject: [issue35566] DOC: Add links to annotation glossary term In-Reply-To: <1545528192.75.0.0770528567349.issue35566@roundup.psfhosted.org> Message-ID: <1545667658.01.0.712150888896.issue35566@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10537 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:11:47 2018 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 24 Dec 2018 16:11:47 +0000 Subject: [issue35572] Logging module cleanup In-Reply-To: <1545620729.24.0.0770528567349.issue35572@roundup.psfhosted.org> Message-ID: <1545667907.45.0.712150888896.issue35572@roundup.psfhosted.org> Vinay Sajip added the comment: I don't believe there is enough value in this to do it. From PEP 8: "Some other good reasons to ignore a particular guideline: ... Because the code in question predates the introduction of the guideline and there is no other reason to be modifying that code. ... " That applies to both snake_casing (no functional improvement) and the basicConfig change (no worthwhile functional improvement; documentation covers, or should cover, the actual keyword arguments; it's not clear in what context improved inspection capabilities would be particularly helpful for basicConfig. It's not as if this is the only usage of **kwargs in the stdlib). The energy that would be spent on doing this would be better spent on other things, IMO. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:12:45 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Dec 2018 16:12:45 +0000 Subject: [issue35566] DOC: Add links to annotation glossary term In-Reply-To: <1545528192.75.0.0770528567349.issue35566@roundup.psfhosted.org> Message-ID: <1545667965.76.0.712150888896.issue35566@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset bc64123335a4b6e2c1e4be532c60e5e1086db59a by Raymond Hettinger (Miss Islington (bot)) in branch '3.7': bpo-35566: Add links to annotation glossary term (GH-11291) (GH-11302) https://github.com/python/cpython/commit/bc64123335a4b6e2c1e4be532c60e5e1086db59a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:13:21 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Dec 2018 16:13:21 +0000 Subject: [issue34764] Improve documentation example for using iter() with sentinel value In-Reply-To: <1537544491.72.0.956365154283.issue34764@psf.upfronthosting.co.za> Message-ID: <1545668001.84.0.712150888896.issue34764@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 00a48d57dfd52a968b357d68f63c51db3a451566 by Raymond Hettinger (Miss Islington (bot)) in branch '3.7': bpo-34764: improve docs example of iter() with sentinel value (GH-11222) (#11301) https://github.com/python/cpython/commit/00a48d57dfd52a968b357d68f63c51db3a451566 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:17:04 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Dec 2018 16:17:04 +0000 Subject: [issue30561] sync-up gammavariate and expovariate code In-Reply-To: <1496520990.41.0.958054362061.issue30561@psf.upfronthosting.co.za> Message-ID: <1545668224.25.0.712150888896.issue30561@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 63d152232e1742660f481c04a811f824b91f6790 by Raymond Hettinger (leodema) in branch 'master': bpo-30561: Sync-up expovariate() and gammavariate code (GH-1934) https://github.com/python/cpython/commit/63d152232e1742660f481c04a811f824b91f6790 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:28:24 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Dec 2018 16:28:24 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1545668904.68.0.712150888896.issue35402@roundup.psfhosted.org> Ned Deily added the comment: New changeset e5fdab2a8053d4c24d8ddb21362e17f0f636a5d0 by Ned Deily in branch '3.6': Revert "bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101)" https://github.com/python/cpython/commit/e5fdab2a8053d4c24d8ddb21362e17f0f636a5d0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:29:52 2018 From: report at bugs.python.org (Harmandeep Singh) Date: Mon, 24 Dec 2018 16:29:52 +0000 Subject: [issue20001] pathlib inheritance diagram too large In-Reply-To: <1387221538.52.0.488414928183.issue20001@psf.upfronthosting.co.za> Message-ID: <1545668992.6.0.712150888896.issue20001@roundup.psfhosted.org> Change by Harmandeep Singh : ---------- keywords: +patch pull_requests: +10538 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:31:09 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Dec 2018 16:31:09 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1545669069.71.0.712150888896.issue35402@roundup.psfhosted.org> Ned Deily added the comment: New changeset e5fdab2a8053d4c24d8ddb21362e17f0f636a5d0 by Ned Deily in branch '3.6': Revert "bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101)" https://github.com/python/cpython/commit/e5fdab2a8053d4c24d8ddb21362e17f0f636a5d0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:31:42 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Dec 2018 16:31:42 +0000 Subject: [issue35472] python 3.7.2 rc1 bumped sphinx requirements a bit too much In-Reply-To: <1544632241.86.0.788709270274.issue35472@psf.upfronthosting.co.za> Message-ID: <1545669102.21.0.712150888896.issue35472@roundup.psfhosted.org> Ned Deily added the comment: New changeset 371ca0bb8f5eaa0dcbd3fa2f878398285488d47f by Ned Deily (Julien Palard) in branch '3.7': bpo-35472: Doc: For Python 3.7 Sphinx 1.6.6 is enough. (GH-11192) https://github.com/python/cpython/commit/371ca0bb8f5eaa0dcbd3fa2f878398285488d47f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:31:53 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Dec 2018 16:31:53 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1545669113.9.0.556460119503.issue31715@roundup.psfhosted.org> Ned Deily added the comment: New changeset 25ee15a15c2d274afeea2dc5a0a0b4fb4bea904b by Ned Deily (Myles Borins) in branch '3.7': [3.7] bpo-31715 Add mimetype for extension .mjs (GH-3908) (GH-10977) https://github.com/python/cpython/commit/25ee15a15c2d274afeea2dc5a0a0b4fb4bea904b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:32:11 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Dec 2018 16:32:11 +0000 Subject: [issue35499] "make profile-opt" overrides CFLAGS_NODIST In-Reply-To: <1544811957.28.0.788709270274.issue35499@psf.upfronthosting.co.za> Message-ID: <1545669131.23.0.489900873334.issue35499@roundup.psfhosted.org> Ned Deily added the comment: New changeset 7e4e4bd2b8245426fe733f3c57238acf41f17900 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-35499: make profile-opt don't override CFLAGS_NODIST (GH-11164) (GH-11179) https://github.com/python/cpython/commit/7e4e4bd2b8245426fe733f3c57238acf41f17900 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:32:17 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Dec 2018 16:32:17 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1545669137.21.0.624756714371.issue35402@roundup.psfhosted.org> Ned Deily added the comment: New changeset 986a9ab09d9564ea884d3dc3f0cedb68b861ddf3 by Ned Deily in branch '3.7': Revert "bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101)" https://github.com/python/cpython/commit/986a9ab09d9564ea884d3dc3f0cedb68b861ddf3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:32:34 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Dec 2018 16:32:34 +0000 Subject: [issue35492] Missing colon on func statement in library/sys doc In-Reply-To: <1544786555.59.0.788709270274.issue35492@psf.upfronthosting.co.za> Message-ID: <1545669154.56.0.731108326251.issue35492@roundup.psfhosted.org> Ned Deily added the comment: New changeset c53e5f6ab988a74d60273d9130f233d1c446a93c by Ned Deily (Miss Islington (bot)) in branch '3.7': Fixed missing colun in library/sys.po (GH-11153) https://github.com/python/cpython/commit/c53e5f6ab988a74d60273d9130f233d1c446a93c ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:32:43 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Dec 2018 16:32:43 +0000 Subject: [issue35482] can't open python368rc1.chm and python372rc1.chm In-Reply-To: <1544711642.5.0.788709270274.issue35482@psf.upfronthosting.co.za> Message-ID: <1545669163.27.0.116572831345.issue35482@roundup.psfhosted.org> Ned Deily added the comment: New changeset 4db9a3fffa232e88fcc2ad3b5ce35e9f8657bbe5 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-35482: Fixes HTML escaping in CHM index and build location of NEWS file (GH-11224) https://github.com/python/cpython/commit/4db9a3fffa232e88fcc2ad3b5ce35e9f8657bbe5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:32:58 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Dec 2018 16:32:58 +0000 Subject: [issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST In-Reply-To: <1542298441.4.0.788709270274.issue35257@psf.upfronthosting.co.za> Message-ID: <1545669178.98.0.993833966219.issue35257@roundup.psfhosted.org> Ned Deily added the comment: New changeset f14087a4a96bb3f500e2d2bbc36c1124e90d5f73 by Ned Deily (Victor Stinner) in branch '3.7': bpo-35257: Avoid leaking LTO linker flags into distutils (GH-10900) (GH-11264) https://github.com/python/cpython/commit/f14087a4a96bb3f500e2d2bbc36c1124e90d5f73 New changeset 92f90242994652d6b7afe0a2c8a61cf2bccc8c32 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-35257: fix broken BLDSHARED - needs LDFLAGS too (GH-11297) https://github.com/python/cpython/commit/92f90242994652d6b7afe0a2c8a61cf2bccc8c32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:33:09 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Dec 2018 16:33:09 +0000 Subject: [issue35259] Py_FinalizeEx unconditionally exists in Py_LIMITED_API In-Reply-To: <1542306291.56.0.788709270274.issue35259@psf.upfronthosting.co.za> Message-ID: <1545669189.82.0.449545136398.issue35259@roundup.psfhosted.org> Ned Deily added the comment: New changeset ffc106c596d87e6e41bf9a3b69a5943317914afd by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-35259: Limit `Py_FinalizeEx()` to `Py_LIMITED_API >= 0x03060000`. (GH-10620) https://github.com/python/cpython/commit/ffc106c596d87e6e41bf9a3b69a5943317914afd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:37:12 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 24 Dec 2018 16:37:12 +0000 Subject: [issue35208] IDLE: Squeezed line count ignores wrapping before newline In-Reply-To: <1541834301.3.0.788709270274.issue35208@psf.upfronthosting.co.za> Message-ID: <1545669432.16.0.712150888896.issue35208@roundup.psfhosted.org> Tal Einat added the comment: New changeset 44a79cc5b3d1fb0c03c99077aa26def85ec26c67 by Tal Einat in branch 'master': bpo-35208: Fix IDLE Squeezer line counting (GH-10449) https://github.com/python/cpython/commit/44a79cc5b3d1fb0c03c99077aa26def85ec26c67 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:37:42 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 16:37:42 +0000 Subject: [issue35208] IDLE: Squeezed line count ignores wrapping before newline In-Reply-To: <1541834301.3.0.788709270274.issue35208@psf.upfronthosting.co.za> Message-ID: <1545669462.39.0.712150888896.issue35208@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10539 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:41:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2018 16:41:27 +0000 Subject: [issue35578] Add test for Argument Clinic converters Message-ID: <1545669685.38.0.712150888896.issue35578@roundup.psfhosted.org> New submission from Serhiy Storchaka : Currently Argument Clinic converters are tested by running Argument Clinic on the CPython source tree. If it generates incorrect code, then it contains bugs. But not all combinations of standard converters and options are used in the stdlib. The programming interface of Argument Clinic is complex, and it is hard to write tests for testing only specific functionality. The simplest way of testing Argument Clinic is to write a C file containing declarations and generated code for all test cases. Although this does not allow to test error cases. The proposed PR adds Lib/test/clinic_test.c which contains tests for all standard converters. It will be extended in bpo-20180 (PR #9828) and bpo-23867. ---------- components: Argument Clinic, Tests messages: 332493 nosy: larry, serhiy.storchaka priority: normal severity: normal status: open title: Add test for Argument Clinic converters type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:42:40 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 24 Dec 2018 16:42:40 +0000 Subject: [issue35208] IDLE: Squeezed line count ignores wrapping before newline In-Reply-To: <1541834301.3.0.788709270274.issue35208@psf.upfronthosting.co.za> Message-ID: <1545669760.23.0.712150888896.issue35208@roundup.psfhosted.org> miss-islington added the comment: New changeset 0e0cc553ab4c234e583b410accc7069eb97e392a by Miss Islington (bot) in branch '3.7': bpo-35208: Fix IDLE Squeezer line counting (GH-10449) https://github.com/python/cpython/commit/0e0cc553ab4c234e583b410accc7069eb97e392a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:43:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2018 16:43:31 +0000 Subject: [issue35578] Add test for Argument Clinic converters In-Reply-To: <1545669685.38.0.712150888896.issue35578@roundup.psfhosted.org> Message-ID: <1545669811.08.0.712150888896.issue35578@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10540 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:43:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2018 16:43:34 +0000 Subject: [issue35578] Add test for Argument Clinic converters In-Reply-To: <1545669685.38.0.712150888896.issue35578@roundup.psfhosted.org> Message-ID: <1545669814.18.0.712150888896.issue35578@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch, patch pull_requests: +10540, 10541 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:43:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2018 16:43:38 +0000 Subject: [issue35578] Add test for Argument Clinic converters In-Reply-To: <1545669685.38.0.712150888896.issue35578@roundup.psfhosted.org> Message-ID: <1545669818.15.0.712150888896.issue35578@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch, patch, patch pull_requests: +10540, 10541, 10542 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:44:02 2018 From: report at bugs.python.org (Antoine Wecxsteen) Date: Mon, 24 Dec 2018 16:44:02 +0000 Subject: [issue35579] Typo in in asyncio-task documentation Message-ID: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> New submission from Antoine Wecxsteen : I believe there is a typo in the library/asyncio-task documentation https://docs.python.org/3.8/library/asyncio-task.html#scheduling-from-other-threads "Unlike other asyncio functions this functions requires the loop argument to be passed explicitly." It should be "this function", without "s". ---------- assignee: docs at python components: Documentation, asyncio messages: 332495 nosy: Antoine Wecxsteen, asvetlov, docs at python, eric.araujo, ezio.melotti, mdk, willingc, yselivanov priority: normal severity: normal status: open title: Typo in in asyncio-task documentation versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 12:53:44 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 24 Dec 2018 17:53:44 +0000 Subject: [issue23864] issubclass without registration only works for "one-trick pony" collections ABCs. In-Reply-To: <1428145067.47.0.0726533343331.issue23864@psf.upfronthosting.co.za> Message-ID: <1545674024.53.0.712150888896.issue23864@roundup.psfhosted.org> Cheryl Sabella added the comment: This isn't meant as a comment from any previous posts. It's simply meant to correct a statement (based on new information in the past 2 years) from the original post. Since this original report, some ABCs that are not "One Trick Ponies" have been added which implement __subclasshook__. `Collection` is one of those, so using the original example: >>> from collections.abc import Sequence, Container, Sized, Collection >>> class MySequence(object): ... def __contains__(self, item): pass ... def __len__(self): pass ... def __iter__(self): pass ... def __getitem__(self, index): pass ... def __len__(self): pass ... def __reversed__(self): pass ... def index(self, item): pass ... def count(self, item): pass ... >>> issubclass(MySequence, Container) True >>> issubclass(MySequence, Sized) True >>> issubclass(MySequence, Sequence) False >>> issubclass(MySequence, Collection) True Collection is not a "One Trick Pony" because it is used for Sized, Iterable Containers. Generator, Coroutine, and ASyncGenerator are also not "One Trick Ponies" (although they are defined under that section in _collections_abc.py). Again, for reference, the definition of One Trick Pony from PEP3119 is: These abstract classes represent single methods like __iter__ or __len__. If only One Trick Ponies implemented __subclasshook__, then the original documentation issue: > These ABCs allow us to ask classes or instances if they provide particular functionality, for example: maybe could have been changed to: > These ABCs allow us to ask classes or instances if they provide singular functionality, for example: But, that's not really correct anymore. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 17:24:31 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 24 Dec 2018 22:24:31 +0000 Subject: [issue34055] IDLE Shell: check syntax before smart indent In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1545690271.64.0.712150888896.issue34055@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +10543 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 17:24:37 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 24 Dec 2018 22:24:37 +0000 Subject: [issue34055] IDLE Shell: check syntax before smart indent In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1545690277.2.0.712150888896.issue34055@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- keywords: +patch, patch pull_requests: +10543, 10544 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 17:24:42 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 24 Dec 2018 22:24:42 +0000 Subject: [issue34055] IDLE Shell: check syntax before smart indent In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1545690282.37.0.712150888896.issue34055@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- keywords: +patch, patch, patch pull_requests: +10543, 10544, 10545 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 17:54:53 2018 From: report at bugs.python.org (Anthony Blomme) Date: Mon, 24 Dec 2018 22:54:53 +0000 Subject: [issue34855] batch file variables In-Reply-To: <1538330156.86.0.545547206417.issue34855@psf.upfronthosting.co.za> Message-ID: <1545692093.59.0.712150888896.issue34855@roundup.psfhosted.org> Change by Anthony Blomme : ---------- keywords: +patch pull_requests: +10546 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 17:55:02 2018 From: report at bugs.python.org (Anthony Blomme) Date: Mon, 24 Dec 2018 22:55:02 +0000 Subject: [issue34855] batch file variables In-Reply-To: <1538330156.86.0.545547206417.issue34855@psf.upfronthosting.co.za> Message-ID: <1545692102.42.0.712150888896.issue34855@roundup.psfhosted.org> Change by Anthony Blomme : ---------- keywords: +patch, patch pull_requests: +10546, 10547 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 18:15:40 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 24 Dec 2018 23:15:40 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545693340.36.0.712150888896.issue35579@roundup.psfhosted.org> Andrew Svetlov added the comment: You are correct. Would you make a patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 18:41:45 2018 From: report at bugs.python.org (Jeff Robbins) Date: Mon, 24 Dec 2018 23:41:45 +0000 Subject: [issue35580] Windows IocpProactor: CreateIoCompletionPort 4th arg 0xffffffff -- why is this value the default? Message-ID: <1545694904.74.0.712150888896.issue35580@roundup.psfhosted.org> New submission from Jeff Robbins : By default, the __init__ function of IocpProactor in windows_events.py calls CreateIoCompletionPort with a 4th argument of 0xffffffff, yet MSDN doesn't document this as a valid argument. https://docs.microsoft.com/en-us/windows/desktop/fileio/createiocompletionport It looks like the 4th arg (NumberOfConcurrentThreads) is meant to be either a positive integer or 0. 0 is a special value meaning "If this parameter is zero, the system allows as many concurrently running threads as there are processors in the system." Why does asyncio use 0xffffffff instead as the default value? ---------- components: asyncio messages: 332498 nosy: asvetlov, jeffr at livedata.com, yselivanov priority: normal severity: normal status: open title: Windows IocpProactor: CreateIoCompletionPort 4th arg 0xffffffff -- why is this value the default? versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 18:59:53 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 24 Dec 2018 23:59:53 +0000 Subject: [issue35580] Windows IocpProactor: CreateIoCompletionPort 4th arg 0xffffffff -- why is this value the default? In-Reply-To: <1545694904.74.0.712150888896.issue35580@roundup.psfhosted.org> Message-ID: <1545695993.99.0.712150888896.issue35580@roundup.psfhosted.org> Andrew Svetlov added the comment: The value type is DWORD. 0xffffffff is a maximum allowed value for DWORD. 0 implies something like 8 for Intel i7. I don't remember the reason (the value was present is very first proactor implementation and never changed after it). Maybe giving Windows a privilegy to decide what number of IO threads is optimal is not a bad idea, I don't know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 19:46:46 2018 From: report at bugs.python.org (Trevor Joynson) Date: Tue, 25 Dec 2018 00:46:46 +0000 Subject: [issue17703] Trashcan mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1365774192.26.0.770170442284.issue17703@psf.upfronthosting.co.za> Message-ID: <1545698806.06.0.712150888896.issue17703@roundup.psfhosted.org> Trevor Joynson added the comment: I can verify this bug does still in fact exist in all 3.x versions I've tested (3.4-3.7). It's been the cause of many long-standing segfaults we've been having at exit in applications that use OpenRAVE and/or boost::python::numeric. ---------- nosy: +ned.deily, trevorj versions: +Python 3.6 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 19:51:35 2018 From: report at bugs.python.org (Trevor Joynson) Date: Tue, 25 Dec 2018 00:51:35 +0000 Subject: [issue17703] Trashcan mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1365774192.26.0.770170442284.issue17703@psf.upfronthosting.co.za> Message-ID: <1545699095.34.0.712150888896.issue17703@roundup.psfhosted.org> Trevor Joynson added the comment: I can also confirm that the included patch does "workaround" the issue. A big pain point here for me is in determining what exit handler is causing this. GDB has been it's usual great help in determining information about the exact segfault, but the problem code itself is rather elusive since it's ran so much earlier and just causes this issue downstream later in execution. Unfortunately the extensions I'm dealing with also happen to take a lifetime to compile, exacerbated by the fact that they are dependent upon one another. Can we please apply this to 3.x's tree? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 20:35:56 2018 From: report at bugs.python.org (Jeff Robbins) Date: Tue, 25 Dec 2018 01:35:56 +0000 Subject: [issue35580] Windows IocpProactor: CreateIoCompletionPort 4th arg 0xffffffff -- why is this value the default? In-Reply-To: <1545694904.74.0.712150888896.issue35580@roundup.psfhosted.org> Message-ID: <1545701756.1.0.712150888896.issue35580@roundup.psfhosted.org> Jeff Robbins added the comment: Per https://stackoverflow.com/questions/38133870/how-the-parameter-numberofconcurrentthreads-is-used-in-createiocompletionport, it seems that `NumberOfConcurrentThreads` controls what happens when multiple threads call `GetQueuedCompletionStatus`. But since a given instance of `IocpProactor` only calls `GetQueuedCompletionStatus` from a single thread, probably this arg doesn't matter, and the value `1` would be more explicit about the pattern asyncio is using? A huge number is, presumably, either not relevant or, at worst, wasteful of some kernel resource. Am I correct that only one thread calls `GetQueuedCompletionStatus` on a given `iocp` object in asyncio under Windows `IocpProactor`? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 22:11:57 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 25 Dec 2018 03:11:57 +0000 Subject: [issue25234] test_eintr.test_os_open hangs under Xcode 7 In-Reply-To: <1443210079.4.0.780575467942.issue25234@psf.upfronthosting.co.za> Message-ID: <1545707517.89.0.712150888896.issue25234@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +10548 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 22:12:08 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 25 Dec 2018 03:12:08 +0000 Subject: [issue25234] test_eintr.test_os_open hangs under Xcode 7 In-Reply-To: <1443210079.4.0.780575467942.issue25234@psf.upfronthosting.co.za> Message-ID: <1545707528.87.0.712150888896.issue25234@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +10548, 10549 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 22:12:08 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 25 Dec 2018 03:12:08 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1545707528.89.0.489900873334.issue35363@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +10550 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 22:12:16 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 25 Dec 2018 03:12:16 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1545707536.39.0.731108326251.issue33725@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +10551 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 22:12:34 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 25 Dec 2018 03:12:34 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1545707554.06.0.489900873334.issue33725@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +10551, 10552 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 23:05:00 2018 From: report at bugs.python.org (Harmandeep Singh) Date: Tue, 25 Dec 2018 04:05:00 +0000 Subject: [issue35525] Incorrect keyword name in NNTP.starttls() documentation In-Reply-To: <1545146886.62.0.788709270274.issue35525@psf.upfronthosting.co.za> Message-ID: <1545710700.5.0.712150888896.issue35525@roundup.psfhosted.org> Change by Harmandeep Singh : ---------- keywords: +patch pull_requests: +10553 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 23:05:05 2018 From: report at bugs.python.org (Harmandeep Singh) Date: Tue, 25 Dec 2018 04:05:05 +0000 Subject: [issue35525] Incorrect keyword name in NNTP.starttls() documentation In-Reply-To: <1545146886.62.0.788709270274.issue35525@psf.upfronthosting.co.za> Message-ID: <1545710705.52.0.712150888896.issue35525@roundup.psfhosted.org> Change by Harmandeep Singh : ---------- keywords: +patch, patch pull_requests: +10553, 10554 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 23:05:09 2018 From: report at bugs.python.org (Harmandeep Singh) Date: Tue, 25 Dec 2018 04:05:09 +0000 Subject: [issue35525] Incorrect keyword name in NNTP.starttls() documentation In-Reply-To: <1545146886.62.0.788709270274.issue35525@psf.upfronthosting.co.za> Message-ID: <1545710709.66.0.712150888896.issue35525@roundup.psfhosted.org> Change by Harmandeep Singh : ---------- keywords: +patch, patch, patch pull_requests: +10553, 10554, 10555 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 23:36:42 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 25 Dec 2018 04:36:42 +0000 Subject: [issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s) In-Reply-To: <1545492162.72.0.0770528567349.issue35561@roundup.psfhosted.org> Message-ID: <1545712602.09.0.712150888896.issue35561@roundup.psfhosted.org> Benjamin Peterson added the comment: I suspect Valgrind is being too conservative. union epoll_data is 64 bits wide but the file descriptor only occupies the first 32 bits. The last 32 bits don't need to be initialized by the application. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 01:00:42 2018 From: report at bugs.python.org (shuoz) Date: Tue, 25 Dec 2018 06:00:42 +0000 Subject: [issue33661] urllib may leak sensitive HTTP headers to a third-party web site1111 In-Reply-To: <1527430806.55.0.682650639539.issue33661@psf.upfronthosting.co.za> Message-ID: <1545717642.21.0.712150888896.issue33661@roundup.psfhosted.org> Change by shuoz : ---------- title: urllib may leak sensitive HTTP headers to a third-party web site -> urllib may leak sensitive HTTP headers to a third-party web site1111 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 03:17:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Dec 2018 08:17:32 +0000 Subject: [issue35578] Add test for Argument Clinic converters In-Reply-To: <1545669685.38.0.712150888896.issue35578@roundup.psfhosted.org> Message-ID: <1545725852.9.0.712150888896.issue35578@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 837c7dc1ede18748e1a7a8e77ed117c03a086a94 by Serhiy Storchaka in branch 'master': bpo-35578: Add an example file for testing Argument Clinic converters. (GH-11306) https://github.com/python/cpython/commit/837c7dc1ede18748e1a7a8e77ed117c03a086a94 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 03:27:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Dec 2018 08:27:35 +0000 Subject: [issue35578] Add test for Argument Clinic converters In-Reply-To: <1545669685.38.0.712150888896.issue35578@roundup.psfhosted.org> Message-ID: <1545726455.42.0.712150888896.issue35578@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +10556 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 03:27:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Dec 2018 08:27:39 +0000 Subject: [issue35578] Add test for Argument Clinic converters In-Reply-To: <1545669685.38.0.712150888896.issue35578@roundup.psfhosted.org> Message-ID: <1545726459.58.0.712150888896.issue35578@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +10556, 10557 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 03:27:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Dec 2018 08:27:43 +0000 Subject: [issue35578] Add test for Argument Clinic converters In-Reply-To: <1545669685.38.0.712150888896.issue35578@roundup.psfhosted.org> Message-ID: <1545726463.61.0.712150888896.issue35578@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +10556, 10557, 10558 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 04:10:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Dec 2018 09:10:09 +0000 Subject: [issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files In-Reply-To: <1389140162.94.0.578256004005.issue20180@psf.upfronthosting.co.za> Message-ID: <1545729009.13.0.712150888896.issue20180@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 65ce60aef150776f884715b4315a10a0d6ae769e by Serhiy Storchaka in branch 'master': bpo-20180: Simplify char_converter in Argument Clinic. (GH-9828) https://github.com/python/cpython/commit/65ce60aef150776f884715b4315a10a0d6ae769e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 04:20:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Dec 2018 09:20:12 +0000 Subject: [issue35578] Add test for Argument Clinic converters In-Reply-To: <1545669685.38.0.712150888896.issue35578@roundup.psfhosted.org> Message-ID: <1545729612.54.0.712150888896.issue35578@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 74d914ecd595536531ded9ba5203e653f0d80e1e by Serhiy Storchaka in branch '3.7': [3.7] bpo-35578: Add an example file for testing Argument Clinic converters. (GH-11306) (GH-11311) https://github.com/python/cpython/commit/74d914ecd595536531ded9ba5203e653f0d80e1e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 06:23:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Dec 2018 11:23:51 +0000 Subject: [issue23867] Argument Clinic: inline parsing code for 1-argument functions In-Reply-To: <1428157476.28.0.0922120616231.issue23867@psf.upfronthosting.co.za> Message-ID: <1545737031.07.0.712150888896.issue23867@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 32d96a2b5bc3136d45a66adbdb45fac351b520ce by Serhiy Storchaka in branch 'master': bpo-23867: Argument Clinic: inline parsing code for a single positional parameter. (GH-9689) https://github.com/python/cpython/commit/32d96a2b5bc3136d45a66adbdb45fac351b520ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 07:52:39 2018 From: report at bugs.python.org (Sebastian Rittau) Date: Tue, 25 Dec 2018 12:52:39 +0000 Subject: [issue35581] Document @typing.type_check_only Message-ID: <1545742357.2.0.712150888896.issue35581@roundup.psfhosted.org> New submission from Sebastian Rittau : Document @typing.type_check_only per https://github.com/python/typing/issues/597. ---------- assignee: docs at python components: Documentation messages: 332508 nosy: docs at python, srittau priority: normal severity: normal status: open title: Document @typing.type_check_only versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 07:56:43 2018 From: report at bugs.python.org (Sebastian Rittau) Date: Tue, 25 Dec 2018 12:56:43 +0000 Subject: [issue35581] Document @typing.type_check_only In-Reply-To: <1545742357.2.0.712150888896.issue35581@roundup.psfhosted.org> Message-ID: <1545742603.4.0.712150888896.issue35581@roundup.psfhosted.org> Change by Sebastian Rittau : ---------- keywords: +patch pull_requests: +10559 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 07:56:51 2018 From: report at bugs.python.org (Sebastian Rittau) Date: Tue, 25 Dec 2018 12:56:51 +0000 Subject: [issue35581] Document @typing.type_check_only In-Reply-To: <1545742357.2.0.712150888896.issue35581@roundup.psfhosted.org> Message-ID: <1545742611.56.0.712150888896.issue35581@roundup.psfhosted.org> Change by Sebastian Rittau : ---------- keywords: +patch, patch, patch pull_requests: +10559, 10560, 10561 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 07:56:47 2018 From: report at bugs.python.org (Sebastian Rittau) Date: Tue, 25 Dec 2018 12:56:47 +0000 Subject: [issue35581] Document @typing.type_check_only In-Reply-To: <1545742357.2.0.712150888896.issue35581@roundup.psfhosted.org> Message-ID: <1545742607.42.0.712150888896.issue35581@roundup.psfhosted.org> Change by Sebastian Rittau : ---------- keywords: +patch, patch pull_requests: +10559, 10560 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 07:59:39 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 25 Dec 2018 12:59:39 +0000 Subject: [issue35581] Document @typing.type_check_only In-Reply-To: <1545742357.2.0.712150888896.issue35581@roundup.psfhosted.org> Message-ID: <1545742779.65.0.712150888896.issue35581@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +gvanrossum, levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 08:16:49 2018 From: report at bugs.python.org (Daniel Fetchinson) Date: Tue, 25 Dec 2018 13:16:49 +0000 Subject: =?utf-8?q?=5Bissue34823=5D_libffi_detection_doesn=E2=80=99t_work_in_my_se?= =?utf-8?q?tup?= In-Reply-To: <1538067503.8.0.545547206417.issue34823@psf.upfronthosting.co.za> Message-ID: <1545743809.78.0.712150888896.issue34823@roundup.psfhosted.org> Daniel Fetchinson added the comment: It seems there is a way to fix this: https://mail.python.org/pipermail/python-list/2018-December/738568.html LDFLAGS=`pkg-config --libs-only-L libffi` ./configure Would be nice to document this or make the build system find the libraries and headers in a simpler way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 09:40:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Dec 2018 14:40:54 +0000 Subject: [issue35582] Argument Clinic: inline parsing code for functions with only positional parameters Message-ID: <1545748852.85.0.712150888896.issue35582@roundup.psfhosted.org> New submission from Serhiy Storchaka : This is a continuation of issue23867. The proposed PR makes Argument Clinic inlining parsing code for functions with only positional parameters, i.e. functions that use PyArg_ParseTuple() and _PyArg_ParseStack() now. This saves time for parsing format strings and calling few levels of functions. It can save also a C stack, because of lesser number of nested (and potentially recursive) calls, lesser number of variables, and getting rid of a stack allocated array for "objects" which will need to be deallocated or cleaned up if overall parsing fails. PyArg_ParseTuple() and _PyArg_ParseStack() will still be used if there are parameters for which inlining converter is not supported. Unsupported converters are deprecated Py_UNICODE API ("u", "Z"), encoded strings ("es", "et"), obsolete string/bytes converters ("y", "s#", "z#"), some custom converters (DWORD, HANDLE, pid_t, intptr_t). ---------- components: Argument Clinic messages: 332510 nosy: larry, serhiy.storchaka priority: normal severity: normal status: open title: Argument Clinic: inline parsing code for functions with only positional parameters type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 09:44:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Dec 2018 14:44:02 +0000 Subject: [issue35582] Argument Clinic: inline parsing code for functions with only positional parameters In-Reply-To: <1545748852.85.0.712150888896.issue35582@roundup.psfhosted.org> Message-ID: <1545749042.68.0.712150888896.issue35582@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10562 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 09:44:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Dec 2018 14:44:07 +0000 Subject: [issue35582] Argument Clinic: inline parsing code for functions with only positional parameters In-Reply-To: <1545748852.85.0.712150888896.issue35582@roundup.psfhosted.org> Message-ID: <1545749047.6.0.712150888896.issue35582@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch, patch pull_requests: +10562, 10563 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 09:44:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Dec 2018 14:44:11 +0000 Subject: [issue35582] Argument Clinic: inline parsing code for functions with only positional parameters In-Reply-To: <1545748852.85.0.712150888896.issue35582@roundup.psfhosted.org> Message-ID: <1545749051.57.0.712150888896.issue35582@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch, patch, patch pull_requests: +10562, 10563, 10564 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 09:57:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Dec 2018 14:57:41 +0000 Subject: [issue23867] Argument Clinic: inline parsing code for 1-argument functions In-Reply-To: <1428157476.28.0.0922120616231.issue23867@psf.upfronthosting.co.za> Message-ID: <1545749861.65.0.712150888896.issue23867@roundup.psfhosted.org> Serhiy Storchaka added the comment: See issue35582 for next step. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 11:06:52 2018 From: report at bugs.python.org (Vaibhav Gupta) Date: Tue, 25 Dec 2018 16:06:52 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545754012.48.0.712150888896.issue35579@roundup.psfhosted.org> Vaibhav Gupta added the comment: I am totally new to the community here and would like to start with a easy issue. Can i make a PR for this? ---------- nosy: +Vaibhav Gupta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 13:30:53 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 25 Dec 2018 18:30:53 +0000 Subject: [issue32070] Clarify the behavior of the staticmethod builtin In-Reply-To: <1511028255.0.0.213398074469.issue32070@psf.upfronthosting.co.za> Message-ID: <1545762653.66.0.712150888896.issue32070@roundup.psfhosted.org> Andr?s Delfino added the comment: Also see #34085 that deals with the same issue in functions.rst. ---------- nosy: +adelfino _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 14:39:05 2018 From: report at bugs.python.org (Gagan) Date: Tue, 25 Dec 2018 19:39:05 +0000 Subject: [issue35583] python 3.7.x interpreter segmentation fault (3.6.x/2.7.x compile fine) Message-ID: <1545766743.84.0.712150888896.issue35583@roundup.psfhosted.org> New submission from Gagan : Hello everyone. I am currently trying to compile Python 3.7.x on a MIPS(el, little endian; 32 bit) platform, and I am having issues producing a functioning interpreter to continue the compilation. I have no issue compiling either 2.7.x or 3.6.x versions on this machine, and I am using 3.6.7. here is the dump from the installation: -------- root at DD-WRT:/mnt/work/Python-3.7.2# make platform LD_LIBRARY_PATH=/mnt/work/Python-3.7.2:/lib:/usr/lib:/usr/local/lib:/jffs/lib:/jffs/usr/lib:/jffs/usr/local/lib:/mmc/lib:/mmc/usr/lib:/opt/lib:/opt/usr/lib ./python -E -S -m sysconfig --generate-posix-vars ;\ if test $? -ne 0 ; then \ echo "generate-posix-vars failed" ; \ rm -f ./pybuilddir.txt ; \ exit 1 ; \ fi /bin/sh: line 5: 399 Segmentation fault LD_LIBRARY_PATH=/mnt/work/Python-3.7.2:/lib:/usr/lib:/usr/local/lib:/jffs/lib:/jffs/usr/lib:/jffs/usr/local/lib:/mmc/lib:/mmc/usr/lib:/opt/lib:/opt/usr/lib ./python -E -S -m sysconfig --generate-posix-vars generate-posix-vars failed make: *** [Makefile:604: pybuilddir.txt] Error 1 ----------- and here is the valgrind output.: ----- root at DD-WRT:/mnt/work/Python-3.7.2# valgrind ./python -E -S -m sysconfig --generate-posix-vars ==1246== Memcheck, a memory error detector ==1246== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==1246== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==1246== Command: ./python -E -S -m sysconfig --generate-posix-vars ==1246== ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x401FAF4: ??? (in /lib/ld-2.28.so) ==1246== by 0x400942C: ??? (in /lib/ld-2.28.so) ==1246== ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x4020104: ??? (in /lib/ld-2.28.so) ==1246== by 0x4020024: ??? (in /lib/ld-2.28.so) ==1246== ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x4007E94: ??? (in /lib/ld-2.28.so) ==1246== by 0x4007DC4: ??? (in /lib/ld-2.28.so) ==1246== ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x4020104: ??? (in /lib/ld-2.28.so) ==1246== by 0x400D950: ??? (in /lib/ld-2.28.so) ==1246== Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x4858AEC: wcslen (vg_replace_strmem.c:1856) ==1246== by 0x4A51CEC: _PyMem_RawWcsdup (obmalloc.c:569) ==1246== by 0x4D15A8C: pymain_wstrdup (main.c:501) ==1246== by 0x4D15A8C: pymain_init_cmdline_argv (main.c:561) ==1246== by 0x4D15A8C: pymain_read_conf (main.c:2024) ==1246== by 0x4D15A8C: pymain_cmdline_impl (main.c:2642) ==1246== by 0x4D15A8C: pymain_cmdline (main.c:2707) ==1246== by 0x4D15A8C: pymain_init (main.c:2748) ==1246== by 0x4D18BA0: pymain_main (main.c:2782) ==1246== by 0x4D1AE04: _Py_UnixMain (main.c:2822) ==1246== by 0x400D88: main (in /tmp/mnt/work/Python-3.7.2/python) ==1246== ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x4858AEC: wcslen (vg_replace_strmem.c:1856) ==1246== by 0x4A51CEC: _PyMem_RawWcsdup (obmalloc.c:569) ==1246== by 0x4D0D688: copy_wstrlist (main.c:1237) ==1246== by 0x4D171E0: pymain_init_core_argv (main.c:1263) ==1246== by 0x4D171E0: pymain_read_conf_impl (main.c:1955) ==1246== by 0x4D171E0: pymain_read_conf (main.c:2028) ==1246== by 0x4D171E0: pymain_cmdline_impl (main.c:2642) ==1246== by 0x4D171E0: pymain_cmdline (main.c:2707) ==1246== by 0x4D171E0: pymain_init (main.c:2748) ==1246== by 0x4D18BA0: pymain_main (main.c:2782) ==1246== by 0x4D1AE04: _Py_UnixMain (main.c:2822) ==1246== by 0x400D88: main (in /tmp/mnt/work/Python-3.7.2/python) ==1246== ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x4858AEC: wcslen (vg_replace_strmem.c:1856) ==1246== by 0x4A51CEC: _PyMem_RawWcsdup (obmalloc.c:569) ==1246== by 0x4D0D688: copy_wstrlist (main.c:1237) ==1246== by 0x4D17B78: pymain_cmdline_impl (main.c:2663) ==1246== by 0x4D17B78: pymain_cmdline (main.c:2707) ==1246== by 0x4D17B78: pymain_init (main.c:2748) ==1246== by 0x4D18BA0: pymain_main (main.c:2782) ==1246== by 0x4D1AE04: _Py_UnixMain (main.c:2822) ==1246== by 0x400D88: main (in /tmp/mnt/work/Python-3.7.2/python) ==1246== ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x4858AEC: wcslen (vg_replace_strmem.c:1856) ==1246== by 0x4A51CEC: _PyMem_RawWcsdup (obmalloc.c:569) ==1246== by 0x4D11C3C: _PyCoreConfig_Copy (main.c:2415) ==1246== by 0x4C9D630: _Py_InitializeCore (pylifecycle.c:847) ==1246== by 0x4D150D4: pymain_init (main.c:2760) ==1246== by 0x4D18BA0: pymain_main (main.c:2782) ==1246== by 0x4D1AE04: _Py_UnixMain (main.c:2822) ==1246== by 0x400D88: main (in /tmp/mnt/work/Python-3.7.2/python) ==1246== ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x4858AEC: wcslen (vg_replace_strmem.c:1856) ==1246== by 0x4A51CEC: _PyMem_RawWcsdup (obmalloc.c:569) ==1246== by 0x4D0D688: copy_wstrlist (main.c:1237) ==1246== by 0x4D11C9C: _PyCoreConfig_Copy (main.c:2417) ==1246== by 0x4C9D630: _Py_InitializeCore (pylifecycle.c:847) ==1246== by 0x4D150D4: pymain_init (main.c:2760) ==1246== by 0x4D18BA0: pymain_main (main.c:2782) ==1246== by 0x4D1AE04: _Py_UnixMain (main.c:2822) ==1246== by 0x400D88: main (in /tmp/mnt/work/Python-3.7.2/python) ==1246== ==1246== Conditional jump or move depends on uninitialised value(s) ==1246== at 0x4858AEC: wcslen (vg_replace_strmem.c:1856) ==1246== by 0x4A51CEC: _PyMem_RawWcsdup (obmalloc.c:569) ==1246== by 0x4D11C3C: _PyCoreConfig_Copy (main.c:2415) ==1246== by 0x4C9C910: _Py_InitializeCore_impl (pylifecycle.c:711) ==1246== by 0x4C9D820: _Py_InitializeCore (pylifecycle.c:859) ==1246== by 0x4D150D4: pymain_init (main.c:2760) ==1246== by 0x4D18BA0: pymain_main (main.c:2782) ==1246== by 0x4D1AE04: _Py_UnixMain (main.c:2822) ==1246== by 0x400D88: main (in /tmp/mnt/work/Python-3.7.2/python) ==1246== ==1246== Invalid read of size 4 ==1246== at 0x4A4A864: address_in_range (obmalloc.c:1338) ==1246== by 0x4A4A864: pymalloc_free.isra.0 (obmalloc.c:1610) ==1246== by 0x4A4BBF8: _PyObject_Free (obmalloc.c:1815) ==1246== by 0x4A4B160: PyObject_Free (obmalloc.c:640) ==1246== by 0x4A08E04: dictresize (dictobject.c:1196) ==1246== by 0x4A0C66C: insertion_resize (dictobject.c:994) ==1246== by 0x4A0C66C: insertdict (dictobject.c:1038) ==1246== by 0x4A0D084: PyDict_SetItem (dictobject.c:1463) ==1246== by 0x4A946A0: add_operators (typeobject.c:7428) ==1246== by 0x4A946A0: PyType_Ready (typeobject.c:5188) ==1246== by 0x4A3D954: _Py_ReadyTypes (object.c:1713) ==1246== by 0x4C9CA20: _Py_InitializeCore_impl (pylifecycle.c:733) ==1246== by 0x4C9D820: _Py_InitializeCore (pylifecycle.c:859) ==1246== by 0x4D150D4: pymain_init (main.c:2760) ==1246== by 0x4D18BA0: pymain_main (main.c:2782) ==1246== Address 0x58f3010 is 8 bytes before a block of size 1,168 alloc'd ==1246== at 0x484C740: malloc (vg_replace_malloc.c:299) ==1246== by 0x4A4BFA8: PyMem_RawMalloc (obmalloc.c:503) ==1246== by 0x4A4FF80: _PyObject_Malloc (obmalloc.c:1560) ==1246== by 0x4A4B484: PyObject_Malloc (obmalloc.c:616) ==1246== by 0x4A07B34: new_keys_object (dictobject.c:534) ==1246== by 0x4A085C8: dictresize (dictobject.c:1141) ==1246== by 0x4A0C66C: insertion_resize (dictobject.c:994) ==1246== by 0x4A0C66C: insertdict (dictobject.c:1038) ==1246== by 0x4A0D084: PyDict_SetItem (dictobject.c:1463) ==1246== by 0x4A946A0: add_operators (typeobject.c:7428) ==1246== by 0x4A946A0: PyType_Ready (typeobject.c:5188) ==1246== by 0x4A3D920: _Py_ReadyTypes (object.c:1710) ==1246== by 0x4C9CA20: _Py_InitializeCore_impl (pylifecycle.c:733) ==1246== by 0x4C9D820: _Py_InitializeCore (pylifecycle.c:859) ==1246== ==1246== Invalid read of size 4 ==1246== at 0x4C51A9C: PyErr_SetObject (errors.c:89) ==1246== by 0x4C52394: PyErr_FormatV (errors.c:837) ==1246== by 0x4C525B0: PyErr_Format (errors.c:852) ==1246== by 0x4AB6E8C: find_maxchar_surrogates (unicodeobject.c:1637) ==1246== by 0x4AE3D74: PyUnicode_FromWideChar (unicodeobject.c:2045) ==1246== by 0x4AE5CD0: unicode_decode_locale (unicodeobject.c:3610) ==1246== by 0x4B1C3BC: PyUnicode_DecodeFSDefaultAndSize (unicodeobject.c:3658) ==1246== by 0x4CED434: PyThread_GetInfo (thread.c:216) ==1246== by 0x4CE1C04: _PySys_BeginInit (sysmodule.c:2414) ==1246== by 0x4C9CCE8: _Py_InitializeCore_impl (pylifecycle.c:753) ==1246== by 0x4C9D820: _Py_InitializeCore (pylifecycle.c:859) ==1246== by 0x4D150D4: pymain_init (main.c:2760) ==1246== Address 0x54 is not stack'd, malloc'd or (recently) free'd ==1246== ==1246== ==1246== Process terminating with default action of signal 11 (SIGSEGV) ==1246== Access not within mapped region at address 0x54 ==1246== at 0x4C51A9C: PyErr_SetObject (errors.c:89) ==1246== by 0x4C52394: PyErr_FormatV (errors.c:837) ==1246== by 0x4C525B0: PyErr_Format (errors.c:852) ==1246== by 0x4AB6E8C: find_maxchar_surrogates (unicodeobject.c:1637) ==1246== by 0x4AE3D74: PyUnicode_FromWideChar (unicodeobject.c:2045) ==1246== by 0x4AE5CD0: unicode_decode_locale (unicodeobject.c:3610) ==1246== by 0x4B1C3BC: PyUnicode_DecodeFSDefaultAndSize (unicodeobject.c:3658) ==1246== by 0x4CED434: PyThread_GetInfo (thread.c:216) ==1246== by 0x4CE1C04: _PySys_BeginInit (sysmodule.c:2414) ==1246== by 0x4C9CCE8: _Py_InitializeCore_impl (pylifecycle.c:753) ==1246== by 0x4C9D820: _Py_InitializeCore (pylifecycle.c:859) ==1246== by 0x4D150D4: pymain_init (main.c:2760) ==1246== If you believe this happened as a result of a stack ==1246== overflow in your program's main thread (unlikely but ==1246== possible), you can try to increase the size of the ==1246== main thread stack using the --main-stacksize= flag. ==1246== The main thread stack size used in this run was 8388608. ==1246== ==1246== HEAP SUMMARY: ==1246== in use at exit: 40,028 bytes in 100 blocks ==1246== total heap usage: 197 allocs, 97 frees, 60,589 bytes allocated ==1246== ==1246== LEAK SUMMARY: ==1246== definitely lost: 0 bytes in 0 blocks ==1246== indirectly lost: 0 bytes in 0 blocks ==1246== possibly lost: 0 bytes in 0 blocks ==1246== still reachable: 40,028 bytes in 100 blocks ==1246== suppressed: 0 bytes in 0 blocks ==1246== Rerun with --leak-check=full to see details of leaked memory ==1246== ==1246== For counts of detected and suppressed errors, rerun with: -v ==1246== Use --track-origins=yes to see where uninitialised values come from ==1246== ERROR SUMMARY: 45 errors from 12 contexts (suppressed: 0 from 0) Segmentation fault ------ it seems to me there is an issue with the new Modules/getpath.c Objects/pathconfig.c Modules/main.c compared to the 3.6.x versions? Any help would be appreciated! thank you ---------- components: Interpreter Core messages: 332514 nosy: broly priority: normal severity: normal status: open title: python 3.7.x interpreter segmentation fault (3.6.x/2.7.x compile fine) type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 14:40:24 2018 From: report at bugs.python.org (Gagan) Date: Tue, 25 Dec 2018 19:40:24 +0000 Subject: [issue35583] (glibc2.28/MIPS32EL) python 3.7.x interpreter segmentation fault (3.6.x/2.7.x compile fine) In-Reply-To: <1545766743.84.0.712150888896.issue35583@roundup.psfhosted.org> Message-ID: <1545766824.66.0.712150888896.issue35583@roundup.psfhosted.org> Change by Gagan : ---------- title: python 3.7.x interpreter segmentation fault (3.6.x/2.7.x compile fine) -> (glibc2.28/MIPS32EL) python 3.7.x interpreter segmentation fault (3.6.x/2.7.x compile fine) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 15:20:41 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 25 Dec 2018 20:20:41 +0000 Subject: [issue35485] Mac: tkinter windows turn black while resized In-Reply-To: <1544732559.26.0.788709270274.issue35485@psf.upfronthosting.co.za> Message-ID: <1545769241.2.0.712150888896.issue35485@roundup.psfhosted.org> Terry J. Reedy added the comment: https://stackoverflow.com/questions/53923262/pyenv-installed-version-opening-idle-in-black-screen reports that with 3.6.7 in a venv running on Mac Mohave (with 3.7.2 installed), IDLE opens with a black screen. Is there another report like this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 15:44:47 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 25 Dec 2018 20:44:47 +0000 Subject: [issue35485] Mac: tkinter windows turn black while resized In-Reply-To: <1544732559.26.0.788709270274.issue35485@psf.upfronthosting.co.za> Message-ID: <1545770687.55.0.712150888896.issue35485@roundup.psfhosted.org> Ned Deily added the comment: It depends what version of Tcl/Tk is used and on what version of macOS the Tk is built on. I believe there were problems with versions of Tk bout on 10.14 Mojave that have been fixed perhaps in the latest version of Tk. Kevin May know more. It?s not a problem for the python.org macOS installers because we don?t build any on 10.14 even though they install and run on 10.14. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 16:25:16 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 25 Dec 2018 21:25:16 +0000 Subject: [issue34055] IDLE Shell: check syntax before smart indent In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1545773116.12.0.712150888896.issue34055@roundup.psfhosted.org> Cheryl Sabella added the comment: This code in editor.py controls the text that is parsed for smart indenting: if not self.context_use_ps1: for context in self.num_context_lines: startat = max(lno - context, 1) startatindex = repr(startat) + ".0" rawtext = text.get(startatindex, "insert") y.set_code(rawtext) bod = y.find_good_parse_start( self.context_use_ps1, self._build_char_in_string_func(startatindex)) if bod is not None or startat == 1: break y.set_lo(bod or 0) else: r = text.tag_prevrange("console", "insert") if r: startatindex = r[1] else: startatindex = "1.0" rawtext = text.get(startatindex, "insert") y.set_code(rawtext) y.set_lo(0) The `if not self.context_use_ps1` basically says whether the window is an editor or shell. At a high level, the editor code goes back a certain number of lines from the current cursor and the shell window goes back to just the current statement. #31858 improved the use of sys.ps1 (the prompt) and it removed setting `self.context_use_ps1` in pyshell. This meant that the `else` above was never accessed and that the shell was parsing all the text, not just the current statement. #31858 introduced `self.prompt_last_line` that is set to '' in the editor and set to the prompt in the shell. Replacing `self.context_use_ps1` with `self.prompt_last_line` allows the `else` above to be called. #32989 addresses a bug discovered with adding tests to `pyparse` where the `find_good_parse_start` call above was actually sending incorrect parameters, so removing `context_use_ps1` from that line is not an issue, but rather another bug fix. It might be preferable to merge #32989 first, therefore I'm listing that as a dependency. ---------- dependencies: +IDLE: Fix pyparse.find_good_parse_start and its bad editor call nosy: +cheryl.sabella stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 16:36:28 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2018 21:36:28 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545773788.33.0.712150888896.issue35579@roundup.psfhosted.org> Andrew Svetlov added the comment: Sure! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 16:37:47 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 25 Dec 2018 21:37:47 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545773867.48.0.712150888896.issue35579@roundup.psfhosted.org> Julien Palard added the comment: Looks like you can (no one objected to it). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:10:49 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 25 Dec 2018 22:10:49 +0000 Subject: [issue35584] Wrong statement about ^ in howto/regex.rst Message-ID: <1545775848.12.0.712150888896.issue35584@roundup.psfhosted.org> New submission from Julien Palard : In howto/regex.rst I read: > '^' outside a character class will simply match the '^' character. Which looks wrong, '^' is the "begin anchor", it's a metacharacter that typically won't match '^'. I propose to simply remove the statement, if nobody finds a better idea. ---------- assignee: docs at python components: Documentation messages: 332520 nosy: Vaibhav Gupta, docs at python, mdk priority: normal severity: normal status: open title: Wrong statement about ^ in howto/regex.rst 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 Tue Dec 25 18:00:42 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 25 Dec 2018 23:00:42 +0000 Subject: [issue35584] Wrong statement about ^ in howto/regex.rst In-Reply-To: <1545775848.12.0.712150888896.issue35584@roundup.psfhosted.org> Message-ID: <1545778842.3.0.712150888896.issue35584@roundup.psfhosted.org> Raymond Hettinger added the comment: The caret has several meanings: * Generally, it is a beginning of string: r'^bol' * When MULTILINE is on, it is a beginning of line: r'^bos' * Escaped with a backslash, it is just a caret: r'a\^b' * Immediately after a left bracket, it inverts a character set: r'[^aeiou]' * Elsewhere in brackets, it is just a caret: r'[ab^d]' ---------- nosy: +rhettinger versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 18:19:15 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 25 Dec 2018 23:19:15 +0000 Subject: [issue35565] Add detail to an assertion failure message in wsgiref In-Reply-To: <1545527961.69.0.0770528567349.issue35565@roundup.psfhosted.org> Message-ID: <1545779955.02.0.712150888896.issue35565@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 5ef4fc241aea6759ef3f55b1ef564aebc492a0db by Raymond Hettinger (Cheryl Sabella) in branch 'master': bpo-35565: Add detail to assertion failure message in wsgiref (GH-11293) https://github.com/python/cpython/commit/5ef4fc241aea6759ef3f55b1ef564aebc492a0db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 18:19:52 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 25 Dec 2018 23:19:52 +0000 Subject: [issue35565] Add detail to an assertion failure message in wsgiref In-Reply-To: <1545527961.69.0.0770528567349.issue35565@roundup.psfhosted.org> Message-ID: <1545779992.68.0.712150888896.issue35565@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +10565 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 18:19:55 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 25 Dec 2018 23:19:55 +0000 Subject: [issue35565] Add detail to an assertion failure message in wsgiref In-Reply-To: <1545527961.69.0.0770528567349.issue35565@roundup.psfhosted.org> Message-ID: <1545779995.99.0.712150888896.issue35565@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +10565, 10566 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 18:19:59 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 25 Dec 2018 23:19:59 +0000 Subject: [issue35565] Add detail to an assertion failure message in wsgiref In-Reply-To: <1545527961.69.0.0770528567349.issue35565@roundup.psfhosted.org> Message-ID: <1545779999.24.0.712150888896.issue35565@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +10565, 10566, 10567 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 18:59:09 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 25 Dec 2018 23:59:09 +0000 Subject: [issue35565] Add detail to an assertion failure message in wsgiref In-Reply-To: <1545527961.69.0.0770528567349.issue35565@roundup.psfhosted.org> Message-ID: <1545782349.96.0.712150888896.issue35565@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset b6af23ebf9d6667fa222e804f045735289b4527f by Raymond Hettinger in branch 'master': Revert "bpo-35565: Add detail to assertion failure message in wsgiref" (GH-11317) https://github.com/python/cpython/commit/b6af23ebf9d6667fa222e804f045735289b4527f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 19:01:16 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 26 Dec 2018 00:01:16 +0000 Subject: [issue35565] Add detail to an assertion failure message in wsgiref In-Reply-To: <1545527961.69.0.0770528567349.issue35565@roundup.psfhosted.org> Message-ID: <1545782476.36.0.712150888896.issue35565@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 19:26:26 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 26 Dec 2018 00:26:26 +0000 Subject: [issue35585] Speedup Enum lookup Message-ID: <1545783984.81.0.712150888896.issue35585@roundup.psfhosted.org> New submission from Andrew Svetlov : Construction enums by-value (e.g. http.HTTPStatus(200)) performs two dict lookups: if value in cls._value2member_map_: return cls._value2member_map_[value] Changing the code to just return cls._value2member_map_[value] with catching KeyError can speedup the fast path a little. ---------- components: Library (Lib) messages: 332524 nosy: asvetlov priority: normal severity: normal status: open title: Speedup Enum lookup versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 19:29:55 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 26 Dec 2018 00:29:55 +0000 Subject: [issue35585] Speedup Enum lookup In-Reply-To: <1545783984.81.0.712150888896.issue35585@roundup.psfhosted.org> Message-ID: <1545784195.3.0.712150888896.issue35585@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +10568 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 19:29:57 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 26 Dec 2018 00:29:57 +0000 Subject: [issue35585] Speedup Enum lookup In-Reply-To: <1545783984.81.0.712150888896.issue35585@roundup.psfhosted.org> Message-ID: <1545784197.59.0.712150888896.issue35585@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch, patch pull_requests: +10568, 10569 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 20:23:47 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 26 Dec 2018 01:23:47 +0000 Subject: [issue35585] Speedup Enum lookup In-Reply-To: <1545783984.81.0.712150888896.issue35585@roundup.psfhosted.org> Message-ID: <1545787427.67.0.712150888896.issue35585@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> ethan.furman nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 20:46:26 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 26 Dec 2018 01:46:26 +0000 Subject: [issue29886] links between binascii.{un,}hexlify / bytes.{,to}hex In-Reply-To: <1490282084.27.0.505150099985.issue29886@psf.upfronthosting.co.za> Message-ID: <1545788786.36.0.712150888896.issue29886@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +10570 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 20:46:32 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 26 Dec 2018 01:46:32 +0000 Subject: [issue29886] links between binascii.{un,}hexlify / bytes.{,to}hex In-Reply-To: <1490282084.27.0.505150099985.issue29886@psf.upfronthosting.co.za> Message-ID: <1545788792.01.0.712150888896.issue29886@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +10570, 10571 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 20:46:37 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 26 Dec 2018 01:46:37 +0000 Subject: [issue29886] links between binascii.{un,}hexlify / bytes.{,to}hex In-Reply-To: <1490282084.27.0.505150099985.issue29886@psf.upfronthosting.co.za> Message-ID: <1545788797.82.0.712150888896.issue29886@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +10570, 10571, 10572 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 20:56:22 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 26 Dec 2018 01:56:22 +0000 Subject: [issue29886] links between binascii.{un,}hexlify / bytes.{,to}hex In-Reply-To: <1490282084.27.0.505150099985.issue29886@psf.upfronthosting.co.za> Message-ID: <1545789382.18.0.712150888896.issue29886@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10573 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 20:56:28 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 26 Dec 2018 01:56:28 +0000 Subject: [issue29886] links between binascii.{un,}hexlify / bytes.{,to}hex In-Reply-To: <1490282084.27.0.505150099985.issue29886@psf.upfronthosting.co.za> Message-ID: <1545789388.15.0.712150888896.issue29886@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10573, 10574 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 20:56:35 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 26 Dec 2018 01:56:35 +0000 Subject: [issue29886] links between binascii.{un,}hexlify / bytes.{,to}hex In-Reply-To: <1490282084.27.0.505150099985.issue29886@psf.upfronthosting.co.za> Message-ID: <1545789395.21.0.712150888896.issue29886@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10573, 10574, 10575 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 21:10:30 2018 From: report at bugs.python.org (Ma Lin) Date: Wed, 26 Dec 2018 02:10:30 +0000 Subject: [issue35228] Index search in CHM help crashes viewer In-Reply-To: <1542107217.87.0.788709270274.issue35228@psf.upfronthosting.co.za> Message-ID: <1545790230.58.0.712150888896.issue35228@roundup.psfhosted.org> Ma Lin added the comment: I solved this thoroughly: Format disk C: and install a clean Windows 10. Don't forget to backup important files in C:\Users\\ folder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 21:15:21 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Wed, 26 Dec 2018 02:15:21 +0000 Subject: [issue24053] Define EXIT_SUCCESS and EXIT_FAILURE constants in sys In-Reply-To: <1429890469.94.0.27310602141.issue24053@psf.upfronthosting.co.za> Message-ID: <1545790521.87.0.712150888896.issue24053@roundup.psfhosted.org> Emmanuel Arias added the comment: Hi Elliot! > It seems like a no-brainer to add these, they reduce magic number use and improve the accessibility of Python to people coming from C. I would love to add these if everyone is OK with it. Sound great. But IMO I think that this can be solved doing: EXIT_FAILURE = 1 EXIT_SUCCESS = 0 sys.exit(EXIT_SUCCES) And what is the difference between EX_OK and EXIT_SUCCESS? both values are 0. BTW, I think this is a good improve and more for C coder. I recommend you mmake the PR. ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 22:34:41 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 26 Dec 2018 03:34:41 +0000 Subject: [issue11192] test_socket error on AIX In-Reply-To: <1297436751.32.0.492226695457.issue11192@psf.upfronthosting.co.za> Message-ID: <1545795281.71.0.712150888896.issue11192@roundup.psfhosted.org> Nick Coghlan added the comment: New changeset 5661459f5f508ea4bd24c13cbc861543f283147e by Nick Coghlan (Michael Felt) in branch 'master': bpo-11192: Skip unsupported cases in test_socket on AIX (GH-8954) https://github.com/python/cpython/commit/5661459f5f508ea4bd24c13cbc861543f283147e ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 22:54:26 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 26 Dec 2018 03:54:26 +0000 Subject: [issue27643] test_ctypes fails on AIX with xlc In-Reply-To: <1469718089.88.0.404760174195.issue27643@psf.upfronthosting.co.za> Message-ID: <1545796466.03.0.712150888896.issue27643@roundup.psfhosted.org> Nick Coghlan added the comment: New changeset 22462da70c1ae015a60a7b821547bc6d2b5bc265 by Nick Coghlan (Michael Felt) in branch 'master': bpo-27643 - skip test_ctypes test case with XLC compiler. (GH-5164) https://github.com/python/cpython/commit/22462da70c1ae015a60a7b821547bc6d2b5bc265 ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 22:59:44 2018 From: report at bugs.python.org (kbengine) Date: Wed, 26 Dec 2018 03:59:44 +0000 Subject: =?utf-8?q?=5Bissue35586=5D_Open_pyexpat_compilation=2C_Make_shows_error?= =?utf-8?b?77yIbWlzc2luZyBzZXBhcmF0b3LvvIk=?= Message-ID: <1545796783.34.0.712150888896.issue35586@roundup.psfhosted.org> New submission from kbengine : Python3.7.2 My compilation steps: 1. Modify Modules/Setup.dist, open pyexpat pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DXML_POOR_ENTROPY=1 -DUSE_PYEXPAT_CAPI 2. ./configure 3. make Makefile:272: *** missing separator. Stop. ---------------------------------------------------- ---------- components: Extension Modules messages: 332529 nosy: kbengine priority: normal severity: normal status: open title: Open pyexpat compilation, Make shows error?missing separator? type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 23:08:51 2018 From: report at bugs.python.org (Michael Felt) Date: Wed, 26 Dec 2018 04:08:51 +0000 Subject: [issue34897] distutils test errors when CXX is not set In-Reply-To: <1538684546.1.0.545547206417.issue34897@psf.upfronthosting.co.za> Message-ID: <1545797331.89.0.712150888896.issue34897@roundup.psfhosted.org> Change by Michael Felt : ---------- pull_requests: +10576 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 23:09:00 2018 From: report at bugs.python.org (Michael Felt) Date: Wed, 26 Dec 2018 04:09:00 +0000 Subject: [issue34897] distutils test errors when CXX is not set In-Reply-To: <1538684546.1.0.545547206417.issue34897@psf.upfronthosting.co.za> Message-ID: <1545797340.73.0.712150888896.issue34897@roundup.psfhosted.org> Change by Michael Felt : ---------- pull_requests: +10576, 10577 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 23:21:36 2018 From: report at bugs.python.org (embed372) Date: Wed, 26 Dec 2018 04:21:36 +0000 Subject: [issue35587] Python 3.7.2 Embed - zipimport.ZipImportError Message-ID: <1545798094.3.0.712150888896.issue35587@roundup.psfhosted.org> New submission from embed372 : [zip file] =----------------------------------------------------------- python37.zip . # Uncomment to run site.main() automatically #import site ------------------------------------------------------------ Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' Current thread 0x0000228c (most recent call first): [directory : extracted form python37.zip] =----------------------------------------------------------- python37 . # Uncomment to run site.main() automatically #import site ------------------------------------------------------------ works well ... [duplicaiton of vcruntime140.dll in Python 3.7.2 embed] ------------------------------------------------------------ python37._pth libcrypto-1_1-x64.dll libssl-1_1-x64.dll python3.dll python37.dll sqlite3.dll vcruntime140.dll [*] vcruntime140.dll [*] <-- _distutils_findvs.pyd (?) python.exe pythonw.exe _asyncio.pyd _bz2.pyd _contextvars.pyd _ctypes.pyd _decimal.pyd _elementtree.pyd _hashlib.pyd _lzma.pyd _msi.pyd _multiprocessing.pyd _overlapped.pyd _queue.pyd _socket.pyd _sqlite3.pyd _ssl.pyd pyexpat.pyd select.pyd unicodedata.pyd winsound.pyd python37.zip ------------------------------------------------------------ ---------- components: Build messages: 332530 nosy: embed372 priority: normal severity: normal status: open title: Python 3.7.2 Embed - zipimport.ZipImportError type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 23:23:22 2018 From: report at bugs.python.org (embed372) Date: Wed, 26 Dec 2018 04:23:22 +0000 Subject: [issue35587] Python 3.7.2 Embed - zipimport.ZipImportError (Cannot load python37.zip) In-Reply-To: <1545798094.3.0.712150888896.issue35587@roundup.psfhosted.org> Message-ID: <1545798202.18.0.712150888896.issue35587@roundup.psfhosted.org> Change by embed372 : ---------- title: Python 3.7.2 Embed - zipimport.ZipImportError -> Python 3.7.2 Embed - zipimport.ZipImportError (Cannot load python37.zip) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 23:34:19 2018 From: report at bugs.python.org (embed372) Date: Wed, 26 Dec 2018 04:34:19 +0000 Subject: [issue35587] Python 3.7.2 Embed - zipimport.ZipImportError (Cannot load python37.zip) In-Reply-To: <1545798094.3.0.712150888896.issue35587@roundup.psfhosted.org> Message-ID: <1545798859.48.0.712150888896.issue35587@roundup.psfhosted.org> Change by embed372 : ---------- type: crash -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 23:34:59 2018 From: report at bugs.python.org (embed372) Date: Wed, 26 Dec 2018 04:34:59 +0000 Subject: [issue35587] Python 3.7.2 Embed - zipimport.ZipImportError (Cannot load python37.zip) In-Reply-To: <1545798094.3.0.712150888896.issue35587@roundup.psfhosted.org> Message-ID: <1545798899.7.0.712150888896.issue35587@roundup.psfhosted.org> Change by embed372 : ---------- type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 00:43:45 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 26 Dec 2018 05:43:45 +0000 Subject: [issue34711] Lib/http/server.py: Return HTTPStatus.NOT_FOUND if path.endswith(/) and not a directory In-Reply-To: <1537179798.31.0.956365154283.issue34711@psf.upfronthosting.co.za> Message-ID: <1545803025.61.0.712150888896.issue34711@roundup.psfhosted.org> Nick Coghlan added the comment: New changeset 2062a20641febad5eb9c18d74e1cfb4d7a6e53ed by Nick Coghlan (Michael Felt) in branch 'master': bpo-34711: Return HTTPStatus.NOT_FOUND if path.endswith('/') and not a directory (GH-9687) https://github.com/python/cpython/commit/2062a20641febad5eb9c18d74e1cfb4d7a6e53ed ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 00:45:21 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 26 Dec 2018 05:45:21 +0000 Subject: [issue34897] distutils test errors when CXX is not set In-Reply-To: <1538684546.1.0.545547206417.issue34897@psf.upfronthosting.co.za> Message-ID: <1545803121.28.0.712150888896.issue34897@roundup.psfhosted.org> Nick Coghlan added the comment: New changeset 259c159fc1faab0dd631d20374842dc0d6a9f145 by Nick Coghlan (Michael Felt) in branch 'master': bpo-34897: avoid distutils test error when CXX is not set (GH-9706) https://github.com/python/cpython/commit/259c159fc1faab0dd631d20374842dc0d6a9f145 ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 02:38:57 2018 From: report at bugs.python.org (embed372) Date: Wed, 26 Dec 2018 07:38:57 +0000 Subject: [issue35587] Python 3.7.2 Embed - zipimport.ZipImportError (Cannot load python37.zip) In-Reply-To: <1545798094.3.0.712150888896.issue35587@roundup.psfhosted.org> Message-ID: <1545809937.98.0.712150888896.issue35587@roundup.psfhosted.org> Change by embed372 : ---------- components: +Library (Lib) -Build _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 03:20:09 2018 From: report at bugs.python.org (Vaibhav Gupta) Date: Wed, 26 Dec 2018 08:20:09 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545812409.92.0.712150888896.issue35579@roundup.psfhosted.org> Change by Vaibhav Gupta : ---------- keywords: +patch pull_requests: +10578 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 03:20:27 2018 From: report at bugs.python.org (Vaibhav Gupta) Date: Wed, 26 Dec 2018 08:20:27 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545812427.56.0.712150888896.issue35579@roundup.psfhosted.org> Change by Vaibhav Gupta : ---------- keywords: +patch, patch pull_requests: +10578, 10579 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 03:20:42 2018 From: report at bugs.python.org (Vaibhav Gupta) Date: Wed, 26 Dec 2018 08:20:42 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545812442.41.0.712150888896.issue35579@roundup.psfhosted.org> Change by Vaibhav Gupta : ---------- keywords: +patch, patch, patch pull_requests: +10578, 10579, 10580 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 03:20:54 2018 From: report at bugs.python.org (Vaibhav Gupta) Date: Wed, 26 Dec 2018 08:20:54 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545812454.3.0.712150888896.issue35579@roundup.psfhosted.org> Change by Vaibhav Gupta : ---------- keywords: +patch, patch, patch, patch pull_requests: +10578, 10579, 10580, 10581 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 04:39:33 2018 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 26 Dec 2018 09:39:33 +0000 Subject: [issue35588] Speed up mod/divmod for Fraction type Message-ID: <1545817172.57.0.712150888896.issue35588@roundup.psfhosted.org> New submission from Stefan Behnel : Spelling out the numerator/denominator calculation in the __mod__ special method, and actually implementing __divmod__, speeds up both operations by 2-3x. This is due to avoiding repeated Fraction instantiation and normalisation, as well as less arithmetic operations. $ ./python -m timeit -s 'from fractions import Fraction as F; a = F(-7, 3); b = F(3, 2)' 'a%b' 50000 loops, best of 5: 9.53 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a = F(-7, 3); b = F(3, 2)' 'a%3' 50000 loops, best of 5: 6.61 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a = F(-7, 3); b = F(3, 2)' 'divmod(a, b)' 20000 loops, best of 5: 14.1 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a = F(-7, 3); b = F(3, 2)' 'divmod(a, 3)' 20000 loops, best of 5: 10.2 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a = F(-7, 3); b = F(3, 2)' 'a%b' 100000 loops, best of 5: 2.96 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a = F(-7, 3); b = F(3, 2)' 'a%3' 100000 loops, best of 5: 2.78 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a = F(-7, 3); b = F(3, 2)' 'divmod(a, b)' 100000 loops, best of 5: 3.93 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a = F(-7, 3); b = F(3, 2)' 'divmod(a, 3)' 50000 loops, best of 5: 3.82 usec per loop ---------- components: Library (Lib) messages: 332533 nosy: scoder priority: normal severity: normal status: open title: Speed up mod/divmod for Fraction type type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 04:48:50 2018 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 26 Dec 2018 09:48:50 +0000 Subject: [issue35588] Speed up mod/divmod for Fraction type In-Reply-To: <1545817172.57.0.712150888896.issue35588@roundup.psfhosted.org> Message-ID: <1545817730.49.0.712150888896.issue35588@roundup.psfhosted.org> Change by Stefan Behnel : ---------- keywords: +patch pull_requests: +10582 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 04:48:54 2018 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 26 Dec 2018 09:48:54 +0000 Subject: [issue35588] Speed up mod/divmod for Fraction type In-Reply-To: <1545817172.57.0.712150888896.issue35588@roundup.psfhosted.org> Message-ID: <1545817734.37.0.712150888896.issue35588@roundup.psfhosted.org> Change by Stefan Behnel : ---------- keywords: +patch, patch pull_requests: +10582, 10583 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 04:48:56 2018 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 26 Dec 2018 09:48:56 +0000 Subject: [issue35588] Speed up mod/divmod for Fraction type In-Reply-To: <1545817172.57.0.712150888896.issue35588@roundup.psfhosted.org> Message-ID: <1545817736.37.0.712150888896.issue35588@roundup.psfhosted.org> Change by Stefan Behnel : ---------- keywords: +patch, patch, patch pull_requests: +10582, 10583, 10584 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 05:01:35 2018 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 26 Dec 2018 10:01:35 +0000 Subject: [issue35588] Speed up mod/divmod for Fraction type In-Reply-To: <1545817172.57.0.712150888896.issue35588@roundup.psfhosted.org> Message-ID: <1545818495.51.0.712150888896.issue35588@roundup.psfhosted.org> Change by Stefan Behnel : ---------- nosy: +mark.dickinson, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 05:04:34 2018 From: report at bugs.python.org (Huazuo Gao) Date: Wed, 26 Dec 2018 10:04:34 +0000 Subject: [issue35589] BaseSelectorEventLoop.sock_sendall() performance regression: extra copy of data Message-ID: <1545818673.36.0.712150888896.issue35589@roundup.psfhosted.org> New submission from Huazuo Gao : Prior to PR 10419, sock_sendall does not make a copy of the data. PR 10419 introduced an extra copy, which may cause problem for code that send a huge chunk of data simultaneously to many peers. Relevant change is: https://github.com/python/cpython/pull/10419/files#diff-2d64b02252335b37396e00e56fa66984R443 Bellow is a test that show the regression between 3.7.1 and 3.8-dev --- import asyncio import socket import os from subprocess import check_output loop = asyncio.get_event_loop() def mem_usage(): pid = str(os.getpid()) print(check_output(['ps', '-o', 'rss,comm'], text=True)) async def main(): data = bytearray(10*10**6) data = memoryview(data) tasks = [] for i in range(100): s1, s2 = socket.socketpair() s1.setblocking(False) s2.setblocking(False) tasks.append(loop.create_task(loop.sock_sendall(s1, data))) tasks.append(loop.create_task(loop.sock_recv(s2, 1))) await asyncio.sleep(0.1) mem_usage() for t in tasks: t.cancel() await asyncio.wait(tasks) loop.run_until_complete(main()) --- result 3.7.1: 24724 3.8-dev: 979184 ---------- components: asyncio messages: 332534 nosy: Huazuo Gao, asvetlov, yselivanov priority: normal severity: normal status: open title: BaseSelectorEventLoop.sock_sendall() performance regression: extra copy of data type: resource usage versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 05:35:51 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 26 Dec 2018 10:35:51 +0000 Subject: [issue35589] BaseSelectorEventLoop.sock_sendall() performance regression: extra copy of data In-Reply-To: <1545818673.36.0.712150888896.issue35589@roundup.psfhosted.org> Message-ID: <1545820551.62.0.712150888896.issue35589@roundup.psfhosted.org> Andrew Svetlov added the comment: Thanks for the report! ---------- assignee: -> asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 06:00:54 2018 From: report at bugs.python.org (jso2460) Date: Wed, 26 Dec 2018 11:00:54 +0000 Subject: [issue35590] logging.handlers.SysLogHandler with STREAM connects in constructor without timeout Message-ID: <1545822053.48.0.712150888896.issue35590@roundup.psfhosted.org> New submission from jso2460 : logging.handlers.SysLogHandler in __init__ contains the following code, where socket is created and then connected right away. This seem to provide no way to specify a connection timeout for the socket being created. sock = socket.socket(af, socktype, proto) if socktype == socket.SOCK_STREAM: sock.connect(sa) I believe to add an argument to specify the optional timeout would be appreciated, i.e., optionally calling sock.settimeout(..), something like: sock = socket.socket(af, socktype, proto) if timeout: sock.settimeout(timeout) if socktype == socket.SOCK_STREAM: sock.connect(sa) ---------- messages: 332536 nosy: jso2460 priority: normal severity: normal status: open title: logging.handlers.SysLogHandler with STREAM connects in constructor without timeout 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 Dec 26 07:30:19 2018 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 26 Dec 2018 12:30:19 +0000 Subject: [issue35588] Speed up mod/divmod for Fraction type In-Reply-To: <1545817172.57.0.712150888896.issue35588@roundup.psfhosted.org> Message-ID: <1545827419.1.0.712150888896.issue35588@roundup.psfhosted.org> Stefan Behnel added the comment: Similarly, I think "//" (__floordiv__) should be implemented using integer operations rather than math.floor(): (a.numerator * b.denominator) // (b.numerator * a.denominator) Thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 07:44:18 2018 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 26 Dec 2018 12:44:18 +0000 Subject: [issue35588] Speed up mod/divmod/floordiv for Fraction type In-Reply-To: <1545817172.57.0.712150888896.issue35588@roundup.psfhosted.org> Message-ID: <1545828258.06.0.712150888896.issue35588@roundup.psfhosted.org> Stefan Behnel added the comment: Motivation for the latter: $ ./python -m timeit -s 'from fractions import Fraction as F; a = F(-7, 3); b = F(3, 2)' 'a // b' 100000 loops, best of 5: 3.7 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a = F(-7, 3); b = F(3, 2)' 'a // 3' 100000 loops, best of 5: 3.49 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a = F(-7, 3); b = F(3, 2)' 'a // b' 500000 loops, best of 5: 899 nsec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a = F(-7, 3); b = F(3, 2)' 'a // 3' 500000 loops, best of 5: 729 nsec per loop ---------- title: Speed up mod/divmod for Fraction type -> Speed up mod/divmod/floordiv for Fraction type _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 08:31:04 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Wed, 26 Dec 2018 13:31:04 +0000 Subject: [issue35590] logging.handlers.SysLogHandler with STREAM connects in constructor without timeout In-Reply-To: <1545822053.48.0.712150888896.issue35590@roundup.psfhosted.org> Message-ID: <1545831064.09.0.712150888896.issue35590@roundup.psfhosted.org> Emmanuel Arias added the comment: Hi, If I don't see bad, if a timeout occur this is catch by the OSError exception. ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 08:42:34 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Wed, 26 Dec 2018 13:42:34 +0000 Subject: [issue35590] logging.handlers.SysLogHandler with STREAM connects in constructor without timeout In-Reply-To: <1545822053.48.0.712150888896.issue35590@roundup.psfhosted.org> Message-ID: <1545831754.38.0.712150888896.issue35590@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- components: +Library (Lib) type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 09:17:46 2018 From: report at bugs.python.org (Vaibhav Gupta) Date: Wed, 26 Dec 2018 14:17:46 +0000 Subject: [issue24928] mock.patch.dict spoils order of items in collections.OrderedDict In-Reply-To: <1440443995.19.0.0795335566212.issue24928@psf.upfronthosting.co.za> Message-ID: <1545833866.23.0.483364722386.issue24928@roundup.psfhosted.org> Vaibhav Gupta added the comment: Hi. I would like to make a PR for this. Also, I am not very familiar with the process of backporting. Is something specific needs to be done for that which is related to this? ---------- nosy: +dojutsu-user _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 09:47:38 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 26 Dec 2018 14:47:38 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545835658.97.0.111050332696.issue35579@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10585 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 09:47:57 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 26 Dec 2018 14:47:57 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545835677.71.0.101411272433.issue35579@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10585, 10586 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 09:53:05 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 26 Dec 2018 14:53:05 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545835985.83.0.91241974202.issue35579@roundup.psfhosted.org> miss-islington added the comment: New changeset dcf14d1a9875143747cd87c66fae6e693b21c6de by Miss Islington (bot) in branch '3.7': bpo-35579: Fix typo in in asyncio-task documentation (GH-11321) https://github.com/python/cpython/commit/dcf14d1a9875143747cd87c66fae6e693b21c6de ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 09:53:54 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 26 Dec 2018 14:53:54 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545836034.92.0.529334967436.issue35579@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 09:56:37 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 26 Dec 2018 14:56:37 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545836197.81.0.320169395345.issue35579@roundup.psfhosted.org> miss-islington added the comment: New changeset 3a81076bbf899b1a549f005dd9299e7ae0946321 by Miss Islington (bot) (Vaibhav Gupta) in branch 'master': bpo-35579: Fix typo in in asyncio-task documentation (GH-11321) https://github.com/python/cpython/commit/3a81076bbf899b1a549f005dd9299e7ae0946321 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 09:56:56 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 26 Dec 2018 14:56:56 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545836216.11.0.428523250849.issue35579@roundup.psfhosted.org> miss-islington added the comment: New changeset 3a81076bbf899b1a549f005dd9299e7ae0946321 by Miss Islington (bot) (Vaibhav Gupta) in branch 'master': bpo-35579: Fix typo in in asyncio-task documentation (GH-11321) https://github.com/python/cpython/commit/3a81076bbf899b1a549f005dd9299e7ae0946321 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 09:59:48 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 26 Dec 2018 14:59:48 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545836388.72.0.962757613988.issue35579@roundup.psfhosted.org> miss-islington added the comment: New changeset 3a81076bbf899b1a549f005dd9299e7ae0946321 by Miss Islington (bot) (Vaibhav Gupta) in branch 'master': bpo-35579: Fix typo in in asyncio-task documentation (GH-11321) https://github.com/python/cpython/commit/3a81076bbf899b1a549f005dd9299e7ae0946321 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 10:01:55 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 26 Dec 2018 15:01:55 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545836515.18.0.0786683742414.issue35579@roundup.psfhosted.org> miss-islington added the comment: New changeset 3a81076bbf899b1a549f005dd9299e7ae0946321 by Miss Islington (bot) (Vaibhav Gupta) in branch 'master': bpo-35579: Fix typo in in asyncio-task documentation (GH-11321) https://github.com/python/cpython/commit/3a81076bbf899b1a549f005dd9299e7ae0946321 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 10:03:55 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 26 Dec 2018 15:03:55 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545836635.47.0.473774060442.issue35579@roundup.psfhosted.org> miss-islington added the comment: New changeset dcf14d1a9875143747cd87c66fae6e693b21c6de by Miss Islington (bot) in branch '3.7': bpo-35579: Fix typo in in asyncio-task documentation (GH-11321) https://github.com/python/cpython/commit/dcf14d1a9875143747cd87c66fae6e693b21c6de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 10:09:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2018 15:09:52 +0000 Subject: [issue35588] Speed up mod/divmod/floordiv for Fraction type In-Reply-To: <1545817172.57.0.712150888896.issue35588@roundup.psfhosted.org> Message-ID: <1545836992.38.0.0885736457219.issue35588@roundup.psfhosted.org> Serhiy Storchaka added the comment: Please make several additional tests, and ensure that there is no regression. 1. Test with fractions with the same large denominator (for example 2**50, 2**100, 10**30, 3**50, factorial(30), or a large pseudo-primary number) and small and large numerators. 2. Test with fractions with the same large numerator (as above) and small and large denominators. 3. Test with fractions with random numerators and denominators and find worst cases (in which the optimization effect is the smallest or negative). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 10:11:12 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 26 Dec 2018 15:11:12 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545837072.31.0.162668076573.issue35579@roundup.psfhosted.org> miss-islington added the comment: New changeset dcf14d1a9875143747cd87c66fae6e693b21c6de by Miss Islington (bot) in branch '3.7': bpo-35579: Fix typo in in asyncio-task documentation (GH-11321) https://github.com/python/cpython/commit/dcf14d1a9875143747cd87c66fae6e693b21c6de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 10:12:55 2018 From: report at bugs.python.org (yjq) Date: Wed, 26 Dec 2018 15:12:55 +0000 Subject: [issue34148] Fatal error on SSL transport In-Reply-To: <1531923784.93.0.56676864532.issue34148@psf.upfronthosting.co.za> Message-ID: <1545837175.56.0.682993694199.issue34148@roundup.psfhosted.org> yjq added the comment: https://github.com/aio-libs/aiohttp/issues/3202#issuecomment-439644135 ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 10:21:33 2018 From: report at bugs.python.org (yjq) Date: Wed, 26 Dec 2018 15:21:33 +0000 Subject: [issue34148] Fatal error on SSL transport In-Reply-To: <1531923784.93.0.56676864532.issue34148@psf.upfronthosting.co.za> Message-ID: <1545837693.46.0.21601873263.issue34148@roundup.psfhosted.org> yjq added the comment: I'm sure that this should be a bug in python. But because I'm naive, I'm not sure about how to fix it. I think we can just add the exception to base_events._FATAL_ERROR_IGNORE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 10:23:54 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 26 Dec 2018 15:23:54 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545837834.36.0.770858420497.issue35579@roundup.psfhosted.org> miss-islington added the comment: New changeset 3a81076bbf899b1a549f005dd9299e7ae0946321 by Miss Islington (bot) (Vaibhav Gupta) in branch 'master': bpo-35579: Fix typo in in asyncio-task documentation (GH-11321) https://github.com/python/cpython/commit/3a81076bbf899b1a549f005dd9299e7ae0946321 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 10:24:42 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 26 Dec 2018 15:24:42 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545837882.07.0.0731571945779.issue35579@roundup.psfhosted.org> miss-islington added the comment: New changeset 3a81076bbf899b1a549f005dd9299e7ae0946321 by Miss Islington (bot) (Vaibhav Gupta) in branch 'master': bpo-35579: Fix typo in in asyncio-task documentation (GH-11321) https://github.com/python/cpython/commit/3a81076bbf899b1a549f005dd9299e7ae0946321 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 11:01:16 2018 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 26 Dec 2018 16:01:16 +0000 Subject: [issue35588] Speed up mod/divmod/floordiv for Fraction type In-Reply-To: <1545817172.57.0.712150888896.issue35588@roundup.psfhosted.org> Message-ID: <1545840076.3.0.739726724443.issue35588@roundup.psfhosted.org> Stefan Behnel added the comment: Sure, I can add tests, but I wonder what kind of regression you expect. The algorithm is still the same as before, it's just implemented more efficiently. It does trade a bit of memory for the speed, though, since there is no longer an intermediate normalisation step, and therefore the integers can get larger during the calculation. Shouldn't make a big difference in practice, though. We are talking about bytes, not megabytes here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 11:20:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2018 16:20:32 +0000 Subject: [issue35588] Speed up mod/divmod/floordiv for Fraction type In-Reply-To: <1545817172.57.0.712150888896.issue35588@roundup.psfhosted.org> Message-ID: <1545841232.27.0.3897945645.issue35588@roundup.psfhosted.org> Serhiy Storchaka added the comment: I want to check whether removing the normalization step has a negative performance effect larger than the time spent on normalization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 11:45:56 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 26 Dec 2018 16:45:56 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545842756.08.0.44699306818.issue35579@roundup.psfhosted.org> miss-islington added the comment: New changeset 3a81076bbf899b1a549f005dd9299e7ae0946321 by Miss Islington (bot) (Vaibhav Gupta) in branch 'master': bpo-35579: Fix typo in in asyncio-task documentation (GH-11321) https://github.com/python/cpython/commit/3a81076bbf899b1a549f005dd9299e7ae0946321 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 11:46:13 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 26 Dec 2018 16:46:13 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545842756.08.0.44699306818.issue35579@roundup.psfhosted.org> miss-islington added the comment: New changeset 3a81076bbf899b1a549f005dd9299e7ae0946321 by Miss Islington (bot) (Vaibhav Gupta) in branch 'master': bpo-35579: Fix typo in in asyncio-task documentation (GH-11321) https://github.com/python/cpython/commit/3a81076bbf899b1a549f005dd9299e7ae0946321 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 11:46:14 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 26 Dec 2018 16:46:14 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545842774.36.0.18991582336.issue35579@roundup.psfhosted.org> miss-islington added the comment: New changeset dcf14d1a9875143747cd87c66fae6e693b21c6de by Miss Islington (bot) in branch '3.7': bpo-35579: Fix typo in in asyncio-task documentation (GH-11321) https://github.com/python/cpython/commit/dcf14d1a9875143747cd87c66fae6e693b21c6de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 13:36:11 2018 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 26 Dec 2018 18:36:11 +0000 Subject: [issue35588] Speed up mod/divmod/floordiv for Fraction type In-Reply-To: <1545817172.57.0.712150888896.issue35588@roundup.psfhosted.org> Message-ID: <1545849371.41.0.108399233668.issue35588@roundup.psfhosted.org> Stefan Behnel added the comment: Thanks for your review and ideas, Serhiy. I added a couple of test cases, but failed to find any case where the new implementation is not much faster. I also tried "divmod(n_div, d_div)" for implementing __divmod__(), and the results are mixed, e.g. Arithmetic operators: $ ./python -m timeit -s 'from fractions import Fraction as F; a = F(-7, 3); b = F(3, 2)' 'divmod(a,b)' 100000 loops, best of 5: 3.11 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a, b = F(10**15+1, 10**27+1), F(10**9-1, 10**7-1)' 'divmod(a, b)' 100000 loops, best of 5: 3.48 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a, b = F(10**350+1, 10**207+1), F(10**89-1, 10**62-1)' 'divmod(a, b)' 20000 loops, best of 5: 17.7 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a, b = F(10**89-1, 10**611-1), F(10**350+1, 10**207+1)' 'divmod(a, b)' 20000 loops, best of 5: 18.2 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a, b = F(10**350+1, 10**207+1), F(10**89-1, 10**612-1)' 'divmod(a, b)' 5000 loops, best of 5: 34.4 usec per loop divmod(): $ ./python -m timeit -s 'from fractions import Fraction as F; a = F(-7, 3); b = F(3, 2)' 'divmod(a,b)' 100000 loops, best of 5: 3.04 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a, b = F(10**15+1, 10**27+1), F(10**9-1, 10**7-1)' 'divmod(a, b)' 100000 loops, best of 5: 3.56 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a, b = F(10**350+1, 10**207+1), F(10**89-1, 10**62-1)' 'divmod(a, b)' 20000 loops, best of 5: 17.3 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a, b = F(10**89-1, 10**611-1), F(10**350+1, 10**207+1)' 'divmod(a, b)' 20000 loops, best of 5: 18.2 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a, b = F(10**350+1, 10**207+1), F(10**89-1, 10**612-1)' 'divmod(a, b)' 10000 loops, best of 5: 31.7 usec per loop Current master, for comparison: $ ./python -m timeit -s 'from fractions import Fraction as F; a = F(-7, 3); b = F(3, 2)' 'divmod(a,b)' 20000 loops, best of 5: 14.1 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a, b = F(10**15+1, 10**27+1), F(10**9-1, 10**7-1)' 'divmod(a, b)' 20000 loops, best of 5: 16 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a, b = F(10**350+1, 10**207+1), F(10**89-1, 10**62-1)' 'divmod(a, b)' 5000 loops, best of 5: 61.2 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a, b = F(10**89-1, 10**611-1), F(10**350+1, 10**207+1)' 'divmod(a, b)' 5000 loops, best of 5: 65.3 usec per loop $ ./python -m timeit -s 'from fractions import Fraction as F; a, b = F(10**350+1, 10**207+1), F(10**89-1, 10**612-1)' 'divmod(a, b)' 2000 loops, best of 5: 120 usec per loop Definitely not an obvious decision, although there is a tendency towards faster execution for very large numbers. Whether it's faster or slower would probably depend on the data and the application at hand. I could live with either choice, but would use divmod() for now since it simplifies the implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 13:45:38 2018 From: report at bugs.python.org (Ethan Furman) Date: Wed, 26 Dec 2018 18:45:38 +0000 Subject: [issue35585] Speedup Enum lookup In-Reply-To: <1545783984.81.0.712150888896.issue35585@roundup.psfhosted.org> Message-ID: <1545849938.28.0.493310278708.issue35585@roundup.psfhosted.org> Ethan Furman added the comment: New changeset 34ae04f74dcf4ac97d07c3e82eaf8f619d80cedb by Ethan Furman (Andrew Svetlov) in branch 'master': Speed-up building enums by value, e.g. http.HTTPStatus(200) (#11318) https://github.com/python/cpython/commit/34ae04f74dcf4ac97d07c3e82eaf8f619d80cedb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 13:46:02 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 26 Dec 2018 18:46:02 +0000 Subject: [issue35585] Speedup Enum lookup In-Reply-To: <1545783984.81.0.712150888896.issue35585@roundup.psfhosted.org> Message-ID: <1545849962.99.0.689272057149.issue35585@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10587 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 13:50:51 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 26 Dec 2018 18:50:51 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection Message-ID: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> New submission from Cheryl Sabella : This probably isn't a traceback that's likely to happen, but I wanted to document it since I was able to recreate it. To recreate: In a new shell, do Select All, then Find Selection. Exception in Tkinter callback Traceback (most recent call last): File "N:\projects\cpython\lib\tkinter\__init__.py", line 1883, in __call__ return self.func(*args) File "N:\projects\cpython\lib\idlelib\editor.py", line 644, in find_selection_event search.find_selection(self.text) File "N:\projects\cpython\lib\idlelib\search.py", line 25, in find_selection return _setup(text).find_selection(text) File "N:\projects\cpython\lib\idlelib\search.py", line 72, in find_selection return self.find_again(text) File "N:\projects\cpython\lib\idlelib\search.py", line 65, in find_again self.bell() AttributeError: 'SearchDialog' object has no attribute 'bell' ---------- assignee: terry.reedy components: IDLE messages: 332559 nosy: cheryl.sabella, terry.reedy priority: normal severity: normal status: open title: IDLE: Traceback on Find Selection type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 15:15:46 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 26 Dec 2018 20:15:46 +0000 Subject: [issue28097] IDLE: document all key bindings, add menu items for more. In-Reply-To: <1473663810.99.0.66873909958.issue28097@psf.upfronthosting.co.za> Message-ID: <1545855346.25.0.878860476933.issue28097@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +10588 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 15:15:49 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 26 Dec 2018 20:15:49 +0000 Subject: [issue28097] IDLE: document all key bindings, add menu items for more. In-Reply-To: <1473663810.99.0.66873909958.issue28097@psf.upfronthosting.co.za> Message-ID: <1545855349.56.0.347874738532.issue28097@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- keywords: +patch, patch pull_requests: +10588, 10589 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 15:15:52 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 26 Dec 2018 20:15:52 +0000 Subject: [issue28097] IDLE: document all key bindings, add menu items for more. In-Reply-To: <1473663810.99.0.66873909958.issue28097@psf.upfronthosting.co.za> Message-ID: <1545855352.53.0.406108803294.issue28097@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- keywords: +patch, patch, patch pull_requests: +10588, 10589, 10590 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 15:18:06 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 26 Dec 2018 20:18:06 +0000 Subject: [issue28097] IDLE: document all key bindings, add menu items for more. In-Reply-To: <1473663810.99.0.66873909958.issue28097@psf.upfronthosting.co.za> Message-ID: <1545855486.94.0.456299532192.issue28097@roundup.psfhosted.org> Cheryl Sabella added the comment: PR11325 adds Previous/Next History to the Shell menu. ---------- nosy: +cheryl.sabella stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 15:45:20 2018 From: report at bugs.python.org (Martin Panter) Date: Wed, 26 Dec 2018 20:45: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: <1545857120.59.0.938175994484.issue33661@roundup.psfhosted.org> Martin Panter added the comment: Are you aware of the ?add_unredirected_header? method? Maybe that is enough to avoid your problem. https://docs.python.org/dev/library/urllib.request.html#urllib.request.Request.add_unredirected_header ---------- nosy: +martin.panter title: urllib may leak sensitive HTTP headers to a third-party web site1111 -> urllib may leak sensitive HTTP headers to a third-party web site _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 15:48:58 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 26 Dec 2018 20:48:58 +0000 Subject: [issue35585] Speedup Enum lookup In-Reply-To: <1545783984.81.0.712150888896.issue35585@roundup.psfhosted.org> Message-ID: <1545857338.08.0.216652507561.issue35585@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 705b5998035739b1794a862123d3dc6e339a14d0 by Andrew Svetlov (Miss Islington (bot)) in branch '3.7': Speed-up building enums by value, e.g. http.HTTPStatus(200) (GH-11318) (GH-11324) https://github.com/python/cpython/commit/705b5998035739b1794a862123d3dc6e339a14d0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 15:52:32 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 26 Dec 2018 20:52:32 +0000 Subject: [issue35585] Speedup Enum lookup In-Reply-To: <1545783984.81.0.712150888896.issue35585@roundup.psfhosted.org> Message-ID: <1545857552.17.0.531522901629.issue35585@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 16:36:07 2018 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 26 Dec 2018 21:36:07 +0000 Subject: [issue35559] Optimize base64.b16decode to use compiled regex In-Reply-To: <1545463748.16.0.98272194251.issue35559@roundup.psfhosted.org> Message-ID: <1545860167.52.0.959010001138.issue35559@roundup.psfhosted.org> Stefan Behnel added the comment: I agree with Antoine. After all, we are optimising a safety check here that runs in linear time. If people want speed, they should consider methods that do not do this check in the first place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 17:13:34 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 26 Dec 2018 22:13:34 +0000 Subject: [issue34836] test_ssl.test_default_ecdh_curve needs no tls1.3 flag in 2.7, for now In-Reply-To: <1538152364.12.0.545547206417.issue34836@psf.upfronthosting.co.za> Message-ID: <1545862414.1.0.589572226611.issue34836@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 17:21:57 2018 From: report at bugs.python.org (Gunasekar Rajendran) Date: Wed, 26 Dec 2018 22:21:57 +0000 Subject: [issue35592] Not able to use Python 3.7.2 due to SSL issue Message-ID: <1545862916.5.0.100281497043.issue35592@roundup.psfhosted.org> New submission from Gunasekar Rajendran : I am trying to run python code in Visual studio code and get the below error while trying to connect to mysql db Python installation has no SSL support ---------- assignee: christian.heimes components: SSL files: dbconnect.py messages: 332564 nosy: Gunasekar Rajendran, christian.heimes priority: normal severity: normal status: open title: Not able to use Python 3.7.2 due to SSL issue type: crash versions: Python 3.7 Added file: https://bugs.python.org/file48015/dbconnect.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 17:36:21 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 26 Dec 2018 22:36:21 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1545863781.75.0.796507607985.issue35537@roundup.psfhosted.org> Gregory P. Smith added the comment: Thanks for all your research and reference links on this! As a _posixsubprocess maintainer, I am not against either posix_spawn or vfork being used directly in the future when feasible. A challenge, especially with platform specific vfork, is making sure we understand exactly which platforms it can work properly on and checking for those both at compile time _and_ runtime (running kernel version and potentially the runtime libc version?) so that we can only use it in situations we are sure it is supposed to behave as desired in. My guiding philosophy: Be conservative on choosing when such a thing is safe to use. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 17:36:40 2018 From: report at bugs.python.org (paul j3) Date: Wed, 26 Dec 2018 22:36:40 +0000 Subject: [issue35442] Chain of several subcommands in argparse In-Reply-To: <1544306329.79.0.788709270274.issue35442@psf.upfronthosting.co.za> Message-ID: <1545863800.31.0.191539610761.issue35442@roundup.psfhosted.org> Change by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 17:47:25 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 26 Dec 2018 22:47:25 +0000 Subject: [issue35592] Not able to use Python 3.7.2 due to SSL issue In-Reply-To: <1545862916.5.0.100281497043.issue35592@roundup.psfhosted.org> Message-ID: <1545864445.2.0.597109268203.issue35592@roundup.psfhosted.org> Christian Heimes added the comment: I don't see any error message. Please describe how you have installed Python and which version of Windows you are running. A traceback and an error message would be helpful, too. ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 17:49:30 2018 From: report at bugs.python.org (paul j3) Date: Wed, 26 Dec 2018 22:49:30 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument In-Reply-To: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za> Message-ID: <1545864570.8.0.128680866357.issue35495@roundup.psfhosted.org> paul j3 added the comment: argparse.REMAINDER matches an empty list of arguments, just like '?' and '*'. So they are always 'filled', even by `parse_args([])`. '?' and '*' have some special handling of defaults in this case, see in argparse.ArgumentParser._get_values the two value = action.default REMAINDER has its own section in the function that does nothing with the default. I think it should be left as is. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 19:08:16 2018 From: report at bugs.python.org (Sam Kerr) Date: Thu, 27 Dec 2018 00:08:16 +0000 Subject: [issue22171] stack smash when using ctypes/libffi to access union In-Reply-To: <1407473639.16.0.026036901704.issue22171@psf.upfronthosting.co.za> Message-ID: <1545869296.79.0.99969941233.issue22171@roundup.psfhosted.org> Sam Kerr added the comment: I was also able to get the stack smashing behavior with the following: OS: Linux slaptop 4.19.12-arch1-1-ARCH #1 SMP PREEMPT Fri Dec 21 13:56:54 UTC 2018 x86_64 GNU/Linux GCC: gcc (GCC) 8.2.1 20181127 I was able to track down the issue into the src/x86/ffi64.c file inside libffi. Because more than 4 (the #define'd MAX_CLASSES value in libffi) items were passed, libffi writes outside an array boundary, which is what causes the stack smashing. I forked libffi and added an assert to prove this is what is happening. You can find it at https://github.com/stkerr/libffi/commit/80bca6647702ffd846c655be14d8306ef24ca2dd. Just as a quick test, I tried to increase the MAX_CLASSES value to 40, which is far more than the 9 in the crashing example. I'm 99% positive changing the MAX_CLASSES magic value isn't the right way to solve this issue, but it may give a hint on the proper way to address it. I'm not sure at this point if this behavior is something for libffi to fix or how Python calls libffi though. I'll keep looking, but hopefully this helps someone else make some progress. ---------- nosy: +Sam.Kerr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 19:08:49 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 27 Dec 2018 00:08:49 +0000 Subject: [issue26537] ConfigParser has optionxform, but not sectionxform In-Reply-To: <1457678417.52.0.410667040467.issue26537@psf.upfronthosting.co.za> Message-ID: <1545869329.72.0.357720679645.issue26537@roundup.psfhosted.org> Cheryl Sabella added the comment: Would it be worthwhile to convert this patch to a PR for 3.8? ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 19:35:53 2018 From: report at bugs.python.org (Gagan) Date: Thu, 27 Dec 2018 00:35:53 +0000 Subject: [issue35583] (glibc2.28/MIPS32EL) python 3.7.x interpreter segmentation fault (3.6.x/2.7.x compile fine) In-Reply-To: <1545766743.84.0.712150888896.issue35583@roundup.psfhosted.org> Message-ID: <1545870953.62.0.798963444616.issue35583@roundup.psfhosted.org> Gagan added the comment: i tried compiling using "--without-pymalloc" and experienced the same problem. there is no REASONABLE explanation for how this anomaly has arisen within SUBVERSIONS. in the words of some infamous rappers: "what, the 'embedded' (ARM-fellating) [east coast] crew doesn't have any love for MIPS [{Dr.} Dre and Snoop Dogg]?" (https://www.youtube.com/watch?v=tNfx325Nw78) "y'all don't love MIPS (us)?" "well let it be known then. we know you're ARM lovers ('east coast')" seems those "high minded", "ancient", "lost civilisation" (and "aryan" [LULZ]) individuals have polluted computing. it is unreal how much you guys have destroyed your own language. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 19:56:30 2018 From: report at bugs.python.org (Katsuhiko YOSHIDA) Date: Thu, 27 Dec 2018 00:56:30 +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: <1545872190.81.0.00550062009492.issue33661@roundup.psfhosted.org> Katsuhiko YOSHIDA added the comment: Thanks. But I think the ?add_unredirected_header? is not enough. These sensitive headers should be removed only when redirecting to cross-site automatically for security like HTTPBasicAuthHandler of urllib2. In order to fulfill this requirement, I think the operation should be in HTTPRedirectHandler.redirect_request. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 20:10:42 2018 From: report at bugs.python.org (Eric Lindblad) Date: Thu, 27 Dec 2018 01:10:42 +0000 Subject: [issue34855] batch file variables In-Reply-To: <1538330156.86.0.545547206417.issue34855@psf.upfronthosting.co.za> Message-ID: <1545873042.95.0.484610646421.issue34855@roundup.psfhosted.org> Eric Lindblad added the comment: Should windows-steps.yml (line 11) and windows-appx-test.yml committed 6 Dec. (line 39) both read EXTERNALS_DIR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 23:18:02 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 27 Dec 2018 04:18:02 +0000 Subject: [issue34855] batch file variables In-Reply-To: <1538330156.86.0.545547206417.issue34855@psf.upfronthosting.co.za> Message-ID: <1545884282.44.0.899611651109.issue34855@roundup.psfhosted.org> Steve Dower added the comment: They should set it, and it will be read in PCbuild/python.props which has the "correct" name (I forget what it is right now and am not looking it up on my phone) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 00:03:52 2018 From: report at bugs.python.org (marsam) Date: Thu, 27 Dec 2018 05:03:52 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1545887032.58.0.215627539249.issue1222585@roundup.psfhosted.org> Change by marsam : ---------- versions: +Python 3.7 -Python 3.5 Added file: https://bugs.python.org/file48016/python-3.x-distutils-C++.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 00:32:23 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 27 Dec 2018 05:32:23 +0000 Subject: [issue35559] Optimize base64.b16decode to use compiled regex In-Reply-To: <1545463748.16.0.98272194251.issue35559@roundup.psfhosted.org> Message-ID: <1545888743.19.0.101962596573.issue35559@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the feedback. I am closing this as rejected since it's not worth the cost of increasing import time and for performance reasons there are other options as Serhiy noted in msg332339. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 00:39:57 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 27 Dec 2018 05:39:57 +0000 Subject: [issue24928] mock.patch.dict spoils order of items in collections.OrderedDict In-Reply-To: <1440443995.19.0.0795335566212.issue24928@psf.upfronthosting.co.za> Message-ID: <1545889196.99.0.931089294611.issue24928@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Hi Vaibhav, As noted in the thread the issue is fixed in 3.6 and above due to dict order being guaranteed. But it would be nice to have the test in the patch converted as a unit test. With respect to backport the fixes are backported to https://github.com/testing-cabal/mock to make mock library available for older versions of Python which would required the fix since dict order is not guaranteed in older versions. Once the test to CPython is merged you can make a PR to the mock repo with the fix and the test. I haven't started working on a PR for this so feel free to go ahead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 01:58:31 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 27 Dec 2018 06:58:31 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1545893911.6.0.794869145845.issue35121@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Also looking at the docs for different frameworks like [Flask](http://flask.pocoo.org/docs/1.0/api/#flask.Response.set_cookie) and [Django](https://docs.djangoproject.com/en/2.1/ref/request-response/#django.http.HttpResponse.set_cookie) they recommend setting Domain attribute only for cross-domain cookies. >From Django docs > Use domain if you want to set a cross-domain cookie. For example, domain="example.com" will set a cookie that is readable by the domains www.example.com, blog.example.com, etc. Otherwise, a cookie will only be readable by the domain that set it. When there is no domain specified then the frameworks seem to set the cookie only for the host only as per [RFC 6265](https://tools.ietf.org/html/rfc6265#section-5.3). So domain attribute is set all the time and it's just that if the domain attribute is set explicitly by the server with the set_cookie function in the frameworks then the cookiejar has domain_specified set along with dot prefixed for the domain enabling stricter validations. I don't know about the metrics of setting the domain attribute vs not setting it. Checking with a simple Flask app and set_cookie without domain parameter the cookies are passed to suffix domains. With domain passed to set_cookie has dot prefixed and the cookies are not passed to suffix domains. I also looked into other implementations * aiohttp - uses cookiejar but has custom domain checks and update cookie methods at https://github.com/aio-libs/aiohttp/blob/49261c192ff225372dffb39056c3c311714b12c5/aiohttp/cookiejar.py#L141 . Thus it's not affected when tested. * golang implementation - https://github.com/golang/go/blob/50bd1c4d4eb4fac8ddeb5f063c099daccfb71b26/src/net/http/cookiejar/jar.go#L123 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 02:41:14 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 27 Dec 2018 07:41:14 +0000 Subject: [issue35568] Expose the C raise() function in the signal module, for use on Windows In-Reply-To: <1545537356.71.0.0770528567349.issue35568@roundup.psfhosted.org> Message-ID: <1545896474.88.0.824713863482.issue35568@roundup.psfhosted.org> Nathaniel Smith added the comment: I'd like to see it in 3.8, but don't know if I'll get to it, and it'd be a good onramp issue for someone who wants to get into cpython development. So, let's put the keyword on it for now, and see what happens... ---------- keywords: +easy (C) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 03:59:28 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 27 Dec 2018 08:59:28 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545901168.67.0.873776594352.issue35579@roundup.psfhosted.org> miss-islington added the comment: New changeset 3a81076bbf899b1a549f005dd9299e7ae0946321 by Miss Islington (bot) (Vaibhav Gupta) in branch 'master': bpo-35579: Fix typo in in asyncio-task documentation (GH-11321) https://github.com/python/cpython/commit/3a81076bbf899b1a549f005dd9299e7ae0946321 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 03:59:40 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 27 Dec 2018 08:59:40 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545901168.67.0.873776594352.issue35579@roundup.psfhosted.org> miss-islington added the comment: New changeset 3a81076bbf899b1a549f005dd9299e7ae0946321 by Miss Islington (bot) (Vaibhav Gupta) in branch 'master': bpo-35579: Fix typo in in asyncio-task documentation (GH-11321) https://github.com/python/cpython/commit/3a81076bbf899b1a549f005dd9299e7ae0946321 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 03:59:41 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 27 Dec 2018 08:59:41 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545901181.22.0.922257577777.issue35579@roundup.psfhosted.org> miss-islington added the comment: New changeset dcf14d1a9875143747cd87c66fae6e693b21c6de by Miss Islington (bot) in branch '3.7': bpo-35579: Fix typo in in asyncio-task documentation (GH-11321) https://github.com/python/cpython/commit/dcf14d1a9875143747cd87c66fae6e693b21c6de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 05:02:05 2018 From: report at bugs.python.org (Michael Felt) Date: Thu, 27 Dec 2018 10:02:05 +0000 Subject: [issue35189] PEP 475: fnctl functions are not retried if interrupted by a signal (EINTR) In-Reply-To: <1541681130.38.0.788709270274.issue35189@psf.upfronthosting.co.za> Message-ID: <1545904925.06.0.646164109456.issue35189@roundup.psfhosted.org> Michael Felt added the comment: I have not looked at 3.6, but I have bisected the 3.7 and 3.8 branches for AIX. I get: On 3.7 Branch: Bisecting: 0 revisions left to test after this (roughly 0 steps) [56742f1eb05401a27499af0ccdcb4e4214859fd1] [3.7] bpo-35189: Retry fnctl calls on EINTR (GH-10413) (GH-10678) On 3.8 Branch: Bisecting: 0 revisions left to test after this (roughly 0 steps) [b409ffa848b280c1db1b4f450bfae14f263099ac] bpo-35189: Retry fnctl calls on EINTR (GH-10413) So, my assumption is that the PR-10413 is not 100% correct for AIX. Will look further, but also request - will this issue reopen, or do we need a new issue? ---------- nosy: +Michael.Felt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 05:05:58 2018 From: report at bugs.python.org (Michael Felt) Date: Thu, 27 Dec 2018 10:05:58 +0000 Subject: [issue35189] PEP 475: fnctl functions are not retried if interrupted by a signal (EINTR) In-Reply-To: <1541681130.38.0.788709270274.issue35189@psf.upfronthosting.co.za> Message-ID: <1545905158.74.0.433761531529.issue35189@roundup.psfhosted.org> Michael Felt added the comment: Forgot to include the test failure message: ====================================================================== FAIL: test_all (test.test_eintr.EINTRTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/test/test_eintr.py", line 18, in test_all script_helper.assert_python_ok("-u", tester) File "/data/prj/python/git/python3-3.8/Lib/test/support/script_helper.py", line 157, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/data/prj/python/git/python3-3.8/Lib/test/support/script_helper.py", line 143, in _assert_python res.fail(cmd_line) File "/data/prj/python/git/python3-3.8/Lib/test/support/script_helper.py", line 70, in fail raise AssertionError("Process return code is %d\n" AssertionError: Process return code is 1 command line: ['/data/prj/python/python3-3.8/python', '-X', 'faulthandler', '-I', '-u', '/data/prj/python/git/python3-3.8/Lib/test/eintrdata/eintr_tester.py'] stdout: --- --- stderr: --- .E......sss............. ====================================================================== ERROR: test_lockf (__main__.FNTLEINTRTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/test/eintrdata/eintr_tester.py", line 522, in test_lockf self._lock(fcntl.lockf, "lockf") File "/data/prj/python/git/python3-3.8/Lib/test/eintrdata/eintr_tester.py", line 507, in _lock lock_func(f, fcntl.LOCK_EX | fcntl.LOCK_NB) PermissionError: [Errno 13] Permission denied ---------------------------------------------------------------------- Ran 24 tests in 9.692s FAILED (errors=1, skipped=3) --- ---------------------------------------------------------------------- Ran 1 test in 10.404s FAILED (failures=1) test test_eintr failed test_eintr failed == Tests result: FAILURE == 1 test failed: test_eintr Total duration: 10 sec 645 ms ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 05:18:22 2018 From: report at bugs.python.org (Antoine Wecxsteen) Date: Thu, 27 Dec 2018 10:18:22 +0000 Subject: [issue35579] Typo in in asyncio-task documentation In-Reply-To: <1545669840.38.0.712150888896.issue35579@roundup.psfhosted.org> Message-ID: <1545905902.48.0.605104656428.issue35579@roundup.psfhosted.org> Antoine Wecxsteen added the comment: Thank you all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 05:21:23 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 27 Dec 2018 10:21:23 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1545906083.72.0.762089569237.issue35121@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I have come across another behavior change between path checks while using the cookie jar implementation available in Python. This is related to incorrect cookie validation but with respect to path so let me know if this needs a separate ticket. I observed the following difference : 1. Make a request to "/" that sets a cookie with "path=/any" 2. Make a request to "/any" and the set cookie is passed since the path matches 3. Make a request to "/anybad" and cookie with "path=/any" is also passed too. On using golang stdlib implementation of cookiejar the cookie "path=/any" is not passed when a request to "/anybad" is made. So I checked with RFC 6265 where the path match check is defined in section-5.1.4 . RFC 6265 also obsoletes RFC 2965 upon which cookiejar is based I hope since original implementation of cookiejar is from 2004 and RFC 6265 was standardized later. So I think it's good to enforce RFC 6265 since RFC 2965 is obsolete at least in Python 3.8 unless this is considered as a security issue. I think this is a security issue. The current implementation can potentially cause cookies to be sent to incorrect paths in the same domain that share the same prefix. This is a behavior change with more strict checks but I could see no tests failing with RFC 6265 implementation too. RFC 2965 also gives a loose definition of path-match without mentioning about / check in the paths based on which Python implementation is based as a simple prefix match. > For two strings that represent paths, P1 and P2, P1 path-matches P2 > if P2 is a prefix of P1 (including the case where P1 and P2 string- > compare equal). Thus, the string /tec/waldo path-matches /tec. RFC 6265 path-match definition : https://tools.ietf.org/html/rfc6265#section-5.1.4 A request-path path-matches a given cookie-path if at least one of the following conditions holds: o The cookie-path and the request-path are identical. o The cookie-path is a prefix of the request-path, and the last character of the cookie-path is %x2F ("/"). o The cookie-path is a prefix of the request-path, and the first character of the request-path that is not included in the cookie- path is a %x2F ("/") character. The current implementation in cookiejar is as below : def path_return_ok(self, path, request): _debug("- checking cookie path=%s", path) req_path = request_path(request) if not req_path.startswith(path): _debug(" %s does not path-match %s", req_path, path) return False return True Translating the RFC 6265 steps (a literal translation of go implementation) would have something like below and no tests fail on master. So the python implementation goes in line with the RFC not passing cookies of "path=/any" to /anybody def path_return_ok(self, path, request): req_path = request_path(request) if req_path == path: return True elif req_path.startswith(path) and ((path.endswith("/") or req_path[len(path)] == "/")): return True return False The golang implementation is as below which is a literal translation of RFC 6265 steps at https://github.com/golang/go/blob/50bd1c4d4eb4fac8ddeb5f063c099daccfb71b26/src/net/http/cookiejar/jar.go#L130 // pathMatch implements "path-match" according to RFC 6265 section 5.1.4. func (e *entry) pathMatch(requestPath string) bool { if requestPath == e.Path { return true } if strings.HasPrefix(requestPath, e.Path) { if e.Path[len(e.Path)-1] == '/' { return true // The "/any/" matches "/any/path" case. } else if requestPath[len(e.Path)] == '/' { return true // The "/any" matches "/any/path" case. } } return false } Feel free to correct me if I am wrong on the above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 06:08:41 2018 From: report at bugs.python.org (Harmandeep Singh) Date: Thu, 27 Dec 2018 11:08:41 +0000 Subject: [issue13927] Extra spaces in the output of time.ctime In-Reply-To: <1328215776.48.0.974828105123.issue13927@psf.upfronthosting.co.za> Message-ID: <1545908921.78.0.149709855703.issue13927@roundup.psfhosted.org> Harmandeep Singh added the comment: I have created a PR for the patch that I submitted, as this is my first contribution to the docs, I need to know that how do we decide if a change has to make an entry to `Misc/NEWS.d/next/` or needs `skip news` tag? ---------- nosy: -docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 06:22:56 2018 From: report at bugs.python.org (jso2460) Date: Thu, 27 Dec 2018 11:22:56 +0000 Subject: [issue35590] logging.handlers.SysLogHandler with STREAM connects in constructor without timeout In-Reply-To: <1545822053.48.0.712150888896.issue35590@roundup.psfhosted.org> Message-ID: <1545909776.85.0.235469037491.issue35590@roundup.psfhosted.org> jso2460 added the comment: Yes, when timeout occurs it's then caught by the OSError -- you are completely right about that. Instead my suggestion was meant to provide an option to specify a timeout when creating an instance of SysLogHandler. Currently the socket is created with default timeout (which is AFAIK set via socket.setdefaulttimeout though this applies to the whole module and effectively affects other sockets created). In my particular use case I have the SysLog settings user-configurable, and thus sometimes it gets misconfigured. Then it is annoying to wait for a default timeout.. and there seem no way to specify the particular timeout when creating the handler. (Not speaking of the fact that SysLogHandler connects right away in __init__ call which I don't consider very reasonable but that would be a different story.) Therefore I suggest to either add new argument for timeout (as the example in my comment above), or to wrap the socket creation into a method/function which an extending class could extend/implement, e.g. by changing: sock = socket.socket(af, socktype, proto) if socktype == socket.SOCK_STREAM: sock.connect(sa) to def _create_socket(af, socktype, proto): # or adding *args, **kwargs? socket.socket(af, socktype, proto) sock = create_socket(af, socktype, proto) if socktype == socket.SOCK_STREAM: sock.connect(sa) By the way, thanks for marking the issue as enhancement. Kind of missed that when creating the issue at first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 08:36:21 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Thu, 27 Dec 2018 13:36:21 +0000 Subject: [issue35593] Register standard browser: Chrome Message-ID: <1545917779.17.0.514318907905.issue35593@roundup.psfhosted.org> New submission from Emmanuel Arias : Hi! This issue is open to discuss the PR: https://github.com/python/cpython/pull/11327 This PR propose add "chrome" on webbrowser.register_standard_browsers for windows IMO this is a reasonable new feature simply because Chrome is commonly used. ---------- components: Library (Lib) messages: 332586 nosy: eamanu priority: normal severity: normal status: open title: Register standard browser: Chrome type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 08:43:47 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 27 Dec 2018 13:43:47 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1545918227.36.0.695085825895.issue20182@roundup.psfhosted.org> Tal Einat added the comment: New changeset c6c7237272499b2c528acb5f62601421f329e92a by Tal Einat in branch 'master': bpo-20182: AC convert remaining functions/methods in _hashopenssl.c (GH-9213) https://github.com/python/cpython/commit/c6c7237272499b2c528acb5f62601421f329e92a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 08:49:32 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 27 Dec 2018 13:49:32 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1545918571.99.0.426539407247.issue20182@roundup.psfhosted.org> Tal Einat added the comment: The conversion of Modules/_hashopenssh.c leaves just Python/sysmodule.c to be converted from this batch. There's an old patch here from 3.5 years ago that will likely need to be heavily updated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 08:50:11 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 27 Dec 2018 13:50:11 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1545918611.9.0.211177626015.issue20182@roundup.psfhosted.org> Change by Tal Einat : ---------- Removed message: https://bugs.python.org/msg332588 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 08:50:37 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 27 Dec 2018 13:50:37 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1545918637.78.0.742055212218.issue20182@roundup.psfhosted.org> Tal Einat added the comment: The conversion of Modules/_hashopenssl.c leaves just Python/sysmodule.c to be converted from this batch. There's an old patch here from 3.5 years ago that will likely need to be heavily updated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 09:06:35 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 27 Dec 2018 14:06:35 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1545919595.68.0.0703263036132.issue20182@roundup.psfhosted.org> Tal Einat added the comment: New changeset c6c7237272499b2c528acb5f62601421f329e92a by Tal Einat in branch 'master': bpo-20182: AC convert remaining functions/methods in _hashopenssl.c (GH-9213) https://github.com/python/cpython/commit/c6c7237272499b2c528acb5f62601421f329e92a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 09:48:41 2018 From: report at bugs.python.org (Michael Felt) Date: Thu, 27 Dec 2018 14:48:41 +0000 Subject: [issue35189] PEP 475: fnctl functions are not retried if interrupted by a signal (EINTR) In-Reply-To: <1541681130.38.0.788709270274.issue35189@psf.upfronthosting.co.za> Message-ID: <1545922121.41.0.242075111373.issue35189@roundup.psfhosted.org> Michael Felt added the comment: The "improved" output after getting back to "latest" commit: == CPython 3.8.0a0 (heads/master-dirty:34ae04f74d, Dec 27 2018, 14:05:08) [C] == AIX-1-00C291F54C00-powerpc-32bit big-endian == cwd: /data/prj/python/python3-3.8/build/test_python_13566116 == CPU count: 8 == encodings: locale=ISO8859-1, FS=iso8859-1 Run tests sequentially 0:00:00 [1/1] test_eintr test_all (test.test_eintr.EINTRTests) ... --- run eintr_tester.py --- test_flock (__main__.FNTLEINTRTest) ... ok test_lockf (__main__.FNTLEINTRTest) ... ERROR test_read (__main__.OSEINTRTest) ... ok test_wait (__main__.OSEINTRTest) ... ok test_wait3 (__main__.OSEINTRTest) ... ok test_wait4 (__main__.OSEINTRTest) ... ok test_waitpid (__main__.OSEINTRTest) ... ok test_write (__main__.OSEINTRTest) ... ok test_devpoll (__main__.SelectEINTRTest) ... skipped 'need select.devpoll' test_epoll (__main__.SelectEINTRTest) ... skipped 'need select.epoll' test_kqueue (__main__.SelectEINTRTest) ... skipped 'need select.kqueue' test_poll (__main__.SelectEINTRTest) ... ok test_select (__main__.SelectEINTRTest) ... ok test_sigtimedwait (__main__.SignalEINTRTest) ... ok test_sigwaitinfo (__main__.SignalEINTRTest) ... ok test_accept (__main__.SocketEINTRTest) ... ok test_open (__main__.SocketEINTRTest) ... ok test_os_open (__main__.SocketEINTRTest) ... ok test_recv (__main__.SocketEINTRTest) ... ok test_recvmsg (__main__.SocketEINTRTest) ... ok test_send (__main__.SocketEINTRTest) ... ok test_sendall (__main__.SocketEINTRTest) ... ok test_sendmsg (__main__.SocketEINTRTest) ... ok test_sleep (__main__.TimeEINTRTest) ... ok ====================================================================== ERROR: test_lockf (__main__.FNTLEINTRTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/test/eintrdata/eintr_tester.py", line 522, in test_lockf self._lock(fcntl.lockf, "lockf") File "/data/prj/python/git/python3-3.8/Lib/test/eintrdata/eintr_tester.py", line 507, in _lock lock_func(f, fcntl.LOCK_EX | fcntl.LOCK_NB) PermissionError: [Errno 13] Permission denied ---------------------------------------------------------------------- Ran 24 tests in 8.822s FAILED (errors=1, skipped=3) --- eintr_tester.py completed: exit code 1 --- FAIL ====================================================================== FAIL: test_all (test.test_eintr.EINTRTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/test/test_eintr.py", line 31, in test_all self.fail("eintr_tester.py failed") AssertionError: eintr_tester.py failed ---------------------------------------------------------------------- Ran 1 test in 9.392s FAILED (failures=1) test test_eintr failed test_eintr failed == Tests result: FAILURE == 1 test failed: test_eintr Total duration: 9 sec 609 ms Tests result: FAILURE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 10:28:34 2018 From: report at bugs.python.org (Daugeras) Date: Thu, 27 Dec 2018 15:28:34 +0000 Subject: [issue35594] Python script generating Segmentation Fault Message-ID: <1545924513.31.0.604345478264.issue35594@roundup.psfhosted.org> New submission from Daugeras : Python script generates segmentation fault I cannot find the source of the problem. How is it to debug a segfault simply in Python ? Are there recommended coding practices to avoid Segmentation Faults ? I wrote a script (1600 lines) to systematically download CSV files from a source and format the collected data. The script works very well for 100-200 files, but it systematically crashes with a segmentation fault message after a while. -Crash always happens at the same spot in the script, with no understandable cause -I run it on Mac OSX but the crash also happens on Ubuntu Linux and Debian 9 -If I run the Pandas Routines that crash during my script on single files, they work properly. The crash only happens when I loop the script 100-200 times. -I checked every variable content, constructors (init) and they seem to be fine. Code is too long to be pasted, but available on demand Expected result should be execution to the end. Instead, it crashes after 100-200 iterations ---------- messages: 332592 nosy: Daugeras priority: normal severity: normal status: open title: Python script generating Segmentation Fault type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 10:50:06 2018 From: report at bugs.python.org (Scott Arciszewski) Date: Thu, 27 Dec 2018 15:50:06 +0000 Subject: [issue35595] Add sys flag to always show full paths in stack traces (instead of relative paths) Message-ID: <1545925804.0.0.366688236093.issue35595@roundup.psfhosted.org> New submission from Scott Arciszewski : I have a wsgi script writing to a log file. The contents look like this (truncated): File "build/bdist.linux-x86_64/egg/trac/ticket/query.py", line 284, in _count % sql, args)[0][0] File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 122, in execute return db.execute(query, params) File "build/bdist.linux-x86_64/egg/trac/db/util.py", line 128, in execute cursor.execute(query, params if params is not None else []) When confronted with this logfile, I have no idea where build/bdist.linux-x86_64 lives. Rather than hoping a well-timed lsof is adequate to catch the actual script path, I'd like to be able to set a sys.flag to always log the real, fullpath of the .py script either instead of, or alongside, the file path. ---------- messages: 332593 nosy: Scott Arciszewski priority: normal severity: normal status: open title: Add sys flag to always show full paths in stack traces (instead of relative paths) versions: Python 2.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:05:19 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 27 Dec 2018 16:05:19 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1545926719.11.0.341471081922.issue20182@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +10591 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:05:46 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 27 Dec 2018 16:05:46 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1545926746.61.0.657999896114.issue20182@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +10591, 10592 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:06:18 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 27 Dec 2018 16:06:18 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1545926778.33.0.924379229289.issue20182@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +10591, 10592, 10593 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:06:26 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 27 Dec 2018 16:06:26 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1545926786.89.0.258683182479.issue20182@roundup.psfhosted.org> Tal Einat added the comment: See new PR GH-11328 with updated AC conversion of Python/sysmodule.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:18:28 2018 From: report at bugs.python.org (hyu) Date: Thu, 27 Dec 2018 16:18:28 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' Message-ID: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> New submission from hyu : >python Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' There are two vcruntime140.dll with no binary diff. Date Time Attr Size Compressed Name ------------------- ----- -------- ------------ ---------------- 2018-12-10 22:06:34 ..... 80128 45532 vcruntime140.dll ... 2018-12-10 22:06:34 ..... 80128 45532 vcruntime140.dll Repeated downloads. Checked both versions: https://www.python.org/ftp/python/3.7.2/python-3.7.2-embed-amd64.zip https://www.python.org/ftp/python/3.7.2/python-3.7.2-embed-win32.zip Searched and read release and doc. Checked bugs since yesterday. ---------- messages: 332595 nosy: hyu priority: normal severity: normal status: open title: Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:19:53 2018 From: report at bugs.python.org (Fady shehata) Date: Thu, 27 Dec 2018 16:19:53 +0000 Subject: [issue35597] Bug in Python's compiler Message-ID: <1545927588.67.0.841657320947.issue35597@roundup.psfhosted.org> New submission from Fady shehata : this code is completely right , and its trace is right and give the correct result but your compiler give me an incorrect result. if we input 1010 it must give 10, the compiler give ten but uncollected ten like 11111122 and if we input 111 it's output by your compiler is 1123 ---------- components: Windows files: Capture.PNG messages: 332596 nosy: Fady shehata, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Bug in Python's compiler type: compile error versions: Python 3.7 Added file: https://bugs.python.org/file48017/Capture.PNG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:34:06 2018 From: report at bugs.python.org (Tim Peters) Date: Thu, 27 Dec 2018 16:34:06 +0000 Subject: [issue35597] Bug in Python's compiler In-Reply-To: <1545927588.67.0.841657320947.issue35597@roundup.psfhosted.org> Message-ID: <1545928446.82.0.206742839175.issue35597@roundup.psfhosted.org> Tim Peters added the comment: `input()` returns a string, not a list. For input '1010' you're effectively computing this: >>> int('1' * 8) + int('1' * 2) # = 11111111 + 11 11111122 which is the correct answer. If you want your input to be a list of integers instead of a string, try, e.g., a = input("please enter a binary integer ") a = list(map(int, a)) ---------- nosy: +tim.peters resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:34:38 2018 From: report at bugs.python.org (Tim Peters) Date: Thu, 27 Dec 2018 16:34:38 +0000 Subject: [issue35597] Bug in Python's compiler In-Reply-To: <1545927588.67.0.841657320947.issue35597@roundup.psfhosted.org> Message-ID: <1545928446.82.0.206742839175.issue35597@roundup.psfhosted.org> Tim Peters added the comment: `input()` returns a string, not a list. For input '1010' you're effectively computing this: >>> int('1' * 8) + int('1' * 2) # = 11111111 + 11 11111122 which is the correct answer. If you want your input to be a list of integers instead of a string, try, e.g., a = input("please enter a binary integer ") a = list(map(int, a)) ---------- nosy: +scoder, tim.peters resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:34:46 2018 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 27 Dec 2018 16:34:46 +0000 Subject: [issue35597] Bug in Python's compiler In-Reply-To: <1545927588.67.0.841657320947.issue35597@roundup.psfhosted.org> Message-ID: <1545928486.91.0.646356673843.issue35597@roundup.psfhosted.org> Stefan Behnel added the comment: I have no doubts that the code is right. However, your expectations might not be. Try to print the values inside of the loop, for each iteration, as well as their type. You'll likely be surprised what that gives. (In any case, this is not a bug. If you need help in understanding what's going on here, please ask on the Python mailing list, or consult a local Python meetup.) ---------- nosy: +scoder, tim.peters resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:44:44 2018 From: report at bugs.python.org (Fady shehata) Date: Thu, 27 Dec 2018 16:44:44 +0000 Subject: [issue35597] Bug in Python's compiler In-Reply-To: <1545928446.82.0.206742839175.issue35597@roundup.psfhosted.org> Message-ID: Fady shehata added the comment: you didn't understand me, look, if we put (10) in binary it will give (2) in decimal because ((0*2**0)+(1*2**1), but it gives the tow like that 11 it means if we add the digits in the result we will get the right result Virus-free. www.avast.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> On Thu, 27 Dec 2018 at 18:34, Tim Peters wrote: > > Tim Peters added the comment: > > `input()` returns a string, not a list. For input '1010' you're > effectively computing this: > > >>> int('1' * 8) + int('1' * 2) # = 11111111 + 11 > 11111122 > > which is the correct answer. If you want your input to be a list of > integers instead of a string, try, e.g., > > a = input("please enter a binary integer ") > a = list(map(int, a)) > > ---------- > nosy: +tim.peters > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:48:44 2018 From: report at bugs.python.org (Fady shehata) Date: Thu, 27 Dec 2018 16:48:44 +0000 Subject: [issue35597] Bug in Python's compiler In-Reply-To: <1545928446.82.0.206742839175.issue35597@roundup.psfhosted.org> Message-ID: Fady shehata added the comment: look at this if we input (1011) in binary it must give eleven in decimal but it gives uncollected eleven like 11111123 if we add the digits in this result we will get the right result eleven [image: Capture2.PNG] Virus-free. www.avast.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> On Thu, 27 Dec 2018 at 18:34, Tim Peters wrote: > > Tim Peters added the comment: > > `input()` returns a string, not a list. For input '1010' you're > effectively computing this: > > >>> int('1' * 8) + int('1' * 2) # = 11111111 + 11 > 11111122 > > which is the correct answer. If you want your input to be a list of > integers instead of a string, try, e.g., > > a = input("please enter a binary integer ") > a = list(map(int, a)) > > ---------- > nosy: +tim.peters > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: https://bugs.python.org/file48018/Capture2.PNG _______________________________________ Python tracker _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: Capture2.PNG Type: image/png Size: 1575 bytes Desc: not available URL: From report at bugs.python.org Thu Dec 27 11:50:13 2018 From: report at bugs.python.org (Tim Peters) Date: Thu, 27 Dec 2018 16:50:13 +0000 Subject: [issue35597] Bug in Python's compiler In-Reply-To: <1545927588.67.0.841657320947.issue35597@roundup.psfhosted.org> Message-ID: <1545929413.61.0.377250140458.issue35597@roundup.psfhosted.org> Tim Peters added the comment: Please read my answer again. Your code does not do what you _think_ it does. It does what I said it does instead. >>> a = input() 1010 >>> print(a) 1010 >>> print(type(a)) The input you're working with is NOT A LIST OF INTEGERS. It's a string of "0" and "1" CHARACTERS. And I already told you how to repair that too: >>> a = list(map(int, a)) >>> a [1, 0, 1, 0] >>> type(a) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:55:57 2018 From: report at bugs.python.org (Fady shehata) Date: Thu, 27 Dec 2018 16:55:57 +0000 Subject: [issue35597] Bug in Python's compiler In-Reply-To: <1545929413.61.0.377250140458.issue35597@roundup.psfhosted.org> Message-ID: Fady shehata added the comment: yea yea i understand you and you are right thank you and sorry for this miss understanding ? Virus-free. www.avast.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> On Thu, 27 Dec 2018 at 18:50, Tim Peters wrote: > > Tim Peters added the comment: > > Please read my answer again. Your code does not do what you _think_ it > does. It does what I said it does instead. > > >>> a = input() > 1010 > >>> print(a) > 1010 > >>> print(type(a)) > > > The input you're working with is NOT A LIST OF INTEGERS. It's a string of > "0" and "1" CHARACTERS. > > And I already told you how to repair that too: > > >>> a = list(map(int, a)) > >>> a > [1, 0, 1, 0] > >>> type(a) > > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 12:23:45 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 27 Dec 2018 17:23:45 +0000 Subject: [issue35583] (glibc2.28/MIPS32EL) python 3.7.x interpreter segmentation fault (3.6.x/2.7.x compile fine) In-Reply-To: <1545766743.84.0.712150888896.issue35583@roundup.psfhosted.org> Message-ID: <1545931425.04.0.862488354773.issue35583@roundup.psfhosted.org> Mariatta Wijaya added the comment: Your disrespectful comments and insults are not welcome here. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 12:35:37 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 27 Dec 2018 17:35:37 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1545932137.89.0.620898710466.issue35596@roundup.psfhosted.org> Change by Ned Deily : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 12:40:47 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 27 Dec 2018 17:40:47 +0000 Subject: [issue35594] Python script generating Segmentation Fault In-Reply-To: <1545924513.31.0.604345478264.issue35594@roundup.psfhosted.org> Message-ID: <1545932447.35.0.507197037262.issue35594@roundup.psfhosted.org> Ned Deily added the comment: Sorry, but without either a full traceback or code that reproduces the problem, it is impossible for us to make an intelligent guess what problem you are seeing much less suggestion a solution. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 12:45:42 2018 From: report at bugs.python.org (Gagan) Date: Thu, 27 Dec 2018 17:45:42 +0000 Subject: [issue35583] (glibc2.28/MIPS32EL) python 3.7.x interpreter segmentation fault (3.6.x/2.7.x compile fine) In-Reply-To: <1545766743.84.0.712150888896.issue35583@roundup.psfhosted.org> Message-ID: <1545932742.09.0.967475429234.issue35583@roundup.psfhosted.org> Gagan added the comment: of course you have more time to get sanctimonious than provide a substantive or insight comment as to what the problem is. i am not surprised, at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 13:28:20 2018 From: report at bugs.python.org (Daugeras) Date: Thu, 27 Dec 2018 18:28:20 +0000 Subject: [issue35594] Python script generating Segmentation Fault In-Reply-To: <1545924513.31.0.604345478264.issue35594@roundup.psfhosted.org> Message-ID: <1545935300.36.0.690571027845.issue35594@roundup.psfhosted.org> Daugeras added the comment: @Ned: Of course I understand your feed-back. I can provide a script to reproduce the crash. How can I do this ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 13:41:03 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 27 Dec 2018 18:41:03 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1545936063.5.0.594615021459.issue20182@roundup.psfhosted.org> Tal Einat added the comment: New changeset c6c7237272499b2c528acb5f62601421f329e92a by Tal Einat in branch 'master': bpo-20182: AC convert remaining functions/methods in _hashopenssl.c (GH-9213) https://github.com/python/cpython/commit/c6c7237272499b2c528acb5f62601421f329e92a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 13:41:27 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 27 Dec 2018 18:41:27 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1545936087.54.0.297160241871.issue20182@roundup.psfhosted.org> Tal Einat added the comment: New changeset c6c7237272499b2c528acb5f62601421f329e92a by Tal Einat in branch 'master': bpo-20182: AC convert remaining functions/methods in _hashopenssl.c (GH-9213) https://github.com/python/cpython/commit/c6c7237272499b2c528acb5f62601421f329e92a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 14:04:16 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 27 Dec 2018 19:04:16 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1545937456.3.0.256560017892.issue20182@roundup.psfhosted.org> Tal Einat added the comment: New changeset c6c7237272499b2c528acb5f62601421f329e92a by Tal Einat in branch 'master': bpo-20182: AC convert remaining functions/methods in _hashopenssl.c (GH-9213) https://github.com/python/cpython/commit/c6c7237272499b2c528acb5f62601421f329e92a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 14:08:23 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 27 Dec 2018 19:08:23 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1545937703.8.0.536560126838.issue35596@roundup.psfhosted.org> Steve Dower added the comment: Have you tried a proper install as well? Could you do that to rule out any problem on your machine? Are you repackaging anything as part of your app, or are you just testing the package first and getting this error? It looks like you're running from the directory you extracted to. Is there anything else in that directory or just the Python files? When you say there are two vcruntime140.dll, you mean one in each package and they're the same? That might be a problem, but it wouldn't show up like this, so I don't think it's yours. I'm not in A position to check the files right now but I'll get to it later ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:03:08 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 27 Dec 2018 20:03:08 +0000 Subject: [issue35594] Python script generating Segmentation Fault In-Reply-To: <1545924513.31.0.604345478264.issue35594@roundup.psfhosted.org> Message-ID: <1545940988.56.0.511302030657.issue35594@roundup.psfhosted.org> Ned Deily added the comment: You can either paste or upload a file (click on the "Choose File" button above in the web page) with code or with crash info. For crash info, depending on the platform, there may be a Python traceback displayed in the shell session and there may be some sort of system-generated crash report, for example, on macOS, you might find them in ~/Library/Logs. You should also include information about the platform (os, os version) and the Python version in use. With recent versions of Python and if tests are installed, you can get all the configuration information with one command, for example: python3.7 -m test.pythoninfo ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:16:24 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 27 Dec 2018 20:16:24 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1545941784.71.0.104344810484.issue35596@roundup.psfhosted.org> Steve Dower added the comment: Okay, this looks like a zipimport issue. When I extract the "python37.zip" file containing the stdlib and reference the directory it works fine. But no matter what I do to the ZIP I can't get it to run. It seems that zipimport either can't import .pyc files without a matching .py, or it can't import packages marked with __init__.pyc (I haven't gone deep enough, but adding encodings/__init__.py got me further). This is a regression from 3.7.1. Things to do: * fix the regression (Serhiy?) * add a regression test * add a ".pyc-only stdlib in ZIP" test (I'll do this) * remove the double vcruntime in ZIP issue (unrelated, so I'll just fix it) ---------- nosy: +ned.deily, serhiy.storchaka priority: normal -> release blocker stage: -> test needed type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:23:21 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 27 Dec 2018 20:23:21 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1545942201.14.0.136229910942.issue35402@roundup.psfhosted.org> Ned Deily added the comment: New changeset c540c4ec611246da0c1900fe11a807a54f5c2a0c by Ned Deily in branch '2.7': Revert "bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101)" https://github.com/python/cpython/commit/c540c4ec611246da0c1900fe11a807a54f5c2a0c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:26:29 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 27 Dec 2018 20:26:29 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1545942389.34.0.943498480509.issue35596@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +10594 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:26:51 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 27 Dec 2018 20:26:51 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1545942411.26.0.0696055667111.issue35596@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch, patch pull_requests: +10594, 10595 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:27:09 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 27 Dec 2018 20:27:09 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1545942429.47.0.471170791551.issue35596@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch, patch, patch pull_requests: +10594, 10595, 10596 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:27:58 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 27 Dec 2018 20:27:58 +0000 Subject: [issue35598] IDLE: Modernize config_key module Message-ID: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> New submission from Cheryl Sabella : * Apply PEP8 naming convention. * Add additional tests to get coverage (close?) to 100%. * Update to more meaningful names. * Switch to ttk widgets and revise imports. * Split toplevel class into a window class and frame class(es). ---------- assignee: terry.reedy components: IDLE messages: 332614 nosy: cheryl.sabella, terry.reedy priority: normal severity: normal status: open title: IDLE: Modernize config_key module type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:33:31 2018 From: report at bugs.python.org (hyu) Date: Thu, 27 Dec 2018 20:33:31 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1545942811.4.0.350601831306.issue35596@roundup.psfhosted.org> hyu added the comment: Repeated on two clean install Windows hosts. No (re)packaging, download and run/start python. Repeated with versions 3.7.2, 3.7.1, and 3.6.8: https://www.python.org/ftp/python/3.7.2/python-3.7.2-embed-amd64.zip https://www.python.org/ftp/python/3.7.1/python-3.7.1-embed-amd64.zip https://www.python.org/ftp/python/3.6.8/python-3.6.8-embed-amd64.zip Windows Explorer properly extracted: \tmp\py372, \tmp\py371, \tmp\py368. Python 3.6.8 and 3.7.1 properly started, executed import sys; sys.exit() Python 3.7.2 failed to start. Please suggest proper commands if you claim these are not proper Windows commands. Worked extra to show both 3.6 and 3.7 regressions. If you want to claim copying 3.6.8 vcruntime140.dll to 3.7.1 as (re)packaging, then ignore v3.7.1:260ec2c36a below. Windows Explorer shows and 7-zip lists two vcruntime140.dll in 3.7.2. Please ignore 7-zip if you claim that is not proper or (re)package tool and I will attach Windows Explorer screen shot. Microsoft Windows [Version 10.0.17763.195] (c) 2018 Microsoft Corporation. All rights reserved. C:\>\tmp\py368\python Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] on win32 >>> import sys; sys.exit() C:\>\tmp\py372\python Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' Current thread 0x00002614 (most recent call first): C:\>copy \tmp\py368\vcruntime140.dll \tmp\py371\ 1 file(s) copied. C:\>\tmp\py371\python Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)] on win32 >>> import sys; sys.exit() C:\> ---------- nosy: -serhiy.storchaka type: crash -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:39:53 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 27 Dec 2018 20:39:53 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1545943193.12.0.677753149062.issue35596@roundup.psfhosted.org> Steve Dower added the comment: Thanks for the extra info, and for confirming that 3.6.8 isn't affected (I hadn't tried that you, so you saved me some work :) ) This is definitely a new zipimport regression in 3.7.2. Thanks for the report. ---------- keywords: +3.7regression -patch, patch versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:42:53 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 27 Dec 2018 20:42:53 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1545943373.27.0.503583651617.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +10597 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:43:10 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 27 Dec 2018 20:43:10 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1545943390.39.0.174232553764.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- keywords: +patch, patch pull_requests: +10597, 10598 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:43:19 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 27 Dec 2018 20:43:19 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1545943399.18.0.946868378342.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- keywords: +patch, patch, patch pull_requests: +10597, 10598, 10599 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:43:50 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 27 Dec 2018 20:43:50 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1545943430.21.0.387579440247.issue35598@roundup.psfhosted.org> Cheryl Sabella added the comment: PR11330 is for the PEP8 naming conventions. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:44:29 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 27 Dec 2018 20:44:29 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1545943469.57.0.132494039518.issue35596@roundup.psfhosted.org> miss-islington added the comment: New changeset 59c2aa25ffc864bf11bf3b3973828f00e268a992 by Miss Islington (bot) (Steve Dower) in branch 'master': bpo-35596: Fix vcruntime140.dll being added to embeddable distro multiple times. (GH-11329) https://github.com/python/cpython/commit/59c2aa25ffc864bf11bf3b3973828f00e268a992 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:44:49 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 27 Dec 2018 20:44:49 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1545943489.49.0.347333174212.issue35596@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch pull_requests: +10600 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:44:58 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 27 Dec 2018 20:44:58 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1545943498.83.0.0157137838809.issue35596@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch, patch pull_requests: +10600, 10601 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:45:07 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 27 Dec 2018 20:45:07 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1545943507.07.0.940181077828.issue35596@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch, patch, patch pull_requests: +10600, 10601, 10602 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:48:41 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 27 Dec 2018 20:48:41 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1545943721.91.0.173389130254.issue35402@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +10603 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:49:22 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 27 Dec 2018 20:49:22 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1545943762.46.0.903484381536.issue35402@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +10603, 10604 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 15:49:44 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 27 Dec 2018 20:49:44 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1545943784.1.0.845167243732.issue35402@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +10603, 10605 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 16:02:16 2018 From: report at bugs.python.org (Daugeras) Date: Thu, 27 Dec 2018 21:02:16 +0000 Subject: [issue35594] Python script generating Segmentation Fault In-Reply-To: <1545924513.31.0.604345478264.issue35594@roundup.psfhosted.org> Message-ID: <1545944536.73.0.937137098368.issue35594@roundup.psfhosted.org> Daugeras added the comment: File Attached. To replicate the bug, you have to create directories for files to load (CF config data at the start of the script). The bug happens after 100-200 files are downloaded. ---------- Added file: https://bugs.python.org/file48019/SegfaultMinBugReplication.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 16:13:35 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 27 Dec 2018 21:13:35 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1545945215.13.0.15631850405.issue35402@roundup.psfhosted.org> miss-islington added the comment: New changeset a936639b22ca548c00690de6a2964f223f6787cb by Miss Islington (bot) (Ned Deily) in branch 'master': Revert "bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101)" (GH-11332) https://github.com/python/cpython/commit/a936639b22ca548c00690de6a2964f223f6787cb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 16:22:40 2018 From: report at bugs.python.org (Ken Williams) Date: Thu, 27 Dec 2018 21:22:40 +0000 Subject: [issue8538] Add FlagAction to argparse In-Reply-To: <1272303487.22.0.380388489779.issue8538@psf.upfronthosting.co.za> Message-ID: <1545945760.94.0.769174021388.issue8538@roundup.psfhosted.org> Ken Williams added the comment: @vstinner - I don't think that conclusion is correct, here is a very highly-upvoted answer on SO that indicates a lot of people are still looking for this: https://stackoverflow.com/a/15008806/169947 I myself asked a related (more focused?) question where I was directed here: https://stackoverflow.com/q/53937481/169947 I'm guessing the right thing to do now would be refocus the merge request in a new ticket - is this still the right tracker? ---------- nosy: +Ken Williams _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 16:38:39 2018 From: report at bugs.python.org (Yaniv Aknin) Date: Thu, 27 Dec 2018 21:38:39 +0000 Subject: [issue8538] Add FlagAction to argparse In-Reply-To: <1272303487.22.0.380388489779.issue8538@psf.upfronthosting.co.za> Message-ID: <1545946719.1.0.731410279765.issue8538@roundup.psfhosted.org> Change by Yaniv Aknin : ---------- nosy: -Yaniv.Aknin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 16:51:48 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 27 Dec 2018 21:51:48 +0000 Subject: [issue35595] Add sys flag to always show full paths in stack traces (instead of relative paths) In-Reply-To: <1545925804.0.0.366688236093.issue35595@roundup.psfhosted.org> Message-ID: <1545947508.05.0.662544915996.issue35595@roundup.psfhosted.org> Steven D'Aprano added the comment: Python 2.7 is (almost) end of life and well beyond feature-freeze, so this can only go into 3.8 or better. Since the paths logged are relative to the current working directory, perhaps you could just have your script log the working directory? ---------- nosy: +steven.daprano type: -> enhancement versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 16:58:12 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 27 Dec 2018 21:58:12 +0000 Subject: [issue35597] Bug in Python's compiler In-Reply-To: <1545927588.67.0.841657320947.issue35597@roundup.psfhosted.org> Message-ID: <1545947892.82.0.264971220818.issue35597@roundup.psfhosted.org> Steven D'Aprano added the comment: For future reference, please don't give screen shots when reporting bugs. Code is text, and we don't edit code with Photoshop. Copy and paste the text, don't take a screen shot. Screen shots make it impossible to run the code, and they are difficult for the blind and visually impaired who are using a screen-reader. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 17:14:12 2018 From: report at bugs.python.org (Michael Felt) Date: Thu, 27 Dec 2018 22:14:12 +0000 Subject: [issue35189] PEP 475: fnctl functions are not retried if interrupted by a signal (EINTR) In-Reply-To: <1545922121.41.0.242075111373.issue35189@roundup.psfhosted.org> Message-ID: <9c1f1132-9fa3-601a-ff25-90913d650db0@felt.demon.nl> Michael Felt added the comment: On 27/12/2018 15:48, Michael Felt wrote: > Michael Felt added the comment: > > The "improved" output after getting back to "latest" commit: > > == CPython 3.8.0a0 (heads/master-dirty:34ae04f74d, Dec 27 2018, 14:05:08) [C] > == AIX-1-00C291F54C00-powerpc-32bit big-endian > == cwd: /data/prj/python/python3-3.8/build/test_python_13566116 > == CPU count: 8 > == encodings: locale=ISO8859-1, FS=iso8859-1 > Run tests sequentially > 0:00:00 [1/1] test_eintr > test_all (test.test_eintr.EINTRTests) ... > --- run eintr_tester.py --- > test_flock (__main__.FNTLEINTRTest) ... ok > test_lockf (__main__.FNTLEINTRTest) ... ERROR > test_read (__main__.OSEINTRTest) ... ok > test_wait (__main__.OSEINTRTest) ... ok > test_wait3 (__main__.OSEINTRTest) ... ok > test_wait4 (__main__.OSEINTRTest) ... ok > test_waitpid (__main__.OSEINTRTest) ... ok > test_write (__main__.OSEINTRTest) ... ok > test_devpoll (__main__.SelectEINTRTest) ... skipped 'need select.devpoll' > test_epoll (__main__.SelectEINTRTest) ... skipped 'need select.epoll' > test_kqueue (__main__.SelectEINTRTest) ... skipped 'need select.kqueue' > test_poll (__main__.SelectEINTRTest) ... ok > test_select (__main__.SelectEINTRTest) ... ok > test_sigtimedwait (__main__.SignalEINTRTest) ... ok > test_sigwaitinfo (__main__.SignalEINTRTest) ... ok > test_accept (__main__.SocketEINTRTest) ... ok > test_open (__main__.SocketEINTRTest) ... ok > test_os_open (__main__.SocketEINTRTest) ... ok > test_recv (__main__.SocketEINTRTest) ... ok > test_recvmsg (__main__.SocketEINTRTest) ... ok > test_send (__main__.SocketEINTRTest) ... ok > test_sendall (__main__.SocketEINTRTest) ... ok > test_sendmsg (__main__.SocketEINTRTest) ... ok > test_sleep (__main__.TimeEINTRTest) ... ok > > ====================================================================== > ERROR: test_lockf (__main__.FNTLEINTRTest) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/data/prj/python/git/python3-3.8/Lib/test/eintrdata/eintr_tester.py", line 522, in test_lockf > self._lock(fcntl.lockf, "lockf") > File "/data/prj/python/git/python3-3.8/Lib/test/eintrdata/eintr_tester.py", line 507, in _lock > lock_func(f, fcntl.LOCK_EX | fcntl.LOCK_NB) > PermissionError: [Errno 13] Permission denied > > ---------------------------------------------------------------------- > Ran 24 tests in 8.822s > > FAILED (errors=1, skipped=3) > --- eintr_tester.py completed: exit code 1 --- > FAIL > > ====================================================================== > FAIL: test_all (test.test_eintr.EINTRTests) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/data/prj/python/git/python3-3.8/Lib/test/test_eintr.py", line 31, in test_all > self.fail("eintr_tester.py failed") > AssertionError: eintr_tester.py failed > > ---------------------------------------------------------------------- > > Ran 1 test in 9.392s > > FAILED (failures=1) > test test_eintr failed > test_eintr failed > > == Tests result: FAILURE == > > 1 test failed: > test_eintr > > Total duration: 9 sec 609 ms > Tests result: FAILURE > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > I have been doing reading and debugging. Question: does mode "wb" imply also open for reading? Both Freebsd and AIX man pages specify that a file needs to be open for a shared lock to even be considered. Further, AIX talks about "enforced" and "advisory" locks, as well as "read" and "write" locks. In much older documentation I recall the names "simple" and "complex" locks. From memory, advisory (aka simple) locks tend to be exclusive in nature. Shared is only for reading, writing is always exclusive. I'll have to dig for how "wait" is actually handled - and work to not confuse "in memory" locks (for multi-threaded locking of variables) with "file-locking". Regards, Michael ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 17:34:51 2018 From: report at bugs.python.org (paul j3) Date: Thu, 27 Dec 2018 22:34:51 +0000 Subject: [issue8538] Add FlagAction to argparse In-Reply-To: <1272303487.22.0.380388489779.issue8538@psf.upfronthosting.co.za> Message-ID: <1545950091.68.0.882279994395.issue8538@roundup.psfhosted.org> paul j3 added the comment: Let me highlight something about https://stackoverflow.com/a/15008806/169947 The original question was how to implement an Action that accepts 'True' or 'False' as an argument. Users often try `type=bool`, which doesn't work because of the normal behavior of the Python bool(astr) function. That's been the subject of several other bug/issues. https://bugs.python.org/issue14392 https://bugs.python.org/issue26994 https://bugs.python.org/issue24754 https://bugs.python.org/issue21208 My answer in that SO question is https://stackoverflow.com/a/19233287/901925 ---- @mgilson's answer proposes a '--foo', '--no-foo' alternative. That is in line with this bug/issue. parser.add_argument('--feature', dest='feature', action='store_true') parser.add_argument('--no-feature', dest='feature', action='store_false') parser.set_defaults(feature=True) So the question here is whether mgilson's simple answer is enough, or do we need to add Eric's ConfigureAction class? On a casual reading the patch proposed here shouldn't have backward compatibility issues, since it is an addon class, and doesn't modify existing classes. But it lacks tests and documentation. Documentation for argparse is a tough issue. While advanced users want more features and more documented details, most of the SO questions come from beginners, who's eyes glaze over when they read the existing documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 17:44:33 2018 From: report at bugs.python.org (Eryk Sun) Date: Thu, 27 Dec 2018 22:44:33 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1545950673.27.0.50406629007.issue35596@roundup.psfhosted.org> Change by Eryk Sun : ---------- nosy: +serhiy.storchaka stage: patch review -> test needed type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 18:11:44 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 27 Dec 2018 23:11:44 +0000 Subject: [issue21524] Allowing to pass pathlib.Path object in mimetypes.guess_type function Message-ID: <1545952304.96.0.582913013214.issue21524@roundup.psfhosted.org> New submission from Cheryl Sabella : This was implemented in #34926. ---------- nosy: +cheryl.sabella resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Allow querying a Path's mime-type versions: +Python 3.8 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 18:19:19 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 27 Dec 2018 23:19:19 +0000 Subject: [issue8538] Add FlagAction to argparse In-Reply-To: <1272303487.22.0.380388489779.issue8538@psf.upfronthosting.co.za> Message-ID: <1545952759.72.0.0993085549255.issue8538@roundup.psfhosted.org> Eric V. Smith added the comment: Yes, this is the correct bug tracker. And note that this code isn't mine, I just posted it here so it wouldn't be lost. It looks like the original message was from https://mail.python.org/pipermail/python-dev/2010-April/099704.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 18:36:34 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 27 Dec 2018 23:36:34 +0000 Subject: [issue31440] wrong default module search path in help message In-Reply-To: <1505289671.44.0.835447541181.issue31440@psf.upfronthosting.co.za> Message-ID: <1545953794.3.0.182114370158.issue31440@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 19:04:25 2018 From: report at bugs.python.org (Ken Williams) Date: Fri, 28 Dec 2018 00:04:25 +0000 Subject: [issue8538] Add FlagAction to argparse In-Reply-To: <1272303487.22.0.380388489779.issue8538@psf.upfronthosting.co.za> Message-ID: <1545955465.21.0.576519756666.issue8538@roundup.psfhosted.org> Ken Williams added the comment: Thanks, Paul and Eric, for your very quick replies. You're quite correct, the original question in https://stackoverflow.com/a/15008806/169947 is indeed hoping for `--foo TRUE` and `--foo False` etc. to work. Personally I don't like that as much as the GNU-style `--foo` and `--no-foo` technique, because when you let people type `TRUE` or `True` or `T` or `1`, etc., it gets a bit confusing about exactly what is accepted as a true value, what's false, is a zero interpreted as 0 or "0", whether a failure to parse the value as True or False will be reported as an error or not, and so on. The user typically can't really know these answers without reading the actual code, or running it to see what generates an error (or triggers whatever behavior they're looking for), which is certainly not ideal. By contrast, with `--foo` and `--no-foo`, the options are strict and clear. And supplying an argument will trigger a parse failure. For @mgilson's proposal, I think the main thing I find unsatisfactory (besides the fact that it takes 3 lines to define, and I'll have to come back to that SO answer every time to make sure I get them right...) is that the `--help` output can't be made clear. With the following specification: parser.add_argument('--foo', dest='foo', help="Do foo", action='store_true') parser.add_argument('--no-foo', dest='foo', help="Don't foo", action='store_false') parser.set_defaults(foo=True) we get the following --help text (when using ArgumentDefaultsHelpFormatter): --foo Do foo (default: True) --no-foo Don't foo (default: True) and that last line seems to be a contradiction, or at least very confusing. The only alternative I see is to turn off ArgumentDefaultsHelpFormatter, but I think the defaults are generally helpful information for the user. To fix that --help issue seems to require quite a bit more complicated registration of arguments, so it's probably not going to happen in most people's scripts. I should be clear: I haven't vetted the `argparse_bool.py` proposal in detail either, so I'm not specifically asking for it to be adopted. Just hoping for a nice resolution to the `--foo` `--no-foo` issue that codifies best-practices in a way that makes it trivial to get nice behavior in scripts. As for documentation - I had poked around in the code a bit and seen the `register` method, but I thought since it wasn't documented, I'd better not use it. Is it for public consumption? If so, I'd say it's better documented than undocumented, even if it provides more info than most people need. My guess is that enough people are probably using it to make it impossible to eliminate, which is a good test for whether something should be documented too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 19:50:33 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 28 Dec 2018 00:50:33 +0000 Subject: [issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1 In-Reply-To: <1543908160.05.0.788709270274.issue35402@psf.upfronthosting.co.za> Message-ID: <1545958233.82.0.655292594592.issue35402@roundup.psfhosted.org> Ned Deily added the comment: See discussion in Issue35485. Regressions were found on macOS with Tk 8.6.9.1 and with the more recent Tk 8.6 maintenance branch top of trunk. So for python.org macOS installers, we have reverted to Tcl/Tk 8.6.8. Windows builds will continue to use 8.6.9 unless problems are found. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Mac: tkinter windows turn black while resized _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 20:04:11 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 01:04:11 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1545959051.13.0.559389740479.issue35596@roundup.psfhosted.org> miss-islington added the comment: New changeset bbf695441af9def8a121ff3e245415d9fc0bab9a by Miss Islington (bot) in branch '3.7': bpo-35596: Fix vcruntime140.dll being added to embeddable distro multiple times. (GH-11329) https://github.com/python/cpython/commit/bbf695441af9def8a121ff3e245415d9fc0bab9a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 20:04:40 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 28 Dec 2018 01:04:40 +0000 Subject: [issue35587] Python 3.7.2 Embed - zipimport.ZipImportError (Cannot load python37.zip) In-Reply-To: <1545798094.3.0.712150888896.issue35587@roundup.psfhosted.org> Message-ID: <1545959080.17.0.295043346202.issue35587@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This seems to be related to issue35596. ---------- nosy: +serhiy.storchaka, steve.dower, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 20:22:05 2018 From: report at bugs.python.org (Jeff Robbins) Date: Fri, 28 Dec 2018 01:22:05 +0000 Subject: [issue35599] asyncio windows_events.py IocpProactor bug Message-ID: <1545960124.09.0.284140631848.issue35599@roundup.psfhosted.org> New submission from Jeff Robbins : The close() method of IocpProactor in windows_events.py has this code in its close() method: while self._cache: if not self._poll(1): logger.debug('taking long time to close proactor') The bug is that self._poll() has *no* return statements in it, and so returns None no matter what. Which makes the "if not" part confusing, at best. At worst, it might reflect a disconnect with the author's intent. I added a bit more logging and re-ran my test: while self._cache: logger.debug('before self._poll(1)') if not self._poll(1): logger.debug('taking long time to close proactor') logger.debug(f'{self._cache}') logger output: 20:16:30.247 (D) MainThread asyncio: before self._poll(1) 20:16:30.248 (D) MainThread asyncio: taking long time to close proactor 20:16:30.249 (D) MainThread asyncio: {} Obviously 1 millisecond isn't "taking a long time to close proactor". Also of interest, the _cache is now empty. I think the intent of the author must have been to check if the call to ._poll() cleared out any possible pending futures, or waited the full 1 second. Since ._poll() doesn't return any value to differentiate if it waited the full wait period or not, the "if" is wrong, and, I think, the intent of the author isn't met by this code. But, separate from speculating on "intent", the debug output of "taking a long time to close proactor" seems wrong, and the .close() code seems disassociated with the implementation of ._poll() in the same class IocpProactor in windows_events.py. ---------- components: asyncio messages: 332632 nosy: asvetlov, jeffr at livedata.com, yselivanov priority: normal severity: normal status: open title: asyncio windows_events.py IocpProactor bug versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 20:53:12 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 01:53:12 +0000 Subject: [issue28097] IDLE: document all key bindings, add menu items for more. In-Reply-To: <1473663810.99.0.66873909958.issue28097@psf.upfronthosting.co.za> Message-ID: <1545961992.92.0.545956103445.issue28097@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.7, Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 20:53:20 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 01:53:20 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1545962000.6.0.84760872378.issue35598@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10599 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 20:53:36 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 01:53:36 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1545962016.22.0.913639299734.issue35598@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10598 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:47:07 2018 From: report at bugs.python.org (Dima Tisnek) Date: Fri, 28 Dec 2018 02:47:07 +0000 Subject: [issue35600] Expose siphash Message-ID: <1545965225.21.0.451953823903.issue35600@roundup.psfhosted.org> New submission from Dima Tisnek : Just recently, i found rolling my own simple hash for strings. (task was to distribute tests across executors, stably across invocations, no external input, no security) In the old days I'd just `hash(some_variable)` but of course now I cannot. `hashlib.sha*` seemed too complex and I ended up with something like `sum(map(ord, str(some_variable)))`. How much easier this would be is `siphash` implementation that cpython uses internally was available to me! ---------- components: Extension Modules messages: 332633 nosy: Dima.Tisnek priority: normal severity: normal status: open title: Expose siphash type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:06:05 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 03:06:05 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1545966365.83.0.965982346816.issue35598@roundup.psfhosted.org> Terry J. Reedy added the comment: I am going to merge on the presumption that you will follow through at least with more tests. Currently missing other than mac-code, according to coverage output: switch from 'advanced to basic and calls to final_key_selected, build_key_string, get_modifiers, and translate_key. The last should become a standalone function. I believe I have encountered a bug. Change a key binding. Cancel. Re-open config dialog. Try to change back. It says original binding is in use -- which it is if one closes IDLE and reopens, or opens a different instance. It seems that cancel is not properly undoing the temporary change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:06:16 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 03:06:16 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1545966376.91.0.0131420758536.issue35598@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:19:36 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 03:19:36 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1545967176.56.0.579096854688.issue35598@roundup.psfhosted.org> Terry J. Reedy added the comment: If you submit further PRs for this issue, the blurb will need to be changed as blurbs are for issues, not PRs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:27:18 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 03:27:18 +0000 Subject: [issue28097] IDLE: document all key bindings, add menu items for more. In-Reply-To: <1473663810.99.0.66873909958.issue28097@psf.upfronthosting.co.za> Message-ID: <1545967638.91.0.0232646490316.issue28097@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10590 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:27:31 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 03:27:31 +0000 Subject: [issue28097] IDLE: document all key bindings, add menu items for more. In-Reply-To: <1473663810.99.0.66873909958.issue28097@psf.upfronthosting.co.za> Message-ID: <1545967651.81.0.357184214125.issue28097@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10589 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:35:20 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 28 Dec 2018 03:35:20 +0000 Subject: [issue35600] Expose siphash In-Reply-To: <1545965225.21.0.451953823903.issue35600@roundup.psfhosted.org> Message-ID: <1545968119.99.0.931531567008.issue35600@roundup.psfhosted.org> Steven D'Aprano added the comment: > In the old days I'd just `hash(some_variable)` but of course now I cannot. I'm sorry, I don't understand... why can't you? py> text = "NOBODY expects the Spanish Inquisition!" py> hash(text) 1245575277 There's also this: py> hashlib.md5(text.encode('utf-8')).digest() b'@\xfb[&\t]\x9c\xc0\xc5\xfcvH\xe8:\x1b]' although it might be a bit expensive if you don't care about security and too weak if you do. Can you explain why hash() isn't suitable? For what's its worth, I wouldn't use sum() to generate a hash since it may be unbounded and may not be "mixed up" enough. If you can't hash a string, perhaps you can hash a tuple of ints? py> hash(tuple(map(ord, text))) -816773268 py> hash(tuple(map(ord, text+"\0"))) 667761418 ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:38:09 2018 From: report at bugs.python.org (Vladimir Matveev) Date: Fri, 28 Dec 2018 03:38:09 +0000 Subject: [issue35568] Expose the C raise() function in the signal module, for use on Windows In-Reply-To: <1545537356.71.0.0770528567349.issue35568@roundup.psfhosted.org> Message-ID: <1545968289.85.0.224234462019.issue35568@roundup.psfhosted.org> Change by Vladimir Matveev : ---------- keywords: +patch pull_requests: +10606 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:38:25 2018 From: report at bugs.python.org (Vladimir Matveev) Date: Fri, 28 Dec 2018 03:38:25 +0000 Subject: [issue35568] Expose the C raise() function in the signal module, for use on Windows In-Reply-To: <1545537356.71.0.0770528567349.issue35568@roundup.psfhosted.org> Message-ID: <1545968305.02.0.260152152502.issue35568@roundup.psfhosted.org> Change by Vladimir Matveev : ---------- keywords: +patch, patch pull_requests: +10606, 10607 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:38:39 2018 From: report at bugs.python.org (Vladimir Matveev) Date: Fri, 28 Dec 2018 03:38:39 +0000 Subject: [issue35568] Expose the C raise() function in the signal module, for use on Windows In-Reply-To: <1545537356.71.0.0770528567349.issue35568@roundup.psfhosted.org> Message-ID: <1545968319.99.0.694593755227.issue35568@roundup.psfhosted.org> Change by Vladimir Matveev : ---------- keywords: +patch, patch, patch pull_requests: +10606, 10607, 10608 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:46:00 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 28 Dec 2018 03:46:00 +0000 Subject: [issue35601] Race condition in test_signal_handling_args x86-64 High Sierra 3.75 Message-ID: <1545968759.07.0.590219498678.issue35601@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : There is a race condition in FAIL: test_signal_handling_args (test.test_asyncio.test_events.KqueueEventLoopTests) in macOS: https://buildbot.python.org/all/#/builders/147/builds/546/steps/4/logs/stdio ====================================================================== FAIL: test_signal_handling_args (test.test_asyncio.test_events.KqueueEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.7.billenstein-sierra/build/Lib/test/test_asyncio/test_events.py", line 595, in test_signal_handling_args self.assertEqual(caught, 1) AssertionError: 0 != 1 It seems that SIGALRM is never received in the 0.5 seconds of timeout: def test_signal_handling_args(self): some_args = (42,) caught = 0 def my_handler(*args): nonlocal caught caught += 1 self.assertEqual(args, some_args) self.loop.add_signal_handler(signal.SIGALRM, my_handler, *some_args) signal.setitimer(signal.ITIMER_REAL, 0.1, 0) # Send SIGALRM once. self.loop.call_later(0.5, self.loop.stop) self.loop.run_forever() self.assertEqual(caught, 1) Maybe we should set up a much bigger timeout and make the handle stop the event loop. ---------- components: Tests, asyncio, macOS messages: 332637 nosy: asvetlov, ned.deily, pablogsal, ronaldoussoren, yselivanov priority: normal severity: normal status: open title: Race condition in test_signal_handling_args x86-64 High Sierra 3.75 type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:47:57 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 03:47:57 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1545968877.95.0.133984878671.issue35598@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 55698cc39549523cafc13cc8dd47960d8f73a59f by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-35598: IDLE: Update config_key.py with PEP8 names (GH-11330) https://github.com/python/cpython/commit/55698cc39549523cafc13cc8dd47960d8f73a59f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:48:13 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 03:48:13 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1545968893.77.0.078970009682.issue35598@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10609 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:48:19 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 03:48:19 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1545968899.1.0.880154135606.issue35598@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10609, 10610 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:48:25 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 03:48:25 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1545968905.7.0.792172080001.issue35598@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10609, 10610, 10611 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:52:24 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 28 Dec 2018 03:52:24 +0000 Subject: [issue35601] Race condition in test_signal_handling_args x86-64 High Sierra 3.75 In-Reply-To: <1545968759.07.0.590219498678.issue35601@roundup.psfhosted.org> Message-ID: <1545969144.13.0.547610699165.issue35601@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +10612 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:52:35 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 28 Dec 2018 03:52:35 +0000 Subject: [issue35601] Race condition in test_signal_handling_args x86-64 High Sierra 3.75 In-Reply-To: <1545968759.07.0.590219498678.issue35601@roundup.psfhosted.org> Message-ID: <1545969155.17.0.211479221147.issue35601@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch, patch pull_requests: +10612, 10613 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:52:46 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 28 Dec 2018 03:52:46 +0000 Subject: [issue35601] Race condition in test_signal_handling_args x86-64 High Sierra 3.75 In-Reply-To: <1545968759.07.0.590219498678.issue35601@roundup.psfhosted.org> Message-ID: <1545969166.96.0.451416810713.issue35601@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch, patch, patch pull_requests: +10612, 10613, 10614 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 23:04:26 2018 From: report at bugs.python.org (Dima Tisnek) Date: Fri, 28 Dec 2018 04:04:26 +0000 Subject: [issue35600] Expose siphash In-Reply-To: <1545965225.21.0.451953823903.issue35600@roundup.psfhosted.org> Message-ID: <1545969866.26.0.69260487679.issue35600@roundup.psfhosted.org> Dima Tisnek added the comment: Steven, my requirement calls for same hash on multiple machines. Python's hash (for strings) is keyed with a random value. You are correct that `hash(tuple(map(ord, str(something))))` is stable. In the worst case, I could override `PYTHONHASHSEED` globally. I suppose this relegates my suggestion to "why not" or "because we can" category. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 23:08:05 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 04:08:05 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1545970085.31.0.130787443207.issue35598@roundup.psfhosted.org> miss-islington added the comment: New changeset 4c7f34f73d2d16303798fc4a7043e641cee58e51 by Miss Islington (bot) in branch '3.7': bpo-35598: IDLE: Update config_key.py with PEP8 names (GH-11330) https://github.com/python/cpython/commit/4c7f34f73d2d16303798fc4a7043e641cee58e51 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 23:08:31 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 04:08:31 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1545970111.55.0.629560693521.issue35598@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10611 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 23:08:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 04:08:44 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1545970124.66.0.375640207574.issue35598@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10610 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 23:17:43 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 04:17:43 +0000 Subject: [issue28097] IDLE: document all key bindings, add menu items for more. In-Reply-To: <1473663810.99.0.66873909958.issue28097@psf.upfronthosting.co.za> Message-ID: <1545970663.03.0.706375304332.issue28097@roundup.psfhosted.org> Terry J. Reedy added the comment: Response to history issues raised in PR: 1. Not erasing output/history is a feature: some shells save and restore recent history when close and open. Shell restart is an alternative to that. I fairly often replay statements after restart. 2. I think turning off cycling is feature bloat. (I never do so for search.) 3. The one history feature that multiple people have asked for, on another issue, is retrieval with up/down arrow, as seems to be standard. I now agree. For items going under edit, which is already 'full', submenus will be needed. Since history is Shell only, separate entries are ok, at least for now, instead of 'History' and a submenu with 'previous' and 'next'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 23:21:51 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 28 Dec 2018 04:21:51 +0000 Subject: [issue35602] cleanup code may fail in test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests Message-ID: <1545970910.26.0.567308733358.issue35602@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : According to this buildbot: https://buildbot.python.org/all/#/builders/170/builds/218/steps/4/logs/stdio there is some cleanup failure in test_sock_sendfile_os_error_first_call: test_sock_sendfile_os_error_first_call (test.test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests) ... /usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/asyncio/selector_events.py:655: ResourceWarning: unclosed transport <_SelectorSocketTransport fd=10> source=self) ResourceWarning: Enable tracemalloc to get the object allocation traceback ok The code that is supposed to clean up the resource is: def cleanup(): if proto.transport is not None: # can be None if the task was cancelled before # connection_made callback proto.transport.close() self.run_loop(proto.wait_closed()) apparently, proto.transport may be None and then it fails to be closed even if the test succeeds (I assume because the condition in the comment happens or something else) and then the transport is not properly closed. ---------- components: Tests, asyncio messages: 332642 nosy: asvetlov, pablogsal, yselivanov priority: normal severity: normal status: open title: cleanup code may fail in test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 23:23:31 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 28 Dec 2018 04:23:31 +0000 Subject: [issue35602] cleanup code may fail in test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests In-Reply-To: <1545970910.26.0.567308733358.issue35602@roundup.psfhosted.org> Message-ID: <1545971011.17.0.0256727133441.issue35602@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +10615 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 23:23:39 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 28 Dec 2018 04:23:39 +0000 Subject: [issue35602] cleanup code may fail in test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests In-Reply-To: <1545970910.26.0.567308733358.issue35602@roundup.psfhosted.org> Message-ID: <1545971019.78.0.494274509655.issue35602@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch, patch pull_requests: +10615, 10616 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 23:23:48 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 28 Dec 2018 04:23:48 +0000 Subject: [issue35602] cleanup code may fail in test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests In-Reply-To: <1545970910.26.0.567308733358.issue35602@roundup.psfhosted.org> Message-ID: <1545971028.34.0.85545331235.issue35602@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch, patch, patch pull_requests: +10615, 10616, 10617 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 01:10:42 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 06:10:42 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545977442.44.0.762176637903.issue35591@roundup.psfhosted.org> Terry J. Reedy added the comment: Thanks for reporting this. It is easy to trigger. And after a bit of analysis, easy to fix. self.bell is set as top.bell in searchbase.SearchDialogBase.create_widgets(). The latter is called by SDB.open(), which is called for Find, Find-again if there is no previously defined pattern, and Find-in-files. It is not called by Find-selection as it uses the selection as the pattern. The bell only sounds if the selection is not found anywhere else in the editor. if selfirst == first and sellast == last: self.bell() If the selection is found elsewhere, the copy is then tagged with the selection tag, so when the original is found, the condition is not true. I consider it a bug that the selection tag is used instead of the 'found' tag, but the above depends on it being moved. The purpose of creating and calling self.bell instead of top.bell is so bell can be mocked when testing, both to detect the call and suppress noise when testing. Binding self.bell to root.bell in __init__ instead of to top.bell in create_widgets should work fine. ---------- stage: -> commit review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 01:10:57 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 28 Dec 2018 06:10:57 +0000 Subject: [issue35600] Expose siphash In-Reply-To: <1545965225.21.0.451953823903.issue35600@roundup.psfhosted.org> Message-ID: <1545977457.53.0.532186605608.issue35600@roundup.psfhosted.org> Benjamin Peterson added the comment: How about using one of these modules? https://pypi.org/search/?q=siphash ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 01:22:40 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 06:22:40 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545978160.02.0.397351669172.issue35591@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +10618 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 01:22:46 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 06:22:46 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545978166.46.0.852510175542.issue35591@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch, patch pull_requests: +10618, 10619 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 01:22:52 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 06:22:52 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545978172.92.0.0416215728435.issue35591@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch, patch, patch pull_requests: +10618, 10619, 10620 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 01:23:52 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 06:23:52 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545978232.01.0.756945926436.issue35591@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10620 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 01:24:02 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 06:24:02 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545978242.31.0.0151728569894.issue35591@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10619 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 01:27:00 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 28 Dec 2018 06:27:00 +0000 Subject: [issue35587] Python 3.7.2 Embed - zipimport.ZipImportError (Cannot load python37.zip) In-Reply-To: <1545798094.3.0.712150888896.issue35587@roundup.psfhosted.org> Message-ID: <1545978420.57.0.342699153509.issue35587@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 01:29:37 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 06:29:37 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545978577.08.0.290143580267.issue35591@roundup.psfhosted.org> Terry J. Reedy added the comment: I expect that people have run into this. But since callback exceptions do not crash IDLE, the only symptom when not running from a terminal is the lack of the 'bell' sound. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 02:09:18 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 28 Dec 2018 07:09:18 +0000 Subject: [issue35600] Expose siphash In-Reply-To: <1545969866.26.0.69260487679.issue35600@roundup.psfhosted.org> Message-ID: <20181228070912.GE13616@ando.pearwood.info> Steven D'Aprano added the comment: > Steven, my requirement calls for same hash on multiple machines. > Python's hash (for strings) is keyed with a random value. Ah, of course it does, I forgot about that. The only problem with exposing siphash is that we are exposing a private implementation detail (the specific hash function used) as a public interface. That means that we'd need to keep siphash forever, even if we want to use a different hash function in the future. Now maybe we're willing to do that, perhaps exposing it through the hashlib module, with no guarantee that it is related in any way to what hash() calls. But I think now we're moving in Python-Ideas mailing list territory, and as Benjamin points out, there is a third-party library. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 02:41:43 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 07:41:43 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545982903.54.0.081068887371.issue35591@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset c465682718f15cd3deb6b37db5fb607718ac64ed by Terry Jan Reedy in branch 'master': bpo-35591: IDLE Find Selection now works when selection not found (GH-11339) https://github.com/python/cpython/commit/c465682718f15cd3deb6b37db5fb607718ac64ed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 02:41:50 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 07:41:50 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545982910.25.0.558791433074.issue35591@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10621 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 02:41:55 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 07:41:55 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545982915.62.0.597391206062.issue35591@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10621, 10622 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 02:42:01 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 07:42:01 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545982921.24.0.898802969449.issue35591@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10621, 10622, 10623 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 02:43:08 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 07:43:08 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545982988.04.0.185680715822.issue35591@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10623 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 02:43:19 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 07:43:19 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545982999.58.0.174879958184.issue35591@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10622 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 04:18:01 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 28 Dec 2018 09:18:01 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser Message-ID: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : HtmlDiff.make_table takes fromdesc and todesc that are not escaped causing problems while rendering html when they contain tags like fromdesc="", todesc="". There is no validation for them to be filenames so they could be arbitrary strings. Since contents of the table are escaped I think it's good to escape headers too since they might lead to the browser to execute the headers as code and potential XSS. I don't think it's worthy of adding security type so I am adding behavior. Feel free to change the type if needed. I could see no test failures on applying my patch and I will push a PR with a test. Current output : ( and are not escaped in the output) $ python3 -c 'import difflib; print(difflib.HtmlDiff().make_table([" hello "], [" hello "], fromdesc="", todesc=""))'


t1<a> hello </a>t1<b> hello </b>
---------- components: Library (Lib) messages: 332648 nosy: xtreak priority: normal severity: normal status: open title: table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 04:23:51 2018 From: report at bugs.python.org (Alisue Lambda) Date: Fri, 28 Dec 2018 09:23:51 +0000 Subject: [issue33350] WinError 10038 is raised when loop.sock_connect is wrapped with asyncio.wait_for In-Reply-To: <1524588676.0.0.682650639539.issue33350@psf.upfronthosting.co.za> Message-ID: <1545989031.57.0.424514135688.issue33350@roundup.psfhosted.org> Alisue Lambda added the comment: https://github.com/python/asyncio/pull/419 It seems the PR above which has not merged solve the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 04:44:30 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 28 Dec 2018 09:44:30 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1545990270.66.0.706621691334.issue35603@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +10624 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 04:44:33 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 28 Dec 2018 09:44:33 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1545990273.96.0.0724766849479.issue35603@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch, patch pull_requests: +10624, 10625 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 04:44:37 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 28 Dec 2018 09:44:37 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1545990277.23.0.768945764111.issue35603@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch, patch, patch pull_requests: +10624, 10625, 10626 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 05:14:04 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 10:14:04 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545992044.72.0.596272286573.issue35591@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10627 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 05:14:10 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 10:14:10 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545992050.27.0.0207934402787.issue35591@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10627, 10628 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 05:14:13 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 28 Dec 2018 10:14:13 +0000 Subject: [issue33350] WinError 10038 is raised when loop.sock_connect is wrapped with asyncio.wait_for In-Reply-To: <1524588676.0.0.682650639539.issue33350@psf.upfronthosting.co.za> Message-ID: <1545992053.56.0.981361914305.issue33350@roundup.psfhosted.org> Andrew Svetlov added the comment: What Python version do you use? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 05:14:15 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 10:14:15 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545992055.63.0.733117403066.issue35591@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10627, 10628, 10629 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 05:17:25 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 10:17:25 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545992245.96.0.89797338639.issue35591@roundup.psfhosted.org> Change by Terry J. Reedy : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 05:19:01 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 10:19:01 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545992341.4.0.3825335459.issue35591@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10629 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 05:19:13 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 10:19:13 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545992353.49.0.0978667674377.issue35591@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10628 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 05:20:24 2018 From: report at bugs.python.org (manchun kumar) Date: Fri, 28 Dec 2018 10:20:24 +0000 Subject: [issue35604] Is python used more than Java Nowadays? Message-ID: <1545992421.85.0.893262731106.issue35604@roundup.psfhosted.org> New submission from manchun kumar : Whether we should choose Python or Java! Which one is easy or which is used more often? These questions are natural if you belong to this industry where everyone is talking about this. Programmers community endlessly debate about these two languages and the discussion about which language is best seems endless. But yes, Python has become the talk of the town and used by so many programmers. I think it?s totally worth looking differences and similarities they share, advantages, disadvantages, ideal use cases and other factors. Using Java or Python actually depends on the experience and interest of developer like experience with respect to coding style, language, application-development requirements, etc. I have consistently observed both of them are equally important but yes, in today?s condition, it is great to say that I know Python like a Pro. Python adds a lot of value to your profile. This is all due to the huge demand for Data mining, big data, machine learning, IOT, Artificial intelligence, etc. The reason for Python?s preference is the widely spread scientific community, academic institutions and other efficient sources that have availed thousands of different ways to learn python with ease. This also makes people bag good job opportunities with Python. Thanks to the tons of libraries! https://www.janbasktraining.com/blog/python-programming-tutorial/ Businesses, organizations as well as the people have very well accepted that Python is easy to use and can be efficiently used for tricky tasks like writing a mobile app, making high-end games as well as writing web server without a hitch. ---------- assignee: docs at python components: Documentation messages: 332651 nosy: docs at python, manchun priority: normal severity: normal status: open title: Is python used more than Java Nowadays? type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 05:31:36 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 10:31:36 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545993096.24.0.113773848839.issue35591@roundup.psfhosted.org> miss-islington added the comment: New changeset 098bb249e9cf315b9e3b7d4bdad039a093d049c4 by Miss Islington (bot) in branch '3.7': bpo-35591: IDLE Find Selection now works when selection not found (GH-11339) https://github.com/python/cpython/commit/098bb249e9cf315b9e3b7d4bdad039a093d049c4 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 06:19:07 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 11:19:07 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1545995947.3.0.666115780947.issue35591@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 06:50:33 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 28 Dec 2018 11:50:33 +0000 Subject: [issue35604] Is python used more than Java Nowadays? In-Reply-To: <1545992421.85.0.893262731106.issue35604@roundup.psfhosted.org> Message-ID: <1545997833.14.0.70658257566.issue35604@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Please add some context over what this has to do with performance and docs category. The tracker might not be the appropriate place to have language debates. Please specify the outcome of the issue since your description has no actionable item or the problem you are trying to solve with the issue. Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 06:52:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Dec 2018 11:52:27 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1545997947.57.0.557877906714.issue35596@roundup.psfhosted.org> Serhiy Storchaka added the comment: There were no changes in zipimport between 3.7.1 and 3.7.2, and there were just few looking unrelated changes in the import machinery. Maybe this is caused by some changes in the interpreter initialization code? ---------- nosy: +brett.cannon, eric.snow, ncoghlan, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 07:05:04 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 28 Dec 2018 12:05:04 +0000 Subject: [issue35595] Add sys flag to always show full paths in stack traces (instead of relative paths) In-Reply-To: <1545925804.0.0.366688236093.issue35595@roundup.psfhosted.org> Message-ID: <1545998704.06.0.787950591226.issue35595@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 08:33:21 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 28 Dec 2018 13:33:21 +0000 Subject: [issue35594] Python script generating Segmentation Fault In-Reply-To: <1545924513.31.0.604345478264.issue35594@roundup.psfhosted.org> Message-ID: <1546004001.18.0.216062744049.issue35594@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks for the report, but that example is so large and complicated that it's difficult for someone not familiar with it to understand what's going on. If you could simplify it down to the smallest example that duplicates the problem, then perhaps we could make more progress. Short of that, one thing you should look at is Victor's faulthander work: https://docs.python.org/3/library/faulthandler.html . It might give enough information to diagnose the problem. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 08:35:33 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 28 Dec 2018 13:35:33 +0000 Subject: [issue35604] Is python used more than Java Nowadays? In-Reply-To: <1545992421.85.0.893262731106.issue35604@roundup.psfhosted.org> Message-ID: <1546004133.05.0.200890289605.issue35604@roundup.psfhosted.org> Steven D'Aprano added the comment: This is spam. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 08:57:48 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 28 Dec 2018 13:57:48 +0000 Subject: [issue34373] test_time errors on AIX In-Reply-To: <1533917751.88.0.56676864532.issue34373@psf.upfronthosting.co.za> Message-ID: <1546005468.64.0.887035330279.issue34373@roundup.psfhosted.org> Nick Coghlan added the comment: New changeset e2926b72488596f59e43c27f3b7cedf0c5b9e88e by Nick Coghlan (Michael Felt) in branch 'master': bpo-34373: fix test_mktime and test_pthread_getcpuclickid tests on AIX (GH-8726) https://github.com/python/cpython/commit/e2926b72488596f59e43c27f3b7cedf0c5b9e88e ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:02:36 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 28 Dec 2018 14:02:36 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows In-Reply-To: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> Message-ID: <1546005756.93.0.0840362560204.issue35555@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +10630 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:02:43 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 28 Dec 2018 14:02:43 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows In-Reply-To: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> Message-ID: <1546005763.53.0.555676957874.issue35555@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +10630, 10631 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:02:50 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 28 Dec 2018 14:02:50 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows In-Reply-To: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> Message-ID: <1546005770.19.0.303497024485.issue35555@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +10630, 10631, 10632 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:03:21 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 28 Dec 2018 14:03:21 +0000 Subject: [issue11191] test_search_cpp error on AIX (with xlc) In-Reply-To: <1297436536.39.0.921212376741.issue11191@psf.upfronthosting.co.za> Message-ID: <1546005801.05.0.585268941959.issue11191@roundup.psfhosted.org> Nick Coghlan added the comment: New changeset ed57e13df60ce28ba89bd49c9c5a15b1d9bf79c7 by Nick Coghlan (Michael Felt) in branch 'master': bpo-11191: skip unsupported test_distutils case for AIX with xlc (GH-8709) https://github.com/python/cpython/commit/ed57e13df60ce28ba89bd49c9c5a15b1d9bf79c7 ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:04:09 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 28 Dec 2018 14:04:09 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1546005849.36.0.675910724746.issue20182@roundup.psfhosted.org> Change by Tal Einat : ---------- Removed message: https://bugs.python.org/msg332609 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:04:29 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 28 Dec 2018 14:04:29 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1546005869.29.0.47139072321.issue20182@roundup.psfhosted.org> Change by Tal Einat : ---------- Removed message: https://bugs.python.org/msg332608 Removed message: https://bugs.python.org/msg332609 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:04:49 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 28 Dec 2018 14:04:49 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1546005889.8.0.0202026324889.issue20182@roundup.psfhosted.org> Change by Tal Einat : ---------- Removed message: https://bugs.python.org/msg332594 Removed message: https://bugs.python.org/msg332608 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:05:09 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 28 Dec 2018 14:05:09 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1546005909.97.0.353970760541.issue20182@roundup.psfhosted.org> Change by Tal Einat : ---------- Removed message: https://bugs.python.org/msg332590 Removed message: https://bugs.python.org/msg332594 Removed message: https://bugs.python.org/msg332608 Removed message: https://bugs.python.org/msg332609 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:05:28 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 28 Dec 2018 14:05:28 +0000 Subject: [issue11191] test_search_cpp error on AIX (with xlc) In-Reply-To: <1297436536.39.0.921212376741.issue11191@psf.upfronthosting.co.za> Message-ID: <1546005928.27.0.370021485321.issue11191@roundup.psfhosted.org> Change by Nick Coghlan : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:06:07 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 28 Dec 2018 14:06:07 +0000 Subject: [issue34373] test_time errors on AIX In-Reply-To: <1533917751.88.0.56676864532.issue34373@psf.upfronthosting.co.za> Message-ID: <1546005967.34.0.569839003716.issue34373@roundup.psfhosted.org> Change by Nick Coghlan : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:06:32 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 28 Dec 2018 14:06:32 +0000 Subject: [issue34897] distutils test errors when CXX is not set In-Reply-To: <1538684546.1.0.545547206417.issue34897@psf.upfronthosting.co.za> Message-ID: <1546005992.3.0.815962371976.issue34897@roundup.psfhosted.org> Change by Nick Coghlan : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:07:12 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 28 Dec 2018 14:07:12 +0000 Subject: [issue34711] Lib/http/server.py: Return HTTPStatus.NOT_FOUND if path.endswith(/) and not a directory In-Reply-To: <1537179798.31.0.956365154283.issue34711@psf.upfronthosting.co.za> Message-ID: <1546006032.84.0.206357671925.issue34711@roundup.psfhosted.org> Change by Nick Coghlan : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:08:05 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 28 Dec 2018 14:08:05 +0000 Subject: [issue27643] test_ctypes fails on AIX with xlc In-Reply-To: <1469718089.88.0.404760174195.issue27643@psf.upfronthosting.co.za> Message-ID: <1546006085.73.0.178737634466.issue27643@roundup.psfhosted.org> Change by Nick Coghlan : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:08:27 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 28 Dec 2018 14:08:27 +0000 Subject: [issue11192] test_socket error on AIX In-Reply-To: <1297436751.32.0.492226695457.issue11192@psf.upfronthosting.co.za> Message-ID: <1546006107.42.0.425787712512.issue11192@roundup.psfhosted.org> Change by Nick Coghlan : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:10:03 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 28 Dec 2018 14:10:03 +0000 Subject: [issue35588] Speed up mod/divmod/floordiv for Fraction type In-Reply-To: <1545817172.57.0.712150888896.issue35588@roundup.psfhosted.org> Message-ID: <1546006203.4.0.374005588227.issue35588@roundup.psfhosted.org> Josh Rosenberg added the comment: divmod imposes higher fixed overhead in exchange for operating more efficiently on larger values. Given the differences are small either way, and using divmod reduces scalability concerns for larger values (which are more likely to occur in code that delays normalization), I'd be inclined to stick with the simpler divmod-based implementation. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:22:58 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 14:22:58 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1546006978.76.0.823513729349.issue35596@roundup.psfhosted.org> miss-islington added the comment: New changeset bbf695441af9def8a121ff3e245415d9fc0bab9a by Miss Islington (bot) in branch '3.7': bpo-35596: Fix vcruntime140.dll being added to embeddable distro multiple times. (GH-11329) https://github.com/python/cpython/commit/bbf695441af9def8a121ff3e245415d9fc0bab9a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:24:22 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 28 Dec 2018 14:24:22 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1546007062.06.0.972637391976.issue20182@roundup.psfhosted.org> Tal Einat added the comment: New changeset c6c7237272499b2c528acb5f62601421f329e92a by Tal Einat in branch 'master': bpo-20182: AC convert remaining functions/methods in _hashopenssl.c (GH-9213) https://github.com/python/cpython/commit/c6c7237272499b2c528acb5f62601421f329e92a _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:28:04 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 28 Dec 2018 14:28:04 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1546007284.22.0.948869560898.issue20182@roundup.psfhosted.org> Change by Tal Einat : ---------- Removed message: https://bugs.python.org/msg332590 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:28:20 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 28 Dec 2018 14:28:20 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1546007300.95.0.186114860885.issue20182@roundup.psfhosted.org> Change by Tal Einat : ---------- Removed message: https://bugs.python.org/msg332590 Removed message: https://bugs.python.org/msg332607 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:28:37 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 28 Dec 2018 14:28:37 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1546007317.55.0.584322210104.issue20182@roundup.psfhosted.org> Change by Tal Einat : ---------- Removed message: https://bugs.python.org/msg332590 Removed message: https://bugs.python.org/msg332607 Removed message: https://bugs.python.org/msg332661 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:29:46 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 28 Dec 2018 14:29:46 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1545926786.89.0.258683182479.issue20182@roundup.psfhosted.org> Tal Einat added the comment: See new PR GH-11328 with updated AC conversion of Python/sysmodule.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:42:07 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 28 Dec 2018 14:42:07 +0000 Subject: [issue35591] IDLE: Traceback on Find Selection In-Reply-To: <1545850250.73.0.720523781121.issue35591@roundup.psfhosted.org> Message-ID: <1546008127.48.0.329362833827.issue35591@roundup.psfhosted.org> Cheryl Sabella added the comment: Thanks for looking at this one. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:53:26 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 28 Dec 2018 14:53:26 +0000 Subject: [issue22703] Idle Code Context menu entrie(s) In-Reply-To: <1414023415.32.0.701318253357.issue22703@psf.upfronthosting.co.za> Message-ID: <1546008806.26.0.52292284221.issue22703@roundup.psfhosted.org> Tal Einat added the comment: Terry, I'm having trouble getting Tk to work on my Mac since the Mojave update, so I'm not yet able to check this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 10:02:41 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 28 Dec 2018 15:02:41 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1546009361.89.0.583780863183.issue35596@roundup.psfhosted.org> Nick Coghlan added the comment: Reviewing the diff at https://github.com/python/cpython/compare/v3.7.1...v3.7.2 the only item I've spotted that seems like it could even plausibly be related is the tweak at https://github.com/python/cpython/compare/v3.7.1...v3.7.2#diff-baf5eab51059d96fb8837152dab0d1a4 (Click the Files tab to get your browser to jump to the anchor in the second link) That's a change to the function that emits the "Fatal Python error: initfsencoding: unable to load the file system codec" message. That change means that embedding applications could potentially be hitting the codec name resolution at https://github.com/python/cpython/blob/3.7/Python/pylifecycle.c#L1643 with the filesystem encoding set as "ascii", rather than handling that case through the "get_locale_encoding()" branch, which does the initial codec name lookup with the filesystem encoding still set to NULL (and hence falling back to the locale encoding as the default). However, the only way that new branch could trigger is if check_force_ascii() (at https://github.com/python/cpython/blob/v3.7.2/Python/fileutils.c#L100 ) is returning 1 for some reason, which we only expect it to do on some misbehaving BSD OSes, not on Windows: https://github.com/python/cpython/pull/10233 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 12:00:38 2018 From: report at bugs.python.org (Anthony Sottile) Date: Fri, 28 Dec 2018 17:00:38 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped Message-ID: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> New submission from Anthony Sottile : Noticed this while packaging 3.6.8 for deadsnakes (ubuntu ppa) This patch: https://github.com/python/cpython/pull/11251 Requires a version of sphinx where `sphinx.util.logging.getLogger` is available. It appears that the first version which that was available was 1.6: https://github.com/sphinx-doc/sphinx/commit/6d4e6454093953943e79d4db6efeb17390870e62#diff-db360b033c6011189d978db1a4b7dcb7 For example, on ubuntu xenial (16.04) the newest packaged version of python3-sphinx available is 1.3.6 (released 2016-02) which satisfies the "minimum version": https://github.com/python/cpython/blob/3c6b436a57893dd1fae4e072768f41a199076252/Doc/conf.py#L36-L37 I hacked around it in this case by just using `logging.getLogger`: https://github.com/deadsnakes/python3.6/commit/9ba2234f35087a4bf67e3aecf2bd8dd0e3f67186 I'm not sure what the right answer is here, bumping the minimum version will make it _harder_ for packagers -- though I understand continuing to support old (2 years ago) things can be cumbersome. ---------- assignee: docs at python components: Build, Documentation messages: 332665 nosy: Anthony Sottile, docs at python priority: normal severity: normal status: open title: backported patch requires new sphinx, minimum sphinx version was not bumped versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 12:02:28 2018 From: report at bugs.python.org (Anthony Sottile) Date: Fri, 28 Dec 2018 17:02:28 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1546016548.11.0.582419139648.issue35605@roundup.psfhosted.org> Anthony Sottile added the comment: oops, pressed the button too quickly, meant to mention that sphinx 1.6 was released 2017-05 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 12:09:40 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 28 Dec 2018 17:09:40 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1546016980.77.0.984936556757.issue35605@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +mdk, steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 12:46:13 2018 From: report at bugs.python.org (Michael Felt) Date: Fri, 28 Dec 2018 17:46:13 +0000 Subject: [issue28009] core logic of uuid.getnode() is broken for netstat In-Reply-To: <1473290315.48.0.840701308825.issue28009@psf.upfronthosting.co.za> Message-ID: <1546019173.19.0.211066908357.issue28009@roundup.psfhosted.org> Michael Felt added the comment: As I am not clear on where to have a more general discussion (in a PR conversation) or here - going to start here because I cannot figure out which comment in the PR to reply to. Generally, before modifying the test_uuid.py to based tests on uuid.__NODE_GETTERS - these need to be defined. I have my AIX systems, I found a macos I could do some queries on, and downloaded cygwin and came up with this starting point: _MACOS = sys.platform == 'darwin' _WIN32 = sys.platform == 'win32' _CYGWIN= sys.platform == 'cygwin' _AIX = sys.platform.startswith("aix") ... if _AIX: _NODE_GETTERS = [_unix_getnode, _netstat_getnode] elif _MACOS: _NODE_GETTERS = [_unix_getnode, _ifconfig_getnode, _netstat_getnode] elif _CYGWIN: _NODE_GETTERS = [_ipconfig_getnode] elif _WIN32: _NODE_GETTERS = [_windll_getnode, _ipconfig_getnode, _netbios_getnode] else: _NODE_GETTERS = [_unix_getnode, _ifconfig_getnode, _ip_getnode, _arp_getnode, _lanscan_getnode, _netstat_getnode] What I am also wondering - is it worthwhile to have a way to only define the getter() routines a platform can actually use? e.g., On AIX I can call uuid._ipconfig_getter(), but get nonsense. Or is it too much effort? Finally, can someone with access to other platforms where differences may be expected (e.g., Solaris, hpux, or even different flavors of Linux) - to make this _NODE_GETTERS mode complete (specific). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 12:47:41 2018 From: report at bugs.python.org (Michael Felt) Date: Fri, 28 Dec 2018 17:47:41 +0000 Subject: [issue28009] core logic of uuid.getnode() is broken for netstat In-Reply-To: <1473290315.48.0.840701308825.issue28009@psf.upfronthosting.co.za> Message-ID: <1546019261.77.0.821714252739.issue28009@roundup.psfhosted.org> Michael Felt added the comment: p.s., removed 2.7 and 3.6 as too old for any interest. ---------- versions: -Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 12:57:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Dec 2018 17:57:31 +0000 Subject: [issue35588] Speed up mod/divmod/floordiv for Fraction type In-Reply-To: <1545817172.57.0.712150888896.issue35588@roundup.psfhosted.org> Message-ID: <1546019851.89.0.767492621328.issue35588@roundup.psfhosted.org> Serhiy Storchaka added the comment: Using divmod() makes the case of small integers 2-3% slower, but makes the case of large integers more significantly faster. And since the code with divmod() is simpler, I think it is worth to use it. The Fraction class also serves educational goals. The simpler code is better. The proposed patch makes the code slightly more complex, but not too much. I think it's an affordable price for such degree of speed up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 13:03:44 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 28 Dec 2018 18:03:44 +0000 Subject: [issue20849] add exist_ok to shutil.copytree In-Reply-To: <1393908922.06.0.91052425832.issue20849@psf.upfronthosting.co.za> Message-ID: <1546020224.45.0.162745322917.issue20849@roundup.psfhosted.org> Giampaolo Rodola' added the comment: New changeset 9e00d9e88fbf943987e4771c753f5ca8f794103e by Giampaolo Rodola (jab) in branch 'master': bpo-20849: add dirs_exist_ok arg to shutil.copytree (patch by Josh Bronson) https://github.com/python/cpython/commit/9e00d9e88fbf943987e4771c753f5ca8f794103e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 13:05:08 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 28 Dec 2018 18:05:08 +0000 Subject: [issue20849] add exist_ok to shutil.copytree In-Reply-To: <1393908922.06.0.91052425832.issue20849@psf.upfronthosting.co.za> Message-ID: <1546020308.4.0.706613992256.issue20849@roundup.psfhosted.org> Change by Giampaolo Rodola' : ---------- assignee: -> giampaolo.rodola resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 13:06:00 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 18:06:00 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows In-Reply-To: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> Message-ID: <1546020360.15.0.121094194974.issue35555@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10632 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 13:06:15 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 18:06:15 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows In-Reply-To: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> Message-ID: <1546020375.01.0.529587427232.issue35555@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10631 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 13:12:43 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 18:12:43 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows In-Reply-To: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> Message-ID: <1546020763.66.0.0496231786158.issue35555@roundup.psfhosted.org> Terry J. Reedy added the comment: A function to change state will be needed in the future, as illustrated by a preliminary version of PR-11325. On that PR, I requested that this part of that PR should be attached to this issue instead, with no change in the blurb. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 13:22:31 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 18:22:31 +0000 Subject: [issue22703] Idle Code Context menu entrie(s) In-Reply-To: <1414023415.32.0.701318253357.issue22703@psf.upfronthosting.co.za> Message-ID: <1546021351.37.0.194831575265.issue22703@roundup.psfhosted.org> Terry J. Reedy added the comment: I understand. Until tcl/tk can be patched to work with both Mohave and past macOS versions, it is a nasty situation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 13:24:02 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 18:24:02 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows In-Reply-To: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> Message-ID: <1546021442.82.0.813106274527.issue35555@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10633 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 13:24:11 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 18:24:11 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows In-Reply-To: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> Message-ID: <1546021451.86.0.64917481455.issue35555@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10633, 10634 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 13:24:18 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 18:24:18 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows In-Reply-To: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> Message-ID: <1546021458.94.0.687094409076.issue35555@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10633, 10634, 10635 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 13:30:30 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 18:30:30 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows In-Reply-To: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> Message-ID: <1546021830.34.0.545040788897.issue35555@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10635 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 13:30:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 18:30:44 +0000 Subject: [issue35555] IDLE: Gray out Code Context on non-editor windows In-Reply-To: <1545435794.26.0.98272194251.issue35555@roundup.psfhosted.org> Message-ID: <1546021844.8.0.128880148198.issue35555@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10634 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 13:53:13 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 18:53:13 +0000 Subject: [issue28097] IDLE: document all key bindings, add menu items for more. In-Reply-To: <1473663810.99.0.66873909958.issue28097@psf.upfronthosting.co.za> Message-ID: <1546023193.54.0.89017884321.issue28097@roundup.psfhosted.org> Terry J. Reedy added the comment: Cheryl, the addition looks nice. But for anything else, lets discuss here first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 13:54:21 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 18:54:21 +0000 Subject: [issue34055] IDLE Shell: check syntax before smart indent In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1546023261.21.0.303559981607.issue34055@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10545 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 13:54:40 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 18:54:40 +0000 Subject: [issue34055] IDLE Shell: check syntax before smart indent In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1546023280.88.0.654777285349.issue34055@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10544 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 14:06:07 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 28 Dec 2018 19:06:07 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1546023967.73.0.787076717884.issue35596@roundup.psfhosted.org> Steve Dower added the comment: None of the code you linked is defined on Windows at all, so it can't be that. Are any stat checks done when there's only a .pyc to import? Could it be deciding that the .pyc is out of date and then failing to find source? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 14:13:13 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 28 Dec 2018 19:13:13 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1546024393.48.0.595767529932.issue35605@roundup.psfhosted.org> Steve Dower added the comment: We need Ned's approval to fix anything in 3.6 now. Typically we do consider build issues, and this one is fairly innocent (the affected code should only be used on Windows, but the import may trigger elsewhere). I'd be happy to take a patch to use logging when the sphinx one is not found. We more or less enforce a newer version of Sphinx on the platforms where it matters, but for those restricted by their distros we can pretty easily help out. ---------- keywords: +easy nosy: +ned.deily priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 14:29:13 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 28 Dec 2018 19:29:13 +0000 Subject: [issue35606] Add prod() function to the math module Message-ID: <1546025352.75.0.868813504694.issue35606@roundup.psfhosted.org> New submission from Raymond Hettinger : Back in 2007, a user suggested a built-in prod() function with an API similar to the built-in sum() function. The proposal was rejected because it wasn't needed often enough to justify a builtin function. See https://bugs.python.org/issue1093 Though prod() doesn't meet the threshold for a builtin, it would be reasonable to add this to the math module (or an imath module). Personally, I've wanted and written this function on several occasions (for applications such as multiplying probabilities). On stack overflow, it has been a popular question with recurring interest. See https://stackoverflow.com/questions/7948291/ and https://stackoverflow.com/questions/595374 ---------- components: Library (Lib) messages: 332676 nosy: aleax, mark.dickinson, rhettinger, tim.peters priority: normal severity: normal status: open title: Add prod() function to the math module type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 15:00:35 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 28 Dec 2018 20:00:35 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1546027235.79.0.600170375242.issue35605@roundup.psfhosted.org> Ned Deily added the comment: I would view this as a build regression in 3.6.8 so I would accept a fix for the 3.6 branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 15:11:33 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 20:11:33 +0000 Subject: [issue28097] IDLE: document all key bindings, add menu items for more. In-Reply-To: <1473663810.99.0.66873909958.issue28097@psf.upfronthosting.co.za> Message-ID: <1546027893.97.0.222080443232.issue28097@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset c0381aaea4ad3e866bde70393c4f7efe9bcf3568 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-28097: IDLE - Add Previous/Next History to Shell menu (#11325) https://github.com/python/cpython/commit/c0381aaea4ad3e866bde70393c4f7efe9bcf3568 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 15:12:08 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 20:12:08 +0000 Subject: [issue28097] IDLE: document all key bindings, add menu items for more. In-Reply-To: <1473663810.99.0.66873909958.issue28097@psf.upfronthosting.co.za> Message-ID: <1546027928.73.0.326624256129.issue28097@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10636 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 15:12:13 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 20:12:13 +0000 Subject: [issue28097] IDLE: document all key bindings, add menu items for more. In-Reply-To: <1473663810.99.0.66873909958.issue28097@psf.upfronthosting.co.za> Message-ID: <1546027933.63.0.169697509055.issue28097@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10636, 10637 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 15:12:17 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 20:12:17 +0000 Subject: [issue28097] IDLE: document all key bindings, add menu items for more. In-Reply-To: <1473663810.99.0.66873909958.issue28097@psf.upfronthosting.co.za> Message-ID: <1546027937.87.0.920127719487.issue28097@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10636, 10637, 10638 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 15:14:57 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 20:14:57 +0000 Subject: [issue28097] IDLE: document all key bindings, add menu items for more. In-Reply-To: <1473663810.99.0.66873909958.issue28097@psf.upfronthosting.co.za> Message-ID: <1546028097.56.0.329012663934.issue28097@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10638 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 15:15:10 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 20:15:10 +0000 Subject: [issue28097] IDLE: document all key bindings, add menu items for more. In-Reply-To: <1473663810.99.0.66873909958.issue28097@psf.upfronthosting.co.za> Message-ID: <1546028110.32.0.662299197899.issue28097@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10637 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 15:29:46 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 28 Dec 2018 20:29:46 +0000 Subject: [issue28097] IDLE: document all key bindings, add menu items for more. In-Reply-To: <1473663810.99.0.66873909958.issue28097@psf.upfronthosting.co.za> Message-ID: <1546028986.51.0.961061909323.issue28097@roundup.psfhosted.org> miss-islington added the comment: New changeset b716c716b5d5dc630d85dd16ca6526948745c020 by Miss Islington (bot) in branch '3.7': bpo-28097: IDLE - Add Previous/Next History to Shell menu (GH-11325) https://github.com/python/cpython/commit/b716c716b5d5dc630d85dd16ca6526948745c020 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 16:16:57 2018 From: report at bugs.python.org (Anthony Sottile) Date: Fri, 28 Dec 2018 21:16:57 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1546031817.46.0.36955512684.issue35605@roundup.psfhosted.org> Anthony Sottile added the comment: If I add a patch which is essentially: try: # sphinx>=1.6 from sphinx.util.logging import getLogger except ImportError: # sphinx<1.6 from logging import getLogger will that be fine? and should I open that against 3.7 to be backported or just against 3.6 (I also ran into the same issue when backporting 3.7.2 for xenial -- but there I adjusted the minimum sphinx version: https://github.com/deadsnakes/python3.7/commit/c27b89bc7032d0b072b46c7425e5b32788f1c0fd ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 17:00:48 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 28 Dec 2018 22:00:48 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1546034448.46.0.0386732259546.issue35605@roundup.psfhosted.org> Steve Dower added the comment: I think we're okay to increase the minimum version on the active branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 17:06:12 2018 From: report at bugs.python.org (Anthony Sottile) Date: Fri, 28 Dec 2018 22:06:12 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1546034772.29.0.388378152109.issue35605@roundup.psfhosted.org> Anthony Sottile added the comment: I assume that means I should only target 3.6 -- does the patch look like the right approach? I can make a PR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 17:18:45 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 22:18:45 +0000 Subject: [issue34055] IDLE Shell: check syntax before smart indent In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1546035525.05.0.657918548858.issue34055@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +10639 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 17:18:52 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 22:18:52 +0000 Subject: [issue34055] IDLE Shell: check syntax before smart indent In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1546035532.54.0.62640258023.issue34055@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +10639, 10640 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 17:19:01 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 22:19:01 +0000 Subject: [issue34055] IDLE Shell: check syntax before smart indent In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1546035541.1.0.916663930435.issue34055@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +10639, 10640, 10641 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 17:27:24 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 22:27:24 +0000 Subject: [issue34055] IDLE: erroneous 'smart' indents in shell In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1546036044.25.0.716453892648.issue34055@roundup.psfhosted.org> Terry J. Reedy added the comment: I changed the title back to the symptom description, rather than the wrong fix. As Cheryl noted, the cause of the specific regression is the erroneous deletion of one line in pyshell.PyShell. The simplest fix is to put is back. Globally replacing context_use_ps1 is a different issue, and there is more than one possibility. I will open a new issue and move PR 11307 there. The reversion also reverts the 'fixes' that came with the error. Fixing the shell branch, now that is is used, will be a different issue. >>> d = {1:3, # correct indent, 3.7 >>> d = {1:3, # indent not accounting for prompt, after reversion ---------- stage: patch review -> test needed title: IDLE Shell: check syntax before smart indent -> IDLE: erroneous 'smart' indents in shell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 17:27:41 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 22:27:41 +0000 Subject: [issue34055] IDLE: erroneous 'smart' indents in shell In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1546036061.84.0.749605816078.issue34055@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10641 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 17:27:58 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2018 22:27:58 +0000 Subject: [issue34055] IDLE: erroneous 'smart' indents in shell In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1546036078.87.0.213000664091.issue34055@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10640 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 17:32:00 2018 From: report at bugs.python.org (Dan Stromberg) Date: Fri, 28 Dec 2018 22:32:00 +0000 Subject: [issue5672] Implement a way to change the python process name In-Reply-To: <1238701084.1.0.0781987214897.issue5672@psf.upfronthosting.co.za> Message-ID: <1546036320.27.0.907885164308.issue5672@roundup.psfhosted.org> Dan Stromberg added the comment: Isn't this "python script doesn't show up in top correctly" issue a matter of "#!/usr/bin/env python3"? If you "#!/usr/bin/python3" (for example) instead, top seems happy. ---------- nosy: +strombrg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 18:01:33 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 28 Dec 2018 23:01:33 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1546038093.95.0.0072144956295.issue35605@roundup.psfhosted.org> Ned Deily added the comment: Julien (@mdk) is the doc builds expert. ---------- assignee: docs at python -> mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 18:29:41 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 28 Dec 2018 23:29:41 +0000 Subject: [issue35606] Add prod() function to the math module In-Reply-To: <1546025352.75.0.868813504694.issue35606@roundup.psfhosted.org> Message-ID: <1546039781.24.0.428508309696.issue35606@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:06:20 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2018 01:06:20 +0000 Subject: [issue34055] IDLE: erroneous 'smart' indents in shell In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1546045580.32.0.0745236682639.issue34055@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 4bc246786f003cdf1fffb3403b4cd92fc42ba9ef by Terry Jan Reedy in branch 'master': bpo-34055: Revert deletion of line in IDLE's PyShell (#11346) https://github.com/python/cpython/commit/4bc246786f003cdf1fffb3403b4cd92fc42ba9ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:06:30 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 01:06:30 +0000 Subject: [issue34055] IDLE: erroneous 'smart' indents in shell In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1546045590.31.0.199716160228.issue34055@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10642 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:06:39 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 01:06:39 +0000 Subject: [issue34055] IDLE: erroneous 'smart' indents in shell In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1546045599.87.0.847153378182.issue34055@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10642, 10643 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:06:47 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 01:06:47 +0000 Subject: [issue34055] IDLE: erroneous 'smart' indents in shell In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1546045607.04.0.668931218101.issue34055@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10642, 10643, 10644 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:19:35 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 01:19:35 +0000 Subject: [issue34055] IDLE: erroneous 'smart' indents in shell In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1546046375.96.0.0451707223559.issue34055@roundup.psfhosted.org> miss-islington added the comment: New changeset 95dc4577c3a1bb12978de5234aaf07839f4d7844 by Miss Islington (bot) in branch '3.7': bpo-34055: Revert deletion of line in IDLE's PyShell (GH-11346) https://github.com/python/cpython/commit/95dc4577c3a1bb12978de5234aaf07839f4d7844 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:31:31 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2018 01:31:31 +0000 Subject: [issue34055] IDLE: erroneous 'smart' indents in shell In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1546047091.7.0.748202059117.issue34055@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10644 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:31:48 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2018 01:31:48 +0000 Subject: [issue34055] IDLE: erroneous 'smart' indents in shell In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1546047108.59.0.241496311395.issue34055@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10643 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:40:25 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 29 Dec 2018 01:40:25 +0000 Subject: [issue35601] Race condition in test_signal_handling_args x86-64 High Sierra 3.75 In-Reply-To: <1545968759.07.0.590219498678.issue35601@roundup.psfhosted.org> Message-ID: <1546047625.38.0.142675902401.issue35601@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 5471420faa84519530f29b08f2b042b2288e3e96 by Pablo Galindo in branch 'master': bpo-35601: Alleviate race condition when waiting for SIGALRM in test_asyncio (GH-11337) https://github.com/python/cpython/commit/5471420faa84519530f29b08f2b042b2288e3e96 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:40:52 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 01:40:52 +0000 Subject: [issue35601] Race condition in test_signal_handling_args x86-64 High Sierra 3.75 In-Reply-To: <1545968759.07.0.590219498678.issue35601@roundup.psfhosted.org> Message-ID: <1546047652.53.0.238753665217.issue35601@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10645 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:40:59 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 01:40:59 +0000 Subject: [issue35601] Race condition in test_signal_handling_args x86-64 High Sierra 3.75 In-Reply-To: <1545968759.07.0.590219498678.issue35601@roundup.psfhosted.org> Message-ID: <1546047659.05.0.656639626373.issue35601@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10645, 10646 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:41:06 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 01:41:06 +0000 Subject: [issue35601] Race condition in test_signal_handling_args x86-64 High Sierra 3.75 In-Reply-To: <1545968759.07.0.590219498678.issue35601@roundup.psfhosted.org> Message-ID: <1546047666.41.0.693891835269.issue35601@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10645, 10646, 10647 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:41:13 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 01:41:13 +0000 Subject: [issue35601] Race condition in test_signal_handling_args x86-64 High Sierra 3.75 In-Reply-To: <1545968759.07.0.590219498678.issue35601@roundup.psfhosted.org> Message-ID: <1546047673.65.0.520002711312.issue35601@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10647, 10650 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:41:21 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 01:41:21 +0000 Subject: [issue35601] Race condition in test_signal_handling_args x86-64 High Sierra 3.75 In-Reply-To: <1545968759.07.0.590219498678.issue35601@roundup.psfhosted.org> Message-ID: <1546047681.88.0.669731005571.issue35601@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10646, 10647, 10649, 10650 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:41:32 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 01:41:32 +0000 Subject: [issue35601] Race condition in test_signal_handling_args x86-64 High Sierra 3.75 In-Reply-To: <1545968759.07.0.590219498678.issue35601@roundup.psfhosted.org> Message-ID: <1546047692.59.0.734605321888.issue35601@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10646, 10647, 10648, 10649, 10650 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 21:01:02 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 02:01:02 +0000 Subject: [issue35601] Race condition in test_signal_handling_args x86-64 High Sierra 3.75 In-Reply-To: <1545968759.07.0.590219498678.issue35601@roundup.psfhosted.org> Message-ID: <1546048862.36.0.930641356557.issue35601@roundup.psfhosted.org> miss-islington added the comment: New changeset 8f9228dd3a37c98876c9c8ff7fb0042650303474 by Miss Islington (bot) in branch '3.7': bpo-35601: Alleviate race condition when waiting for SIGALRM in test_asyncio (GH-11337) https://github.com/python/cpython/commit/8f9228dd3a37c98876c9c8ff7fb0042650303474 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 21:50:04 2018 From: report at bugs.python.org (=?utf-8?b?55m956iz5bmz?=) Date: Sat, 29 Dec 2018 02:50:04 +0000 Subject: [issue35607] python3 multiprocessing queue deadlock when use thread and process at same time Message-ID: <1546051803.5.0.180583804125.issue35607@roundup.psfhosted.org> Change by ??? : ---------- components: Library (Lib) files: ??????.txt nosy: ??? priority: normal severity: normal status: open title: python3 multiprocessing queue deadlock when use thread and process at same time type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file48020/??????.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 21:50:31 2018 From: report at bugs.python.org (=?utf-8?b?55m956iz5bmz?=) Date: Sat, 29 Dec 2018 02:50:31 +0000 Subject: [issue35607] python3 multiprocessing queue deadlock when use thread and process at same time Message-ID: <1546051831.05.0.20767678372.issue35607@roundup.psfhosted.org> Change by ??? : Removed file: https://bugs.python.org/file48020/??????.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 21:50:42 2018 From: report at bugs.python.org (=?utf-8?b?55m956iz5bmz?=) Date: Sat, 29 Dec 2018 02:50:42 +0000 Subject: [issue35607] python3 multiprocessing queue deadlock when use thread and process at same time Message-ID: <1546051842.35.0.599440408676.issue35607@roundup.psfhosted.org> New submission from ??? : I used multi-processes to handle cpu intensive task,I have a thread reading data from stdin and put it to a input_queue, a thread get data from output_queue and write it to stdout, multiple processes get data from input queue,then handled the data,and put it to output_queue.But It some times will block forever,I doubt that it was because inappropriate to use the multiprocessing Queue,But I don't know how to solved it,can anyone help me? my code as follows: import multiprocessing import sys import threading import time from multiprocessing import Queue def write_to_stdout(result_queue: Queue): """write queue data to stdout""" while True: data = result_queue.get() if data is StopIteration: break sys.stdout.write(data) sys.stdout.flush() def read_from_stdin(queue): """read data from stdin, put it in queue for process handling""" try: for line in sys.stdin: queue.put(line) finally: queue.put(StopIteration) def process_func(input_queue, result_queue): """get data from input_queue,handled,put result into result_queue""" try: while True: data = input_queue.get() if data is StopIteration: break # cpu intensive task,use time.sleep instead # result = compute_something(data) time.sleep(0.1) result_queue.put(data) finally: # ensure every process end input_queue.put(StopIteration) if __name__ == '__main__': # queue for reading to stdout input_queue = Queue(1000) # queue for writing to stdout result_queue = Queue(1000) # thread reading data from stdin input_thread = threading.Thread(target=read_from_stdin, args=(input_queue,)) input_thread.start() # thread reading data from stdin output_thread = threading.Thread(target=write_to_stdout, args=(result_queue,)) output_thread.start() processes = [] cpu_count = multiprocessing.cpu_count() # start multi-process to handle some cpu intensive task for i in range(cpu_count): proc = multiprocessing.Process(target=process_func, args=(input_queue, result_queue)) proc.start() processes.append(proc) # joined input thread input_thread.join() # joined all task processes for proc in processes: proc.join() # ensure output thread end result_queue.put(StopIteration) # joined output thread output_thread.join() test environment: python3.6 ubuntu16.04 lts ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 21:52:08 2018 From: report at bugs.python.org (=?utf-8?b?55m956iz5bmz?=) Date: Sat, 29 Dec 2018 02:52:08 +0000 Subject: [issue35607] python3 multiprocessing queue deadlock when use thread and process at same time In-Reply-To: <1546051842.35.0.599440408676.issue35607@roundup.psfhosted.org> Message-ID: <1546051928.23.0.611809619649.issue35607@roundup.psfhosted.org> Change by ??? : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 21:53:43 2018 From: report at bugs.python.org (=?utf-8?b?55m956iz5bmz?=) Date: Sat, 29 Dec 2018 02:53:43 +0000 Subject: [issue35608] python3 multiprocessing queue deadlock when use thread and process at same time Message-ID: <1546052022.11.0.920360901938.issue35608@roundup.psfhosted.org> New submission from ??? : I used multi-processes to handle cpu intensive task,I have a thread reading data from stdin and put it to a input_queue, a thread get data from output_queue and write it to stdout, multiple processes get data from input queue,then handled the data,and put it to output_queue.But It some times will block forever,I doubt that it was because inappropriate to use the multiprocessing Queue,But I don't know how to solved it,can anyone help me? my code as follows: import multiprocessing import sys import threading import time from multiprocessing import Queue def write_to_stdout(result_queue: Queue): """write queue data to stdout""" while True: data = result_queue.get() if data is StopIteration: break sys.stdout.write(data) sys.stdout.flush() def read_from_stdin(queue): """read data from stdin, put it in queue for process handling""" try: for line in sys.stdin: queue.put(line) finally: queue.put(StopIteration) def process_func(input_queue, result_queue): """get data from input_queue,handled,put result into result_queue""" try: while True: data = input_queue.get() if data is StopIteration: break # cpu intensive task,use time.sleep instead # result = compute_something(data) time.sleep(0.1) result_queue.put(data) finally: # ensure every process end input_queue.put(StopIteration) if __name__ == '__main__': # queue for reading to stdout input_queue = Queue(1000) # queue for writing to stdout result_queue = Queue(1000) # thread reading data from stdin input_thread = threading.Thread(target=read_from_stdin, args=(input_queue,)) input_thread.start() # thread reading data from stdin output_thread = threading.Thread(target=write_to_stdout, args=(result_queue,)) output_thread.start() processes = [] cpu_count = multiprocessing.cpu_count() # start multi-process to handle some cpu intensive task for i in range(cpu_count): proc = multiprocessing.Process(target=process_func, args=(input_queue, result_queue)) proc.start() processes.append(proc) # joined input thread input_thread.join() # joined all task processes for proc in processes: proc.join() # ensure output thread end result_queue.put(StopIteration) # joined output thread output_thread.join() test environment: python3.6.5 ubuntu16.04 ---------- components: Library (Lib) messages: 332691 nosy: davin, pitrou, ??? priority: normal severity: normal status: open title: python3 multiprocessing queue deadlock when use thread and process at same time versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 21:54:13 2018 From: report at bugs.python.org (=?utf-8?b?55m956iz5bmz?=) Date: Sat, 29 Dec 2018 02:54:13 +0000 Subject: [issue35608] python3 multiprocessing queue deadlock when use thread and process at same time In-Reply-To: <1546052022.11.0.920360901938.issue35608@roundup.psfhosted.org> Message-ID: <1546052053.2.0.812595245961.issue35608@roundup.psfhosted.org> Change by ??? : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 21:54:45 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2018 02:54:45 +0000 Subject: [issue35570] 2to3 creates code using deprecated imp module In-Reply-To: <1545569917.75.0.0770528567349.issue35570@roundup.psfhosted.org> Message-ID: <1546052085.45.0.714818590816.issue35570@roundup.psfhosted.org> Terry J. Reedy added the comment: It was decided in #21446 to only backport the change, labelled an enhancement, to 3.7 and it is now too late to challenge that decision as 3.6 only gets security fixes. ---------- nosy: +terry.reedy resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Update reload fixer to use importlib instead of imp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:05:54 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Sat, 29 Dec 2018 03:05:54 +0000 Subject: [issue35609] Improve of abc.py docstring Message-ID: <1546052751.93.0.333388893142.issue35609@roundup.psfhosted.org> New submission from Emmanuel Arias : Hi! I prepare a little improve. I added some samples usage, some clarification and delete some whitespace unnecessary. Attach patch. Regards ---------- assignee: docs at python components: Documentation files: 0001-improve-abc.py-docstring.patch keywords: patch messages: 332693 nosy: docs at python, eamanu priority: normal severity: normal status: open title: Improve of abc.py docstring type: enhancement versions: Python 3.8 Added file: https://bugs.python.org/file48021/0001-improve-abc.py-docstring.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:06:56 2018 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Dec 2018 03:06:56 +0000 Subject: [issue35593] Register standard browser: Chrome In-Reply-To: <1545917779.17.0.514318907905.issue35593@roundup.psfhosted.org> Message-ID: <1546052816.33.0.414994856023.issue35593@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +10651 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:06:58 2018 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Dec 2018 03:06:58 +0000 Subject: [issue35593] Register standard browser: Chrome In-Reply-To: <1545917779.17.0.514318907905.issue35593@roundup.psfhosted.org> Message-ID: <1546052818.35.0.0319538306829.issue35593@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch, patch pull_requests: +10651, 10652 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:07:46 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Sat, 29 Dec 2018 03:07:46 +0000 Subject: [issue35608] python3 multiprocessing queue deadlock when use thread and process at same time In-Reply-To: <1546052022.11.0.920360901938.issue35608@roundup.psfhosted.org> Message-ID: <1546052866.09.0.578716808817.issue35608@roundup.psfhosted.org> Emmanuel Arias added the comment: Hi > def write_to_stdout(result_queue: Queue): I think that you have to write here a sleep. IMO this is blocking all. ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:10:03 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Sat, 29 Dec 2018 03:10:03 +0000 Subject: [issue35608] python3 multiprocessing queue deadlock when use thread and process at same time In-Reply-To: <1546052022.11.0.920360901938.issue35608@roundup.psfhosted.org> Message-ID: <1546053003.41.0.12683836572.issue35608@roundup.psfhosted.org> Emmanuel Arias added the comment: > data = result_queue.get() And this is blocked ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:15:50 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Sat, 29 Dec 2018 03:15:50 +0000 Subject: [issue35609] Improve of abc.py docstring In-Reply-To: <1546052751.93.0.333388893142.issue35609@roundup.psfhosted.org> Message-ID: <1546053350.62.0.343406104271.issue35609@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- pull_requests: +10653 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:15:56 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Sat, 29 Dec 2018 03:15:56 +0000 Subject: [issue35609] Improve of abc.py docstring In-Reply-To: <1546052751.93.0.333388893142.issue35609@roundup.psfhosted.org> Message-ID: <1546053356.52.0.346369212826.issue35609@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- pull_requests: +10653, 10654 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:16:02 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Sat, 29 Dec 2018 03:16:02 +0000 Subject: [issue35609] Improve of abc.py docstring In-Reply-To: <1546052751.93.0.333388893142.issue35609@roundup.psfhosted.org> Message-ID: <1546053362.26.0.382903161797.issue35609@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- pull_requests: +10653, 10654, 10655 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:19:01 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 29 Dec 2018 03:19:01 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1546053541.76.0.983944404245.issue35596@roundup.psfhosted.org> Steve Dower added the comment: I took a closer look at the diff since 3.7.1, and I'm not seeing anything either. I suspect we need to step through zipimport/importlib and figure out exactly where it rejects the .pyc files in the zip. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:27:35 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2018 03:27:35 +0000 Subject: [issue35593] Register standard browser: Chrome In-Reply-To: <1545917779.17.0.514318907905.issue35593@roundup.psfhosted.org> Message-ID: <1546054055.51.0.880749322.issue35593@roundup.psfhosted.org> Terry J. Reedy added the comment: As near as I can tell, this is *not* a duplicate of #8232. ---------- nosy: +terry.reedy stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:28:03 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2018 03:28:03 +0000 Subject: [issue35593] Register standard browser: Chrome In-Reply-To: <1545917779.17.0.514318907905.issue35593@roundup.psfhosted.org> Message-ID: <1546054083.3.0.807443675159.issue35593@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10652 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:48:45 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2018 03:48:45 +0000 Subject: [issue35594] Python script generating Segmentation Fault In-Reply-To: <1545924513.31.0.604345478264.issue35594@roundup.psfhosted.org> Message-ID: <1546055325.58.0.135858836457.issue35594@roundup.psfhosted.org> Terry J. Reedy added the comment: The script has 14 imports from 10 external packages, perhaps half of which include C code. In such cases, the crash is nearly always in the external package, and Daugeras has already identified a pandas routine. Daugeras, you can re-open if you gain evidence that the problem is in the cpython code we are responsible for. But you should start by stripping out as much as you can and if there are crashes in pandas, submit a report to its authors. ---------- nosy: +terry.reedy resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 23:48:34 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2018 04:48:34 +0000 Subject: [issue31858] IDLE: cleanup use of sys.ps1 and never set it. In-Reply-To: <1508824708.42.0.213398074469.issue31858@psf.upfronthosting.co.za> Message-ID: <1546058914.86.0.970832350412.issue31858@roundup.psfhosted.org> Terry J. Reedy added the comment: By mistake, I deleted the setting of context_use_ps1 in PyShell while still in use in several places. Fixed in #34055. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 00:02:33 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2018 05:02:33 +0000 Subject: [issue35610] IDLE: replace use of EditorWindow.context_use_ps1 Message-ID: <1546059751.61.0.784436952304.issue35610@roundup.psfhosted.org> New submission from Terry J. Reedy : Attribute .context_use_ps1 is False in EditorWindow and Outwin, True in PyShell. It is use to switch code paths in multiple classes. It is equal to isinstance(self/editwin, PyShell) (which requires an import). It has the same truth value as attribute .prompt_last_line, which is '' except in PyShell. This more informative attribute was added in #31858 to consolidate all PS1 handling in PyShell. A PR for #34055 proposed to remove the setting of .context_use_ps1 and the uses with .prompt_last_line. I will change the title after I submit this. I am not yet sure if this is the change I want to make. ---------- assignee: terry.reedy components: IDLE messages: 332700 nosy: cheryl.sabella, terry.reedy priority: normal severity: normal stage: patch review status: open title: IDLE: replace use of EditorWindow.context_use_ps1 type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 00:12:09 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 29 Dec 2018 05:12:09 +0000 Subject: [issue35610] IDLE: replace use of EditorWindow.context_use_ps1 In-Reply-To: <1546059751.61.0.784436952304.issue35610@roundup.psfhosted.org> Message-ID: <1546060329.66.0.32381754738.issue35610@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +10656 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 00:12:13 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 29 Dec 2018 05:12:13 +0000 Subject: [issue35610] IDLE: replace use of EditorWindow.context_use_ps1 In-Reply-To: <1546059751.61.0.784436952304.issue35610@roundup.psfhosted.org> Message-ID: <1546060333.09.0.1561606213.issue35610@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- keywords: +patch, patch pull_requests: +10656, 10657 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 00:15:22 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 29 Dec 2018 05:15:22 +0000 Subject: [issue35610] IDLE: replace use of EditorWindow.context_use_ps1 In-Reply-To: <1546059751.61.0.784436952304.issue35610@roundup.psfhosted.org> Message-ID: <1546060522.49.0.128282982669.issue35610@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +10658 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 01:00:16 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2018 06:00:16 +0000 Subject: [issue34055] IDLE: erroneous 'smart' indents in shell In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1546063216.46.0.173825040547.issue34055@roundup.psfhosted.org> Terry J. Reedy added the comment: Even before this fix, in 3.7.2, I no longer see the extra blank lines I reported in msg321135 either on Windows or macOS. I did still see the persistent and expanding indents reported in the opening post. I believe that this is what Raymond also referred to. The one I could reproduce are now gone. Hence, I close this. Remaining newline and indent issues should be handled in other issues. * I intend to review the initial PR for #32989 soon. I don't know what its effect might be on the user-visible result. * Too short indents for open fences needs a new issue. * Blank line before SyntaxError: interactive python does this. >>> d={a:'a} File "", line 1 d={a:'a} ^ SyntaxError: EOL while scanning string literal >>> The ^ line is nearly blank. IDLE omits the line echo and ^ and adds a red highlight instead ... + an invisible indent on the next line (now too short). (It also color-codes the error message.) >>> d={a:'a}<---red highlight to end of line... SyntaxError: EOL while scanning string literal >>> Checking syntax first and skipping indent on error would give the following. I don't know how easy this would be. >>> d={a:'a}<---red highlight to end of line... SyntaxError: EOL while scanning string literal >>> ---------- dependencies: -IDLE: Fix pyparse.find_good_parse_start and its bad editor call resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 01:00:17 2018 From: report at bugs.python.org (David Haney) Date: Sat, 29 Dec 2018 06:00:17 +0000 Subject: [issue35611] open doesn't call IncrementalEncoder with final=True Message-ID: <1546063215.14.0.206805691744.issue35611@roundup.psfhosted.org> New submission from David Haney : The implementation of open relies on a codecs' IncrementalEncoder, however it never calls `encode` with final=True. This appears to violate the documentation for IncrementalEncoder.encode which states that the last call to encode _must_ set final=True. The attached test case demonstrates this behavior. A codec "delayed" is implemented that holds the last encoded string until the next call to `encode`, at which point it returns the encoded string. When final=True, both the previous and current string are returned. When `codecs.iterencode` is used to encode a sequence of strings, the encode function is called for each element in the sequence, with final=False. encode is then called a final time with an empty string and final=True. When `open` is used to open a file stream for the encoding, each call to `write` calls `encode` with final=False, however it never calls `encode` with final=True, and it doesn't appear there's an API for forcing it to occur (for instance `flush` and `close` do not). ---------- components: IO files: test.py messages: 332701 nosy: haney priority: normal severity: normal status: open title: open doesn't call IncrementalEncoder with final=True type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48022/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 01:02:04 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2018 06:02:04 +0000 Subject: [issue34055] IDLE: erroneous 'smart' indents in shell In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1546063324.67.0.637978050657.issue34055@roundup.psfhosted.org> Terry J. Reedy added the comment: I 'moved' pr-11307 to #35610 by changing the title. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 01:10:49 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Sat, 29 Dec 2018 06:10:49 +0000 Subject: [issue28134] socket.socket(fileno=fd) does not work as documented In-Reply-To: <1473794011.65.0.923929152137.issue28134@psf.upfronthosting.co.za> Message-ID: <1546063849.94.0.629521191909.issue28134@roundup.psfhosted.org> Nathaniel Smith added the comment: Am I right that this is considered fixed (or at least as fixed as it can be), and the issue should be closed? Also, small note in case anyone stumbles across this in the future and is confused: Python does *not* handle this correctly on Windows. I suspect Christian was confused because there's an undocumented features on Windows where if you pass fileno=, then that correctly reinstantiates the socket object. But fileno= doesn't seem to do any special autodetection of type/family/proto. ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 02:00:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2018 07:00:06 +0000 Subject: [issue35611] open doesn't call IncrementalEncoder with final=True In-Reply-To: <1546063215.14.0.206805691744.issue35611@roundup.psfhosted.org> Message-ID: <1546066806.37.0.980577373344.issue35611@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- assignee: -> lemburg nosy: +doerwalter, lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 02:56:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2018 07:56:39 +0000 Subject: [issue35609] Improve of abc.py docstring In-Reply-To: <1546052751.93.0.333388893142.issue35609@roundup.psfhosted.org> Message-ID: <1546070199.17.0.0775909462125.issue35609@roundup.psfhosted.org> Serhiy Storchaka added the comment: Double spaces between sentences increase readability. This is not a bug. Since abstractclassmethod and like are deprecated and should not be used in new code, I do not see a value of extending their docstrings. Too verbose docstrings make using the module help less convenient. I would rather remove existing examples from docstrings. The module documentation contains more modern examples. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 03:07:06 2018 From: report at bugs.python.org (beruhan) Date: Sat, 29 Dec 2018 08:07:06 +0000 Subject: [issue35608] python3 multiprocessing queue deadlock when use thread and process at same time In-Reply-To: <1546052022.11.0.920360901938.issue35608@roundup.psfhosted.org> Message-ID: <1546070826.67.0.431909300139.issue35608@roundup.psfhosted.org> beruhan added the comment: debug message as follows: [DEBUG/MainProcess] created semlock with handle 140059486064640 [DEBUG/MainProcess] created semlock with handle 140059486060544 [DEBUG/MainProcess] created semlock with handle 140059486056448 [DEBUG/MainProcess] Queue._after_fork() [DEBUG/MainProcess] created semlock with handle 140059486052352 [DEBUG/MainProcess] created semlock with handle 140059486048256 [DEBUG/MainProcess] created semlock with handle 140059486044160 [DEBUG/MainProcess] Queue._after_fork() [DEBUG/MainProcess] Queue._start_thread() [DEBUG/MainProcess] doing self._thread.start() [DEBUG/MainProcess] starting thread to feed data to pipe [DEBUG/MainProcess] ... done self._thread.start() ^CTraceback (most recent call last): File "main_simple.py", line 76, in proc.join() File "/usr/lib/python3.6/multiprocessing/process.py", line 124, in join res = self._popen.wait(timeout) File "/usr/lib/python3.6/multiprocessing/popen_fork.py", line 50, in wait return self.poll(os.WNOHANG if timeout == 0.0 else 0) File "/usr/lib/python3.6/multiprocessing/popen_fork.py", line 28, in poll pid, sts = os.waitpid(self.pid, flag) KeyboardInterrupt ^CException ignored in: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 1294, in _shutdown t.join() File "/usr/lib/python3.6/threading.py", line 1056, in join self._wait_for_tstate_lock() File "/usr/lib/python3.6/threading.py", line 1072, in _wait_for_tstate_lock elif lock.acquire(block, timeout): KeyboardInterrupt [INFO/MainProcess] process shutting down [DEBUG/MainProcess] running all "atexit" finalizers with priority >= 0 [DEBUG/MainProcess] telling queue thread to quit [INFO/MainProcess] calling join() for process Process-3 ^CError in atexit._run_exitfuncs: Traceback (most recent call last): File "/usr/lib/python3.6/multiprocessing/popen_fork.py", line 28, in poll pid, sts = os.waitpid(self.pid, flag) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 03:53:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2018 08:53:19 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1546073599.37.0.386108531712.issue35603@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 78de01198b047347abc5e458851bb12c48429e24 by Serhiy Storchaka (Xtreak) in branch 'master': bpo-35603: Escape table header of make_table output that can cause potential XSS. (GH-11341) https://github.com/python/cpython/commit/78de01198b047347abc5e458851bb12c48429e24 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 03:53:35 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 08:53:35 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1546073615.64.0.95042174279.issue35603@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10659 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 03:53:39 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 08:53:39 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1546073619.77.0.67641079071.issue35603@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10659, 10660 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 03:53:44 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 08:53:44 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1546073624.33.0.423621173145.issue35603@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10661 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 03:53:47 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 08:53:47 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1546073627.55.0.00101336881765.issue35603@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10661, 10662 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 03:56:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2018 08:56:18 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1546073778.67.0.447328074834.issue35603@roundup.psfhosted.org> Serhiy Storchaka added the comment: Is 2.7 affected? This looks like potentially security issue, so it may be worth to backport the fix to 3.6 and 3.5. ---------- nosy: +larry, ned.deily type: behavior -> security versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 04:11:11 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 29 Dec 2018 09:11:11 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1546074671.99.0.531309233062.issue35603@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Yes, 2.7 is also affected at https://github.com/python/cpython/blob/befe3f7afdc5279b320af88a9e57f682c0172599/Lib/difflib.py#L2001 . I think it was missed during the initial addition in issue914575 and no one would be using it as a feature to have custom HTML directly injected in table header using fromdesc and todesc. So I hope this won't be breaking anyone on 2.7 and even with that headers can still be customized with CSS. Also as an additional note HtmlDiff.make_file internally uses make_table to construct full HTML file and that is also fixed. Maybe if one of the original authors of difflib would like to confirm it then it would be great. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 04:53:58 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 29 Dec 2018 09:53:58 +0000 Subject: [issue35608] python3 multiprocessing queue deadlock when use thread and process at same time In-Reply-To: <1546052022.11.0.920360901938.issue35608@roundup.psfhosted.org> Message-ID: <1546077238.74.0.478091179906.issue35608@roundup.psfhosted.org> Antoine Pitrou added the comment: Your input_thread puts StopIteration once input the queue. But there are several worker processes popping from that queue, and only one of them will see the StopIteration. So I'm not surprised other worker processes would be stuck waiting in their loop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 06:21:51 2018 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 29 Dec 2018 11:21:51 +0000 Subject: [issue35588] Speed up mod/divmod/floordiv for Fraction type In-Reply-To: <1545817172.57.0.712150888896.issue35588@roundup.psfhosted.org> Message-ID: <1546082511.61.0.0974731668516.issue35588@roundup.psfhosted.org> Mark Dickinson added the comment: > since the code with divmod() is simpler, I think it is worth to use it. +1 from me, and +1 on the PR in general. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 06:48:18 2018 From: report at bugs.python.org (Devika Sondhi) Date: Sat, 29 Dec 2018 11:48:18 +0000 Subject: [issue35612] Text wrap over text containing tab character Message-ID: <1546084097.18.0.541982298623.issue35612@roundup.psfhosted.org> New submission from Devika Sondhi : textwrap.wrap does not seem to preserve tab character ('\t') in the text if it is not separated from other characters by a space. Example: >>> textwrap.wrap("Here is\tone line of text that is going to be wrapped after 20 columns.",20) ['Here is one line of', 'text that is going', 'to be wrapped after', '20 columns.'] The tab is missing from the above output. However, for text with \t separated by space, the behavior is as expected (shown below). >>> textwrap.wrap("Here is \t one line of text that is going to be wrapped after 20 columns.",20) ['Here is one', 'line of text that is', 'going to be wrapped', 'after 20 columns.'] ---------- components: Tests messages: 332712 nosy: Devika Sondhi priority: normal severity: normal status: open title: Text wrap over text containing tab character versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 07:09:34 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 29 Dec 2018 12:09:34 +0000 Subject: [issue35612] Text wrap over text containing tab character In-Reply-To: <1546084097.18.0.541982298623.issue35612@roundup.psfhosted.org> Message-ID: <20181229120927.GJ13616@ando.pearwood.info> Steven D'Aprano added the comment: I think you may be misunderstanding what you are seeing. The documentation for textwrap.wrap says: By default, tabs in 'text' are expanded with string.expandtabs() which converts tabs to one or more spaces, enough to align to some multiple of column 8: py> "He is\tone".expandtabs() 'He is one' py> "Her is\tone".expandtabs() 'Her is one' py> "Here is\tone".expandtabs() 'Here is one' py> "THere is\tone".expandtabs() 'THere is one' Can you confirm that this is the behaviour you are seeing? If so, I think it is correct and this bug report can be closed. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 07:12:24 2018 From: report at bugs.python.org (Denton Liu) Date: Sat, 29 Dec 2018 12:12:24 +0000 Subject: [issue35155] Clarify Protocol Handlers in urllib.request Docs In-Reply-To: <1541286673.86.0.788709270274.issue35155@psf.upfronthosting.co.za> Message-ID: <1546085544.81.0.0759815665841.issue35155@roundup.psfhosted.org> Denton Liu added the comment: Pinging again for updates. Would appreciate a PR review. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 07:33:26 2018 From: report at bugs.python.org (Devika Sondhi) Date: Sat, 29 Dec 2018 12:33:26 +0000 Subject: [issue35612] Text wrap over text containing tab character In-Reply-To: <1546084097.18.0.541982298623.issue35612@roundup.psfhosted.org> Message-ID: <1546086806.2.0.93327942752.issue35612@roundup.psfhosted.org> Devika Sondhi added the comment: I wasn't aware of this. Thanks for clarifying ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 08:34:00 2018 From: report at bugs.python.org (Devika Sondhi) Date: Sat, 29 Dec 2018 13:34:00 +0000 Subject: [issue35613] Escaping string containing invalid characters as per XML Message-ID: <1546090438.84.0.909772702632.issue35613@roundup.psfhosted.org> New submission from Devika Sondhi : As per XML 1.0 and 1.1 specs, the null character is treated as invalid in an XML doc. (https://en.wikipedia.org/wiki/Valid_characters_in_XML) Shouldn't invalid xml characters be omitted while escaping? The current behavior(tested on Python 3.7) is as follows: >>> from xml.sax.saxutils import escape >>> escape("a\u0000\u0001\u0008\u000b\u000c\u000e\u001fb") 'a\x00\x01\x08\x0b\x0c\x0e\x1fb' ---------- messages: 332716 nosy: Devika Sondhi priority: normal severity: normal status: open title: Escaping string containing invalid characters as per XML versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 08:50:58 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Sat, 29 Dec 2018 13:50:58 +0000 Subject: [issue35609] Improve of abc.py docstring In-Reply-To: <1546052751.93.0.333388893142.issue35609@roundup.psfhosted.org> Message-ID: <1546091458.56.0.0967322741102.issue35609@roundup.psfhosted.org> Emmanuel Arias added the comment: > Double spaces between sentences increase readability. This is not a bug. hmm ok. I can see other docstring with not double spaces. But I will ignore. > Since abstractclassmethod and like are deprecated and should not be used in new code, I do not see a value of extending their docstrings. Ok, you are right. > Too verbose docstrings make using the module help less convenient. I would rather remove existing examples from docstrings. The module documentation contains more modern examples. Do you say that is convenient remove the examples? I can do it! But in defense of the examples on docstring I think those are good, because the are the most quickly reference when coding and those are use by IDE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 09:39:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2018 14:39:56 +0000 Subject: [issue35609] Improve of abc.py docstring In-Reply-To: <1546052751.93.0.333388893142.issue35609@roundup.psfhosted.org> Message-ID: <1546094396.87.0.464961533254.issue35609@roundup.psfhosted.org> Serhiy Storchaka added the comment: These examples teach you how to use abstractclassmethod and similar decorators. But first, docstrings are not tutorial, and second, you should not use them in new code at all, because they are deprecated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 10:02:19 2018 From: report at bugs.python.org (Katsuhiko YOSHIDA) Date: Sat, 29 Dec 2018 15:02:19 +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: <1546095739.7.0.952203446847.issue33661@roundup.psfhosted.org> Katsuhiko YOSHIDA added the comment: According to RFC7235 (https://tools.ietf.org/html/rfc7235#section-4.1), WWW-Authenticate header is sent from server to client. And it has not credential data. Also, Cookie2 header is already obsoleted by RFC6295 (https://tools.ietf.org/html/rfc6265). So, I think that both "Authorization" and "Cookie" are enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 10:21:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2018 15:21:52 +0000 Subject: [issue35614] Broken help() on metaclasses Message-ID: <1546096910.12.0.853369060665.issue35614@roundup.psfhosted.org> New submission from Serhiy Storchaka : $ ./python -m pydoc abc Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/runpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/serhiy/py/cpython/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 2765, in cli() File "/home/serhiy/py/cpython/Lib/pydoc.py", line 2727, in cli help.help(arg) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1967, in help elif request: doc(request, 'Help on %s:', output=self._output) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1690, in doc pager(render_doc(thing, title, forceload)) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1683, in render_doc return title % desc + '\n\n' + renderer.document(object, name) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 385, in document if inspect.ismodule(object): return self.docmodule(*args) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1182, in docmodule contents.append(self.document(value, key, name)) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 386, in document if inspect.isclass(object): return self.docclass(*args) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1258, in docclass (str(cls.__name__) for cls in object.__subclasses__() TypeError: descriptor '__subclasses__' of 'type' object needs an argument $ ./python -m pydoc enum Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/runpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/serhiy/py/cpython/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 2765, in cli() File "/home/serhiy/py/cpython/Lib/pydoc.py", line 2727, in cli help.help(arg) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1967, in help elif request: doc(request, 'Help on %s:', output=self._output) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1690, in doc pager(render_doc(thing, title, forceload)) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1683, in render_doc return title % desc + '\n\n' + renderer.document(object, name) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 385, in document if inspect.ismodule(object): return self.docmodule(*args) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1182, in docmodule contents.append(self.document(value, key, name)) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 386, in document if inspect.isclass(object): return self.docclass(*args) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1258, in docclass (str(cls.__name__) for cls in object.__subclasses__() TypeError: descriptor '__subclasses__' of 'type' object needs an argument "object" is a metaclass (abc.ABCMeta or enum.EnumMeta) in tracebacks above. The regression was introduced in issue8525. ---------- components: Library (Lib) messages: 332720 nosy: CuriousLearner, belopolsky, eric.araujo, ncoghlan, serhiy.storchaka priority: normal severity: normal status: open title: Broken help() on metaclasses type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 10:22:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2018 15:22:31 +0000 Subject: [issue8525] Display exceptions' subclasses in help() In-Reply-To: <1272150602.3.0.323796636819.issue8525@psf.upfronthosting.co.za> Message-ID: <1546096951.77.0.500433285317.issue8525@roundup.psfhosted.org> Serhiy Storchaka added the comment: This caused a regression. See issue35614 for details. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 10:28:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2018 15:28:18 +0000 Subject: [issue35609] Improve of abc.py docstring In-Reply-To: <1546052751.93.0.333388893142.issue35609@roundup.psfhosted.org> Message-ID: <1546097298.68.0.98943396435.issue35609@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +10664 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 10:28:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2018 15:28:26 +0000 Subject: [issue35609] Improve of abc.py docstring In-Reply-To: <1546052751.93.0.333388893142.issue35609@roundup.psfhosted.org> Message-ID: <1546097306.31.0.00514986722489.issue35609@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +10664, 10665 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 10:28:33 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2018 15:28:33 +0000 Subject: [issue35609] Improve of abc.py docstring In-Reply-To: <1546052751.93.0.333388893142.issue35609@roundup.psfhosted.org> Message-ID: <1546097313.35.0.262804348625.issue35609@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +10664, 10665, 10666 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 10:41:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2018 15:41:34 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1546098094.35.0.883294975684.issue35603@roundup.psfhosted.org> Serhiy Storchaka added the comment: After some thoughts, I'm no longer sure that this is a correct change. The user can use this for highlighting the part of the column header, adding links or images, displaying complex multiline headers. I suspect that this change will break some existing code that uses difflib.HtmlDiff.make_table() properly, passing escaped strings. I think now that this change should be reverted, and we should document instead that "fromdesc" and "todesc" are interpreted as an HTML text, and user data should be properly escaped for using in headers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 10:42:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2018 15:42:13 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1546098133.01.0.531736490279.issue35603@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +10667 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 10:42:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2018 15:42:22 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1546098142.8.0.518742339352.issue35603@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +10667, 10668 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 10:42:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2018 15:42:32 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1546098152.55.0.816745737015.issue35603@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +10667, 10668, 10669 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 11:00:39 2018 From: report at bugs.python.org (Tim Peters) Date: Sat, 29 Dec 2018 16:00:39 +0000 Subject: [issue35608] python3 multiprocessing queue deadlock when use thread and process at same time In-Reply-To: <1546052022.11.0.920360901938.issue35608@roundup.psfhosted.org> Message-ID: <1546099239.54.0.358109265391.issue35608@roundup.psfhosted.org> Tim Peters added the comment: Antoine, alas, it's subtler than that. The worker process (process_func()) puts _another_ `StopIteration` on the input queue in its `finally` clause. So the first worker process to finish adds back a sentinel for the next worker to see, and so on. At the end, one StopIteration is left on input_queue (added by the last worker to finish). Everything shuts down cleanly for me on 64-bit Win10 Py 3.7.2 no matter what input I tried, so I can't reproduce. The OP really needs to identify _where_ it's hanging, and when (after all input has been read? somewhere "random in the middle"? ...), and if at all possible supply an input on which it does hang. The OP should also try 3.7.2. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 11:09:24 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 29 Dec 2018 16:09:24 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1546099764.4.0.546337782939.issue35603@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks Serhiy for the input. I initially thought this should be escaped since content was escaped and the same for header since user input taken directly could result in XSS. Maybe someone might using this undocumented feature intentionally that might not be worth breaking. I will make a PR for this to be noted in docs that the parameters are interpreted as HTML. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 11:44:51 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 29 Dec 2018 16:44:51 +0000 Subject: [issue35613] Escaping string containing invalid characters as per XML In-Reply-To: <1546090438.84.0.909772702632.issue35613@roundup.psfhosted.org> Message-ID: <1546101891.41.0.694179760256.issue35613@roundup.psfhosted.org> Ned Deily added the comment: This question has come up before. See Issue13648 where it was pointed out that null characters "are forbidden both in raw form *and* in escaped form. So even if they get escaped, they *still* will lead to errors. So there is no point in escaping them." ---------- nosy: +ned.deily resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> xml.sax.saxutils.escape does not escapes \x00 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 12:35:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2018 17:35:51 +0000 Subject: [issue35614] Broken help() on metaclasses In-Reply-To: <1546096910.12.0.853369060665.issue35614@roundup.psfhosted.org> Message-ID: <1546104951.31.0.0574381008838.issue35614@roundup.psfhosted.org> Serhiy Storchaka added the comment: It fails also for builtin "type". $ ./python -m pydoc type Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/runpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/serhiy/py/cpython/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 2765, in cli() File "/home/serhiy/py/cpython/Lib/pydoc.py", line 2727, in cli help.help(arg) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1967, in help elif request: doc(request, 'Help on %s:', output=self._output) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1690, in doc pager(render_doc(thing, title, forceload)) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1683, in render_doc return title % desc + '\n\n' + renderer.document(object, name) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 386, in document if inspect.isclass(object): return self.docclass(*args) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1258, in docclass (str(cls.__name__) for cls in object.__subclasses__() TypeError: descriptor '__subclasses__' of 'type' object needs an argument ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 12:51:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2018 17:51:31 +0000 Subject: [issue35614] Broken help() on metaclasses In-Reply-To: <1546096910.12.0.853369060665.issue35614@roundup.psfhosted.org> Message-ID: <1546105891.99.0.220767699379.issue35614@roundup.psfhosted.org> Serhiy Storchaka added the comment: There are two ways of solving this issue: 1) skip this chunk of code if object is a type subclass, 2) use `type.__subclasses__(object)` instead of `object.__subclasses__()`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 12:56:32 2018 From: report at bugs.python.org (Gagan) Date: Sat, 29 Dec 2018 17:56:32 +0000 Subject: [issue35583] (glibc2.28/MIPS32EL) python 3.7.x interpreter segmentation fault (3.6.x/2.7.x compile fine) In-Reply-To: <1545766743.84.0.712150888896.issue35583@roundup.psfhosted.org> Message-ID: <1546106192.31.0.804559166217.issue35583@roundup.psfhosted.org> Gagan added the comment: hello everyone. the core problem was that the 3.x series configure file includes a "-lintl" flag when it discovers the libintl header. in 2.x, this was not the case. so when configure is checking for wchar_t, the inclusion of -lintl (as opposed to libgnuintl, which is what i have), it fails and returns 0 which is then the SIZEOF_WCHAR_T in the pyconfig.h file. it turns out Modules/main.c relies more on wchar_t in 3.7 than it does in 3.6.x, which is why i did not see this problem arise when compiling the interpreter to complete module compilation (and tests). however, in 3.7.x, there is additional use of wchar_t and thus the segmentation faults (allocating 0 bytes). hope this helps others who may compile the GNU flavour of libintl (see https://lists.gnu.org/archive/html/bug-gnu-utils/2010-07/msg00002.html for more information. i learned a little too). CHEERS EH ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 13:45:26 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Sat, 29 Dec 2018 18:45:26 +0000 Subject: [issue35614] Broken help() on metaclasses In-Reply-To: <1546096910.12.0.853369060665.issue35614@roundup.psfhosted.org> Message-ID: <1546109126.23.0.982101471701.issue35614@roundup.psfhosted.org> Change by Sanyam Khurana : ---------- keywords: +patch pull_requests: +10670 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 13:45:36 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Sat, 29 Dec 2018 18:45:36 +0000 Subject: [issue35614] Broken help() on metaclasses In-Reply-To: <1546096910.12.0.853369060665.issue35614@roundup.psfhosted.org> Message-ID: <1546109136.88.0.07468638275.issue35614@roundup.psfhosted.org> Change by Sanyam Khurana : ---------- keywords: +patch, patch pull_requests: +10670, 10671 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 13:45:45 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Sat, 29 Dec 2018 18:45:45 +0000 Subject: [issue35614] Broken help() on metaclasses In-Reply-To: <1546096910.12.0.853369060665.issue35614@roundup.psfhosted.org> Message-ID: <1546109145.12.0.669201961.issue35614@roundup.psfhosted.org> Change by Sanyam Khurana : ---------- keywords: +patch, patch, patch pull_requests: +10670, 10671, 10672 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 14:18:42 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 29 Dec 2018 19:18:42 +0000 Subject: [issue35602] cleanup code may fail in test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests In-Reply-To: <1545970910.26.0.567308733358.issue35602@roundup.psfhosted.org> Message-ID: <1546111122.25.0.447739931011.issue35602@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset d51324a2f5d172665f8824b25456c9822797fc84 by Pablo Galindo in branch 'master': bpo-35602: Make sure the transport is always closed in SelectorEventLoopUnixSockSendfileTests (GH-11338) https://github.com/python/cpython/commit/d51324a2f5d172665f8824b25456c9822797fc84 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 14:19:02 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 19:19:02 +0000 Subject: [issue35602] cleanup code may fail in test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests In-Reply-To: <1545970910.26.0.567308733358.issue35602@roundup.psfhosted.org> Message-ID: <1546111142.48.0.288740632335.issue35602@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10673 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 14:19:09 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 19:19:09 +0000 Subject: [issue35602] cleanup code may fail in test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests In-Reply-To: <1545970910.26.0.567308733358.issue35602@roundup.psfhosted.org> Message-ID: <1546111149.18.0.150220250167.issue35602@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10673, 10674 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 14:19:16 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 19:19:16 +0000 Subject: [issue35602] cleanup code may fail in test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests In-Reply-To: <1545970910.26.0.567308733358.issue35602@roundup.psfhosted.org> Message-ID: <1546111156.23.0.551638927548.issue35602@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10673, 10674, 10675 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 14:36:51 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 29 Dec 2018 19:36:51 +0000 Subject: [issue35601] Race condition in test_signal_handling_args x86-64 High Sierra 3.75 In-Reply-To: <1545968759.07.0.590219498678.issue35601@roundup.psfhosted.org> Message-ID: <1546112211.58.0.0205153725527.issue35601@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I am going to close this one as the only branch left is 3.6 and is on security fixes only. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 14:38:26 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 29 Dec 2018 19:38:26 +0000 Subject: [issue35602] cleanup code may fail in test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests In-Reply-To: <1545970910.26.0.567308733358.issue35602@roundup.psfhosted.org> Message-ID: <1546112306.33.0.4913824697.issue35602@roundup.psfhosted.org> miss-islington added the comment: New changeset fe06646d186780881fa5ee61442886a6d7cf9f08 by Miss Islington (bot) in branch '3.7': bpo-35602: Make sure the transport is always closed in SelectorEventLoopUnixSockSendfileTests (GH-11338) https://github.com/python/cpython/commit/fe06646d186780881fa5ee61442886a6d7cf9f08 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 15:14:04 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 29 Dec 2018 20:14:04 +0000 Subject: [issue35602] cleanup code may fail in test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests In-Reply-To: <1545970910.26.0.567308733358.issue35602@roundup.psfhosted.org> Message-ID: <1546114444.32.0.427850977134.issue35602@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 15:34:50 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 29 Dec 2018 20:34:50 +0000 Subject: [issue35578] Add test for Argument Clinic converters In-Reply-To: <1545669685.38.0.712150888896.issue35578@roundup.psfhosted.org> Message-ID: <1546115690.84.0.816821120968.issue35578@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Is there anything left in this issue or we can close it? ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 15:44:32 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 29 Dec 2018 20:44:32 +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: <1546116272.6.0.415069021399.issue20171@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Should we close this issue or is anything left in this Derby? ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 15:45:39 2018 From: report at bugs.python.org (Fish Wang) Date: Sat, 29 Dec 2018 20:45:39 +0000 Subject: [issue35615] "RuntimeError: Dictionary changed size during iteration" when copying a WeakValueDictionary Message-ID: <1546116337.91.0.423915840639.issue35615@roundup.psfhosted.org> New submission from Fish Wang : I come across this issue recently when developing a multi-threaded PySide2 (Qt) application. When I'm calling .copy() on a WeakValueDictionary, there is a high chance that my application crashes with the following stack backtrace: ------ Traceback (most recent call last): File "F:\angr\angr-management\angrmanagement\ui\widgets\qdisasm_graph.py", line 239, in mouseDoubleClickEvent block.on_mouse_doubleclicked(event.button(), self._to_graph_pos(event.pos())) File "F:\angr\angr-management\angrmanagement\ui\widgets\qblock.py", line 130, in on_mouse_doubleclicked obj.on_mouse_doubleclicked(button, pos) File "F:\angr\angr-management\angrmanagement\ui\widgets\qinstruction.py", line 128, in on_mouse_doubleclicked op.on_mouse_doubleclicked(button, pos) File "F:\angr\angr-management\angrmanagement\ui\widgets\qoperand.py", line 162, in on_mouse_doubleclicked self.disasm_view.jump_to(self._branch_target, src_ins_addr=self.insn.addr) File "F:\angr\angr-management\angrmanagement\ui\views\disassembly_view.py", line 258, in jump_to self._jump_to(addr) File "F:\angr\angr-management\angrmanagement\ui\views\disassembly_view.py", line 372, in _jump_to self._display_function(function) File "F:\angr\angr-management\angrmanagement\ui\views\disassembly_view.py", line 343, in _display_function vr = self.workspace.instance.project.analyses.VariableRecoveryFast(the_func) File "f:\angr\angr\angr\analyses\analysis.py", line 109, in __call__ oself.__init__(*args, **kwargs) File "f:\angr\angr\angr\analyses\variable_recovery\variable_recovery_fast.py", line 618, in __init__ self._analyze() File "f:\angr\angr\angr\analyses\forward_analysis.py", line 557, in _analyze self._analysis_core_graph() File "f:\angr\angr\angr\analyses\forward_analysis.py", line 580, in _analysis_core_graph changed, output_state = self._run_on_node(n, job_state) File "f:\angr\angr\angr\analyses\variable_recovery\variable_recovery_fast.py", line 712, in _run_on_node input_state = prev_state.merge(input_state, successor=node.addr) File "f:\angr\angr\angr\analyses\variable_recovery\variable_recovery_fast.py", line 488, in merge merged_register_region = self.register_region.copy().replace(replacements).merge(other.register_region, File "f:\angr\angr\angr\keyed_region.py", line 159, in copy kr._object_mapping = self._object_mapping.copy() File "D:\My Program Files\Python37\lib\weakref.py", line 174, in copy for key, wr in self.data.items(): RuntimeError: dictionary changed size during iteration ------ I went ahead and read the related methods in Lib\weakref.py, and it seems to me that the WeakValueDictionary.copy() method is missing the protection of an _IterationGuard: It is iterating through self.data.items(), which, might have entries removed because of GC during the iteration. It seems that this crash can be fixed by wrapping the iteration with `with _IterationGuard(self):`. It worked for me in my tests. If my above analysis is correct, the following methods all require protection of _IterationGuard (which are currently missing): - WeakValueDictionary.copy() - WeakValueDictionary.__deepcopy__() - WeakKeyDictionary.copy() - WeakKeyDictionary.__deepcopy__() Please let me know if this is a legitimate issue, in which case I will be happy to provide a patch. Thanks. ---------- components: Library (Lib) messages: 332734 nosy: Fish Wang priority: normal severity: normal status: open title: "RuntimeError: Dictionary changed size during iteration" when copying a WeakValueDictionary type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 16:04:55 2018 From: report at bugs.python.org (Jeff Robbins) Date: Sat, 29 Dec 2018 21:04:55 +0000 Subject: [issue35599] asyncio windows_events.py IocpProactor bug In-Reply-To: <1545960124.09.0.284140631848.issue35599@roundup.psfhosted.org> Message-ID: <1546117495.12.0.287987178439.issue35599@roundup.psfhosted.org> Jeff Robbins added the comment: This issue is likely a duplicate of https://bugs.python.org/issue34323 which was reported in Python 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:00:06 2018 From: report at bugs.python.org (Julien Palard) Date: Sat, 29 Dec 2018 22:00:06 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1546120806.69.0.0548198365463.issue35605@roundup.psfhosted.org> Julien Palard added the comment: The patch (try/except) to make https://github.com/python/cpython/pull/11251/files work with what Doc/conf.py says about minimum sphinx version (1.2) is OK for me. No need to apply it on 3.7 which needs_sphinx 1.6.6 according to its Doc/conf.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:06:56 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 29 Dec 2018 22:06:56 +0000 Subject: [issue35606] Add prod() function to the math module In-Reply-To: <1546025352.75.0.868813504694.issue35606@roundup.psfhosted.org> Message-ID: <1546121216.42.0.933776494998.issue35606@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +10676 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:07:04 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 29 Dec 2018 22:07:04 +0000 Subject: [issue35606] Add prod() function to the math module In-Reply-To: <1546025352.75.0.868813504694.issue35606@roundup.psfhosted.org> Message-ID: <1546121224.85.0.714467397709.issue35606@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch, patch pull_requests: +10676, 10677 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:07:12 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 29 Dec 2018 22:07:12 +0000 Subject: [issue35606] Add prod() function to the math module In-Reply-To: <1546025352.75.0.868813504694.issue35606@roundup.psfhosted.org> Message-ID: <1546121232.08.0.841319649448.issue35606@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch, patch, patch pull_requests: +10676, 10677, 10678 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:08:52 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 29 Dec 2018 22:08:52 +0000 Subject: [issue35606] Add prod() function to the math module In-Reply-To: <1546025352.75.0.868813504694.issue35606@roundup.psfhosted.org> Message-ID: <1546121332.4.0.585762567867.issue35606@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: -10678 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:09:02 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 29 Dec 2018 22:09:02 +0000 Subject: [issue35606] Add prod() function to the math module In-Reply-To: <1546025352.75.0.868813504694.issue35606@roundup.psfhosted.org> Message-ID: <1546121342.34.0.906541369768.issue35606@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: -10677, 10678 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:31:39 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 29 Dec 2018 22:31:39 +0000 Subject: [issue33234] Improve list() pre-sizing for inputs with known lengths In-Reply-To: <1522964813.15.0.682650639539.issue33234@psf.upfronthosting.co.za> Message-ID: <1546122699.35.0.208760633966.issue33234@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 0e5f771f38138714415f665651de7e674fcebc38 by Pablo Galindo (Sergey Fedoseev) in branch 'master': bpo-33234: Simplify list_preallocate_exact() (GH-11220) https://github.com/python/cpython/commit/0e5f771f38138714415f665651de7e674fcebc38 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:33:35 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 29 Dec 2018 22:33:35 +0000 Subject: [issue33234] Improve list() pre-sizing for inputs with known lengths In-Reply-To: <1522964813.15.0.682650639539.issue33234@psf.upfronthosting.co.za> Message-ID: <1546122815.76.0.941270520235.issue33234@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:59:05 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 29 Dec 2018 22:59:05 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546124345.71.0.169577471361.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +10679 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:59:09 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 29 Dec 2018 22:59:09 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546124349.97.0.688447384428.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +10679, 10680 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:59:15 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 29 Dec 2018 22:59:15 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546124355.29.0.915613871431.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +10679, 10680, 10681 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 18:00:36 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 29 Dec 2018 23:00:36 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546124436.54.0.332772315298.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: -10680 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 18:00:47 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 29 Dec 2018 23:00:47 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546124447.13.0.609694085057.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: -10681 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 18:03:30 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 29 Dec 2018 23:03:30 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546124610.2.0.352347090218.issue35598@roundup.psfhosted.org> Cheryl Sabella added the comment: PR11360 adds tests to increase coverage. There isn't any refactor (moving translate_key) as part of this. I also didn't add any GUI-related tests against the buttons, entry, or listbox, except for the cancel key (in case that helps with the new bug reported). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 19:00:51 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 30 Dec 2018 00:00:51 +0000 Subject: [issue17404] ValueError: can't have unbuffered text I/O for io.open(1, 'wt', 0) In-Reply-To: <1363099360.99.0.903638972832.issue17404@psf.upfronthosting.co.za> Message-ID: <1546128051.46.0.441587119977.issue17404@roundup.psfhosted.org> Martin Panter added the comment: It is documented that buffering=0 is not supported in text mode. Look a handful of paragraphs down from : ?Pass 0 to switch buffering off (only allowed in binary mode)? Amaury?s problem with the IDNA buffering encoder has now been reported separately in Issue 35611. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 19:06:01 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 30 Dec 2018 00:06:01 +0000 Subject: [issue35611] open doesn't call IncrementalEncoder with final=True In-Reply-To: <1546063215.14.0.206805691744.issue35611@roundup.psfhosted.org> Message-ID: <1546128361.15.0.957946540088.issue35611@roundup.psfhosted.org> Martin Panter added the comment: FWIW this happens with the built-in IDNA codec, and Amaury gave a demonstration under . I don?t think the ?TextIOWrapper.flush? method should use final=True, but ?close? and ?detach? probably should. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 19:55:30 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 30 Dec 2018 00:55:30 +0000 Subject: [issue35540] dataclasses.asdict breaks with defaultdict fields In-Reply-To: <1545257204.19.0.788709270274.issue35540@psf.upfronthosting.co.za> Message-ID: <1546131330.94.0.587737049873.issue35540@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +10682 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 19:55:38 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 30 Dec 2018 00:55:38 +0000 Subject: [issue35540] dataclasses.asdict breaks with defaultdict fields In-Reply-To: <1545257204.19.0.788709270274.issue35540@psf.upfronthosting.co.za> Message-ID: <1546131338.74.0.92266724078.issue35540@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch, patch pull_requests: +10682, 10683 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 19:55:46 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 30 Dec 2018 00:55:46 +0000 Subject: [issue35540] dataclasses.asdict breaks with defaultdict fields In-Reply-To: <1545257204.19.0.788709270274.issue35540@psf.upfronthosting.co.za> Message-ID: <1546131346.46.0.495777291093.issue35540@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch, patch, patch pull_requests: +10682, 10683, 10684 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 20:09:46 2018 From: report at bugs.python.org (Gagan) Date: Sun, 30 Dec 2018 01:09:46 +0000 Subject: [issue35583] (glibc2.28/MIPS32EL) python 3.7.x interpreter segmentation fault (3.6.x/2.7.x compile fine) In-Reply-To: <1545766743.84.0.712150888896.issue35583@roundup.psfhosted.org> Message-ID: <1546132186.87.0.108375740188.issue35583@roundup.psfhosted.org> Change by Gagan : ---------- resolution: not a bug -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 20:25:41 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 30 Dec 2018 01:25:41 +0000 Subject: [issue35540] dataclasses.asdict breaks with defaultdict fields In-Reply-To: <1545257204.19.0.788709270274.issue35540@psf.upfronthosting.co.za> Message-ID: <1546133141.16.0.0189397631096.issue35540@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi @wrmsr, this happens because the constructor for `collections.defaultdict` differs from the one of `dict`. I think the argument that collections.defaultdict is in the stdlib and should be supported is right, the changes in PR #11361 should do what you want. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:25:12 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Dec 2018 04:25:12 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546143912.39.0.863506618716.issue35598@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset b0a6196ffd58ff91462191f426706897dc920eee by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-35598: IDLE: Increase test coverage for config_key.py (#11360) https://github.com/python/cpython/commit/b0a6196ffd58ff91462191f426706897dc920eee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:25:33 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 30 Dec 2018 04:25:33 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546143933.88.0.0437245336943.issue35598@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10685 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:25:39 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 30 Dec 2018 04:25:39 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546143939.63.0.528075885295.issue35598@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10685, 10686 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:25:46 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 30 Dec 2018 04:25:46 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546143946.58.0.637921099583.issue35598@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10685, 10686, 10687 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:25:55 2018 From: report at bugs.python.org (Laurent Gautier) Date: Sun, 30 Dec 2018 04:25:55 +0000 Subject: [issue34778] Memoryview for column-major (f_contiguous) arrays from bytes impossible to achieve In-Reply-To: <1537725098.47.0.956365154283.issue34778@psf.upfronthosting.co.za> Message-ID: <1546143955.07.0.981920044161.issue34778@roundup.psfhosted.org> Laurent Gautier added the comment: Bump. What are the next steps here ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:39:29 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 30 Dec 2018 04:39:29 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546144769.86.0.617630217485.issue35598@roundup.psfhosted.org> miss-islington added the comment: New changeset 34aadec448f373b95653318e91f6f959354ffa89 by Miss Islington (bot) in branch '3.7': bpo-35598: IDLE: Increase test coverage for config_key.py (GH-11360) https://github.com/python/cpython/commit/34aadec448f373b95653318e91f6f959354ffa89 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:52:23 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Dec 2018 04:52:23 +0000 Subject: [issue35616] Change references to '4.0'. Message-ID: <1546145542.58.0.745728606206.issue35616@roundup.psfhosted.org> New submission from Terry J. Reedy : https://docs.python.org/3/c-api/unicode.html#deprecated-py-unicode-apis says "Deprecated since version 3.3, will be removed in version 4.0." (I am aware that the quote above was written before we decided that '3.9' should be followed by '3.10' rather than '4.0' to avoid giving mis-impressions.) There is currently no plan for a '4.0' and part of the reason is that it stirs up unnecessary negative feeling in people. For example: https://stackoverflow.com/questions/53899931/why-does-an-empty-string-in-python-sometimes-take-up-49-bytes-and-sometimes-51 The second most upvoted comment (9) is "seeing a reference to a "[Python] 4.0" is giving me anxiety..." ? Mike Caron (11000+ reputation). We, as well as they, don't need this. When '4.0' was used in an asyncio deprecation, it was changed. Let us do the same elsewhere. ---------- assignee: docs at python components: Documentation messages: 332745 nosy: docs at python, terry.reedy, vstinner priority: normal severity: normal stage: needs patch status: open title: Change references to '4.0'. versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 00:50:27 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Sun, 30 Dec 2018 05:50:27 +0000 Subject: [issue35616] Change references to '4.0'. In-Reply-To: <1546145542.58.0.745728606206.issue35616@roundup.psfhosted.org> Message-ID: <1546149027.02.0.410074922597.issue35616@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- keywords: +patch pull_requests: +10688 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 00:50:33 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Sun, 30 Dec 2018 05:50:33 +0000 Subject: [issue35616] Change references to '4.0'. In-Reply-To: <1546145542.58.0.745728606206.issue35616@roundup.psfhosted.org> Message-ID: <1546149033.76.0.775256628308.issue35616@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- keywords: +patch, patch pull_requests: +10688, 10689 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 00:50:39 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Sun, 30 Dec 2018 05:50:39 +0000 Subject: [issue35616] Change references to '4.0'. In-Reply-To: <1546145542.58.0.745728606206.issue35616@roundup.psfhosted.org> Message-ID: <1546149039.07.0.0581793077469.issue35616@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- keywords: +patch, patch, patch pull_requests: +10688, 10689, 10690 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 01:07:33 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Dec 2018 06:07:33 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546150053.98.0.126379338529.issue35598@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10687 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 01:07:50 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Dec 2018 06:07:50 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546150070.61.0.668550537812.issue35598@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10686 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 01:19:40 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Sun, 30 Dec 2018 06:19:40 +0000 Subject: [issue35616] Change references to '4.0'. In-Reply-To: <1546145542.58.0.745728606206.issue35616@roundup.psfhosted.org> Message-ID: <1546150780.31.0.513711490323.issue35616@roundup.psfhosted.org> Emmanuel Arias added the comment: Same similar occur with other docs $ git grep 'deprecated-removed::.*4\.0' Doc/c-api/arg.rst: .. deprecated-removed:: 3.3 4.0 Doc/c-api/arg.rst: .. deprecated-removed:: 3.3 4.0 Doc/c-api/arg.rst: .. deprecated-removed:: 3.3 4.0 Doc/c-api/arg.rst: .. deprecated-removed:: 3.3 4.0 Doc/c-api/long.rst: .. deprecated-removed:: 3.3 4.0 Doc/library/array.rst: .. deprecated-removed:: 3.3 4.0 Doc/library/functions.rst: .. deprecated-removed:: 3.4 4.0 ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 04:24:13 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 30 Dec 2018 09:24:13 +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: <1546161853.2.0.685970286014.issue32492@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 3f5fc70c6213008243e7d605f7d8a2d8f94cf919 by Raymond Hettinger (Pablo Galindo) in branch 'master': bpo-32492: 1.6x speed up in namedtuple attribute access using C fast-path (#10495) https://github.com/python/cpython/commit/3f5fc70c6213008243e7d605f7d8a2d8f94cf919 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 04:24:55 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 30 Dec 2018 09:24:55 +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: <1546161895.57.0.295600393116.issue32492@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 04:32:19 2018 From: report at bugs.python.org (Simon Fagerholm) Date: Sun, 30 Dec 2018 09:32:19 +0000 Subject: [issue35617] unittest discover does not work with implicit namespaces Message-ID: <1546162337.0.0.646769357962.issue35617@roundup.psfhosted.org> New submission from Simon Fagerholm : When "python -m unittest discover" is run in a folder that is an implicit namespace package with the structure as below, no tests are discovered. The condition that the tests must be importable from the top level directory is fulfilled and has been tested by importing the tests from the top level. I did some investigating and have a PR underway that seems to fix it Example project structure is: . ??? requirements.txt ??? main.py ??? tests ??? unit ? ??? test_thing1.py ??? integration.py ??? test_integration_thing1.py ---------- components: Library (Lib) messages: 332748 nosy: Simon Fagerholm priority: normal severity: normal status: open title: unittest discover does not work with implicit namespaces type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 04:51:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2018 09:51:02 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1546163462.59.0.0647060099546.issue20182@roundup.psfhosted.org> Serhiy Storchaka added the comment: PR 9213 added a compiler warning: In file included from /home/serhiy/py/cpython/Modules/_hashopenssl.c:69:0: /home/serhiy/py/cpython/Modules/clinic/_hashopenssl.c.h:90:1: warning: ?EVP_tp_init? defined but not used [-Wunused-function] EVP_tp_init(PyObject *self, PyObject *args, PyObject *kwargs) ^~~~~~~~~~~ help(_hashlib.HASH) shows now the signature of the constructor of the object. But a hash object can not be created using it. class HASH(builtins.object) | HASH(name, string=b'') | | A hash is an object used to calculate a checksum of a string of information. ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 04:53:11 2018 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Dec 2018 09:53:11 +0000 Subject: [issue35617] unittest discover does not work with implicit namespaces In-Reply-To: <1546162337.0.0.646769357962.issue35617@roundup.psfhosted.org> Message-ID: <1546163591.99.0.653165543864.issue35617@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +10691 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 04:53:15 2018 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Dec 2018 09:53:15 +0000 Subject: [issue35617] unittest discover does not work with implicit namespaces In-Reply-To: <1546162337.0.0.646769357962.issue35617@roundup.psfhosted.org> Message-ID: <1546163595.03.0.0474956094533.issue35617@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch, patch pull_requests: +10691, 10692 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 04:53:17 2018 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Dec 2018 09:53:17 +0000 Subject: [issue35617] unittest discover does not work with implicit namespaces In-Reply-To: <1546162337.0.0.646769357962.issue35617@roundup.psfhosted.org> Message-ID: <1546163597.9.0.873584854968.issue35617@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch, patch, patch pull_requests: +10691, 10692, 10693 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 04:53:21 2018 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Dec 2018 09:53:21 +0000 Subject: [issue35617] unittest discover does not work with implicit namespaces In-Reply-To: <1546162337.0.0.646769357962.issue35617@roundup.psfhosted.org> Message-ID: <1546163601.65.0.66313384399.issue35617@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch, patch, patch, patch pull_requests: +10691, 10692, 10693, 10694 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 05:02:20 2018 From: report at bugs.python.org (Simon Fagerholm) Date: Sun, 30 Dec 2018 10:02:20 +0000 Subject: [issue35617] unittest discover does not work with implicit namespaces In-Reply-To: <1546162337.0.0.646769357962.issue35617@roundup.psfhosted.org> Message-ID: <1546164140.25.0.33309390457.issue35617@roundup.psfhosted.org> Simon Fagerholm added the comment: Issue originally from SO: https://stackoverflow.com/questions/46976256/recursive-unittest-discovery-with-python3-and-without-init-py-files ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 05:39:27 2018 From: report at bugs.python.org (Stefan Krah) Date: Sun, 30 Dec 2018 10:39:27 +0000 Subject: [issue34778] Memoryview for column-major (f_contiguous) arrays from bytes impossible to achieve In-Reply-To: <1537725098.47.0.956365154283.issue34778@psf.upfronthosting.co.za> Message-ID: <1546166367.19.0.874083146821.issue34778@roundup.psfhosted.org> Stefan Krah added the comment: memoryview.cast() was originally meant to be a faster version of tobytes(), which always converts to C-contiguous. The 'shape' keyword was added because it is odd if you can cast from ND-C to 1D-Bytes but not back. I'm not sure if we should introduce that feature, just pointing out that the original decision to exclude non 'C' views was deliberate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 06:16:16 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 30 Dec 2018 11:16:16 +0000 Subject: [issue35617] unittest discover does not work with implicit namespaces In-Reply-To: <1546162337.0.0.646769357962.issue35617@roundup.psfhosted.org> Message-ID: <1546168576.58.0.963725900751.issue35617@roundup.psfhosted.org> Change by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 10:37:20 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 30 Dec 2018 15:37:20 +0000 Subject: [issue35618] Allow users to set suffix list in cookiejar policy Message-ID: <1546184238.41.0.9488315767.issue35618@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : cookiejar has a fixed set of public suffixes [0] on which cookies cannot be set when strict_domain is enabled. rfc6265 recommends rejecting cookies being set directly on domain which are public suffixes. The current list was last updated at issue1483395 (2006). Given the proliferation of public suffixes and new ones released by IANA it's not feasible for Python to be always updated with this list. It would be good if the suffix list can be supplied during constructing the cookiejar policy so that users can supply updated entries and Python can default to the current set that might be updated with more common ones. Outdated list causes someone to set cookie on a public suffix which is sent along with all the requests to the domain with the suffix causing problems. The algorithm is also assumes suffixes to be of two parts like .co.uk which is not the case today and can be improved. But that require more work and increases the scope of the ticket. The current list is hardcoded as part of the code and it's not available for extension at https://github.com/python/cpython/blob/3f5fc70c6213008243e7d605f7d8a2d8f94cf919/Lib/http/cookiejar.py#L1020 . The default policy can be extended to override this but I think it's good to allow users to set this and to document a place if any where users can find updated lists. rfc6265 recommends http://publicsuffix.org/ that has a data file. Looking at other popular implementations like go [1] and okhttp (java) [2] follow similar approach where users can specify a suffix list and resort to defaults. [0] https://en.wikipedia.org/wiki/Public_Suffix_List [1] https://godoc.org/golang.org/x/net/publicsuffix [2] https://github.com/square/okhttp/blob/81d702c62d92d7dbd83c1daf620a4588b7d8e785/okhttp/src/main/java/okhttp3/internal/publicsuffix/PublicSuffixDatabase.java#L36 https://tools.ietf.org/html/rfc6265#section-5.3 If the user agent is configured to reject "public suffixes" and the domain-attribute is a public suffix: If the domain-attribute is identical to the canonicalized request-host: Let the domain-attribute be the empty string. Otherwise: Ignore the cookie entirely and abort these steps. NOTE: A "public suffix" is a domain that is controlled by a public registry, such as "com", "co.uk", and "pvt.k12.wy.us". This step is essential for preventing attacker.com from disrupting the integrity of example.com by setting a cookie with a Domain attribute of "com". Unfortunately, the set of public suffixes (also known as "registry controlled domains") changes over time. If feasible, user agents SHOULD use an up-to-date public suffix list, such as the one maintained by the Mozilla project at . ---------- components: Library (Lib) messages: 332752 nosy: xtreak priority: normal severity: normal status: open title: Allow users to set suffix list in cookiejar policy type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 12:48:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2018 17:48:45 +0000 Subject: [issue35619] Support custom data descriptors in pydoc Message-ID: <1546192124.51.0.0883005560054.issue35619@roundup.psfhosted.org> New submission from Serhiy Storchaka : Currently pydoc supports only limited set of data descriptors: builtin member and getset descriptors (this covers slot descriptors and structseq member descriptors) and properties. But it does not fully support custom data descriptors. For example, after implementing accelerators for namedtuple fileds access in issue32492, if P = namedtuple('P', 'x y'), help(P.x) will output the help for the _tuplegetter class instead of the P.x member. The proposed PR replaces checks for particular types of data descriptors with a general check. It performs also some refactoring and adds a bunch of tests. ---------- components: Library (Lib) messages: 332753 nosy: rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: Support custom data descriptors in pydoc type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 12:49:17 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 30 Dec 2018 17:49:17 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546192157.32.0.163517890193.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +10695 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 12:49:23 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 30 Dec 2018 17:49:23 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546192163.52.0.660586171948.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +10695, 10696 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 12:49:31 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 30 Dec 2018 17:49:31 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546192171.06.0.103697520219.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +10695, 10696, 10697 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 12:52:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2018 17:52:35 +0000 Subject: [issue35619] Support custom data descriptors in pydoc In-Reply-To: <1546192124.51.0.0883005560054.issue35619@roundup.psfhosted.org> Message-ID: <1546192355.64.0.192743348914.issue35619@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch, patch pull_requests: +10698, 10699 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 12:52:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2018 17:52:31 +0000 Subject: [issue35619] Support custom data descriptors in pydoc In-Reply-To: <1546192124.51.0.0883005560054.issue35619@roundup.psfhosted.org> Message-ID: <1546192351.56.0.372412946599.issue35619@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +10698 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 12:52:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2018 17:52:40 +0000 Subject: [issue35619] Support custom data descriptors in pydoc In-Reply-To: <1546192124.51.0.0883005560054.issue35619@roundup.psfhosted.org> Message-ID: <1546192360.6.0.833754919141.issue35619@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch, patch, patch pull_requests: +10698, 10699, 10700 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 12:53:45 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 30 Dec 2018 17:53:45 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546192425.7.0.714631281287.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: -10696 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 12:55:00 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 30 Dec 2018 17:55:00 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546192500.13.0.0895693224243.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: -10697 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 12:58:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2018 17:58:39 +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: <1546192719.91.0.800784386595.issue32492@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +10701 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 12:58:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2018 17:58:45 +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: <1546192725.07.0.0266597770194.issue32492@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +10701, 10702 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 12:58:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2018 17:58:51 +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: <1546192731.19.0.474834538031.issue32492@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +10701, 10702, 10703 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 12:59:17 2018 From: report at bugs.python.org (Anthony Sottile) Date: Sun, 30 Dec 2018 17:59:17 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1546192757.05.0.557699889778.issue35605@roundup.psfhosted.org> Change by Anthony Sottile : ---------- keywords: +patch pull_requests: +10704 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 12:59:24 2018 From: report at bugs.python.org (Anthony Sottile) Date: Sun, 30 Dec 2018 17:59:24 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1546192764.21.0.717641810167.issue35605@roundup.psfhosted.org> Change by Anthony Sottile : ---------- keywords: +patch, patch pull_requests: +10704, 10705 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 12:59:31 2018 From: report at bugs.python.org (Anthony Sottile) Date: Sun, 30 Dec 2018 17:59:31 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1546192771.95.0.954775760178.issue35605@roundup.psfhosted.org> Change by Anthony Sottile : ---------- keywords: +patch, patch, patch pull_requests: +10704, 10705, 10706 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 13:05:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2018 18:05:11 +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: <1546193111.93.0.549327169278.issue32492@roundup.psfhosted.org> Serhiy Storchaka added the comment: There are few post-commit tweaks in PR 11367: * Removed the docstrings cache. I have not found significant difference, but this make the code simpler. * Improved tests. Merged test_doc_writable and test_namedtuple_can_mutate_doc_of_descriptors_independently in the single test, added tests for immutability, hashing, field descriptors and help(), and rewriting old checks that used eval(). * Unified names of tp_descr_get and tp_descr_set functions. This will help to search implementations of custom descriptors. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 13:06:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2018 18:06:10 +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: <1546193170.61.0.638810204775.issue32492@roundup.psfhosted.org> Serhiy Storchaka added the comment: See also issue35619. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 14:30:06 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Dec 2018 19:30:06 +0000 Subject: [issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots In-Reply-To: <1540044407.71.0.788709270274.issue35031@psf.upfronthosting.co.za> Message-ID: <1546198206.77.0.719580482507.issue35031@roundup.psfhosted.org> Terry J. Reedy added the comment: should this be closed? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 14:47:18 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 30 Dec 2018 19:47:18 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546199238.85.0.487423741042.issue35598@roundup.psfhosted.org> Cheryl Sabella added the comment: PR11365 revises the imports and switches to ttk widgets. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 14:47:19 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Dec 2018 19:47:19 +0000 Subject: [issue35620] asyncio test failure on appveyor Message-ID: <1546199237.74.0.757790156934.issue35620@roundup.psfhosted.org> New submission from Terry J. Reedy : https://ci.appveyor.com/project/python/cpython/builds/21296354?fullLog=true Blocked merge. Passed on Azure Pipeline +- same time. Appveyor re-run passed. Please disable or weaken the false positive tests. I will propose a different solution elsewhere, perhaps pydev. ---------- components: Tests, asyncio messages: 332757 nosy: asvetlov, pablogsal, terry.reedy, yselivanov priority: normal severity: normal status: open title: asyncio test failure on appveyor type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 14:48:54 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Dec 2018 19:48:54 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546199334.38.0.783364076937.issue35598@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 4bd79c38efe3cc0a3c724605cf9474e2d1b6b6e2 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-35598: IDLE: Switch config_key dialog to ttk widgets (GH-11365) https://github.com/python/cpython/commit/4bd79c38efe3cc0a3c724605cf9474e2d1b6b6e2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 14:50:18 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 30 Dec 2018 19:50:18 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546199418.24.0.739011988785.issue35598@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10707 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 15:06:51 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 30 Dec 2018 20:06:51 +0000 Subject: [issue35232] Add `module`/`qualname` arguments to make_dataclass for picklability In-Reply-To: <1542119446.33.0.788709270274.issue35232@psf.upfronthosting.co.za> Message-ID: <1546200411.03.0.402093292328.issue35232@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +10710 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 15:06:58 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 30 Dec 2018 20:06:58 +0000 Subject: [issue35232] Add `module`/`qualname` arguments to make_dataclass for picklability In-Reply-To: <1542119446.33.0.788709270274.issue35232@psf.upfronthosting.co.za> Message-ID: <1546200418.06.0.932177324261.issue35232@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch, patch pull_requests: +10710, 10711 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 15:30:11 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 30 Dec 2018 20:30:11 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546201811.28.0.126438609742.issue35598@roundup.psfhosted.org> miss-islington added the comment: New changeset d2694d47682b84dafef1c172ede7ad16d3b8bbd8 by Miss Islington (bot) in branch '3.7': bpo-35598: IDLE: Switch config_key dialog to ttk widgets (GH-11365) https://github.com/python/cpython/commit/d2694d47682b84dafef1c172ede7ad16d3b8bbd8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 15:36:24 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 30 Dec 2018 20:36:24 +0000 Subject: [issue35232] Add `module`/`qualname` arguments to make_dataclass for picklability In-Reply-To: <1542119446.33.0.788709270274.issue35232@psf.upfronthosting.co.za> Message-ID: <1546202184.47.0.050125981464.issue35232@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi @Anthony.Lee, the __module__ is wrong indeed. The new changeset in https://github.com/python/cpython/pull/11371 should implement what you need. If you don't specify the new `module` and `qualname` parameters, make_dataclass() will try to determine the correct `module` so you should not need to change your code. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 15:52:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2018 20:52:38 +0000 Subject: [issue35606] Add prod() function to the math module In-Reply-To: <1546025352.75.0.868813504694.issue35606@roundup.psfhosted.org> Message-ID: <1546203158.93.0.461643254675.issue35606@roundup.psfhosted.org> Serhiy Storchaka added the comment: PR 11359 looks too complicated. I am not sure that a simple one-line function is worth it. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 16:10:43 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 30 Dec 2018 21:10:43 +0000 Subject: [issue35606] Add prod() function to the math module In-Reply-To: <1546025352.75.0.868813504694.issue35606@roundup.psfhosted.org> Message-ID: <1546204243.87.0.793893186277.issue35606@roundup.psfhosted.org> R?mi Lapeyre added the comment: @serhiy.storchaka, it should be possible to make it far simpler if we make math_prod_impl more naive by removing the hypothesis made on `iterable` and the many fast-paths like builtin_sum_impl() does when SLOW_SUM is defined, right? A naive implementation would also support user-defined types which would probably be a good thing IMO ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 16:48:11 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 30 Dec 2018 21:48:11 +0000 Subject: [issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots In-Reply-To: <1540044407.71.0.788709270274.issue35031@psf.upfronthosting.co.za> Message-ID: <1546206491.89.0.401899729903.issue35031@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I think is missing a manual backport to 3.6, but now that we are in security fixes only I am not sure of what to do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 16:56:23 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 30 Dec 2018 21:56:23 +0000 Subject: [issue35620] asyncio test failure on appveyor In-Reply-To: <1546199237.74.0.757790156934.issue35620@roundup.psfhosted.org> Message-ID: <1546206983.68.0.463820575281.issue35620@roundup.psfhosted.org> Andrew Svetlov added the comment: Do you mean an environment modification? 1 test altered the execution environment: test_asyncio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 16:57:41 2018 From: report at bugs.python.org (Laurent Gautier) Date: Sun, 30 Dec 2018 21:57:41 +0000 Subject: [issue34778] Memoryview for column-major (f_contiguous) arrays from bytes impossible to achieve In-Reply-To: <1537725098.47.0.956365154283.issue34778@psf.upfronthosting.co.za> Message-ID: <1546207061.86.0.23693674053.issue34778@roundup.psfhosted.org> Laurent Gautier added the comment: Wait. Isn't a `memoryview` memerely a Python object for a buffer inferface, whatever its valid attributes or flags might be ? The perceived oddness that lead to the addition of the keyword 'shape' was a good initial instinct that something was off, but this is an incomplete workaround . If the rationale was to follow what `tobytes` is doing, this delegates the justification for excluding non 'C' views it. Then I do not understand the rationale behind `memoryview.tobytes`'s exclusive relationshop to C-contiguous arrays. A memmoryview is a window on a memory region (a Python buffer), and one would expect `tobytes` to just return bytes for it (in whatever bytes/strides) the memoryview is originally in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 17:11:17 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 30 Dec 2018 22:11:17 +0000 Subject: [issue32419] Add unittest support for pyc projects In-Reply-To: <1514064360.62.0.213398074469.issue32419@psf.upfronthosting.co.za> Message-ID: <1546207877.68.0.672549968675.issue32419@roundup.psfhosted.org> Martin Panter added the comment: Seems to be a lot of overlap with Issue 26859 by Xavier. Looks like Xavier included a test case, but Bassem?s changes on Git Hub seem more thorough in the impementation and doc strings. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 17:29:01 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 30 Dec 2018 22:29:01 +0000 Subject: [issue35617] unittest discover does not work with implicit namespaces In-Reply-To: <1546162337.0.0.646769357962.issue35617@roundup.psfhosted.org> Message-ID: <1546208941.79.0.543500170983.issue35617@roundup.psfhosted.org> Martin Panter added the comment: Is this related to Issue 23882? That one is about making discovery work when ?__init__.py? files are removed. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 17:52:15 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Sun, 30 Dec 2018 22:52:15 +0000 Subject: [issue23057] [Windows] asyncio: support signal handlers on Windows (feature request) In-Reply-To: <1418674256.87.0.827009141117.issue23057@psf.upfronthosting.co.za> Message-ID: <1546210335.96.0.232454118206.issue23057@roundup.psfhosted.org> Jeremy Kloth added the comment: GH-11274 desperately needs to be addressed! The 2 Windows 7 buildbots have been failing on 3.x since the merge of GH-11135 on 12-18. Either that or the commit b5c8cfa needs to be reverted. Being the holiday season and all I can see the extra time needed for Python development is sparse, but 2 weeks without ensuring a commit doesn't break stable buildbots seems a bit much. ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 17:54:02 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 30 Dec 2018 22:54:02 +0000 Subject: [issue28503] [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available In-Reply-To: <1477122775.81.0.204871394378.issue28503@psf.upfronthosting.co.za> Message-ID: <1546210442.91.0.097563431251.issue28503@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 17:54:26 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 30 Dec 2018 22:54:26 +0000 Subject: [issue28503] [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available In-Reply-To: <1477122775.81.0.204871394378.issue28503@psf.upfronthosting.co.za> Message-ID: <1546210466.01.0.0611391834109.issue28503@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 17:56:41 2018 From: report at bugs.python.org (Simon Fagerholm) Date: Sun, 30 Dec 2018 22:56:41 +0000 Subject: [issue35617] unittest discover does not work with implicit namespaces In-Reply-To: <1546162337.0.0.646769357962.issue35617@roundup.psfhosted.org> Message-ID: <1546210601.14.0.187541541374.issue35617@roundup.psfhosted.org> Simon Fagerholm added the comment: Martin: Yeah, they same to be same! Can't believe I didn't find it ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 17:59:40 2018 From: report at bugs.python.org (Stephan Hohe) Date: Sun, 30 Dec 2018 22:59:40 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop Message-ID: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> New submission from Stephan Hohe : `asyncio.create_subprocess_exec()` accepts a `loop` parameter, but doesn't use it to watch the child process. Instead uses `get_event_loop_policy().get_child_watcher()`, which doesn't doesn't know about `loop` but tries to use the current default event loop. This fails if there is no current event loop or if that loop isn't running: ``` import asyncio async def action(loop): proc = await asyncio.create_subprocess_exec('echo', loop=loop) await proc.wait() loop = asyncio.new_event_loop() loop.run_until_complete(action(loop)) loop.close() ``` This crashes because the main event loop never was created: Traceback (most recent call last): File "sample.py", line 8, in loop.run_until_complete(action(loop)) File "/home/sth/devel/cpython.vanilla/Lib/asyncio/base_events.py", line 589, in run_until_complete return future.result() File "sample.py", line 4, in action proc = await asyncio.create_subprocess_exec('echo', loop=loop) File "/home/sth/devel/cpython.vanilla/Lib/asyncio/subprocess.py", line 213, in create_subprocess_exec transport, protocol = await loop.subprocess_exec( File "/home/sth/devel/cpython.vanilla/Lib/asyncio/base_events.py", line 1542, in subprocess_exec transport = await self._make_subprocess_transport( File "/home/sth/devel/cpython.vanilla/Lib/asyncio/unix_events.py", line 193, in _make_subprocess_transport watcher.add_child_handler(transp.get_pid(), File "/home/sth/devel/cpython.vanilla/Lib/asyncio/unix_events.py", line 924, in add_child_handler raise RuntimeError( RuntimeError: Cannot add child handler, the child watcher does not have a loop attached If we do have a current event loop, for example by calling `asyncio.get_event_loop()` before creating out own loop, then we don't get an error, but the program hangs indefinitely since that loop isn't running. Expected behavior would be that the loop given to create_subprocess_exec() is used to watch the child process. ---------- components: asyncio messages: 332771 nosy: asvetlov, sth, yselivanov priority: normal severity: normal status: open title: asyncio.create_subprocess_exec() only works with main event loop type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 17:59:52 2018 From: report at bugs.python.org (=?utf-8?q?Michael_B=C3=BCsch?=) Date: Sun, 30 Dec 2018 22:59:52 +0000 Subject: [issue35622] Add support for Linux SCHED_DEADLINE Message-ID: <1546210790.69.0.579405254492.issue35622@roundup.psfhosted.org> New submission from Michael B?sch : Are there plans to support Linux SCHED_DEADLINE in the os module? If not, would changes to add such support be welcome? Support for SCHED_DEADLINE would also need support for sched_setattr/sched_getattr. ---------- components: Library (Lib) messages: 332772 nosy: mb_ priority: normal severity: normal status: open title: Add support for Linux SCHED_DEADLINE type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:03:07 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 30 Dec 2018 23:03:07 +0000 Subject: [issue28503] [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available In-Reply-To: <1477122775.81.0.204871394378.issue28503@psf.upfronthosting.co.za> Message-ID: <1546210987.39.0.650587199198.issue28503@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10712 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:03:15 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 30 Dec 2018 23:03:15 +0000 Subject: [issue28503] [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available In-Reply-To: <1477122775.81.0.204871394378.issue28503@psf.upfronthosting.co.za> Message-ID: <1546210995.87.0.723208546181.issue28503@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10712, 10713 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:03:24 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 30 Dec 2018 23:03:24 +0000 Subject: [issue28503] [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available In-Reply-To: <1477122775.81.0.204871394378.issue28503@psf.upfronthosting.co.za> Message-ID: <1546211004.03.0.0914543628291.issue28503@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10712, 10713, 10714 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:07:18 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Dec 2018 23:07:18 +0000 Subject: [issue35620] asyncio test failure on appveyor In-Reply-To: <1546199237.74.0.757790156934.issue35620@roundup.psfhosted.org> Message-ID: <1546211238.89.0.897164280244.issue35620@roundup.psfhosted.org> Terry J. Reedy added the comment: My position is that tests that are known to occasionally fail independently of any changes in particular PRs should not be allowed to block merging. In the context of CI, the failure is a lie. One solution, and the easiest, is to disable the test. That is all I could do here. If the module/test author wants to keep running the test, another solution is to change the test so that bogus results are no longer seen as a failure by the test framework. How depends on the situation. Perhaps turn particular exceptions into a warning message? In this case, there are multiple exceptions listed in the log: OSError: [WinError 6] The handle is invalid x 2 OSError: [WinError 995] The I/O operation has been aborted because of either a thread exit or an application request, leading to ConnectionResetError: [WinError 995] ... OSError: [WinError 64] The specified network name is no longer available, leading to another ConnectionResetError. I don't see am a little surprised at and don't understand the vague end failure message. So I cannot suggest anything more specific. The third solution I am thinking of is somehow change the test framework so we can somehow mark 'heisentests' as such and not count know false positives as merge-blocking failures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:39:07 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 30 Dec 2018 23:39:07 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546213147.02.0.82058986342.issue35214@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10715 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:39:16 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 30 Dec 2018 23:39:16 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546213156.76.0.0396464480611.issue35214@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10715, 10716 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:39:26 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 30 Dec 2018 23:39:26 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546213166.1.0.939430249626.issue35214@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10715, 10716, 10717 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:42:34 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 30 Dec 2018 23:42:34 +0000 Subject: [issue28503] [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available In-Reply-To: <1477122775.81.0.204871394378.issue28503@psf.upfronthosting.co.za> Message-ID: <1546213354.48.0.0226042320447.issue28503@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 387512c7ecde6446f2e29408af2e16b9fc043807 by Gregory P. Smith in branch 'master': bpo-28503: Use crypt_r() when available instead of crypt() (GH-11373) https://github.com/python/cpython/commit/387512c7ecde6446f2e29408af2e16b9fc043807 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:42:44 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 30 Dec 2018 23:42:44 +0000 Subject: [issue28503] [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available In-Reply-To: <1477122775.81.0.204871394378.issue28503@psf.upfronthosting.co.za> Message-ID: <1546213364.15.0.229701089868.issue28503@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10718 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:42:52 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 30 Dec 2018 23:42:52 +0000 Subject: [issue28503] [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available In-Reply-To: <1477122775.81.0.204871394378.issue28503@psf.upfronthosting.co.za> Message-ID: <1546213372.25.0.924141675436.issue28503@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10718, 10719 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:43:01 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 30 Dec 2018 23:43:01 +0000 Subject: [issue28503] [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available In-Reply-To: <1477122775.81.0.204871394378.issue28503@psf.upfronthosting.co.za> Message-ID: <1546213381.19.0.889572392208.issue28503@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10718, 10719, 10720 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:56:24 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 30 Dec 2018 23:56:24 +0000 Subject: [issue28503] [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available In-Reply-To: <1477122775.81.0.204871394378.issue28503@psf.upfronthosting.co.za> Message-ID: <1546214184.14.0.36234082076.issue28503@roundup.psfhosted.org> Gregory P. Smith added the comment: As this is internal only rather than a feature, i'll bring this into 3.7 as well. ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:57:00 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 30 Dec 2018 23:57:00 +0000 Subject: [issue28503] [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available In-Reply-To: <1477122775.81.0.204871394378.issue28503@psf.upfronthosting.co.za> Message-ID: <1546214220.99.0.174478112085.issue28503@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 19:35:47 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 31 Dec 2018 00:35:47 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546216547.18.0.398934049326.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +10721 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 19:35:54 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 31 Dec 2018 00:35:54 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546216554.35.0.17134006633.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +10721, 10722 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 19:35:59 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 31 Dec 2018 00:35:59 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546216559.27.0.0864050621068.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +10721, 10722, 10723 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 19:39:09 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 31 Dec 2018 00:39:09 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546216749.77.0.53724401792.issue35598@roundup.psfhosted.org> Cheryl Sabella added the comment: PR11377 is the first refactor. It moves translate_key to the module level and also moves the definitions of the key tuples to the module level since they are used in more than one place (and they don't change). As a side note, I'll do the refactoring over several PRs to try to make it manageable to review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 19:40:48 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 31 Dec 2018 00:40:48 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546216848.19.0.207502331652.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: -10722 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 19:41:04 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 31 Dec 2018 00:41:04 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546216864.66.0.160234014069.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: -10723 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 19:48:38 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 31 Dec 2018 00:48:38 +0000 Subject: [issue35606] Add prod() function to the math module In-Reply-To: <1546025352.75.0.868813504694.issue35606@roundup.psfhosted.org> Message-ID: <1546217318.94.0.196993286388.issue35606@roundup.psfhosted.org> Raymond Hettinger added the comment: > I am not sure that a simple one-line function is worth it. FWIW, it is often the one liners that turn out to be the most useful building blocks. In this case the one-liner is inconvenient (two imports), not as fast we would like, and a little opaque: functools.reduce(operator.mul, iterable, 1). > PR 11359 looks too complicated. I would be happy with the simplest possible implementation. That said, we do have a history of going gonzo in C internals to get better speed/space performance (look the code for math.factorial() for example), to have better accuracy and avoid overflow/underflow (math.hypot() for example), or to implement particular NaN/Inf handling not present in a naive implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:05:39 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 01:05:39 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546218339.52.0.246440958979.issue35214@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset b474e6774d60fa67d5373e361a0ed53c18b24f53 by Gregory P. Smith in branch 'master': bpo-35214: MSan workarounds for socket, time, and test_faulthandler. (GH-11375) https://github.com/python/cpython/commit/b474e6774d60fa67d5373e361a0ed53c18b24f53 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:05:56 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 01:05:56 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546218339.52.0.246440958979.issue35214@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset b474e6774d60fa67d5373e361a0ed53c18b24f53 by Gregory P. Smith in branch 'master': bpo-35214: MSan workarounds for socket, time, and test_faulthandler. (GH-11375) https://github.com/python/cpython/commit/b474e6774d60fa67d5373e361a0ed53c18b24f53 ---------- pull_requests: +10724 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:05:58 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 01:05:58 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546218339.52.0.246440958979.issue35214@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset b474e6774d60fa67d5373e361a0ed53c18b24f53 by Gregory P. Smith in branch 'master': bpo-35214: MSan workarounds for socket, time, and test_faulthandler. (GH-11375) https://github.com/python/cpython/commit/b474e6774d60fa67d5373e361a0ed53c18b24f53 ---------- pull_requests: +10724, 10726 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:06:00 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 01:06:00 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546218339.52.0.246440958979.issue35214@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset b474e6774d60fa67d5373e361a0ed53c18b24f53 by Gregory P. Smith in branch 'master': bpo-35214: MSan workarounds for socket, time, and test_faulthandler. (GH-11375) https://github.com/python/cpython/commit/b474e6774d60fa67d5373e361a0ed53c18b24f53 ---------- pull_requests: +10724, 10725, 10726 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:08:26 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 01:08:26 +0000 Subject: [issue31122] SSLContext.wrap_socket() throws OSError with errno == 0 In-Reply-To: <1501874201.48.0.0126792321555.issue31122@psf.upfronthosting.co.za> Message-ID: <1546218506.52.0.84923397812.issue31122@roundup.psfhosted.org> Gregory P. Smith added the comment: This flakiness just caused a PR merge to be blocked by AppVeyor for me: ====================================================================== ERROR: test_with_statement (test.test_nntplib.NetworkedNNTP_SSLTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_nntplib.py", line 242, in wrapped meth(self) File "C:\projects\cpython\lib\test\test_nntplib.py", line 264, in test_with_statement with self.NNTP_CLASS(self.NNTP_HOST, timeout=TIMEOUT, usenetrc=False) as server: File "C:\projects\cpython\lib\nntplib.py", line 1077, in __init__ self.sock = _encrypt_on(self.sock, ssl_context, host) File "C:\projects\cpython\lib\nntplib.py", line 292, in _encrypt_on return context.wrap_socket(sock, server_hostname=hostname) File "C:\projects\cpython\lib\ssl.py", line 405, in wrap_socket return self.sslsocket_class._create( File "C:\projects\cpython\lib\ssl.py", line 853, in _create self.do_handshake() File "C:\projects\cpython\lib\ssl.py", line 1117, in do_handshake self._sslobj.do_handshake() OSError: [Errno 0] Error ---------------------------------------------------------------------- https://ci.appveyor.com/project/python/cpython/builds/21299396 I lucked out by kicking it with a no-op change to re-trigger an appveyor run where it passed. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:08:59 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 01:08:59 +0000 Subject: [issue31122] SSLContext.wrap_socket() throws OSError with errno == 0 In-Reply-To: <1501874201.48.0.0126792321555.issue31122@psf.upfronthosting.co.za> Message-ID: <1546218539.9.0.224313547376.issue31122@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- versions: +Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:09:15 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 01:09:15 +0000 Subject: [issue31122] SSLContext.wrap_socket() throws OSError with errno == 0 In-Reply-To: <1501874201.48.0.0126792321555.issue31122@psf.upfronthosting.co.za> Message-ID: <1546218555.98.0.599301128011.issue31122@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:10:19 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 01:10:19 +0000 Subject: [issue31122] SSLContext.wrap_socket() throws OSError with errno == 0 In-Reply-To: <1501874201.48.0.0126792321555.issue31122@psf.upfronthosting.co.za> Message-ID: <1546218619.93.0.678766634974.issue31122@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:16:30 2018 From: report at bugs.python.org (Stephan Hohe) Date: Mon, 31 Dec 2018 01:16:30 +0000 Subject: [issue35623] Segfault in test_bigmem.ListTest.test_sort Message-ID: <1546218988.78.0.27697670498.issue35623@roundup.psfhosted.org> New submission from Stephan Hohe : When running test_bigmem with -M 30G the interpreter crashes in list_sort_impl() in Objects/listobject.c:2290 due to an integer overflow in `i`. ---------- components: Interpreter Core messages: 332780 nosy: sth priority: normal severity: normal status: open title: Segfault in test_bigmem.ListTest.test_sort type: crash versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:17:43 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 31 Dec 2018 01:17:43 +0000 Subject: [issue35615] "RuntimeError: Dictionary changed size during iteration" when copying a WeakValueDictionary In-Reply-To: <1546116337.91.0.423915840639.issue35615@roundup.psfhosted.org> Message-ID: <1546219063.7.0.416939963822.issue35615@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi, I think this is indeed a bug, `copy()` is expected to succeed. I was able to reproduce the issue in an interpreter but did not succeed to write a test case that triggers the race-condition. I think the fix you suggested is the right solution. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:39:02 2018 From: report at bugs.python.org (Stephan Hohe) Date: Mon, 31 Dec 2018 01:39:02 +0000 Subject: [issue35623] Segfault in test_bigmem.ListTest.test_sort In-Reply-To: <1546218988.78.0.27697670498.issue35623@roundup.psfhosted.org> Message-ID: <1546220342.84.0.0647381788984.issue35623@roundup.psfhosted.org> Change by Stephan Hohe : ---------- keywords: +patch pull_requests: +10727 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:39:06 2018 From: report at bugs.python.org (Stephan Hohe) Date: Mon, 31 Dec 2018 01:39:06 +0000 Subject: [issue35623] Segfault in test_bigmem.ListTest.test_sort In-Reply-To: <1546218988.78.0.27697670498.issue35623@roundup.psfhosted.org> Message-ID: <1546220346.58.0.844793037343.issue35623@roundup.psfhosted.org> Change by Stephan Hohe : ---------- keywords: +patch, patch pull_requests: +10727, 10728 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:39:10 2018 From: report at bugs.python.org (Stephan Hohe) Date: Mon, 31 Dec 2018 01:39:10 +0000 Subject: [issue35623] Segfault in test_bigmem.ListTest.test_sort In-Reply-To: <1546218988.78.0.27697670498.issue35623@roundup.psfhosted.org> Message-ID: <1546220350.43.0.636662758257.issue35623@roundup.psfhosted.org> Change by Stephan Hohe : ---------- keywords: +patch, patch, patch pull_requests: +10727, 10728, 10729 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:52:42 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 01:52:42 +0000 Subject: [issue35225] test_faulthandler fails under ubsan In-Reply-To: <1542078270.77.0.788709270274.issue35225@psf.upfronthosting.co.za> Message-ID: <1546221162.72.0.801059386588.issue35225@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- keywords: +patch pull_requests: +10730 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:52:46 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 01:52:46 +0000 Subject: [issue35225] test_faulthandler fails under ubsan In-Reply-To: <1542078270.77.0.788709270274.issue35225@psf.upfronthosting.co.za> Message-ID: <1546221166.75.0.0769355641675.issue35225@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- keywords: +patch, patch pull_requests: +10730, 10731 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:52:49 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 01:52:49 +0000 Subject: [issue35225] test_faulthandler fails under ubsan In-Reply-To: <1542078270.77.0.788709270274.issue35225@psf.upfronthosting.co.za> Message-ID: <1546221169.88.0.299152221508.issue35225@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- keywords: +patch, patch, patch pull_requests: +10730, 10731, 10732 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:53:12 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 01:53:12 +0000 Subject: [issue35225] test_faulthandler fails under ubsan In-Reply-To: <1542078270.77.0.788709270274.issue35225@psf.upfronthosting.co.za> Message-ID: <1546221192.89.0.596464969608.issue35225@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:54:18 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 01:54:18 +0000 Subject: [issue35225] test_faulthandler fails under ubsan In-Reply-To: <1542078270.77.0.788709270274.issue35225@psf.upfronthosting.co.za> Message-ID: <1546221258.45.0.136200702934.issue35225@roundup.psfhosted.org> Gregory P. Smith added the comment: These are all related to the output of the child process containing sanitizer stuff so the stdout/stderr based tests are failing. i skipped two of these for memory sanitizers, the third looks easy enough to fix via the regex. PR attached. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:54:47 2018 From: report at bugs.python.org (Stephan Hohe) Date: Mon, 31 Dec 2018 01:54:47 +0000 Subject: [issue35623] Segfault in test_bigmem.ListTest.test_sort In-Reply-To: <1546218988.78.0.27697670498.issue35623@roundup.psfhosted.org> Message-ID: <1546221287.99.0.54432701226.issue35623@roundup.psfhosted.org> Stephan Hohe added the comment: Actually the segfault is in Objects/listobject.c:2301 in that test since it doesn't use tuples. But the takeaway is the same: `i` overflows to a negative number and causes an invalid memory access. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:59:21 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 01:59:21 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546221561.74.0.836872366458.issue35214@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 01b9664740307b39c2907bd84cbb0b2c35be9df4 by Gregory P. Smith (Miss Islington (bot)) in branch '3.7': bpo-35214: MSan workarounds for socket, time, and test_faulthandler. (GH-11375) (GH-11378) https://github.com/python/cpython/commit/01b9664740307b39c2907bd84cbb0b2c35be9df4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:59:54 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 01:59:54 +0000 Subject: [issue28503] [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available In-Reply-To: <1477122775.81.0.204871394378.issue28503@psf.upfronthosting.co.za> Message-ID: <1546221594.48.0.0329768482316.issue28503@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset a144feeb7ec501aaf30072d50e70d54b200e5ef0 by Gregory P. Smith (Miss Islington (bot)) in branch '3.7': bpo-28503: Use crypt_r() when available instead of crypt() (GH-11373) (GH-11376) https://github.com/python/cpython/commit/a144feeb7ec501aaf30072d50e70d54b200e5ef0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:01:37 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 02:01:37 +0000 Subject: [issue28503] [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available In-Reply-To: <1477122775.81.0.204871394378.issue28503@psf.upfronthosting.co.za> Message-ID: <1546221697.81.0.10566003546.issue28503@roundup.psfhosted.org> Gregory P. Smith added the comment: I'm going to close this as 3.7 and 3.8 are good now, but if someone wants to see the same thing done in 2.7 it should be possible for them make a PR. This is primarily just a configure.ac change. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:06:56 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 31 Dec 2018 02:06:56 +0000 Subject: [issue23057] [Windows] asyncio: support signal handlers on Windows (feature request) In-Reply-To: <1418674256.87.0.827009141117.issue23057@psf.upfronthosting.co.za> Message-ID: <1546222016.41.0.360266176704.issue23057@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:10:56 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 31 Dec 2018 02:10:56 +0000 Subject: [issue35225] test_faulthandler fails under ubsan In-Reply-To: <1542078270.77.0.788709270274.issue35225@psf.upfronthosting.co.za> Message-ID: <1546222256.55.0.821859837842.issue35225@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10733 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:10:59 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 31 Dec 2018 02:10:59 +0000 Subject: [issue35225] test_faulthandler fails under ubsan In-Reply-To: <1542078270.77.0.788709270274.issue35225@psf.upfronthosting.co.za> Message-ID: <1546222259.88.0.912667803591.issue35225@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10733, 10734 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:13:19 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Mon, 31 Dec 2018 02:13:19 +0000 Subject: [issue35617] unittest discover does not work with implicit namespaces In-Reply-To: <1546162337.0.0.646769357962.issue35617@roundup.psfhosted.org> Message-ID: <1546222399.43.0.393479989541.issue35617@roundup.psfhosted.org> Emmanuel Arias added the comment: Hi! IMO its a good propose. You will have to modify some tests. ---------- nosy: +eamanu versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:16:43 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 02:16:43 +0000 Subject: [issue35550] Some define guards for Solaris are wrong In-Reply-To: <1545386883.42.0.788709270274.issue35550@psf.upfronthosting.co.za> Message-ID: <1546222603.65.0.782842632229.issue35550@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 6f9bc72c79c3262e5d0f2c0e96b016477399cfb1 by Gregory P. Smith (Jakub Kul?k) in branch 'master': bpo-35550: Fix incorrect Solaris define guards (GH-11275) https://github.com/python/cpython/commit/6f9bc72c79c3262e5d0f2c0e96b016477399cfb1 ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:16:52 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 31 Dec 2018 02:16:52 +0000 Subject: [issue35550] Some define guards for Solaris are wrong In-Reply-To: <1545386883.42.0.788709270274.issue35550@psf.upfronthosting.co.za> Message-ID: <1546222612.77.0.260965110531.issue35550@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10735 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:16:53 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Mon, 31 Dec 2018 02:16:53 +0000 Subject: [issue35615] "RuntimeError: Dictionary changed size during iteration" when copying a WeakValueDictionary In-Reply-To: <1546116337.91.0.423915840639.issue35615@roundup.psfhosted.org> Message-ID: <1546222613.25.0.941778289926.issue35615@roundup.psfhosted.org> Emmanuel Arias added the comment: Hi! Seems like a bug. Please provide a patch. This can be apply to 3.8? ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:16:56 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 31 Dec 2018 02:16:56 +0000 Subject: [issue35550] Some define guards for Solaris are wrong In-Reply-To: <1545386883.42.0.788709270274.issue35550@psf.upfronthosting.co.za> Message-ID: <1546222616.74.0.0957379756171.issue35550@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10735, 10736 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:19:45 2018 From: report at bugs.python.org (Fish Wang) Date: Mon, 31 Dec 2018 02:19:45 +0000 Subject: [issue35615] "RuntimeError: Dictionary changed size during iteration" when copying a WeakValueDictionary In-Reply-To: <1546116337.91.0.423915840639.issue35615@roundup.psfhosted.org> Message-ID: <1546222785.54.0.539579035789.issue35615@roundup.psfhosted.org> Fish Wang added the comment: Thanks for your reply. I'm preparing a PR. However, I'm not sure how to write a reliable test case to trigger the crash outside my application. I will submit the PR for now, and see if anyone on the mailing list has a better idea of what a reliable test case should look like. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:20:58 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 02:20:58 +0000 Subject: [issue35550] Some define guards for Solaris are wrong In-Reply-To: <1545386883.42.0.788709270274.issue35550@psf.upfronthosting.co.za> Message-ID: <1546222858.63.0.0589663823951.issue35550@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith resolution: -> fixed stage: patch review -> commit review versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:35:32 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 31 Dec 2018 02:35:32 +0000 Subject: [issue35623] Segfault in test_bigmem.ListTest.test_sort In-Reply-To: <1546218988.78.0.27697670498.issue35623@roundup.psfhosted.org> Message-ID: <1546223732.59.0.477161489656.issue35623@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:37:22 2018 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Dec 2018 02:37:22 +0000 Subject: [issue35615] "RuntimeError: Dictionary changed size during iteration" when copying a WeakValueDictionary In-Reply-To: <1546116337.91.0.423915840639.issue35615@roundup.psfhosted.org> Message-ID: <1546223842.62.0.18167703028.issue35615@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +10737 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:37:30 2018 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Dec 2018 02:37:30 +0000 Subject: [issue35615] "RuntimeError: Dictionary changed size during iteration" when copying a WeakValueDictionary In-Reply-To: <1546116337.91.0.423915840639.issue35615@roundup.psfhosted.org> Message-ID: <1546223850.41.0.294078315934.issue35615@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch, patch pull_requests: +10737, 10738 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:37:38 2018 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Dec 2018 02:37:38 +0000 Subject: [issue35615] "RuntimeError: Dictionary changed size during iteration" when copying a WeakValueDictionary In-Reply-To: <1546116337.91.0.423915840639.issue35615@roundup.psfhosted.org> Message-ID: <1546223858.11.0.360846251951.issue35615@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch, patch, patch pull_requests: +10737, 10738, 10739 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:37:45 2018 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Dec 2018 02:37:45 +0000 Subject: [issue35615] "RuntimeError: Dictionary changed size during iteration" when copying a WeakValueDictionary In-Reply-To: <1546116337.91.0.423915840639.issue35615@roundup.psfhosted.org> Message-ID: <1546223865.66.0.650844537853.issue35615@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch, patch, patch, patch pull_requests: +10737, 10738, 10739, 10740 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:39:03 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 31 Dec 2018 02:39:03 +0000 Subject: [issue35550] Some define guards for Solaris are wrong In-Reply-To: <1545386883.42.0.788709270274.issue35550@psf.upfronthosting.co.za> Message-ID: <1546223943.2.0.3790908239.issue35550@roundup.psfhosted.org> miss-islington added the comment: New changeset d82344378ad8e471b8ed12fb99807f68351c5412 by Miss Islington (bot) in branch '3.7': bpo-35550: Fix incorrect Solaris define guards (GH-11275) https://github.com/python/cpython/commit/d82344378ad8e471b8ed12fb99807f68351c5412 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:47:24 2018 From: report at bugs.python.org (Fish Wang) Date: Mon, 31 Dec 2018 02:47:24 +0000 Subject: [issue35615] "RuntimeError: Dictionary changed size during iteration" when copying a WeakValueDictionary In-Reply-To: <1546116337.91.0.423915840639.issue35615@roundup.psfhosted.org> Message-ID: <1546224444.95.0.438819966937.issue35615@roundup.psfhosted.org> Fish Wang added the comment: Just submitted a PR against the master branch on GitHub. > This can be apply to 3.8? I think so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:49:58 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Mon, 31 Dec 2018 02:49:58 +0000 Subject: [issue35615] "RuntimeError: Dictionary changed size during iteration" when copying a WeakValueDictionary In-Reply-To: <1546116337.91.0.423915840639.issue35615@roundup.psfhosted.org> Message-ID: <1546224598.26.0.738383969417.issue35615@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:57:40 2018 From: report at bugs.python.org (Fish Wang) Date: Mon, 31 Dec 2018 02:57:40 +0000 Subject: [issue35615] "RuntimeError: Dictionary changed size during iteration" when copying a WeakValueDictionary In-Reply-To: <1546116337.91.0.423915840639.issue35615@roundup.psfhosted.org> Message-ID: <1546225060.46.0.0151036204406.issue35615@roundup.psfhosted.org> Fish Wang added the comment: Just checked weakref.py on different branches, I think this bug exists in Python 2.7, 3.4, 3.5, and 3.6 as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:58:14 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 02:58:14 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546225094.34.0.407633852539.issue35214@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10742 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:58:32 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 02:58:32 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546225112.28.0.609002967257.issue35214@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10742, 10743 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:58:46 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 02:58:46 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546225126.21.0.995412383713.issue35214@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10742, 10743, 10744 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 22:06:22 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 03:06:22 +0000 Subject: [issue35225] test_faulthandler fails under ubsan In-Reply-To: <1542078270.77.0.788709270274.issue35225@psf.upfronthosting.co.za> Message-ID: <1546225582.72.0.588004315303.issue35225@roundup.psfhosted.org> Gregory P. Smith added the comment: my test skipping logic is somehow not detecting my ubsan buildbot https://buildbot.python.org/all/#/builders/135/builds/1108/steps/4/logs/stdio TODO: figure that out. otherwise the regex change fixed test_sigfpe. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 22:59:17 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 03:59:17 +0000 Subject: [issue35225] test_faulthandler fails under ubsan In-Reply-To: <1542078270.77.0.788709270274.issue35225@psf.upfronthosting.co.za> Message-ID: <1546228757.32.0.669149215554.issue35225@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10745 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 22:59:20 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 03:59:20 +0000 Subject: [issue35225] test_faulthandler fails under ubsan In-Reply-To: <1542078270.77.0.788709270274.issue35225@psf.upfronthosting.co.za> Message-ID: <1546228760.51.0.319340256816.issue35225@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10745, 10746 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 22:59:23 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 03:59:23 +0000 Subject: [issue35225] test_faulthandler fails under ubsan In-Reply-To: <1542078270.77.0.788709270274.issue35225@psf.upfronthosting.co.za> Message-ID: <1546228763.93.0.643286447282.issue35225@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10745, 10746, 10748 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 22:59:27 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 03:59:27 +0000 Subject: [issue35225] test_faulthandler fails under ubsan In-Reply-To: <1542078270.77.0.788709270274.issue35225@psf.upfronthosting.co.za> Message-ID: <1546228767.11.0.0388146343956.issue35225@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10745, 10746, 10747, 10748 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:16:52 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 31 Dec 2018 04:16:52 +0000 Subject: [issue35225] test_faulthandler fails under ubsan In-Reply-To: <1542078270.77.0.788709270274.issue35225@psf.upfronthosting.co.za> Message-ID: <1546229812.43.0.9214163665.issue35225@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10749 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:16:56 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 31 Dec 2018 04:16:56 +0000 Subject: [issue35225] test_faulthandler fails under ubsan In-Reply-To: <1542078270.77.0.788709270274.issue35225@psf.upfronthosting.co.za> Message-ID: <1546229816.53.0.882264610479.issue35225@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10749, 10750 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:17:00 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 31 Dec 2018 04:17:00 +0000 Subject: [issue35225] test_faulthandler fails under ubsan In-Reply-To: <1542078270.77.0.788709270274.issue35225@psf.upfronthosting.co.za> Message-ID: <1546229820.51.0.131559021334.issue35225@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10749, 10750, 10751 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:17:59 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 04:17:59 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546229879.97.0.200264008346.issue35214@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset e5796c42c687e1454e84dcc50e6f67db48ff69a0 by Gregory P. Smith in branch 'master': bpo-35214: Skip test_io tests that'd cause a huge malloc under msan (#11385) https://github.com/python/cpython/commit/e5796c42c687e1454e84dcc50e6f67db48ff69a0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:18:15 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 04:18:15 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546229879.97.0.200264008346.issue35214@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset e5796c42c687e1454e84dcc50e6f67db48ff69a0 by Gregory P. Smith in branch 'master': bpo-35214: Skip test_io tests that'd cause a huge malloc under msan (#11385) https://github.com/python/cpython/commit/e5796c42c687e1454e84dcc50e6f67db48ff69a0 ---------- pull_requests: +10752 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:18:17 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 04:18:17 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546229879.97.0.200264008346.issue35214@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset e5796c42c687e1454e84dcc50e6f67db48ff69a0 by Gregory P. Smith in branch 'master': bpo-35214: Skip test_io tests that'd cause a huge malloc under msan (#11385) https://github.com/python/cpython/commit/e5796c42c687e1454e84dcc50e6f67db48ff69a0 ---------- pull_requests: +10752, 10753 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:18:19 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 04:18:19 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546229879.97.0.200264008346.issue35214@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset e5796c42c687e1454e84dcc50e6f67db48ff69a0 by Gregory P. Smith in branch 'master': bpo-35214: Skip test_io tests that'd cause a huge malloc under msan (#11385) https://github.com/python/cpython/commit/e5796c42c687e1454e84dcc50e6f67db48ff69a0 ---------- pull_requests: +10752, 10753, 10754 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:34:15 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 04:34:15 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546230855.88.0.0939357986027.issue35214@roundup.psfhosted.org> Gregory P. Smith added the comment: Status on my upcoming buildbot host after today's changes: == Tests result: FAILURE == 375 tests OK. 11 tests failed: test_asyncio test_builtin test_code test_ctypes test_ioctl test_openpty test_os test_posix test_pty test_shutil test_uuid 32 tests skipped: test_bz2 test_curses test_dbm_gnu test_dbm_ndbm test_devpoll test_gzip test_idle test_kqueue test_lzma test_msilib test_ossaudiodev test_readline test_smtpnet test_socketserver test_sqlite test_ssl test_startfile test_tcl test_timeout test_tix test_tk test_ttk_guionly test_ttk_textonly test_turtle test_urllib2net test_urllibnet test_winconsoleio test_winreg test_winsound test_xmlrpc_net test_zipfile64 test_zlib Most of those are dying due to pty use (openpty, etc) which is not properly memory sanitizer traced. test_posix appears to have something I can fix by annotating in the code. after that, I'll decide how to tell my buildbot not to run those tests so we can have a green buildbot memory sanitizing everything else. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:35:36 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 04:35:36 +0000 Subject: [issue35225] test_faulthandler fails under ubsan In-Reply-To: <1542078270.77.0.788709270274.issue35225@psf.upfronthosting.co.za> Message-ID: <1546230936.58.0.63358426247.issue35225@roundup.psfhosted.org> Gregory P. Smith added the comment: https://buildbot.python.org/all/#/builders/135/builds/1110 == Tests result: SUCCESS == 404 tests OK. 10 slowest tests: - test_tokenize: 3 min 43 sec - test_concurrent_futures: 3 min 28 sec - test_multiprocessing_spawn: 3 min 20 sec - test_tools: 2 min 59 sec - test_lib2to3: 2 min 23 sec - test_multiprocessing_forkserver: 2 min 2 sec - test_asyncio: 1 min 55 sec - test_multiprocessing_fork: 1 min 28 sec - test_subprocess: 1 min 15 sec - test_io: 58 sec 708 ms 14 tests skipped: test_devpoll test_gdb test_ioctl test_kqueue test_msilib test_ossaudiodev test_startfile test_tix test_tk test_ttk_guionly test_winconsoleio test_winreg test_winsound test_zipfile64 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:39:31 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 31 Dec 2018 04:39:31 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546231171.31.0.835444726366.issue35214@roundup.psfhosted.org> miss-islington added the comment: New changeset 5d2e4b1ff2f01b6aeac2f2f302f363d3eed225fa by Miss Islington (bot) in branch '3.7': bpo-35214: Skip test_io tests that'd cause a huge malloc under msan (GH-11385) https://github.com/python/cpython/commit/5d2e4b1ff2f01b6aeac2f2f302f363d3eed225fa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:51:38 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 04:51:38 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546231898.46.0.87048374074.issue35214@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10755 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:51:50 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 04:51:50 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546231910.72.0.778620472938.issue35214@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10755, 10756 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:52:02 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 04:52:02 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546231922.54.0.00740646994336.issue35214@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10755, 10756, 10757 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 00:09:14 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 31 Dec 2018 05:09:14 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1546232954.05.0.77676862632.issue35596@roundup.psfhosted.org> Nick Coghlan added the comment: Ah, you're right - I missed that the ForceASCII stuff was on the non-Windows side of an ifdef so it's literally impossible for that change to affect Windows, not just highly unlikely. It would be interesting to compare the output of `python -vv` between the working case and the non-working case, as the second level of verbosity will print out all the different candidates the two versions are considering, and which ones they're accepting. For example, here's my Linux system Python up to the point where it finishes importing the UTF-8 codec: ======================== $ python3 -vv import _frozen_importlib # frozen import _imp # builtin import '_thread' # import '_warnings' # import '_weakref' # # installing zipimport hook import 'zipimport' # # installed zipimport hook import '_frozen_importlib_external' # import '_io' # import 'marshal' # import 'posix' # import _thread # previously loaded ('_thread') import '_thread' # import _weakref # previously loaded ('_weakref') import '_weakref' # # /usr/lib64/python3.7/encodings/__pycache__/__init__.cpython-37.pyc matches /usr/lib64/python3.7/encodings/__init__.py # code object from '/usr/lib64/python3.7/encodings/__pycache__/__init__.cpython-37.pyc' # trying /usr/lib64/python3.7/codecs.cpython-37m-x86_64-linux-gnu.so # trying /usr/lib64/python3.7/codecs.abi3.so # trying /usr/lib64/python3.7/codecs.so # trying /usr/lib64/python3.7/codecs.py # /usr/lib64/python3.7/__pycache__/codecs.cpython-37.pyc matches /usr/lib64/python3.7/codecs.py # code object from '/usr/lib64/python3.7/__pycache__/codecs.cpython-37.pyc' import '_codecs' # import 'codecs' # <_frozen_importlib_external.SourceFileLoader object at 0x7f0ea616eb70> # trying /usr/lib64/python3.7/encodings/aliases.cpython-37m-x86_64-linux-gnu.so # trying /usr/lib64/python3.7/encodings/aliases.abi3.so # trying /usr/lib64/python3.7/encodings/aliases.so # trying /usr/lib64/python3.7/encodings/aliases.py # /usr/lib64/python3.7/encodings/__pycache__/aliases.cpython-37.pyc matches /usr/lib64/python3.7/encodings/aliases.py # code object from '/usr/lib64/python3.7/encodings/__pycache__/aliases.cpython-37.pyc' import 'encodings.aliases' # <_frozen_importlib_external.SourceFileLoader object at 0x7f0ea6183550> import 'encodings' # <_frozen_importlib_external.SourceFileLoader object at 0x7f0ea616e5c0> # trying /usr/lib64/python3.7/encodings/utf_8.cpython-37m-x86_64-linux-gnu.so # trying /usr/lib64/python3.7/encodings/utf_8.abi3.so # trying /usr/lib64/python3.7/encodings/utf_8.so # trying /usr/lib64/python3.7/encodings/utf_8.py # /usr/lib64/python3.7/encodings/__pycache__/utf_8.cpython-37.pyc matches /usr/lib64/python3.7/encodings/utf_8.py # code object from '/usr/lib64/python3.7/encodings/__pycache__/utf_8.cpython-37.pyc' import 'encodings.utf_8' # <_frozen_importlib_external.SourceFileLoader object at 0x7f0ea6191278> ======================== ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 00:13:04 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 05:13:04 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546233184.75.0.405700841404.issue35214@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 1d300ce1d8238136595c8fea76266a4755cd73a2 by Gregory P. Smith in branch 'master': bpo-35214: Annotate posix calls for clang MSan. (#11389) https://github.com/python/cpython/commit/1d300ce1d8238136595c8fea76266a4755cd73a2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 00:14:50 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 31 Dec 2018 05:14:50 +0000 Subject: [issue35614] Broken help() on metaclasses In-Reply-To: <1546096910.12.0.853369060665.issue35614@roundup.psfhosted.org> Message-ID: <1546233290.31.0.286343218795.issue35614@roundup.psfhosted.org> Nick Coghlan added the comment: New changeset b539cef31c060c7eecc331d25a23b80ded0baf08 by Nick Coghlan (Sanyam Khurana) in branch 'master': bpo-35614: Fix pydoc help() on metaclasses (#11357) https://github.com/python/cpython/commit/b539cef31c060c7eecc331d25a23b80ded0baf08 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 00:19:43 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 31 Dec 2018 05:19:43 +0000 Subject: [issue35614] Broken help() on metaclasses In-Reply-To: <1546096910.12.0.853369060665.issue35614@roundup.psfhosted.org> Message-ID: <1546233583.93.0.504194331235.issue35614@roundup.psfhosted.org> Change by Nick Coghlan : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 00:22:58 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 31 Dec 2018 05:22:58 +0000 Subject: [issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots In-Reply-To: <1540044407.71.0.788709270274.issue35031@psf.upfronthosting.co.za> Message-ID: <1546233778.38.0.558003814624.issue35031@roundup.psfhosted.org> Ned Deily added the comment: If the failure has regularly shown up on 3.6 FreeBSD buildbots in the past, I would accept a backport of the test change to 3.6. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 00:53:36 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 05:53:36 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546235616.69.0.36562890081.issue35214@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10758 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 00:53:49 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 05:53:49 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546235629.85.0.106326420016.issue35214@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10758, 10759 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 00:53:59 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 05:53:59 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546235639.48.0.260717765047.issue35214@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +10758, 10759, 10760 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 01:04:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2018 06:04:24 +0000 Subject: [issue35623] Segfault in test_bigmem.ListTest.test_sort In-Reply-To: <1546218988.78.0.27697670498.issue35623@roundup.psfhosted.org> Message-ID: <1546236264.49.0.531084859848.issue35623@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 01:05:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2018 06:05:54 +0000 Subject: [issue35615] "RuntimeError: Dictionary changed size during iteration" when copying a WeakValueDictionary In-Reply-To: <1546116337.91.0.423915840639.issue35615@roundup.psfhosted.org> Message-ID: <1546236354.2.0.433202216666.issue35615@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +fdrake, pitrou, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 01:14:36 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 31 Dec 2018 06:14:36 +0000 Subject: [issue35214] Get the test suite passing with clang Memory Sanitizer enabled In-Reply-To: <1542007595.0.0.788709270274.issue35214@psf.upfronthosting.co.za> Message-ID: <1546236876.4.0.593465355398.issue35214@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset efcf08d8ca9084d8248715f0634c21b705f02ca2 by Gregory P. Smith in branch '3.7': [3.7] bpo-35214: Annotate posix calls for clang MSan. (GH-11389) (GH-11391) https://github.com/python/cpython/commit/efcf08d8ca9084d8248715f0634c21b705f02ca2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 02:51:00 2018 From: report at bugs.python.org (mattip) Date: Mon, 31 Dec 2018 07:51:00 +0000 Subject: [issue34778] Memoryview for column-major (f_contiguous) arrays from bytes impossible to achieve In-Reply-To: <1537725098.47.0.956365154283.issue34778@psf.upfronthosting.co.za> Message-ID: <1546242660.11.0.917579873767.issue34778@roundup.psfhosted.org> mattip added the comment: > the original decision to exclude non 'C' views was deliberate Seems this is reflected in the code: ``` a = np.array([[0, 1, 2], [3, 4, 5]]) mv = memoryview(a.T) mv.f_contiguous # True mv.cast('i', (3, 2)) # TypeError: memoryview: casts are restricted to C-contiguous views ``` Is there any interest in revisiting that discussion? It seems the buffer protocol could allow more flexibility wrt strides and contiguous flags. Do you have a link to the discussion where this was rejected? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 02:56:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2018 07:56:23 +0000 Subject: [issue35609] Improve of abc.py docstring In-Reply-To: <1546052751.93.0.333388893142.issue35609@roundup.psfhosted.org> Message-ID: <1546242983.76.0.890004571264.issue35609@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 5c117dd227e1b4c4f0a62564d8592f1ba45c91eb by Serhiy Storchaka in branch 'master': bpo-35609: Remove examples for deprecated decorators in the abc module. (GH-11355) https://github.com/python/cpython/commit/5c117dd227e1b4c4f0a62564d8592f1ba45c91eb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 03:12:18 2018 From: report at bugs.python.org (Oded Engel) Date: Mon, 31 Dec 2018 08:12:18 +0000 Subject: [issue35624] Shelve sync issues while using Gevent Message-ID: <1546243936.53.0.108056450415.issue35624@roundup.psfhosted.org> New submission from Oded Engel : Shelve method, sync, does not work when using gevent threading. writeback was set to True, flag was set to 'c'. only way to get the dbb synced is by closing and reopening the db. ---------- components: Library (Lib) messages: 332807 nosy: Oded Engel priority: normal severity: normal status: open title: Shelve sync issues while using Gevent versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 03:13:37 2018 From: report at bugs.python.org (Oded Engel) Date: Mon, 31 Dec 2018 08:13:37 +0000 Subject: [issue35624] Shelve sync issues while using Gevent In-Reply-To: <1546243936.53.0.108056450415.issue35624@roundup.psfhosted.org> Message-ID: <1546244017.51.0.481953295784.issue35624@roundup.psfhosted.org> Change by Oded Engel : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 03:26:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2018 08:26:03 +0000 Subject: [issue35609] Improve of abc.py docstring In-Reply-To: <1546052751.93.0.333388893142.issue35609@roundup.psfhosted.org> Message-ID: <1546244763.61.0.353757544363.issue35609@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 05:48:01 2018 From: report at bugs.python.org (bzip2) Date: Mon, 31 Dec 2018 10:48:01 +0000 Subject: [issue35625] documentation of list, set & dict comprehension make no mention of buggy class scope behavior Message-ID: <1546253280.49.0.920078772343.issue35625@roundup.psfhosted.org> New submission from bzip2 : The sections on list, set and dict comprehensions in the tutorial on data structures (ref. 1) state repeatedly that they are equivalent to for loops, but do not mention that this is not true in classes. In fact, the example used for nested list comprehensions (section 5.1.4) will work in a function, but not in a class. Similarly, there seems to be no mention of this scope "limitation" in the tutorial on classes (ref. 2), despite a section on scopes and namespaces (section 9.2) and another that mentions list comprehensions (section 9.10). The scope "limitation" is mentioned at the end of a section on resolution of names on a page about the execution model in the reference guide (ref. 3), and of course in various forums, where people may perhaps eventually find them after wasting time trying to figure out what they've done wrong. If comprehensions are "equivalent" to for loops only under certain conditions (in a class, but only in a class, only one variable from outside the comprehension is accessible in the comprehension, and it must be the outermost iterable), they are not equivalent and should not be described as such. This "limitation" should be mentioned prominently wherever comprehensions are described, since both classes and comprehensions are presumably common constructs. When people read "is equivalent to" without a qualifier, they assume "is always equivalent to". Returning to section 9.10 in ref. 2, the unique_words example is misleading because it strongly implies that nested for loops in a comprehension should work in a class. Since that's only true in some cases, the example should be qualified. More broadly, because that tutorial is about classes, the relevance of the last three sections should be revisited. As an aside, I agree with the developers who consider this scope "limitation" a bug and not (paraphrasing) "just how the language works", since the exact same two lines of code, which depend on no other variables or functions, work in a function or module but not in a class. 1. https://docs.python.org/3/tutorial/datastructures.html 2. https://docs.python.org/3/tutorial/classes.html 3. https://docs.python.org/3/reference/executionmodel.html ---------- assignee: docs at python components: Documentation messages: 332808 nosy: bzip2, docs at python priority: normal severity: normal status: open title: documentation of list, set & dict comprehension make no mention of buggy class scope behavior type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 05:48:39 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 31 Dec 2018 10:48:39 +0000 Subject: [issue35624] Shelve sync issues while using Gevent In-Reply-To: <1546243936.53.0.108056450415.issue35624@roundup.psfhosted.org> Message-ID: <1546253319.65.0.797773185349.issue35624@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi, thanks for opening a bug report. Can you provide a script that reproduce the issue? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 05:53:24 2018 From: report at bugs.python.org (Eduardo Orochena) Date: Mon, 31 Dec 2018 10:53:24 +0000 Subject: [issue35626] Python dictreader KeyError issue Message-ID: <1546253603.09.0.372827657102.issue35626@roundup.psfhosted.org> New submission from Eduardo Orochena : def load_file(filename): with open(filename, 'r', encoding='utf-8') as fin: header = fin.readline() print('Found ' + header) reader = csv.DictReader(fin) for row in reader: print(type(row), row) print('Beds {} '.format(row['beds'])) This results in a KeyError exception whilst open_f = open(filename, 'r', encoding='utf-8') read_it = csv.DictReader(open_f) for i in read_it: print('Beds {}'.format(i['beds'])) behaves as expected ---------- components: Build messages: 332810 nosy: eorochena priority: normal severity: normal status: open title: Python dictreader KeyError issue type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 06:05:46 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 31 Dec 2018 11:05:46 +0000 Subject: [issue35626] Python dictreader KeyError issue In-Reply-To: <1546253603.09.0.372827657102.issue35626@roundup.psfhosted.org> Message-ID: <1546254346.58.0.927206601078.issue35626@roundup.psfhosted.org> Steven D'Aprano added the comment: Can you please provide a *simple* and *complete* demonstration, including the *full* traceback? As given, we cannot run the supplied code and don't know what the contents of the csv file are supposed to be. See here for more detail: http://www.sscce.org/ But my *guess*, on reading this, is that the line header = fin.readline() causes the difference. In the first sample, you skip past the first line of the csv file, and so when the dictreader reads the rest of the file, it never sees the first row. But in the second example, it does see the first row. What happens if you change the first example to this? header = fin.readline() print('Found ' + header) fin.seek(0) reader = csv.DictReader(fin) Does that solve your problem? Likewise, in the second case, if you change it to this: open_f = open(filename, 'r', encoding='utf-8') __ = open_f.readline() read_it = csv.DictReader(open_f) what happens? ---------- components: +Library (Lib) -Build nosy: +steven.daprano type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 06:22:13 2018 From: report at bugs.python.org (June Kim) Date: Mon, 31 Dec 2018 11:22:13 +0000 Subject: [issue35627] multiprocessing.queue in 3.7.2 doesn't behave as it was in 3.7.1 Message-ID: <1546255332.76.0.703203586878.issue35627@roundup.psfhosted.org> Change by June Kim : ---------- components: Library (Lib) nosy: June Kim priority: normal severity: normal status: open title: multiprocessing.queue in 3.7.2 doesn't behave as it was in 3.7.1 type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 06:49:30 2018 From: report at bugs.python.org (June Kim) Date: Mon, 31 Dec 2018 11:49:30 +0000 Subject: [issue35627] multiprocessing.queue in 3.7.2 doesn't behave as it was in 3.7.1 Message-ID: <1546256970.74.0.591831290501.issue35627@roundup.psfhosted.org> New submission from June Kim : ## Test code ## ## Modified a bit from the original written by Doug Hellmann ## https://pymotw.com/3/multiprocessing/communication.html import multiprocessing import time class Consumer(multiprocessing.Process): def __init__(self, task_queue, result_queue): multiprocessing.Process.__init__(self) self.task_queue = task_queue self.result_queue = result_queue def run(self): proc_name = self.name while True: print('Getting task') next_task = self.task_queue.get() print(f'task got: {next_task}') if next_task is None: print('{}: Exiting'.format(proc_name)) self.task_queue.task_done() break print('{}: {}'.format(proc_name, next_task)) answer = next_task() self.task_queue.task_done() self.result_queue.put(answer) class Task: def __init__(self, a, b): self.a = a self.b = b def __call__(self): time.sleep(0.1) return '{self.a} * {self.b} = {product}'.format( self=self, product=self.a * self.b) def __str__(self): return '{self.a} * {self.b}'.format(self=self) def test(): tasks = multiprocessing.JoinableQueue() results = multiprocessing.Queue() num_consumers = multiprocessing.cpu_count() * 2 print('Creating {} consumers'.format(num_consumers)) consumers = [Consumer(tasks, results) for i in range(num_consumers)] [w.start() for w in consumers] num_jobs = 10 print('Putting') [tasks.put(Task(i, i)) for i in range(num_jobs)] print('Poisoning') [tasks.put(None) for i in range(num_consumers)] print('Joining') tasks.join() while num_jobs: result = results.get() print('Result:', result) num_jobs -= 1 ### 1. This code works perfectly in 3.7.1 but halts the main process in 3.7.2 2. It seems the JoinableQueue is empty when it is accessed by processes. 3. IMHO, resource sharing mechanism in multiprocessing.queue seems not working properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 07:15:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2018 12:15:21 +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: <1546258521.08.0.853471764243.issue32492@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 052b2dfdc967a8c061ff9561534e905009b88b8c by Serhiy Storchaka in branch 'master': bpo-32492: Tweak _collections._tuplegetter. (GH-11367) https://github.com/python/cpython/commit/052b2dfdc967a8c061ff9561534e905009b88b8c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 07:15:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2018 12:15:44 +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: <1546258544.49.0.874364635949.issue32492@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 08:13:54 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 31 Dec 2018 13:13:54 +0000 Subject: [issue35627] multiprocessing.queue in 3.7.2 doesn't behave as it was in 3.7.1 In-Reply-To: <1546256970.74.0.591831290501.issue35627@roundup.psfhosted.org> Message-ID: <1546262034.28.0.732516379453.issue35627@roundup.psfhosted.org> R?mi Lapeyre added the comment: I just tried your script in "9a3ffc" (3.7.2final) and "260ec2c36a" (3.7.1final) and it worked on both without halting the main process. I'm on MacOS Sierra, can you give more details about your environment? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 08:14:04 2018 From: report at bugs.python.org (s-ball) Date: Mon, 31 Dec 2018 13:14:04 +0000 Subject: [issue35628] Allow lazy loading of translations in gettext. Message-ID: <1546262042.35.0.847076847051.issue35628@roundup.psfhosted.org> New submission from s-ball : When working on i18n, I realized that msgfmt.py did not generate any hash table. One step further, I realized that the gettext.py would not have used it because it unconditionnaly loads the whole translation files and contains the following TODO message: TODO: - Lazy loading of .mo files. Currently the entire catalog is loaded into memory, but that's probably bad for large translated programs. Instead, the lexical sort of original strings in GNU .mo files should be exploited to do binary searches and lazy initializations. Or you might want to use the undocumented double-hash algorithm for .mo files with hash tables, but you'll need to study the GNU gettext code to do this. I have studied the code, and found that it should not be too complex to implement it in pure Python. I have posted a message on python-ideas about it and here are my conclusion: Features: ======== The gettext module should be allowed to load lazily the catalogs from mo file. This lazy load should be optional and make use of the hash tables from mo files when they are present or revert to a binary search. The translation strings should be cached for better performances. API changes: ============ 3 functions from the gettext module will have 2 new optional parameter named caching, and keepopen: gettext.bindtextdomain(domain, localedir=None) would become gettext.bindtextdomain(domain, localedir=None, caching=None, keepopen=False) gettext.translation(domain, localedir=None, languages=None, class_=None, fallback=False, codeset=None) would become gettext.translation(domain, localedir=None, languages=None, class_=None, fallback=False, codeset=None, caching=None, keepopen=False) gettext.install(domain, localedir=None, codeset=None, names=None) would become gettext.install(domain, localedir=None, codeset=None, names=None, caching=None, keepopen=False) The new caching parameter could receive the following values: caching=None: revert to the previour eager loading of the full catalog. It will be the default to allow previous application to see no change caching=1: lazy loading with unlimited cache caching=n where n is a positive (>=0) integer value: lazy loading with a LRU cache limited to n strings The keepopen parameter would be a boolean: keepopen=False (default): the mo file is only opened before loading a translation string and closed immediately after - it is also opened once when the GNUTranslation class is initialized to load the file description keepopen=True: the mo file is kept open during the lifetime of the GNUTranslation object. This parameter is ignored and not used if caching is None Implementation: ============== The current GNUTranslation class loads the content of the mo file to build a dictionnary where the original strings are the keys and the translated keys the values. Plural forms use a special processing: the key is a 2 tuple (singular original string, order), and the value is the corresponding translated string - order=0 is normally for the singular translated string. The proposed implementation would simply replace this dictionary with a special mapping subclass when caching is not None. That subclass would use same keys as the original directory and would: - first search in its cache - if not found in cache and if the hashtable has not a zero size search the original string by hash - if not found in cache and if the hashtable has a zero size, search the original string with a binary search algorithm. - if a string is found, it should feed the LRU cache, eventually throwing away the oldest entry (entries) That should allow to implement the new feature with minimal refactoring for the gettext module. But I also propose to change msgfmt.py to build the hashtable. IMHO, the function should lie in the standard library probably as a submodule of gettext to allow various Python projects (pybabel, django) to directly use it instead of developping their own ones. I will probably submit a PR in a while but it will will require some time to propose a full implementation with a correct test coverage. ---------- components: Library (Lib) messages: 332815 nosy: s-ball priority: normal severity: normal status: open title: Allow lazy loading of translations in gettext. type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 08:19:05 2018 From: report at bugs.python.org (wwq) Date: Mon, 31 Dec 2018 13:19:05 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1546262345.49.0.913954666435.issue35596@roundup.psfhosted.org> wwq added the comment: I have tried zipping the stdlib myself form normal version's "Python37\Lib" with all files were end with ".py"(without "site-packages" of course). And then everything work fine. Maybe the loader only reject ".pyc" file from zip load? ---------- nosy: +wwqgtxx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 08:44:16 2018 From: report at bugs.python.org (Yash Aggarwal) Date: Mon, 31 Dec 2018 13:44:16 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1546263856.67.0.928914651294.issue35431@roundup.psfhosted.org> Yash Aggarwal added the comment: Can I work on C implementation if no-one else is doing it right now? ---------- nosy: +FR4NKESTI3N _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 08:59:22 2018 From: report at bugs.python.org (June Kim) Date: Mon, 31 Dec 2018 13:59:22 +0000 Subject: [issue35627] multiprocessing.queue in 3.7.2 doesn't behave as it was in 3.7.1 In-Reply-To: <1546256970.74.0.591831290501.issue35627@roundup.psfhosted.org> Message-ID: <1546264762.62.0.422128662116.issue35627@roundup.psfhosted.org> June Kim added the comment: Here is my environment ---system CPU: Intel i5 @2.67GHz RAM: 8G OS: Windows 10 Home (64bit) OS version: 1803 OS build: 17134.472 ---python version1: 3.7.1 AMD64 on win32 version2: 3.7.2 AMD64 on win32 Python path: (venv)/Scripts/python.exe IDE: VS Code(1.30.1) Terminal: Git Bash ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 09:52:24 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 31 Dec 2018 14:52:24 +0000 Subject: [issue33039] int() and math.trunc don't accept objects that only define __index__ In-Reply-To: <1520672231.04.0.467229070634.issue33039@psf.upfronthosting.co.za> Message-ID: <1546267944.45.0.377257569981.issue33039@roundup.psfhosted.org> R?mi Lapeyre added the comment: >I think we should also consider changing the type creation behaviour in 3.8 @ncoghlan is this what's being done in PyTypeReady? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 10:12:10 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 31 Dec 2018 15:12:10 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1546269130.74.0.0564088960706.issue20182@roundup.psfhosted.org> Tal Einat added the comment: New changeset ede0b6fae20290bf22b6ee1b9a1e1179d750f360 by Tal Einat in branch 'master': bpo-20182: AC convert Python/sysmodule.c (GH-11328) https://github.com/python/cpython/commit/ede0b6fae20290bf22b6ee1b9a1e1179d750f360 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 10:29:03 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 31 Dec 2018 15:29:03 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546270143.82.0.180348446976.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +10761 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 10:29:11 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 31 Dec 2018 15:29:11 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546270151.63.0.307438275277.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +10761, 10762 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 10:29:19 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 31 Dec 2018 15:29:19 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546270159.22.0.812421277332.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +10761, 10762, 10763 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 10:29:51 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 31 Dec 2018 15:29:51 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546270191.62.0.415854928017.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- Removed message: https://bugs.python.org/msg332776 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 10:30:34 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 31 Dec 2018 15:30:34 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546270234.88.0.275179597475.issue35598@roundup.psfhosted.org> Cheryl Sabella added the comment: PR11392 is the first refactor. It moves translate_key to the module level and also moves the definitions of the key tuples to the module level since they are used in more than one place (and they don't change). As a side note, I'll do the refactoring over several PRs to try to make it manageable to review. (PR11377 was the first version of this, but somehow I really messed it and couldn't get it back.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 10:31:09 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 31 Dec 2018 15:31:09 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546270269.11.0.864105131151.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: -10762 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 10:31:36 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 31 Dec 2018 15:31:36 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546270296.1.0.592524314877.issue35598@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: -10763 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 10:31:56 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 31 Dec 2018 15:31:56 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1546270316.69.0.592850393043.issue20182@roundup.psfhosted.org> Tal Einat added the comment: Note that the problematic part of the Modules/_hashopenssl.c AC conversion was reverted, as part of GH-11379. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 10:32:47 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 31 Dec 2018 15:32:47 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1546270367.31.0.862188312139.issue20182@roundup.psfhosted.org> Tal Einat added the comment: AFAICT, this issue can finally be closed! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 12:02:30 2018 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 31 Dec 2018 17:02:30 +0000 Subject: [issue35606] Add prod() function to the math module In-Reply-To: <1546025352.75.0.868813504694.issue35606@roundup.psfhosted.org> Message-ID: <1546275750.77.0.247833819394.issue35606@roundup.psfhosted.org> Mark Dickinson added the comment: [Raymond] > or to implement particular NaN/Inf handling not present in a naive implementation On this subject, some effort has been made in the past to make (almost) all the math module functions behave consistently with respect to things like exceptions, overflow, infinities, nans, signed zeros, etc. (There are unfortunately some exceptions to the general rule, like math.pow.) If possible, I'd like to see any implementation of math.prod do the same; I'd prefer us to get this right initially rather than tweak the definition to make subtle possibly-breaking changes to the implementation later. That is, the ideal behaviour would include things like: (a) a product of finite floating-point (or convertible-to-float) numbers should raise an exception on overflow. Probably OverflowError, though ValueError wouldn't be indefensible either. (b) a product involving infinities but no NaNs or zeros should return an appropriately-signed infinity (where the sign is determined by an xor of all the signs of the inputs) (c) a product involving both infinities and zeros (but not NaNs) should raise ValueError (d) a product involving a NaN at any point should just return NaN The combination of these can get a bit awkward: for example, if a list starts with `[1e300, 1e300, ...]`, then it's not necessarily correct to raise `OverflowError` after processing the first two inputs, because if there's a NaN somewhere later in the list then that NaN should dominate the result. However, IEEE 754 allows some leeway here for its "Reduction operations" (section 9.4 of the to-be-superseded-any-day-now 2008 version of the standard), stating: > Numerical results and exceptional behavior, including the invalid operation exception, may differ among implementations due to the precision of intermediates and the order of evaluation. BTW, if we wanted to go for IEEE 754 compliance, the operation to implement would be "scaledProd", which takes a vector of inputs and returns a float along with an exponent; this allows taking products of long lists of floats without needing to worry about underflow or overflow. That's probably not what we want here, but the spec of scaledProd might help guide us with the implementation of prod. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 12:28:35 2018 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 31 Dec 2018 17:28:35 +0000 Subject: [issue35629] hang and/or leaked processes with multiprocessing.Pool(...).imap(...) Message-ID: <1546277313.94.0.653504981022.issue35629@roundup.psfhosted.org> New submission from Anthony Sottile : This simple program causes a hang / leaked processes (easiest to run in an interactive shell): import multiprocessing tuple(multiprocessing.Pool(4).imap(print, (1, 2, 3))) $ python3.6 Python 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import multiprocessing >>> tuple(multiprocessing.Pool(4).imap(print, (1, 2, 3))) 1 2 3 <<>> ^CProcess ForkPoolWorker-1: Traceback (most recent call last): Process ForkPoolWorker-2: Process ForkPoolWorker-3: Process ForkPoolWorker-4: File "/usr/lib/python3.6/multiprocessing/pool.py", line 746, in next item = self._items.popleft() IndexError: pop from an empty deque During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.6/multiprocessing/pool.py", line 750, in next self._cond.wait(timeout) File "/usr/lib/python3.6/threading.py", line 295, in wait waiter.acquire() KeyboardInterrupt $ python3.7 Python 3.7.2 (default, Dec 25 2018, 03:50:46) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import multiprocessing >>> tuple(multiprocessing.Pool(4).imap(print, (1, 2, 3))) 1 2 3 (None, None, None) >>> KeyboardInterrupt Process ForkPoolWorker-3: Process ForkPoolWorker-1: Process ForkPoolWorker-2: Process ForkPoolWorker-4: >>> Traceback (most recent call last): File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap self.run() File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run self._target(*self._args, **self._kwargs) Traceback (most recent call last): File "/usr/lib/python3.7/multiprocessing/pool.py", line 110, in worker task = get() File "/usr/lib/python3.7/multiprocessing/queues.py", line 351, in get with self._rlock: File "/usr/lib/python3.7/multiprocessing/synchronize.py", line 95, in __enter__ return self._semlock.__enter__() KeyboardInterrupt File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap self.run() File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3.7/multiprocessing/pool.py", line 110, in worker task = get() File "/usr/lib/python3.7/multiprocessing/queues.py", line 351, in get with self._rlock: File "/usr/lib/python3.7/multiprocessing/synchronize.py", line 95, in __enter__ return self._semlock.__enter__() KeyboardInterrupt Traceback (most recent call last): File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap self.run() File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3.7/multiprocessing/pool.py", line 110, in worker task = get() File "/usr/lib/python3.7/multiprocessing/queues.py", line 351, in get with self._rlock: File "/usr/lib/python3.7/multiprocessing/synchronize.py", line 95, in __enter__ return self._semlock.__enter__() KeyboardInterrupt Traceback (most recent call last): File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap self.run() File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3.7/multiprocessing/pool.py", line 110, in worker task = get() File "/usr/lib/python3.7/multiprocessing/queues.py", line 352, in get res = self._reader.recv_bytes() File "/usr/lib/python3.7/multiprocessing/connection.py", line 216, in recv_bytes buf = self._recv_bytes(maxlength) File "/usr/lib/python3.7/multiprocessing/connection.py", line 407, in _recv_bytes buf = self._recv(4) File "/usr/lib/python3.7/multiprocessing/connection.py", line 379, in _recv chunk = read(handle, remaining) KeyboardInterrupt (python3.8 shows the same behaviour as python3.7) $ ./python --version --version Python 3.8.0a0 (heads/master:ede0b6fae2, Dec 31 2018, 09:19:17) [GCC 7.3.0] python2.7 also has similar behaviour. I'm told this more reliably hangs on windows, though I don't have windows on hand. I've "fixed" my code to explicitly open / close the pool: with contextlib.closing(multiprocessing.Pool(jobs)) as pool: tuple(pool.imap(...)) I suspect a refcounting / gc bug ---------- components: Library (Lib) messages: 332825 nosy: Anthony Sottile priority: normal severity: normal status: open title: hang and/or leaked processes with multiprocessing.Pool(...).imap(...) type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 13:26:09 2018 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 31 Dec 2018 18:26:09 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1546280769.49.0.190631787645.issue35431@roundup.psfhosted.org> Mark Dickinson added the comment: > Can I work on C implementation if no-one else is doing it right now? Sounds fine to me. You might want to coordinate with @kellerfuchs to see what the status of their PR is; maybe the two of you can collaborate? @kellerfuchs: are you still planning to work on this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 14:25:57 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 31 Dec 2018 19:25:57 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1546284357.17.0.415105892732.issue20182@roundup.psfhosted.org> Tal Einat added the comment: New changeset ede0b6fae20290bf22b6ee1b9a1e1179d750f360 by Tal Einat in branch 'master': bpo-20182: AC convert Python/sysmodule.c (GH-11328) https://github.com/python/cpython/commit/ede0b6fae20290bf22b6ee1b9a1e1179d750f360 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 14:30:17 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 31 Dec 2018 19:30:17 +0000 Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za> Message-ID: <1546284617.16.0.488956504966.issue20182@roundup.psfhosted.org> Tal Einat added the comment: New changeset ede0b6fae20290bf22b6ee1b9a1e1179d750f360 by Tal Einat in branch 'master': bpo-20182: AC convert Python/sysmodule.c (GH-11328) https://github.com/python/cpython/commit/ede0b6fae20290bf22b6ee1b9a1e1179d750f360 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:06:38 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 31 Dec 2018 20:06:38 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546286798.65.0.629424898166.issue35598@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset b4ea8bb080f63ef27682f3f9bbaa4d12a83030b1 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-35598: IDLE - Globalize some config_key objects (GH-11392) https://github.com/python/cpython/commit/b4ea8bb080f63ef27682f3f9bbaa4d12a83030b1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:06:51 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 31 Dec 2018 20:06:51 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546286811.42.0.220755083272.issue35598@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10764 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:06:58 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 31 Dec 2018 20:06:58 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546286818.57.0.766113000802.issue35598@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10764, 10765 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:07:02 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 31 Dec 2018 20:07:02 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546286822.95.0.998852462962.issue35598@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +10764, 10765, 10766 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:19:56 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 31 Dec 2018 20:19:56 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546287596.68.0.449261470221.issue35598@roundup.psfhosted.org> miss-islington added the comment: New changeset 74e46483773fa2ed03ed02f1b5e3fb0a4691535e by Miss Islington (bot) in branch '3.7': bpo-35598: IDLE - Globalize some config_key objects (GH-11392) https://github.com/python/cpython/commit/74e46483773fa2ed03ed02f1b5e3fb0a4691535e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:34:16 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 31 Dec 2018 20:34:16 +0000 Subject: [issue35626] Python dictreader KeyError issue In-Reply-To: <1546253603.09.0.372827657102.issue35626@roundup.psfhosted.org> Message-ID: <1546288456.36.0.936652677756.issue35626@roundup.psfhosted.org> Eric V. Smith added the comment: Steven is correct: your problem is that in the first example you're reading the header row before you pass the file to DictReader, so the DictReader cannot know what your columns are named. (Actually, your code uses the second row of your file as the column names: you should have been able to determine this by looking at the value of "row" that was printed). I'm going to close this issue. Please do some more investigation. If you can produce a short example that we can execute ourselves, including any needed data files, and you think it still shows an error, please feel free to reopen this issue. ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:45:08 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 31 Dec 2018 20:45:08 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546289108.59.0.862171741965.issue35598@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10766 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:45:26 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 31 Dec 2018 20:45:26 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546289126.86.0.079712326336.issue35598@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10765 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:53:12 2018 From: report at bugs.python.org (Suriyaa Sundararuban) Date: Mon, 31 Dec 2018 20:53:12 +0000 Subject: [issue35630] Missing code tag for "python3" in README.rst Message-ID: <1546289591.73.0.0479486789763.issue35630@roundup.psfhosted.org> New submission from Suriyaa Sundararuban : Currently there is no code tag for "python3" in the sentence "This will install Python as python3." (Location: https://github.com/python/cpython#build-instructions). I'm working on this small improvement. ---------- assignee: docs at python components: Documentation messages: 332832 nosy: docs at python, suriyaa priority: normal severity: normal status: open title: Missing code tag for "python3" in README.rst versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:58:19 2018 From: report at bugs.python.org (Suriyaa Sundararuban) Date: Mon, 31 Dec 2018 20:58:19 +0000 Subject: [issue35630] Missing code tag for "python3" in README.rst In-Reply-To: <1546289591.73.0.0479486789763.issue35630@roundup.psfhosted.org> Message-ID: <1546289899.81.0.329817119401.issue35630@roundup.psfhosted.org> Change by Suriyaa Sundararuban : ---------- keywords: +patch pull_requests: +10767 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:58:23 2018 From: report at bugs.python.org (Suriyaa Sundararuban) Date: Mon, 31 Dec 2018 20:58:23 +0000 Subject: [issue35630] Missing code tag for "python3" in README.rst In-Reply-To: <1546289591.73.0.0479486789763.issue35630@roundup.psfhosted.org> Message-ID: <1546289903.17.0.785684430052.issue35630@roundup.psfhosted.org> Change by Suriyaa Sundararuban : ---------- keywords: +patch, patch pull_requests: +10767, 10768 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:58:27 2018 From: report at bugs.python.org (Suriyaa Sundararuban) Date: Mon, 31 Dec 2018 20:58:27 +0000 Subject: [issue35630] Missing code tag for "python3" in README.rst In-Reply-To: <1546289591.73.0.0479486789763.issue35630@roundup.psfhosted.org> Message-ID: <1546289907.48.0.780742466378.issue35630@roundup.psfhosted.org> Change by Suriyaa Sundararuban : ---------- keywords: +patch, patch, patch pull_requests: +10767, 10768, 10769 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 16:01:01 2018 From: report at bugs.python.org (Suriyaa Sundararuban) Date: Mon, 31 Dec 2018 21:01:01 +0000 Subject: [issue35630] Missing code tag for "python3" in README.rst In-Reply-To: <1546289591.73.0.0479486789763.issue35630@roundup.psfhosted.org> Message-ID: <1546290061.14.0.288740124017.issue35630@roundup.psfhosted.org> Suriyaa Sundararuban added the comment: Done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 16:38:45 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 31 Dec 2018 21:38:45 +0000 Subject: [issue33987] IDLE: add ttk.Frame inside searchbaseToplevel In-Reply-To: <1530158550.76.0.56676864532.issue33987@psf.upfronthosting.co.za> Message-ID: <1546292325.42.0.101154151917.issue33987@roundup.psfhosted.org> Terry J. Reedy added the comment: *35598 converted config_key to ttk, including a t tk frame inside toplevel. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 16:43:18 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 31 Dec 2018 21:43:18 +0000 Subject: [issue35598] IDLE: Modernize config_key module In-Reply-To: <1545942477.09.0.499754382121.issue35598@roundup.psfhosted.org> Message-ID: <1546292598.29.0.791412752291.issue35598@roundup.psfhosted.org> Terry J. Reedy added the comment: This issue looks complete to me unless there is something simple not previously mentioned. Fixing cancel would be a separate issue. Separating window and frame needs separate discussion on a separate issue, and is not a priority now. Model popups are different from independent listed windows, so I an not sure what we will want to do for a future tabbed window. A more immediate concern to me is finishing ttk conversion, including using ttk frames for ttk widgets. (See #33987 for why.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 17:08:48 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 31 Dec 2018 22:08:48 +0000 Subject: [issue33987] IDLE: add ttk.Frame inside searchbaseToplevel In-Reply-To: <1530158550.76.0.56676864532.issue33987@psf.upfronthosting.co.za> Message-ID: <1546294128.0.0.872040153386.issue33987@roundup.psfhosted.org> Terry J. Reedy added the comment: The change is trivial and there was already a Frame test, which initially failed. I will open another issue about similar changes needed elsewhere. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 17:10:52 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 31 Dec 2018 22:10:52 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1546294252.97.0.68830234216.issue35431@roundup.psfhosted.org> Raymond Hettinger added the comment: Kellar and Yash, my suggestion is to separate the work into two phases. Start with an initial patch that implements this simplest possible implementation, accompanied by clean documentation and thorough testing. Once everyone has agreed on the API (i.e. calling it "comb()", how to handle various input datatypes, and handling of corner cases), and the patch is applied, only then turn to a second pass for optimizations (special casing various types, minimizing how big intermediate values can get by doing early cancellation, exploiting even/odd patterns etc). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 17:12:45 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 31 Dec 2018 22:12:45 +0000 Subject: [issue33987] IDLE: add ttk.Frame inside searchbaseToplevel In-Reply-To: <1530158550.76.0.56676864532.issue33987@psf.upfronthosting.co.za> Message-ID: <1546294365.56.0.527190147646.issue33987@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +10771 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 17:12:53 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 31 Dec 2018 22:12:53 +0000 Subject: [issue33987] IDLE: add ttk.Frame inside searchbaseToplevel In-Reply-To: <1530158550.76.0.56676864532.issue33987@psf.upfronthosting.co.za> Message-ID: <1546294373.19.0.191492701546.issue33987@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch, patch pull_requests: +10771, 10772 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 17:13:00 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 31 Dec 2018 22:13:00 +0000 Subject: [issue33987] IDLE: add ttk.Frame inside searchbaseToplevel In-Reply-To: <1530158550.76.0.56676864532.issue33987@psf.upfronthosting.co.za> Message-ID: <1546294380.67.0.452718336652.issue33987@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch, patch, patch pull_requests: +10771, 10772, 10773 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 17:30:39 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 31 Dec 2018 22:30:39 +0000 Subject: [issue33987] IDLE: use ttk.Frame for ttk widgets In-Reply-To: <1530158550.76.0.56676864532.issue33987@psf.upfronthosting.co.za> Message-ID: <1546295439.83.0.356179574028.issue33987@roundup.psfhosted.org> Terry J. Reedy added the comment: We don't really need a new issue. Mark's opening post was generic. I grepped for ttk to get existing ttk imports and am making Frame and LabelFrame the first item or items for each import. I won't worry about whether any background is visible, as this could change. Cheryl, please note the import convention and review the diff when posted. ---------- stage: patch review -> test needed title: IDLE: add ttk.Frame inside searchbaseToplevel -> IDLE: use ttk.Frame for ttk widgets _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 18:18:02 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 31 Dec 2018 23:18:02 +0000 Subject: [issue33987] IDLE: use ttk.Frame for ttk widgets In-Reply-To: <1530158550.76.0.56676864532.issue33987@psf.upfronthosting.co.za> Message-ID: <1546298282.31.0.451550073249.issue33987@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10773 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 18:18:17 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 31 Dec 2018 23:18:17 +0000 Subject: [issue33987] IDLE: use ttk.Frame for ttk widgets In-Reply-To: <1530158550.76.0.56676864532.issue33987@psf.upfronthosting.co.za> Message-ID: <1546298297.41.0.55274845684.issue33987@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10772 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 18:56:15 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 31 Dec 2018 23:56:15 +0000 Subject: [issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' In-Reply-To: <1545927507.21.0.851075424973.issue35596@roundup.psfhosted.org> Message-ID: <1546300575.8.0.273653040084.issue35596@roundup.psfhosted.org> Steve Dower added the comment: Yes, we've established that zipimport is rejecting .pyc files now, but we need to dig through it to figure out why. I haven't had time yet, but if someone else can then don't wait for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 19:13:42 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 01 Jan 2019 00:13:42 +0000 Subject: [issue35629] hang and/or leaked processes with multiprocessing.Pool(...).imap(...) In-Reply-To: <1546277313.94.0.653504981022.issue35629@roundup.psfhosted.org> Message-ID: <1546301622.02.0.101176834583.issue35629@roundup.psfhosted.org> R?mi Lapeyre added the comment: Weirdly enough, it works with iPython: $ ipython3 Python 3.7.1 (default, Nov 6 2018, 18:49:54) Type 'copyright', 'credits' or 'license' for more information IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: import multiprocessing In [2]: tuple(multiprocessing.Pool(4).imap(print, (1, 2, 3))) ...: 1 2 3 Out[2]: (None, None, None) In [3]: ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________