From report at bugs.python.org Mon Oct 1 01:37:52 2018 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Oct 2018 05:37:52 +0000 Subject: [issue34844] logging.Formatter enhancement - Checking on style and fmt fields In-Reply-To: <1538252230.83.0.545547206417.issue34844@psf.upfronthosting.co.za> Message-ID: <1538372272.41.0.545547206417.issue34844@psf.upfronthosting.co.za> Vinay Sajip added the comment: > Checking fmt to match the style in the constructor of logging.Formatter This seems a reasonable change to want to make. You would need to parse the format string for fields using the appropriate style. This should probably be via a validate() method in each of the XXXStyle classes, which is passed the format string and raises an exception if invalid. > I would like to have custom fields passed in as an additional (optional) argument into the constructor for logging.Formatter If this is just a list of custom field names, it could be inferred from the passed format string, which will now be being parsed for fields for the checking described above. So there should be no need to pass an additional argument. > With this, we can remove the "extra" argument in Logger.makeRecord() We can't do this, because of the need to maintain backwards compatibility. Note also that custom fields can be introduced into a LogRecord in other ways, e.g. using Filters. > the "KeyError" here can be misleading and confusing It seems reasonable to make a change to re-raise such a KeyError using a more informative error message, perhaps as a ValueError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 01:55:43 2018 From: report at bugs.python.org (pashkasan) Date: Mon, 01 Oct 2018 05:55:43 +0000 Subject: [issue34859] python core in string substring search Message-ID: <1538373343.13.0.545547206417.issue34859@psf.upfronthosting.co.za> New submission from pashkasan : find substring in string its correct behavior? sample code str = """ Content-Length: 3192 Connection: close Cookie: _secure_admin_session_id=2a5dc26329de17ca4eafxxxxxxxxxxxxe; -----------------------------1477319126846 Content-Disposition: form-data; name="utf8" """ str2 = """ xxxx zzzzz tttttt """ if "\r\n" in str: print ("str found") else: print ("str not found") if "\r\n" in str2: print ("str2 found") else: print ("str2 not found") if str.find("\n\r"): print ("str found") else: print ("str not found") output [root at scw-6ec0de ~]# python a.py str not found str2 not found str found [root at scw-6ec0de ~]# python3 a.py str not found str2 not found str found [root at scw-6ec0de ~]# python --version Python 2.7.15 [root at scw-6ec0de ~]# python3 --version Python 3.6.4 [root at scw-6ec0de ~]# ---------- components: Interpreter Core messages: 326764 nosy: pashkasan priority: normal severity: normal status: open title: python core in string substring search versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 02:13:40 2018 From: report at bugs.python.org (Tim Peters) Date: Mon, 01 Oct 2018 06:13:40 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538374420.2.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: Noting that the failure of high-order bits to propagate is one form of "avalanche" failure. A recent 64-bit hash, SeaHash, takes this approach which is said to have provably "perfect" avalanche behavior: Py_uhash_t t = (Py_uhash_t)y; t *= (Py_uhash_t)0x6eed0e9da4d94a4fULL; t ^= (t >> 32) >> (t >> 60); t *= (Py_uhash_t)0x6eed0e9da4d94a4fULL; The giant constant is just a 63-bit "patternless" prime (for whatever reason, the author wants this transformation to be easily invertible, so a prime is necessary - this is NOT a "crypto" hash). The first multiply propagates low-order bits left. Then the next line uses high-order bits to change low-order bits. Extracting a variable shift count from the data itself is a clever idea taken from the PCG family of PRNGs - you have to work to contrive data where this doesn't "act kinda random". The last line then propagates the - now altered by the high-order bits - lower-order bits left again. Followed by x = (x * mult) + t; this yields a tuple hash that passes all the tests I have. The only collisions are in the new tuple test, which suffers 14. Better, add the "catastrophic" right-rotate t = (t >> 3) | (t << 61); at the start and it's still only the new tuple test that has a collision - it rises to 19 then, close to (but still under) its failure cutoff. What I haven't tried: in context it would be nice to eliminate the second multiply by the giant constant. We're doing a multiply anyway to fold `t` into `x`, which will propagate the low-order bits left on the next iteration's `x * mult`. That would ruin SeaHash's provable guarantees, but I'm more concerned about saving some cycles than purity ;-) If that added enough collisions to push the second tuple test "not much" over the limit, I'd raise its limit. Gonzo: "the real" SeaHash duplicates the code above and works on 4 inputs simultaneously, designed to keep a modern processor's instruction pipelines as busy as possible. I'd rather not bother (most tuples are short). So this is principled and, if the SeaHash theory is right, immune to any simple kind of catastrophic failure. Is it worth it? I'd sleep better, yes ;-) Note that the first multiply by the giant constant can be active at the same time as the `x * mult` at the end, so I'm guessing the speed hit would be bearable. There's no truly _cheap_ way to get good propagation from all bit positions. SeaHash has the fastest way to do that I've encountered. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 04:01:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Oct 2018 08:01:09 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1538380869.44.0.545547206417.issue32912@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9043 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 04:06:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Oct 2018 08:06:22 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1538381182.84.0.545547206417.issue32912@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since the author of PR 5849 had not the time to work on it, I have created PR 9652 which properly replaces a DeprecationWarning with a SyntaxWarning. It also updates the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 04:21:02 2018 From: report at bugs.python.org (Jakub Wilk) Date: Mon, 01 Oct 2018 08:21:02 +0000 Subject: [issue32892] Remove specific constant AST types in favor of ast.Constant In-Reply-To: <1519204597.27.0.467229070634.issue32892@psf.upfronthosting.co.za> Message-ID: <1538382062.1.0.545547206417.issue32892@psf.upfronthosting.co.za> Jakub Wilk added the comment: Also broke pyflakes: https://github.com/PyCQA/pyflakes/issues/367 ---------- nosy: +jwilk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 04:36:25 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 01 Oct 2018 08:36:25 +0000 Subject: [issue34859] python core in string substring search In-Reply-To: <1538373343.13.0.545547206417.issue34859@psf.upfronthosting.co.za> Message-ID: <1538382985.18.0.545547206417.issue34859@psf.upfronthosting.co.za> Ronald Oussoren added the comment: What do you think the problem is? The output of the script is what I'd expect it to be. Note that str.find() returns -1 when the needle is not present (and the first offset where the needle is found when it is present). ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 04:36:44 2018 From: report at bugs.python.org (Michael Felt) Date: Mon, 01 Oct 2018 08:36:44 +0000 Subject: [issue34860] fix test_sqlite for AIX Message-ID: <1538383004.27.0.545547206417.issue34860@psf.upfronthosting.co.za> New submission from Michael Felt : On AIX test_sqlite fails with: ====================================================================== FAIL: test_database_source_name (sqlite3.test.backup.BackupTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/aixtools/python/git/aix-pr/Lib/sqlite3/test/backup.py", line 146, in test_database_source_name ['SQL logic error', 'SQL logic error or missing database'] AssertionError: 'unrecognized error code: 1' not found in ['SQL logic error', 'SQL logic error or missing database'] Likely this is because the sqlite3 that is installed either has a bug, is too old, or was overly optimized and the expected error message is not being returned. A simple addition as: def test_database_source_name(self): with sqlite.connect(':memory:') as bck: self.cx.backup(bck, name='main') with sqlite.connect(':memory:') as bck: self.cx.backup(bck, name='temp') with self.assertRaises(sqlite.OperationalError) as cm: with sqlite.connect(':memory:') as bck: self.cx.backup(bck, name='non-existing') self.assertIn( str(cm.exception), ['SQL logic error', 'SQL logic error or missing database', 'unrecognized error code: 1'] ) allows to test to pass. Again, this is not a problem with either python or AIX - only yhe implementation of sqlite3 installed. My hope is that the PR with the modification above (add 'unrecognized error code: 1') will be accepted. Thx for your consideration. ---------- messages: 326769 nosy: Michael.Felt priority: normal severity: normal status: open title: fix test_sqlite for AIX _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 04:48:04 2018 From: report at bugs.python.org (Michael Felt) Date: Mon, 01 Oct 2018 08:48:04 +0000 Subject: [issue34860] fix test_sqlite for AIX In-Reply-To: <1538383004.27.0.545547206417.issue34860@psf.upfronthosting.co.za> Message-ID: <1538383684.72.0.545547206417.issue34860@psf.upfronthosting.co.za> Change by Michael Felt : ---------- keywords: +patch pull_requests: +9044 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 04:49:12 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 01 Oct 2018 08:49:12 +0000 Subject: [issue34860] fix test_sqlite for AIX In-Reply-To: <1538383004.27.0.545547206417.issue34860@psf.upfronthosting.co.za> Message-ID: <1538383752.64.0.545547206417.issue34860@psf.upfronthosting.co.za> Berker Peksag added the comment: Could you try latest master? I think this is a duplicate of issue 34743 and it has already been fixed in https://github.com/python/cpython/commit/b10a64d117de6121ea3e79c467c4107f8f399f3d. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 04:53:42 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 01 Oct 2018 08:53:42 +0000 Subject: [issue34538] Remove encouragement to author a base class for all Exception subclasses in a module In-Reply-To: <1535488851.13.0.56676864532.issue34538@psf.upfronthosting.co.za> Message-ID: <1538384022.12.0.545547206417.issue34538@psf.upfronthosting.co.za> INADA Naoki added the comment: Thanks, Nathaniel. I totally concur with you. This is tutorial section. We should focus on readers of the tutorial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 05:10:12 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 01 Oct 2018 09:10:12 +0000 Subject: [issue34538] Remove encouragement to author a base class for all Exception subclasses in a module In-Reply-To: <1535488851.13.0.56676864532.issue34538@psf.upfronthosting.co.za> Message-ID: <1538385012.81.0.545547206417.issue34538@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Guido, the check-in message for this section indicates that Fred Drake added this wording at your behest. Do you still agree with the guidance and examples or would you like to have it removed from all active versions of the documentation as proposed? https://docs.python.org/3.8/tutorial/errors.html#user-defined-exceptions ---------- assignee: docs at python -> gvanrossum nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 05:21:21 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 01 Oct 2018 09:21:21 +0000 Subject: [issue34859] python core in string substring search In-Reply-To: <1538373343.13.0.545547206417.issue34859@psf.upfronthosting.co.za> Message-ID: <1538385681.92.0.545547206417.issue34859@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The test code for the third case looks incorrect in two places: Given: if str.find("\n\r"): ^-- should compare to -1 ^^^^----- these are reversed Corrected: if str.find("\r\n") != -1: Also note that *str* is a confusing variable name because it shadows the builtin *str*. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 05:27:41 2018 From: report at bugs.python.org (Jakub Wilk) Date: Mon, 01 Oct 2018 09:27: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: <1538386061.47.0.545547206417.issue34850@psf.upfronthosting.co.za> Change by Jakub Wilk : ---------- nosy: +jwilk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 05:42:16 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 01 Oct 2018 09:42:16 +0000 Subject: [issue34859] python core in string substring search In-Reply-To: <1538373343.13.0.545547206417.issue34859@psf.upfronthosting.co.za> Message-ID: <1538386936.07.0.545547206417.issue34859@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I suspect that there may also be confusion about the line ending in multiline strings. Is there any documentation on the fact that this is always "\n" and not "\r\n" (even on Windows)? The closest I've found is the Lexical Analysis part of the language reference () which states that lines in source code are separated by NEWLINE (that is "\n"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 05:46:57 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 01 Oct 2018 09:46:57 +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: <1538387216.99.0.545547206417.issue34313@psf.upfronthosting.co.za> Tal Einat added the comment: I couldn't reproduce this issue with any of the 3.7.1rc1 and 3.6.7rc1 installers from python.org on my macOS. This certainly seems like an issue with Tcl/Tk versions before 8.6.8. It is unfortunate that ActiveState have still not released ActiveTcl 8.6.8; the latest version is 8.6.7 which does exhibit this issue. ISTM we should update the section of the docs about GUI programming on macOS, which suggests using the latest version of Tcl/Tk from ActiveState: https://docs.python.org/3/using/mac.html#gui-programming-on-the-mac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 05:57:00 2018 From: report at bugs.python.org (pashkasan) Date: Mon, 01 Oct 2018 09:57:00 +0000 Subject: [issue34859] python core in string substring search In-Reply-To: <1538373343.13.0.545547206417.issue34859@psf.upfronthosting.co.za> Message-ID: <1538387820.64.0.545547206417.issue34859@psf.upfronthosting.co.za> pashkasan added the comment: >I suspect that there may also be confusion about the line ending in multiline strings. Is there any documentation on the fact that this is always "\n" and not "\r\n" (even on Windows)? the problem is that "\r\n" not found in source multiline strings str, str2, but exists i tested on windows , unix ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:01:11 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 01 Oct 2018 10:01:11 +0000 Subject: [issue34859] python core in string substring search In-Reply-To: <1538373343.13.0.545547206417.issue34859@psf.upfronthosting.co.za> Message-ID: <1538388071.64.0.545547206417.issue34859@psf.upfronthosting.co.za> Ronald Oussoren added the comment: @pahskazan: It is correct that '\r\n' is not found in those strings, Python source code is always parsed after conversion to "Unix" line endings with "\n" between lines. This is basicly the same as the "universal newlines" feature of the open function . The output you get is therefore expected behaviour. See also Raymond's note about how to use str.find() and the other typo in that line. ---------- resolution: -> not a bug stage: -> resolved type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:02:38 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Mon, 01 Oct 2018 10:02:38 +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: <1538388158.44.0.545547206417.issue34313@psf.upfronthosting.co.za> Vlad Tudorache added the comment: @taleinat The issues appear with both Tk 8.6.[:8] and (8.5.[:18] + 8.5.[19:], just in case you update the docs. For 32/64 bit installers on macOS, the only version (built by myself or ActiveState) without crashes is 8.5.18 (on my Mac). ---------- versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:03:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2018 10:03:27 +0000 Subject: [issue30156] PYTHONDUMPREFS segfaults on exit In-Reply-To: <1493055827.6.0.962682353128.issue30156@psf.upfronthosting.co.za> Message-ID: <1538388207.58.0.545547206417.issue30156@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e972c13624c32d0efdceb08ff83917fb6b488525 by Victor Stinner in branch 'master': bpo-30156: Remove property_descr_get() optimization (GH-9541) https://github.com/python/cpython/commit/e972c13624c32d0efdceb08ff83917fb6b488525 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:07:04 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 01 Oct 2018 10:07:04 +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: <1538388424.81.0.545547206417.issue34313@psf.upfronthosting.co.za> Tal Einat added the comment: Vlad, you previously mentioned that with Tcl/Tk 8.6.8 you also didn't see this issue. Have you tried building Tcl/Tk 8.6.8 yourself? When I did so everything worked fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:09:42 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 01 Oct 2018 10:09:42 +0000 Subject: [issue34476] asyncio.sleep(0) not documented In-Reply-To: <1535035287.88.0.56676864532.issue34476@psf.upfronthosting.co.za> Message-ID: <1538388582.93.0.545547206417.issue34476@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset cd602b8af2d14ff686261eeb18b80f718bb16550 by Andrew Svetlov (Hrvoje Nik?i?) in branch 'master': bpo-34476: Document that asyncio.sleep() always suspends. (#9643) https://github.com/python/cpython/commit/cd602b8af2d14ff686261eeb18b80f718bb16550 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:09:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2018 10:09:45 +0000 Subject: [issue30156] PYTHONDUMPREFS segfaults on exit In-Reply-To: <1493055827.6.0.962682353128.issue30156@psf.upfronthosting.co.za> Message-ID: <1538388585.17.0.545547206417.issue30156@psf.upfronthosting.co.za> STINNER Victor added the comment: I proposeto leave Python 3.6 and 3.7 unchanged. I don't think that this specific bug matters enough to remove to remove an optimization from these stable branches. Since the optimization has been added (2015, bpo-23910), I'm only aware of two bug reports on PYTHONDUMPREFS (this one, and my duplicate). If someone considers that the optimization must die in 3.6 and 3.7, please reopen the issue (or just add a comment). ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:09:57 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Oct 2018 10:09:57 +0000 Subject: [issue34476] asyncio.sleep(0) not documented In-Reply-To: <1535035287.88.0.56676864532.issue34476@psf.upfronthosting.co.za> Message-ID: <1538388597.34.0.545547206417.issue34476@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9045 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:11:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2018 10:11:02 +0000 Subject: [issue23910] property_descr_get reuse argument tuple In-Reply-To: <1428696637.37.0.716274154339.issue23910@psf.upfronthosting.co.za> Message-ID: <1538388662.62.0.545547206417.issue23910@psf.upfronthosting.co.za> STINNER Victor added the comment: This optimization caused multiple crashes, so it has been decided to remove it :-( See bpo-30156. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:16:29 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Mon, 01 Oct 2018 10:16:29 +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: <1538388989.81.0.545547206417.issue34313@psf.upfronthosting.co.za> Vlad Tudorache added the comment: Yes, like in the Pythonic Tk 8.6.[:8] :), starting at version 8.6.8 (-dev, too) I see no crash. Tcl/Tk 8.6.8 is built by myself (the last time I checked there was no 8.6.8 built on ActiveState). As for the old 8.5 series, only 8.5.18 works with the dual 32/64 bit Python(s). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:19:37 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 01 Oct 2018 10:19:37 +0000 Subject: [issue34476] asyncio.sleep(0) not documented In-Reply-To: <1535035287.88.0.56676864532.issue34476@psf.upfronthosting.co.za> Message-ID: <1538389177.08.0.545547206417.issue34476@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset 655608a1112e592cd6a9155ebe774dd285f561f3 by Andrew Svetlov (Miss Islington (bot)) in branch '3.7': bpo-34476: Document that asyncio.sleep() always suspends. (GH-9643) (#9654) https://github.com/python/cpython/commit/655608a1112e592cd6a9155ebe774dd285f561f3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:20:04 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 01 Oct 2018 10:20:04 +0000 Subject: [issue34476] asyncio.sleep(0) not documented In-Reply-To: <1535035287.88.0.56676864532.issue34476@psf.upfronthosting.co.za> Message-ID: <1538389204.31.0.545547206417.issue34476@psf.upfronthosting.co.za> Andrew Svetlov added the comment: thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:20:13 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 01 Oct 2018 10:20:13 +0000 Subject: [issue34476] asyncio.sleep(0) not documented In-Reply-To: <1535035287.88.0.56676864532.issue34476@psf.upfronthosting.co.za> Message-ID: <1538389213.73.0.545547206417.issue34476@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:21:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2018 10:21:45 +0000 Subject: [issue34812] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag In-Reply-To: <1537978023.88.0.545547206417.issue34812@psf.upfronthosting.co.za> Message-ID: <1538389305.67.0.545547206417.issue34812@psf.upfronthosting.co.za> STINNER Victor added the comment: In the C code, sys.flags.isolated clearly documented as linked to the -I option: static PyStructSequence_Field flags_fields[] = { {"debug", "-d"}, {"inspect", "-i"}, {"interactive", "-i"}, {"optimize", "-O or -OO"}, {"dont_write_bytecode", "-B"}, {"no_user_site", "-s"}, {"no_site", "-S"}, {"ignore_environment", "-E"}, {"verbose", "-v"}, /* {"unbuffered", "-u"}, */ /* {"skip_first", "-x"}, */ {"bytes_warning", "-b"}, {"quiet", "-q"}, {"hash_randomization", "-R"}, {"isolated", "-I"}, {"dev_mode", "-X dev"}, {"utf8_mode", "-X utf8"}, {0} }; > The only thing here is that '-I' returns '-s -E -I' unlike other options where args can be used for comparison logic in check_options. I expect to get: $ python3 -I -c 'import subprocess; print(subprocess._args_from_interpreter_flags())' ['-I'] instead of: ['-s', '-E'] -I is different from -s -E: it also avoids to add the script directory or an empty string to sys.path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:23:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2018 10:23:12 +0000 Subject: [issue30672] PEP 538: Unexpected locale behaviour on *BSD (including Mac OS X) In-Reply-To: <1497518633.36.0.998856107706.issue30672@psf.upfronthosting.co.za> Message-ID: <1538389392.08.0.545547206417.issue30672@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:25:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2018 10:25:43 +0000 Subject: [issue34812] [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag In-Reply-To: <1537978023.88.0.545547206417.issue34812@psf.upfronthosting.co.za> Message-ID: <1538389543.18.0.545547206417.issue34812@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +easy title: support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag -> [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:26:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2018 10:26:58 +0000 Subject: [issue21165] Optimize str.translate() for replacement with substrings and non-ASCII strings In-Reply-To: <1396861844.88.0.0543379452839.issue21165@psf.upfronthosting.co.za> Message-ID: <1538389618.77.0.545547206417.issue21165@psf.upfronthosting.co.za> STINNER Victor added the comment: > I actually have a patch (...) Please open a new issue, since that one is closed. You can reference this issue from your new issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:31:19 2018 From: report at bugs.python.org (Caleb Hattingh) Date: Mon, 01 Oct 2018 10:31:19 +0000 Subject: [issue34831] Asyncio Tutorial In-Reply-To: <1538134577.09.0.545547206417.issue34831@psf.upfronthosting.co.za> Message-ID: <1538389879.46.0.545547206417.issue34831@psf.upfronthosting.co.za> Caleb Hattingh added the comment: > * I think we should stick to your structure and push things to docs.python.org as soon as every next section is somewhat ready. Ok. I'll get a PR going for the start page of the tutorial. > * Every big section should probably have its own page, linking prev/next tutorial pages. > * I'd organize the tutorial in a dedicated directory like "Doc/library/asyncio-tutorial/". Agree. > BTW, maybe we should consider using the new iPythonn async repl: https://blog.jupyter.org/ipython-7-0-async-repl-a35ce050f7f7 What do you think about that? I saw ?Matthias' tweets about that recently too. It's cool! but...for teaching purposes it's not great to introduce a whole new complex tool (ipython) to explain a different complex tool (asyncio). My experience is that *every* single new thing that is mentioned adds cognitive load for learners. For this tutorial my feeling is to keep as much to "ordinary" Python stuff as possible, i.e., stdlib. > Just a quick note: I'd try to not mention the low-level loop APIs as long as possible (e.g. no loop.run_until_complete() etc). For sure, I agree with you 100% on this. But I find it hard to do as soon as I have to make a real thing. I think you're right that we focus initially on only high-level stuff first (and for most of the tut). That is doable. > I think we'll collapse first two section into one ("Coroutines" and "Awaitables" into "Awaitables") and link the tutorial from that new section. ok > Yay for streams! > I never use tkinter myself :( I remember trying to use it and it didn't work on my macOS. So I'd try to either: > * build a simple browser app (that would require us to implement HTTP 0.9 which can be fun); > * build a terminal app; > * use iPython repl to connect to our asyncio server (might end up being more complicated than the first two options). I too have bashed my head for many hours over the years trying to get Tkinter to work on Mac, but a lot of work has gone into this recently and the newer (release) Python's have bundled Tk 8.6: https://www.python.org/download/mac/tcltk/ (this is what learners will prob use on Mac) Tkinter gets a bad rap, but it's really quite powerful--and portable. Runs great on a Raspberry Pi for example. Noticing your hesitation towards tkinter ;) , I spent a few hours on Sunday sketching out my "chat server/client" idea a little more, using Tkinter for the client UI: https://github.com/cjrh/chat (Notice especially in the README all the different aspects of asyncio, streams etc. that we would be able to cover and explain with an actual use-case. THESE are the kinds of tricky things people desperately want help with.) It's still rough obviously (I can prob reduce the total LOC footprint by 20% & I'm sure you can improve on some parts) but I just wanted to show you something runnable you can prod and poke to give a concrete idea of what I'm suggesting. It works on Windows, should work on Linux but I haven't tested yet. My proposal is that we slowly build up towards this, starting with the "hello world" simple case (asyncio.run calling main() which prints out "hello world" or something), and then adding the necessary features, piece by piece, with commentary along the way on what each piece does, and why it is done in a particular way. (I specifically like to write like this: simplistic case first, and then improve incrementally) - Only requires stdlib (so we don't have to explain or link to pip/virtualenv etc. etc.) - shows a wide range of *interoperating* asyncio features in a condensed app - client has a proper GUI, i.e. "looks" like an actual application, not just an ugly CLI thing - client handles reconnection, if the server goes down and comes back later. - using signal handling to trigger shutdown (esp. the server) - signal handling works on Windows (CTRL-C and CTRL-BREAK near-instant controlled shutdown) - server is 100% asyncio (so that situation is covered), but client requires marrying two loops (so this situation is also covered), one for tkinter and one for asyncio. (This is a common problem, not just with UI frameworks but also with game programming frameworks like pygame, pyarcade and so on. Again, this is the kind of problem many people ask for help with.) - thus, an example showing how to run asyncio in a thread. (asyncio.run works great in a thread, nice job!) - an actual SSL example that works (this was surprisingly hard to find, eventually found one at PyMOTW) I fully realise that this case study implementation might look weird and ugly, and we don't really want to mention threads at all, and we don't want to explicitly refer to the loop, or create a Future instance, etc., but this is the kind of case study that will give people guidance on how to handle these *actual problems* that they are going to come across. If you have a look and still don't want to go this way, that's ok, I'm happy to go with a different suggestion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:36:37 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 01 Oct 2018 10:36:37 +0000 Subject: [issue34812] [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag In-Reply-To: <1537978023.88.0.545547206417.issue34812@psf.upfronthosting.co.za> Message-ID: <1538390197.62.0.545547206417.issue34812@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks Victor for the details. > In the C code, sys.flags.isolated clearly documented as linked to the -I option: With respect to documentation I was talking about '-I' not being documented in the table at https://docs.python.org/3.7/library/sys.html#sys.flags though it's present in the C code and in sys.flags.isolated. > -I is different from -s -E: it also avoids to add the script directory or an empty string to sys.path. '-I' also implies '-s -E' and hence adding isolated to args_from_interpreter_flags will also return ['-s', '-E', '-I'] as output and hence I suggested modifying the comparison logic. # Since '-I' implies '-s' and '-E' those flags are also set returning '-s -E -I' ./python.exe --help | rg '\-I' -I : isolate Python from the user's environment (implies -E and -s) ./python.exe -I -c 'import sys; print(sys.flags)' sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=1, no_site=0, ignore_environment=1, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=1, dev_mode=False, utf8_mode=0) # patching args_from_interpreter_flags to support '-I' would return below ./python.exe -I -c 'import subprocess; print(subprocess._args_from_interpreter_flags())' ['-s', '-E', '-I'] Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:42:44 2018 From: report at bugs.python.org (pashkasan) Date: Mon, 01 Oct 2018 10:42:44 +0000 Subject: [issue34859] python core in string substring search In-Reply-To: <1538373343.13.0.545547206417.issue34859@psf.upfronthosting.co.za> Message-ID: <1538390564.66.0.545547206417.issue34859@psf.upfronthosting.co.za> pashkasan added the comment: str2 = open('sample.txt', 'rU').read() if "\n" in str2: print ("\\n found") else: print ("\\n not found") if "\r" in str2: print ("\\r found") else: print ("\\r not found") if "\r\n" in str2: print ("\\r\\n found") else: print ("\\r\\n not found") print str2 output http://prntscr.com/l0sc11 strange that print() has \r\n do i have to open file in binary mode or something to have \r not stripped? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 06:58:19 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 01 Oct 2018 10:58:19 +0000 Subject: [issue33947] Dataclasses can raise RecursionError in __repr__ In-Reply-To: <1529758726.17.0.56676864532.issue33947@psf.upfronthosting.co.za> Message-ID: <1538391499.71.0.545547206417.issue33947@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- assignee: -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 07:10:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2018 11:10:17 +0000 Subject: [issue34812] [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag In-Reply-To: <1537978023.88.0.545547206417.issue34812@psf.upfronthosting.co.za> Message-ID: <1538392217.44.0.545547206417.issue34812@psf.upfronthosting.co.za> STINNER Victor added the comment: > ./python.exe -I -c 'import subprocess; print(subprocess._args_from_interpreter_flags())' > ['-s', '-E', '-I'] This looks wrong, I would prefer to only get ['-I']. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 07:13:17 2018 From: report at bugs.python.org (=?utf-8?q?Anders_Hovm=C3=B6ller?=) Date: Mon, 01 Oct 2018 11:13:17 +0000 Subject: [issue34861] Improve cProfile standard output Message-ID: <1538392397.89.0.545547206417.issue34861@psf.upfronthosting.co.za> New submission from Anders Hovm?ller : The standard output for cProfile when run from a command line is not very useful. It has two main flaws: - Default sort order is by name of function - It strips the full path of source files The first makes it very hard to look at the output. The second is very annoying when you get a bunch of __init__.py in the output. Suggested solution: - Default cumulative time sort order - Show one additional folder level when filename is __main__ or __init__ ---------- components: Library (Lib) messages: 326793 nosy: Anders.Hovm?ller priority: normal severity: normal status: open title: Improve cProfile standard output 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 Oct 1 07:15:33 2018 From: report at bugs.python.org (=?utf-8?q?Anders_Hovm=C3=B6ller?=) Date: Mon, 01 Oct 2018 11:15:33 +0000 Subject: [issue34861] Improve cProfile standard output In-Reply-To: <1538392397.89.0.545547206417.issue34861@psf.upfronthosting.co.za> Message-ID: <1538392533.76.0.545547206417.issue34861@psf.upfronthosting.co.za> Change by Anders Hovm?ller : ---------- keywords: +patch pull_requests: +9046 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 07:37:32 2018 From: report at bugs.python.org (Michael Felt) Date: Mon, 01 Oct 2018 11:37:32 +0000 Subject: [issue34860] fix test_sqlite for AIX In-Reply-To: <1538383752.64.0.545547206417.issue34860@psf.upfronthosting.co.za> Message-ID: <79d0ad60-8d84-5646-b0c7-6a7726cb98c2@felt.demon.nl> Michael Felt added the comment: I just pulled master, did not see Modules/_sqlite/connection.c in the list, but I redo everything for just in case and update later. On 10/1/2018 10:49 AM, Berker Peksag wrote: > Berker Peksag added the comment: > > Could you try latest master? I think this is a duplicate of issue 34743 and it has already been fixed in https://github.com/python/cpython/commit/b10a64d117de6121ea3e79c467c4107f8f399f3d. > > ---------- > nosy: +berker.peksag > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 07:39:31 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 01 Oct 2018 11:39:31 +0000 Subject: [issue33117] asyncio example uses non-existing/documented method In-Reply-To: <1521666406.67.0.467229070634.issue33117@psf.upfronthosting.co.za> Message-ID: <1538393971.37.0.545547206417.issue33117@psf.upfronthosting.co.za> Andrew Svetlov added the comment: @xtreak is right, `run_coroutine_threadsafe()` returns `concurrent.futures.Future` object. Personally, I like the fact that `fut.result()` is called with timeout parameter to reflect the fact of the different object type. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 08:09:47 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 01 Oct 2018 12:09:47 +0000 Subject: [issue34846] Runtime failure with Failed to import site module In-Reply-To: <1538273716.55.0.545547206417.issue34846@psf.upfronthosting.co.za> Message-ID: <1538395787.33.0.545547206417.issue34846@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. Can you please add the full stack trace as text in the comment so that it's more accessible? Searching along similar lines there is an open issue about corrupted .pyc causing import related failure in issue28007 with a patch and a test case. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 08:10:45 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 01 Oct 2018 12:10:45 +0000 Subject: [issue30167] site.main() does not work on Python 3.6 and superior if PYTHONSTARTUP is set In-Reply-To: <1493196813.64.0.567701209744.issue30167@psf.upfronthosting.co.za> Message-ID: <1538395845.14.0.545547206417.issue30167@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset d4c76d960b8b286b75c933780416ace9cda682fd by INADA Naoki in branch 'master': bpo-30167: Add test for module.__cached__ is None (GH-7617) https://github.com/python/cpython/commit/d4c76d960b8b286b75c933780416ace9cda682fd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 09:29:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Oct 2018 13:29:48 +0000 Subject: [issue33331] Clean modules in the reversed order In-Reply-To: <1524393498.13.0.682650639539.issue33331@psf.upfronthosting.co.za> Message-ID: <1538400588.02.0.545547206417.issue33331@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If move a module to the end of sys.modules when it have finished execution, we will get the following order: D, C, B, A, Y, Z, X, __main__ In can be cleaned from the end, and each module will be cleaned before its dependencies. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 09:33:57 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 01 Oct 2018 13:33:57 +0000 Subject: [issue34850] Emit a syntax warning for "is" with a literal In-Reply-To: <1538346281.49.0.545547206417.issue34850@psf.upfronthosting.co.za> Message-ID: <20181001133350.GR19437@ando.pearwood.info> Steven D'Aprano added the comment: On Sun, Sep 30, 2018 at 10:24:41PM +0000, Nathaniel Smith wrote: > Would it make sense to implement a "chaos" mode (that e.g. testing > tools could enable unconditionally), that disables the small integer > and small string caches? I'm not really sure that "chaos" is a good name for that. Contrast the rather restricted scope ("disable caches") with this example of chaos: https://en.wikipedia.org/wiki/Chaos_Monkey ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 09:47:48 2018 From: report at bugs.python.org (Ammar Askar) Date: Mon, 01 Oct 2018 13:47:48 +0000 Subject: [issue34859] python core in string substring search In-Reply-To: <1538373343.13.0.545547206417.issue34859@psf.upfronthosting.co.za> Message-ID: <1538401668.54.0.545547206417.issue34859@psf.upfronthosting.co.za> Ammar Askar added the comment: Please read this excerpt from the documentation Ronald linked for open: newline controls how universal newlines mode works (it only applies to text mode). It can be None, '', '\n', '\r', and '\r\n'. It works as follows: When reading input from the stream, if newline is None, universal newlines mode is enabled. Lines in the input can end in '\n', '\r', or '\r\n', and these are translated into '\n' before being returned to the caller. If it is '', universal newlines mode is enabled, but line endings are returned to the caller untranslated. If it has any of the other legal values, input lines are only terminated by the given string, and the line ending is returned to the caller untranslated. When writing output to the stream, if newline is None, any '\n' characters written are translated to the system default line separator, os.linesep. If newline is '' or '\n', no translation takes place. If newline is any of the other legal values, any '\n' characters written are translated to the given string. ---------- nosy: +ammar2 status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 09:53:35 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 01 Oct 2018 13:53:35 +0000 Subject: [issue28604] Exception raised by python3.5 when using en_GB locale In-Reply-To: <1478208394.68.0.721396484587.issue28604@psf.upfronthosting.co.za> Message-ID: <1538402015.78.0.545547206417.issue28604@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 09:59:37 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 01 Oct 2018 13:59:37 +0000 Subject: [issue34811] test_gdb fails with latest gdb In-Reply-To: <1537972642.29.0.545547206417.issue34811@psf.upfronthosting.co.za> Message-ID: <1538402377.32.0.545547206417.issue34811@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Tested so far only on a 3.7.0 build. ---------- versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 10:09:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2018 14:09:23 +0000 Subject: [issue34811] test_gdb fails with latest gdb In-Reply-To: <1537972642.29.0.545547206417.issue34811@psf.upfronthosting.co.za> Message-ID: <1538402963.73.0.545547206417.issue34811@psf.upfronthosting.co.za> STINNER Victor added the comment: > Tested so far only on a 3.7.0 build. I'm unable to reproduce the failure on 3.7.1rc1, so I consider that the bugs have been fixed. Recent test_gdb and Tools/gdb/ fixes: * bpo-32962 * bpo-30983 Commits: * commit 5fe59f8e3a0a56a155c18f9d581205ec533764b6 * commit 019d33b7a447e78057842332fb5d3bad01922122 * commit d22fc0bc7de7882da204abe50884bbde2da4f9e7 ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 10:34:15 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 01 Oct 2018 14:34:15 +0000 Subject: [issue34850] Emit a syntax warning for "is" with a literal In-Reply-To: <20181001133350.GR19437@ando.pearwood.info> Message-ID: Guido van Rossum added the comment: Consider moving the chaos discussion to a new issue. On Mon, Oct 1, 2018 at 6:33 AM Steven D'Aprano wrote: > > Steven D'Aprano added the comment: > > On Sun, Sep 30, 2018 at 10:24:41PM +0000, Nathaniel Smith wrote: > > Would it make sense to implement a "chaos" mode (that e.g. testing > > tools could enable unconditionally), that disables the small integer > > and small string caches? > > I'm not really sure that "chaos" is a good name for that. Contrast > the rather restricted scope ("disable caches") with this example of > chaos: > > https://en.wikipedia.org/wiki/Chaos_Monkey > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > -- --Guido (mobile) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 11:14:07 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 01 Oct 2018 15:14:07 +0000 Subject: [issue34538] Remove encouragement to author a base class for all Exception subclasses in a module In-Reply-To: <1535488851.13.0.56676864532.issue34538@psf.upfronthosting.co.za> Message-ID: <1538406847.66.0.545547206417.issue34538@psf.upfronthosting.co.za> Guido van Rossum added the comment: I think as a general recommendation it is not such a good idea that we should specifically mention it. (Is it in PEP 8 too? If so it should be removed there too.) It's a pattern that is sometimes helpful, sometimes not. I don't think that people need to hear about it from the official docs about exceptions. People can learn from the standard exception hierarchy that sometimes it's useful to have a common base class *for exceptions that are related in some way*, in particular if there would be a reason to catch all of them with the same handler. So I'm in agreement with Nathaniel M here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 11:22:07 2018 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 01 Oct 2018 15:22:07 +0000 Subject: [issue34538] Remove encouragement to author a base class for all Exception subclasses in a module In-Reply-To: <1535488851.13.0.56676864532.issue34538@psf.upfronthosting.co.za> Message-ID: <1538407327.6.0.545547206417.issue34538@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Just as extra data point: It is fairly common to have a common exception class which is then used a mixin class together with the standard exception classes, so that you can indeed identify the source of an exception and catch errors based on the source (e.g. say you want to catch database errors coming from MySQL specifically). The Python DB-API also requires to create a separate hierarchy for this purpose. Overall, I wouldn't call this a non-best practice. It depends on the use case, whether it's useful or not. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 11:33:11 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Mon, 01 Oct 2018 15:33:11 +0000 Subject: [issue34769] _asyncgen_finalizer_hook running in wrong thread In-Reply-To: <1537627184.81.0.956365154283.issue34769@psf.upfronthosting.co.za> Message-ID: <1538407991.85.0.545547206417.issue34769@psf.upfronthosting.co.za> twisteroid ambassador added the comment: I have finally managed to reproduce this one reliably. The issue happens when i) async generators are not finalized immediately and must be garbage collected in the future, and ii) the garbage collector happens to run in a different thread than the one running the event loop. (Obviously, if there are more than one Python threads, eventually gc will run in those other threads, causing problems.) I have attached a script reproducing the problem. I tried several ways of using async generators (the use_agen_*() coroutines), and the only way to make them not finalize immediately is use_agen_anext_separate_tasks(), which is the pattern used in my Happy Eyeballs library. ---------- Added file: https://bugs.python.org/file47838/asyncgen_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 11:43:53 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 01 Oct 2018 15:43:53 +0000 Subject: [issue34769] _asyncgen_finalizer_hook running in wrong thread In-Reply-To: <1537627184.81.0.956365154283.issue34769@psf.upfronthosting.co.za> Message-ID: <1538408633.28.0.545547206417.issue34769@psf.upfronthosting.co.za> Yury Selivanov added the comment: Wow. Thanks so much for figuring this out, I know how hard it is to debug issues like this. Now I see it clearly: _asyncgen_finalizer_hook should be using loop.call_soon_threadsafe. Interestingly, I used _write_to_self there, so I knew about the issue, but figured that using call_soon() + _write_to_self is safe enough; evidently I was wrong. Anyways, here's the diff that fixed it for me: https://gist.github.com/1st1/c1c9fc853cac1fadb7102ccc6201fb70 Could you please create a PR (ideally with a unittest)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 11:59:06 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 01 Oct 2018 15:59:06 +0000 Subject: [issue34811] test_gdb fails with latest gdb In-Reply-To: <1537972642.29.0.545547206417.issue34811@psf.upfronthosting.co.za> Message-ID: <1538409546.76.0.545547206417.issue34811@psf.upfronthosting.co.za> Miro Hron?ok added the comment: I've reproduced this on 3.7.1rc1: https://src.fedoraproject.org/rpms/python3/pull-request/58 log (x86_64): https://kojipkgs.fedoraproject.org//work/tasks/2460/29992460/build.log ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 11:59:10 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 01 Oct 2018 15:59:10 +0000 Subject: [issue34769] _asyncgen_finalizer_hook running in wrong thread In-Reply-To: <1537627184.81.0.956365154283.issue34769@psf.upfronthosting.co.za> Message-ID: <1538409550.02.0.545547206417.issue34769@psf.upfronthosting.co.za> Yury Selivanov added the comment: Rereading your first message: > When testing my happy eyeballs library, I occasionally run into issues with async generators seemingly not finalizing. After setting loop.set_debug(True), I have been seeing log entries like these: The bug we are fixing now is that async generators were not finalizing properly *in debug mode*. The "I occasionally run into issues with async generators seemingly not finalizing" part will need further investigation if you experienced it with debug mode off. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 11:59:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2018 15:59:31 +0000 Subject: [issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0` In-Reply-To: <1519722167.1.0.467229070634.issue32962@psf.upfronthosting.co.za> Message-ID: <1538409571.15.0.545547206417.issue32962@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9048 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 12:06:07 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 01 Oct 2018 16:06:07 +0000 Subject: [issue34430] Symmetrical chaining futures in asyncio.future.wrap_future In-Reply-To: <1534590140.17.0.56676864532.issue34430@psf.upfronthosting.co.za> Message-ID: <1538409967.37.0.545547206417.issue34430@psf.upfronthosting.co.za> Yury Selivanov added the comment: The PR needs a very careful review, but in general I'm OK with the idea. I'm also curious why do you want to fix wrap_future -- how are you using it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 12:10:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2018 16:10:16 +0000 Subject: [issue34811] test_gdb fails with latest gdb In-Reply-To: <1537972642.29.0.545547206417.issue34811@psf.upfronthosting.co.za> Message-ID: <1538410216.73.0.545547206417.issue34811@psf.upfronthosting.co.za> STINNER Victor added the comment: > I've reproduced this on 3.7.1rc1: (...) Oh. I reopen the issue. It seems like the bug occurred on the debug build of Python: + /builddir/build/BUILD/Python-3.7.1rc1/build/debug/python -m test.regrtest -wW --slowest --findleaks -x test_distutils -x test_bdist_rpm Extract of commands to build Python in debug mode: + topdir=/builddir/build/BUILD/Python-3.7.1rc1 + export 'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv' + CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv' + export 'CXXFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv' + CXXFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv' ++ pkg-config --cflags-only-I libffi + export CPPFLAGS= + CPPFLAGS= + export 'OPT=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv' + OPT='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv' + export LINKCC=gcc + LINKCC=gcc ++ pkg-config --cflags openssl + export 'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv ' + CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv ' ++ pkg-config --libs-only-L openssl + export 'LDFLAGS=-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -g ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -g ' + BuildPython debug '--without-ensurepip --with-pydebug' -O0 STARTING: BUILD OF PYTHON FOR CONFIGURATION: debug + ConfName=debug + ExtraConfigArgs='--without-ensurepip --with-pydebug' + MoreCFlags=-O0 + ConfDir=build/debug + echo STARTING: BUILD OF PYTHON FOR CONFIGURATION: debug + mkdir -p build/debug + pushd build/debug ~/build/BUILD/Python-3.7.1rc1/build/debug ~/build/BUILD/Python-3.7.1rc1 + CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv ' + export CFLAGS + CXXFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv' + export CXXFLAGS + FFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -g ' + export LDFLAGS + '[' 1 = 1 ']' +++ dirname /builddir/build/BUILD/Python-3.7.1rc1/configure ++ find /builddir/build/BUILD/Python-3.7.1rc1 -name config.guess -o -name config.sub + for i in $(find $(dirname $topdir/configure) -name config.guess -o -name config.sub) ++ basename /builddir/build/BUILD/Python-3.7.1rc1/config.guess + '[' -f /usr/lib/rpm/redhat/config.guess ']' + /usr/bin/rm -f /builddir/build/BUILD/Python-3.7.1rc1/config.guess ++ basename /builddir/build/BUILD/Python-3.7.1rc1/config.guess + /usr/bin/cp -fv /usr/lib/rpm/redhat/config.guess /builddir/build/BUILD/Python-3.7.1rc1/config.guess '/usr/lib/rpm/redhat/config.guess' -> '/builddir/build/BUILD/Python-3.7.1rc1/config.guess' + for i in $(find $(dirname $topdir/configure) -name config.guess -o -name config.sub) ++ basename /builddir/build/BUILD/Python-3.7.1rc1/config.sub + '[' -f /usr/lib/rpm/redhat/config.sub ']' + /usr/bin/rm -f /builddir/build/BUILD/Python-3.7.1rc1/config.sub ++ basename /builddir/build/BUILD/Python-3.7.1rc1/config.sub + /usr/bin/cp -fv /usr/lib/rpm/redhat/config.sub /builddir/build/BUILD/Python-3.7.1rc1/config.sub '/usr/lib/rpm/redhat/config.sub' -> '/builddir/build/BUILD/Python-3.7.1rc1/config.sub' + '[' 1 = 1 ']' + '[' x '!=' 'x-Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' ']' ++ find . -name ltmain.sh + /builddir/build/BUILD/Python-3.7.1rc1/configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-ipv6 --enable-shared --with-computed-gotos=yes --with-dbmliborder=gdbm:ndbm:bdb --with-system-expat --with-system-ffi --enable-loadable-sqlite-extensions --with-dtrace --with-lto --with-ssl-default-suites=openssl --with-valgrind --without-ensurepip --with-pydebug ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 12:12:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Oct 2018 16:12:27 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1538410347.26.0.545547206417.issue33729@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9049 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 12:14:38 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 01 Oct 2018 16:14:38 +0000 Subject: [issue34014] loop.run_in_executor should propagate current contextvars In-Reply-To: <1530401184.74.0.56676864532.issue34014@psf.upfronthosting.co.za> Message-ID: <1538410478.8.0.545547206417.issue34014@psf.upfronthosting.co.za> Yury Selivanov added the comment: So we're deprecating passing non-ThreadPoolExecutor instances to loop.set_default_executor. In 3.9 that will trigger an error. For this issue we have basically the next few options: (1) Do nothing; (2) Fix "run_in_executor" to start copying and running in correct context automatically (3) Add a new keyword-only parameter to "run_in_executor": "retain_context=False" (4) Design a new async/await friendly API for using thread- and process-pools. Now, (4) will happen. The "run_in_executor" method is low-level and requires accessing the event loop to use it. We probably have enough time to design this new API before 3.8. As for implementing (3) in 3.8 -- I'd be OK with that too. Andrew, your thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 12:20:08 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 01 Oct 2018 16:20:08 +0000 Subject: [issue34014] loop.run_in_executor should propagate current contextvars In-Reply-To: <1530401184.74.0.56676864532.issue34014@psf.upfronthosting.co.za> Message-ID: <1538410808.45.0.545547206417.issue34014@psf.upfronthosting.co.za> Yury Selivanov added the comment: One problem with (3) is what will happen if someone uses "retain_context=True" and a ProcessPoolExecutor. It has to fail in a graceful and obvious way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 12:29:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Oct 2018 16:29:12 +0000 Subject: [issue34824] _ssl.c: Possible null pointer dereference In-Reply-To: <1538068077.13.0.545547206417.issue34824@psf.upfronthosting.co.za> Message-ID: <1538411352.45.0.545547206417.issue34824@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Good catch, but there is more than one error here. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 12:47:52 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Oct 2018 16:47:52 +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: <1538412472.57.0.545547206417.issue34313@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think that the resolution of this issue should be revision of at least the tkinter paragraph in https://docs.python.org/3/using/mac.html#gui-programming-on-the-mac, and I think at least the tkinter revision should be cherry-picked into the upcoming releases. Ned, what do you want to do? PyObjC paragraph: move to end? Tkinter paragraph: rewrite to something like... The standard Python GUI toolkit is tkinter, based on the cross-platform Tk toolkit (https://www.tcl.tk). Starting with the 64-bit installer in 3.6.6 and both installers in 3.7.0, an Aqua-native version of Tk is bundled the installer. Users are urged to install the most recent bug-fix releases. 'Other' paragraphs: combine into something like ... *wxPython* and *PyQt* are other cross-platform GUI toolkits that runs natively on Mac OS X. See https://www.wxpython.org or https://riverbankcomputing.com/software/pyqt/intro. [Does the other Qt wrapping, PySide, run natively on Mac?] ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 12:51:35 2018 From: report at bugs.python.org (Michael Felt) Date: Mon, 01 Oct 2018 16:51:35 +0000 Subject: [issue34860] fix test_sqlite for AIX In-Reply-To: <79d0ad60-8d84-5646-b0c7-6a7726cb98c2@felt.demon.nl> Message-ID: <30793938-f120-6822-1c1d-027078fc0a9a@felt.demon.nl> Michael Felt added the comment: Yes, that seems to have fixed it already. Closing the PR and issue! Thx for the quick response! On 10/1/2018 1:37 PM, Michael Felt wrote: > Michael Felt added the comment: > > I just pulled master, did not see Modules/_sqlite/connection.c > > in the list, but I redo everything for just in case and update later. > > On 10/1/2018 10:49 AM, Berker Peksag wrote: >> Berker Peksag added the comment: >> >> Could you try latest master? I think this is a duplicate of issue 34743 and it has already been fixed in https://github.com/python/cpython/commit/b10a64d117de6121ea3e79c467c4107f8f399f3d. >> >> ---------- >> nosy: +berker.peksag >> >> _______________________________________ >> Python tracker >> >> _______________________________________ >> > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 12:52:50 2018 From: report at bugs.python.org (Michael Felt) Date: Mon, 01 Oct 2018 16:52:50 +0000 Subject: [issue34860] fix test_sqlite for AIX In-Reply-To: <1538383004.27.0.545547206417.issue34860@psf.upfronthosting.co.za> Message-ID: <1538412770.83.0.545547206417.issue34860@psf.upfronthosting.co.za> Michael Felt added the comment: duplicate of issue34743 ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 13:02:41 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 01 Oct 2018 17:02:41 +0000 Subject: [issue34860] fix test_sqlite for AIX In-Reply-To: <1538383004.27.0.545547206417.issue34860@psf.upfronthosting.co.za> Message-ID: <1538413361.48.0.545547206417.issue34860@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- superseder: -> test_database_source_name fails with SQLite 3.7.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 14:05:00 2018 From: report at bugs.python.org (William Orr) Date: Mon, 01 Oct 2018 18:05:00 +0000 Subject: [issue34862] No longer builds on OpenBSD due to missing definition of convert_sched_param Message-ID: <1538417099.97.0.545547206417.issue34862@psf.upfronthosting.co.za> New submission from William Orr : [ worr on locke ] ( cpython ) % make -j15 [0] gcc -pthread -fno-strict-aliasing -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -O2 -pipe -std=c99 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I. -I./Include -fPIC -DPy_BUILD_CORE -c ./Modules/posixmodule.c -o Modules/posixmodule.o ./Modules/posixmodule.c:5164: warning: 'convert_sched_param' used but never defined gcc -pthread -c -fno-strict-aliasing -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -O2 -pipe -std=c99 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I. -I./Include -fPIC -DPy_BUILD_CORE -DGITVERSION="\"`LC_ALL=C git --git-dir ./.git rev-parse --short HEAD`\"" -DGITTAG="\"`LC_ALL=C git --git-dir ./.git describe --all --always --dirty`\"" -DGITBRANCH="\"`LC_ALL=C git --git-dir ./.git name-rev --name-only HEAD`\"" -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c if test libpython3.8m.so.1.0 != libpython3.8m.so; then gcc -pthread -shared -fPIC -Wl,-hlibpython3.8m.so.1.0 -o libpython3.8m.so.1.0 Modules/getbuildinfo.o Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o Parser/myreadline.o Parser/parsetok.o Parser/tokenizer.o Objects/abstract.o Objects/accu.o Objects/boolobject.o Objects/bytes_methods.o Objects/bytearrayobject.o Objects/bytesobject.o Objects/call.o Objects/cellobject.o Objects/classobject.o Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o Objects/enumobject.o Objects/exceptions.o Objects/genobject.o Objects/fileobject.o Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o Objects/iterobject.o Objects/listobject.o Objects/longobject.o Objects/dictobject.o Objects/odictobject.o Objects/memoryobject.o Objects/methodobject.o Objects/moduleobject.o Objects/namespaceobject.o Objects/object.o Objects/obmalloc.o Objects/capsule.o Objects/rangeobject.o Objects/setobject.o Objects/sliceobject.o Objects/structseq.o Objects/tupleobject.o Objects/typeobject.o Objects/unicodeobject.o Objects/unicodectype.o Objects/weakrefobject.o Python/_warnings.o Python/Python-ast.o Python/asdl.o Python/ast.o Python/ast_opt.o Python/ast_unparse.o Python/bltinmodule.o Python/ceval.o Python/codecs.o Python/compile.o Python/coreconfig.o Python/dynamic_annotations.o Python/errors.o Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o Python/getcopyright.o Python/getplatform.o Python/getversion.o Python/graminit.o Python/import.o Python/importdl.o Python/marshal.o Python/modsupport.o Python/mysnprintf.o Python/mystrtoul.o Python/pathconfig.o Python/peephole.o Python/pyarena.o Python/pyctype.o Python/pyfpe.o Python/pyhash.o Python/pylifecycle.o Python/pymath.o Python/pystate.o Python/context.o Python/hamt.o Python/pythonrun.o Python/pytime.o Python/bootstrap_hash.o Python/structmember.o Python/symtable.o Python/sysmodule.o Python/thread.o Python/traceback.o Python/getopt.o Python/pystrcmp.o Python/pystrtod.o Python/pystrhex.o Python/dtoa.o Python/formatter_unicode.o Python/fileutils.o Python/dynload_shlib.o Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o Modules/posixmodule.o Modules/errnomodule.o Modules/pwdmodule.o Modules/_sre.o Modules/_codecsmodule.o Modules/_weakref.o Modules/_functoolsmodule.o Modules/_operator.o Modules/_collectionsmodule.o Modules/_abc.o Modules/itertoolsmodule.o Modules/atexitmodule.o Modules/signalmodule.o Modules/_stat.o Modules/timemodule.o Modules/_threadmodule.o Modules/_localemodule.o Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o Modules/faulthandler.o Modules/_tracemalloc.o Modules/hashtable.o Modules/symtablemodule.o Modules/xxsubtype.o Python/frozen.o -lpthread -lutil -lm -lm ; ln -f libpython3.8m.so.1.0 libpython3.8m.so; else gcc -pthread -shared -fPIC -o libpython3.8m.so Modules/getbuildinfo.o Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o Parser/myreadline.o Parser/parsetok.o Parser/tokenizer.o Objects/abstract.o Objects/accu.o Objects/boolobject.o Objects/bytes_methods.o Objects/bytearrayobject.o Objects/bytesobject.o Objects/call.o Objects/cellobject.o Objects/classobject.o Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o Objects/enumobject.o Objects/exceptions.o Objects/genobject.o Objects/fileobject.o Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o Objects/iterobject.o Objects/listobject.o Objects/longobject.o Objects/dictobject.o Objects/odictobject.o Objects/memoryobject.o Objects/methodobject.o Objects/moduleobject.o Objects/namespaceobject.o Objects/object.o Objects/obmalloc.o Objects/capsule.o Objects/rangeobject.o Objects/setobject.o Objects/sliceobject.o Objects/structseq.o Objects/tupleobject.o Objects/typeobject.o Objects/unicodeobject.o Objects/unicodectype.o Objects/weakrefobject.o Python/_warnings.o Python/Python-ast.o Python/asdl.o Python/ast.o Python/ast_opt.o Python/ast_unparse.o Python/bltinmodule.o Python/ceval.o Python/codecs.o Python/compile.o Python/coreconfig.o Python/dynamic_annotations.o Python/errors.o Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o Python/getcopyright.o Python/getplatform.o Python/getversion.o Python/graminit.o Python/import.o Python/importdl.o Python/marshal.o Python/modsupport.o Python/mysnprintf.o Python/mystrtoul.o Python/pathconfig.o Python/peephole.o Python/pyarena.o Python/pyctype.o Python/pyfpe.o Python/pyhash.o Python/pylifecycle.o Python/pymath.o Python/pystate.o Python/context.o Python/hamt.o Python/pythonrun.o Python/pytime.o Python/bootstrap_hash.o Python/structmember.o Python/symtable.o Python/sysmodule.o Python/thread.o Python/traceback.o Python/getopt.o Python/pystrcmp.o Python/pystrtod.o Python/pystrhex.o Python/dtoa.o Python/formatter_unicode.o Python/fileutils.o Python/dynload_shlib.o Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o Modules/posixmodule.o Modules/errnomodule.o Modules/pwdmodule.o Modules/_sre.o Modules/_codecsmodule.o Modules/_weakref.o Modules/_functoolsmodule.o Modules/_operator.o Modules/_collectionsmodule.o Modules/_abc.o Modules/itertoolsmodule.o Modules/atexitmodule.o Modules/signalmodule.o Modules/_stat.o Modules/timemodule.o Modules/_threadmodule.o Modules/_localemodule.o Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o Modules/faulthandler.o Modules/_tracemalloc.o Modules/hashtable.o Modules/symtablemodule.o Modules/xxsubtype.o Python/frozen.o -lpthread -lutil -lm -lm ; fi rm -f libpython3.8m.a ar rcs libpython3.8m.a Modules/getbuildinfo.o Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o Parser/myreadline.o Parser/parsetok.o Parser/tokenizer.o Objects/abstract.o Objects/accu.o Objects/boolobject.o Objects/bytes_methods.o Objects/bytearrayobject.o Objects/bytesobject.o Objects/call.o Objects/cellobject.o Objects/classobject.o Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o Objects/enumobject.o Objects/exceptions.o Objects/genobject.o Objects/fileobject.o Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o Objects/iterobject.o Objects/listobject.o Objects/longobject.o Objects/dictobject.o Objects/odictobject.o Objects/memoryobject.o Objects/methodobject.o Objects/moduleobject.o Objects/namespaceobject.o Objects/object.o Objects/obmalloc.o Objects/capsule.o Objects/rangeobject.o Objects/setobject.o Objects/sliceobject.o Objects/structseq.o Objects/tupleobject.o Objects/typeobject.o Objects/unicodeobject.o Objects/unicodectype.o Objects/weakrefobject.o Python/_warnings.o Python/Python-ast.o Python/asdl.o Python/ast.o Python/ast_opt.o Python/ast_unparse.o Python/bltinmodule.o Python/ceval.o Python/codecs.o Python/compile.o Python/coreconfig.o Python/dynamic_annotations.o Python/errors.o Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o Python/getcopyright.o Python/getplatform.o Python/getversion.o Python/graminit.o Python/import.o Python/importdl.o Python/marshal.o Python/modsupport.o Python/mysnprintf.o Python/mystrtoul.o Python/pathconfig.o Python/peephole.o Python/pyarena.o Python/pyctype.o Python/pyfpe.o Python/pyhash.o Python/pylifecycle.o Python/pymath.o Python/pystate.o Python/context.o Python/hamt.o Python/pythonrun.o Python/pytime.o Python/bootstrap_hash.o Python/structmember.o Python/symtable.o Python/sysmodule.o Python/thread.o Python/traceback.o Python/getopt.o Python/pystrcmp.o Python/pystrtod.o Python/pystrhex.o Python/dtoa.o Python/formatter_unicode.o Python/fileutils.o Python/dynload_shlib.o Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o Modules/posixmodule.o Modules/errnomodule.o Modules/pwdmodule.o Modules/_sre.o Modules/_codecsmodule.o Modules/_weakref.o Modules/_functoolsmodule.o Modules/_operator.o Modules/_collectionsmodule.o Modules/_abc.o Modules/itertoolsmodule.o Modules/atexitmodule.o Modules/signalmodule.o Modules/_stat.o Modules/timemodule.o Modules/_threadmodule.o Modules/_localemodule.o Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o Modules/faulthandler.o Modules/_tracemalloc.o Modules/hashtable.o Modules/symtablemodule.o Modules/xxsubtype.o Python/frozen.o /usr/bin/ld: Modules/posixmodule.o: relocation R_X86_64_PC32 against `convert_sched_param' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status *** Error 1 in /home/worr/proj/cpython (Makefile:642 'libpython3.8m.so') ---------- components: Build messages: 326818 nosy: worr priority: normal severity: normal status: open title: No longer builds on OpenBSD due to missing definition of convert_sched_param versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 14:06:58 2018 From: report at bugs.python.org (William Orr) Date: Mon, 01 Oct 2018 18:06:58 +0000 Subject: [issue34862] No longer builds on OpenBSD due to missing definition of convert_sched_param In-Reply-To: <1538417099.97.0.545547206417.issue34862@psf.upfronthosting.co.za> Message-ID: <1538417218.44.0.545547206417.issue34862@psf.upfronthosting.co.za> Change by William Orr : ---------- keywords: +patch pull_requests: +9050 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 14:26:11 2018 From: report at bugs.python.org (Ammar Askar) Date: Mon, 01 Oct 2018 18:26:11 +0000 Subject: [issue34838] Improve arg clinic code generation for cases with type checking In-Reply-To: <1538169358.96.0.545547206417.issue34838@psf.upfronthosting.co.za> Message-ID: <1538418371.63.0.545547206417.issue34838@psf.upfronthosting.co.za> Change by Ammar Askar : ---------- keywords: +patch pull_requests: +9052 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 14:26:20 2018 From: report at bugs.python.org (Ammar Askar) Date: Mon, 01 Oct 2018 18:26:20 +0000 Subject: [issue34838] Improve arg clinic code generation for cases with type checking In-Reply-To: <1538169358.96.0.545547206417.issue34838@psf.upfronthosting.co.za> Message-ID: <1538418380.29.0.545547206417.issue34838@psf.upfronthosting.co.za> Ammar Askar added the comment: I've attached a PR that implements this. From the looks of it, there aren't a lot of uses of subclass_of within argument clinic converted functions at the moment. Additionally, most of the places it is used tend to have some non object arguments so a call to _PyArg_ParseStack() gets placed anyway. Attached as part of separate commit in the PR is the conversion of some files over to use the new code. These are mostly just to serve as examples. While converting would still leave a call to ParseStack in most places, I'd like to do some benchmarking and figure out if there is still a benefit. Like you said, the fact that branch-prediction is easier might be useful given that these functions are usually called with the right types of arguments anyway. ---------- nosy: +ammar2 stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 14:47:34 2018 From: report at bugs.python.org (Tim Peters) Date: Mon, 01 Oct 2018 18:47:34 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538419654.8.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: If SeaHash is interesting to us (it is to me), I suggest dropping our DJB/FNV combining part entirely and using a purer form, like so: Py_uhash_t t = (Py_uhash_t)y; x ^= t ^ (t << 1); x *= (Py_uhash_t)0x6eed0e9da4d94a4fULL; x ^= (x >> 32) >> (x >> 60); x *= (Py_uhash_t)0x6eed0e9da4d94a4fULL; The only collisions with that were 14 in the new tuple test. Rotate t right by 3 first, and that drops to 13. Much better than utter catastrophe ;-) 100% pure SeaHash does x ^= t; at the start first, instead of `t ^ (t << 1)` on the RHS. That fails the second tuple test, with 98 collisions. Not catastrophic, just "too many". But there's only so much we can expect from a cheap non-crypto-strength hash. `t ^ (t << 1)` is a pragmatic tweek to get rid of masses of uselessly repeated sign bits, which do occur in realistic tuples (mixing positive and negative ints). Adding that tweak shouldn't harm any of SeaHash's provable global properties, since `t ^ (t << 1)` is just a permutation of the input space. Different constants would be needed for a 32-bit version (best guesses, untried: a 31-bit random prime; s/32/16/; s/60/29/). I don't yet know about potential SeaHash licensing issues. It's part of Rust: https://docs.rs/seahash/3.0.5/seahash/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 15:29:30 2018 From: report at bugs.python.org (Andy Harrington) Date: Mon, 01 Oct 2018 19:29:30 +0000 Subject: [issue34863] Idle Mac scrolling only down Message-ID: <1538422170.25.0.545547206417.issue34863@psf.upfronthosting.co.za> New submission from Andy Harrington : In a source file in Idle I scroll down no matter which way I rotate the mouse wheel. This happens in no other app. Mac High Sierra OS. I have the Mac scrolling setup "natural" - backwards from the Windows directions. ---------- assignee: terry.reedy components: IDLE messages: 326821 nosy: andyharrington, terry.reedy priority: normal severity: normal status: open title: Idle Mac scrolling only down type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 15:36:12 2018 From: report at bugs.python.org (Andy Harrington) Date: Mon, 01 Oct 2018 19:36:12 +0000 Subject: [issue34864] In Idle, Mac tabs make bottom editor line with cursor location disappear Message-ID: <1538422572.97.0.545547206417.issue34864@psf.upfronthosting.co.za> New submission from Andy Harrington : Mac now puts multiple tabs inside of application window instead of starting a separate window (with some OS settings). With just one file being edited in Idle (no tab line) the bottom line with the numerical cursor coordinates is visible. When there are multiple tabs (and the tabbing heading therefore) the bottom cursor coordinates are missing. ---------- assignee: terry.reedy components: IDLE messages: 326822 nosy: andyharrington, terry.reedy priority: normal severity: normal status: open title: In Idle, Mac tabs make bottom editor line with cursor location disappear versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 15:39:28 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 01 Oct 2018 19:39:28 +0000 Subject: [issue34814] makesetup: must link C extensions to libpython when compiled in shared mode In-Reply-To: <1537980934.49.0.545547206417.issue34814@psf.upfronthosting.co.za> Message-ID: <1538422768.66.0.545547206417.issue34814@psf.upfronthosting.co.za> Change by Charalampos Stratakis : ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 15:40:08 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 01 Oct 2018 19:40:08 +0000 Subject: [issue34818] test.test_ssl.ThreadedTests.test_tls1_3 fails in 2.7 with AttributeError: __exit__ In-Reply-To: <1538039231.16.0.545547206417.issue34818@psf.upfronthosting.co.za> Message-ID: <1538422808.18.0.545547206417.issue34818@psf.upfronthosting.co.za> Change by Charalampos Stratakis : ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 15:42:06 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 01 Oct 2018 19:42:06 +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: <1538422926.27.0.545547206417.issue34836@psf.upfronthosting.co.za> Change by Charalampos Stratakis : ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 15:42:18 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 01 Oct 2018 19:42:18 +0000 Subject: [issue34834] test_ssl.test_options does not correctly account for built-in ctx defaults with openssl 1.1.1 In-Reply-To: <1538151296.99.0.545547206417.issue34834@psf.upfronthosting.co.za> Message-ID: <1538422937.99.0.545547206417.issue34834@psf.upfronthosting.co.za> Change by Charalampos Stratakis : ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 16:25:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Oct 2018 20:25:59 +0000 Subject: [issue32117] Tuple unpacking in return and yield statements In-Reply-To: <1511393509.38.0.213398074469.issue32117@psf.upfronthosting.co.za> Message-ID: <1538425559.07.0.545547206417.issue32117@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: assertEquals() is deprecated, use assertEqual() instead. This causes tests failure when run with -Werror. ---------- stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 16:36:46 2018 From: report at bugs.python.org (Rob Dalton) Date: Mon, 01 Oct 2018 20:36:46 +0000 Subject: [issue34865] Incorrect assignment of optional argument when partial match with different argument found. Message-ID: <1538426206.67.0.545547206417.issue34865@psf.upfronthosting.co.za> New submission from Rob Dalton : Parsing an unknown optional argument whose leading characters (e.g. '--user') match those of another, known optional argument (e.g. '--userdata') causes the unknown argument to be parsed as the known one. For example - passing the unknown argument '--user' to a parser with the known argument '--userdata' assigns the passed '--user' value to '--userdata'. Here's my setup info: Python: Python 3.6.3 :: Anaconda custom (64-bit) OS: MacOS High Sierra 10.13.6 Wrote up some example cases here: https://gist.github.com/rob-dalton/9ec06b8d5e2e9083713ddc7884d16072 ---------- components: Library (Lib) messages: 326824 nosy: rob-dalton priority: normal severity: normal status: open title: Incorrect assignment of optional argument when partial match with different argument found. type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 16:40:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Oct 2018 20:40:59 +0000 Subject: [issue34728] deprecate *loop* argument for asyncio.sleep In-Reply-To: <1537307045.18.0.956365154283.issue34728@psf.upfronthosting.co.za> Message-ID: <1538426459.76.0.545547206417.issue34728@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Tests are failed when ran with -Werror. $ ./python -Werror -m test -vuall test_asyncgen ... ====================================================================== ERROR: test_async_gen_asyncio_01 (test.test_asyncgen.AsyncGenAsyncioTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_asyncgen.py", line 404, in test_async_gen_asyncio_01 res = self.loop.run_until_complete(self.to_list(gen())) File "/home/serhiy/py/cpython/Lib/asyncio/base_events.py", line 582, in run_until_complete return future.result() File "/home/serhiy/py/cpython/Lib/test/test_asyncgen.py", line 391, in to_list async for i in gen: File "/home/serhiy/py/cpython/Lib/test/test_asyncgen.py", line 398, in gen await asyncio.sleep(0.01, loop=self.loop) File "/home/serhiy/py/cpython/Lib/asyncio/tasks.py", line 598, in sleep warnings.warn("The loop argument is deprecated and scheduled for " DeprecationWarning: The loop argument is deprecated and scheduled for removal in Python 3.10. ====================================================================== ... (the full log is too long) $ ./python -Werror -m test -vuall test_asyncio ... ====================================================================== FAIL: test_sleep_cancel (test.test_asyncio.test_tasks.PyTask_PyFuture_SubclassTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_asyncio/utils.py", line 510, in close_loop loop.close() File "/home/serhiy/py/cpython/Lib/test/test_asyncio/utils.py", line 362, in close self._gen.send(0) File "/home/serhiy/py/cpython/Lib/test/test_asyncio/test_tasks.py", line 1363, in gen self.assertAlmostEqual(10.0, when) AssertionError: 10.0 != 0 within 7 places (10.0 difference) ====================================================================== FAIL: test_run_coroutine_threadsafe_task_factory_exception (test.test_asyncio.test_tasks.RunCoroutineThreadsafeTests) Test coroutine submission from a tread to an event loop ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_asyncio/test_tasks.py", line 3189, in test_run_coroutine_threadsafe_task_factory_exception self.assertEqual(len(callback.call_args_list), 1) AssertionError: 2 != 1 ---------------------------------------------------------------------- ... (the full log is too long) ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 16:42:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Oct 2018 20:42:37 +0000 Subject: [issue34728] deprecate *loop* argument for asyncio.sleep In-Reply-To: <1537307045.18.0.956365154283.issue34728@psf.upfronthosting.co.za> Message-ID: <1538426557.56.0.545547206417.issue34728@psf.upfronthosting.co.za> STINNER Victor added the comment: > We should raise a DeprecationWarning in Python 3.8 and 3.9 and remove it in 4.0. On python-committers, it has been said that 3.10 will follow Python 3.9, no? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 16:43:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Oct 2018 20:43:11 +0000 Subject: [issue31310] semaphore tracker isn't protected against crashes In-Reply-To: <1504108352.86.0.17423028145.issue31310@psf.upfronthosting.co.za> Message-ID: <1538426590.99.0.545547206417.issue31310@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Tests are failed when ran with -Werror. $ ./python -We -m test -vuall test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_spawn ... ====================================================================== ERROR: test_semaphore_tracker_sigkill (test.test_multiprocessing_fork.TestSemaphoreTracker) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4582, in test_semaphore_tracker_sigkill self.check_semaphore_tracker_death(signal.SIGKILL, True) File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4546, in check_semaphore_tracker_death _semaphore_tracker.ensure_running() File "/home/serhiy/py/cpython/Lib/multiprocessing/semaphore_tracker.py", line 64, in ensure_running warnings.warn('semaphore_tracker: process died unexpectedly, ' UserWarning: semaphore_tracker: process died unexpectedly, relaunching. Some semaphores might leak. ---------------------------------------------------------------------- ... ====================================================================== ERROR: test_semaphore_tracker_sigint (test.test_multiprocessing_forkserver.TestSemaphoreTracker) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4574, in test_semaphore_tracker_sigint self.check_semaphore_tracker_death(signal.SIGINT, False) File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4546, in check_semaphore_tracker_death _semaphore_tracker.ensure_running() File "/home/serhiy/py/cpython/Lib/multiprocessing/semaphore_tracker.py", line 64, in ensure_running warnings.warn('semaphore_tracker: process died unexpectedly, ' UserWarning: semaphore_tracker: process died unexpectedly, relaunching. Some semaphores might leak. ====================================================================== ERROR: test_semaphore_tracker_sigkill (test.test_multiprocessing_forkserver.TestSemaphoreTracker) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4582, in test_semaphore_tracker_sigkill self.check_semaphore_tracker_death(signal.SIGKILL, True) File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4554, in check_semaphore_tracker_death sem = ctx.Semaphore() File "/home/serhiy/py/cpython/Lib/multiprocessing/context.py", line 82, in Semaphore return Semaphore(value, ctx=self.get_context()) File "/home/serhiy/py/cpython/Lib/multiprocessing/synchronize.py", line 126, in __init__ SemLock.__init__(self, SEMAPHORE, value, SEM_VALUE_MAX, ctx=ctx) File "/home/serhiy/py/cpython/Lib/multiprocessing/synchronize.py", line 80, in __init__ register(self._semlock.name) File "/home/serhiy/py/cpython/Lib/multiprocessing/semaphore_tracker.py", line 104, in register self._send('REGISTER', name) File "/home/serhiy/py/cpython/Lib/multiprocessing/semaphore_tracker.py", line 111, in _send self.ensure_running() File "/home/serhiy/py/cpython/Lib/multiprocessing/semaphore_tracker.py", line 64, in ensure_running warnings.warn('semaphore_tracker: process died unexpectedly, ' UserWarning: semaphore_tracker: process died unexpectedly, relaunching. Some semaphores might leak. ---------------------------------------------------------------------- ... ====================================================================== ERROR: test_semaphore_tracker_sigint (test.test_multiprocessing_spawn.TestSemaphoreTracker) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4574, in test_semaphore_tracker_sigint self.check_semaphore_tracker_death(signal.SIGINT, False) File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4546, in check_semaphore_tracker_death _semaphore_tracker.ensure_running() File "/home/serhiy/py/cpython/Lib/multiprocessing/semaphore_tracker.py", line 64, in ensure_running warnings.warn('semaphore_tracker: process died unexpectedly, ' UserWarning: semaphore_tracker: process died unexpectedly, relaunching. Some semaphores might leak. ====================================================================== ERROR: test_semaphore_tracker_sigkill (test.test_multiprocessing_spawn.TestSemaphoreTracker) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4582, in test_semaphore_tracker_sigkill self.check_semaphore_tracker_death(signal.SIGKILL, True) File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4554, in check_semaphore_tracker_death sem = ctx.Semaphore() File "/home/serhiy/py/cpython/Lib/multiprocessing/context.py", line 82, in Semaphore return Semaphore(value, ctx=self.get_context()) File "/home/serhiy/py/cpython/Lib/multiprocessing/synchronize.py", line 126, in __init__ SemLock.__init__(self, SEMAPHORE, value, SEM_VALUE_MAX, ctx=ctx) File "/home/serhiy/py/cpython/Lib/multiprocessing/synchronize.py", line 80, in __init__ register(self._semlock.name) File "/home/serhiy/py/cpython/Lib/multiprocessing/semaphore_tracker.py", line 104, in register self._send('REGISTER', name) File "/home/serhiy/py/cpython/Lib/multiprocessing/semaphore_tracker.py", line 111, in _send self.ensure_running() File "/home/serhiy/py/cpython/Lib/multiprocessing/semaphore_tracker.py", line 64, in ensure_running warnings.warn('semaphore_tracker: process died unexpectedly, ' UserWarning: semaphore_tracker: process died unexpectedly, relaunching. Some semaphores might leak. ---------------------------------------------------------------------- ---------- nosy: +serhiy.storchaka stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 16:45:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Oct 2018 20:45:54 +0000 Subject: [issue34728] deprecate *loop* argument for asyncio.sleep In-Reply-To: <1537307045.18.0.956365154283.issue34728@psf.upfronthosting.co.za> Message-ID: <1538426754.84.0.545547206417.issue34728@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 16:48:40 2018 From: report at bugs.python.org (Zachary Ware) Date: Mon, 01 Oct 2018 20:48:40 +0000 Subject: [issue34865] Incorrect assignment of optional argument when partial match with different argument found. In-Reply-To: <1538426206.67.0.545547206417.issue34865@psf.upfronthosting.co.za> Message-ID: <1538426920.2.0.545547206417.issue34865@psf.upfronthosting.co.za> Zachary Ware added the comment: Would using `allow_abbrev=False` fix this for you? https://docs.python.org/3/library/argparse.html#allow-abbrev ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 16:58:40 2018 From: report at bugs.python.org (Luna Chen) Date: Mon, 01 Oct 2018 20:58:40 +0000 Subject: [issue34844] logging.Formatter enhancement - Checking on style and fmt fields In-Reply-To: <1538252230.83.0.545547206417.issue34844@psf.upfronthosting.co.za> Message-ID: <1538427520.63.0.545547206417.issue34844@psf.upfronthosting.co.za> Luna Chen added the comment: Thank you Vinay! I think you have some good points! :) I'm going to make the following changes - re-raise the keyError into ValueError in XXXStyle.format - add validate() methods to XXXstyle class, and call them in logging.Formatter Best regards, Luna Chen ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 17:02:07 2018 From: report at bugs.python.org (Rob Dalton) Date: Mon, 01 Oct 2018 21:02:07 +0000 Subject: [issue34865] Incorrect assignment of optional argument when partial match with different argument found. In-Reply-To: Message-ID: Rob Dalton added the comment: It does. Thanks! I feel dumb for not finding that. Guess I'd just suggest making the default `false`, seems more intuitive to me. On Mon, Oct 1, 2018 at 2:00 PM Robert Dalton wrote: > It does. Thanks! I feel dumb for not finding that. > > Guess I'd just suggest making the default `false`, seems more intuitive to > me. > > On Mon, Oct 1, 2018 at 1:48 PM Zachary Ware > wrote: > >> >> Zachary Ware added the comment: >> >> Would using `allow_abbrev=False` fix this for you? >> >> https://docs.python.org/3/library/argparse.html#allow-abbrev >> >> ---------- >> nosy: +zach.ware >> >> _______________________________________ >> Python tracker >> >> _______________________________________ >> > > > -- > Best, > Rob Dalton > > > (814) 571-0462 | robdalton.me | robcdalton at gmail.com > -- Best, Rob Dalton (814) 571-0462 | robdalton.me | robcdalton at gmail.com ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 17:23:27 2018 From: report at bugs.python.org (Matthew Belisle) Date: Mon, 01 Oct 2018 21:23:27 +0000 Subject: [issue34866] CGI DOS vulnerability via long post list Message-ID: <1538429007.97.0.545547206417.issue34866@psf.upfronthosting.co.za> New submission from Matthew Belisle : Copied from email to security at python.org: I have been doing memory profiling on a few python web frameworks and I noticed this issue in the cgi.FieldStorage class. $ python example.py Memory used: 523935744 bytes The problem is there is no easy way to limit the number of MiniFieldStorage objects created by FieldStorage, so it goes unchecked in many frameworks like pyramid, pylons, webapp2, and flask. The end result is that on these frameworks, a 9MB request body (gzipped down to 9KB) can chew up ~500MB of memory on the server which is enough to effectively DOS it. The obvious way to prevent this currently is to check the content-length header and fail if it exceeds some value. But that solution has a major shortcoming because many frameworks want to allow large payloads, sometimes up to 10MB, as long as they contain a reasonable number of fields. After talking with the security at python.org team and pylons dev team about it, we think the best solution is to add a max_num_fields param to the FieldStorage class, defaulting to None, which throws an error if max_num_fields is exceeded. ---------- components: Library (Lib) messages: 326831 nosy: Matthew Belisle priority: normal severity: normal status: open title: CGI DOS vulnerability via long post list type: security 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 Oct 1 17:27:55 2018 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Oct 2018 21:27:55 +0000 Subject: [issue34866] CGI DOS vulnerability via long post list In-Reply-To: <1538429007.97.0.545547206417.issue34866@psf.upfronthosting.co.za> Message-ID: <1538429275.91.0.545547206417.issue34866@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +9053 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 18:08:57 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 01 Oct 2018 22:08:57 +0000 Subject: [issue34728] deprecate *loop* argument for asyncio.sleep In-Reply-To: <1537307045.18.0.956365154283.issue34728@psf.upfronthosting.co.za> Message-ID: <1538431737.1.0.545547206417.issue34728@psf.upfronthosting.co.za> Yury Selivanov added the comment: > On python-committers, it has been said that 3.10 will follow Python 3.9, no? Victor, you're looking at an outdated comment on this issue. This is what's in the master branch: https://github.com/python/cpython/blob/d4c76d960b8b286b75c933780416ace9cda682fd/Lib/asyncio/tasks.py#L598-L599 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 18:12:32 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Oct 2018 22:12:32 +0000 Subject: [issue34863] Idle Mac scrolling only down In-Reply-To: <1538422170.25.0.545547206417.issue34863@psf.upfronthosting.co.za> Message-ID: <1538431952.19.0.545547206417.issue34863@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Fixed in 3.7.1rc1, See the Mac downloads at https://www.python.org/downloads/release/python-371rc1/ If no problems, 3.7.1 itself will follow in a week or so. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE: on macOS, scroll slider 'sticks' at bottom of file _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 18:23:02 2018 From: report at bugs.python.org (Michael Felt) Date: Mon, 01 Oct 2018 22:23:02 +0000 Subject: [issue27643] test_ctypes fails on AIX with xlc In-Reply-To: <1469718089.88.0.404760174195.issue27643@psf.upfronthosting.co.za> Message-ID: <1538432582.4.0.545547206417.issue27643@psf.upfronthosting.co.za> Michael Felt added the comment: well, update: the issue34603 merged 16 days ago has broken this PR - that has been waiting for nearly 10 months. Unhappy camper. And, just as a short reminder - there were earlier ?patches (that I just copied) going back more than 2 years. Please, some attention. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 18:33:09 2018 From: report at bugs.python.org (Tim Peters) Date: Mon, 01 Oct 2018 22:33:09 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538433189.01.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: > Py_uhash_t t = (Py_uhash_t)y; > x ^= t ^ (t << 1); > x *= (Py_uhash_t)0x6eed0e9da4d94a4fULL; > x ^= (x >> 32) >> (x >> 60); > x *= (Py_uhash_t)0x6eed0e9da4d94a4fULL; Comment out either one of the multiplies, and it still passes all the tests. Commenting out the first one is "more valuable", because on all but the last loop iteration the latency of the last-line multiply will overlap with the next call to hash a tuple component. It even reduces the number of collisions in the new tuple test (down to 7 - and still no collisions at all in other tests). I'm not clear on why there are two multiplies. With both, or either one alone, low and high bits still get their chances to affect the other end. Presumably it boils down to some detail in "the proofs" - but, as for FNV, while various things are _claimed_, I can't find a writeup of "the proofs" anywhere :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 18:34:55 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 01 Oct 2018 22:34:55 +0000 Subject: [issue34728] deprecate *loop* argument for asyncio.sleep In-Reply-To: <1537307045.18.0.956365154283.issue34728@psf.upfronthosting.co.za> Message-ID: <1538433295.63.0.545547206417.issue34728@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- pull_requests: +9054 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 19:06:03 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 01 Oct 2018 23:06:03 +0000 Subject: [issue34865] Incorrect assignment of optional argument when partial match with different argument found. In-Reply-To: <1538426206.67.0.545547206417.issue34865@psf.upfronthosting.co.za> Message-ID: <1538435163.93.0.545547206417.issue34865@psf.upfronthosting.co.za> Eric V. Smith added the comment: As much as I agree that allow_abbrev=False would be a much better default, at this point we can't change it. Doing so would break who knows how many existing scripts when they upgraded Python versions. ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 19:56:51 2018 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Oct 2018 23:56:51 +0000 Subject: [issue31865] html.unescape does not work as per documentation In-Reply-To: <1508899606.23.0.213398074469.issue31865@psf.upfronthosting.co.za> Message-ID: <1538438211.44.0.545547206417.issue31865@psf.upfronthosting.co.za> Change by Ezio Melotti : ---------- assignee: docs at python -> ezio.melotti keywords: +easy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 20:28:05 2018 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2018 00:28:05 +0000 Subject: [issue31865] html.unescape does not work as per documentation In-Reply-To: <1508899606.23.0.213398074469.issue31865@psf.upfronthosting.co.za> Message-ID: <1538440085.02.0.545547206417.issue31865@psf.upfronthosting.co.za> Change by Ezio Melotti : ---------- keywords: +patch pull_requests: +9055 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 20:34:52 2018 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2018 00:34:52 +0000 Subject: [issue31865] html.unescape does not work as per documentation In-Reply-To: <1508899606.23.0.213398074469.issue31865@psf.upfronthosting.co.za> Message-ID: <1538440492.04.0.545547206417.issue31865@psf.upfronthosting.co.za> Ezio Melotti added the comment: New changeset 30534cc7172f36092e0002bb7df482edc0d539ce by Ezio Melotti in branch 'master': bpo-31865: Fix a couple of typos in the html.unescape() docs. (GH-9662) https://github.com/python/cpython/commit/30534cc7172f36092e0002bb7df482edc0d539ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 20:35:04 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Oct 2018 00:35:04 +0000 Subject: [issue31865] html.unescape does not work as per documentation In-Reply-To: <1508899606.23.0.213398074469.issue31865@psf.upfronthosting.co.za> Message-ID: <1538440504.96.0.545547206417.issue31865@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9056 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 20:35:12 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Oct 2018 00:35:12 +0000 Subject: [issue31865] html.unescape does not work as per documentation In-Reply-To: <1508899606.23.0.213398074469.issue31865@psf.upfronthosting.co.za> Message-ID: <1538440512.2.0.545547206417.issue31865@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9057 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 20:40:12 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 02 Oct 2018 00:40:12 +0000 Subject: [issue34867] Add mode to disable small integer and interned string caches Message-ID: <1538440812.47.0.545547206417.issue34867@psf.upfronthosting.co.za> New submission from Steven D'Aprano : Split off from #34850 by Guido's request. To help catch incorrect use of `is` when `==` is intended, perhaps we should add an interpreter mode that disables the caches for small ints and interned strings. Nathaniel called it "chaos mode" but I don't like the name as there is nothing chaotic about the lack of such caches, and it doesn't come close to chaos testing (e.g. Netflix's Chaos Monkey tool). ---------- components: Interpreter Core messages: 326838 nosy: gregory.p.smith, njs, steven.daprano priority: normal severity: normal status: open title: Add mode to disable small integer and interned string caches versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 20:43:58 2018 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2018 00:43:58 +0000 Subject: [issue31865] html.unescape does not work as per documentation In-Reply-To: <1508899606.23.0.213398074469.issue31865@psf.upfronthosting.co.za> Message-ID: <1538441038.8.0.545547206417.issue31865@psf.upfronthosting.co.za> Ezio Melotti added the comment: New changeset 27d7f93f633f0163b96d0a95e312f0eb5615abfd by Ezio Melotti (Miss Islington (bot)) in branch '3.7': bpo-31865: Fix a couple of typos in the html.unescape() docs. (GH-9663) https://github.com/python/cpython/commit/27d7f93f633f0163b96d0a95e312f0eb5615abfd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 20:44:36 2018 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2018 00:44:36 +0000 Subject: [issue31865] html.unescape does not work as per documentation In-Reply-To: <1508899606.23.0.213398074469.issue31865@psf.upfronthosting.co.za> Message-ID: <1538441076.25.0.545547206417.issue31865@psf.upfronthosting.co.za> Ezio Melotti added the comment: New changeset 56c102596f01ecbbe5cca6339d2ae16695b083ff by Ezio Melotti (Miss Islington (bot)) in branch '3.6': bpo-31865: Fix a couple of typos in the html.unescape() docs. (GH-9664) https://github.com/python/cpython/commit/56c102596f01ecbbe5cca6339d2ae16695b083ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 20:46:54 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 02 Oct 2018 00:46:54 +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: <1538441214.36.0.545547206417.issue34850@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Please move the "chaos" discussion to #34867 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 20:49:10 2018 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Oct 2018 00:49:10 +0000 Subject: [issue31865] html.unescape does not work as per documentation In-Reply-To: <1508899606.23.0.213398074469.issue31865@psf.upfronthosting.co.za> Message-ID: <1538441350.84.0.545547206417.issue31865@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- keywords: -patch 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 Oct 1 21:07:58 2018 From: report at bugs.python.org (Ammar Askar) Date: Tue, 02 Oct 2018 01:07:58 +0000 Subject: [issue34867] Add mode to disable small integer and interned string caches In-Reply-To: <1538440812.47.0.545547206417.issue34867@psf.upfronthosting.co.za> Message-ID: <1538442478.64.0.545547206417.issue34867@psf.upfronthosting.co.za> Ammar Askar added the comment: Maybe something more akin to UndefinedBehaviorSanitizer? Since its supposed to be catching implementation specific quirks. It wouldn't really be sanitizing though, more just making the bugs more likely to appear. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 22:30:26 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Oct 2018 02:30:26 +0000 Subject: [issue34864] In Idle, Mac tabs make bottom editor line with cursor location disappear In-Reply-To: <1538422572.97.0.545547206417.issue34864@psf.upfronthosting.co.za> Message-ID: <1538447426.43.0.545547206417.issue34864@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I do not see this 64-bit 3.7.1rc1 (see #34863) on 10.13.6 with, I believe, default settings. Are you reporting multiple tabs as a bug, or a feature resulting from intentional settings? If the latter, this may be something the tcl/tk does not support properly. Ned and Tal, do either of you know anything about this? In any case, is the status bar missing, or is the cursor position missing from the status bar. ---------- nosy: +ned.deily, taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 23:01:36 2018 From: report at bugs.python.org (Michael Smith) Date: Tue, 02 Oct 2018 03:01:36 +0000 Subject: [issue34858] MappingProxy objects should JSON serialize just like a dictionary In-Reply-To: <1538358992.7.0.545547206417.issue34858@psf.upfronthosting.co.za> Message-ID: <1538449296.36.0.545547206417.issue34858@psf.upfronthosting.co.za> Michael Smith added the comment: OK, I appreciate the response. The MappingProxy objects I am working with are in a nested data structure, so accessing them to coerce them directly isn't feasible. I created class MappingProxyEncoder(JSONEncoder): def default(self, obj): if isinstance(obj, MappingProxyType): return obj.copy() return JSONEncoder.default(self, obj) and using that works fine for json.dumps (passes all my tests, at least). But I suspect that obj.copy() is more expensive than the code I'm replacing, which is a local implementation of ImmutableDict I was trying to do away with, following a readthrough of PEP 416. I wonder if there's a cheaper way to get at the underlying dictionary. I suspect I'm not the only python user who foolishly expected MappingProxy to be a drop-in replacement for local ImmutableDict implementations. Maybe this ticket will be useful for others to read. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 1 23:03:28 2018 From: report at bugs.python.org (Andy Harrington) Date: Tue, 02 Oct 2018 03:03:28 +0000 Subject: [issue34864] In Idle, Mac tabs make bottom editor line with cursor location disappear In-Reply-To: Message-ID: Andy Harrington added the comment: This appears to be a system settings option in Mac OS Sierra set under the Dock, "prefer tabs when opening documents". With that choice, when there is the tab bar in an Idle edit window (more than one window superimposed, with tabs) the the whole bottom line with the horizontal separator line segment disappears: seems like no allowance is made for the vertical space taken up by the tab bar at top. There is a workaround: turn off this OS option, but unfortunate to need to do that, and the user has no warning that it is necessary. I only noticed this when I switched to a new machine and was doing initial diddling with the system options, and did not realize that i was not setting it up as I had it on my previous machine. Dr. Andrew N. Harrington Computer Science Department Graduate Program Director gpd at cs.luc.edu Loyola University Chicago 207 Doyle Center, 1052 W Loyola Ave. http://www.cs.luc.edu/~anh Phone: 773-508-3569 Dept. Fax: 773-508-3739 aharrin at luc.edu (as professor, not gpd role) On Mon, Oct 1, 2018 at 9:30 PM Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > I do not see this 64-bit 3.7.1rc1 (see #34863) on 10.13.6 with, I believe, > default settings. > > Are you reporting multiple tabs as a bug, or a feature resulting from > intentional settings? If the latter, this may be something the tcl/tk does > not support properly. Ned and Tal, do either of you know anything about > this? > > In any case, is the status bar missing, or is the cursor position missing > from the status bar. > > ---------- > nosy: +ned.deily, taleinat > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 00:09:34 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Oct 2018 04:09:34 +0000 Subject: [issue25300] Enable Intel MPX (Memory protection Extensions) feature In-Reply-To: <1443788737.62.0.174147088714.issue25300@psf.upfronthosting.co.za> Message-ID: <1538453374.55.0.545547206417.issue25300@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm going to formally reject this, since GCC removed -fmpx support. ---------- nosy: +benjamin.peterson resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 00:10:59 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Oct 2018 04:10:59 +0000 Subject: [issue34868] bad error message when combining _ grouping specifier with invalid type Message-ID: <1538453459.12.0.545547206417.issue34868@psf.upfronthosting.co.za> New submission from Benjamin Peterson : >>> format(34, '_n') Traceback (most recent call last): File "", line 1, in ValueError: Cannot specify ',' with 'n'. Why is it talking about ","? ---------- components: Interpreter Core messages: 326848 nosy: benjamin.peterson priority: normal severity: normal status: open title: bad error message when combining _ grouping specifier with invalid type versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 00:25:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Oct 2018 04:25:10 +0000 Subject: [issue34858] MappingProxy objects should JSON serialize just like a dictionary In-Reply-To: <1538358992.7.0.545547206417.issue34858@psf.upfronthosting.co.za> Message-ID: <1538454310.48.0.545547206417.issue34858@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Using the default method or argument is a proper way of serializing custom types to JSON. There are a number of issues fr adding support for serializing different types by default. I work on a patch that will allow to make different types serializable in a more convenient way. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 00:31:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Oct 2018 04:31:56 +0000 Subject: [issue34867] Add mode to disable small integer and interned string caches In-Reply-To: <1538440812.47.0.545547206417.issue34867@psf.upfronthosting.co.za> Message-ID: <1538454716.56.0.545547206417.issue34867@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Adding a runtime option will hit a performance of normal execution. And it is impossible to disable interning strings completely. Some core code depends on this. I have also concerns about disabling caching an empty string. There are also other caches on different levels. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 00:34:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Oct 2018 04:34:28 +0000 Subject: [issue34868] bad error message when combining _ grouping specifier with invalid type In-Reply-To: <1538453459.12.0.545547206417.issue34868@psf.upfronthosting.co.za> Message-ID: <1538454868.7.0.545547206417.issue34868@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See issue31780. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 00:34:59 2018 From: report at bugs.python.org (Ammar Askar) Date: Tue, 02 Oct 2018 04:34:59 +0000 Subject: [issue34867] Add mode to disable small integer and interned string caches In-Reply-To: <1538440812.47.0.545547206417.issue34867@psf.upfronthosting.co.za> Message-ID: <1538454899.35.0.545547206417.issue34867@psf.upfronthosting.co.za> Ammar Askar added the comment: Serhiy, take a look at the linked ticket. The idea is that something like pytest or libregrtest will use this to bring underlying bugs to the surface. It isn't intended to be used in normal execution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 00:38:14 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Oct 2018 04:38:14 +0000 Subject: [issue34868] bad error message when combining _ grouping specifier with invalid type In-Reply-To: <1538453459.12.0.545547206417.issue34868@psf.upfronthosting.co.za> Message-ID: <1538455094.15.0.545547206417.issue34868@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- keywords: +patch pull_requests: +9058 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 00:38:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Oct 2018 04:38:28 +0000 Subject: [issue34867] Add mode to disable small integer and interned string caches In-Reply-To: <1538440812.47.0.545547206417.issue34867@psf.upfronthosting.co.za> Message-ID: <1538455108.33.0.545547206417.issue34867@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't worry about the performance when caches are disabled. An additional check will hit the performance in normal execution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 00:40:08 2018 From: report at bugs.python.org (Ammar Askar) Date: Tue, 02 Oct 2018 04:40:08 +0000 Subject: [issue34867] Add mode to disable small integer and interned string caches In-Reply-To: <1538440812.47.0.545547206417.issue34867@psf.upfronthosting.co.za> Message-ID: <1538455208.78.0.545547206417.issue34867@psf.upfronthosting.co.za> Ammar Askar added the comment: Aah sorry, I misinterpreted what you meant. The original ticket proposes it as a compile time flag as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 00:41:30 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Oct 2018 04:41:30 +0000 Subject: [issue34869] remove LDLAST Message-ID: <1538455290.81.0.545547206417.issue34869@psf.upfronthosting.co.za> New submission from Benjamin Peterson : The last thing setting LDLAST in configure seems to have been OSF/1. Support for OSF/1 was removed in 736e7fc0f6d1242b58ee91708873d14ed7856b77. So, I think we can kill LDLAST, too. ---------- components: Build messages: 326855 nosy: benjamin.peterson priority: normal severity: normal status: open title: remove LDLAST versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 00:42:11 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Oct 2018 04:42:11 +0000 Subject: [issue34869] remove LDLAST In-Reply-To: <1538455290.81.0.545547206417.issue34869@psf.upfronthosting.co.za> Message-ID: <1538455331.5.0.545547206417.issue34869@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- keywords: +patch pull_requests: +9059 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 00:54:44 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Oct 2018 04:54:44 +0000 Subject: [issue34868] bad error message when combining _ grouping specifier with invalid type In-Reply-To: <1538453459.12.0.545547206417.issue34868@psf.upfronthosting.co.za> Message-ID: <1538456084.84.0.545547206417.issue34868@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset cbda8fc5d76b10bcbb92d927537576c229143836 by Benjamin Peterson in branch 'master': closes bpo-34868: Improve error message with '_' is combined with an invalid type specifier. (GH-9666) https://github.com/python/cpython/commit/cbda8fc5d76b10bcbb92d927537576c229143836 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 00:54:53 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Oct 2018 04:54:53 +0000 Subject: [issue34868] bad error message when combining _ grouping specifier with invalid type In-Reply-To: <1538453459.12.0.545547206417.issue34868@psf.upfronthosting.co.za> Message-ID: <1538456093.53.0.545547206417.issue34868@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9060 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 00:55:01 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Oct 2018 04:55:01 +0000 Subject: [issue34868] bad error message when combining _ grouping specifier with invalid type In-Reply-To: <1538453459.12.0.545547206417.issue34868@psf.upfronthosting.co.za> Message-ID: <1538456101.12.0.545547206417.issue34868@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9061 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 01:12:07 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Oct 2018 05:12:07 +0000 Subject: [issue34868] bad error message when combining _ grouping specifier with invalid type In-Reply-To: <1538453459.12.0.545547206417.issue34868@psf.upfronthosting.co.za> Message-ID: <1538457127.33.0.545547206417.issue34868@psf.upfronthosting.co.za> miss-islington added the comment: New changeset cd4dd9374d0fc65b070a61871801d306090f8375 by Miss Islington (bot) in branch '3.7': closes bpo-34868: Improve error message with '_' is combined with an invalid type specifier. (GH-9666) https://github.com/python/cpython/commit/cd4dd9374d0fc65b070a61871801d306090f8375 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 01:18:18 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Oct 2018 05:18:18 +0000 Subject: [issue34868] bad error message when combining _ grouping specifier with invalid type In-Reply-To: <1538453459.12.0.545547206417.issue34868@psf.upfronthosting.co.za> Message-ID: <1538457498.43.0.545547206417.issue34868@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 7455bf46a222780805fd0375328f5732e5bbb684 by Miss Islington (bot) in branch '3.6': closes bpo-34868: Improve error message with '_' is combined with an invalid type specifier. (GH-9666) https://github.com/python/cpython/commit/7455bf46a222780805fd0375328f5732e5bbb684 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 01:19:59 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Oct 2018 05:19:59 +0000 Subject: [issue34862] No longer builds on OpenBSD due to missing definition of convert_sched_param In-Reply-To: <1538417099.97.0.545547206417.issue34862@psf.upfronthosting.co.za> Message-ID: <1538457599.92.0.545547206417.issue34862@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 81574b80e92554adf75c13fa42415beb8be383cb by Benjamin Peterson (William Orr) in branch 'master': closes bpo-34862: Guard definition of convert_sched_param with POSIX_SPAWN_SETSCHEDULER. (GH-9658) https://github.com/python/cpython/commit/81574b80e92554adf75c13fa42415beb8be383cb ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 02:34:31 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Oct 2018 06:34:31 +0000 Subject: [issue34867] Add mode to disable small integer and interned string caches In-Reply-To: <1538440812.47.0.545547206417.issue34867@psf.upfronthosting.co.za> Message-ID: <1538462071.45.0.545547206417.issue34867@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't think this option will be of any value. For it to work, the code would need to have this particular bug, have test cases that triggered those bugs, and a user sophisticated enough to run the tests but unsophisticated enough to make beginner mistakes regarding when to use identity tests versus equality tests (something I teach on day one of beginner Python courses). Before this goes further, I would like to see some evidence that it would actually catch a real bug in the wild. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 02:48:34 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Oct 2018 06:48:34 +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: <1538462914.15.0.545547206417.issue34850@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I like this solution of a syntax warning for `is ` > and I agree that `== None` should not be a warning. +1 for me as well. Besides catching potential bugs, it will be of instant benefit for teaching Python. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 03:40:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Oct 2018 07:40:47 +0000 Subject: [issue34728] deprecate *loop* argument for asyncio.sleep In-Reply-To: <1537307045.18.0.956365154283.issue34728@psf.upfronthosting.co.za> Message-ID: <1538466047.33.0.545547206417.issue34728@psf.upfronthosting.co.za> STINNER Victor added the comment: > Victor, you're looking at an outdated comment on this issue. No, I read the commit: https://github.com/python/cpython/commit/558c49bcf3a8543d64a68de836b5d855efd56696 warnings.warn("The loop argument is deprecated and scheduled for" "removal in Python 4.0.", DeprecationWarning, stacklevel=2) > This is what's in the master branch: https://github.com/python/cpython/blob/d4c76d960b8b286b75c933780416ace9cda682fd/Lib/asyncio/tasks.py#L598-L599 Ah, you forgot to mention this bpo in your commit: commit fad6af2744c0b022568f7f4a8afc93fed056d4db Author: Yury Selivanov Date: Tue Sep 25 17:44:52 2018 -0400 asyncio/docs: Replace Python 4.0 -> 3.10 (GH-9579) Anyway, the current code is fine. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 03:41:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Oct 2018 07:41:50 +0000 Subject: [issue34728] deprecate *loop* argument for asyncio.sleep In-Reply-To: <1537307045.18.0.956365154283.issue34728@psf.upfronthosting.co.za> Message-ID: <1538466110.11.0.545547206417.issue34728@psf.upfronthosting.co.za> STINNER Victor added the comment: There is a new PR, so I change the issue resolution again. ---------- resolution: fixed -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 03:44:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Oct 2018 07:44:32 +0000 Subject: [issue34728] deprecate *loop* argument for asyncio.sleep In-Reply-To: <1537307045.18.0.956365154283.issue34728@psf.upfronthosting.co.za> Message-ID: <1538466272.4.0.545547206417.issue34728@psf.upfronthosting.co.za> STINNER Victor added the comment: FYI if I recall correctly, in the past, we preferred to pass explicitly the loop to avoid to have to get the current loop which may add an overhead. But the current trend is to get rid of the explicit loop parameter. > asyncio.sleep is a coroutine; passing a *loop* argument to it makes no sense anymore. sleep() requires the current event loop: if loop is None: loop = events.get_running_loop() else: warnings.warn("The loop argument is deprecated and scheduled for " "removal in Python 3.10.", DeprecationWarning, stacklevel=2) future = loop.create_future() h = loop.call_later(delay, futures._set_result_unless_cancelled, future, result) Why does it not make sense to pass the loop to sleep? "it makes no sense anymore" something changes? I'm not against the change, I'm just trying to understand the rationale for other changes :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 03:58:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Oct 2018 07:58:23 +0000 Subject: [issue25300] Enable Intel MPX (Memory protection Extensions) feature In-Reply-To: <1443788737.62.0.174147088714.issue25300@psf.upfronthosting.co.za> Message-ID: <1538467103.24.0.545547206417.issue25300@psf.upfronthosting.co.za> STINNER Victor added the comment: > I'm going to formally reject this, since GCC removed -fmpx support. "The MPX extensions to the C and C++ languages have been deprecated and will be removed in a future release." https://gcc.gnu.org/gcc-8/changes.html Oh. It seems like the reason is to "reduce the maintenance burden". Some links: * https://www.kernel.org/doc/Documentation/x86/intel_mpx.txt * https://en.wikipedia.org/wiki/Intel_MPX * https://www.phoronix.com/scan.php?page=news_item&px=GCC-Possible-MPX-Deprecation A patch has been proposed to remove MPX from GCC 9 (no merged?): https://www.phoronix.com/scan.php?page=news_item&px=GCC-Patch-To-Drop-MPX ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 04:22:53 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 02 Oct 2018 08:22:53 +0000 Subject: [issue34728] deprecate *loop* argument for asyncio.sleep In-Reply-To: <1537307045.18.0.956365154283.issue34728@psf.upfronthosting.co.za> Message-ID: <1538468573.33.0.545547206417.issue34728@psf.upfronthosting.co.za> Andrew Svetlov added the comment: My understanding is: `loop` argument passed to sleep should be always the same as returned from `get_running_loop()`. Passing it explicitly can be considered as microoptimization but `get_running_loop()` is pretty fast now, no need for such micro-opts. On another hand passing *non-current* loop is a serious error: nothing prevents to do it but the code just hangs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 04:36:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Oct 2018 08:36:02 +0000 Subject: [issue34711] return ENOTDIR when open() accepts filenames with a trailing slash In-Reply-To: <1537179798.31.0.956365154283.issue34711@psf.upfronthosting.co.za> Message-ID: <1538469361.99.0.545547206417.issue34711@psf.upfronthosting.co.za> STINNER Victor added the comment: Jeremy Kloth: "This is also an issue on Windows when the target path resides within a junction, paths outside of a junction respond (err, fail) as expected." https://developercommunity.visualstudio.com/content/problem/272379/createfile-non-error-on-filename-with-trailing-bac.html I don't know the behavior on Windows. I tried to create a file name "a\" (U+0061, U+005C): I get an OSError "invalid argument" (error 22). I confirm that in a junction point, I am able to: * open an existing file with an additional trailing antislash (U+005C): the extra character is simply ignored and I am able to open the file * create a new file with an additional trailing antislash (U+005C): the filename is created without the trailing antislash On the PR, I wrote: > There are much more functions which "open a file". Open Python/fileutils.c for a few mores. What about os.open()? What about all other functions which accept a filename and then call a third party library which calls open() directly? Ok, let me give some examples of function which directly open a file: * fileutils.c: _Py_open(), _Py_open_noraise(), _Py_wfopen(), _Py_fopen(), _Py_fopen_obj() * os.open() * _io.FileIO, _pyio.FileIO (use os.open()) Ok... But there are other functions to access files... stat()/fstat() functions: * fileutils.c: _Py_fstat_noraise(), _Py_fstat(), _Py_stat() * Modules/getpath.c: _Py_wstat() * os.stat(), os.lstat(), os.fstat() To start to have a better ideas of how many functions accept filenames, open also Lib/shutil.py. shutil.copyfile() uses os.stat(), but then it uses os.symlink() and open()... So what about os.symlink()? Ok, here I only listen a *few* examples of functions which are "controlled" by Python. But there are *many* wrappers to 3rd party libraries which accept a filename. Examples: * _ssl.SSLContext.load_cert_chain() * sqlite3.connect() * etc. Where is the limit? How many functions must be patched in Python? How do we patch OpenSSL and SQLite libraries? Python is designed as a thin wrapper to the operating system. IMHO Python must not validate the filename itself. -- > Going back to issue17234 - there has been a test to check that a URL with a trailing slash reports 404 status. IMHO you must fix a single place: the SimpleHTTPServer, not all code handling the filesytem. Same remark for AIX and Windows junctions. I suggest to reject this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 04:41:46 2018 From: report at bugs.python.org (Alfred Sawaya) Date: Tue, 02 Oct 2018 08:41:46 +0000 Subject: [issue34430] Symmetrical chaining futures in asyncio.future.wrap_future In-Reply-To: <1534590140.17.0.56676864532.issue34430@psf.upfronthosting.co.za> Message-ID: <1538469706.04.0.545547206417.issue34430@psf.upfronthosting.co.za> Alfred Sawaya added the comment: I use it to integrate a concurrent-based software (B) with an asyncio-based software (A). (B) will undergo a massive refactoring to become asyncio-based in the future, but for now, I need to use it as-is. I don't want to modify (A) to handle concurrent.futures.Future (it is developped by another team by the way) and I prefer to begin to implement asyncio into (B). So (A) waits for a task request with an asyncio.Future, then processes it and populates the Future's result. (B) has a waiting loop into a thread that handles multiples concurrent.futures.Future. When (B) receives a request it creates a concurrent.futures.Future and push it into a queue for the waiting loop. If the request asks for a task implemented by (A), it wraps it into an asyncio.Future and call (A) with it. (A) processes the task and populates the asyncio.Future's result. That's why I needed to implement the proposed behaviours. Actually I will not need it for long, as (B) will become asyncio-based, but I wanted to integrate (A) and (B) with as less effort as possible, so I implemented my custom Future wrapper, but I think it is useful to refactor concurrent-based software to asyncio incrementally (and I will have to do it multiple times in the near future). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 04:50:59 2018 From: report at bugs.python.org (Per Lundberg) Date: Tue, 02 Oct 2018 08:50:59 +0000 Subject: [issue34870] Core dump when Python VSCode debugger is attached Message-ID: <1538470259.0.0.545547206417.issue34870@psf.upfronthosting.co.za> New submission from Per Lundberg : My code has recently started triggering a core dump in the Python executable when the VSCode debugger is attached. This doesn't happen right away; it seems to happen more or less _after_ the program is done executing (I just placed a breakpoint and stepped it through). The program in question is this: https://github.com/hiboxsystems/trac-to-gitlab/blob/master/migrate.py To help in the debugging of this, I installed python2.7-dbg and gdb-python2 on my Debian machine, and re-ran the script using this version. Here is the GDB output when analyzing the backtrace: $ gdb /usr/bin/python2.7-dbg core GNU gdb (Debian 8.1-4+b1) 8.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/bin/python2.7-dbg...done. [New LWP 19749] [New LWP 19744] [New LWP 19747] [New LWP 19754] [New LWP 19751] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `/usr/bin/python2.7-dbg -m ptvsd --host localhost --port 43959 migrate.py --only'. Program terminated with signal SIGSEGV, Segmentation fault. #0 PyEval_EvalFrameEx (f=0x7f815c002310, throwflag=0) at ../Python/ceval.c:3347 3347 if (tstate->frame->f_exc_type != NULL) [Current thread is 1 (Thread 0x7f815bfff700 (LWP 19749))] The python backtrace looks like this: (gdb) py-bt Traceback (most recent call first): File "/usr/lib/python2.7/threading.py", line 371, in wait self._acquire_restore(saved_state) File "/usr/lib/python2.7/Queue.py", line 177, in get self.not_empty.wait(remaining) File "/home/per/.vscode/extensions/ms-python.python-2018.8.0/pythonFiles/experimental/ptvsd/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py", line 458, in _on_run cmd = self.cmdQueue.get(1, 0.1) File "/home/per/.vscode/extensions/ms-python.python-2018.8.0/pythonFiles/experimental/ptvsd/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py", line 319, in run self._on_run() File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 774, in __bootstrap self.__bootstrap_inner() And the C-level backtrace: (gdb) bt #0 PyEval_EvalFrameEx (f=Frame 0x7f815c002310, for file /usr/lib/python2.7/threading.py, line 371, in wait (), throwflag=0) at ../Python/ceval.c:3347 #1 0x00005624534af42c in PyEval_EvalCodeEx (co=0x7f816216e7d0, globals={'current_thread': None, '_BoundedSemaphore': None, 'currentThread': None, '_Timer': None, '_format_exc': None, 'Semaphore': None, '_deque': None, 'activeCount': None, '_profile_hook': None, '_sleep': None, '_trace_hook': None, 'ThreadError': None, '_enumerate': None, '_start_new_thread': None, 'BoundedSemaphore': None, '_shutdown': None, '__all__': None, '_original_start_new_thread': None, '_Event': None, 'active_count': None, '__package__': None, '_Condition': None, '_RLock': None, '_test': None, 'local': None, '__doc__': None, 'Condition': None, '_Verbose': None, '_DummyThread': None, 'Thread': None, 'warnings': None, '__builtins__': {'bytearray': None, 'IndexError': None, 'all': None, 'help': None, 'vars': None, 'SyntaxError': None, 'unicode': None, 'UnicodeDecodeError': None, 'memoryview': None, 'isinstance': None, 'copyright': None, 'NameError': None, 'BytesWarning': None, 'dict': None, 'input': None, 'oct': None, 'bin': None, 'SystemExit': None, 'StandardError': None, 'format': None, 'repr': None, 'sor...(truncated), locals=0x0, args=0x562454463068, argcount=2, kws=0x562454463078, kwcount=0, defs=0x7f8162116408, defcount=1, closure=0x0) at ../Python/ceval.c:3604 #2 0x00005624534b23a7 in fast_function (func=, pp_stack=0x7f815bffd3e8, n=2, na=2, nk=0) at ../Python/ceval.c:4467 #3 0x00005624534b1f8a in call_function (pp_stack=0x7f815bffd3e8, oparg=1) at ../Python/ceval.c:4392 #4 0x00005624534ac45d in PyEval_EvalFrameEx ( f=Frame 0x562454462eb0, for file /usr/lib/python2.7/Queue.py, line 177, in get (self=, maxsize=0, all_tasks_done=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Condition__waiters=[], release=) at remote 0x7f81610bc0d0>, mutex=, not_full=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Condition__waiters=[], release=) at remote 0x7f81610bc060>, not_empty=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, pp_stack=0x7f815bffd9f8, n=3, na=3, nk=0) at ../Python/ceval.c:4467 #7 0x00005624534b1f8a in call_function (pp_stack=0x7f815bffd9f8, oparg=2) at ../Python/ceval.c:4392 #8 0x00005624534ac45d in PyEval_EvalFrameEx ( f=Frame 0x7f8150000ff0, for file /home/per/.vscode/extensions/ms-python.python-2018.8.0/pythonFiles/experimental/ptvsd/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py, line 458, in _on_run (self=, maxsize=0, all_tasks_done=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Condition__waiters=[], release=) at remote 0x7f81610bc0d0>, mutex=, not_full=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Condition__waiters=[], release=) at remote 0x7f81610b...(truncated), throwflag=0) at ../Python/ceval.c:3009 #9 0x00005624534b2291 in fast_function (func=, pp_stack=0x7f815bffde78, n=1, na=1, nk=0) at ../Python/ceval.c:4457 #10 0x00005624534b1f8a in call_function (pp_stack=0x7f815bffde78, oparg=0) at ../Python/ceval.c:4392 #11 0x00005624534ac45d in PyEval_EvalFrameEx ( f=Frame 0x7f8150000dd0, for file /home/per/.vscode/extensions/ms-python.python-2018.8.0/pythonFiles/experimental/ptvsd/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py, line 319, in run (self=, maxsize=0, all_tasks_done=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Condition__waiters=[], release=) at remote 0x7f81610bc0d0>, mutex=, not_full=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Condition__waiters=[], release=) at remote 0x7f81610bc060...(truncated), throwflag=0) at ../Python/ceval.c:3009 #12 0x00005624534b2291 in fast_function (func=, pp_stack=0x7f815bffe2f8, n=1, na=1, nk=0) at ../Python/ceval.c:4457 #13 0x00005624534b1f8a in call_function (pp_stack=0x7f815bffe2f8, oparg=0) at ../Python/ceval.c:4392 #14 0x00005624534ac45d in PyEval_EvalFrameEx ( f=Frame 0x7f8150000b80, for file /usr/lib/python2.7/threading.py, line 801, in __bootstrap_inner (self=, maxsize=0, all_tasks_done=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Condition__waiters=[], release=) at remote 0x7f81610bc0d0>, mutex=, not_full=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Condition__waiters=[], release=) at remote 0x7f81610bc060>, not_empty=<_Condition(_Verbose__verbose=False, _Condition__lock=, pp_stack=0x7f815bffe778, n=1, na=1, nk=0) at ../Python/ceval.c:4457 #16 0x00005624534b1f8a in call_function (pp_stack=0x7f815bffe778, oparg=0) at ../Python/ceval.c:4392 #17 0x00005624534ac45d in PyEval_EvalFrameEx ( f=Frame 0x7f81610b9df0, for file /usr/lib/python2.7/threading.py, line 774, in __bootstrap (self=, maxsize=0, all_tasks_done=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Condition__waiters=[], release=) at remote 0x7f81610bc0d0>, mutex=, not_full=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Condition__waiters=[], release=) at remote 0x7f81610bc060>, not_empty=<_Condition(_Verbose__verbose=False, _Condition__lock=, arg=(, maxsize=0, all_tasks_done=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Condition__waiters=[], release=) at remote 0x7f81610bc0d0>, mutex=, not_full=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Condition__waiters=[], release=) at remote 0x7f81610bc060>, not_empty=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Con...(truncated), kw=0x0) at ../Objects/funcobject.c:523 #20 0x00005624533a3730 in PyObject_Call (func=, arg=(, maxsize=0, all_tasks_done=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Condition__waiters=[], release=) at remote 0x7f81610bc0d0>, mutex=, not_full=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Condition__waiters=[], release=) at remote 0x7f81610bc060>, not_empty=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Con...(truncated), kw=0x0) at ../Objects/abstract.c:2544 #21 0x00005624533bf50c in instancemethod_call (func=, arg=(, maxsize=0, all_tasks_done=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Condition__waiters=[], release=) at remote 0x7f81610bc0d0>, mutex=, not_full=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Condition__waiters=[], release=) at remote 0x7f81610bc060>, not_empty=<_Condition(_Verbose__verbose=False, _Condition__lock=, acquire=, _Con...(truncated), kw=0x0) at ../Objects/classobject.c:2600 #22 0x00005624533a3730 in PyObject_Call (func=, arg=(), kw=0x0) at ../Objects/abstract.c:2544 #23 0x00005624534b14d3 in PyEval_CallObjectWithKeywords (func=, arg=(), kw=0x0) at ../Python/ceval.c:4241 #24 0x00005624535ad097 in t_bootstrap (boot_raw=0x7f81615efaa8) at ../Modules/threadmodule.c:620 #25 0x00007f8162ac6f2a in start_thread (arg=0x7f815bfff700) at pthread_create.c:463 #26 0x00007f816263dedf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 The failing tstate object being mentioned initially looks like this: (gdb) print *tstate $1 = {next = 0x562453b13590, interp = 0x56245391a280, frame = 0x0, recursion_depth = 8, tracing = 0, use_tracing = 0, c_profilefunc = 0x0, c_tracefunc = 0x0, c_profileobj = 0x0, c_traceobj = 0x0, curexc_type = , curexc_value = "local variable 'self' referenced before assignment", curexc_traceback = , exc_type = 0x0, exc_value = 0x0, exc_traceback = 0x0, dict = 0x0, tick_counter = 153, gilstate_counter = 1, async_exc = 0x0, thread_id = 140193571010304, trash_delete_nesting = 0, trash_delete_later = 0x0} So the NULL pointer being dereferenced is tstate->frame, as hinted to by GDB. I do not know the Python internals well enough to dig much deeper than this for now, but maybe this helps? If not, let me know - I have the core dump readily available to debug this further. (Can unfortunately provide a copy of the core dump per se since it likely contains credentials/other sensitive info.) More details: VSCode extension version: 2018.8.0 python2.7-dbg Debian package version: 2.7.15-4 ---------- components: Interpreter Core messages: 326869 nosy: Per Lundberg priority: normal severity: normal status: open title: Core dump when Python VSCode debugger is attached versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 05:27:03 2018 From: report at bugs.python.org (Charlie Dyson) Date: Tue, 02 Oct 2018 09:27:03 +0000 Subject: [issue23097] unittest can unnecessarily modify sys.path (and with the wrong case) In-Reply-To: <1419151339.28.0.203745779889.issue23097@psf.upfronthosting.co.za> Message-ID: <1538472423.83.0.545547206417.issue23097@psf.upfronthosting.co.za> Charlie Dyson added the comment: As an aside, should that be sys.path.insert(1, X)? As 0 has a special meaning (I've often thought this is a slightly odd convention). Another aside: I noticed this because I was looking to write a module finder, and thought I could extract one out of this function. It would be nice to have a module-crawler function, and write discover() in terms of that. ---------- nosy: +cdyson37 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 05:51:27 2018 From: report at bugs.python.org (=?utf-8?q?Vincent_Jug=C3=A9?=) Date: Tue, 02 Oct 2018 09:51:27 +0000 Subject: [issue34561] Replace list sorting merge_collapse()? In-Reply-To: <1535764924.6.0.56676864532.issue34561@psf.upfronthosting.co.za> Message-ID: <1538473887.61.0.545547206417.issue34561@psf.upfronthosting.co.za> Vincent Jug? added the comment: After having worked a little bit on improving AdaptiveShiversSort on few-run cases, I designed a new version of the algorithm, called shivers2 in the file runstack.py joined to this message It looks more complicated than the original AdaptiveShiversSort but the spirit, inspired by your comments, is as follows: - we allow the second (bottom-most) element of the stack to be moderately larger than the bottom-most one; if that 2nd element were way larger than the 1st one, merging them, even if not optimal, would not be too painful anyways; - we may force a merge between these 1st and 2nd elements only when the 2nd element is about to be merged with the 3rd one; - similarly, we allow the top-most element of the stack to be moderately larger than the second top-most one; - otherwise, we stick to the behaviour of AdaptiveShiversSort. This variant's performance seems comparable with Powersort's. Reasonable follow-up work that I plan to do in the coming weeks (when I have time to do so) is: - prove that the new algorithm still runs in n H + O(n), - investigate whether we can have guarantees such as "this new sort's merge cost is at most XXX times larger than the optimal merge cost", - investigate improvements for Powersort. Given its excellent overall performance, I think that trying to slightly tweak Powersort in cases it underperforms other sorts might be worth some effort. Best, Vincent ---------- Added file: https://bugs.python.org/file47839/runstack.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 05:56:12 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 02 Oct 2018 09:56:12 +0000 Subject: [issue34866] CGI DOS vulnerability via long post list In-Reply-To: <1538429007.97.0.545547206417.issue34866@psf.upfronthosting.co.za> Message-ID: <1538474172.38.0.545547206417.issue34866@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 06:03:15 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 02 Oct 2018 10:03:15 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538474595.48.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > the author wants this transformation to be easily invertible, so a prime is necessary A multiplication by any odd number modulo 2**64 is invertible. As I argued before, the concept of primes is meaningless (except for the prime 2) when computing modulo 2**64. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 06:07:37 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 02 Oct 2018 10:07:37 +0000 Subject: [issue34870] Core dump when Python VSCode debugger is attached In-Reply-To: <1538470259.0.0.545547206417.issue34870@psf.upfronthosting.co.za> Message-ID: <1538474857.15.0.545547206417.issue34870@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 06:29:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Oct 2018 10:29:06 +0000 Subject: [issue32892] Remove specific constant AST types in favor of ast.Constant In-Reply-To: <1519204597.27.0.467229070634.issue32892@psf.upfronthosting.co.za> Message-ID: <1538476146.09.0.545547206417.issue32892@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Submitted a fix for Pyflakes: https://github.com/PyCQA/pyflakes/pull/369. It had more problems due to changes in line and column numbers in SyntaxError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 06:41:53 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 02 Oct 2018 10:41:53 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538476913.47.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: This weekend I realized something important which I didn't realize before: some hash functions which I assumed to be good (i.e. small chance of collisions between any given two tuples) turned out to often fail the tests. This is because you don't just want to minimize collisions, you also want to minimize *correlations* between collisions. More precisely: for a given hash function (considering the multiplier as parameter), it can happen that there are 4 tuples t, u, v, w such that whether or not hash(t) == hash(u) is correlated to whether or not hash(v) == hash(w). Such correlations increase the standard deviation of the number of collisions in the tests a lot (even if the average is unaffected), which leads to significant chances of failing the tests. So with this in mind I stopped testing pairs of tuples but I ran the actual testsuites. The metric I'm using is now the probability that the testsuite passes for randomly chosen multipliers (3 mod 8). For example, the original tuple hash has a probability of around 97% of passing the original testsuite. None of the hash functions that I tried (DJB or FNV with input mangling like t ^= t << 7) achieved such a high probability of passing the original test. The *only* variation that I found which passes the original test and my new test (and a third "random" test which I haven't mentioned before) with a high enough probability was FNV with input mangling with a second multiplier: h = 1 for y in INPUT: t = hash(y) t ^= t * SOME_LARGE_EVEN_NUMBER # instead of t ^= t << SHIFT h = (h ^ t) * MULTIPLIER ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 07:02:32 2018 From: report at bugs.python.org (Michael Felt) Date: Tue, 02 Oct 2018 11:02:32 +0000 Subject: [issue34711] return ENOTDIR when open() accepts filenames with a trailing slash In-Reply-To: <1537179798.31.0.956365154283.issue34711@psf.upfronthosting.co.za> Message-ID: <1538478152.71.0.115314831713.issue34711@psf.upfronthosting.co.za> Change by Michael Felt : Added file: https://bugs.python.org/file47840/mime-attachment Added file: https://bugs.python.org/file47841/encrypted.asc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 08:16:22 2018 From: report at bugs.python.org (Danish Prakash) Date: Tue, 02 Oct 2018 12:16:22 +0000 Subject: [issue34812] [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag In-Reply-To: <1537978023.88.0.545547206417.issue34812@psf.upfronthosting.co.za> Message-ID: <1538482582.14.0.545547206417.issue34812@psf.upfronthosting.co.za> Danish Prakash added the comment: > With respect to documentation I was talking about '-I' not being documented in the table at https://docs.python.org/3.7/library/sys.html#sys.flags though it's present in the C code and in sys.flags.isolated. Thanks for bringing this up Karthikeyan, however, could there be another reason why -I would be left out. Also, have you filed an issue for this? Also, Victor and Karthikeyan, since this issue has been categorized as an easy issue, I would like to fix this if none of you have started working on this. ---------- nosy: +danishprakash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 08:25:36 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 02 Oct 2018 12:25:36 +0000 Subject: [issue34812] [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag In-Reply-To: <1537978023.88.0.545547206417.issue34812@psf.upfronthosting.co.za> Message-ID: <1538483136.3.0.545547206417.issue34812@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: > Thanks for bringing this up Karthikeyan, however, could there be another reason why -I would be left out. Also, have you filed an issue for this? I couldn't see any related issue for this though the table was changed in 3.7.0 > Also, Victor and Karthikeyan, since this issue has been categorized as an easy issue, I would like to fix this if none of you have started working on this. I am not working on this. Feel free to pick it up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 08:38:23 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 02 Oct 2018 12:38:23 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538483903.77.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: SeaHash seems to be designed for 64 bits. I'm guessing that replacing the shifts by x ^= ((x >> 16) >> (x >> 29)) would be what you'd do for a 32-bit hash. Alternatively, we could always compute the hash with 64 bits (using uint64_t) and then truncate at the end if needed. However, when testing the hash function for t in INPUT: x ^= hash(t) x *= MULTIPLIER x ^= ((x >> 16) >> (x >> 29)) x *= MULTIPLIER It fails horribly on the original and my new testsuite. I'm guessing that the problem is that the line x ^= ((x >> 16) >> (x >> 29)) ignores low-order bits of x, so it's too close to pure FNV which is known to have problems. When replacing the first line of the loop above by x += hash(t) (DJB-style), it becomes too close to pure DJB and it also fails horribly because of nested tuples. So it doesn't seem that the line x ^= ((x >> 16) >> (x >> 29)) (which is what makes SeaHash special) really helps much to solve the known problems with DJB or FNV. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 08:41:42 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 02 Oct 2018 12:41:42 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538484102.35.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: Correction: the FNV variant of SeaHash only fails the new testsuite, not the old one. The DJB variant of SeaHash fails both. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 08:46:14 2018 From: report at bugs.python.org (Danish Prakash) Date: Tue, 02 Oct 2018 12:46:14 +0000 Subject: [issue34812] [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag In-Reply-To: <1537978023.88.0.545547206417.issue34812@psf.upfronthosting.co.za> Message-ID: <1538484374.81.0.545547206417.issue34812@psf.upfronthosting.co.za> Danish Prakash added the comment: Thank you Karthikeyan, I'm going to take care of both of these issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 09:17:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Oct 2018 13:17:22 +0000 Subject: [issue34711] return ENOTDIR when open() accepts filenames with a trailing slash In-Reply-To: <1537179798.31.0.956365154283.issue34711@psf.upfronthosting.co.za> Message-ID: <1538486242.47.0.545547206417.issue34711@psf.upfronthosting.co.za> STINNER Victor added the comment: > 2018-10-02 11:02:32 Michael.Felt set files: + mime-attachment, encrypted.asc You replied with an encrypted message which isn't understood by the bug tracker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 10:01:12 2018 From: report at bugs.python.org (Jakub Wilk) Date: Tue, 02 Oct 2018 14:01:12 +0000 Subject: [issue34867] Add mode to disable small integer and interned string caches In-Reply-To: <1538440812.47.0.545547206417.issue34867@psf.upfronthosting.co.za> Message-ID: <1538488872.03.0.545547206417.issue34867@psf.upfronthosting.co.za> Change by Jakub Wilk : ---------- nosy: +jwilk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 10:37:42 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Tue, 02 Oct 2018 14:37:42 +0000 Subject: [issue34871] test_site fails if run after test_inspect Message-ID: <1538491062.89.0.545547206417.issue34871@psf.upfronthosting.co.za> New submission from Chih-Hsuan Yen : $ ./python -m test.regrtest test_inspect test_site Run tests sequentially 0:00:00 load avg: 0.03 [1/2] test_inspect 0:00:00 load avg: 0.03 [2/2] test_site test test_site failed -- Traceback (most recent call last): File "/home/yen/Projects/cpython/Lib/test/test_site.py", line 400, in test_abs_paths_cached_None site.abs_paths() File "/home/yen/Projects/cpython/Lib/site.py", line 101, in abs_paths for m in set(sys.modules.values()): TypeError: unhashable type: 'dict' test_site failed If I run test_inspect or test_site individually, both pass. Full log can be found in the attached file. Environment: Arch Linux x86_64 latest. CPython commit 81574b80e92554adf75c13fa42415beb8be383cb, configured with `./configure` ---------- components: Tests files: cpython-failure.txt messages: 326881 nosy: yan12125 priority: normal severity: normal status: open title: test_site fails if run after test_inspect type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file47842/cpython-failure.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 10:39:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Oct 2018 14:39:01 +0000 Subject: [issue34871] test_site fails if run after test_inspect In-Reply-To: <1538491062.89.0.545547206417.issue34871@psf.upfronthosting.co.za> Message-ID: <1538491141.21.0.545547206417.issue34871@psf.upfronthosting.co.za> STINNER Victor added the comment: You can try to limit the number of tests needed to reproduce the bug using: ./python -m test.bisect -n 5 test_inspect test_site ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 10:42:41 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 02 Oct 2018 14:42:41 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538491361.95.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > 100% pure SeaHash does x ^= t at the start first, instead of `t ^ (t << 1)` on the RHS. Indeed. Some initial testing shows that this kind of "input mangling" (applying such a permutation on the inputs) actually plays a much more important role to avoid collisions than the SeaHash operation x ^= ((x >> 16) >> (x >> 29)). So my suggestion remains for y in INPUT: t = hash(y) t ^= t * SOME_LARGE_EVEN_NUMBER h ^= t h *= MULTIPLIER Adding in the additional SeaHash operations x ^= ((x >> 16) >> (x >> 29)) x *= MULTIPLIER does not increase the probability of the tests passing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 10:47:12 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 02 Oct 2018 14:47:12 +0000 Subject: [issue34871] test_site fails if run after test_inspect In-Reply-To: <1538491062.89.0.545547206417.issue34871@psf.upfronthosting.co.za> Message-ID: <1538491632.48.0.545547206417.issue34871@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 10:57:03 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 02 Oct 2018 14:57:03 +0000 Subject: [issue34871] test_site fails if run after test_inspect In-Reply-To: <1538491062.89.0.545547206417.issue34871@psf.upfronthosting.co.za> Message-ID: <1538492223.39.0.545547206417.issue34871@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: The failing test was added with d4c76d960b8b286b75c933780416ace9cda682fd commit d4c76d960b8b286b75c933780416ace9cda682fd Author: INADA Naoki Date: Mon Oct 1 21:10:37 2018 +0900 bpo-30167: Add test for module.__cached__ is None (GH-7617) diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py index dc59e5917c..33a8f1a44c 100644 --- a/Lib/test/test_site.py +++ b/Lib/test/test_site.py @@ -389,6 +389,17 @@ class ImportSideEffectTests(unittest.TestCase): "expected absolute path, got {}" .format(os__cached__.decode('ascii'))) + def test_abs_paths_cached_None(self): + """Test for __cached__ is None. + + Regarding to PEP 3147, __cached__ can be None. + + See also: https://bugs.python.org/issue30167 + """ + sys.modules['test'].__cached__ = None + site.abs_paths() + self.assertIsNone(sys.modules['test'].__cached__) + # Latest master ? cpython git:(master) ./python.exe -m test.regrtest test_inspect test_site Run tests sequentially 0:00:00 load avg: 1.75 [1/2] test_inspect 0:00:02 load avg: 1.75 [2/2] test_site test test_site failed -- Traceback (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_site.py", line 400, in test_abs_paths_cached_None site.abs_paths() File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/site.py", line 101, in abs_paths for m in set(sys.modules.values()): TypeError: unhashable type: 'dict' test_site failed == Tests result: FAILURE == 1 test OK. 1 test failed: test_site Total duration: 2 sec 868 ms Tests result: FAILURE ? cpython git:(master) git checkout d4c76d960b8b286b75c933780416ace9cda682fd~1 Lib/test/test_site.py ? cpython git:(master) ? ./python.exe -m test.regrtest test_inspect test_site Run tests sequentially 0:00:00 load avg: 1.49 [1/2] test_inspect 0:00:02 load avg: 1.49 [2/2] test_site == Tests result: SUCCESS == All 2 tests OK. Total duration: 2 sec 848 ms Tests result: SUCCESS Adding INADA Naoki for thoughts. Thanks ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 12:05:35 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Tue, 02 Oct 2018 16:05:35 +0000 Subject: [issue34871] test_site fails if run after test_inspect In-Reply-To: <1538491062.89.0.545547206417.issue34871@psf.upfronthosting.co.za> Message-ID: <1538496335.19.0.545547206417.issue34871@psf.upfronthosting.co.za> Chih-Hsuan Yen added the comment: Thanks very much for the test.bisect hint! After some more trials, I guess it's an issue in the `inspect` module rather than the newly-added test in test_site. Here's an example script: import inspect import sys import _testcapi builtin = _testcapi.docstring_with_signature_with_defaults spec = inspect.getfullargspec(builtin) print(type(sys.modules['__builtins__'])) After inspect.getfullargspec(), sys.modules['__builtins__'] is a dict. That's a little bit strange as every other item in sys.modules is a module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 12:07:44 2018 From: report at bugs.python.org (Eddie Elizondo) Date: Tue, 02 Oct 2018 16:07:44 +0000 Subject: [issue34784] Heap-allocated StructSequences In-Reply-To: <1537773797.44.0.956365154283.issue34784@psf.upfronthosting.co.za> Message-ID: <1538496464.12.0.545547206417.issue34784@psf.upfronthosting.co.za> Change by Eddie Elizondo : ---------- pull_requests: +9062 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 12:35:30 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Oct 2018 16:35:30 +0000 Subject: [issue34843] logging cookbook docs: remove 'recent' when referring to multiprocessing In-Reply-To: <1538227702.53.0.545547206417.issue34843@psf.upfronthosting.co.za> Message-ID: <1538498130.02.0.545547206417.issue34843@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 13:33:24 2018 From: report at bugs.python.org (Michael Felt) Date: Tue, 02 Oct 2018 17:33:24 +0000 Subject: [issue34711] return ENOTDIR when open() accepts filenames with a trailing slash In-Reply-To: <1538478152.73.0.615280012375.issue34711@psf.upfronthosting.co.za> Message-ID: <7ace4ec7-c0e8-295d-9f92-ec19d345a54d@felt.demon.nl> Michael Felt added the comment: Final attempt to send as plain text On 10/2/2018 1:07 AM, Benjamin Peterson wrote: > On Mon, Oct 1, 2018, at 12:12, Michael Felt wrote: >> Hi all, >> >> Before I submit a patch to increase the default MAXDATA setting for AIX >> when in 32-bit mode - I want to know if I can put this LDFLAG setting in >> LDLAST, or if I should introduce a new AC_SUBST() variable (e.g., >> LDMAXDATA). > I think you should just put it in LDFLAGS. I was wanting to avoid that, as LDFLAGS is an environmental variable. At the surface, it appears Python is using PY_LDFLAGS (with CONFIGURE_LDFLAGS coming from LDFLAGS during the ./configure moment. A reason for a separate variable is that this particular option is only relevant for the python EXE, and not for shared libraries and "other things". IMHO, a reason for LDMAXDATA is because LDLAST is actually already too widely used: root at x066:[/data/prj/python/git/cpython-master]grep LDFLAGS *.in Makefile.pre.in:CONFIGURE_LDFLAGS=????? @LDFLAGS@ Makefile.pre.in:# Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the Makefile.pre.in:# Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to Makefile.pre.in:PY_LDFLAGS=???? $(CONFIGURE_LDFLAGS) $(LDFLAGS) Makefile.pre.in:LDSHARED=?????? @LDSHARED@ $(PY_LDFLAGS) Makefile.pre.in:BLDSHARED=????? @BLDSHARED@ $(PY_LDFLAGS) Makefile.pre.in:OPENSSL_LDFLAGS=@OPENSSL_LDFLAGS@ Makefile.pre.in:??????? $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_GEN_FLAG)" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)" Makefile.pre.in:??????? $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_USE_FLAG)" LDFLAGS="$(LDFLAGS)" Makefile.pre.in:??????? $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) Makefile.pre.in:???????? $(CC) -dynamiclib -Wl,-single_module $(PY_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ Makefile.pre.in:??????? $(CC) -o $(LDLIBRARY) $(PY_LDFLAGS) -dynamiclib \ Makefile.pre.in:??????? $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) Makefile.pre.in:??????? $(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) Makefile.pre.in:??????????????? $(CC) $(OPT) $(PY_LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) The ONLY line that needs $LDMAXDATA is: Makefile.pre.in:??????? $(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) $(LDMAXDATA) or set $(LDLAST) at the end rather than append $(LDMAXDATA) >> I have not looked yet, but I was thinking that MAYBE! LDLAST is intended >> as a last resort variable that can be modified in Makefile. > LDLAST looks vestigial from OSF/1 support and should probably be removed. On 10/2/2018 1:02 PM, Michael Felt wrote: > Change by Michael Felt : > > > Added file: https://bugs.python.org/file47840/mime-attachment > Added file: https://bugs.python.org/file47841/encrypted.asc > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 13:36:12 2018 From: report at bugs.python.org (Michael Felt) Date: Tue, 02 Oct 2018 17:36:12 +0000 Subject: [issue34711] return ENOTDIR when open() accepts filenames with a trailing slash In-Reply-To: <1538469361.99.0.545547206417.issue34711@psf.upfronthosting.co.za> Message-ID: <5dd4323d-8d13-d540-f3d0-fad3c1b20829@felt.demon.nl> Michael Felt added the comment: On 10/2/2018 10:36 AM, STINNER Victor wrote: > STINNER Victor added the comment: > > Jeremy Kloth: "This is also an issue on Windows when the target path resides within a junction, paths outside of a junction respond (err, fail) as expected." > https://developercommunity.visualstudio.com/content/problem/272379/createfile-non-error-on-filename-with-trailing-bac.html > I don't know the behavior on Windows. I tried to create a file name "a\" (U+0061, U+005C): I get an OSError "invalid argument" (error 22). > > I confirm that in a junction point, I am able to: > > * open an existing file with an additional trailing antislash (U+005C): the extra character is simply ignored and I am able to open the file > > * create a new file with an additional trailing antislash (U+005C): the filename is created without the trailing antislash > > On the PR, I wrote: > > >> There are much more functions which "open a file". Open Python/fileutils.c for a few mores. What about os.open()? What about all other functions which accept a filename and then call a third party library which calls open() directly? > Ok, let me give some examples of function which directly open a file: > > * fileutils.c: _Py_open(), _Py_open_noraise(), _Py_wfopen(), _Py_fopen(), _Py_fopen_obj() > * os.open() > * _io.FileIO, _pyio.FileIO (use os.open()) > > Ok... But there are other functions to access files... stat()/fstat() functions: > > * fileutils.c: _Py_fstat_noraise(), _Py_fstat(), _Py_stat() > * Modules/getpath.c: _Py_wstat() > * os.stat(), os.lstat(), os.fstat() > > To start to have a better ideas of how many functions accept filenames, open also Lib/shutil.py. shutil.copyfile() uses os.stat(), but then it uses os.symlink() and open()... So what about os.symlink()? > > Ok, here I only listen a *few* examples of functions which are "controlled" by Python. But there are *many* wrappers to 3rd party libraries which accept a filename. Examples: > > * _ssl.SSLContext.load_cert_chain() > * sqlite3.connect() > * etc. > > Where is the limit? How many functions must be patched in Python? How do we patch OpenSSL and SQLite libraries? > > Python is designed as a thin wrapper to the operating system. IMHO Python must not validate the filename itself. > > -- > >> Going back to issue17234 - there has been a test to check that a URL with a trailing slash reports 404 status. > IMHO you must fix a single place: the SimpleHTTPServer, not all code handling the filesytem. What I did not know: do you want the test to be okay as is, or set SkipIf(condition) for operating systems that accept filename/ as a filename when it is not directory. IMHO: the "statement" of the test is that the name "test/" MUST be rejected in all cases. ??????? # check for trailing "/" which should return 404. See Issue17324 ??????? response = self.request(self.base_url + '/test/') ??????? self.check_status_and_reason(response, HTTPStatus.NOT_FOUND) Title : SimpleHTTPServer serves files even if the URL has a trailing slash I can assume the test was adjusted to catch the 404 return code, and let that pass on OS that will not open .../test.txt and .../text.txt/ as the same object - while AIX (and windows does). As to your comment about "other" things that can happen - the message in the test implies that Python only wants "filenames" that are opened without a slash. I guess there is not a PEP on this, so anyones guess is likely to be wrong for someone. In short, this PR took the road where Python says .../filename/ is wrong - per the comment in the test. So, what should be done: code in HTTPServer that checks for trailing slash and the test can be left ASIS, or modify the test to skip this one aspect on an OS that is known to accept ".../filename/" as a valid filename? I am not "core" enough to make this choice. I can attempt to code any decision made by "python-dev" aka core-devs. > Same remark for AIX and Windows junctions. > > I suggest to reject this issue. per above, I would rather not reject the issue - I would still like to see the test fixed. But need help on what should actually be modified. Test, Module, or internals. > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 13:37:22 2018 From: report at bugs.python.org (Michael Felt) Date: Tue, 02 Oct 2018 17:37:22 +0000 Subject: [issue34711] return ENOTDIR when open() accepts filenames with a trailing slash In-Reply-To: <1538486242.47.0.545547206417.issue34711@psf.upfronthosting.co.za> Message-ID: <8a225f20-5031-2587-f50c-72d1c2325414@felt.demon.nl> Michael Felt added the comment: Was not my intent. Firewall issues. After 4 more attempts gave up until now. On 10/2/2018 3:17 PM, STINNER Victor wrote: > STINNER Victor added the comment: > >> 2018-10-02 11:02:32 Michael.Felt set files: + mime-attachment, encrypted.asc > You replied with an encrypted message which isn't understood by the bug tracker. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 13:39:43 2018 From: report at bugs.python.org (Michael Felt) Date: Tue, 02 Oct 2018 17:39:43 +0000 Subject: [issue34711] return ENOTDIR when open() accepts filenames with a trailing slash In-Reply-To: <5dd4323d-8d13-d540-f3d0-fad3c1b20829@felt.demon.nl> Message-ID: <43f161b0-9d03-ee15-7806-0407bf418184@felt.demon.nl> Michael Felt added the comment: On 10/2/2018 7:36 PM, Michael Felt wrote: > Python is designed as a thin wrapper to the operating system. IMHO Python must not validate the filename itself. To shorten the discussion, I'll kill the current PR and just modify the test to skip the trailing slash test. Assumption: if Python is not validating filenames, then a Module should also not validate a filename. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 13:44:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Oct 2018 17:44:27 +0000 Subject: [issue34871] test_site fails if run after test_inspect In-Reply-To: <1538491062.89.0.545547206417.issue34871@psf.upfronthosting.co.za> Message-ID: <1538502267.34.0.545547206417.issue34871@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 13:53:11 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 02 Oct 2018 17:53:11 +0000 Subject: [issue34728] deprecate *loop* argument for asyncio.sleep In-Reply-To: <1537307045.18.0.956365154283.issue34728@psf.upfronthosting.co.za> Message-ID: <1538502791.98.0.545547206417.issue34728@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 9012a0fb4c4ec1afef9efb9fdb0964554ea17983 by Yury Selivanov in branch 'master': bpo-34728: Fix asyncio tests to run under "-Werror" (GH-9661) https://github.com/python/cpython/commit/9012a0fb4c4ec1afef9efb9fdb0964554ea17983 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 13:59:06 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 02 Oct 2018 17:59:06 +0000 Subject: [issue34728] deprecate *loop* argument for asyncio.sleep In-Reply-To: <1537307045.18.0.956365154283.issue34728@psf.upfronthosting.co.za> Message-ID: <1538503146.6.0.545547206417.issue34728@psf.upfronthosting.co.za> Yury Selivanov added the comment: [victor] > Why does it not make sense to pass the loop to sleep? "it makes no sense anymore" something changes? [andrew] `loop` argument passed to sleep should be always the same as returned from `get_running_loop()`. What Andrew said. Basically, it wasn't *ever* possible to pass a loop to sleep() that would be different from the loop that would run it, because sleep() is a *coroutine*. In asyncio some APIs are functions and some are coroutines. * asyncio.gather(), for example, is a function. You can call it from top-level code (and pass an event loop to it) or from a coroutine. * asyncio.sleep(), wait(), and wait_for() are *coroutines*; they can only be called from other coroutines or if you wrap them into a Task; in all cases, *loop* is always 100% defined for them. Passing the loop isn't even a viable micro-optimization, it's just pointless. This extra argument just adds to the confusion and promotes bad patterns, so we want to eventually remove it. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 14:20:45 2018 From: report at bugs.python.org (Michael Felt) Date: Tue, 02 Oct 2018 18:20:45 +0000 Subject: [issue34711] return ENOTDIR when open() accepts filenames with a trailing slash In-Reply-To: <1537179798.31.0.956365154283.issue34711@psf.upfronthosting.co.za> Message-ID: <1538504445.85.0.545547206417.issue34711@psf.upfronthosting.co.za> Change by Michael Felt : ---------- pull_requests: +9063 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 14:32:29 2018 From: report at bugs.python.org (Tim Peters) Date: Tue, 02 Oct 2018 18:32:29 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538505149.24.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: A meta-comment: a great deal of work has been done on non-crypto hashes in recent years. I'm not interested in rolling our own if one of the "winners" from that process can be adapted. For that reason, I've only been looking at those that scored 10 (best possible) on Appleby's SMHasher[1] test suite, which is used by everyone who does recognized work in this field. SeaHash appears to be the fastest of those, with short & simple code. I'm concerned that I've been putting way too much weight on "the new" tuple test. That uses a grand total of 10 tiny integers in -5 .. 5 (omits -1). _All_ base-component variation is in the last 3 bits, while the top 61 bits are all 0 or all 1. Great for testing nested tuples with tiny mixed-sign integers, but that's a minuscule region of the problem space. [1] https://github.com/aappleby/smhasher ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 14:52:29 2018 From: report at bugs.python.org (Tim Peters) Date: Tue, 02 Oct 2018 18:52:29 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538506349.32.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: >> the author wants this transformation to be easily >> invertible, so a prime is necessary > A multiplication by any odd number modulo 2**64 is > invertible. Right! My mistake. > As I argued before, the concept of primes is > meaningless (except for the prime 2) when computing > modulo 2**64. I don't know why they're using a prime. But that doesn't mean they don't have "a reason". You seem quick to dismiss things if they don't make instant sense to you at first glance. I've noted before, e.g., that sticking to a prime eliminates a world of regular bit patterns in the multiplier. The original SeaHash used a different prime, and a fixed right shift of 32 (but twice in different places). Switching to the current prime, and the variable shift, can be traced back to this long comment on Reddit: https://www.reddit.com/r/rust/comments/5fdf8z/seahash_a_blazingly_fast_portable_hash_function/dakdii1/ The prime isn't "random": it was constructed so that flipping a low-order bit to 1 would directly affect at least one of the topmost 4 bits, which in turn are used to select the shift count. While that doesn't seem to matter for our tiny test suite, as the message shows it made huge improvements in other regions of the input space. I haven't reported this, but doing "x ^= x >> 32" instead worked fine for our test suite too. Well, big deal - we're testing almost nothing beyond two kinds of "oops!" cases (nested tuples, and mixed-sign tiny ints). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 15:15:02 2018 From: report at bugs.python.org (Tim Peters) Date: Tue, 02 Oct 2018 19:15:02 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538507702.09.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: > So my suggestion remains > > for y in INPUT: > t = hash(y) > t ^= t * SOME_LARGE_EVEN_NUMBER > h ^= t > h *= MULTIPLIER On the face of it, I'd be amazed if that passed SMHasher, because it only propagates bits "to the left". All hashes that score well on that test work to propagate "to the right" too. SeaHash does that with its variable-count right-shift-xor. Another popular choice in other hashes is a rotate. As noted several times before, our tuple tests only use small integers, where there's virtually no variation in the high-order hash bits beyond "all 0" or "all 1". Since all the variation is in a handful of low-order bits, "propagate right" _appears_ to be a waste of time. If we, e.g., tested tuples of little floats instead, we may have "concluded" that it's "propagate left" that's a waste of time: >>> for i in range(5): ... x = 1 / 2**i ... print(x, hex(hash(x) ... 1.0 0x1 0.5 0x1000000000000000 0.25 0x800000000000000 0.125 0x400000000000000 0.0625 0x200000000000000 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 15:26:28 2018 From: report at bugs.python.org (Paul Goins (work)) Date: Tue, 02 Oct 2018 19:26:28 +0000 Subject: [issue20504] cgi.FieldStorage, multipart, missing Content-Length In-Reply-To: <1391463199.17.0.394387661768.issue20504@psf.upfronthosting.co.za> Message-ID: <1538508388.1.0.545547206417.issue20504@psf.upfronthosting.co.za> Paul Goins (work) added the comment: I'm just going to ping on this issue. It looks like this has just slipped off the radar. I've seen the last diff and the code review, but it seems that this just needs some final follow-up on the code review comments, no? I could easily do the final cleanup myself, but would prefer to let someone already on this thread take it across the finish line since I didn't do any of the real work for this patch. If really necessary, I may be able to clean this up if no one else can spare the time. ---------- nosy: +pdgoins-work _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 15:30:38 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 02 Oct 2018 19:30:38 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c Message-ID: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> New submission from Yury Selivanov : Vladimir Matveev has discovered that C and Python implementation of asyncio.Task diverge: * asynciomodule.c: https://github.com/python/cpython/blob/9012a0fb4c4ec1afef9efb9fdb0964554ea17983/Modules/_asynciomodule.c#L2716 * tasks.py: https://github.com/python/cpython/blob/9012a0fb4c4ec1afef9efb9fdb0964554ea17983/Lib/asyncio/tasks.py#L286 In tasks.py we call "fut_obj.cancel()", so either "Task.cancel()" or "Future.cancel()" can be called depending on what "fut_obj" is. In asynciomodule.c we essentially always call "Future.cancel(fut_obj)". This probably leads to unexpected behaviour if "fut_obj" is either a Task or a Task subclass with an overloaded "cancel()" method. We need to first write a set of tests to understand the scope of this; then we'll need to patch asynciomodule.c and backport this to 3.7 & 3.6. ---------- components: asyncio messages: 326896 nosy: Elvis.Pranskevichus, asvetlov, yselivanov priority: normal severity: normal status: open title: investigate task/future cancellation in asynciomodule.c versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 15:30:48 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 02 Oct 2018 19:30:48 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538508648.59.0.545547206417.issue34872@psf.upfronthosting.co.za> Yury Selivanov added the comment: Elvis, please take a look at this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 15:37:22 2018 From: report at bugs.python.org (Tim Peters) Date: Tue, 02 Oct 2018 19:37:22 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538509042.72.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: > If we, e.g., tested tuples of little floats instead ... Speaking of which: >>> from itertools import product >>> len(set(map(hash, product([0.5, 0.25], repeat=20)))) 32 32 hash codes out of 1048576 distinct two-tuples isn't exactly confidence-inspiring either ;-) No scheme that only "propagates to the left" is going to help that much, because the variation in those hashes is all in the high-order bits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 16:09:28 2018 From: report at bugs.python.org (Michael Felt) Date: Tue, 02 Oct 2018 20:09:28 +0000 Subject: [issue34711] Fix test_httpservers on AIX (trailingSlashOK) In-Reply-To: <1537179798.31.0.956365154283.issue34711@psf.upfronthosting.co.za> Message-ID: <1538510968.06.0.545547206417.issue34711@psf.upfronthosting.co.za> Michael Felt added the comment: Changed the title to reflect the requested change is only in Tests. ---------- components: -IO title: return ENOTDIR when open() accepts filenames with a trailing slash -> Fix test_httpservers on AIX (trailingSlashOK) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 16:15:12 2018 From: report at bugs.python.org (Vladimir Matveev) Date: Tue, 02 Oct 2018 20:15:12 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538511312.65.0.545547206417.issue34872@psf.upfronthosting.co.za> Change by Vladimir Matveev : ---------- nosy: +v2m _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 16:18:20 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Tue, 02 Oct 2018 20:18:20 +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: <1538511500.49.0.545547206417.issue34313@psf.upfronthosting.co.za> Vlad Tudorache added the comment: @terry.reedy Maybe "users are urged to install the most recent bug-fix releases" is a little bit misleading. As I wrote, Tcl/Tk 8.5.18 does not give crashes on macOS, when both 8.5.17 and 8.5.19 (bug-fix) do. Some times ago, if I remember well, the same thing happened 'round 8.6.3 something (there was a "bug-fix" release worse than the previous one). Should python.org installers provide only tested self-contained Tcl/Tk builds? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 16:35:56 2018 From: report at bugs.python.org (Eryk Sun) Date: Tue, 02 Oct 2018 20:35:56 +0000 Subject: [issue34711] Fix test_httpservers on AIX (trailingSlashOK) In-Reply-To: <1537179798.31.0.956365154283.issue34711@psf.upfronthosting.co.za> Message-ID: <1538512556.29.0.545547206417.issue34711@psf.upfronthosting.co.za> Eryk Sun added the comment: > I confirm that in a junction point This path-parsing bug that strips a trailing slash occurs when a traversed directory is a reparse point, such as a mount-point (junction) or directory symbolic link. It may be limited to just the NTFS and ReFS file-system drivers, which is all I tested. Or it may be a bug in the I/O manager itself, which actually implements the name grafting for Microsoft's mount-point (0xA0000003) and symlink (0xA000000C) reparse tags. I thought the suggested patch was ok because it followed the pattern of existing code that prevents opening directories on Unix. But I can see the distinction in that the latter is implementing behavior policy rather than working around a platform bug. Also, while _Py_open and _Py_fopen do allow opening a directory on a Linux box, in apparent violation of this policy, these are private, internal functions, and there's no use that I'm aware of in the CPython implementation for directory FDs or FILE streams opened this way. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 16:48:32 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Oct 2018 20:48:32 +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: <1538513312.17.0.545547206417.issue34313@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Current Mac installers do contain hopefully tested tcl/tk installers. (This has always been true for the Windows installers.) We are not responsible if users use anything else with Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 16:57:24 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 02 Oct 2018 20:57:24 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538513844.81.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > I've noted before, e.g., that sticking to a prime eliminates a world of regular bit patterns in the multiplier. Why do you think this? 0x1fffffffffffffff is prime :-) Having regular bit patterns and being prime are independent properties. To be clear: I don't have anything against picking a prime but we just shouldn't pretend that primes are important when they are not. That's all... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:01:29 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Oct 2018 21:01: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: <1538514088.99.0.545547206417.issue34172@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 97bfe8d3ebb0a54c8798f57555cb4152f9b2e1d0 by Antoine Pitrou (tzickel) in branch 'master': bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-8450) https://github.com/python/cpython/commit/97bfe8d3ebb0a54c8798f57555cb4152f9b2e1d0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:01:46 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 02 Oct 2018 21:01:46 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538514106.7.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > For that reason, I've only been looking at those that scored 10 (best possible) on Appleby's SMHasher[1] test suite, which is used by everyone who does recognized work in this field. So it seems that this SMHasher test suite doesn't catch the problem that we're seeing with negative integers. > I'm concerned that I've been putting way too much weight on "the new" tuple test. [...] that's a minuscule region of the problem space. I'll admit that it's a miniscule region of the problem space. However, we ideally want a hash that works well for all kinds of inputs. If the hash function is good, it shouldn't be possible to write a hash collision test function which has a significantly higher chance of failing than random chance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:01:48 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Oct 2018 21:01:48 +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: <1538514108.32.0.545547206417.issue34172@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9064 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:01:58 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Oct 2018 21:01: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: <1538514118.24.0.545547206417.issue34172@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9065 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:05:11 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 02 Oct 2018 21:05:11 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538514311.8.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: >>> from itertools import product >>> len(set(map(hash, product([0.5, 0.25], repeat=20)))) 32 Good catch! Would you like me to add this to the testsuite? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:09:17 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 02 Oct 2018 21:09:17 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538514557.87.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > For that reason, I've only been looking at those that scored 10 (best possible) on Appleby's SMHasher[1] test suite Do you have a list of such hash functions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:12:25 2018 From: report at bugs.python.org (Tim Peters) Date: Tue, 02 Oct 2018 21:12:25 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538514745.12.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: >> I've noted before, e.g., that sticking to a prime >> eliminates a world of regular bit patterns in the >> multiplier. > Why do you think this? 0x1fffffffffffffff is prime :-) Point taken ;-) But "a world of" is not the same as "the universe". For example, sticking to a prime you'll never get 8 bytes the same. Etc - "a world of" extremely regular patterns are eliminated. > Having regular bit patterns and being prime are independent > properties. > > To be clear: I don't have anything against picking a prime > but we just shouldn't pretend that primes are important > when they are not. That's all... I don't like arguments from ignorance. As I've said, I don't know why SeaHash uses a prime. Neither do you. Our collective ignorance doesn't imply the designer didn't have a good reason. I can't think of a "good reason" for it either, but that's where we differ: I think "so don't make gratuitous changes" while you think "therefore it can't possibly matter" ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:17:09 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Oct 2018 21:17:09 +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: <1538515029.65.0.545547206417.issue34172@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 97f998a4dfd6db6d867f446daa62445d0782bf39 by Antoine Pitrou (Miss Islington (bot)) in branch '3.7': bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-8450) (GH-9676) https://github.com/python/cpython/commit/97f998a4dfd6db6d867f446daa62445d0782bf39 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:21:45 2018 From: report at bugs.python.org (Tim Peters) Date: Tue, 02 Oct 2018 21:21:45 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538515305.13.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: >> For that reason, I've only been looking at those that >> scored 10 (best possible) on Appleby's SMHasher[1] test suite > Do you have a list of such hash functions? A world of searching. The ones rated "Excellent" here (previously cited) for a start: https://docs.rs/seahash/3.0.5/seahash/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:29:14 2018 From: report at bugs.python.org (Tom Dawes) Date: Tue, 02 Oct 2018 21:29:14 +0000 Subject: [issue34873] re.finditer behaviour in re.MULTILINE mode fails to match first 7 characters Message-ID: <1538515754.54.0.545547206417.issue34873@psf.upfronthosting.co.za> New submission from Tom Dawes : re.finditer appears to fail to match within the first 7 characters in a string when re.MULTILINE is used: >>> REGEX = re.compile("y") >>> [list(m.start() for m in REGEX.finditer("{}y".format("x"*i), re.MULTILINE)) for i in range(10)] [[], [], [], [], [], [], [], [], [8], [9]] Without re.MULTILINE, this works fine: >>> [list(m.start() for m in REGEX.finditer("{}y".format("x"*i))) for i in range(10)] [[0], [1], [2], [3], [4], [5], [6], [7], [8], [9]] Passing re.MULTILINE to re.compile doesn't seem to have any effect. ---------- components: Regular Expressions messages: 326911 nosy: ezio.melotti, mrabarnett, tdawes priority: normal severity: normal status: open title: re.finditer behaviour in re.MULTILINE mode fails to match first 7 characters type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:32:07 2018 From: report at bugs.python.org (Tom Dawes) Date: Tue, 02 Oct 2018 21:32:07 +0000 Subject: [issue34873] re.finditer behaviour in re.MULTILINE mode fails to match first 7 characters In-Reply-To: <1538515754.54.0.545547206417.issue34873@psf.upfronthosting.co.za> Message-ID: <1538515927.64.0.545547206417.issue34873@psf.upfronthosting.co.za> Tom Dawes added the comment: Please ignore, re.finditer and REGEX.finditer aren't the same. I was passing re.MULTILINE (= 8) to endPos. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:36:21 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Oct 2018 21:36:21 +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: <1538516181.32.0.545547206417.issue34172@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 07b96a95db78eff3557d1bfed1df9ebecc40815b by Antoine Pitrou (Miss Islington (bot)) in branch '3.6': bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-8450) (GH-9677) https://github.com/python/cpython/commit/07b96a95db78eff3557d1bfed1df9ebecc40815b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:37:42 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Oct 2018 21:37: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: <1538516262.32.0.545547206417.issue34172@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks tzickler for the report and pull request, and sorry for the delay. This is now fixed in all 3.x branches. I will close this now as multiprocessing in 2.7 diverges quite a bit from 3.x. If you want to fix the issue in 2.7 as well, please say so and I'll reopen. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:38:11 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Oct 2018 21:38:11 +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: <1538516291.1.0.545547206417.issue34172@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (tzickel, sorry for mistyping your handle :-/) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:38:40 2018 From: report at bugs.python.org (Tim McDonough) Date: Tue, 02 Oct 2018 21:38:40 +0000 Subject: [issue34874] Python 3.6.3 command script wrapped in single quotes produces NameError: name 'A' is not defined Message-ID: <1538516320.45.0.545547206417.issue34874@psf.upfronthosting.co.za> New submission from Tim McDonough : I found an odd behavior that seems to be limited to Python 3.6.3. Python 3.6.3 command scripts seem to prefer wrapping in double quotes instead of single quotes. Here is an example of the error. $ echo -n '{"A":"a"}' | python3 -c 'import sys,json; j=json.load(sys.stdin); print(j["A"])' Traceback (most recent call last): File "", line 1, in NameError: name 'A' is not defined # Swapping single and double quotes works as expected. # $ echo -n '{"A":"a"}' | python3 -c "import sys,json; j=json.load(sys.stdin); print(j['A'])" a # Executing the original, failing script against python 2.6.6 works. # $ echo -n '{"A":"a"}' | python2 -c 'import sys,json; j=json.load(sys.stdin); print(j["A"])' a The failing environment is: $ bash --version GNU bash, version 4.1.2(2)-release (x86_64-redhat-linux-gnu) $ gcc --version gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23) These python versions also seem to work fine: 2.6.6, 2.7.9, 3.5.1, and 3.5.2. Assigning the script to an environment variable follows the single/double quote issue. For example, this fails: $ export python_script='import sys,json; j=json.load(sys.stdin); print(j["A"])' $ echo -n '{"A": "a"}' | python3 -c "${python_script}" This would be a good unit test candidate if not already present. ---------- components: Tests messages: 326916 nosy: Tim McDonough priority: normal severity: normal status: open title: Python 3.6.3 command script wrapped in single quotes produces NameError: name 'A' is not defined type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:41:39 2018 From: report at bugs.python.org (Tim Peters) Date: Tue, 02 Oct 2018 21:41:39 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538516499.17.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: > >>> from itertools import product > >>> len(set(map(hash, product([0.5, 0.25], repeat=20)))) > 32 > Good catch! Would you like me to add this to the testsuite? It's in mine already ;-) I've added all the "bad examples" in all the messages here. Sooner or later they'll get folded into Python's test suite. BTW, there were no collisions in that under whatever 64-bit Python I last compiled. That was a SeaHash variant. I'm not certain, but I believe it had "t ^= t << 1" at the start and with the first multiply commented out. Having learning _something_ about why SeaHash does what it does, I'm not convinced the first multiply is of much value. As a standalone bit-scrambler for a single 64-bit input, it does matter. But in the tuple hash context, we're running it in a loop. Strictly alternating "propagate left" and "propagate right" seems to me almost as good - although that's just intuition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 17:57:13 2018 From: report at bugs.python.org (Tim Peters) Date: Tue, 02 Oct 2018 21:57:13 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538517433.41.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: > So it seems that this SMHasher test suite doesn't > catch the problem that we're seeing with negative integers. Seems to be so, but I've never run SMHasher myself. I believe it's focused on statistical properties, like avalanche and bit independence. > However, we ideally want a hash that works well for > all kinds of inputs. If the hash function is good, > it shouldn't be possible to write a hash collision > test function which has a significantly higher chance > of failing than random chance. I know of no such hash functions short of crypto-strength ones. Nobody uses those for hash tables, though, because they're much slower and usually much more involved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 18:06:48 2018 From: report at bugs.python.org (Martin Panter) Date: Tue, 02 Oct 2018 22:06:48 +0000 Subject: [issue34711] Fix test_httpservers on AIX (trailingSlashOK) In-Reply-To: <1537179798.31.0.956365154283.issue34711@psf.upfronthosting.co.za> Message-ID: <1538518008.97.0.545547206417.issue34711@psf.upfronthosting.co.za> Martin Panter added the comment: Hi Michael, I agree with Victor that the best place to fix the problem is in the HTTP server module. In other words, the ?medium fix? you mentioned in your original post. Your recent proposal to just skip the test means that AIX will continue to suffer from the original bug. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 18:28:39 2018 From: report at bugs.python.org (Myles Borins) Date: Tue, 02 Oct 2018 22:28:39 +0000 Subject: [issue34875] Change .js mime to "test/javascript" Message-ID: <1538519319.52.0.545547206417.issue34875@psf.upfronthosting.co.za> New submission from Myles Borins : I propose to change the mapping of file extension .js to mime type "text/javascript" from "application/javascript. "text/javascript" is the currently documented best practice in the whatwg HTML spec. https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages:javascript-mime-type ---------- components: Library (Lib) messages: 326920 nosy: mylesborins priority: normal severity: normal status: open title: Change .js mime to "test/javascript" versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 18:39:23 2018 From: report at bugs.python.org (Myles Borins) Date: Tue, 02 Oct 2018 22:39:23 +0000 Subject: [issue34875] Change .js mime to "test/javascript" In-Reply-To: <1538519319.52.0.545547206417.issue34875@psf.upfronthosting.co.za> Message-ID: <1538519963.34.0.545547206417.issue34875@psf.upfronthosting.co.za> Change by Myles Borins : ---------- keywords: +patch pull_requests: +9066 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 19:06:44 2018 From: report at bugs.python.org (Ned Batchelder) Date: Tue, 02 Oct 2018 23:06:44 +0000 Subject: [issue34876] Python3.8 changes how decorators are traced Message-ID: <1538521604.52.0.545547206417.issue34876@psf.upfronthosting.co.za> New submission from Ned Batchelder : When decorating a function, the sequence of lines reported to the trace function is different in Python3.8 than with previous versions $ cat -n decorator.py 1 def decorator(f): 2 return f 3 4 def f(): 5 @decorator 6 @decorator 7 @decorator 8 def func(): 9 pass 10 11 import sys 12 def trace(frame, event, args): 13 print(frame.f_lineno, event) 14 return trace 15 16 sys.settrace(trace) 17 f() $ python3.7 decorator.py 4 call 5 line 6 line 7 line 1 call 2 line 2 return 1 call 2 line 2 return 1 call 2 line 2 return 7 return $ python3.8 decorator.py 4 call 5 line 6 line 7 line 5 line 1 call 2 line 2 return 1 call 2 line 2 return 1 call 2 line 2 return 5 return Is this intentional? Will it be changed back before 3.8 ships? People are testing their projects against 3.8-dev, and reporting problems with coverage. The problems are due to these sorts of changes. ---------- components: Interpreter Core messages: 326921 nosy: nedbat priority: normal severity: normal status: open title: Python3.8 changes how decorators are traced versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 19:16:54 2018 From: report at bugs.python.org (Tom Ashley) Date: Tue, 02 Oct 2018 23:16:54 +0000 Subject: [issue34877] Inconsistent Behavior Of futures.ProcessPoolExecutor Message-ID: <1538522214.4.0.545547206417.issue34877@psf.upfronthosting.co.za> New submission from Tom Ashley : Not sure if this goes in core or modules. There is an inconsistency in the output of the attached script. From the docs I read it's supposed to have the behavior of: "If something happens to one of the worker processes to cause it to exit unexpectedly, the ProcessPoolExecutor is considered ?broken? and will no longer schedule tasks." That script is supposed to exemplify that. Instead, if I run the code several times, I get the following output: (bot-LP2ewIkY) ?> ~/w/p/b/bot on master ? python brokenPool.py 18:54:55 getting the pid for one worker killing process 4373 submitting another task could not start new tasks: A process in the process pool was terminated abruptly while the future was running or pending. (bot-LP2ewIkY) ?> ~/w/p/b/bot on master ? python brokenPool.py 18:54:56 getting the pid for one worker killing process 4443 submitting another task could not start new tasks: A process in the process pool was terminated abruptly while the future was running or pending. (bot-LP2ewIkY) ?> ~/w/p/b/bot on master ? python brokenPool.py 18:54:57 getting the pid for one worker killing process 4514 submitting another task <----- (No exception thrown after this) The exception isn't always thrown. This seems problematic to me. Related stack post: https://stackoverflow.com/questions/52617558/python-inconsistent-behavior-of-futures-processpoolexecutor ---------- components: Interpreter Core files: brokenPool.py messages: 326922 nosy: TensorTom priority: normal severity: normal status: open title: Inconsistent Behavior Of futures.ProcessPoolExecutor versions: Python 3.7 Added file: https://bugs.python.org/file47843/brokenPool.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 19:21:54 2018 From: report at bugs.python.org (Ammar Askar) Date: Tue, 02 Oct 2018 23:21:54 +0000 Subject: [issue34875] Change .js mime to "test/javascript" In-Reply-To: <1538519319.52.0.545547206417.issue34875@psf.upfronthosting.co.za> Message-ID: <1538522514.38.0.545547206417.issue34875@psf.upfronthosting.co.za> Ammar Askar added the comment: It should be noted that the HTML spec also says: The term "JavaScript" is used to refer to ECMA-262, rather than the official term ECMAScript, since the term JavaScript is more widely known. Similarly, the MIME type used to refer to JavaScript in this specification is text/javascript, since that is the most commonly used type, despite it being an officially obsoleted type according to RFC 4329. https://html.spec.whatwg.org/#dependencies:willful-violation ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 19:30:14 2018 From: report at bugs.python.org (Ammar Askar) Date: Tue, 02 Oct 2018 23:30:14 +0000 Subject: [issue34876] Python3.8 changes how decorators are traced In-Reply-To: <1538521604.52.0.545547206417.issue34876@psf.upfronthosting.co.za> Message-ID: <1538523014.77.0.545547206417.issue34876@psf.upfronthosting.co.za> Ammar Askar added the comment: It looks like this is caused by https://github.com/python/cpython/commit/da8d72c953369b872a12c13f136ada77a786714a Adding Serhiy to the nosy list. ---------- nosy: +ammar2, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 19:37:31 2018 From: report at bugs.python.org (Elvis Pranskevichus) Date: Tue, 02 Oct 2018 23:37:31 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538523451.46.0.545547206417.issue34872@psf.upfronthosting.co.za> Change by Elvis Pranskevichus : ---------- keywords: +patch pull_requests: +9068 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 19:40:20 2018 From: report at bugs.python.org (Ned Batchelder) Date: Tue, 02 Oct 2018 23:40:20 +0000 Subject: [issue12458] Tracebacks should contain the first line of continuation lines In-Reply-To: <1309499207.17.0.676241559437.issue12458@psf.upfronthosting.co.za> Message-ID: <1538523620.01.0.545547206417.issue12458@psf.upfronthosting.co.za> Ned Batchelder added the comment: The other drawback is changing how the trace function is notified in a few scenarios. ---------- nosy: +nedbat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 19:41:46 2018 From: report at bugs.python.org (ulrich.stern) Date: Tue, 02 Oct 2018 23:41:46 +0000 Subject: [issue34878] Lock Objects documentation bug Message-ID: <1538523706.16.0.545547206417.issue34878@psf.upfronthosting.co.za> New submission from ulrich.stern : The first sentence of the documentation for Lock Objects (https://docs.python.org/2/library/threading.html#lock-objects) seems incorrect. It currently states "A primitive lock is a synchronization primitive that is not owned by a particular thread when locked." The "not" should be deleted. (Alternatively, one could change "locked" to "unlocked.") ---------- assignee: docs at python components: Documentation messages: 326926 nosy: docs at python, ulrich.stern priority: normal severity: normal status: open title: Lock Objects documentation bug 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 Oct 2 19:50:19 2018 From: report at bugs.python.org (Tim Peters) Date: Tue, 02 Oct 2018 23:50:19 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538524219.57.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: FYI, this appears to be a good overview of what SMHasher is looking for: https://github.com/aappleby/smhasher/wiki/SMHasher Someg of everything: performance, correctness, statistical measures, and specific kinds of keysets that have proved problematic for other non-crypto hash functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 20:15:28 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 03 Oct 2018 00:15:28 +0000 Subject: [issue34877] Inconsistent Behavior Of futures.ProcessPoolExecutor In-Reply-To: <1538522214.4.0.545547206417.issue34877@psf.upfronthosting.co.za> Message-ID: <1538525728.62.0.545547206417.issue34877@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 20:20:03 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 03 Oct 2018 00:20:03 +0000 Subject: [issue34874] Python 3.6.3 command script wrapped in single quotes produces NameError: name 'A' is not defined In-Reply-To: <1538516320.45.0.545547206417.issue34874@psf.upfronthosting.co.za> Message-ID: <1538526003.92.0.545547206417.issue34874@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 20:31:48 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 03 Oct 2018 00:31:48 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538526708.22.0.545547206417.issue34872@psf.upfronthosting.co.za> Yury Selivanov added the comment: Ned, will we have 3.7.1rc2? If so, would it be possible to include the fix for this one? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 21:15:05 2018 From: report at bugs.python.org (Tim Peters) Date: Wed, 03 Oct 2018 01:15:05 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538529305.32.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: > SeaHash seems to be designed for 64 bits. Absolutely. > I'm guessing that replacing the shifts by > > x ^= ((x >> 16) >> (x >> 29)) > > would be what you'd do for a 32-bit hash. My guess too. But "the prime" is a puzzle. As noted before, the 64-bit prime is specially constructed to satisfy specific dispersion properties. While I haven't triple-checked this, I believe it fails at two specific bit positions: - Bit 2**16 doesn't propagate into the leading 4 bits at all. - Bit 2**17 does propagate into bit 2**60, but _only_ into that bit among the highest 4 bits. One of the criteria is that the prime shouldn't propagate a lower-order bit into _only_ the least-significant of the 4 leading bits. Repairing that would probably require adding a bit or two. But the prime already has 35 bits set. The greater the imbalance between 0 and 1 bits, the more multiply acts like a simpler sequence of shift-and-adds or shift-and-subtracts (for example, at an extreme, consider the multiplier (1 << 63) - 1). Anyway, it seems the density of 1 bits would have to be even higher for a 32-bit multiplier to ensure all low-order bits directly propagated to at least one of the topmost 3 bits, but not to the third-most significant alone. Or I could search for a 31-bit prime - or just an odd integer - that got as close as possible with 16 or 17 bits set. Or ... > Alternatively, we could always compute the hash with > 64 bits (using uint64_t) and then truncate at the end > if needed. Provided we continue to like it at all ;-) In which case I'd probably end it with 32_bit_result = (32_bit_result_type)(x ^ (x >> 32)); instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 22:38:13 2018 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 03 Oct 2018 02:38:13 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1538534293.39.0.545547206417.issue2771@psf.upfronthosting.co.za> Ezio Melotti added the comment: another test ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 2 22:53:20 2018 From: report at bugs.python.org (Sangbae Nam) Date: Wed, 03 Oct 2018 02:53:20 +0000 Subject: [issue32174] nonASCII punctuation characters can not display in python363.chm. In-Reply-To: <1512013530.29.0.213398074469.issue32174@psf.upfronthosting.co.za> Message-ID: <1538535200.0.0.545547206417.issue32174@psf.upfronthosting.co.za> Sangbae Nam added the comment: This issue still persists in 3.6 and 3.7. ---------- assignee: -> docs at python components: +Documentation nosy: +Sangbae Nam, docs at python versions: +Python 3.7 Added file: https://bugs.python.org/file47844/py37chm.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 00:48:40 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 03 Oct 2018 04:48:40 +0000 Subject: [issue34878] Lock Objects documentation bug In-Reply-To: <1538523706.16.0.545547206417.issue34878@psf.upfronthosting.co.za> Message-ID: <1538542120.61.0.545547206417.issue34878@psf.upfronthosting.co.za> Benjamin Peterson added the comment: The current documentation is correct. While conceptually one may think of a lock as being held ("owned") by a particular thread, the lock internally has no idea what thread owns it?operations on a lock are influenced only by its current state not what thread is performing the operation. It's perfectly possible, if inadvisable, to release a lock on a thread different from the one it was acquired on. The description of ownership is meant to draw a distinction with recursive locks, which do have an internal notion of ownership. ---------- nosy: +benjamin.peterson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 00:53:44 2018 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 03 Oct 2018 04:53:44 +0000 Subject: [issue34879] bytesobject.c: Possible null pointer dereference due to formatfloat() Message-ID: <1538542424.67.0.545547206417.issue34879@psf.upfronthosting.co.za> New submission from Zackery Spytz : The PyBytes_FromStringAndSize() call in formatfloat() is not checked for failure. ---------- components: Interpreter Core messages: 326933 nosy: ZackerySpytz priority: normal severity: normal status: open title: bytesobject.c: Possible null pointer dereference due to formatfloat() type: crash versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 00:56:50 2018 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 03 Oct 2018 04:56:50 +0000 Subject: [issue34879] bytesobject.c: Possible null pointer dereference due to formatfloat() In-Reply-To: <1538542424.67.0.545547206417.issue34879@psf.upfronthosting.co.za> Message-ID: <1538542610.81.0.545547206417.issue34879@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +9069 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 01:05:55 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 03 Oct 2018 05:05:55 +0000 Subject: [issue34874] Python 3.6.3 command script wrapped in single quotes produces NameError: name 'A' is not defined In-Reply-To: <1538516320.45.0.545547206417.issue34874@psf.upfronthosting.co.za> Message-ID: <1538543155.45.0.545547206417.issue34874@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I cannot reproduce this problem with exactly Python 3.6.3. This may be some strange situation specific to your configuration, which should be supported to RedHat. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 01:45:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2018 05:45:55 +0000 Subject: [issue34876] Python3.8 changes how decorators are traced In-Reply-To: <1538521604.52.0.545547206417.issue34876@psf.upfronthosting.co.za> Message-ID: <1538545555.45.0.545547206417.issue34876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is because the first line of the function definition was the line of the last decorator in 3.7, and it is the line of the first decorator in 3.8. $ rlwrap ./python -m dis @decorator @decorator @decorator def func(): pass In 3.7: 2 0 LOAD_NAME 0 (decorator) 3 2 LOAD_NAME 0 (decorator) 4 4 LOAD_NAME 0 (decorator) 6 LOAD_CONST 0 (", line 2>) 8 LOAD_CONST 1 ('func') 10 MAKE_FUNCTION 0 12 CALL_FUNCTION 1 14 CALL_FUNCTION 1 16 CALL_FUNCTION 1 18 STORE_NAME 1 (func) 20 LOAD_CONST 2 (None) 22 RETURN_VALUE In 3.8: 2 0 LOAD_NAME 0 (decorator) 3 2 LOAD_NAME 0 (decorator) 4 4 LOAD_NAME 0 (decorator) 2 6 LOAD_CONST 0 (", line 2>) 8 LOAD_CONST 1 ('func') 10 MAKE_FUNCTION 0 12 CALL_FUNCTION 1 14 CALL_FUNCTION 1 16 CALL_FUNCTION 1 18 STORE_NAME 1 (func) 20 LOAD_CONST 2 (None) 22 RETURN_VALUE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 01:51:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2018 05:51:27 +0000 Subject: [issue34876] Python3.8 changes how decorators are traced In-Reply-To: <1538521604.52.0.545547206417.issue34876@psf.upfronthosting.co.za> Message-ID: <1538545887.36.0.545547206417.issue34876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: On other hand, consider the following example of multiline assignment: $ rlwrap ./python -m dis a = [ x, y, ] In 3.7: 2 0 LOAD_NAME 0 (x) 3 2 LOAD_NAME 1 (y) 4 BUILD_LIST 2 6 STORE_NAME 2 (a) 8 LOAD_CONST 0 (None) 10 RETURN_VALUE In 3.8: 2 0 LOAD_NAME 0 (x) 3 2 LOAD_NAME 1 (y) 1 4 BUILD_LIST 2 6 STORE_NAME 2 (a) 8 LOAD_CONST 0 (None) 10 RETURN_VALUE In 3.7 the line of the assignment "a = [" is not traced. In 3.8 it is traced. These all are a consequences of the same change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 01:59:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2018 05:59:18 +0000 Subject: [issue34874] Python 3.6.3 command script wrapped in single quotes produces NameError: name 'A' is not defined In-Reply-To: <1538516320.45.0.545547206417.issue34874@psf.upfronthosting.co.za> Message-ID: <1538546358.23.0.545547206417.issue34874@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I can reproduce this problem when use double quotes as both outer and internal quotes. $ echo -n '{"A":"a"}' | python3 -c "import sys,json; j=json.load(sys.stdin); print(j["A"])" Traceback (most recent call last): File "", line 1, in NameError: name 'A' is not defined This has not relation to Python, this is how the quoting in the shell works. Perhaps something in your configuration makes single quotes be interpreted as double quotes. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 02:01:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2018 06:01:35 +0000 Subject: [issue34879] bytesobject.c: Possible null pointer dereference due to formatfloat() In-Reply-To: <1538542424.67.0.545547206417.issue34879@psf.upfronthosting.co.za> Message-ID: <1538546495.87.0.545547206417.issue34879@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 96c593279400693226d5a560c420ae0fcf1731b9 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-34879: Fix a possible null pointer dereference in bytesobject.c (GH-9683) https://github.com/python/cpython/commit/96c593279400693226d5a560c420ae0fcf1731b9 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 02:01:44 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Oct 2018 06:01:44 +0000 Subject: [issue34879] bytesobject.c: Possible null pointer dereference due to formatfloat() In-Reply-To: <1538542424.67.0.545547206417.issue34879@psf.upfronthosting.co.za> Message-ID: <1538546504.1.0.545547206417.issue34879@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9070 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 02:01:52 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Oct 2018 06:01:52 +0000 Subject: [issue34879] bytesobject.c: Possible null pointer dereference due to formatfloat() In-Reply-To: <1538542424.67.0.545547206417.issue34879@psf.upfronthosting.co.za> Message-ID: <1538546512.78.0.545547206417.issue34879@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9071 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 02:02:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2018 06:02:46 +0000 Subject: [issue34879] bytesobject.c: Possible null pointer dereference due to formatfloat() In-Reply-To: <1538542424.67.0.545547206417.issue34879@psf.upfronthosting.co.za> Message-ID: <1538546566.14.0.545547206417.issue34879@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report and fix Zackery. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 02:33:47 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Oct 2018 06:33:47 +0000 Subject: [issue34879] bytesobject.c: Possible null pointer dereference due to formatfloat() In-Reply-To: <1538542424.67.0.545547206417.issue34879@psf.upfronthosting.co.za> Message-ID: <1538548427.42.0.545547206417.issue34879@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 063755c20184e80f587d522600536d1ba70a5f7e by Miss Islington (bot) in branch '3.7': bpo-34879: Fix a possible null pointer dereference in bytesobject.c (GH-9683) https://github.com/python/cpython/commit/063755c20184e80f587d522600536d1ba70a5f7e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 02:34:09 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Oct 2018 06:34:09 +0000 Subject: [issue34879] bytesobject.c: Possible null pointer dereference due to formatfloat() In-Reply-To: <1538542424.67.0.545547206417.issue34879@psf.upfronthosting.co.za> Message-ID: <1538548449.12.0.545547206417.issue34879@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6580e52b64cb207f03a1bf86a18f088b081c10f4 by Miss Islington (bot) in branch '3.6': bpo-34879: Fix a possible null pointer dereference in bytesobject.c (GH-9683) https://github.com/python/cpython/commit/6580e52b64cb207f03a1bf86a18f088b081c10f4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 02:35:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2018 06:35:31 +0000 Subject: [issue34879] bytesobject.c: Possible null pointer dereference due to formatfloat() In-Reply-To: <1538542424.67.0.545547206417.issue34879@psf.upfronthosting.co.za> Message-ID: <1538548531.69.0.545547206417.issue34879@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 Oct 3 02:58:30 2018 From: report at bugs.python.org (vtheno athena) Date: Wed, 03 Oct 2018 06:58:30 +0000 Subject: [issue34880] About the "assert" bytecode Message-ID: <1538549910.96.0.545547206417.issue34880@psf.upfronthosting.co.za> New submission from vtheno athena : When I was involved in the YaPyPy project, I found a problem, An source "assert 0" will compile to an bytecode, On that bytecode sequence, it always raise a "AssertionError" from global, when we rewrite global "AssertionError" like here: ``` class AssertionError(Exception): def __init__(self,msg): self.msg = f"User AssertionError: {msg}" # other code ``` so, "assert" is meta-programming? ---------- messages: 326942 nosy: vtheno athena priority: normal severity: normal status: open title: About the "assert" bytecode type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 03:06:28 2018 From: report at bugs.python.org (Bryce Drennan) Date: Wed, 03 Oct 2018 07:06:28 +0000 Subject: [issue34881] unnecessary encoded-words usage breaks DKIM signatures Message-ID: <1538550388.79.0.545547206417.issue34881@psf.upfronthosting.co.za> New submission from Bryce Drennan : Since Python 3.6.4 folding of unstructured headers uses the encoded words syntax even if there are no special characters. This makes DKIM-Signature headers that are unreadable to google's gmail servers. It may be that encoded-words are not valid in this header. I don't see them mentioned here: https://tools.ietf.org/html/rfc6376#page-8 Here is the smallest test case I could create to demonstrate the issue. One solution would be to add DKIM-Signature to the HeaderRegistry but I'm not yet expert enough to execute this. I went down that path for a few hours. Didn't see a straight-forward way to disable encoded words. Setting EmailPolicy(max_line_length=None) does output without encoded words but I worry that will cause different incompatibility issues. from email.headerregistry import HeaderRegistry from email.policy import SMTP def test_unstructured_encoded_word_folding(): header = HeaderRegistry()('DKIM-Signature', 'a' * 85) folded = header.fold(policy=SMTP.clone(refold_source=None)) print(f'\nDKIM-Signature: {header}') print(folded) assert '=?utf-8?q?' not in folded Output: DKIM-Signature: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa DKIM-Signature: =?utf-8?q?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?= =?utf-8?q?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?= AssertionError()! ---------- components: email messages: 326943 nosy: barry, bryced, r.david.murray priority: normal severity: normal status: open title: unnecessary encoded-words usage breaks DKIM signatures versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 03:16:44 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 03 Oct 2018 07:16:44 +0000 Subject: [issue34880] About the "assert" bytecode In-Reply-To: <1538549910.96.0.545547206417.issue34880@psf.upfronthosting.co.za> Message-ID: <1538551004.76.0.545547206417.issue34880@psf.upfronthosting.co.za> Steven D'Aprano added the comment: If I have understood you correctly, you are asking whether it is expected behaviour for assert to use the global AssertionError instead of the built-in AssertionError. I don't see why it shouldn't. In any case, that behaviour goes back to Python 1.5 and perhaps older. I don't think this is a bug, so I'm going to close this. If you disagree, please re-open it with more detail explaining why you think it is a bug. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 04:01:12 2018 From: report at bugs.python.org (metaxm) Date: Wed, 03 Oct 2018 08:01:12 +0000 Subject: [issue34882] f(a=1, *args) should be a SyntaxError Message-ID: <1538553672.9.0.545547206417.issue34882@psf.upfronthosting.co.za> New submission from metaxm : >>> def f(a, b, c): ... pass >>> f(a=1, 2, 3) SyntaxError: positional argument follows keyword argument >>> f(a=1, *(2, 3)) TypeError: f() got multiple values for argument 'a' f(a=1, 2, 3) will cause a SyntaxError, but f(a=1, *(2, 3)) will cause a TypeError. This makes me feel confused. As keyword arguments must follow positional arguments, I suppose a SyntaxError rather than a TypeError should be reported if a variadic argument follows keyword arguments. Would you kindly explain why the CPython takes different actions for these two cases? ---------- components: Interpreter Core messages: 326945 nosy: metaxm priority: normal severity: normal status: open title: f(a=1, *args) should be a SyntaxError type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 04:18:34 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 03 Oct 2018 08:18:34 +0000 Subject: [issue34784] Heap-allocated StructSequences In-Reply-To: <1537773797.44.0.956365154283.issue34784@psf.upfronthosting.co.za> Message-ID: <1538554714.38.0.545547206417.issue34784@psf.upfronthosting.co.za> Josh Rosenberg added the comment: This looks like a duplicate of #28709, though admittedly, that bug hasn't seen any PRs. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 04:21:31 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 03 Oct 2018 08:21:31 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538554891.32.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > I know of no such hash functions short of crypto-strength ones. Being crypto-strength and having few collisions statistically are different properties. For non-crypto hash functions it's typically very easy to generate collisions once you know the parameters (which are called the "key" for crypto hash functions). But I think that you shouldn't be able to produce a large number of collisions if you don't know the parameters in advance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 04:52:44 2018 From: report at bugs.python.org (tzickel) Date: Wed, 03 Oct 2018 08:52: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: <1538556764.95.0.545547206417.issue34172@psf.upfronthosting.co.za> Change by tzickel : ---------- pull_requests: +9072 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 04:59:43 2018 From: report at bugs.python.org (tzickel) Date: Wed, 03 Oct 2018 08:59: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: <1538557183.58.0.545547206417.issue34172@psf.upfronthosting.co.za> tzickel added the comment: Its ok, you only did it twice :) I've submitted a manual 2.7 fix on GH. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 05:02:48 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 03 Oct 2018 09:02:48 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538557368.43.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: I'm having a look at xxHash, the second-fastest hash mentioned on https://docs.rs/seahash/3.0.5/seahash/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 05:06:21 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 03 Oct 2018 09:06:21 +0000 Subject: [issue34014] loop.run_in_executor should propagate current contextvars In-Reply-To: <1530401184.74.0.56676864532.issue34014@psf.upfronthosting.co.za> Message-ID: <1538557581.16.0.545547206417.issue34014@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I vote on not changing `run_in_executor` behavior if we cannot make it work with `ProcessPoolExecutor`. If a new API will solve the problem -- that's fine. Until it landed the explicit context propagation is the satisfactory solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 05:11:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2018 09:11:21 +0000 Subject: [issue34882] f(a=1, *args) should be a SyntaxError In-Reply-To: <1538553672.9.0.545547206417.issue34882@psf.upfronthosting.co.za> Message-ID: <1538557881.44.0.545547206417.issue34882@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See the thread "Order of positional and keyword arguments" on the Python-Dev mailing lists at 2018-04-26: https://mail.python.org/pipermail/python-dev/2018-April/153157.html ---------- nosy: +gvanrossum, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 05:35:05 2018 From: report at bugs.python.org (Ned Batchelder) Date: Wed, 03 Oct 2018 09:35:05 +0000 Subject: [issue34876] Python3.8 changes how decorators are traced In-Reply-To: <1538521604.52.0.545547206417.issue34876@psf.upfronthosting.co.za> Message-ID: <1538559305.11.0.545547206417.issue34876@psf.upfronthosting.co.za> Ned Batchelder added the comment: Are we sure this is the behavior we want? Now when I step through your code in the debugger, it will show me line 2, then 3, then 4, then 2 again. I can see the appeal for a multiline assignment statement, but for stacked decorators it just seems wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 05:35:57 2018 From: report at bugs.python.org (Michael Felt) Date: Wed, 03 Oct 2018 09:35:57 +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: <1538559357.39.0.545547206417.issue34711@psf.upfronthosting.co.za> Michael Felt added the comment: Closed "test" version. made new PR that makes server.py conform to Issue17234 demands ---------- components: +Library (Lib) -Tests title: Fix test_httpservers on AIX (trailingSlashOK) -> Lib/http/server.py: Return HTTPStatus.NOT_FOUND if path.endswith(/) and not a directory _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 05:38:30 2018 From: report at bugs.python.org (Michael Felt) Date: Wed, 03 Oct 2018 09:38:30 +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: <1538559510.46.0.545547206417.issue34711@psf.upfronthosting.co.za> Change by Michael Felt : ---------- pull_requests: +9073 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 05:49:05 2018 From: report at bugs.python.org (thautwarm) Date: Wed, 03 Oct 2018 09:49:05 +0000 Subject: [issue34880] About the "assert" bytecode In-Reply-To: <1538549910.96.0.545547206417.issue34880@psf.upfronthosting.co.za> Message-ID: <1538560145.98.0.545547206417.issue34880@psf.upfronthosting.co.za> thautwarm added the comment: Steven, this problem is quite interesting because it just allows users to cause fatal errors without any invalid operations. ``` AssertionError = 1 assert 1 == 2, 2 --------------------------------------------------------------------------- TypeError: 'int' object is not callable ``` It's better to deal with it seriously. ---------- nosy: +thautwarm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 05:52:39 2018 From: report at bugs.python.org (thautwarm) Date: Wed, 03 Oct 2018 09:52:39 +0000 Subject: [issue34880] About the "assert" bytecode In-Reply-To: <1538549910.96.0.545547206417.issue34880@psf.upfronthosting.co.za> Message-ID: <1538560359.0.0.545547206417.issue34880@psf.upfronthosting.co.za> thautwarm added the comment: If we could generate `LOAD_CONST` instructions for `assert` statements, any prospective dangers could be avoided. ``` from dis import dis @dis def f(): assert x 3 0 LOAD_GLOBAL 0 (x) 2 POP_JUMP_IF_TRUE 8 4 LOAD_GLOBAL 1 (AssertionError) 6 RAISE_VARARGS 1 >> 8 LOAD_CONST 0 (None) 10 RETURN_VALUE ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 05:53:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2018 09:53:04 +0000 Subject: [issue34876] Python3.8 changes how decorators are traced In-Reply-To: <1538521604.52.0.545547206417.issue34876@psf.upfronthosting.co.za> Message-ID: <1538560383.99.0.545547206417.issue34876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think this is a correct behavior. $ cat -n multiline_assignment.py 1 x = 1 2 y = 2 3 z = [ 4 x, 5 y, 6 ] $ ./python -m trace --trace multiline_assignment.py In 3.7 the line with the assignment is missed: --- modulename: multiline_assignment, funcname: multiline_assignment.py(1): x = 1 multiline_assignment.py(2): y = 2 multiline_assignment.py(4): x, multiline_assignment.py(5): y, In 3.8: --- modulename: multiline_assignment, funcname: multiline_assignment.py(1): x = 1 multiline_assignment.py(2): y = 2 multiline_assignment.py(4): x, multiline_assignment.py(5): y, multiline_assignment.py(3): z = [ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 06:01:33 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 03 Oct 2018 10:01:33 +0000 Subject: [issue34880] About the "assert" bytecode In-Reply-To: <1538560145.98.0.545547206417.issue34880@psf.upfronthosting.co.za> Message-ID: <20181003100127.GK21220@ando.pearwood.info> Steven D'Aprano added the comment: On Wed, Oct 03, 2018 at 09:49:06AM +0000, thautwarm wrote: > Steven, this problem is quite interesting because it just allows users > to cause fatal errors without any invalid operations. How is that different from every other case of shadowing a builtin? len = 45 print(len("hello world")) The ability to shadow builtins is a feature, not a bug. I have no specific objection to changing assert so that it raises the actual honest-to-goodness AssertionError, but that would be an enhancement, not a bug-fix. (To be honest, that's what I assumed it would do, until I tried it.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 06:08:21 2018 From: report at bugs.python.org (Ned Batchelder) Date: Wed, 03 Oct 2018 10:08:21 +0000 Subject: [issue34876] Python3.8 changes how decorators are traced In-Reply-To: <1538521604.52.0.545547206417.issue34876@psf.upfronthosting.co.za> Message-ID: <1538561301.68.0.545547206417.issue34876@psf.upfronthosting.co.za> Ned Batchelder added the comment: Yes, I agree that the assignment statement behavior is fine. The stacked decorator behavior is not. I understand that under the hood the two cases are very similar, but the syntax is different. Jumping back to the first decorator makes it look like the decorators are executed in order and then the first decorator runs again. There is nothing in the syntax that makes revisting the first decorator line reasonable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 06:29:30 2018 From: report at bugs.python.org (thautwarm) Date: Wed, 03 Oct 2018 10:29:30 +0000 Subject: [issue34880] About the "assert" bytecode In-Reply-To: <1538549910.96.0.545547206417.issue34880@psf.upfronthosting.co.za> Message-ID: <1538562570.07.0.545547206417.issue34880@psf.upfronthosting.co.za> thautwarm added the comment: Reply to this: > How is that different from every other case of shadowing a builtin? > > len = 45 > print(len("hello world")) ``` AssertionError = 42 assert 1 != 2 ``` `assert` implicitly invokes `AssertionError`, while `len` does that explicitly. That is to say, simply changing a global variable breaks the work of a keyword. Another difference is that shadow builtins could be resumed in the nested functions without something like `globals()` or `exec(..., {})`, while you cannot perform this to the breakage of `assert`: ``` len = 1 def g(): from builtins import len return len([1, 2, 3]) g() # => 3 AssertionError = +1 def f(): from builtins import AssertionError assert False f() # boooom ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 06:32:44 2018 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Wed, 03 Oct 2018 10:32:44 +0000 Subject: [issue34883] test_lzma: Multiple test failures when liblzma is built without complete codec set Message-ID: <1538562764.11.0.545547206417.issue34883@psf.upfronthosting.co.za> New submission from Micha? G?rny : xz-utils has four options to configure codecs supported by liblzma: --enable-encoders --enable-decoders --enable-match-finders --enable-checks In Gentoo, we're using those options to optionally provide smaller footprint liblzma builds that include only the standard set of codecs used by .xz archives (i.e. that work with any archive created by xz/lzma without expert options used). However, it seems that the CPython test suite wrongly presumes that all codecs are always available and it fails on LZMAErrors when those are not present. I'm attaching the verbose output of test_lzma. I think the best solution here would be to catch LZMAError and skipTest() if it's LZMA_OPTIONS_ERROR. I think this would be best done by exposing the underlying error code in LZMAError exception (rather than string-matching, though the latter would also work). ---------- components: Tests files: lzma-test.txt messages: 326960 nosy: mgorny priority: normal severity: normal status: open title: test_lzma: Multiple test failures when liblzma is built without complete codec set type: enhancement versions: Python 3.8 Added file: https://bugs.python.org/file47845/lzma-test.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 06:34:14 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 03 Oct 2018 10:34:14 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538562854.12.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: A (simplified and slightly modified version of) xxHash seems to work very well, much better than SeaHash. Just like SeaHash, xxHash also works in parallel. But I'm not doing that and just using this for the loop: for y in t: y ^= y * (PRIME32_2 - 1) acc += y acc = ((acc << 13) + (acc >> 19)) # rotate left by 13 bits acc *= MULTIPLIER Plain xxHash does "y *= PRIME32_2" or equivalently "y += y * (PRIME32_2 - 1)". Replacing that += by ^= helps slightly with my new tuple test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 06:34:36 2018 From: report at bugs.python.org (Tim Hutt) Date: Wed, 03 Oct 2018 10:34:36 +0000 Subject: [issue34884] Python loads incorrect libraries Message-ID: <1538562876.74.0.545547206417.issue34884@psf.upfronthosting.co.za> New submission from Tim Hutt : See this issue: https://bugs.llvm.org/show_bug.cgi?id=38974 Basically if you have a copy of Python 2 installed on OSX from brew (as well as the system Python 2), then when you run lldb (which links to the system Python 2), at some point Python gets confused and starts loading libraries from the brew version of Python 2. To reproduce: 1. Install Xcode. 2. `brew install python2` 3. Create some executable. 4. `lldb a.out` The output is: (lldb) target create "a.out" Traceback (most recent call last): File "", line 1, in File "/usr/local/Cellar/python at 2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 52, in import weakref File "/usr/local/Cellar/python at 2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/weakref.py", line 14, in from _weakref import ( ImportError: cannot import name _remove_dead_weakref You can also run it like this: $ cp /usr/bin/lldb ~/lldb # Work around SIP $ DYLD_PRINT_LIBRARIES=1 ./lldb a.out And it gives the output below (note lines marked with *******). dyld: loaded: /Users/me/./lldb dyld: loaded: /usr/lib/libxcselect.dylib dyld: loaded: /usr/lib/libSystem.B.dylib dyld: loaded: /usr/lib/system/libcache.dylib dyld: loaded: /usr/lib/system/libcommonCrypto.dylib dyld: loaded: /usr/lib/system/libcompiler_rt.dylib dyld: loaded: /usr/lib/system/libcopyfile.dylib dyld: loaded: /usr/lib/system/libcorecrypto.dylib dyld: loaded: /usr/lib/system/libdispatch.dylib dyld: loaded: /usr/lib/system/libdyld.dylib dyld: loaded: /usr/lib/system/libkeymgr.dylib dyld: loaded: /usr/lib/system/liblaunch.dylib dyld: loaded: /usr/lib/system/libmacho.dylib dyld: loaded: /usr/lib/system/libquarantine.dylib dyld: loaded: /usr/lib/system/libremovefile.dylib dyld: loaded: /usr/lib/system/libsystem_asl.dylib dyld: loaded: /usr/lib/system/libsystem_blocks.dylib dyld: loaded: /usr/lib/system/libsystem_c.dylib dyld: loaded: /usr/lib/system/libsystem_configuration.dylib dyld: loaded: /usr/lib/system/libsystem_coreservices.dylib dyld: loaded: /usr/lib/system/libsystem_darwin.dylib dyld: loaded: /usr/lib/system/libsystem_dnssd.dylib dyld: loaded: /usr/lib/system/libsystem_info.dylib dyld: loaded: /usr/lib/system/libsystem_m.dylib dyld: loaded: /usr/lib/system/libsystem_malloc.dylib dyld: loaded: /usr/lib/system/libsystem_network.dylib dyld: loaded: /usr/lib/system/libsystem_networkextension.dylib dyld: loaded: /usr/lib/system/libsystem_notify.dylib dyld: loaded: /usr/lib/system/libsystem_sandbox.dylib dyld: loaded: /usr/lib/system/libsystem_secinit.dylib dyld: loaded: /usr/lib/system/libsystem_kernel.dylib dyld: loaded: /usr/lib/system/libsystem_platform.dylib dyld: loaded: /usr/lib/system/libsystem_pthread.dylib dyld: loaded: /usr/lib/system/libsystem_symptoms.dylib dyld: loaded: /usr/lib/system/libsystem_trace.dylib dyld: loaded: /usr/lib/system/libunwind.dylib dyld: loaded: /usr/lib/system/libxpc.dylib dyld: loaded: /usr/lib/closure/libclosured.dylib dyld: loaded: /usr/lib/libobjc.A.dylib dyld: loaded: /usr/lib/libc++abi.dylib dyld: loaded: /usr/lib/libc++.1.dylib dyld: loaded: /Applications/Xcode.app/Contents/Developer/usr/lib/libxcrun.dylib dyld: loaded: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation dyld: loaded: /usr/lib/libDiagnosticMessagesClient.dylib dyld: loaded: /usr/lib/libicucore.A.dylib dyld: loaded: /usr/lib/libz.1.dylib dyld: loaded: /Applications/Xcode.app/Contents/Developer/usr/bin/lldb dyld: loaded: /usr/lib/libz.1.dylib dyld: loaded: /usr/lib/libcompression.dylib dyld: loaded: /usr/lib/libpanel.5.4.dylib dyld: loaded: /usr/lib/libncurses.5.4.dylib dyld: loaded: /Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/LLDB.framework/LLDB dyld: loaded: /usr/lib/libc++.1.dylib dyld: loaded: /usr/lib/libSystem.B.dylib dyld: loaded: /usr/lib/system/libcache.dylib dyld: loaded: /usr/lib/system/libcommonCrypto.dylib dyld: loaded: /usr/lib/system/libcompiler_rt.dylib dyld: loaded: /usr/lib/system/libcopyfile.dylib dyld: loaded: /usr/lib/system/libcorecrypto.dylib dyld: loaded: /usr/lib/system/libdispatch.dylib dyld: loaded: /usr/lib/system/libdyld.dylib dyld: loaded: /usr/lib/system/libkeymgr.dylib dyld: loaded: /usr/lib/system/liblaunch.dylib dyld: loaded: /usr/lib/system/libmacho.dylib dyld: loaded: /usr/lib/system/libquarantine.dylib dyld: loaded: /usr/lib/system/libremovefile.dylib dyld: loaded: /usr/lib/system/libsystem_asl.dylib dyld: loaded: /usr/lib/system/libsystem_blocks.dylib dyld: loaded: /usr/lib/system/libsystem_c.dylib dyld: loaded: /usr/lib/system/libsystem_configuration.dylib dyld: loaded: /usr/lib/system/libsystem_coreservices.dylib dyld: loaded: /usr/lib/system/libsystem_darwin.dylib dyld: loaded: /usr/lib/system/libsystem_dnssd.dylib dyld: loaded: /usr/lib/system/libsystem_info.dylib dyld: loaded: /usr/lib/system/libsystem_m.dylib dyld: loaded: /usr/lib/system/libsystem_malloc.dylib dyld: loaded: /usr/lib/system/libsystem_network.dylib dyld: loaded: /usr/lib/system/libsystem_networkextension.dylib dyld: loaded: /usr/lib/system/libsystem_notify.dylib dyld: loaded: /usr/lib/system/libsystem_sandbox.dylib dyld: loaded: /usr/lib/system/libsystem_secinit.dylib dyld: loaded: /usr/lib/system/libsystem_kernel.dylib dyld: loaded: /usr/lib/system/libsystem_platform.dylib dyld: loaded: /usr/lib/system/libsystem_pthread.dylib dyld: loaded: /usr/lib/system/libsystem_symptoms.dylib dyld: loaded: /usr/lib/system/libsystem_trace.dylib dyld: loaded: /usr/lib/system/libunwind.dylib dyld: loaded: /usr/lib/system/libxpc.dylib dyld: loaded: /usr/lib/closure/libclosured.dylib dyld: loaded: /usr/lib/libobjc.A.dylib dyld: loaded: /usr/lib/libc++abi.dylib dyld: loaded: /usr/lib/liblzma.5.dylib dyld: loaded: /System/Library/Frameworks/Python.framework/Versions/2.7/Python *********** dyld: loaded: /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation dyld: loaded: /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols dyld: loaded: /System/Library/Frameworks/Security.framework/Versions/A/Security dyld: loaded: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices dyld: loaded: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices dyld: loaded: /usr/lib/libedit.3.dylib dyld: loaded: /usr/lib/libxml2.2.dylib dyld: loaded: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation dyld: loaded: /usr/lib/libauto.dylib dyld: loaded: /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration dyld: loaded: /usr/lib/libarchive.2.dylib dyld: loaded: /usr/lib/libDiagnosticMessagesClient.dylib dyld: loaded: /usr/lib/libicucore.A.dylib dyld: loaded: /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork dyld: loaded: /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration dyld: loaded: /usr/lib/liblangid.dylib dyld: loaded: /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit dyld: loaded: /usr/lib/libCRFSuite.dylib dyld: loaded: /usr/lib/libenergytrace.dylib dyld: loaded: /usr/lib/libbsm.0.dylib dyld: loaded: /usr/lib/system/libkxld.dylib dyld: loaded: /usr/lib/libOpenScriptingUtil.dylib dyld: loaded: /usr/lib/libcoretls.dylib dyld: loaded: /usr/lib/libcoretls_cfhelpers.dylib dyld: loaded: /usr/lib/libpam.2.dylib dyld: loaded: /usr/lib/libsqlite3.dylib dyld: loaded: /usr/lib/libxar.1.dylib dyld: loaded: /usr/lib/libbz2.1.0.dylib dyld: loaded: /usr/lib/libnetwork.dylib dyld: loaded: /usr/lib/libapple_nghttp2.dylib dyld: loaded: /usr/lib/libpcap.A.dylib dyld: loaded: /usr/lib/libboringssl.dylib dyld: loaded: /usr/lib/libusrtcp.dylib dyld: loaded: /usr/lib/libapple_crypto.dylib dyld: loaded: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents dyld: loaded: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore dyld: loaded: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata dyld: loaded: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices dyld: loaded: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit dyld: loaded: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE dyld: loaded: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices dyld: loaded: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices dyld: loaded: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList dyld: loaded: /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS dyld: loaded: /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth dyld: loaded: /System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport dyld: loaded: /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC dyld: loaded: /usr/lib/libmecabra.dylib dyld: loaded: /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics dyld: loaded: /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText dyld: loaded: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO dyld: loaded: /System/Library/Frameworks/ColorSync.framework/Versions/A/ColorSync dyld: loaded: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS dyld: loaded: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSyncLegacy.framework/Versions/A/ColorSyncLegacy dyld: loaded: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices dyld: loaded: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis dyld: loaded: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore dyld: loaded: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD dyld: loaded: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis dyld: loaded: /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight dyld: loaded: /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate dyld: loaded: /System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay dyld: loaded: /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface dyld: loaded: /System/Library/Frameworks/Metal.framework/Versions/A/Metal dyld: loaded: /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport dyld: loaded: /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore dyld: loaded: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage dyld: loaded: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib dyld: loaded: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib dyld: loaded: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBNNS.dylib dyld: loaded: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libQuadrature.dylib dyld: loaded: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib dyld: loaded: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib dyld: loaded: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib dyld: loaded: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib dyld: loaded: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparse.dylib dyld: loaded: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib dyld: loaded: /System/Library/PrivateFrameworks/GPUWrangler.framework/Versions/A/GPUWrangler dyld: loaded: /System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator dyld: loaded: /System/Library/PrivateFrameworks/IOPresentment.framework/Versions/A/IOPresentment dyld: loaded: /System/Library/PrivateFrameworks/DSExternalDisplay.framework/Versions/A/DSExternalDisplay dyld: loaded: /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib dyld: loaded: /System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage dyld: loaded: /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo dyld: loaded: /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL dyld: loaded: /System/Library/PrivateFrameworks/GraphVisualizer.framework/Versions/A/GraphVisualizer dyld: loaded: /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/MetalPerformanceShaders dyld: loaded: /usr/lib/libFosl_dynamic.dylib dyld: loaded: /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore dyld: loaded: /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL dyld: loaded: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib dyld: loaded: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib dyld: loaded: /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib dyld: loaded: /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib dyld: loaded: /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib dyld: loaded: /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib dyld: loaded: /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib dyld: loaded: /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib dyld: loaded: /System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG dyld: loaded: /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSCore.framework/Versions/A/MPSCore dyld: loaded: /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSImage.framework/Versions/A/MPSImage dyld: loaded: /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSNeuralNetwork.framework/Versions/A/MPSNeuralNetwork dyld: loaded: /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSMatrix.framework/Versions/A/MPSMatrix dyld: loaded: /System/Library/PrivateFrameworks/MetalTools.framework/Versions/A/MetalTools dyld: loaded: /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib dyld: loaded: /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib dyld: loaded: /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib dyld: loaded: /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib dyld: loaded: /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib dyld: loaded: /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib dyld: loaded: /usr/lib/libcups.2.dylib dyld: loaded: /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos dyld: loaded: /System/Library/Frameworks/GSS.framework/Versions/A/GSS dyld: loaded: /usr/lib/libresolv.9.dylib dyld: loaded: /usr/lib/libiconv.2.dylib dyld: loaded: /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal dyld: loaded: /usr/lib/libheimdal-asn1.dylib dyld: loaded: /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory dyld: loaded: /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth dyld: loaded: /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory dyld: loaded: /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation dyld: loaded: /System/Library/PrivateFrameworks/APFS.framework/Versions/A/APFS dyld: loaded: /usr/lib/libutil.dylib dyld: loaded: /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio dyld: loaded: /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox dyld: loaded: /System/Library/PrivateFrameworks/AppleSauce.framework/Versions/A/AppleSauce dyld: loaded: /System/Library/PrivateFrameworks/LinguisticData.framework/Versions/A/LinguisticData dyld: loaded: /usr/lib/libmarisa.dylib dyld: loaded: /System/Library/PrivateFrameworks/Lexicon.framework/Versions/A/Lexicon dyld: loaded: /usr/lib/libChineseTokenizer.dylib dyld: loaded: /usr/lib/libcmph.dylib dyld: loaded: /System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling dyld: loaded: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData dyld: loaded: /System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/CoreEmoji dyld: loaded: /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement dyld: loaded: /System/Library/PrivateFrameworks/BackgroundTaskManagement.framework/Versions/A/BackgroundTaskManagement dyld: loaded: /usr/lib/libxslt.1.dylib (lldb) target create "d1/a.out" dyld: loaded: /usr/local/Cellar/python at 2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so ********* dyld: loaded: /usr/local/Cellar/python at 2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ctypes.so dyld: unloaded: /usr/local/Cellar/python at 2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ctypes.so dyld: loaded: /usr/local/Cellar/python at 2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_functools.so dyld: loaded: /usr/local/Cellar/python at 2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/itertools.so dyld: loaded: /usr/local/Cellar/python at 2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/operator.so dyld: loaded: /usr/local/Cellar/python at 2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so dyld: loaded: /usr/local/opt/readline/lib/libreadline.7.dylib Traceback (most recent call last): File "", line 1, in File "/usr/local/Cellar/python at 2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 52, in import weakref File "/usr/local/Cellar/python at 2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/weakref.py", line 14, in from _weakref import ( ImportError: cannot import name _remove_dead_weakref dyld: loaded: /usr/local/Cellar/python at 2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/time.so dyld: loaded: /usr/local/Cellar/python at 2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/datetime.so dyld: loaded: /usr/local/Cellar/python at 2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/strop.so dyld: loaded: /usr/local/Cellar/python at 2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_collections.so dyld: loaded: /usr/local/Cellar/python at 2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_heapq.so dyld: loaded: /System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/CoreServicesInternal ---------- components: Library (Lib), macOS messages: 326962 nosy: Tim Hutt, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Python loads incorrect libraries versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 06:56:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2018 10:56:08 +0000 Subject: [issue34876] Python3.8 changes how decorators are traced In-Reply-To: <1538521604.52.0.545547206417.issue34876@psf.upfronthosting.co.za> Message-ID: <1538564168.84.0.545547206417.issue34876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: First the decorator itself is loaded. Then the function is created, decorators are called and the result is bound to the name. There is similar situation in the case of multiline call. $ cat -n multiline_call.py 1 def f(a, b): 2 return [ 3 a, 4 b, 5 ] 6 7 x = f( 8 1, 9 2, 10 ) $ ./python -m trace --trace multiline_call.py In 3.7: --- modulename: multiline_call, funcname: multiline_call.py(1): def f(a, b): multiline_call.py(7): x = f( multiline_call.py(8): 1, multiline_call.py(9): 2, --- modulename: multiline_call, funcname: f multiline_call.py(3): a, multiline_call.py(4): b, In 3.8: --- modulename: multiline_call, funcname: multiline_call.py(1): def f(a, b): multiline_call.py(7): x = f( multiline_call.py(8): 1, multiline_call.py(9): 2, multiline_call.py(7): x = f( --- modulename: multiline_call, funcname: f multiline_call.py(3): a, multiline_call.py(4): b, multiline_call.py(2): return [ Line 7 started the execution with loading the function f. Then arguments are evaluated on lines 1 and 2. Then line 7 continue the execution with calling the function and consuming its result. Maybe using a range of lines instead of a single line will help (as was discussed in issue12458). First time the single line with a decorator is executed, second time the multiline expression that starts with the same line is executed. But this may require a significant change of AST and bytecode format. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 07:46:52 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Oct 2018 11:46:52 +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: <1538567212.49.0.545547206417.issue34172@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 07:47:00 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Oct 2018 11:47:00 +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: <1538567220.04.0.545547206417.issue34172@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 07:50:13 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Oct 2018 11:50:13 +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: <1538567413.34.0.545547206417.issue34172@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 4a7dd30f5810e8861a3834159a222ab32d5c97d0 by Antoine Pitrou (tzickel) in branch '2.7': [2.7] bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-9686) https://github.com/python/cpython/commit/4a7dd30f5810e8861a3834159a222ab32d5c97d0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 07:50:21 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Oct 2018 11:50:21 +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: <1538567421.17.0.545547206417.issue34172@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 07:54:35 2018 From: report at bugs.python.org (Sam Bishop) Date: Wed, 03 Oct 2018 11:54:35 +0000 Subject: [issue34498] Python 3.7 breaks on singledispatch_function.register(pseudo_type), which Python 3.6 accepted In-Reply-To: <1535199569.5.0.56676864532.issue34498@psf.upfronthosting.co.za> Message-ID: <1538567675.12.0.545547206417.issue34498@psf.upfronthosting.co.za> Sam Bishop added the comment: Would the enhancements to resolve this, by making singledispatch accept more things, also resolve the AssertionError from functools.singledispatch when passing it custom types, or should I raise this as a separate issue? ------------------------------------------------ from typing import NewType, List from functools import singledispatch @singledispatch def fun(arg, verbose=False): if verbose: print("Let me just say,", end=" ") print(arg) MyType = NewType('MyType', List[int]) @fun.register def _(arg: MyType , verbose=False): if verbose: print("Strength in numbers, eh?", end=" ") print(arg) --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) in 5 6 @fun.register ----> 7 def _(arg: MyType , verbose=False): 8 if verbose: 9 print("Strength in numbers, eh?", end=" ") ~/.pyenv/versions/3.7.0/lib/python3.7/functools.py in register(cls, func) 809 argname, cls = next(iter(get_type_hints(func).items())) 810 assert isinstance(cls, type), ( --> 811 f"Invalid annotation for {argname!r}. {cls!r} is not a class." 812 ) 813 registry[cls] = func AssertionError: Invalid annotation for 'arg'. .new_type at 0x10fcd7730> is not a class. ---------- nosy: +techdragon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 08:07:59 2018 From: report at bugs.python.org (Amirouche Boubekki) Date: Wed, 03 Oct 2018 12:07:59 +0000 Subject: [issue34885] asycnio documention has lost its paragraph about cancellation Message-ID: <1538568479.97.0.545547206417.issue34885@psf.upfronthosting.co.za> New submission from Amirouche Boubekki : The paragraph was still there in 3.6 https://docs.python.org/3.6/library/asyncio-dev.html#cancellation ---------- assignee: docs at python components: Documentation, asyncio messages: 326966 nosy: abki, asvetlov, docs at python, yselivanov priority: normal severity: normal status: open title: asycnio documention has lost its paragraph about cancellation type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 08:08:24 2018 From: report at bugs.python.org (Amirouche Boubekki) Date: Wed, 03 Oct 2018 12:08:24 +0000 Subject: [issue34885] asyncio documention has lost its paragraph about cancellation In-Reply-To: <1538568479.97.0.545547206417.issue34885@psf.upfronthosting.co.za> Message-ID: <1538568504.07.0.545547206417.issue34885@psf.upfronthosting.co.za> Change by Amirouche Boubekki : ---------- title: asycnio documention has lost its paragraph about cancellation -> asyncio documention has lost its paragraph about cancellation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 08:11:27 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 03 Oct 2018 12:11:27 +0000 Subject: [issue34885] asyncio documention has lost its paragraph about cancellation In-Reply-To: <1538568479.97.0.545547206417.issue34885@psf.upfronthosting.co.za> Message-ID: <1538568687.89.0.545547206417.issue34885@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Yuri, can you take a look? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 08:57:11 2018 From: report at bugs.python.org (Matthias Urlichs) Date: Wed, 03 Oct 2018 12:57:11 +0000 Subject: [issue20504] cgi.FieldStorage, multipart, missing Content-Length In-Reply-To: <1391463199.17.0.394387661768.issue20504@psf.upfronthosting.co.za> Message-ID: <1538571431.72.0.545547206417.issue20504@psf.upfronthosting.co.za> Matthias Urlichs added the comment: Owch, yeah, this fell off the radar. Anyway, I've signed the CLA, so if somebody could finish and apply this I'd be grateful. Myself, I unfortunately don't have the time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 08:57:27 2018 From: report at bugs.python.org (Matthias Urlichs) Date: Wed, 03 Oct 2018 12:57:27 +0000 Subject: [issue20504] cgi.FieldStorage, multipart, missing Content-Length In-Reply-To: <1391463199.17.0.394387661768.issue20504@psf.upfronthosting.co.za> Message-ID: <1538571447.45.0.545547206417.issue20504@psf.upfronthosting.co.za> Change by Matthias Urlichs : ---------- versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 09:55:59 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 03 Oct 2018 13:55:59 +0000 Subject: [issue34880] About the "assert" bytecode In-Reply-To: <1538549910.96.0.545547206417.issue34880@psf.upfronthosting.co.za> Message-ID: <1538574959.99.0.545547206417.issue34880@psf.upfronthosting.co.za> Eric V. Smith added the comment: I think this is a bug that should be fixed. This is similar to how f-strings used to work: the generated byte code would call format(something-or-other), and if you'd defined a name "format" in your code it would fail. Now admittedly "format" is more common than "AssertionError", but in any event I don't think assert should fail because of a name you happen to be using. That's a surprising action-at-a-distance, in my mind. And I especially think that's true in the case of assert: when an assert fires, the last thing I want is something that I normally wouldn't have tested for causing me to not see what the assertion is. And, I think a broader discussion on python-dev might be useful, too, in order to get more opinions. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:05:04 2018 From: report at bugs.python.org (Mario) Date: Wed, 03 Oct 2018 14:05:04 +0000 Subject: [issue34725] Py_GetProgramFullPath() odd behaviour in Windows In-Reply-To: <1537291607.58.0.956365154283.issue34725@psf.upfronthosting.co.za> Message-ID: <1538575504.58.0.545547206417.issue34725@psf.upfronthosting.co.za> Mario added the comment: Is there any agreement on what is wrong with the current code. The key in my opinion is the double purpose of sys.executable and that in Linux and Windows people have taken the two different points of view, so they are both right and wrong at the same time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:06:42 2018 From: report at bugs.python.org (Viktor Kovtun) Date: Wed, 03 Oct 2018 14:06:42 +0000 Subject: [issue34014] loop.run_in_executor should propagate current contextvars In-Reply-To: <1530401184.74.0.56676864532.issue34014@psf.upfronthosting.co.za> Message-ID: <1538575602.87.0.545547206417.issue34014@psf.upfronthosting.co.za> Change by Viktor Kovtun : ---------- pull_requests: +9074 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:09:06 2018 From: report at bugs.python.org (Viktor Kovtun) Date: Wed, 03 Oct 2018 14:09:06 +0000 Subject: [issue34014] loop.run_in_executor should propagate current contextvars In-Reply-To: <1530401184.74.0.56676864532.issue34014@psf.upfronthosting.co.za> Message-ID: <1538575746.16.0.545547206417.issue34014@psf.upfronthosting.co.za> Viktor Kovtun added the comment: I've created new pull request https://github.com/python/cpython/pull/9688 with the implementation of proposed changes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:30:06 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 03 Oct 2018 14:30:06 +0000 Subject: [issue34885] asyncio documention has lost its paragraph about cancellation In-Reply-To: <1538568479.97.0.545547206417.issue34885@psf.upfronthosting.co.za> Message-ID: <1538577006.38.0.545547206417.issue34885@psf.upfronthosting.co.za> Yury Selivanov added the comment: The cancellation is now discussed in this section:https://docs.python.org/3/library/asyncio-task.html (search for "cancel") and in particular in the Task subsection. Is there any important detail that was covered in the old documentation and is missing in the new one? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:30:38 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 03 Oct 2018 14:30:38 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538577038.04.0.545547206417.issue34872@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 0c797a6aca1c293e530e18c5e9fa02c670a9a4ed by Yury Selivanov (Elvis Pranskevichus) in branch 'master': bpo-34872: Fix self-cancellation in C implementation of asyncio.Task (GH-9679) https://github.com/python/cpython/commit/0c797a6aca1c293e530e18c5e9fa02c670a9a4ed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:32:47 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 03 Oct 2018 14:32:47 +0000 Subject: [issue34014] loop.run_in_executor should propagate current contextvars In-Reply-To: <1530401184.74.0.56676864532.issue34014@psf.upfronthosting.co.za> Message-ID: <1538577167.45.0.545547206417.issue34014@psf.upfronthosting.co.za> Yury Selivanov added the comment: [Andrew] > I vote on not changing `run_in_executor` behavior if we cannot make it work with `ProcessPoolExecutor`. > If a new API will solve the problem -- that's fine. Until it landed the explicit context propagation is the satisfactory solution. I'm not sure I understand. Should we close this issue or you're OK with (3)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:34:45 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 03 Oct 2018 14:34:45 +0000 Subject: [issue34864] In Idle, Mac tabs make bottom editor line with cursor location disappear In-Reply-To: <1538422572.97.0.545547206417.issue34864@psf.upfronthosting.co.za> Message-ID: <1538577285.7.0.545547206417.issue34864@psf.upfronthosting.co.za> Tal Einat added the comment: Confirmed on macOS High Sierra 10.13.6, with "Prefer tabs when opening documents" set to "Always". See attached screenshot with the macOS tabs; indeed the bottom bar is missing. ---------- Added file: https://bugs.python.org/file47846/with tabs.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:39:12 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 03 Oct 2018 14:39:12 +0000 Subject: [issue34831] Asyncio Tutorial In-Reply-To: <1538134577.09.0.545547206417.issue34831@psf.upfronthosting.co.za> Message-ID: <1538577552.67.0.545547206417.issue34831@psf.upfronthosting.co.za> Yury Selivanov added the comment: > I too have bashed my head for many hours over the years trying to get Tkinter to work on Mac, but a lot of work has gone into this recently and the newer (release) Python's have bundled Tk 8.6: https://www.python.org/download/mac/tcltk/ (this is what learners will prob use on Mac) I've tried to run it and here's what I have on my system: ~/d/t/chat (master) ? python3.7 client.py Traceback (most recent call last): File "client.py", line 7, in from tkinter import * File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py", line 36, in import _tkinter # If this fails your Python may not be configured for Tk ModuleNotFoundError: No module named '_tkinter' How about we write the tutorial and implement terminal clients first. Then we can have two branches of the tutorial -- one implementing a Tk client, one implementing a web client? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:48:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2018 14:48:53 +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: <1538578133.99.0.545547206417.issue23867@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9076 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:50:43 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 03 Oct 2018 14:50:43 +0000 Subject: [issue34014] loop.run_in_executor should propagate current contextvars In-Reply-To: <1530401184.74.0.56676864532.issue34014@psf.upfronthosting.co.za> Message-ID: <1538578243.12.0.545547206417.issue34014@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I prefer (4) but can live with (3) It is a new feature for Python 3.8 anyway, no need to rush ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:52:27 2018 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 03 Oct 2018 14:52:27 +0000 Subject: [issue34882] f(a=1, *args) should be a SyntaxError In-Reply-To: <1538553672.9.0.545547206417.issue34882@psf.upfronthosting.co.za> Message-ID: <1538578347.84.0.545547206417.issue34882@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 10:54:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2018 14:54:13 +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: <1538578453.22.0.545547206417.issue23867@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you all for your comments. Addressed all comments, fixed few other bugs, added support for more convertors. I think this patch is completed. This is just a first step. Next steps are adding support of multiple positional-only parameters, optional groups, and finally keyword parameters. ---------- versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 11:00:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2018 15:00:40 +0000 Subject: [issue34838] Improve arg clinic code generation for cases with type checking In-Reply-To: <1538169358.96.0.545547206417.issue34838@psf.upfronthosting.co.za> Message-ID: <1538578840.74.0.545547206417.issue34838@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your PR Ammar. But I work on more general changes. The first step is issue23867. With implementing the second step this issue can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 11:05:09 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 03 Oct 2018 15:05:09 +0000 Subject: [issue34014] loop.run_in_executor should propagate current contextvars In-Reply-To: <1530401184.74.0.56676864532.issue34014@psf.upfronthosting.co.za> Message-ID: <1538579109.59.0.545547206417.issue34014@psf.upfronthosting.co.za> Yury Selivanov added the comment: > It is a new feature for Python 3.8 anyway, no need to rush Yep, I agree. Let's see if we end up having a new nice high-level API in 3.8; if not we go for (3). ---------- resolution: -> postponed status: open -> pending type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 11:05:19 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 03 Oct 2018 15:05:19 +0000 Subject: [issue34014] loop.run_in_executor should propagate current contextvars In-Reply-To: <1530401184.74.0.56676864532.issue34014@psf.upfronthosting.co.za> Message-ID: <1538579119.71.0.545547206417.issue34014@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- status: pending -> open versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 11:06:51 2018 From: report at bugs.python.org (Elvis Pranskevichus) Date: Wed, 03 Oct 2018 15:06:51 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538579211.38.0.545547206417.issue34872@psf.upfronthosting.co.za> Change by Elvis Pranskevichus : ---------- pull_requests: +9077 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 11:14:48 2018 From: report at bugs.python.org (Elvis Pranskevichus) Date: Wed, 03 Oct 2018 15:14:48 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538579688.81.0.545547206417.issue34872@psf.upfronthosting.co.za> Change by Elvis Pranskevichus : ---------- pull_requests: +9078 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 11:18:56 2018 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 03 Oct 2018 15:18:56 +0000 Subject: [issue34498] Python 3.7 breaks on singledispatch_function.register(pseudo_type), which Python 3.6 accepted In-Reply-To: <1535199569.5.0.56676864532.issue34498@psf.upfronthosting.co.za> Message-ID: <1538579936.09.0.545547206417.issue34498@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 11:28:52 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Oct 2018 15:28:52 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538580532.98.0.545547206417.issue34872@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 166773df0ce6c852130f524029fa2e62b37b89cb by Miss Islington (bot) (Elvis Pranskevichus) in branch '3.6': [3.6] bpo-34872: Fix self-cancellation in C implementation of asyncio.Task (GH-9679) (GH-9690) https://github.com/python/cpython/commit/166773df0ce6c852130f524029fa2e62b37b89cb ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 11:36:57 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 03 Oct 2018 15:36:57 +0000 Subject: [issue34880] About the "assert" bytecode In-Reply-To: <1538574959.99.0.545547206417.issue34880@psf.upfronthosting.co.za> Message-ID: <20181003153649.GL21220@ando.pearwood.info> Steven D'Aprano added the comment: On Wed, Oct 03, 2018 at 01:56:00PM +0000, Eric V. Smith wrote: > I think this is a bug that should be fixed. Supporting this position, shadowing other exceptions doesn't change the exception generated by the interpreter: py> TypeError = None py> 1 + "a" Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for +: 'int' and 'str' On the other hand, this has been the behaviour going back to Python 1.5, it is hard to see why this is worse than any other example of shadowing. I don't think there's anything in the documentation that says that assert *shouldn't* do a LOAD_GLOBAL on AssertionError. Hence this would be an enhancement rather than a bug fix. > And, I think a broader discussion on python-dev might be useful, too, > in order to get more opinions. I agree. I think we need to clarify the intent here, and then decide that if it is a bug, should we bother fixing it in pre-3.8 versions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 11:49:06 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Oct 2018 15:49:06 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538581746.96.0.545547206417.issue34872@psf.upfronthosting.co.za> miss-islington added the comment: New changeset a67bd53d3f80ac9c518b5426aa35459bd373b2b3 by Miss Islington (bot) (Elvis Pranskevichus) in branch '3.7': [3.7] bpo-34872: Fix self-cancellation in C implementation of asyncio.Task (GH-9679) (GH-9691) https://github.com/python/cpython/commit/a67bd53d3f80ac9c518b5426aa35459bd373b2b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 11:52:57 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 03 Oct 2018 15:52:57 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538581977.76.0.545547206417.issue34872@psf.upfronthosting.co.za> Yury Selivanov added the comment: Ned, elevating this to "release blocker", see https://bugs.python.org/msg326928 Feel free to close this issue. ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 11:58:03 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Oct 2018 15:58:03 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538582283.63.0.545547206417.issue34872@psf.upfronthosting.co.za> Ned Deily added the comment: Prior to this, there were no plans to have a 3.7.1rc2. We have three options: 1. do a 3.7.1rc2 with this and possibly a few other cherry-picked changes 2. just cherry-pick this fix into 3.7.1 final 3. wait for 3.7.2 (in one to three months) What's your assessment of the risk of option 2? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 12:02:41 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 03 Oct 2018 16:02:41 +0000 Subject: [issue34880] About the "assert" bytecode In-Reply-To: <1538549910.96.0.545547206417.issue34880@psf.upfronthosting.co.za> Message-ID: <1538582561.57.0.545547206417.issue34880@psf.upfronthosting.co.za> Steven D'Aprano added the comment: > And, I think a broader discussion on python-dev might be useful, too, in order to get more opinions. Done: https://mail.python.org/pipermail/python-dev/2018-October/155410.html Changing the status to Pending until we have more clarity on whether this is a bug, feature, accident or whatnot. ---------- resolution: not a bug -> stage: resolved -> status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 12:10:43 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Wed, 03 Oct 2018 16:10:43 +0000 Subject: [issue34880] About the "assert" bytecode In-Reply-To: <1538549910.96.0.545547206417.issue34880@psf.upfronthosting.co.za> Message-ID: <1538583043.11.0.545547206417.issue34880@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Assuming it is not crazy complicated to fix, I would like to to be changed. It should work like the TypeError example. That fact that it has worked the current way since Python 1.5 isn't a strong argument. I think no one should be surprised if it changes. Also, expecting other Python implementations to match the LOAD_GLOBAL behavior seems to put unnecessary burden on them. If someone writes code that relies on that behavior, they should not be surprised if it gets broken, IMHO. ---------- nosy: +nascheme status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 12:12:12 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Oct 2018 16:12:12 +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: <1538583132.98.0.545547206417.issue34313@psf.upfronthosting.co.za> Ned Deily added the comment: If I understand correctly, this is not a release blocker issue. The most up-to-date documentation for which Tcl/Tk to use on macOS has been and remains: https://www.python.org/download/mac/tcltk/ The entire https://docs.python.org/3/using/mac.html section remains woefully out-of-date; there are other open issues regarding it. ---------- priority: release blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 12:13:38 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 03 Oct 2018 16:13:38 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538583218.71.0.545547206417.issue34872@psf.upfronthosting.co.za> Yury Selivanov added the comment: > What's your assessment of the risk of option 2? Let's not rush it in without testing, for sure. Having 3.7.1rc2 would be great, but really up to you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 12:19:07 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Wed, 03 Oct 2018 16:19:07 +0000 Subject: [issue34822] Simplify AST for slices In-Reply-To: <1538065060.28.0.545547206417.issue34822@psf.upfronthosting.co.za> Message-ID: <1538583547.9.0.545547206417.issue34822@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Hello Serhiy, I've not reviewed the patch but I trust that if you say it simplifies things, that's so. Perhaps the important question is if it is okay to change the AST in backwards incompatible ways within 3.x releases. As a library author who could be affected, I think it is okay. The AST is mostly an implementation detail and should not required to maintain compatibility. We expose it via the 'ast' module for low level tools that want to manipulate it. It is up to those users to handle backwards incompatible changes. That said, we shouldn't just change it for trivial reasons. That just causes work for 3rd party libraries. Removing 400 lines of code seems like sufficient reason. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 12:26:25 2018 From: report at bugs.python.org (ZooDSS) Date: Wed, 03 Oct 2018 16:26:25 +0000 Subject: [issue34682] Typo reports on docs@ In-Reply-To: <1536943787.72.0.956365154283.issue34682@psf.upfronthosting.co.za> Message-ID: <1538583985.44.0.545547206417.issue34682@psf.upfronthosting.co.za> ZooDSS added the comment: Found new one. https://docs.python.org/3/reference/lexical_analysis.html#comments "Comments are ignored by the syntax; they are not tokens." - I honestly think, that this is misleading, by the fact that we have next words. https://docs.python.org/3/library/token.html#token.COMMENT "Token value used to indicate a comment." - this means, that system mentions the comment as a token, but still ch.2 of LR says backwards. May be I am wrong. Correct me, please. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 12:33:45 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 03 Oct 2018 16:33:45 +0000 Subject: [issue34822] Simplify AST for slices In-Reply-To: <1538065060.28.0.545547206417.issue34822@psf.upfronthosting.co.za> Message-ID: <1538584425.82.0.545547206417.issue34822@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- nosy: -yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 13:07:21 2018 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 03 Oct 2018 17:07:21 +0000 Subject: [issue34822] Simplify AST for slices In-Reply-To: <1538065060.28.0.545547206417.issue34822@psf.upfronthosting.co.za> Message-ID: <1538586441.37.0.545547206417.issue34822@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 13:09:21 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Oct 2018 17:09:21 +0000 Subject: [issue34864] In Idle, Mac tabs make bottom editor line with cursor location disappear In-Reply-To: <1538422572.97.0.545547206417.issue34864@psf.upfronthosting.co.za> Message-ID: <1538586561.65.0.545547206417.issue34864@psf.upfronthosting.co.za> Ned Deily added the comment: Interesting! I was not familiar with that system preference nor that it would just (sort of) work in IDLE; I'm presuming that there is nothing in IDLE that knows about this. I'm not sure whether Tk gets that behavior for free (because of the use of an underlying macOS API) or whether it is intended to be supported behavior. Or what would need to be done in IDLE to fully support it. Perhaps Kevin might be able to give some guidance from the Tk perspective. Ah, I see that if the selected tab is an edit window rather than the IDLE shell window and then one uses the cursor to resize the window (grabbing the bottom right hand corner), the cursor location info reappears and then seems to behave as expected: disappears when selecting the shell tab and reappears when selecting the edit tab. Further, when opening yet edit window, the cursor info is missing on the new edit tab but still present on the previous edit tab; resizing the window again causes the cursor info to now appear in the newly edit tab. So all of this seems to be IDLE-specific. ---------- nosy: +wordtech versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 13:10:56 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Oct 2018 17:10:56 +0000 Subject: [issue34864] In Idle, Mac tabs make bottom editor line with cursor location disappear In-Reply-To: <1538422572.97.0.545547206417.issue34864@psf.upfronthosting.co.za> Message-ID: <1538586656.63.0.545547206417.issue34864@psf.upfronthosting.co.za> Ned Deily added the comment: "Further, when opening yet edit window" should be "Further, when opening yet edit tab (in the same IDLE window)" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 13:13:48 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Oct 2018 17:13:48 +0000 Subject: [issue34864] In Idle, Mac tabs make bottom editor line with cursor location disappear In-Reply-To: <1538422572.97.0.545547206417.issue34864@psf.upfronthosting.co.za> Message-ID: <1538586828.85.0.545547206417.issue34864@psf.upfronthosting.co.za> Ned Deily added the comment: One more time: "Further, when opening yet edit window" should be "Further, when opening yet another edit tab (in the same IDLE window)" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 13:13:58 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Oct 2018 17:13:58 +0000 Subject: [issue34864] In Idle, Mac tabs make bottom editor line with cursor location disappear In-Reply-To: <1538422572.97.0.545547206417.issue34864@psf.upfronthosting.co.za> Message-ID: <1538586838.15.0.545547206417.issue34864@psf.upfronthosting.co.za> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg326994 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 13:51:47 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 03 Oct 2018 17:51:47 +0000 Subject: [issue34881] unnecessary encoded-words usage breaks DKIM signatures In-Reply-To: <1538550388.79.0.545547206417.issue34881@psf.upfronthosting.co.za> Message-ID: <1538589107.38.0.545547206417.issue34881@psf.upfronthosting.co.za> R. David Murray added the comment: See also issue 34277 for a previous discussion. I thought I had included a header-level toggle for encoded words, but that doesn't actually make sense, since by default a header value is treated as unstructured (which means encoded words are allowed). To implement this you need to add a new TokenList class to _header_value_parser, say DKIMHeaderValue, with the class attribute 'as_ew_allowed' set to False. Do you have a BNF description of the DKIM header? I could probably sketch the implementation of the DKIM header value parser from that. Then you create a header in headerregistry that uses that parser as its value_parser. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 13:55:18 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 03 Oct 2018 17:55:18 +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: <1538589318.04.0.545547206417.issue34864@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Optionally converting windows to tabs is an over-arching goal for IDLE. To do it with IDLE code, IDLE must create a frame (and keep a reference) but not a toplevel. I presume that the Mac window manager extracts the window title and frame from the window, discards the window, and puts the title and frame on a tab. Kevin, does tcl/tk know about or cooperate with this conversion? IDLE's default editor size is configured as 40 lines of 80 characters. On my MacBook Air, the windows are actually 38 lines; that is all that fits between the title bar and taskbar. Additional windows overlap, but are moved to the right. If I set the window height to less than 38, say 30, the initial window does not fill the vertical space, showing some of the background beneath. Additional windows appear a bit down as well as to the right. I found the setting under System Preferences Dock and more or less confirm Ned's report. It appears that the status bar is hidden rather than deleted. I set the initial window size to 36, 2 lines less than the actual maximum, hoping the status bar would remain in a larger window after opening a second window. No such luck. The size remains 36, with the bar hidden. For the editor windows, grabbing the vertical resize made the status appear and stay. For Shell, it disappeared either immediately or when tabbing away and back. Since Shell subclasses EditorWindow, I don't know why the difference. The resolution to this issue from IDLE's viewpoint should be a new IDLE doc subsection 'IDLE on MacOS', probably under 'Help and Preferences'. It would explain differences from IDLE on Linux and Windows. Besides this issue, there is the single title bar, menu differences, and zoom behavior (horizontal expansion as well as vertical). Also, as far as I can tell so far (and someone correct me if this is wrong), only 1 instance of IDLE can run (for a given binary, at least), which means only 1 Shell. (On Windows, I can run multiple instances of a given binary, and I presume the same is true on non-Mac *nix.) ---------- title: In Idle, Mac tabs make bottom editor line with cursor location disappear -> In Idle, Mac tabs make editor status line disappear. versions: -Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 13:59:47 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 03 Oct 2018 17:59:47 +0000 Subject: [issue34881] unnecessary encoded-words usage breaks DKIM signatures In-Reply-To: <1538550388.79.0.545547206417.issue34881@psf.upfronthosting.co.za> Message-ID: <1538589587.25.0.545547206417.issue34881@psf.upfronthosting.co.za> R. David Murray added the comment: You could also play with just making a parser that is a simplified version of get_unstructured, producing a....maybe call it ASCIIOnlyUnstructuredTokenList...that would have as_ew_allowed set to False. That might not produce optimal results, but it would be better than the current situation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 14:02:56 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 03 Oct 2018 18:02:56 +0000 Subject: [issue31310] semaphore tracker isn't protected against crashes In-Reply-To: <1504108352.86.0.17423028145.issue31310@psf.upfronthosting.co.za> Message-ID: <1538589776.09.0.545547206417.issue31310@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 14:16:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2018 18:16:40 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538590600.22.0.545547206417.issue34872@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Seems this change introduced a compiler warning. /home/serhiy/py/cpython3.7/Modules/_asynciomodule.c: In function ?task_step_impl?: /home/serhiy/py/cpython3.7/Modules/_asynciomodule.c:2666:44: warning: passing argument 1 of ?_PyObject_CallMethodId? from incompatible pointer type [-Wincompatible-pointer-types] r = _PyObject_CallMethodId(fut, &PyId_cancel, NULL); ^~~ In file included from ./Include/Python.h:128:0, from /home/serhiy/py/cpython3.7/Modules/_asynciomodule.c:1: ./Include/abstract.h:315:24: note: expected ?PyObject * {aka struct _object *}? but argument is of type ?FutureObj * {aka struct *}? PyAPI_FUNC(PyObject *) _PyObject_CallMethodId(PyObject *obj, ^~~~~~~~~~~~~~~~~~~~~~ ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 14:26:29 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Oct 2018 18:26:29 +0000 Subject: [issue34725] Py_GetProgramFullPath() odd behaviour in Windows In-Reply-To: <1537291607.58.0.956365154283.issue34725@psf.upfronthosting.co.za> Message-ID: <1538591189.84.0.545547206417.issue34725@psf.upfronthosting.co.za> Steve Dower added the comment: I don't think anything has been agreed upon. Currently, the launched program name is used for some things other than setting sys.executable, and I believe it should continue to be used for those. But there are also needs for overriding sys.executable to be something other than the current process (e.g. a launcher that simply loads Python into its own process, but needs a different process to be used for multiprocessing support). Victor has been looking at the initialization process, so I'm not sure if something has already changed here yet. I'd be keen to see the getpath part of initialization be written in (frozen or limited) Python code that can be easily overridden by embedders to initialize all of these members however they like. That way everyone can equally lie about argv0/GetModuleFullPath and sys.prefix/sys.executable/etc. Until we get there, we may just need a couple more configuration fields, and perhaps some that default to one of the others when unspecified. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 14:46:22 2018 From: report at bugs.python.org (Michael Felt) Date: Wed, 03 Oct 2018 18:46:22 +0000 Subject: [issue31203] socket.IP_PKTINFO is missing from python In-Reply-To: <1502722784.42.0.622750235869.issue31203@psf.upfronthosting.co.za> Message-ID: <1538592382.26.0.545547206417.issue31203@psf.upfronthosting.co.za> Michael Felt added the comment: FYI: define exists on Linux 3.16.0-4-powerpc64 #1 SMP Debian 3.16.7-ckt9-3 (2015-04-23) ppc64 GNU/Linux SunOS 5.11 11.3 Not on AIX ---------- nosy: +Michael.Felt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 14:50:38 2018 From: report at bugs.python.org (Alessandro) Date: Wed, 03 Oct 2018 18:50:38 +0000 Subject: [issue34886] subprocess.run throws exception when input and stdin are passed as kwargs Message-ID: <1538592638.37.0.545547206417.issue34886@psf.upfronthosting.co.za> New submission from Alessandro : If input and stdin parameters are passed as keyword arguments to subprocess.run, an exception is thrown even if input and stdin are both None. The exception is ValueError: stdin and input arguments may not both be used. I attach a minimal working example of the bug ---------- components: Library (Lib) files: subprocess_run_bug.py messages: 327002 nosy: aecant priority: normal severity: normal status: open title: subprocess.run throws exception when input and stdin are passed as kwargs type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file47847/subprocess_run_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 15:12:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Oct 2018 19:12:16 +0000 Subject: [issue34886] subprocess.run throws exception when input and stdin are passed as kwargs In-Reply-To: <1538592638.37.0.545547206417.issue34886@psf.upfronthosting.co.za> Message-ID: <1538593936.5.0.545547206417.issue34886@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is wrong with this? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 15:22:57 2018 From: report at bugs.python.org (Alessandro) Date: Wed, 03 Oct 2018 19:22:57 +0000 Subject: [issue34886] subprocess.run throws exception when input and stdin are passed as kwargs In-Reply-To: <1538592638.37.0.545547206417.issue34886@psf.upfronthosting.co.za> Message-ID: <1538594577.58.0.545547206417.issue34886@psf.upfronthosting.co.za> Alessandro added the comment: subprocess.run('ls', input=b'', stdin=None) # this is ok kwargs = {'input': b'', 'stdin': None} subprocess.run('ls', **kwargs) # this throws exception The two calls should have the same behaviour, but one throws exception and the other doesn't. I think the exception shouldn't be thrown, because stdin is None. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 15:36:55 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 03 Oct 2018 19:36:55 +0000 Subject: [issue34875] Change .js mime to "text/javascript" In-Reply-To: <1538519319.52.0.545547206417.issue34875@psf.upfronthosting.co.za> Message-ID: <1538595415.61.0.545547206417.issue34875@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- title: Change .js mime to "test/javascript" -> Change .js mime to "text/javascript" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 15:40:21 2018 From: report at bugs.python.org (Tim Peters) Date: Wed, 03 Oct 2018 19:40:21 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538595621.85.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: Thanks for looking at xxHash! An advantage is that it already comes in 32- and 64-bit versions. > A (simplified and slightly modified version of) xxHash > seems to work very well, much better than SeaHash. ? I've posted several SeaHash cores that suffer no collisions at all in any of our tests (including across every "bad example" in these 100+ messages), except for "the new" tuple test. Which it also passed, most recently with 7 collisions. That was under 64-bit builds, though, and from what follows I figure you're only looking at 32-bit builds for now. > Just like SeaHash, xxHash also works in parallel. But I'm not > doing that and just using this for the loop: > > for y in t: > y ^= y * (PRIME32_2 - 1) > acc += y > acc = ((acc << 13) + (acc >> 19)) # rotate left by 13 bits > acc *= MULTIPLIER > > Plain xxHash does "y *= PRIME32_2" or equivalently > "y += y * (PRIME32_2 - 1)". Replacing that += by ^= helps > slightly with my new tuple test. Taking an algorithm in wide use that's already known to get a top score on SMHasher and fiddling it to make a "slight" improvement in one tiny Python test doesn't make sense to me. Does the variant also score well under SMHasher? "I don't see why it wouldn't" is not an answer to that ;-) Note that the change also slows the loop a bit - "acc += y" can't begin until the multiply finishes, and the following "acc *=" can't begin until the addition finishes. Lengthening the critical path needs to buy something real to justify the extra expense. I don't see it here. For posterity: the 64-bit version of xxHash uses different primes, and rotates left by 31 instead of by 13. Note: I'm assuming that by "PRIME32_2" you mean 2246822519U, and that "MULTIPLIER" means 2654435761U. Which appear to be the actual multipliers used in, e.g., https://github.com/RedSpah/xxhash_cpp/blob/master/xxhash/xxhash.hpp As always, I'm not a fan of making gratuitous changes. In any case, without knowing the actual values you're using, nobody can replicate what you're doing. That said, I have no reason to favor SeaHash over xxHash, and xxHash also has a real advantage in that it apparently didn't _need_ the "t ^= t << 1" permutation to clear the new tuple test's masses of replicated sign bits. But the more we make changes to either, the more work _we_ have to do to ensure we haven't introduced subtle weaknesses. Which the Python test suite will never be substantial enough to verify - we're testing almost nothing about hash behavior. Nor should we: people already wrote substantial test suites dedicated to that sole purpose, and we should aim to be "mere consumers" of functions that pass _those_ tests. Python's test suite is more to ensure that known problems _in Python_ don't recur over the decades. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 15:43:51 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 03 Oct 2018 19:43:51 +0000 Subject: [issue34875] Change .js mime to "text/javascript" In-Reply-To: <1538519319.52.0.545547206417.issue34875@psf.upfronthosting.co.za> Message-ID: <1538595831.06.0.545547206417.issue34875@psf.upfronthosting.co.za> Andrew Svetlov added the comment: By RCF 4329 https://tools.ietf.org/html/rfc4329#page-9 text/javascript is obsoleted, application/javascript is a part of the standard. WhatWg is a controversial group. Their specs don't always follow official standards but Python does. Sorry, I should decline the proposal. Feel free to raise an issue again if IETF will change their opinion. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 15:44:10 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 03 Oct 2018 19:44:10 +0000 Subject: [issue34875] Change .js mime to "text/javascript" In-Reply-To: <1538519319.52.0.545547206417.issue34875@psf.upfronthosting.co.za> Message-ID: <1538595850.45.0.545547206417.issue34875@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 15:49:12 2018 From: report at bugs.python.org (Myles Borins) Date: Wed, 03 Oct 2018 19:49:12 +0000 Subject: [issue34875] Change .js mime to "text/javascript" In-Reply-To: <1538519319.52.0.545547206417.issue34875@psf.upfronthosting.co.za> Message-ID: <1538596152.52.0.545547206417.issue34875@psf.upfronthosting.co.za> Myles Borins added the comment: There is a IETF proposal that would make "text/javascript" no longer obsolete. Will revisit at the point this lands https://datatracker.ietf.org/doc/draft-ietf-dispatch-javascript-mjs/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 15:49:29 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 03 Oct 2018 19:49:29 +0000 Subject: [issue34886] subprocess.run throws exception when input and stdin are passed as kwargs In-Reply-To: <1538592638.37.0.545547206417.issue34886@psf.upfronthosting.co.za> Message-ID: <1538596169.73.0.545547206417.issue34886@psf.upfronthosting.co.za> Josh Rosenberg added the comment: I just tried: subprocess.run('ls', input=b'', stdin=None) and I got the same ValueError as for passing using kwargs. Where did you get the idea subprocess.run('ls', input=b'', stdin=None) worked? ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 15:52:55 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 03 Oct 2018 19:52:55 +0000 Subject: [issue34886] subprocess.run throws exception when input and stdin are passed as kwargs In-Reply-To: <1538592638.37.0.545547206417.issue34886@psf.upfronthosting.co.za> Message-ID: <1538596375.65.0.545547206417.issue34886@psf.upfronthosting.co.za> Josh Rosenberg added the comment: The actual code receives input by name, but stdin is received in **kwargs. The test is just: if input is not None: if 'stdin' in kwargs: raise ValueError(...) kwargs['stdin'] = PIPE Perhaps just change `if 'stdin' in kwargs:` to: if kwargs.get('stdin') is not None: so it obeys the documented API (that says stdin defaults to None, and therefore passing stdin=None explicitly should be equivalent to not passing it at all)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 15:55:13 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 03 Oct 2018 19:55:13 +0000 Subject: [issue34875] Change .js mime to "text/javascript" In-Reply-To: <1538519319.52.0.545547206417.issue34875@psf.upfronthosting.co.za> Message-ID: <1538596513.48.0.545547206417.issue34875@psf.upfronthosting.co.za> Andrew Svetlov added the comment: We can return to the question when (and if) the draft will be accepted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 16:06:56 2018 From: report at bugs.python.org (Alessandro) Date: Wed, 03 Oct 2018 20:06:56 +0000 Subject: [issue34886] subprocess.run throws exception when input and stdin are passed as kwargs In-Reply-To: <1538592638.37.0.545547206417.issue34886@psf.upfronthosting.co.za> Message-ID: <1538597216.4.0.545547206417.issue34886@psf.upfronthosting.co.za> Alessandro added the comment: > and I got the same ValueError as for passing using kwargs. Where did you get the idea subprocess.run('ls', input=b'', stdin=None) worked? Sorry, the example was wrong. Both calls have the same behaviour. > so it obeys the documented API (that says stdin defaults to None, and therefore passing stdin=None explicitly should be equivalent to not passing it at all)? The actual problem is this. The fix you propose works for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 16:12:55 2018 From: report at bugs.python.org (Ammar Askar) Date: Wed, 03 Oct 2018 20:12:55 +0000 Subject: [issue34838] Improve arg clinic code generation for cases with type checking In-Reply-To: <1538169358.96.0.545547206417.issue34838@psf.upfronthosting.co.za> Message-ID: <1538597575.55.0.545547206417.issue34838@psf.upfronthosting.co.za> Ammar Askar added the comment: Aah, I didn't know that ticket existed. Thanks for the link Serhiy, I'll review your PR instead. Leaving it up to Raymond if he wants to close the issue and use the other one to track this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 16:29:32 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Wed, 03 Oct 2018 20:29:32 +0000 Subject: [issue34874] Python 3.6.3 command script wrapped in single quotes produces NameError: name 'A' is not defined In-Reply-To: <1538516320.45.0.545547206417.issue34874@psf.upfronthosting.co.za> Message-ID: <1538598572.24.0.545547206417.issue34874@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: @Tim Is it possible that 'python3' in your command refers to some wrapper which forwards its arguments to real Python in a wrong way? ---------- nosy: +izbyshev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 17:41:59 2018 From: report at bugs.python.org (Tim Peters) Date: Wed, 03 Oct 2018 21:41:59 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538602919.46.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: Here's a complete xxHash-based implementation via throwing away C++-isms from https://github.com/RedSpah/xxhash_cpp/blob/master/xxhash/xxhash.hpp In the 64-bit build there are no collisions across my tests except for 11 in the new tuple test. The 32-bit build fares worse: - 3 collisions in the old tuple test. - 51 collisions in the new tuple test. - 173 collisions across product([-3, 3], repeat=20) - 141 collisions across product([0.5, 0.25], repeat=20) - no other collisions The expected number of collisions from tossing 2**20 balls into 2**32 buckets is about 128, with standard deviation 11.3. So 141 is fine, but 173 is highly suspect. 51 for the new tuple test is way out of bounds. But I don't much care. None of these are anywhere near disasters, and - as I've already said - I know of no non-crypto strength hash that doesn't suffer "worse than random" behaviors in some easily-provoked cases. All you have to do is keep trying. Much as with SeaHash, adding t ^= t << 1; at the top helps a whole lot in the "bad cases", cutting the new test's collisions to 7 in the 32-bit build. It also cuts the product([-3, 3], repeat=20) collisions to 109. But boosts the old tuple test's collisions to 12. I wouldn't do it: it adds cycles for no realistic gain. We don't really care whether the hash "is random" - we do care about avoiding catastrophic pile-ups, and there are none with an unmodified xxHash. BTW, making that change also _boosts_ the number of "new test" collisions to 23 in the 64-bit build (a little over its passing limit). #define Py_NHASHBITS (SIZEOF_PY_HASH_T * CHAR_BIT) #if Py_NHASHBITS >= 64 # define Py_HASH_MULT1 (Py_uhash_t)11400714785074694791ULL # define Py_HASH_MULT2 (Py_uhash_t)14029467366897019727ULL # define Py_HASH_LSHIFT 31 #elif Py_NHASHBITS >= 32 # define Py_HASH_MULT1 (Py_uhash_t)2654435761ULL # define Py_HASH_MULT2 (Py_uhash_t)2246822519ULL # define Py_HASH_LSHIFT 13 #else # error "can't make sense of Py_uhash_t size" #endif #define Py_HASH_RSHIFT (Py_NHASHBITS - Py_HASH_LSHIFT) static Py_hash_t tuplehash(PyTupleObject *v) { Py_uhash_t x, t; /* Unsigned for defined overflow behavior. */ Py_hash_t y; Py_ssize_t len = Py_SIZE(v); PyObject **p; x = 0x345678UL; p = v->ob_item; while (--len >= 0) { y = PyObject_Hash(*p++); if (y == -1) return -1; t = (Py_uhash_t)y; x += t * Py_HASH_MULT2; x = (x << Py_HASH_LSHIFT) | (x >> Py_HASH_RSHIFT); x *= Py_HASH_MULT1; } x += 97531UL; if (x == (Py_uhash_t)-1) x = -2; return x; } #undef Py_NHASHBITS #undef Py_HASH_MULT1 #undef Py_HASH_MULT2 #undef Py_HASH_LSHIFT #undef Py_HASH_RSHIFT ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 19:35:58 2018 From: report at bugs.python.org (Dan Snider) Date: Wed, 03 Oct 2018 23:35:58 +0000 Subject: [issue34887] bytes subclass __repr__ raise SystemError when set to bytes.decode Message-ID: <1538609758.67.0.545547206417.issue34887@psf.upfronthosting.co.za> New submission from Dan Snider : I've tested it on at least one of each minor version since 3.4 but it looks like it may be specific to 3.6.0. The developer's guide isn't clear enough for me to understand what's eligible for bug fixes but since I'm not sure if it actually is 3.6.0 exclusive I'll post it just in case. Here's how to cause it: if 1: class Bytes(bytes): def __new__(cls, name, encoding='ascii'): return bytes.__new__(cls, name.encode()) __repr__ = bytes.decode print(repr(Bytes("LOAD_NAME"))) Traceback (most recent call last): File "", line 6, in SystemError: returned NULL without setting an error ---------- messages: 327015 nosy: bup priority: normal severity: normal status: open title: bytes subclass __repr__ raise SystemError when set to bytes.decode versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 19:38:04 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 03 Oct 2018 23:38:04 +0000 Subject: [issue27165] Skip callables when displaying exception fields in cgitb In-Reply-To: <1464689112.02.0.764355408735.issue27165@psf.upfronthosting.co.za> Message-ID: <1538609884.67.0.545547206417.issue27165@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Hi Adam, Are you interested in converting your patch to a GitHub pull request? Thanks! ---------- nosy: +cheryl.sabella versions: +Python 3.8 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 19:47:24 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 03 Oct 2018 23:47:24 +0000 Subject: [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1538610444.19.0.545547206417.issue11233@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Hello, It doesn't appear that this patch was ever merged. If there's still interest, would it be OK for me to convert it to a PR? Thanks! ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 19:57:30 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 03 Oct 2018 23:57:30 +0000 Subject: [issue31660] sys.executable different in os.execv'd python3.6 virtualenv session in python2 vs python3 In-Reply-To: <1506913947.94.0.213398074469.issue31660@psf.upfronthosting.co.za> Message-ID: <1538611050.2.0.545547206417.issue31660@psf.upfronthosting.co.za> Cheryl Sabella added the comment: The original OP said this wasn't an issue with venv, so closing as not a bug. ---------- nosy: +cheryl.sabella resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 20:00:41 2018 From: report at bugs.python.org (Ned Batchelder) Date: Thu, 04 Oct 2018 00:00:41 +0000 Subject: [issue34888] Python3.8 optimizes away a "while" line Message-ID: <1538611241.01.0.545547206417.issue34888@psf.upfronthosting.co.za> New submission from Ned Batchelder : Looks like the optimizer is getting more aggressive. Line 2 (the constant while) no longer even appears in the bytecode: $ cat -n whiletrue.py 1 a = 1 2 while 1: 3 print(a) 4 b = 4 $ python3.7 -m dis < whiletrue.py 1 0 LOAD_CONST 0 (1) 2 STORE_NAME 0 (a) 2 4 SETUP_LOOP 12 (to 18) 3 >> 6 LOAD_NAME 1 (print) 8 LOAD_NAME 0 (a) 10 CALL_FUNCTION 1 12 POP_TOP 14 JUMP_ABSOLUTE 6 16 POP_BLOCK 4 >> 18 LOAD_CONST 1 (4) 20 STORE_NAME 2 (b) 22 LOAD_CONST 2 (None) 24 RETURN_VALUE $ python3.8 -m dis < whiletrue.py 1 0 LOAD_CONST 0 (1) 2 STORE_NAME 0 (a) 3 >> 4 LOAD_NAME 1 (print) 6 LOAD_NAME 0 (a) 8 CALL_FUNCTION 1 10 POP_TOP 12 JUMP_ABSOLUTE 4 4 14 LOAD_CONST 1 (4) 16 STORE_NAME 2 (b) 18 LOAD_CONST 2 (None) 20 RETURN_VALUE I understand why we want to make these optimizations. It's good for those times when we run our programs. But there are other times: when we are analyzing programs. I'm begging you: please please please help me get https://bugs.python.org/issue2506 implemented (a way to disable optimizations). It is becoming more and more difficult to write tools that analyze Python programs. People are testing their libraries on Python 3.8-dev, and reporting problems using coverage.py. I would like to support their efforts to test on the daily Python builds. But it's difficult to keep coverage.py working under these conditions. Anything you can do would be really appreciated. ---------- components: Interpreter Core messages: 327019 nosy: nedbat, serhiy.storchaka priority: normal severity: normal status: open title: Python3.8 optimizes away a "while" line versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 20:01:08 2018 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 04 Oct 2018 00:01:08 +0000 Subject: [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1538611268.01.0.545547206417.issue11233@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: A PR for this would be good, and would certainly accelerate getting this accomplished. Thanks, Cheryl! ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 20:17:00 2018 From: report at bugs.python.org (Ned Batchelder) Date: Thu, 04 Oct 2018 00:17:00 +0000 Subject: [issue34888] Python3.8 optimizes away a "while" line In-Reply-To: <1538611241.01.0.545547206417.issue34888@psf.upfronthosting.co.za> Message-ID: <1538612220.36.0.545547206417.issue34888@psf.upfronthosting.co.za> Change by Ned Batchelder : ---------- nosy: +benjamin.peterson, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 20:25:53 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 04 Oct 2018 00:25:53 +0000 Subject: [issue2506] Add mechanism to disable optimizations In-Reply-To: <1206797921.05.0.258043023613.issue2506@psf.upfronthosting.co.za> Message-ID: <1538612753.49.0.545547206417.issue2506@psf.upfronthosting.co.za> Yury Selivanov added the comment: Having properly working coverage tooling is simply invaluable to pretty much every serious Python user. I support Ned's idea of adding an option to disable peephole optimizer (and similar other optimization passes). Why is this even debated? ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 20:27:02 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 04 Oct 2018 00:27:02 +0000 Subject: [issue2506] Add mechanism to disable optimizations In-Reply-To: <1206797921.05.0.258043023613.issue2506@psf.upfronthosting.co.za> Message-ID: <1538612822.66.0.545547206417.issue2506@psf.upfronthosting.co.za> Yury Selivanov added the comment: > I would suggest -X noopt and use "noopt" in .pyc filenames. That's what I proposed in my PEP 511. Sounds good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 20:34:53 2018 From: report at bugs.python.org (Tim McDonough) Date: Thu, 04 Oct 2018 00:34:53 +0000 Subject: [issue34874] Python 3.6.3 command script wrapped in single quotes produces NameError: name 'A' is not defined In-Reply-To: <1538516320.45.0.545547206417.issue34874@psf.upfronthosting.co.za> Message-ID: <1538613293.46.0.545547206417.issue34874@psf.upfronthosting.co.za> Tim McDonough added the comment: Yes, there are wrapper scripts on my system. My system was updated from 3.3 to 3.6. The 3.3 and 3.6 wrappers are equivalent and similar to the python2.7 wrapper as shown: exec -a `dirname $realpath`/python2.7 `dirname $realpath`/python2.7.real "$@" exec /usr/bin/scl enable python33 -- python "$@" exec /usr/bin/scl enable rh-python36 -- python "$@" This has to be something specific to the rh-python36 package or python36-scl that replaced python33 on my system. Since Benjamin could not reproduce with 3.6.3 my bet that it is an in-house, self-inflicted problem. Thank you. I am closing this one as "not a bug" in python 3.6. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 20:38:16 2018 From: report at bugs.python.org (Kevin Walzer) Date: Thu, 04 Oct 2018 00:38:16 +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: <1538613496.92.0.545547206417.issue34864@psf.upfronthosting.co.za> Kevin Walzer added the comment: The behavior outlined in the screenshot is, I believe, a component of the native Cocoa window that underlies Tk; it cannot be controlled or accessed from Tk. It's probably better to avoid altogether or re-implement somehow in IDLE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 20:42:02 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 04 Oct 2018 00:42:02 +0000 Subject: [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1538613722.81.0.545547206417.issue11233@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- pull_requests: +9079 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 20:42:46 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 04 Oct 2018 00:42:46 +0000 Subject: [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1538613766.52.0.545547206417.issue11233@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Thanks, Fred. I've submitted the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 20:42:56 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 04 Oct 2018 00:42:56 +0000 Subject: [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1538613776.97.0.545547206417.issue11233@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- versions: +Python 3.8 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 21:00:09 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 04 Oct 2018 01:00:09 +0000 Subject: [issue34888] Python3.8 optimizes away a "while" line In-Reply-To: <1538611241.01.0.545547206417.issue34888@psf.upfronthosting.co.za> Message-ID: <1538614809.12.0.545547206417.issue34888@psf.upfronthosting.co.za> Yury Selivanov added the comment: While I agree with you that we need a flag to disable optimizations, this particular change isn't related to AST or peephole optimizers. See the bpo-17611 for more details (or https://github.com/python/cpython/commit/520b7ae27e39d1c77ea74ccd1b184d7cb43f9dcb) ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 21:11:47 2018 From: report at bugs.python.org (Ned Batchelder) Date: Thu, 04 Oct 2018 01:11:47 +0000 Subject: [issue34888] Python3.8 optimizes away a "while" line In-Reply-To: <1538611241.01.0.545547206417.issue34888@psf.upfronthosting.co.za> Message-ID: <1538615507.54.0.545547206417.issue34888@psf.upfronthosting.co.za> Ned Batchelder added the comment: Yury, thanks. I haven't read the code in depth. I assume there is some place that notices that the while condition is a constant, and therefore doesn't need to be explicitly evaluated? That test can be disabled, yes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 21:16:57 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 04 Oct 2018 01:16:57 +0000 Subject: [issue34888] Python3.8 optimizes away a "while" line In-Reply-To: <1538611241.01.0.545547206417.issue34888@psf.upfronthosting.co.za> Message-ID: <1538615817.9.0.545547206417.issue34888@psf.upfronthosting.co.za> Yury Selivanov added the comment: It's more complicated than that: there's no more SETUP_LOOP opcode anymore. The ceval and compiler parts responsible for evaluating and compiling loops were rewritten. FWIW the goal was more about simplifying the needlessly complicated implementation and long term maintenance than about performance. So this is something that coverage will probably have to adapt to (peephole optimizer is another topic). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 21:18:22 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 04 Oct 2018 01:18:22 +0000 Subject: [issue34888] Python3.8 optimizes away a "while" line In-Reply-To: <1538611241.01.0.545547206417.issue34888@psf.upfronthosting.co.za> Message-ID: <1538615902.28.0.545547206417.issue34888@psf.upfronthosting.co.za> Yury Selivanov added the comment: > I assume there is some place that notices that the while condition is a constant, and therefore doesn't need to be explicitly evaluated? Ah, I see what you're asking about. I'll need to double check that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 21:24:08 2018 From: report at bugs.python.org (Alex Henrie) Date: Thu, 04 Oct 2018 01:24:08 +0000 Subject: [issue34889] int.to_bytes and int.from_bytes should default to the system byte order like the struct module does Message-ID: <1538616248.5.0.545547206417.issue34889@psf.upfronthosting.co.za> New submission from Alex Henrie : When serializing a single integer, int.to_bytes and int.from_bytes are more efficient alternatives to struct.pack and struct.unpack. However, struct.pack and struct.unpack currently have the advantage that the byteorder does not have to be specified (because it defaults to sys.byteorder). It would avoid a lot of redundant code to make the byteorder argument default to sys.byteorder in int.to_bytes and int.from_bytes too. ---------- components: Library (Lib) messages: 327030 nosy: alex.henrie priority: normal severity: normal status: open title: int.to_bytes and int.from_bytes should default to the system byte order like the struct module does versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 21:32:37 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 04 Oct 2018 01:32:37 +0000 Subject: [issue2506] Add mechanism to disable optimizations In-Reply-To: <1206797921.05.0.258043023613.issue2506@psf.upfronthosting.co.za> Message-ID: <1538616757.11.0.545547206417.issue2506@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- keywords: +patch pull_requests: +9080 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 21:43:11 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 04 Oct 2018 01:43:11 +0000 Subject: [issue34888] Python3.8 optimizes away a "while" line In-Reply-To: <1538611241.01.0.545547206417.issue34888@psf.upfronthosting.co.za> Message-ID: <1538617391.92.0.545547206417.issue34888@psf.upfronthosting.co.za> Yury Selivanov added the comment: > I assume there is some place that notices that the while condition is a constant, and therefore doesn't need to be explicitly evaluated? To answer your question: yes, and it's unrelated to both peephole optimizer and to the above mentioned grand refactoring of the ceval loop :) But if we add "-X noopt" (or equivalent) we can disable those micro-optimizations too. Let's track this in https://github.com/python/cpython/pull/9693 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 22:23:29 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 04 Oct 2018 02:23:29 +0000 Subject: [issue34869] remove LDLAST In-Reply-To: <1538455290.81.0.545547206417.issue34869@psf.upfronthosting.co.za> Message-ID: <1538619809.47.0.545547206417.issue34869@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 65ed12cb7caba6ef4eb0ba18cbede5eab4e1c7a5 by Benjamin Peterson in branch 'master': closes bpo-34869: Remove LDLAST. (GH-9667) https://github.com/python/cpython/commit/65ed12cb7caba6ef4eb0ba18cbede5eab4e1c7a5 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 22:37:02 2018 From: report at bugs.python.org (Alex Henrie) Date: Thu, 04 Oct 2018 02:37:02 +0000 Subject: [issue34889] int.to_bytes and int.from_bytes should default to the system byte order like the struct module does In-Reply-To: <1538616248.5.0.545547206417.issue34889@psf.upfronthosting.co.za> Message-ID: <1538620622.2.0.545547206417.issue34889@psf.upfronthosting.co.za> Change by Alex Henrie : ---------- keywords: +patch pull_requests: +9081 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 22:39:55 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 04 Oct 2018 02:39:55 +0000 Subject: [issue34889] int.to_bytes and int.from_bytes should default to the system byte order like the struct module does In-Reply-To: <1538616248.5.0.545547206417.issue34889@psf.upfronthosting.co.za> Message-ID: <1538620795.56.0.545547206417.issue34889@psf.upfronthosting.co.za> Josh Rosenberg added the comment: to_bytes and from_bytes aren't remotely related to native primitive types, struct is. If the associated lengths aren't 2, 4 or 8, there is no real correlation with system level primitives, and providing these defaults makes it easy to accidentally write non-portable code. Providing a default might make sense, but if you do, it should be a fixed default (so output is portable). Making it depend on the system byte order for no real reason aside from "so I can do struct-like things faster in a non-struct way" is not a valid reason to make a behavior both implicit and inconsistent. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 22:51:41 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 04 Oct 2018 02:51:41 +0000 Subject: [issue34889] int.to_bytes and int.from_bytes should default to the system byte order like the struct module does In-Reply-To: <1538616248.5.0.545547206417.issue34889@psf.upfronthosting.co.za> Message-ID: <1538621501.44.0.545547206417.issue34889@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It may be acceptable to allow for byteorder="native", but making the default native will make it too easy for people to write code that works great on their machine but not machines with the opposite endianess. Byte order is something you should explicitly think about everything you serialize an integer. So, I'm going to reject this proposal as stated. ---------- nosy: +benjamin.peterson resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 3 23:07:06 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 04 Oct 2018 03:07:06 +0000 Subject: [issue34887] bytes subclass __repr__ raise SystemError when set to bytes.decode In-Reply-To: <1538609758.67.0.545547206417.issue34887@psf.upfronthosting.co.za> Message-ID: <1538622426.09.0.545547206417.issue34887@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Can't reproduce this on the 3.6 branch. ---------- nosy: +benjamin.peterson resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 00:50:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2018 04:50:23 +0000 Subject: [issue2506] Add mechanism to disable optimizations In-Reply-To: <1206797921.05.0.258043023613.issue2506@psf.upfronthosting.co.za> Message-ID: <1538628623.2.0.545547206417.issue2506@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Note that disabling bytecode optimizations will not help to solve other problems with the coverity tool in 3.8: issue34705 and issue34876. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 01:58:17 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 04 Oct 2018 05:58:17 +0000 Subject: [issue33331] Clean modules in the reversed order In-Reply-To: <1538400588.02.0.545547206417.issue33331@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Aye, that option sounds like it would work to me (as long as throwing an exception is counted as finishing execution, so the failed module gets moved to the end before getting cleaned up) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 02:06:09 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 04 Oct 2018 06:06:09 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538633169.89.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > I've posted several SeaHash cores that suffer no collisions at all in any of our tests (including across every "bad example" in these 100+ messages), except for "the new" tuple test. Which it also passed, most recently with 7 collisions. That was under 64-bit builds, though, and from what follows I figure you're only looking at 32-bit builds for now. Note that I'm always considering parametrized versions of the hash functions that I'm testing. I'm replacing the fixed multiplier (all algorithms mentioned here have such a thing) by a random multiplier which is 3 mod 8. I keep the other constants. This allows me to look at the *probability* of passing the testsuite. That says a lot more than a simple yes/no answer for a single test. You don't want to pass the testsuite by random chance, you want to pass the testsuite because you have a high probability of passing it. And I'm testing 32-bit hashes indeed since we need to support that anyway and the probability of collisions is high enough to get interesting statistical data. For SeaHash, the probability of passing my new tuple test was only around 55%. For xxHash, this was about 85%. Adding some input mangling improved both scores, but the xxHash variant was still better than SeaHash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 02:36:59 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 04 Oct 2018 06:36:59 +0000 Subject: [issue34883] test_lzma: Multiple test failures when liblzma is built without complete codec set In-Reply-To: <1538562764.11.0.545547206417.issue34883@psf.upfronthosting.co.za> Message-ID: <1538635019.67.0.545547206417.issue34883@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 03:29:56 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 04 Oct 2018 07:29:56 +0000 Subject: [issue34890] Support functools.partial in inspect.is*function() checks Message-ID: <1538638196.31.0.545547206417.issue34890@psf.upfronthosting.co.za> New submission from Andrew Svetlov : isfunction() processes both `isfunction(func)` and `isfunction(partial(func, arg))` correctly. But `iscoroutinefunction()` misses this functionality. We can implement it easy by adding a check for `isinstance(func, partial)` and applying a coroutine check for `func.func`. Also, we can do the same for `isgeneratorfunction()` and `isasyncgenfunction()`. The patch looks easy and straightforward. Yuri, what do you think about? ---------- components: Library (Lib) messages: 327039 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Support functools.partial in inspect.is*function() checks versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 03:41:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2018 07:41:32 +0000 Subject: [issue34739] Get rid of tp_getattro in xml.etree.ElementTree.XMLParser In-Reply-To: <1537367112.3.0.956365154283.issue34739@psf.upfronthosting.co.za> Message-ID: <1538638892.88.0.545547206417.issue34739@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b2953fa3dda5898fcb0029792d9229f150e6e2cb by Serhiy Storchaka in branch 'master': bpo-34739: Get rid of tp_getattro in xml.etree.ElementTree.XMLParser. (GH-9420) https://github.com/python/cpython/commit/b2953fa3dda5898fcb0029792d9229f150e6e2cb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 03:42:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2018 07:42:10 +0000 Subject: [issue34740] Get rid of tp_getattro in ossaudiodev.oss_audio_device In-Reply-To: <1537367489.08.0.956365154283.issue34740@psf.upfronthosting.co.za> Message-ID: <1538638930.44.0.545547206417.issue34740@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 5f5a7781c8bf7bcc476d3e05d980711be3920724 by Serhiy Storchaka in branch 'master': bpo-34740: Get rid of tp_getattro in ossaudiodev.oss_audio_device. (GH-9421) https://github.com/python/cpython/commit/5f5a7781c8bf7bcc476d3e05d980711be3920724 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 03:43:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2018 07:43:25 +0000 Subject: [issue34740] Get rid of tp_getattro in ossaudiodev.oss_audio_device In-Reply-To: <1537367489.08.0.956365154283.issue34740@psf.upfronthosting.co.za> Message-ID: <1538639005.0.0.545547206417.issue34740@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 Oct 4 03:43:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2018 07:43:39 +0000 Subject: [issue34739] Get rid of tp_getattro in xml.etree.ElementTree.XMLParser In-Reply-To: <1537367112.3.0.956365154283.issue34739@psf.upfronthosting.co.za> Message-ID: <1538639019.54.0.545547206417.issue34739@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 Oct 4 04:21:13 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 04 Oct 2018 08:21:13 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538641273.81.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > Note: I'm assuming that by "PRIME32_2" you mean 2246822519U Yes indeed. > and that "MULTIPLIER" means 2654435761U. No, I mean a randomly chosen multiplier which is 3 mod 8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 04:24:05 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 04 Oct 2018 08:24:05 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538641445.97.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > people already wrote substantial test suites dedicated to that sole purpose, and we should aim to be "mere consumers" of functions that pass _those_ tests. There are hash functions that pass those tests which are still bad in practice when used as tuple hash function. That's really unfortunate, but it's a fact that we need to live with. It means that we may need to do some adjustments to the hash functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 04:27:20 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 04 Oct 2018 08:27:20 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538641640.83.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > Taking an algorithm in wide use that's already known to get a top score on SMHasher and fiddling it to make a "slight" improvement in one tiny Python test doesn't make sense to me. What I'm doing is the most innocent change: just applying a fixed permutation on the *input* of the hash function. I'm not changing the actual hashing algorithm. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 04:30:25 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 04 Oct 2018 08:30:25 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538641825.38.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > In the 64-bit build there are no collisions across my tests except for 11 in the new tuple test. That's pretty bad actually. With 64 bits, you statistically expect something in the order of 10**-8 collisions. So what you're seeing is 9 orders of magnitude too many collisions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 04:31:16 2018 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Oct 2018 08:31:16 +0000 Subject: [issue27165] Skip callables when displaying exception fields in cgitb In-Reply-To: <1464689112.02.0.764355408735.issue27165@psf.upfronthosting.co.za> Message-ID: <1538641876.03.0.545547206417.issue27165@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +9082 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 05:42:07 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 04 Oct 2018 09:42:07 +0000 Subject: [issue34871] test_site fails if run after test_inspect In-Reply-To: <1538491062.89.0.545547206417.issue34871@psf.upfronthosting.co.za> Message-ID: <1538646127.13.0.545547206417.issue34871@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- keywords: +patch pull_requests: +9083 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 06:40:06 2018 From: report at bugs.python.org (Anthony Flury) Date: Thu, 04 Oct 2018 10:40:06 +0000 Subject: [issue34891] Multi-processing example inaccurate warning Message-ID: <1538649606.04.0.545547206417.issue34891@psf.upfronthosting.co.za> New submission from Anthony Flury : On the Multi-processing page (just above the reference section) there is a warning that the examples wont work from the interpreter. This is not entirely accurate in that the examples do work, in the interpreter within Linux (and Mac OS I think), where the O/S supports processes being forked. In fact it is only in Windows, where a brand new process needs to be started and the source is effectively re-imported is there an issue running the examples in the interpreter. Should the documentation make this clearer ? ---------- assignee: docs at python components: Documentation messages: 327046 nosy: anthony-flury, docs at python priority: normal severity: normal status: open title: Multi-processing example inaccurate warning versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 06:47:55 2018 From: report at bugs.python.org (Michael Felt) Date: Thu, 04 Oct 2018 10:47:55 +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: <1538650075.51.0.545547206417.issue11191@psf.upfronthosting.co.za> Michael Felt added the comment: The current PR8709 resolves two issues, not one - so will create a new issue for the second element. Am also shorting the NEWS text, with the expanded explanation here as: * skip the distutils test 'test_search_cpp' when not gcc as compiler because not all compilers, e.g. IBM xlc et al do not support redirected stdout when using the argument -E (aka cpp_preprocessing) while gcc is know to support the pair -E -o outputfile The additional find while researching this issue: * add the argument '-C' for AIX xlc cpp processing so comments are included in the cpp output rather than replaced by a single ' ' (space) char. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 06:53:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2018 10:53:48 +0000 Subject: [issue33331] Clean modules in the reversed order In-Reply-To: <1524393498.13.0.682650639539.issue33331@psf.upfronthosting.co.za> Message-ID: <1538650428.56.0.545547206417.issue33331@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: While this change fixes issue33328, it doesn't help with the similar issue13044 which is more complex. Still I think there is a value of wiping modules in such order. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 07:47:07 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 04 Oct 2018 11:47:07 +0000 Subject: [issue27165] Skip callables when displaying exception fields in cgitb In-Reply-To: <1464689112.02.0.764355408735.issue27165@psf.upfronthosting.co.za> Message-ID: <1538653627.62.0.545547206417.issue27165@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 08:02:08 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 04 Oct 2018 12:02:08 +0000 Subject: [issue34891] Multi-processing example inaccurate warning In-Reply-To: <1538649606.04.0.545547206417.issue34891@psf.upfronthosting.co.za> Message-ID: <1538654528.7.0.545547206417.issue34891@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. Are you referring to the below warning? > Functionality within this package requires that the __main__ module be importable by the children. This is covered in Programming guidelines however it is worth pointing out here. This means that some examples, such as the multiprocessing.pool.Pool examples will not work in the interactive interpreter. For example: I tried the example and it throws the AttributeError as shown in the example in Linux and MacOS. Maybe I am wrong on the above. Can you please add in the specific example that is shown as not executable from the interpreter but actually works? Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 08:57:43 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Thu, 04 Oct 2018 12:57:43 +0000 Subject: [issue34871] test_site fails if run after test_inspect In-Reply-To: <1538491062.89.0.545547206417.issue34871@psf.upfronthosting.co.za> Message-ID: <1538657863.08.0.545547206417.issue34871@psf.upfronthosting.co.za> Change by Chih-Hsuan Yen : ---------- pull_requests: +9084 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 09:15:05 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Oct 2018 13:15:05 +0000 Subject: [issue34871] test_site fails if run after test_inspect In-Reply-To: <1538491062.89.0.545547206417.issue34871@psf.upfronthosting.co.za> Message-ID: <1538658905.53.0.545547206417.issue34871@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c57eb9a336391dc22aa29e9db592fa06d7fb7101 by Miss Islington (bot) (Chih-Hsuan Yen) in branch 'master': bpo-34871: Fix two typos in test_inspect.py (GH-9698) https://github.com/python/cpython/commit/c57eb9a336391dc22aa29e9db592fa06d7fb7101 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 09:15:12 2018 From: report at bugs.python.org (=?utf-8?q?Adam_Biela=C5=84ski?=) Date: Thu, 04 Oct 2018 13:15:12 +0000 Subject: [issue27165] Skip callables when displaying exception fields in cgitb In-Reply-To: <1464689112.02.0.764355408735.issue27165@psf.upfronthosting.co.za> Message-ID: <1538658912.3.0.545547206417.issue27165@psf.upfronthosting.co.za> Change by Adam Biela?ski : ---------- pull_requests: +9085 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 09:31:14 2018 From: report at bugs.python.org (Florian Michaux) Date: Thu, 04 Oct 2018 13:31:14 +0000 Subject: [issue34892] persistence of attributes with new instance Message-ID: <1538659874.64.0.545547206417.issue34892@psf.upfronthosting.co.za> New submission from Florian Michaux : Hello, I don't know what's going on. When using a for loop over multiple same instance creation, i got persistence with instance attributes Code example in attachement. ---------- components: Interpreter Core files: buggyclass.py messages: 327051 nosy: Florian Michaux priority: normal severity: normal status: open title: persistence of attributes with new instance versions: Python 2.7, Python 3.7 Added file: https://bugs.python.org/file47848/buggyclass.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 09:38:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2018 13:38:42 +0000 Subject: [issue34892] persistence of attributes with new instance In-Reply-To: <1538659874.64.0.545547206417.issue34892@psf.upfronthosting.co.za> Message-ID: <1538660322.79.0.545547206417.issue34892@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is how default values work in Python. See the FAQ question: https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 10:45:00 2018 From: report at bugs.python.org (Pranav Devarakonda) Date: Thu, 04 Oct 2018 14:45:00 +0000 Subject: [issue34893] Add 2to3 fixer to change send and recv methods of socket object. Message-ID: <1538664300.49.0.545547206417.issue34893@psf.upfronthosting.co.za> New submission from Pranav Devarakonda : The send() method of the the Socket object in Python 3.x requires the data to be sent to be first converted into bytes(object) which was not the case with Python 2.x. The 2to3 tool doesn't handle this case and hence an explicit fixer would help many beginners learning the socket module(most tutorials regarding this online are in Python 2.x) Similarly the fixer can change the recv() method by converting the returned bytes object back to a str object. For example, consider the following lines in Python 2.x, (for demonstration only) s.send("Foo") #where 's' is a socket object data = s.recv(1024) After the 2to3 fixer has been applied the above lines will change to, s.send(str.encode("Foo")) data = s.recv(1024).decode("utf-8") PS: I am a beginner in open source so any changes or suggestions are welcome. ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 327053 nosy: benjamin.peterson, devarakondapranav priority: normal severity: normal status: open title: Add 2to3 fixer to change send and recv methods of socket object. type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 10:49:19 2018 From: report at bugs.python.org (Zachary Ware) Date: Thu, 04 Oct 2018 14:49:19 +0000 Subject: [issue6686] xml.sax.xmlreader.XMLReader.getProperty (xml.sax.handler.property_xml_string) returns bytes In-Reply-To: <1250018393.94.0.435666063731.issue6686@psf.upfronthosting.co.za> Message-ID: <1538664559.74.0.545547206417.issue6686@psf.upfronthosting.co.za> Change by Zachary Ware : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 11:13:53 2018 From: report at bugs.python.org (=?utf-8?q?Marcin_Raczy=C5=84ski?=) Date: Thu, 04 Oct 2018 15:13:53 +0000 Subject: [issue34894] Unexpected error while unpickling lxml.etree.Element object Message-ID: <1538666033.36.0.545547206417.issue34894@psf.upfronthosting.co.za> New submission from Marcin Raczy?ski : If we use pickle.HIGHEST_PROTOCOL we can pickle lxml.etree.Element object but unpickling give us misleading error description: >>> from lxml import etree >>> import pickle >>> import sys sys.version '2.7.15rc1 (default, Apr 15 2018, 21:51:34) \n[GCC 7.3.0]' >>> etree.__version__ u'4.2.5' >>> pickled = pickle.dumps(etree.Element('x'), protocol=pickle.HIGHEST_PROTOCOL) >>> pickle.loads(pickled) Traceback (most recent call last): File "", line 1, in pickle.loads(pickled) File "src/lxml/etree.pyx", line 1131, in lxml.etree._Element.__repr__ File "src/lxml/etree.pyx", line 981, in lxml.etree._Element.tag.__get__ File "src/lxml/apihelpers.pxi", line 19, in lxml.etree._assertValidNode AssertionError: invalid Element proxy at 140260172089392 See also: https://bugs.launchpad.net/lxml/+bug/736708 ---------- components: Library (Lib) messages: 327054 nosy: marc1nr priority: normal severity: normal status: open title: Unexpected error while unpickling lxml.etree.Element object type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 11:30:38 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 04 Oct 2018 15:30:38 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538667038.95.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > Taking an algorithm in wide use that's already known to get a top score on SMHasher and fiddling it to make a "slight" improvement in one tiny Python test doesn't make sense to me. OK, I won't do that. The difference is not that much anyway (it increases the test success rate from about 85% to 90%) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 11:32:54 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 04 Oct 2018 15:32:54 +0000 Subject: [issue34890] Support functools.partial in inspect.is*function() checks In-Reply-To: <1538638196.31.0.545547206417.issue34890@psf.upfronthosting.co.za> Message-ID: <1538667174.1.0.545547206417.issue34890@psf.upfronthosting.co.za> Yury Selivanov added the comment: I think the fact that `inspect.isfunction` recognizes partials is a very strong argument to enable inspect.iscoroutinefunction to do so as well. This is a backwards incompatible change though, strictly speaking. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 11:33:50 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 04 Oct 2018 15:33:50 +0000 Subject: [issue34890] Support functools.partial in inspect.is*function() checks In-Reply-To: <1538638196.31.0.545547206417.issue34890@psf.upfronthosting.co.za> Message-ID: <1538667230.19.0.545547206417.issue34890@psf.upfronthosting.co.za> Yury Selivanov added the comment: Feel free to work on the PR. If we want to push this to 3.8 we should do that now and have enough time for it to be tested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 11:44:12 2018 From: report at bugs.python.org (ulrich.stern) Date: Thu, 04 Oct 2018 15:44:12 +0000 Subject: [issue34878] Lock Objects documentation bug In-Reply-To: <1538523706.16.0.545547206417.issue34878@psf.upfronthosting.co.za> Message-ID: <1538667852.11.0.545547206417.issue34878@psf.upfronthosting.co.za> ulrich.stern added the comment: I still think the documentation should be changed, and an improved version would look more like your comment than what it looks now. I assume to most people "owning" means exclusively holding the lock, and a particular thread can do this for Lock Objects. For example, here what my #1 Google result for "lock ownership" (https://www.justsoftwaresolutions.co.uk/threading/locks-mutexes-semaphores.html) says: > What it means to "own" a lock depends on the precise type of the lockable object. For some lockable objects... In other cases, the definition is more fluid, and the ownership of the lock is more conceptual. In these cases, ownership can be relinquished by a different thread or object than the thread or object that acquired the lock. In my opinion, the Python documentation currently takes the unusual point of view "a thread cannot 'own' a lock since it could be 'stolen' (released) by another thread." And the Lock Objects documentation has no explanation for this view, which makes it possibly confusing. Since multithreading is often tricky, documentation improvement seems worthwhile. Happy to propose wording that incorporates our discussion if you are interested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 11:55:03 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 04 Oct 2018 15:55:03 +0000 Subject: [issue34776] Postponed annotations break inspection of dataclasses In-Reply-To: <1537699529.98.0.956365154283.issue34776@psf.upfronthosting.co.za> Message-ID: <1538668503.52.0.545547206417.issue34776@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Yury, thanks for your patch. I'll review it soon. Please note that postponed annotations only reveal a problem that we already had if anybody used a string forward reference: >>> from dataclasses import dataclass >>> from typing import get_type_hints >>> class C: ... pass ... >>> @dataclass ... class D: ... c: C ... >>> @dataclass ... class E: ... c: "C" ... >>> get_type_hints(C.__init__) {} >>> get_type_hints(D.__init__) {'c': , 'return': } >>> get_type_hints(E.__init__) Traceback (most recent call last): ... NameError: name 'C' is not defined ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 11:56:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2018 15:56:02 +0000 Subject: [issue34894] Unexpected error while unpickling lxml.etree.Element object In-Reply-To: <1538666033.36.0.545547206417.issue34894@psf.upfronthosting.co.za> Message-ID: <1538668562.46.0.545547206417.issue34894@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a tracker for bugs in the C implementation of Python. lxml is not a part of the Python standard library. Use corresponded bug trackers for reporting bugs in third-party packages. ---------- nosy: +serhiy.storchaka resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:02:22 2018 From: report at bugs.python.org (Tim Peters) Date: Thu, 04 Oct 2018 16:02:22 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538668942.85.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: > Note that I'm always considering parametrized > versions of the hash functions that I'm testing. > I'm replacing the fixed multiplier (all algorithms > mentioned here have such a thing) by a random > multiplier which is 3 mod 8. I've explained before in some detail that this makes NO SENSE for SeaHash: its multiplier was specially constructed to guarantee certain dispersion properties, to maximize the effectiveness of its "propagate right" step. You already have my explanation about that, and a link to the original Reddit thread in which it was proposed (and eagerly accepted by SeaHash's primary author). Also already explained that its multiplier appears to fail its design criteria at two specific bit positions. Which I can repair, but I would do so not by changing Python's version, but by bringing it to SeaHash's author's attention. OTOH, I haven't been able to find anything explaining why the xxHash authors picked what they picked. But they certainly didn't have "random" in mind - nobody does. You discovered for yourself by trying things that various properties make for bad multipliers, and people who work on these things "for real" knew that a long time ago. They almost certainly know a great deal more that we haven't thought of at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:06:57 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 04 Oct 2018 16:06:57 +0000 Subject: [issue34776] Postponed annotations break inspection of dataclasses In-Reply-To: <1537699529.98.0.956365154283.issue34776@psf.upfronthosting.co.za> Message-ID: <1538669217.42.0.545547206417.issue34776@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Please note that postponed annotations only reveal a problem that we already had if anybody used a string forward reference: Yeah, makes sense. It's cool that the PR fixes string forward references as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:16:03 2018 From: report at bugs.python.org (Tim Peters) Date: Thu, 04 Oct 2018 16:16:03 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538669763.3.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: >> In the 64-bit build there are no collisions across my >> tests except for 11 in the new tuple test. > That's pretty bad actually. With 64 bits, you statistically > expect something in the order of 10**-8 collisions. So > what you're seeing is 9 orders of magnitude too many collisions. You wrote the test, so you should remember that you throw away the top 32 bits of the 64-bit hash code :-) Tossing 345130 balls into 2**32 bins has an expected mean of 13.9 collisions and sdev 3.7. 11 collisions is fine. If I change the test to retain all the hash bits in the 64-bit build, there are no collisions in the new tuple test. If I change it again to retain only the high 32 hash bits, 27 collisions. Which is statistically suspect, but still universes away from "disaster" territory. ---------- components: +XML -Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:18:59 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 04 Oct 2018 16:18:59 +0000 Subject: [issue34893] Add 2to3 fixer to change send and recv methods of socket object. In-Reply-To: <1538664300.49.0.545547206417.issue34893@psf.upfronthosting.co.za> Message-ID: <1538669939.56.0.545547206417.issue34893@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. In my opinion it's difficult to handle this scenario and as far as I know 2to3 can only do syntax level changes with modular fixers for each case. Since Python is dynamic and there is no static type system available it's difficult to differentiate between a socket object and any other object that has the same API with send and recv methods like below : if foo(): s = Socket() else: s = AnotherSocketAPI() Hence in this case s might be another object that might have the same interface like Socket expecting string for send and recv. Since there is no static typing in Python it depends on runtime introspection to get it right. I will wait for others opinion on this. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:33:38 2018 From: report at bugs.python.org (Marcus) Date: Thu, 04 Oct 2018 16:33:38 +0000 Subject: [issue34895] Mark optional stdlib modules in documentation Message-ID: <1538670818.19.0.545547206417.issue34895@psf.upfronthosting.co.za> New submission from Marcus : Some stdlib modules have external build time dependencies and will be automatically disabled if the dependencies can't be met (cf. detect_modules() in setup.py). >From a user's perspective there is no reason to assume that the presence of a stdlib module may not be relied upon. See also the discussion on python-ideas (https://mail.python.org/pipermail/python-ideas/2018-October/054008.html). A rather simple to implement debugging aid would be to add a note to the affected modules' documentation, stating that these modules may not be available on all systems. ---------- assignee: docs at python components: Documentation messages: 327065 nosy: docs at python, of4tvziy priority: normal severity: normal status: open title: Mark optional stdlib modules in documentation type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:47:14 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Oct 2018 16:47:14 +0000 Subject: [issue34871] test_site fails if run after test_inspect In-Reply-To: <1538491062.89.0.545547206417.issue34871@psf.upfronthosting.co.za> Message-ID: <1538671634.68.0.545547206417.issue34871@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6f85b826b527e240551613aeec3118a5469e3a33 by Miss Islington (bot) (INADA Naoki) in branch 'master': bpo-34871: inspect: Don't pollute sys.modules (GH-9696) https://github.com/python/cpython/commit/6f85b826b527e240551613aeec3118a5469e3a33 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:47:27 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Oct 2018 16:47:27 +0000 Subject: [issue34871] test_site fails if run after test_inspect In-Reply-To: <1538491062.89.0.545547206417.issue34871@psf.upfronthosting.co.za> Message-ID: <1538671647.73.0.545547206417.issue34871@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9086 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:47:35 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Oct 2018 16:47:35 +0000 Subject: [issue34871] test_site fails if run after test_inspect In-Reply-To: <1538491062.89.0.545547206417.issue34871@psf.upfronthosting.co.za> Message-ID: <1538671655.38.0.545547206417.issue34871@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9087 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:52:13 2018 From: report at bugs.python.org (Ruchir Jha) Date: Thu, 04 Oct 2018 16:52:13 +0000 Subject: [issue34896] Unable to install Python 3.5 Message-ID: <1538671933.56.0.545547206417.issue34896@psf.upfronthosting.co.za> New submission from Ruchir Jha : Hi, I was trying to install Danjo to work on Python. However it was not working fine hence I uninstalled the version 3.5 which I installed and tried to install it again as the earlier version was used for Anaconda. However even after multiple attempts to install Python its throws and error 0x80070643 fatal error during python installation. I have restarted the system and have also cleared the cache. I am working under strict deaadline hence an urgent help will be highly appreciated ---------- components: Installation files: Python 3.5.0rc3 (64-bit)_20181004220550_000_core_JustForMe.log messages: 327067 nosy: ruchirjha priority: normal severity: normal status: open title: Unable to install Python 3.5 type: crash versions: Python 3.5 Added file: https://bugs.python.org/file47849/Python 3.5.0rc3 (64-bit)_20181004220550_000_core_JustForMe.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:55:14 2018 From: report at bugs.python.org (Tim Peters) Date: Thu, 04 Oct 2018 16:55:14 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538672114.62.0.545547206417.issue34751@psf.upfronthosting.co.za> Change by Tim Peters : ---------- components: +Interpreter Core -XML _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 12:58:56 2018 From: report at bugs.python.org (Zachary Ware) Date: Thu, 04 Oct 2018 16:58:56 +0000 Subject: [issue34896] Unable to install Python 3.5 In-Reply-To: <1538671933.56.0.545547206417.issue34896@psf.upfronthosting.co.za> Message-ID: <1538672336.88.0.545547206417.issue34896@psf.upfronthosting.co.za> Zachary Ware added the comment: According to the name of your log file, you're trying to install an old pre-release version (3.5.0rc3). Try the latest version instead (https://www.python.org/ftp/python/3.5.4/python-3.5.4-amd64-webinstall.exe). Since 3.5 is in security-fix-only mode and no more binary releases will be made, changes to the installer are out of scope and so I'm closing the issue. I would also recommend updating to 3.6 or 3.7 if at all possible; 3.5.4 is a couple of security fixes behind at this point. ---------- nosy: +zach.ware resolution: -> out of date stage: -> resolved status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 13:00:49 2018 From: report at bugs.python.org (Prashant Sharma) Date: Thu, 04 Oct 2018 17:00:49 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1538672449.9.0.545547206417.issue34576@psf.upfronthosting.co.za> Prashant Sharma added the comment: Should this change be done? If so, I would want to take up this issue. ---------- nosy: +gutsytechster _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 13:56:23 2018 From: report at bugs.python.org (Pranav Devarakonda) Date: Thu, 04 Oct 2018 17:56:23 +0000 Subject: [issue34893] Add 2to3 fixer to change send and recv methods of socket object. In-Reply-To: <1538664300.49.0.545547206417.issue34893@psf.upfronthosting.co.za> Message-ID: <1538675783.47.0.545547206417.issue34893@psf.upfronthosting.co.za> Pranav Devarakonda added the comment: Thanks for taking time and updating this, Karthikeyan Singaravelan. I do agree that there there is no proper way to find out if an object is of type socket or not. However other fixers in lib2to3 are not any different. For example the fix_dict.py changes every instance of viewkeys() method to keys() irrespective of the type of the object. And I guess that applies to all other fixers in lib2to3 as well. So that convinced me that a fix for this can also be accommodated. A compromise that we could foster, as I already mentioned is to make this fix explicit so users can use this only if they need it. Please find attached the fixer I wrote. I haven't made a PR yet. ---------- Added file: https://bugs.python.org/file47850/fix_socket_send_recv.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 14:08:31 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 04 Oct 2018 18:08:31 +0000 Subject: [issue34801] codecs.getreader() splits lines containing control characters In-Reply-To: <1537898724.68.0.545547206417.issue34801@psf.upfronthosting.co.za> Message-ID: <1538676511.06.0.545547206417.issue34801@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: codecs.getreader('utf-8')(open('test.txt', 'rb')) during iteration str.splitlines on the decoded data that takes '\x0b' as a valid newline as specified in [0] being a superset of universal newlines. Thus splits on '\x0b' as a valid newline for string and works correctly. ./python.exe Python 3.8.0a0 (heads/master:6f85b826b5, Oct 4 2018, 22:44:36) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> a = 'first line\x0b\x0bblah blah\nsecond line\n' # returned by codecs.getreader() >>> a.splitlines(keepends=True) ['first line\x0b', '\x0b', 'blah blah\n', 'second line\n'] # for bytes bytes.splitlines works only on universal-newlines thus doesn't split on '\x0b' [1] >>> b = b'first line\x0b\x0bblah blah\nsecond line\n' >>> b.splitlines(keepends=True) [b'first line\x0b\x0bblah blah\n', b'second line\n'] But io.TextIOWrapper only accepts None, '', '\n', '\r\n' and '\r' as newline for text mode but for binary files it's different as noted in readline to accept only '\n' [2] > The line terminator is always b'\n' for binary files; for text > files, the newlines argument to open can be used to select the line > terminator(s) recognized. Thus 'first line\x0b\x0bblah blah\nsecond line\n' gives ['first line\x0b\x0bblah blah\n', 'second line\n'] . Trying to use '\x0b' as new line results in illegal newline error in TextIOWrapper. Hope I am correct on the above analysis. [0] https://docs.python.org/3.8/library/stdtypes.html#str.splitlines [1] https://docs.python.org/3.8/library/stdtypes.html#bytes.splitlines [2] https://docs.python.org/3/library/io.html#io.TextIOBase.readline ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 14:16:24 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 04 Oct 2018 18:16:24 +0000 Subject: [issue34893] Add 2to3 fixer to change send and recv methods of socket object. In-Reply-To: <1538664300.49.0.545547206417.issue34893@psf.upfronthosting.co.za> Message-ID: <1538676984.48.0.545547206417.issue34893@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Ah, sorry I totally forgot about dict fixer. Thanks for the details. I would wait for Benjamin's call on this. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 14:20:46 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 04 Oct 2018 18:20:46 +0000 Subject: [issue34867] Add mode to disable small integer and interned string caches In-Reply-To: <1538440812.47.0.545547206417.issue34867@psf.upfronthosting.co.za> Message-ID: <1538677246.35.0.545547206417.issue34867@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Woudn't turning these off hurt performance a lot? If so, I don't know if people would actually use such a mode. Then it becomes pretty useless. Could we combine this idea with the PYTHONDEVMODE flag? If PYTHONDEVMODE is turned on, we could do a check like Serhiy suggests for inappropriate 'is' comparisons. That seems more useful to me. ---------- nosy: +nascheme _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 14:23:24 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 04 Oct 2018 18:23:24 +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: <1538677404.44.0.545547206417.issue34850@psf.upfronthosting.co.za> Neil Schemenauer added the comment: > The problem with a SyntaxWarning is that the wrong people will see it. It gets in the way of users of applications that happen to be written in Python. Turn the check on only when PYTHONDEVMODE is set? Seems like it solves the issue with the wrong people seeing the warning. ---------- nosy: +nascheme _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 15:26:34 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 04 Oct 2018 19:26:34 +0000 Subject: [issue34871] test_site fails if run after test_inspect In-Reply-To: <1538491062.89.0.545547206417.issue34871@psf.upfronthosting.co.za> Message-ID: <1538681194.87.0.545547206417.issue34871@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 70a083bc46aea84e3b3ffca2c10c295917a98fec by Yury Selivanov (Miss Islington (bot)) in branch '3.6': bpo-34871: inspect: Don't pollute sys.modules (GH-9696) (GH-9702) https://github.com/python/cpython/commit/70a083bc46aea84e3b3ffca2c10c295917a98fec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 15:26:37 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 04 Oct 2018 19:26:37 +0000 Subject: [issue34871] test_site fails if run after test_inspect In-Reply-To: <1538491062.89.0.545547206417.issue34871@psf.upfronthosting.co.za> Message-ID: <1538681197.59.0.545547206417.issue34871@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 476c294f260ebe1b44157a168c3dfa4a43724ce3 by Yury Selivanov (Miss Islington (bot)) in branch '3.7': bpo-34871: inspect: Don't pollute sys.modules (GH-9696) (#9701) https://github.com/python/cpython/commit/476c294f260ebe1b44157a168c3dfa4a43724ce3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 15:34:39 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 04 Oct 2018 19:34:39 +0000 Subject: [issue34871] test_site fails if run after test_inspect In-Reply-To: <1538491062.89.0.545547206417.issue34871@psf.upfronthosting.co.za> Message-ID: <1538681679.83.0.545547206417.issue34871@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thank you Inada-san for taking care of this. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 15:35:12 2018 From: report at bugs.python.org (Luna Chen) Date: Thu, 04 Oct 2018 19:35:12 +0000 Subject: [issue34844] logging.Formatter enhancement - Checking on style and fmt fields In-Reply-To: <1538252230.83.0.545547206417.issue34844@psf.upfronthosting.co.za> Message-ID: <1538681712.47.0.545547206417.issue34844@psf.upfronthosting.co.za> Change by Luna Chen : ---------- keywords: +patch pull_requests: +9088 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 15:45:42 2018 From: report at bugs.python.org (Tim Peters) Date: Thu, 04 Oct 2018 19:45:42 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538682342.49.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: >> people already wrote substantial test suites dedicated >> to that sole purpose, and we should aim to be "mere >> consumers" of functions that pass _those_ tests. > There are hash functions that pass those tests which > are still bad in practice when used as tuple hash function. Really? Which one(s)? If you're talking about that some fail badly when you _replace_ the constants they picked, I doubt they'd accept that as proof of anything. Things like FNV and DJB score poorly on SMHasher to begin with. > That's really unfortunate, but it's a fact that we need > to live with. I'm surprised they do as well as they do using less than a handful of invertible transformations per input, using state of the same bit width as the inputs. I don't expect them to be immune to all easily-provoked "worse than random" cases, though. Over time, these hashes change while keeping the same name. As noted before, this is at least the second version of SeaHash. The best of the original algorithms of this kind - murmurhash - is on its 3rd version now. The motivation is the same: someone bumps into real-life cases where they do _way way way_ worse than "random", and so they try to repair that as cheaply as possible. Most of these are designed for data centers to do cheap-as-possible reasonably robust fingerprinting of giant data blobs. They could already have used, e.g., SHA-2 for highly robust fingerprinting, but they don't want to pay the very much higher runtime cost. If you can provoke any deviation from randomness in that kind of hash, it's considered "broken" and is never used again. But in these far cheaper hashes, it's considered part of the tradeoffs. If you read the Reddit thread about SeaHash I cited before, the person who suggested the current transformations noted that there were still weaknesses in some areas of the input space he was able to find just by thinking about how it worked, but far milder than the weaknesses he found by thinking about how the original version worked. That doesn't imply there aren't far worse weaknesses in areas he _didn't_ think about. So it goes. > It means that we may need to do some adjustments to > the hash functions. I'm fine with the faithful (barring errors on my part) xxHash I posted here before. And I don't care whether it works "better" or "worse" on Python's tiny test suite if its constants are replaced, or its algorithm is "tweaked". When xxHash version 2 is released, I want it to be as mindless as possible to replace the guts of Python's tuple-hash loop with the guts of xxHash version 2. It's easy to believe that SMHasher has nothing testing the bit patterns produced by mixing two's-complement integers of similar magnitude but opposite signs. That's not the kind of data giant data centers are likely to have much of ;-) If Appleby can be talked into _adding_ that kind of keyset data to SMHasher, then the next generations of these hashes will deal with it for us. But an objectively small number of collisions more than expected in some such cases now doesn't annoy me enough to want to bother. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 15:47:00 2018 From: report at bugs.python.org (Pranav Devarakonda) Date: Thu, 04 Oct 2018 19:47:00 +0000 Subject: [issue34893] Add 2to3 fixer to change send and recv methods of socket object. In-Reply-To: <1538664300.49.0.545547206417.issue34893@psf.upfronthosting.co.za> Message-ID: <1538682420.38.0.545547206417.issue34893@psf.upfronthosting.co.za> Pranav Devarakonda added the comment: Thanks Karthikeyan ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 15:59:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2018 19:59:07 +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: <1538683147.84.0.545547206417.issue34850@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Turn the check on only when PYTHONDEVMODE is set? This will reduce the value of this warning to zero. If the user doesn't know that using "is" with string or numerical literals is bad and doesn't use checkers, it is unlikely that he uses PYTHONDEVMODE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:06:57 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 04 Oct 2018 20:06:57 +0000 Subject: [issue34725] Py_GetProgramFullPath() odd behaviour in Windows In-Reply-To: <1537291607.58.0.956365154283.issue34725@psf.upfronthosting.co.za> Message-ID: <1538683617.96.0.545547206417.issue34725@psf.upfronthosting.co.za> Steve Dower added the comment: Reading the docs, I'm pretty sure we need a new Py_SetProgramFullPath() function. Py_SetProgramName explicitly is only providing a hint to figure out the file containing the executable, and I really want this to make my new launcher feasible: https://github.com/zooba/cpython/blob/msix/Programs/launch.c Victor - I've tried for an hour now and I can't figure out where to put this value in all the new configuration stuff. I'm finding it *very* convoluted, with so much copying of config structs and then back-and-forth copying certain values around. Some guidance would be great. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:17:40 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 04 Oct 2018 20:17:40 +0000 Subject: [issue34801] codecs.getreader() splits lines containing control characters In-Reply-To: <1537898724.68.0.545547206417.issue34801@psf.upfronthosting.co.za> Message-ID: <1538684260.3.0.545547206417.issue34801@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Thank you for the research. The problem is indeed that \v is getting treated as a line separator. That is an intentional design choice, see: https://bugs.python.org/issue12855 It would seem to have some surprising implications for CSV parsing. E.g. if someone embeds a \v character in a quoted field, parsing the file using codecs.getreader() will cause the field to be split across two rows. Someone else has run into the same issue: https://www.enigma.com/blog/the-secret-world-of-newline-characters I'm not sure anything should be done. Perhaps we should do something to reduce that chances that people trip over this issue. E.g. if I want to parse a file containing Unicode text with the CSV module, how do I do it while allowing \v characters (or other new-line like characters other than \n) within fields? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:22:26 2018 From: report at bugs.python.org (Michael Felt) Date: Thu, 04 Oct 2018 20:22:26 +0000 Subject: [issue34897] distutils test errors when CXX is not set Message-ID: <1538684546.1.0.545547206417.issue34897@psf.upfronthosting.co.za> New submission from Michael Felt : while researching issue11191 I cam across 6 additional errors. There is a test in Lib/test/support/__init__.py def missing_compiler_executable(cmd_names=[]): """Check if the compiler components used to build the interpreter exist. Check for the existence of the compiler executables whose names are listed in 'cmd_names' or all the compiler executables when 'cmd_names' is empty and return the first missing executable or None when none is found missing. """ from distutils import ccompiler, sysconfig, spawn compiler = ccompiler.new_compiler() sysconfig.customize_compiler(compiler) for name in compiler.executables: if cmd_names and name not in cmd_names: continue cmd = getattr(compiler, name) if cmd_names: assert cmd is not None, \ "the '%s' executable is not configured" % name elif cmd is None: continue if spawn.find_executable(cmd[0]) is None: return cmd[0] The "elif cmd is None:" is not successful because cmd maybe '' (null string) Initially I thought to change to "elif cmd is None or (not cmd):" but I hope I found a better resolution! In: Lib/distutils/sysconfig.py the final bits of customize_compiler is: compiler.set_executables( preprocessor=cpp, compiler=cc_cmd, compiler_so=cc_cmd + ' ' + ccshared, compiler_cxx=cxx, linker_so=ldshared, linker_exe=cc, archiver=archiver) the value for cxx come from os.environ, if set, otherwise it comes from get_sys_vars() (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \ get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') If, during the build, CXX was not set - this sets cxx to the null string (''). So the fix is to assign cxx = None when len(cxx) == 0 if 'CXX' in os.environ: cxx = os.environ['CXX'] if not len(cxx): cxx = None While this only seems to happen for cxx - maybe this should be extended to all the variables in (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags)? So, ultimately - I choose to go with changing : compiler.set_executables() diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py index b71d1d39bc..2e08c4abd2 100644 --- a/Lib/distutils/ccompiler.py +++ b/Lib/distutils/ccompiler.py @@ -148,7 +148,7 @@ class CCompiler: if key not in self.executables: raise ValueError("unknown executable '%s' for class %s" % (key, self.__class__.__name__)) - self.set_executable(key, kwargs[key]) + self.set_executable(key, kwargs[key] if len(kwargs[key]) else None) def set_executable(self, key, value): if isinstance(value, str): Was: ====================================================================== ERROR: test_run (distutils.tests.test_build_clib.BuildCLibTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/distutils/tests/test_build_clib.py", line 121, in test_run ccmd = missing_compiler_executable() File "/data/prj/python/git/python3-3.8/Lib/test/support/__init__.py", line 2730, in missing_compiler_executable if spawn.find_executable(cmd[0]) is None: IndexError: list index out of range ====================================================================== ERROR: test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/distutils/tests/test_build_ext.py", line 62, in test_build_ext cmd = support.missing_compiler_executable() File "/data/prj/python/git/python3-3.8/Lib/test/support/__init__.py", line 2730, in missing_compiler_executable if spawn.find_executable(cmd[0]) is None: IndexError: list index out of range ====================================================================== ERROR: test_get_outputs (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/distutils/tests/test_build_ext.py", line 308, in test_get_outputs cmd = support.missing_compiler_executable() File "/data/prj/python/git/python3-3.8/Lib/test/support/__init__.py", line 2730, in missing_compiler_executable if spawn.find_executable(cmd[0]) is None: IndexError: list index out of range ====================================================================== ERROR: test_build_ext (distutils.tests.test_build_ext.ParallelBuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/distutils/tests/test_build_ext.py", line 62, in test_build_ext cmd = support.missing_compiler_executable() File "/data/prj/python/git/python3-3.8/Lib/test/support/__init__.py", line 2730, in missing_compiler_executable if spawn.find_executable(cmd[0]) is None: IndexError: list index out of range ====================================================================== ERROR: test_get_outputs (distutils.tests.test_build_ext.ParallelBuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/distutils/tests/test_build_ext.py", line 308, in test_get_outputs cmd = support.missing_compiler_executable() File "/data/prj/python/git/python3-3.8/Lib/test/support/__init__.py", line 2730, in missing_compiler_executable if spawn.find_executable(cmd[0]) is None: IndexError: list index out of range ====================================================================== ERROR: test_record_extensions (distutils.tests.test_install.InstallTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/distutils/tests/test_install.py", line 200, in test_record_extensions cmd = test_support.missing_compiler_executable() File "/data/prj/python/git/python3-3.8/Lib/test/support/__init__.py", line 2730, in missing_compiler_executable if spawn.find_executable(cmd[0]) is None: IndexError: list index out of range ---------- components: Distutils messages: 327083 nosy: Michael.Felt, dstufft, eric.araujo priority: normal severity: normal status: open title: distutils test errors when CXX is not set type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 16:38:13 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 04 Oct 2018 20:38:13 +0000 Subject: [issue34801] codecs.getreader() splits lines containing control characters In-Reply-To: <1537898724.68.0.545547206417.issue34801@psf.upfronthosting.co.za> Message-ID: <1538685493.67.0.545547206417.issue34801@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Perhaps the 'csv' module should do some sanity checking on the file passed to the reader. The docs recommend that newline='' be used to open the file. Maybe 'csv' could check that and warn if its not the case. I poked around but it seems like io files don't have a handy property to check for that. Further, maybe 'csv' could check if the file is a codecs.StreamReader object. In that case, there is no way to turn off the extra newline characters and so that's probably a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:01:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Oct 2018 21:01:39 +0000 Subject: [issue34801] codecs.getreader() splits lines containing control characters In-Reply-To: <1537898724.68.0.545547206417.issue34801@psf.upfronthosting.co.za> Message-ID: <1538686899.62.0.545547206417.issue34801@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a duplicate of issue18291. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> codecs.open interprets FS, RS, GS as line ends _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:05:46 2018 From: report at bugs.python.org (rian) Date: Thu, 04 Oct 2018 21:05:46 +0000 Subject: [issue34041] add *deterministic* parameter to sqlite3.Connection.create_function() In-Reply-To: <1530698654.39.0.56676864532.issue34041@psf.upfronthosting.co.za> Message-ID: <1538687146.36.0.545547206417.issue34041@psf.upfronthosting.co.za> rian added the comment: Any possible way we can backport these changes to Python 3.5+? 3.8 is a ways away. ---------- nosy: +rian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:20:11 2018 From: report at bugs.python.org (Martin Panter) Date: Thu, 04 Oct 2018 21:20:11 +0000 Subject: [issue26005] Denial of Service in SimpleHTTPServer and BaseHTTPServer In-Reply-To: <1451897650.58.0.64883073344.issue26005@psf.upfronthosting.co.za> Message-ID: <1538688011.77.0.545547206417.issue26005@psf.upfronthosting.co.za> Martin Panter added the comment: Issue 34576 was recently opened about adding a security warning. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> [EASY doc] http.server, SimpleHTTPServer: warn users on security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:22:04 2018 From: report at bugs.python.org (Guo Ci Teo) Date: Thu, 04 Oct 2018 21:22:04 +0000 Subject: [issue34898] add mtime argument to gzip.compress Message-ID: <1538688124.68.0.545547206417.issue34898@psf.upfronthosting.co.za> New submission from Guo Ci Teo : With the `mtime` argument, the output from `gzip.compress` can be reproducible. ---------- components: Library (Lib) messages: 327088 nosy: guoci priority: normal severity: normal status: open title: add mtime argument to gzip.compress versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:22:10 2018 From: report at bugs.python.org (Martin Panter) Date: Thu, 04 Oct 2018 21:22:10 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1538688130.74.0.545547206417.issue34576@psf.upfronthosting.co.za> Martin Panter added the comment: FYI Senthil made an earlier suggestion for wording at ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:27:44 2018 From: report at bugs.python.org (Guo Ci Teo) Date: Thu, 04 Oct 2018 21:27:44 +0000 Subject: [issue34898] add mtime argument to gzip.compress In-Reply-To: <1538688124.68.0.545547206417.issue34898@psf.upfronthosting.co.za> Message-ID: <1538688464.55.0.545547206417.issue34898@psf.upfronthosting.co.za> Change by Guo Ci Teo : ---------- keywords: +patch pull_requests: +9089 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 17:47:52 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 04 Oct 2018 21:47:52 +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: <1538689672.47.0.545547206417.issue21880@psf.upfronthosting.co.za> Tal Einat added the comment: It's unfortunate that this has gone dormant for so long. Is anyone interested in picking this up? I'd be happy to provide guidance and feedback. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:10:47 2018 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 04 Oct 2018 22:10:47 +0000 Subject: [issue34899] Possible assertion failure due to int_from_bytes_impl() Message-ID: <1538691047.46.0.545547206417.issue34899@psf.upfronthosting.co.za> New submission from Zackery Spytz : If _PyLong_FromByteArray() fails in int_from_bytes_impl(), PyObject_CallFunctionObjArgs() might be called with a live exception. ---------- components: Interpreter Core messages: 327091 nosy: ZackerySpytz priority: normal severity: normal status: open title: Possible assertion failure due to int_from_bytes_impl() type: crash versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:13:45 2018 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 04 Oct 2018 22:13:45 +0000 Subject: [issue34899] Possible assertion failure due to int_from_bytes_impl() In-Reply-To: <1538691047.46.0.545547206417.issue34899@psf.upfronthosting.co.za> Message-ID: <1538691225.08.0.545547206417.issue34899@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +9090 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:24:33 2018 From: report at bugs.python.org (Bruno Oliveira) Date: Thu, 04 Oct 2018 22:24:33 +0000 Subject: [issue34900] unittest subTests() fails when called from debug() Message-ID: <1538691873.85.0.545547206417.issue34900@psf.upfronthosting.co.za> New submission from Bruno Oliveira : Consider this code: import unittest class TC(unittest.TestCase): def test_subtest(self): with self.subTest(): pass tc = TC('test_subtest') tc.run() This works when executed, but if we change ``tc.run()`` to ``tc.debug()`` we get the following exception: Traceback (most recent call last): File ".tmp\test-unittest-regression.py", line 13, in tc.debug() File "C:\Users\Bruno\AppData\Local\Programs\Python\Python36\lib\unittest\case.py", line 658, in debug getattr(self, self._testMethodName)() File ".tmp\test-unittest-regression.py", line 7, in test_subtest with self.subTest(): File "C:\Users\Bruno\AppData\Local\Programs\Python\Python36\lib\contextlib.py", line 81, in __enter__ return next(self.gen) File "C:\Users\Bruno\AppData\Local\Programs\Python\Python36\lib\unittest\case.py", line 512, in subTest if not self._outcome.result_supports_subtests: AttributeError: 'NoneType' object has no attribute 'result_supports_subtests' Looking at the code, ``subTest`` assumes that the ``TestCase`` instance has the ``self._outcome`` atribute, which is set only by ``run()``. ---------- components: Library (Lib) messages: 327092 nosy: Bruno Oliveira priority: normal severity: normal status: open title: unittest subTests() fails when called from debug() versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:25:02 2018 From: report at bugs.python.org (Bruno Oliveira) Date: Thu, 04 Oct 2018 22:25:02 +0000 Subject: [issue34900] unittest subTests() fails when called from debug() In-Reply-To: <1538691873.85.0.545547206417.issue34900@psf.upfronthosting.co.za> Message-ID: <1538691902.46.0.545547206417.issue34900@psf.upfronthosting.co.za> Change by Bruno Oliveira : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:26:33 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 04 Oct 2018 22:26:33 +0000 Subject: [issue34867] Add mode to disable small integer and interned string caches In-Reply-To: <1538440812.47.0.545547206417.issue34867@psf.upfronthosting.co.za> Message-ID: <1538691993.56.0.545547206417.issue34867@psf.upfronthosting.co.za> Gregory P. Smith added the comment: The intent is to use only enable this during testing / continuous integration. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:33:40 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 04 Oct 2018 22:33:40 +0000 Subject: [issue30825] csv.Sniffer does not detect lineterminator In-Reply-To: <1498944224.71.0.636990812421.issue30825@psf.upfronthosting.co.za> Message-ID: <1538692420.85.0.545547206417.issue30825@psf.upfronthosting.co.za> Neil Schemenauer added the comment: There is another issue related to this. If you use codecs to get a reader, it uses str.splitlines() internally, which treats a bunch of different characters as line terminators. See issue #18291 and: https://docs.python.org/3.8/library/stdtypes.html#str.splitlines I was thinking about different ways to fix this. First, the csv module suggests you pass newline='' to the file object. I suspect most people don't know to do that. So, I thought maybe the csv module should inspect the file object that gets passed in and then warn if newline='' has not been used or if the file is a codecs reader object. However, that seems fairly complicated. Would it be better if we changed the 'csv' module to do its own line splitting? I think that would be better although I'm not sure about backwards compatibly. Currently, the reader expects to call iter() on the input file. Would it be okay if it used the 'read' method of it in preference to using iter()? It could still fallback to iter() if there was no read method. ---------- nosy: +nascheme _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 18:53:00 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 04 Oct 2018 22:53:00 +0000 Subject: [issue18291] codecs.open interprets FS, RS, GS as line ends In-Reply-To: <1372079472.71.0.230881178227.issue18291@psf.upfronthosting.co.za> Message-ID: <1538693580.59.0.545547206417.issue18291@psf.upfronthosting.co.za> Neil Schemenauer added the comment: I think one bug here is that codecs readers use str.splitlines() internally. The splitlines method treats a bunch of different characters as line separators, unlike io..readlines(). So, you end up with different behavior between doing iter(codecs.getreader(...)) and iter(io.open(...)). We can argue if str.splitlines() is doing the correct thing, see the table here: https://docs.python.org/3.8/library/stdtypes.html#str.splitlines However, it seems clearer to me that readlines() on a codecs reader and on a file object should really be splitting lines on the same characters. ---------- nosy: +nascheme versions: -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 19:21:58 2018 From: report at bugs.python.org (Michael Felt) Date: Thu, 04 Oct 2018 23:21:58 +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: <1538695318.63.0.545547206417.issue34897@psf.upfronthosting.co.za> Change by Michael Felt : ---------- keywords: +patch pull_requests: +9091 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 19:27:13 2018 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Oct 2018 23:27:13 +0000 Subject: [issue34900] unittest subTests() fails when called from debug() In-Reply-To: <1538691873.85.0.545547206417.issue34900@psf.upfronthosting.co.za> Message-ID: <1538695633.63.0.545547206417.issue34900@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +9092 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 20:20:23 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 05 Oct 2018 00:20:23 +0000 Subject: [issue18291] codecs.open interprets FS, RS, GS as line ends In-Reply-To: <1372079472.71.0.230881178227.issue18291@psf.upfronthosting.co.za> Message-ID: <1538698823.56.0.545547206417.issue18291@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Attached is a rough patch that tries to fix this problem. I changed the behavior in that unicode char 0x2028 is no longer treated as a line separator. It would be trival to change the regex to support that too, if we want to preserve backwards compatibility. Personally, I think readlines() on a codecs reader should do that same line splitting as an 'io' file. If we want to use the patch, the following must yet be done: write tests that check the splitting on FS, RS, and GS characters. Write a news entry. I didn't do any profiling to see what the performance effect of my change is so that should be checked too. ---------- Added file: https://bugs.python.org/file47851/codecs_splitlines.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 22:30:41 2018 From: report at bugs.python.org (Oleg Serov) Date: Fri, 05 Oct 2018 02:30:41 +0000 Subject: [issue29143] Logger should ignore propagate property for disabled handlers. In-Reply-To: <1483465774.47.0.809201158116.issue29143@psf.upfronthosting.co.za> Message-ID: <1538706641.82.0.545547206417.issue29143@psf.upfronthosting.co.za> Oleg Serov added the comment: I tried and failed to reproduce. If it changes, I'll update it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 23:13:31 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Oct 2018 03:13:31 +0000 Subject: [issue34900] unittest subTests() fails when called from debug() In-Reply-To: <1538691873.85.0.545547206417.issue34900@psf.upfronthosting.co.za> Message-ID: <1538709211.82.0.545547206417.issue34900@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 23:23:44 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 05 Oct 2018 03:23:44 +0000 Subject: [issue18291] codecs.open interprets FS, RS, GS as line ends In-Reply-To: <1372079472.71.0.230881178227.issue18291@psf.upfronthosting.co.za> Message-ID: <1538709824.05.0.545547206417.issue18291@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Some further progress on this. My patch slows down reading files with the codecs module very significantly. So, I think it could never be merged as is. Maybe we would need to implement an alternative str.splitlines that behaves as we want, implemented in C. Looking at the uses of str.splitlines in the stdlib, I can't help but think there are many places where this (IMHO bad) behaviour of splitting on all these extra controls characters have made it so that splitlines should not be used in most cases. Or, we should change splitlines to work the same as the file readlines splitting. For example, RobotFileParser uses str.splitlines(). I suspect it should only be splitting on \n characters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 23:28:41 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Oct 2018 03:28:41 +0000 Subject: [issue18291] codecs.open interprets FS, RS, GS as line ends In-Reply-To: <1372079472.71.0.230881178227.issue18291@psf.upfronthosting.co.za> Message-ID: <1538710121.65.0.545547206417.issue18291@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 4 23:46:09 2018 From: report at bugs.python.org (Thrlwiti) Date: Fri, 05 Oct 2018 03:46:09 +0000 Subject: [issue23706] pathlib.Path.write_text should include a newline argument In-Reply-To: <1426757561.17.0.481870343329.issue23706@psf.upfronthosting.co.za> Message-ID: <1538711169.71.0.545547206417.issue23706@psf.upfronthosting.co.za> Change by Thrlwiti : ---------- nosy: +THRlWiTi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:16:40 2018 From: report at bugs.python.org (Danish Prakash) Date: Fri, 05 Oct 2018 04:16:40 +0000 Subject: [issue34901] Missing isolated (-I) flag in sys.flags table Message-ID: <1538713000.05.0.545547206417.issue34901@psf.upfronthosting.co.za> Change by Danish Prakash : ---------- assignee: docs at python components: Documentation nosy: danishprakash, docs at python priority: normal severity: normal status: open title: Missing isolated (-I) flag in sys.flags table 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 Fri Oct 5 00:20:30 2018 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Oct 2018 04:20:30 +0000 Subject: [issue34901] Missing isolated (-I) flag in sys.flags table Message-ID: <1538713230.41.0.545547206417.issue34901@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +9093 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:28:19 2018 From: report at bugs.python.org (Danish Prakash) Date: Fri, 05 Oct 2018 04:28:19 +0000 Subject: [issue34812] [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag In-Reply-To: <1537978023.88.0.545547206417.issue34812@psf.upfronthosting.co.za> Message-ID: <1538713699.51.0.545547206417.issue34812@psf.upfronthosting.co.za> Danish Prakash added the comment: Linking this[1] here in case someone else stumbles upon this thread. I've created an issue and a PR for the documentation issue regarding the absence of -I flag from the sys.flags table which came into picture from the discussions in this thread. [1]: https://bugs.python.org/issue34901 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 00:44:44 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 05 Oct 2018 04:44:44 +0000 Subject: [issue18291] codecs.open interprets FS, RS, GS as line ends In-Reply-To: <1372079472.71.0.230881178227.issue18291@psf.upfronthosting.co.za> Message-ID: <1538714684.97.0.545547206417.issue18291@psf.upfronthosting.co.za> Neil Schemenauer added the comment: New patch that changes str.splitlines to work like Python 2 str.splitlines and like Python 3 bytes.splitlines. Surprisingly, only a few cases in the unit test suite fail. I've fixed them in my patch. ---------- Added file: https://bugs.python.org/file47852/str_splitlines.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 01:11:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 05:11:50 +0000 Subject: [issue18291] codecs.open interprets FS, RS, GS as line ends In-Reply-To: <1372079472.71.0.230881178227.issue18291@psf.upfronthosting.co.za> Message-ID: <1538716310.8.0.545547206417.issue18291@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is an open issue for changing str.splitlines(): issue22232. It would help to fix this issue. The only problem is that we don't have agreement about the new parameter name (and changing the behavior unconditionally is not an option). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 01:45:27 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Oct 2018 05:45:27 +0000 Subject: [issue34902] Azure pipelines PR build fails with "Unexpected vmImage 'vs2017-win2017'" Message-ID: <1538718327.26.0.545547206417.issue34902@psf.upfronthosting.co.za> New submission from Karthikeyan Singaravelan : Azure pipelines PR seems to fail with the error "Unexpected vmImage 'vs2017-win2017'" . First build failure with this message : https://dev.azure.com/Python/cpython/_build/results?buildId=31800&view=results Last successful build : https://dev.azure.com/Python/cpython/_build/results?buildId=31797&view=results Thanks ---------- components: Build, Windows messages: 327102 nosy: paul.moore, steve.dower, tim.golden, xtreak, zach.ware priority: normal severity: normal status: open title: Azure pipelines PR build fails with "Unexpected vmImage 'vs2017-win2017'" versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 01:53:45 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Oct 2018 05:53:45 +0000 Subject: [issue34901] Missing isolated (-I) flag in sys.flags table Message-ID: <1538718824.99.0.545547206417.issue34901@psf.upfronthosting.co.za> New submission from Karthikeyan Singaravelan : Thanks for the PR @danishprakash . `-I` was added as part of 3.4 with commit ad73a9cf977 and not backported to 2.7 . Also 3.4 and 3.5 branches are in security fixes mode. So I am removing 2.7, 3.4 and 3.5 . ---------- nosy: +xtreak versions: -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 02:09:20 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 05 Oct 2018 06:09:20 +0000 Subject: [issue18291] codecs.open interprets FS, RS, GS as line ends In-Reply-To: <1372079472.71.0.230881178227.issue18291@psf.upfronthosting.co.za> Message-ID: <1538719760.71.0.545547206417.issue18291@psf.upfronthosting.co.za> Neil Schemenauer added the comment: I just found bug #22232 myself but thanks for pointing it out. > changing the behavior unconditionally is not an option At this point, I disagree. If I do a search on the web, lots of pages referring to str.splitlines() seem it imply that is splits only on \r and \n. For Python 2 that was correct. I think most people would be surprised by the Python 3 behaviour. I looked through the Python stdlib and marked any place str.splitlines() was used. I have more research to do yet but I think nearly all of these cases will work better (or perhaps correctly) if str.splitlines is changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 02:14:04 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 05 Oct 2018 06:14:04 +0000 Subject: [issue22232] str.splitlines splitting on non-\r\n characters In-Reply-To: <1408528911.37.0.452679392827.issue22232@psf.upfronthosting.co.za> Message-ID: <1538720044.32.0.545547206417.issue22232@psf.upfronthosting.co.za> Neil Schemenauer added the comment: If we introduce a keyword parameter, I think the default of str.splitlines() should be changed to match bytes.splitlines (and match Python 2 str.splitlines()). I.e. split on \r and \n by default. I looked through the stdline and I can't find any calls that should actually by splitting on the extra characters. I will check it again though. Does anyone have an example of where the current behaviour is actually wanted? ---------- nosy: +nascheme _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 02:42:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 06:42:34 +0000 Subject: [issue22232] str.splitlines splitting on non-\r\n characters In-Reply-To: <1408528911.37.0.452679392827.issue22232@psf.upfronthosting.co.za> Message-ID: <1538721754.98.0.545547206417.issue22232@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If change the default behavior we need to wait several releases after adding this option. Users should be able to pick the current behavior explicitly. Currently the workaround is using regular expressions. For s.splitlines(keepends=False): re.split(r'\n|\r\n?', s) For s.splitlines(keepends=True): re.split(r'(?<=\n)|(?<=\r)(?!\n)', s) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 02:57:35 2018 From: report at bugs.python.org (Danish Prakash) Date: Fri, 05 Oct 2018 06:57:35 +0000 Subject: [issue34901] Missing isolated (-I) flag in sys.flags table In-Reply-To: <1538718824.99.0.545547206417.issue34901@psf.upfronthosting.co.za> Message-ID: <1538722655.87.0.545547206417.issue34901@psf.upfronthosting.co.za> Danish Prakash added the comment: thank you for for making the corrections, however, what's with a version being in security fixes mode? I would like to read more about that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 03:15:38 2018 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 05 Oct 2018 07:15:38 +0000 Subject: [issue34844] logging.Formatter enhancement - Checking on style and fmt fields In-Reply-To: <1538252230.83.0.545547206417.issue34844@psf.upfronthosting.co.za> Message-ID: <1538723738.88.0.545547206417.issue34844@psf.upfronthosting.co.za> Vinay Sajip added the comment: I see a PR has been added, I'll start to review it after the CLA has been signed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 03:31:26 2018 From: report at bugs.python.org (Mike Gleen) Date: Fri, 05 Oct 2018 07:31:26 +0000 Subject: [issue34903] strptime %d handling of single digit day of month Message-ID: <1538724686.61.0.545547206417.issue34903@psf.upfronthosting.co.za> New submission from Mike Gleen : strptime correctly parses single digit day-of-month values (at least in the case of "%d %b %Y") which is the behavior I want. However, the documentation seems to say that the field must be two digits with a leading zero if necessary. So I hope that this is the intended behavior rather than just an accidental artifact. If so, then my suggestion is that the documentation be updated to reflect this. ---------- assignee: docs at python components: Documentation messages: 327109 nosy: Mike Gleen, docs at python priority: normal severity: normal status: open title: strptime %d handling of single digit day of month type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 03:39:52 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 05 Oct 2018 07:39:52 +0000 Subject: [issue34903] strptime %d handling of single digit day of month In-Reply-To: <1538724686.61.0.545547206417.issue34903@psf.upfronthosting.co.za> Message-ID: <1538725192.15.0.545547206417.issue34903@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Mike, Thank you for your issue, but could you add the link to the documentation, just because we have time.strptime and datetime.datetime.strptime. Thank you, ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 03:59:57 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Oct 2018 07:59:57 +0000 Subject: [issue34901] Missing isolated (-I) flag in sys.flags table In-Reply-To: <1538718824.99.0.545547206417.issue34901@psf.upfronthosting.co.za> Message-ID: <1538726397.78.0.545547206417.issue34901@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Every release has a PEP associated with it from 3.6 and above that says about the lifespan of the release with bug fix releases and the time where it enters security fixes only mode. Now 3.4 and 3.5 are in security fixes mode where only security updates for the most part are accepted and the changes are pulled in by the release manager to the respective branches. Also there will be no binary releases and only source releases for security only branches. Python 3.5.6 security announcement : https://www.python.org/downloads/release/python-356/ > Python 3.5 has now entered "security fixes only" mode, and as such the only changes since Python 3.5.4 are security fixes. Also, Python 3.5.6 has only been released in source code form; no more official binary installers will be produced. Python 3.8 release lifespan : https://www.python.org/dev/peps/pep-0569/#lifespan So I have removed 3.4 and 3.5 but it's up to the reviewer to decide if this needs to be backported or not to those branches. I hope I am correct on the above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 04:07:02 2018 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 05 Oct 2018 08:07:02 +0000 Subject: [issue18291] codecs.open interprets FS, RS, GS as line ends In-Reply-To: <1372079472.71.0.230881178227.issue18291@psf.upfronthosting.co.za> Message-ID: <1538726822.65.0.545547206417.issue18291@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: The Unicode .splitlines() splits strings on what Unicode defines as linebreak characters (all code points with character properties Zl or bidirectional property B). This is different than what typical CSV file parsers or other parsers built for the ASCII text files treat as newline. They usually only break on CR, CRLF, LF, so the use of .splitlines() in this context is wrong, not the method itself. It may make sense extending .splitlines() to pass in a list of linebreak characters to break on, but that would make it a lot slower and the same can already be had by using re.split() on Unicode strings. Closing this as won't fix. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 04:17:42 2018 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 05 Oct 2018 08:17:42 +0000 Subject: [issue22232] str.splitlines splitting on non-\r\n characters In-Reply-To: <1408528911.37.0.452679392827.issue22232@psf.upfronthosting.co.za> Message-ID: <1538727462.0.0.545547206417.issue22232@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: I am -1 on changing the default behavior. The Unicode standard defines what a linebreak code point is (all code points with character properties Zl or bidirectional property B) and we adhere to that. This may confuse parsers coming from the ASCII world, but that's really a problem with those parsers assuming that .splitlines() only splits on ASCII line breaks, i.e. they are not written in a Unicode compatible way. As mentioned in https://bugs.python.org/issue18291 we could add a parameter to .splitlines(), but this would render the method not much faster than re.split(). Using re.split() is not a work-around in his case, it's an explicit form of defining the character you want to split lines on, if the standards defining your file format as only accepting ASCII line break characters. Since there are many such file formats, perhaps adding a parameter asciionly=True/False would make sense. .splitlines() could then be made to only split on ASCII linebreak characters. This new parameter would then have to default to False to maintain compatibility with Unicode and all previous releases. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 05:19:29 2018 From: report at bugs.python.org (=?utf-8?q?Marcin_Raczy=C5=84ski?=) Date: Fri, 05 Oct 2018 09:19:29 +0000 Subject: [issue34894] Unexpected error while unpickling lxml.etree.Element object In-Reply-To: <1538666033.36.0.545547206417.issue34894@psf.upfronthosting.co.za> Message-ID: <1538731169.61.0.545547206417.issue34894@psf.upfronthosting.co.za> Marcin Raczy?ski added the comment: How are you sure that a bug is not in the CPython implementation of the pickle module but in the lxml? ---------- resolution: third party -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 05:30:58 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 Oct 2018 09:30:58 +0000 Subject: [issue34900] unittest subTests() fails when called from debug() In-Reply-To: <1538691873.85.0.545547206417.issue34900@psf.upfronthosting.co.za> Message-ID: <1538731858.29.0.545547206417.issue34900@psf.upfronthosting.co.za> Berker Peksag added the comment: PR 9707 looks good to me. I will merge it once your CLA is processed by the PSF staff. Thanks! ---------- nosy: +berker.peksag type: crash -> behavior versions: +Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 05:36:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 09:36:56 +0000 Subject: [issue34894] Unexpected error while unpickling lxml.etree.Element object In-Reply-To: <1538666033.36.0.545547206417.issue34894@psf.upfronthosting.co.za> Message-ID: <1538732216.08.0.545547206417.issue34894@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: lxml.etree classes don't implement any methods related to pickling: __reduce__, __reduce_ex__, __getstate__, __setstate__, __getnewargs__, __getnewargs_ex__. But there are extension classes which contain the state invisible to Python. In this case they are pickled as empty classes that leads to unexpected error while unpickling. Python 3 detects such cases and raise exceptions while pickling. This change was not backported to 2.7 for compatibility reasons. The only way to fix this issue in 2.7 is implementing pickle related methods (e.g. __getstate__ or __reduce__) in lxml.etree classes. They should either raise an exception, preventing pickling these objects, or implement support of pickling. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 05:37:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 09:37:24 +0000 Subject: [issue34894] Unexpected error while unpickling lxml.etree.Element object In-Reply-To: <1538666033.36.0.545547206417.issue34894@psf.upfronthosting.co.za> Message-ID: <1538732244.49.0.545547206417.issue34894@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 05:52:35 2018 From: report at bugs.python.org (Bruno Oliveira) Date: Fri, 05 Oct 2018 09:52:35 +0000 Subject: [issue34900] unittest subTests() fails when called from debug() In-Reply-To: <1538691873.85.0.545547206417.issue34900@psf.upfronthosting.co.za> Message-ID: <1538733155.63.0.545547206417.issue34900@psf.upfronthosting.co.za> Bruno Oliveira added the comment: Great, thanks again for the quick review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 06:06:44 2018 From: report at bugs.python.org (Erik Bray) Date: Fri, 05 Oct 2018 10:06:44 +0000 Subject: [issue34904] Crash in ZipFile.close() when writing zip file to /dev/null Message-ID: <1538734004.78.0.545547206417.issue34904@psf.upfronthosting.co.za> New submission from Erik Bray : Not that there is any great reason to write a zip file to /dev/null, but I had some code that happened to do so which worked on Python 2.7, but at some point this broke: Python 3.8.0a0 (heads/master:fc7d1b3, Oct 5 2018, 09:49:57) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import zipfile >>> f = zipfile.ZipFile('/dev/null', 'w') >>> f.writestr('foo.txt', 'testtesttesttesttest') >>> f.close() Traceback (most recent call last): File "", line 1, in File "/home/embray/src/python/cpython/Lib/zipfile.py", line 1813, in close self._write_end_record() File "/home/embray/src/python/cpython/Lib/zipfile.py", line 1914, in _write_end_record endrec = struct.pack(structEndArchive, stringEndArchive, struct.error: argument out of range ---------- components: Library (Lib) messages: 327118 nosy: erik.bray priority: normal severity: normal status: open title: Crash in ZipFile.close() when writing zip file to /dev/null type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 06:12:05 2018 From: report at bugs.python.org (Armin Rigo) Date: Fri, 05 Oct 2018 10:12:05 +0000 Subject: [issue34880] About the "assert" bytecode In-Reply-To: <1538549910.96.0.545547206417.issue34880@psf.upfronthosting.co.za> Message-ID: <1538734325.08.0.545547206417.issue34880@psf.upfronthosting.co.za> Armin Rigo added the comment: A middle ground might be to copy the behavior of ``__import__``: it is loaded from the builtins module where specific hacks can change its definition, but it is not loaded from the globals. ---------- nosy: +arigo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 06:24:43 2018 From: report at bugs.python.org (=?utf-8?q?Marcin_Raczy=C5=84ski?=) Date: Fri, 05 Oct 2018 10:24:43 +0000 Subject: [issue34894] Unexpected error while unpickling lxml.etree.Element object In-Reply-To: <1538666033.36.0.545547206417.issue34894@psf.upfronthosting.co.za> Message-ID: <1538735083.69.0.545547206417.issue34894@psf.upfronthosting.co.za> Marcin Raczy?ski added the comment: Thanks Serhiy for explanation! I quote your comment in a lxml issue tracker: https://bugs.launchpad.net/lxml/+bug/736708 ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 06:27:41 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 Oct 2018 10:27:41 +0000 Subject: [issue34900] unittest subTests() fails when called from debug() In-Reply-To: <1538691873.85.0.545547206417.issue34900@psf.upfronthosting.co.za> Message-ID: <1538735261.08.0.545547206417.issue34900@psf.upfronthosting.co.za> Berker Peksag added the comment: FYI, I just noticed that this is a duplicate of issue 29551, but decided to keep this one open. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 06:29:40 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 Oct 2018 10:29:40 +0000 Subject: [issue29551] unittest: TestSuite.debug() does not like subTest() In-Reply-To: <1487056249.29.0.788036995635.issue29551@psf.upfronthosting.co.za> Message-ID: <1538735380.9.0.545547206417.issue29551@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report, Wolfgang. The main cause of the issue will be resolved when we merge PR 9707. I'm closing this as a duplicate of issue 34900 since the latter has already an open PR. ---------- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> unittest subTests() fails when called from debug() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 06:34:35 2018 From: report at bugs.python.org (Bruno Oliveira) Date: Fri, 05 Oct 2018 10:34:35 +0000 Subject: [issue34900] unittest subTests() fails when called from debug() In-Reply-To: <1538691873.85.0.545547206417.issue34900@psf.upfronthosting.co.za> Message-ID: <1538735675.54.0.545547206417.issue34900@psf.upfronthosting.co.za> Bruno Oliveira added the comment: > FYI, I just noticed that this is a duplicate of issue 29551, but decided to keep this one open. OK thanks. I did try to search for open issues before filing this one by using the "subtest result_supports_subtests" terms, as I figured a bug report would include the traceback, that's why I didn't find 29551, heh. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 07:22:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 11:22:28 +0000 Subject: [issue18291] codecs.open interprets FS, RS, GS as line ends In-Reply-To: <1372079472.71.0.230881178227.issue18291@psf.upfronthosting.co.za> Message-ID: <1538738548.9.0.545547206417.issue18291@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9094 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 07:23:37 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Oct 2018 11:23:37 +0000 Subject: [issue34904] Crash in ZipFile.close() when writing zip file to /dev/null In-Reply-To: <1538734004.78.0.545547206417.issue34904@psf.upfronthosting.co.za> Message-ID: <1538738617.7.0.545547206417.issue34904@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Is this specific to Linux? I can reproduce this on master branch on Ubuntu but there is no error on Mac OS with the master branch. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 07:26:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 11:26:00 +0000 Subject: [issue18291] codecs.open interprets FS, RS, GS as line ends In-Reply-To: <1372079472.71.0.230881178227.issue18291@psf.upfronthosting.co.za> Message-ID: <1538738760.92.0.545547206417.issue18291@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 9711 splits lines using regular expressions. This fixes this issue without changing str.splitlines(). After adding a new option in str.splitlines() the code in master can be simplified. ---------- resolution: wont fix -> stage: resolved -> patch review status: closed -> open versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 07:38:55 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 05 Oct 2018 11:38:55 +0000 Subject: [issue28441] Change sys.executable to include executable suffix In-Reply-To: <1476452085.73.0.180033377767.issue28441@psf.upfronthosting.co.za> Message-ID: <1538739535.84.0.545547206417.issue28441@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 7a7693e9cb12e5571c76331db56a28eef9acb6e0 by INADA Naoki (E. M. Bray) in branch 'master': bpo-28441: Ensure `.exe` suffix in `sys.executable` on MinGW and Cygwin (GH-4348) https://github.com/python/cpython/commit/7a7693e9cb12e5571c76331db56a28eef9acb6e0 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 07:39:30 2018 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 05 Oct 2018 11:39:30 +0000 Subject: [issue18291] codecs.open interprets FS, RS, GS as line ends In-Reply-To: <1372079472.71.0.230881178227.issue18291@psf.upfronthosting.co.za> Message-ID: <1538739570.41.0.545547206417.issue18291@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Sorry, I probably wasn't clear: the codecs interface is a direct interface to the Unicode codecs and thus has to work according to what Unicode defines. Your PR changes this to be non-compliant and does this for all codecs. That's a major backwards and Unicode incompatible change and I'm -1 on such a change for the stated reasons. If people want to have ASCII only line break handling, they should use the io module, which only uses the codecs and can apply different logic (as it does). Please note that many file formats where not defined for Unicode, and it's only natural that using Unicode codecs on them will result in some differences compared to the ASCII world. Line breaks are one of those differences, but there are plenty others as well, e.g. potentially breaking combining characters or bidi sections, different ideas about upper and lower case handling, different interpretations of control characters, etc. The approach to this has to be left with the applications dealing with these formats. The stdlib has to stick to standards and clear documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 07:46:28 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 05 Oct 2018 11:46:28 +0000 Subject: [issue28441] Change sys.executable to include executable suffix In-Reply-To: <1476452085.73.0.180033377767.issue28441@psf.upfronthosting.co.za> Message-ID: <1538739988.32.0.545547206417.issue28441@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 07:51:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 11:51:38 +0000 Subject: [issue34904] Crash in ZipFile.close() when writing zip file to /dev/null In-Reply-To: <1538734004.78.0.545547206417.issue34904@psf.upfronthosting.co.za> Message-ID: <1538740298.57.0.545547206417.issue34904@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This may be a Linux bug. The /dev/null file is seekable, but seek() doesn't work correctly for it. It is especially confusing for buffered files. seek() always returns 0 and reset the file position. >>> f = open('/dev/null', 'wb') >>> f.seekable() True >>> f.tell() 0 >>> f.write(b'abcdefgh') 8 >>> f.tell() 8 >>> f.seek(8) 0 >>> f.tell() 0 In contrary, files like /dev/stdout are not seekable, and writing a ZIP file to them works properly. ---------- components: +IO nosy: +serhiy.storchaka type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 08:06:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 12:06:49 +0000 Subject: [issue18291] codecs.open interprets FS, RS, GS as line ends In-Reply-To: <1372079472.71.0.230881178227.issue18291@psf.upfronthosting.co.za> Message-ID: <1538741209.85.0.545547206417.issue18291@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Then this particularity of codecs streams should be explicitly documented. codecs.open() was advertised as a way of writing portable code for Python 2 and 3, and it can still be used in many old programs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 08:10:34 2018 From: report at bugs.python.org (Erik Bray) Date: Fri, 05 Oct 2018 12:10:34 +0000 Subject: [issue34904] Crash in ZipFile.close() when writing zip file to /dev/null In-Reply-To: <1538734004.78.0.545547206417.issue34904@psf.upfronthosting.co.za> Message-ID: <1538741434.28.0.545547206417.issue34904@psf.upfronthosting.co.za> Erik Bray added the comment: The regression was introduced by issue26039. It does seem to be Linux-specific with seek/tell on /dev/null. For example, I cannot reproduce the issue on Cygwin. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 08:13:31 2018 From: report at bugs.python.org (Erik Bray) Date: Fri, 05 Oct 2018 12:13:31 +0000 Subject: [issue34904] Crash in ZipFile.close() when writing zip file to /dev/null In-Reply-To: <1538734004.78.0.545547206417.issue34904@psf.upfronthosting.co.za> Message-ID: <1538741611.11.0.545547206417.issue34904@psf.upfronthosting.co.za> Erik Bray added the comment: On Cygwin the same tests give >>> f = open('/dev/null', 'wb') >>> f.seekable() True >>> f.write(b'abcdefgh') 8 >>> f.tell() 8 >>> f.seek(8) 8 >>> f.tell() 8 I would also try macOS if I could. But yes, I wonder if it's a Linux bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 08:21:16 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Oct 2018 12:21:16 +0000 Subject: [issue34904] Crash in ZipFile.close() when writing zip file to /dev/null In-Reply-To: <1538734004.78.0.545547206417.issue34904@psf.upfronthosting.co.za> Message-ID: <1538742076.24.0.545547206417.issue34904@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks Erik for the details. On Mac with master also it works like Cygwin. ./python.exe Python 3.8.0a0 (heads/master:6f85b826b5, Oct 4 2018, 22:44:36) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> f = open('/dev/null', 'wb') >>> f.seekable() True >>> f.write(b'abcdefgh') 8 >>> f.tell() 8 >>> f.seek(8) 8 >>> f.tell() 8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 08:24:52 2018 From: report at bugs.python.org (Andrey Paramonov) Date: Fri, 05 Oct 2018 12:24:52 +0000 Subject: [issue34905] Cannot assign memoryview values from array.array Message-ID: <1538742292.09.0.545547206417.issue34905@psf.upfronthosting.co.za> New submission from Andrey Paramonov : Currently, memoryview values can be assigned from all bytes-like objects (https://docs.python.org/3/glossary.html#term-bytes-like-object) except byte array.array: ---- import array mview = memoryview(bytearray(b'hello')) mview[:] = bytes(b'hello') # success mview[:] = bytearray(b'hello') # success mview[:] = memoryview(b'hello') # success mview[:] = array.array('b', b'hello') # fail ---- mview[:] = array.array('b', b'hello') ValueError: memoryview assignment: lvalue and rvalue have different structures ---- ---------- components: Library (Lib) messages: 327133 nosy: aparamon priority: normal severity: normal status: open title: Cannot assign memoryview values from array.array type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 08:28:09 2018 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 05 Oct 2018 12:28:09 +0000 Subject: [issue18291] codecs.open interprets FS, RS, GS as line ends In-Reply-To: <1538741209.85.0.545547206417.issue18291@psf.upfronthosting.co.za> Message-ID: <71cb2771-dd45-4a7a-11ac-64ad8b34c287@egenix.com> Marc-Andre Lemburg added the comment: On 05.10.2018 14:06, Serhiy Storchaka wrote: > > Then this particularity of codecs streams should be explicitly documented. Yes, probably. Such extensions of scope for different character types in Unicode vs. ASCII are a common gotcha when moving from Python 2 to 3. The same applies to eg. upper/lower case conversion, conversion to numeric values, the various .is*() methods, etc. > codecs.open() was advertised as a way of writing portable code for Python 2 and 3, and it can still be used in many old programs. AFAIR, we changed this to recommend io.open() instead, after the io module was rewritten in C. Before that we did indeed advertise codecs.open() as a way to write code which produces Unicode in a similar way as io does in Python 3 (they were never fully identical, though). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 08:41:24 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Oct 2018 12:41:24 +0000 Subject: [issue34898] add mtime argument to gzip.compress In-Reply-To: <1538688124.68.0.545547206417.issue34898@psf.upfronthosting.co.za> Message-ID: <1538743284.64.0.545547206417.issue34898@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 09:12:57 2018 From: report at bugs.python.org (Erik Bray) Date: Fri, 05 Oct 2018 13:12:57 +0000 Subject: [issue34904] Crash in ZipFile.close() when writing zip file to /dev/null In-Reply-To: <1538734004.78.0.545547206417.issue34904@psf.upfronthosting.co.za> Message-ID: <1538745177.11.0.545547206417.issue34904@psf.upfronthosting.co.za> Erik Bray added the comment: For the sake of completeness, same deal in pure C: $ cat devnul.c #include int main(void) { FILE *f = fopen("/dev/null", "w"); printf("tell() = %ld\n", ftell(f)); printf("write(\"abcdefgh\") = %zu\n", fwrite("abcdefgh", 1, 8, f)); printf("tell() = %ld\n", ftell(f)); printf("seek(8) = %d\n", fseek(f, 8, 0)); printf("tell() = %ld\n", ftell(f)); return 0; } $ gcc devnulc -o devnul $ ./devnull tell() = 0 write("abcdefgh") = 8 tell() = 8 seek(8) = 0 tell() = 0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 09:57:02 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 05 Oct 2018 13:57:02 +0000 Subject: [issue34906] Fix typo in the documentation Message-ID: <1538747822.84.0.545547206417.issue34906@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- assignee: matrixise nosy: matrixise priority: normal severity: normal status: open title: Fix typo in the documentation versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 10:00:41 2018 From: report at bugs.python.org (David Cannings) Date: Fri, 05 Oct 2018 14:00:41 +0000 Subject: [issue27321] Email parser creates a message object that can't be flattened In-Reply-To: <1465930372.53.0.0254623453508.issue27321@psf.upfronthosting.co.za> Message-ID: <1538748041.96.0.545547206417.issue27321@psf.upfronthosting.co.za> David Cannings added the comment: Ping on an ETA for this fix? ---------- nosy: +edeca _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 10:03:03 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 05 Oct 2018 14:03:03 +0000 Subject: [issue34906] Fix typo in the documentation Message-ID: <1538748183.46.0.545547206417.issue34906@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +9095 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 10:04:21 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 05 Oct 2018 14:04:21 +0000 Subject: [issue22232] str.splitlines splitting on non-\r\n characters In-Reply-To: <1408528911.37.0.452679392827.issue22232@psf.upfronthosting.co.za> Message-ID: <1538748261.98.0.545547206417.issue22232@psf.upfronthosting.co.za> Neil Schemenauer added the comment: I've created a topic on this inside the "Ideas" area of discuss.python.org. Sorry if that wasn't appropriate, not sure if I should have keep the discussion here. Inada Naoki suggests creating a new method str.iterlines{[keepends]). Given that people are -1 on changing str.splitlines, I think that's a good solution. A new method is better yet if it would only split on '\n', that way fp.read().iterlines() matches fp.readlines(). It is what people seem to expect and is the most handy behaviour. So, str and bytes would both get the new method and they would both split on only '\n'. If we do that, I think nearly every use of splitlines() should get changed to iterlines(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 10:08:19 2018 From: report at bugs.python.org (Petter S) Date: Fri, 05 Oct 2018 14:08:19 +0000 Subject: [issue34547] Wsgiref server does not handle closed connections gracefully In-Reply-To: <1535624235.67.0.56676864532.issue34547@psf.upfronthosting.co.za> Message-ID: <1538748499.68.0.545547206417.issue34547@psf.upfronthosting.co.za> Change by Petter S : ---------- keywords: +patch pull_requests: +9096 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 10:17:22 2018 From: report at bugs.python.org (Julien Palard) Date: Fri, 05 Oct 2018 14:17:22 +0000 Subject: [issue34906] Fix typo in the documentation Message-ID: <1538749042.1.0.545547206417.issue34906@psf.upfronthosting.co.za> New submission from Julien Palard : New changeset 07fbbfde1b300369b4f8d1cfb80045fbb23b7091 by Julien Palard (St?phane Wirtel) in branch 'master': bpo-34906: Doc: Fix typos (GH-9712) https://github.com/python/cpython/commit/07fbbfde1b300369b4f8d1cfb80045fbb23b7091 ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 10:17:34 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Oct 2018 14:17:34 +0000 Subject: [issue34906] Fix typo in the documentation In-Reply-To: <1538749042.1.0.545547206417.issue34906@psf.upfronthosting.co.za> Message-ID: <1538749054.83.0.545547206417.issue34906@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9098 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 10:35:21 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Oct 2018 14:35:21 +0000 Subject: [issue34906] Fix typo in the documentation In-Reply-To: <1538749042.1.0.545547206417.issue34906@psf.upfronthosting.co.za> Message-ID: <1538750121.65.0.545547206417.issue34906@psf.upfronthosting.co.za> miss-islington added the comment: New changeset b3c4a050b7b9a07caeeb9ad74af1d3a750000422 by Miss Islington (bot) in branch '3.7': bpo-34906: Doc: Fix typos (GH-9712) https://github.com/python/cpython/commit/b3c4a050b7b9a07caeeb9ad74af1d3a750000422 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 11:04:40 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Fri, 05 Oct 2018 15:04:40 +0000 Subject: [issue34769] _asyncgen_finalizer_hook running in wrong thread In-Reply-To: <1537627184.81.0.956365154283.issue34769@psf.upfronthosting.co.za> Message-ID: <1538751880.93.0.545547206417.issue34769@psf.upfronthosting.co.za> twisteroid ambassador added the comment: I'll open a PR with your diff soon, but I don't have a reliable unit test yet. Also, it does not seem to fix the old problem with debug mode off. :-( I had hoped that the problem with debug mode off is nothing more than _asyncgen_finalizer_hook not running reliably each time, but that doesn't seem to be the case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 11:06:39 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Fri, 05 Oct 2018 15:06:39 +0000 Subject: [issue34769] _asyncgen_finalizer_hook running in wrong thread In-Reply-To: <1537627184.81.0.956365154283.issue34769@psf.upfronthosting.co.za> Message-ID: <1538751999.71.0.545547206417.issue34769@psf.upfronthosting.co.za> Change by twisteroid ambassador : ---------- keywords: +patch pull_requests: +9099 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 11:23:49 2018 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 05 Oct 2018 15:23:49 +0000 Subject: [issue22232] str.splitlines splitting on non-\r\n characters In-Reply-To: <1538748261.98.0.545547206417.issue22232@psf.upfronthosting.co.za> Message-ID: Marc-Andre Lemburg added the comment: Why not simply add a new parameter, to make people who want ASCII linebreaks continue to use .splitlines() ? It think it would be less than ideal to have one method break on all Unicode line breaks and another only on ASCII ones. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 11:24:16 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Oct 2018 15:24:16 +0000 Subject: [issue34825] Add more entries to os module to pathlib reference table In-Reply-To: <1538071222.64.0.545547206417.issue34825@psf.upfronthosting.co.za> Message-ID: <1538753056.65.0.545547206417.issue34825@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6f9c55d1c0bb399911ded00bb6b3e6f43a514ea2 by Miss Islington (bot) (Xtreak) in branch 'master': bpo-34825: Add more entries to os to pathlib reference table (GH-9608) https://github.com/python/cpython/commit/6f9c55d1c0bb399911ded00bb6b3e6f43a514ea2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 11:24:25 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Oct 2018 15:24:25 +0000 Subject: [issue34825] Add more entries to os module to pathlib reference table In-Reply-To: <1538071222.64.0.545547206417.issue34825@psf.upfronthosting.co.za> Message-ID: <1538753065.46.0.545547206417.issue34825@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9100 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 11:38:40 2018 From: report at bugs.python.org (Jonathan Gossage) Date: Fri, 05 Oct 2018 15:38:40 +0000 Subject: [issue6686] xml.sax.xmlreader.XMLReader.getProperty (xml.sax.handler.property_xml_string) returns bytes In-Reply-To: <1250018393.94.0.435666063731.issue6686@psf.upfronthosting.co.za> Message-ID: <1538753920.38.0.545547206417.issue6686@psf.upfronthosting.co.za> Change by Jonathan Gossage : ---------- pull_requests: +9101 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 11:54:54 2018 From: report at bugs.python.org (Cem) Date: Fri, 05 Oct 2018 15:54:54 +0000 Subject: [issue34907] calculation not working properly Message-ID: <1538754894.18.0.545547206417.issue34907@psf.upfronthosting.co.za> New submission from Cem : as shown below for some reason 15.06 + 5 results in an addition of 0.0000002 and i want to know why its an bug or something im doing wrong but below it i tried it with 15.07 it works ---------- components: Windows files: Capture.PNG messages: 327143 nosy: hwk_un1te, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: calculation not working properly versions: Python 3.7 Added file: https://bugs.python.org/file47853/Capture.PNG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 11:58:50 2018 From: report at bugs.python.org (Matej Cepl) Date: Fri, 05 Oct 2018 15:58:50 +0000 Subject: [issue26852] add the '--enable-sourceless-distribution' option to configure In-Reply-To: <1461674611.23.0.732409522866.issue26852@psf.upfronthosting.co.za> Message-ID: <1538755130.77.0.545547206417.issue26852@psf.upfronthosting.co.za> Change by Matej Cepl : ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:06:20 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2018 16:06:20 +0000 Subject: [issue34825] Add more entries to os module to pathlib reference table In-Reply-To: <1538071222.64.0.545547206417.issue34825@psf.upfronthosting.co.za> Message-ID: <1538755580.86.0.545547206417.issue34825@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset 29c40c73143fee3612147959779b6927cd1be7e1 by Andrew Svetlov (Miss Islington (bot)) in branch '3.7': bpo-34825: Add more entries to os to pathlib reference table (GH-9608) (#9717) https://github.com/python/cpython/commit/29c40c73143fee3612147959779b6927cd1be7e1 ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:07:36 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Oct 2018 16:07:36 +0000 Subject: [issue34825] Add more entries to os module to pathlib reference table In-Reply-To: <1538071222.64.0.545547206417.issue34825@psf.upfronthosting.co.za> Message-ID: <1538755656.28.0.545547206417.issue34825@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:13:42 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 05 Oct 2018 16:13:42 +0000 Subject: [issue34907] calculation not working properly In-Reply-To: <1538754894.18.0.545547206417.issue34907@psf.upfronthosting.co.za> Message-ID: <1538756022.5.0.545547206417.issue34907@psf.upfronthosting.co.za> St?phane Wirtel added the comment: because you have the round with the float type. you could use the decimal module with Decimal In [1]: import decimal In [2]: decimal.Decimal('15.06') + 5 Out[2]: Decimal('20.06') ---------- nosy: +matrixise stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:15:42 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 05 Oct 2018 16:15:42 +0000 Subject: [issue34907] calculation not working properly In-Reply-To: <1538754894.18.0.545547206417.issue34907@psf.upfronthosting.co.za> Message-ID: <1538756142.82.0.545547206417.issue34907@psf.upfronthosting.co.za> St?phane Wirtel added the comment: and you can read this link where we explain the limits of the float type: https://docs.python.org/3/tutorial/floatingpoint.html ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:20:05 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 05 Oct 2018 16:20:05 +0000 Subject: [issue34861] Improve cProfile standard output In-Reply-To: <1538392397.89.0.545547206417.issue34861@psf.upfronthosting.co.za> Message-ID: <1538756405.04.0.545547206417.issue34861@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Can you paste a sample output showing how it looks like pre and post patch? ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:20:21 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 05 Oct 2018 16:20:21 +0000 Subject: [issue34861] Improve cProfile standard output In-Reply-To: <1538392397.89.0.545547206417.issue34861@psf.upfronthosting.co.za> Message-ID: <1538756421.05.0.545547206417.issue34861@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- 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 Oct 5 12:21:34 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Oct 2018 16:21:34 +0000 Subject: [issue34907] calculation not working properly In-Reply-To: <1538754894.18.0.545547206417.issue34907@psf.upfronthosting.co.za> Message-ID: <1538756494.83.0.545547206417.issue34907@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report but I think is a known limitation with floating points and this page explains it well : https://docs.python.org/3.7/tutorial/floatingpoint.html . Using round will be helpful in your situation to round the output to 2 decimal places. I think the issue is also not predictable and a below example on Python 3 is similar to your case. I think this is not a bug in Python but a known behavior that is also present in a lot of other languages. >>> 0.1+0.2 0.30000000000000004 >>> 0.2+0.2 0.4 >>> 0.2+0.3 0.5 >>> 0.2+0.4 0.6000000000000001 >>> ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:28:12 2018 From: report at bugs.python.org (=?utf-8?q?Anders_Hovm=C3=B6ller?=) Date: Fri, 05 Oct 2018 16:28:12 +0000 Subject: [issue34861] Improve cProfile standard output In-Reply-To: <1538392397.89.0.545547206417.issue34861@psf.upfronthosting.co.za> Message-ID: <1538756892.27.0.545547206417.issue34861@psf.upfronthosting.co.za> Anders Hovm?ller added the comment: There is an example output on github. Should I paste it here too? I can do it once I get home if you want. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:32:35 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Oct 2018 16:32:35 +0000 Subject: [issue33194] Path-file objects does not have method to delete itself if its a file In-Reply-To: <1522550854.13.0.467229070634.issue33194@psf.upfronthosting.co.za> Message-ID: <1538757155.72.0.545547206417.issue33194@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I have added unlink along with other similar methods in Pathlib as part of issue34825 to the reference table which I hope helps. I propose closing this. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:47:12 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Oct 2018 16:47:12 +0000 Subject: [issue34902] Azure pipelines PR build fails with "Unexpected vmImage 'vs2017-win2017'" In-Reply-To: <1538718327.26.0.545547206417.issue34902@psf.upfronthosting.co.za> Message-ID: <1538758032.63.0.545547206417.issue34902@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Similar error reported on Pandas and Numba repositories that was fixed a couple of days back : https://github.com/pandas-dev/pandas/pull/22948 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 12:58:00 2018 From: report at bugs.python.org (Zachary Ware) Date: Fri, 05 Oct 2018 16:58:00 +0000 Subject: [issue34907] calculation not working properly In-Reply-To: <1538754894.18.0.545547206417.issue34907@psf.upfronthosting.co.za> Message-ID: <1538758680.51.0.545547206417.issue34907@psf.upfronthosting.co.za> Change by Zachary Ware : ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 13:07:58 2018 From: report at bugs.python.org (Niklas Sombert) Date: Fri, 05 Oct 2018 17:07:58 +0000 Subject: [issue34628] urllib.request.urlopen fails when userinfo is present in URL In-Reply-To: <1536683596.21.0.0269046726804.issue34628@psf.upfronthosting.co.za> Message-ID: <1538759278.81.0.545547206417.issue34628@psf.upfronthosting.co.za> Niklas Sombert added the comment: Hey, this is almost a month old. (Not a problem, really. But I thought, I should bump this.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 13:09:45 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Oct 2018 17:09:45 +0000 Subject: [issue34725] Py_GetProgramFullPath() odd behaviour in Windows In-Reply-To: <1537291607.58.0.956365154283.issue34725@psf.upfronthosting.co.za> Message-ID: <1538759385.41.0.545547206417.issue34725@psf.upfronthosting.co.za> Change by Steve Dower : ---------- nosy: +eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 13:12:13 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 05 Oct 2018 17:12:13 +0000 Subject: [issue34907] calculation not working properly In-Reply-To: <1538754894.18.0.545547206417.issue34907@psf.upfronthosting.co.za> Message-ID: <1538759533.85.0.545547206417.issue34907@psf.upfronthosting.co.za> Steven D'Aprano added the comment: For future reference, please don't post unnecessary screen shots and images. Code is text, please copy and paste it as text, not as pixels. Images make it difficult or impossible for the blind and visually impaired to contribute. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 13:13:44 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Oct 2018 17:13:44 +0000 Subject: [issue34902] Azure pipelines PR build fails with "Unexpected vmImage 'vs2017-win2017'" In-Reply-To: <1538718327.26.0.545547206417.issue34902@psf.upfronthosting.co.za> Message-ID: <1538759624.39.0.545547206417.issue34902@psf.upfronthosting.co.za> Steve Dower added the comment: I'll get it. ---------- assignee: -> steve.dower versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 13:19:24 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Oct 2018 17:19:24 +0000 Subject: [issue34902] Azure pipelines PR build fails with "Unexpected vmImage 'vs2017-win2017'" In-Reply-To: <1538718327.26.0.545547206417.issue34902@psf.upfronthosting.co.za> Message-ID: <1538759964.01.0.545547206417.issue34902@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: +patch pull_requests: +9102 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 13:21:24 2018 From: report at bugs.python.org (Ian Remmel) Date: Fri, 05 Oct 2018 17:21:24 +0000 Subject: [issue34908] netrc parding is overly strict Message-ID: <1538760084.12.0.545547206417.issue34908@psf.upfronthosting.co.za> New submission from Ian Remmel : This started as a bug report for httpie https://github.com/jakubroztocil/httpie/issues/717#issuecomment-426125261 And became a bug report for requests https://github.com/requests/requests/issues/4813 > But turned out to be an issue with Python's netrc parser: > > > it appears that auth via netrc is broken if ~/.netrc includes entries that are not exactly login/password tuples. For example, I have the following entries for circle ci and heroku: > > ``` > machine api.heroku.com > login > password > method interactive > machine circleci.com > login > ``` > > both of these entries prevent my entry for github.com from working with httpie (but curl works just fine). I've used the following script to test python 2.7 and 3.7: ``` import netrc import os.path netrc.netrc(os.path.expanduser('~/.netrc')).authenticators('api.github.com') ``` Python 2: ``` Traceback (most recent call last): File "test.py", line 4, in netrc.netrc(os.path.expanduser('~/.netrc')).authenticators('api.github.com') File "/usr/local/Cellar/python at 2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/netrc.py", line 35, in __init__ self._parse(file, fp, default_netrc) File "/usr/local/Cellar/python at 2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/netrc.py", line 117, in _parse file, lexer.lineno) netrc.NetrcParseError: bad follower token 'method' (/Users/ian/.netrc, line 7) ```` Python 3: ``` Traceback (most recent call last): File "test.py", line 4, in netrc.netrc(os.path.expanduser('~/.netrc')).authenticators('api.github.com') File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/netrc.py", line 30, in __init__ self._parse(file, fp, default_netrc) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/netrc.py", line 111, in _parse file, lexer.lineno) netrc.NetrcParseError: bad follower token 'method' (/Users/ian/.netrc, line 7) ``` ---------- messages: 327155 nosy: ianwremmel priority: normal severity: normal status: open title: netrc parding is overly strict versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 13:31:21 2018 From: report at bugs.python.org (Mike Gleen) Date: Fri, 05 Oct 2018 17:31:21 +0000 Subject: [issue34903] strptime %d handling of single digit day of month In-Reply-To: <1538724686.61.0.545547206417.issue34903@psf.upfronthosting.co.za> Message-ID: <1538760681.08.0.545547206417.issue34903@psf.upfronthosting.co.za> Mike Gleen added the comment: Sorry for the omission. This refers to datetime.datetime.strptime. The documentation I referenced is: https://docs.python.org/3/library/datetime.html; I did not test 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 13:38:17 2018 From: report at bugs.python.org (Felipe Rodrigues) Date: Fri, 05 Oct 2018 17:38:17 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1538761097.24.0.545547206417.issue34576@psf.upfronthosting.co.za> Change by Felipe Rodrigues : ---------- keywords: +patch pull_requests: +9103 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 13:38:17 2018 From: report at bugs.python.org (Felipe Rodrigues) Date: Fri, 05 Oct 2018 17:38:17 +0000 Subject: [issue26005] Denial of Service in SimpleHTTPServer and BaseHTTPServer In-Reply-To: <1451897650.58.0.64883073344.issue26005@psf.upfronthosting.co.za> Message-ID: <1538761097.35.0.183324690243.issue26005@psf.upfronthosting.co.za> Change by Felipe Rodrigues : ---------- pull_requests: +9104 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 13:46:37 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Oct 2018 17:46:37 +0000 Subject: [issue34908] netrc parding is overly strict In-Reply-To: <1538760084.12.0.545547206417.issue34908@psf.upfronthosting.co.za> Message-ID: <1538761597.2.0.545547206417.issue34908@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 13:52:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 17:52:10 +0000 Subject: [issue32117] Tuple unpacking in return and yield statements In-Reply-To: <1511393509.38.0.213398074469.issue32117@psf.upfronthosting.co.za> Message-ID: <1538761930.55.0.545547206417.issue32117@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9105 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 13:52:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 17:52:10 +0000 Subject: [issue34603] ctypes on Windows: error calling C function that returns a struct containing 3 bools In-Reply-To: <1536318917.89.0.56676864532.issue34603@psf.upfronthosting.co.za> Message-ID: <1538761930.67.0.183324690243.issue34603@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9106 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:00:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 18:00:25 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538762425.81.0.545547206417.issue34872@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9107 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:05:52 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Oct 2018 18:05:52 +0000 Subject: [issue34902] Azure pipelines PR build fails with "Unexpected vmImage 'vs2017-win2017'" In-Reply-To: <1538718327.26.0.545547206417.issue34902@psf.upfronthosting.co.za> Message-ID: <1538762752.64.0.545547206417.issue34902@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 4313a293dae579f3406aa94508ff3803a79b0344 by Steve Dower in branch 'master': bpo-34902: Fixes VM image for Azure Pipelines build (GH-9719) https://github.com/python/cpython/commit/4313a293dae579f3406aa94508ff3803a79b0344 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:05:59 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Oct 2018 18:05:59 +0000 Subject: [issue34902] Azure pipelines PR build fails with "Unexpected vmImage 'vs2017-win2017'" In-Reply-To: <1538718327.26.0.545547206417.issue34902@psf.upfronthosting.co.za> Message-ID: <1538762759.95.0.545547206417.issue34902@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9108 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:06:05 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Oct 2018 18:06:05 +0000 Subject: [issue34902] Azure pipelines PR build fails with "Unexpected vmImage 'vs2017-win2017'" In-Reply-To: <1538718327.26.0.545547206417.issue34902@psf.upfronthosting.co.za> Message-ID: <1538762765.95.0.545547206417.issue34902@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9109 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:07:52 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Oct 2018 18:07:52 +0000 Subject: [issue34902] Azure pipelines PR build fails with "Unexpected vmImage 'vs2017-win2017'" In-Reply-To: <1538718327.26.0.545547206417.issue34902@psf.upfronthosting.co.za> Message-ID: <1538762872.95.0.545547206417.issue34902@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the fix Steve. I am just wondering if there is a public announcement regarding this image being removed since Google couldn't get me anything. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:09:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 18:09:03 +0000 Subject: [issue34603] ctypes on Windows: error calling C function that returns a struct containing 3 bools In-Reply-To: <1536318917.89.0.56676864532.issue34603@psf.upfronthosting.co.za> Message-ID: <1538762943.2.0.545547206417.issue34603@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: assertEquals() is deprecated, use assertEqual() instead. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:10:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 18:10:02 +0000 Subject: [issue32117] Tuple unpacking in return and yield statements In-Reply-To: <1511393509.38.0.213398074469.issue32117@psf.upfronthosting.co.za> Message-ID: <1538763002.04.0.545547206417.issue32117@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4642d5f59828e774585e9895b538b24d71b9df8e by Serhiy Storchaka in branch 'master': Use assertEqual() instead of assertEquals(). (GH-9721) https://github.com/python/cpython/commit/4642d5f59828e774585e9895b538b24d71b9df8e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:10:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 18:10:02 +0000 Subject: [issue34603] ctypes on Windows: error calling C function that returns a struct containing 3 bools In-Reply-To: <1536318917.89.0.56676864532.issue34603@psf.upfronthosting.co.za> Message-ID: <1538763002.17.0.668975606942.issue34603@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4642d5f59828e774585e9895b538b24d71b9df8e by Serhiy Storchaka in branch 'master': Use assertEqual() instead of assertEquals(). (GH-9721) https://github.com/python/cpython/commit/4642d5f59828e774585e9895b538b24d71b9df8e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:13:08 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 05 Oct 2018 18:13:08 +0000 Subject: [issue22232] str.splitlines splitting on non-\r\n characters In-Reply-To: <1408528911.37.0.452679392827.issue22232@psf.upfronthosting.co.za> Message-ID: <1538763188.26.0.545547206417.issue22232@psf.upfronthosting.co.za> Neil Schemenauer added the comment: > Why not simply add a new parameter, to make people who want ASCII linebreaks continue to use .splitlines() ? That could work but I think in nearly every case you don't want to use splitlines() without supplying the parameter. So, it seems like a bit of trap for new users. Worse, because in Python 2, str.splitlines() does what they want, they will do the simple thing which is likely wrong. If we do stick with just splitlines(), perhaps it should get a 'newline' parameter that mostly matches io.open (i.e. it controls universal newline behavior). So if you don't want to change behavior, str.splitlines(newline=None) would split as it currently does. To make it split like io files do, you would have to do newline='\n'. To me, it seems attractive that: fp.readlines() == fp.read().iterlines() You suggestion would make it something like: fp.readlines() == fp.read().splitlines(newline='\n') I guess I could live with that but it seems unnecessarily ugly and verbose for what is the most common usage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:16:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 18:16:26 +0000 Subject: [issue34603] ctypes on Windows: error calling C function that returns a struct containing 3 bools In-Reply-To: <1536318917.89.0.56676864532.issue34603@psf.upfronthosting.co.za> Message-ID: <1538763386.55.0.545547206417.issue34603@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9110 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:18:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 18:18:03 +0000 Subject: [issue32117] Tuple unpacking in return and yield statements In-Reply-To: <1511393509.38.0.213398074469.issue32117@psf.upfronthosting.co.za> Message-ID: <1538763483.52.0.545547206417.issue32117@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:20:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 18:20:09 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538763609.56.0.545547206417.issue34872@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset addf8afb43af58b9bf56a0ecfd0f316dd60ac0c3 by Serhiy Storchaka in branch 'master': Fix a compiler warning added in bpo-34872. (GH-9722) https://github.com/python/cpython/commit/addf8afb43af58b9bf56a0ecfd0f316dd60ac0c3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:27:49 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Oct 2018 18:27:49 +0000 Subject: [issue34902] Azure pipelines PR build fails with "Unexpected vmImage 'vs2017-win2017'" In-Reply-To: <1538718327.26.0.545547206417.issue34902@psf.upfronthosting.co.za> Message-ID: <1538764069.67.0.545547206417.issue34902@psf.upfronthosting.co.za> miss-islington added the comment: New changeset b57f800b351328a67b4a11a1864d39c6b9b8d39f by Miss Islington (bot) in branch '3.7': bpo-34902: Fixes VM image for Azure Pipelines build (GH-9719) https://github.com/python/cpython/commit/b57f800b351328a67b4a11a1864d39c6b9b8d39f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:28:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 18:28:49 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538764129.38.0.545547206417.issue34872@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9111 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:30:14 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Oct 2018 18:30:14 +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: <1538764214.88.0.545547206417.issue21880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This issue is specifically based on msg195711 of #18704. Anyone working on this should read it. Saimadhav's work was part of his Google Summer of Code (GSOC) project, which ended soon after V4 was submitted. I recorded reviews of V1 and V2 above. I don't remember which tests and reviews, if any, I did with V3 and V4. Some needed changes starting with v4: Checker.py should be checker.py. Implement it as a feature, not an extension. Access the in-memory config object for .idlrc/checker.cfg directly rather than through idleConf. idleConf accesses the fixed defaults and mutable user overrides as if they are one config. I am a bit surprised that idleConf worked without an empty idlelib/config-checker.def. The main blocker was and is keeping the GUI responsive while the 3rd party program is executing. V1 & V2 used subprocess through a pipe. V3 did not use subprocess. V4 uses subprocess without a pipe. It has this blocking polling loop: while process.poll() is None: continue If a 3rd party program is expected to revise a file, the corresponding editor should be read-only for the duration. I intended that any issue like this should start with a coherent specification separate from the code. A doc patch is needed and that might be enough. Since this issue was opened, it has been more firmly stated that the stdlib should not have any hard-coded dependencies on 3rd party code. In April 2016, the proposal for a GSOC project to add a GUI front end for pip got no opposition and 2 overt approvals on pydev. In August 2016, the result was rejected by the release manager and one of the additional approvers because it necessarily used the (public) pip (command-line) interface. Not withstanding that, there could be a separate idle-checker repository containing a checker.cfg with entries for multiple checkers. Such a file would be needed to do manual tests with multiple checkers. This could include a typing annotation checker, like mypy, which is a new type of code checker added since this issue was created. Tal, what do you think is the easiest way to turn a .diff on the tracker into a git master branch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:32:24 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Oct 2018 18:32:24 +0000 Subject: [issue34902] Azure pipelines PR build fails with "Unexpected vmImage 'vs2017-win2017'" In-Reply-To: <1538718327.26.0.545547206417.issue34902@psf.upfronthosting.co.za> Message-ID: <1538764344.42.0.545547206417.issue34902@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 467360eeb24525e330d653826f21f30f47481d08 by Miss Islington (bot) in branch '3.6': bpo-34902: Fixes VM image for Azure Pipelines build (GH-9719) https://github.com/python/cpython/commit/467360eeb24525e330d653826f21f30f47481d08 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:38:31 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Oct 2018 18:38:31 +0000 Subject: [issue34902] Azure pipelines PR build fails with "Unexpected vmImage 'vs2017-win2017'" In-Reply-To: <1538718327.26.0.545547206417.issue34902@psf.upfronthosting.co.za> Message-ID: <1538764711.86.0.545547206417.issue34902@psf.upfronthosting.co.za> Steve Dower added the comment: I didn't hear any public announcement, so perhaps not. I'll ask the team. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:38:49 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Oct 2018 18:38:49 +0000 Subject: [issue34902] Azure pipelines PR build fails with "Unexpected vmImage 'vs2017-win2017'" In-Reply-To: <1538718327.26.0.545547206417.issue34902@psf.upfronthosting.co.za> Message-ID: <1538764729.39.0.545547206417.issue34902@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 Fri Oct 5 14:45:08 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Oct 2018 18:45:08 +0000 Subject: [issue34837] Multiprocessing.pool API Extension - Pass Data to Workers w/o Globals Message-ID: <1538765108.86.0.545547206417.issue34837@psf.upfronthosting.co.za> New submission from Terry J. Reedy : Quoting the PR: Proposing a new kwarg in the __init__() method of multiprocessing.Pool named expect_initret. This kwarg defaults to False. When set to True, the return value of the initializer function is passed to the function we are applying (i.e. func in Pool.map(func, ls)), as a kwarg named initret. This PR includes thorough test coverage, and provides backwards compatibility (at least in Python3.x). See blog post https://thelaziestprogrammer.com/python/multiprocessing-pool-expect-initret-proposal for example use cases, as well as an initial defense for why this makes the multiprocessing.Pool API more approachable, to more Python end-users, and augments the library. ---------- nosy: +davin, pitrou, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:45:39 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Oct 2018 18:45:39 +0000 Subject: [issue34837] Multiprocessing.pool API Extension - Pass Data to Workers w/o Globals In-Reply-To: <1538765108.86.0.545547206417.issue34837@psf.upfronthosting.co.za> Message-ID: <1538765139.6.0.545547206417.issue34837@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New features only go in next version. ---------- versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:46:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 18:46:29 +0000 Subject: [issue34603] ctypes on Windows: error calling C function that returns a struct containing 3 bools In-Reply-To: <1536318917.89.0.56676864532.issue34603@psf.upfronthosting.co.za> Message-ID: <1538765189.58.0.545547206417.issue34603@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 6bffe50f5fff8e8a40ae32c3e9c408622a15caf6 by Serhiy Storchaka in branch '3.7': Use assertEqual() instead of assertEquals(). (GH-9721) (GH-9725) https://github.com/python/cpython/commit/6bffe50f5fff8e8a40ae32c3e9c408622a15caf6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:46:36 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Oct 2018 18:46:36 +0000 Subject: [issue34603] ctypes on Windows: error calling C function that returns a struct containing 3 bools In-Reply-To: <1536318917.89.0.56676864532.issue34603@psf.upfronthosting.co.za> Message-ID: <1538765196.42.0.545547206417.issue34603@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9112 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:54:50 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Oct 2018 18:54:50 +0000 Subject: [issue34839] doctest: Change example under warnings section In-Reply-To: <1538180284.16.0.545547206417.issue34839@psf.upfronthosting.co.za> Message-ID: <1538765690.79.0.545547206417.issue34839@psf.upfronthosting.co.za> Terry J. Reedy added the comment: To me, the question is whether to delete the dict example, or qualify it with "Before 3.7 (or 3.6 for CPython)" but leave the illustration of workarounds. Raymond, what do you thing? ---------- nosy: +rhettinger, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:58:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 18:58:23 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538765903.8.0.545547206417.issue34872@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d9212200fe8ddb55d73b8231869cfbb32635ba92 by Serhiy Storchaka in branch '3.7': [3.7] Fix a compiler warning added in bpo-34872. (GH-9722). (GH-9726) https://github.com/python/cpython/commit/d9212200fe8ddb55d73b8231869cfbb32635ba92 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:58:28 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Oct 2018 18:58:28 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538765908.15.0.545547206417.issue34872@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9113 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 14:59:03 2018 From: report at bugs.python.org (Tim Peters) Date: Fri, 05 Oct 2018 18:59:03 +0000 Subject: [issue34839] doctest: Change example under warnings section In-Reply-To: <1538180284.16.0.545547206417.issue34839@psf.upfronthosting.co.za> Message-ID: <1538765943.66.0.545547206417.issue34839@psf.upfronthosting.co.za> Tim Peters added the comment: Add a comment along the lines you (Terry) suggested. Some people need to write doctests that run under many versions of Python, so the info is still supremely relevant to them. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 15:00:35 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Oct 2018 19:00:35 +0000 Subject: [issue34840] dlopen() error with no error message from dlerror() In-Reply-To: <1538203086.61.0.545547206417.issue34840@psf.upfronthosting.co.za> Message-ID: <1538766035.27.0.545547206417.issue34840@psf.upfronthosting.co.za> Terry J. Reedy added the comment: FWIW, the method does not exist on Windows >>> _ctypes.dlclose(3) Traceback (most recent call last): File "", line 1, in AttributeError: module '_ctypes' has no attribute 'dlclose' ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 15:11:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 19:11:26 +0000 Subject: [issue34603] ctypes on Windows: error calling C function that returns a struct containing 3 bools In-Reply-To: <1536318917.89.0.56676864532.issue34603@psf.upfronthosting.co.za> Message-ID: <1538766686.68.0.545547206417.issue34603@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d02490a9a9c238ed7ded1120877fdfdce16364a3 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': Use assertEqual() instead of assertEquals(). (GH-9721) (GH-9725) (GH-9727) https://github.com/python/cpython/commit/d02490a9a9c238ed7ded1120877fdfdce16364a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 15:13:59 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Oct 2018 19:13:59 +0000 Subject: [issue34846] Runtime failure with Failed to import site module In-Reply-To: <1538273716.55.0.545547206417.issue34846@psf.upfronthosting.co.za> Message-ID: <1538766839.52.0.545547206417.issue34846@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Unless this is seen as a possible security issue, this will not be fixed in 3.5. If possible test in later versions. By 'was running for a long time without issue', do you mean 'ran many times before this run'? (As opposed to 'a long time in this run'?) Did you try deleting Lib/__cache__/_collections_abc.cpython-35.pyc (or whatever the name is on ubuntu)? If this fixes the issue, is corruption and failure in any sense deterministic? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 15:15:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 19:15:40 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538766940.32.0.545547206417.issue34872@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset dd0670f12b159eff5336d6011f046e1ccac495e1 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': Fix a compiler warning added in bpo-34872. (GH-9722). (GH-9726) (GH-9728) https://github.com/python/cpython/commit/dd0670f12b159eff5336d6011f046e1ccac495e1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 15:26:32 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Oct 2018 19:26:32 +0000 Subject: [issue34902] Azure pipelines PR build fails with "Unexpected vmImage 'vs2017-win2017'" In-Reply-To: <1538718327.26.0.545547206417.issue34902@psf.upfronthosting.co.za> Message-ID: <1538767592.32.0.545547206417.issue34902@psf.upfronthosting.co.za> Steve Dower added the comment: Sounds like what happened is they *fixed* the error message when you use an invalid VMname. Previously it was falling back to the default, which happened to be the one we thought we were asking for. I've asked for a more public feed of impactful changes, so hopefully we'll get that organised. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 15:38:18 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Oct 2018 19:38:18 +0000 Subject: [issue34856] Make the repr of lambda containing the signature and body expression. In-Reply-To: <1538331263.14.0.545547206417.issue34856@psf.upfronthosting.co.za> Message-ID: <1538768298.47.0.545547206417.issue34856@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Right. Like printing an ascii text version of the Mandelbrot set in one 20-line lambda + call expression statement. Let's truncate to, say, 40 chars. This should cover a large majority of lambda expressions. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 15:43:27 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Oct 2018 19:43:27 +0000 Subject: [issue34856] Make the repr of lambda contain signature and body expression. In-Reply-To: <1538331263.14.0.545547206417.issue34856@psf.upfronthosting.co.za> Message-ID: <1538768607.86.0.545547206417.issue34856@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- title: Make the repr of lambda containing the signature and body expression. -> Make the repr of lambda contain signature and body expression. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 15:47:32 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Oct 2018 19:47:32 +0000 Subject: [issue34870] Core dump when Python VSCode debugger is attached In-Reply-To: <1538470259.0.0.545547206417.issue34870@psf.upfronthosting.co.za> Message-ID: <1538768852.82.0.545547206417.issue34870@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Steve, are you responsible for VSCode and Python? ---------- nosy: +steve.dower, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 15:57:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 19:57:06 +0000 Subject: [issue34856] Make the repr of lambda contain signature and body expression. In-Reply-To: <1538331263.14.0.545547206417.issue34856@psf.upfronthosting.co.za> Message-ID: <1538769426.08.0.545547206417.issue34856@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: People write also long strings, lists, dicts, but they are not truncated. In contrary to the above types which usually are created programmically and can be very large, lambdas are written manually and rarely exceed the size of a single line. We should discourage writing long lambdas. Local named functions are more appropriate for this. Although some people can use very long function names... Actually the repr of lambda can be very long now: . at 0x7fa2d9e04338>. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 16:12:48 2018 From: report at bugs.python.org (Ethan Furman) Date: Fri, 05 Oct 2018 20:12:48 +0000 Subject: [issue34909] StrEnum subclasses cannot be created Message-ID: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> New submission from Ethan Furman : from enum import Enum, unique class StrEnum(str, Enum): def __new__(cls, *args, **kwargs): for a in args: if not isinstance(a, str): raise TypeError("Enumeration '%s' (%s) is not" " a string" % (a, type(a).__name__)) return super(StrEnum, cls).__new__(cls, *args, **kwargs) @unique class Decision(StrEnum): """Decision results/strategy enumeration.""" REVERT = "REVERT" REVERT_ALL = "REVERT_ALL" RETRY = "RETRY" --- Traceback (most recent call last): File "test", line 14, in class Decision(StrEnum): File ".../cpython/Lib/enum.py", line 222, in __new__ enum_member._value_ = member_type(*args) File ".../cpython/Lib/enum.py", line 309, in __call__ return cls.__new__(cls, value) File ".../cpython/Lib/enum.py", line 545, in __new__ return cls._missing_(value) File ".../cpython/Lib/enum.py", line 558, in _missing_ raise ValueError("%r is not a valid %s" % (value, cls.__name__)) ValueError: 'REVERT' is not a valid StrEnum ---------- assignee: ethan.furman keywords: 3.7regression messages: 327182 nosy: ethan.furman, ned.deily priority: release blocker severity: normal stage: test needed status: open title: StrEnum subclasses cannot be created versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 16:19:15 2018 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 05 Oct 2018 20:19:15 +0000 Subject: [issue34856] Make the repr of lambda contain signature and body expression. In-Reply-To: <1538769426.08.0.545547206417.issue34856@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: However, this is a compatibility liability. People routinely use various formatting options to truncate long strings, since experience shows those are common. But few people expect the repr() of a function/lambda object to be unwieldy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 16:31:02 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Oct 2018 20:31:02 +0000 Subject: [issue34870] Core dump when Python VSCode debugger is attached In-Reply-To: <1538470259.0.0.545547206417.issue34870@psf.upfronthosting.co.za> Message-ID: <1538771462.8.0.545547206417.issue34870@psf.upfronthosting.co.za> Steve Dower added the comment: Perhaps surprisingly, Brett is :) This is best reported at https://github.com/Microsoft/ptvsd, so I'd suggest just taking it over there. If it turns out to be a Python issue, we'll bring it back. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 16:36:17 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Oct 2018 20:36:17 +0000 Subject: [issue34876] Python3.8 changes how decorators are traced In-Reply-To: <1538521604.52.0.545547206417.issue34876@psf.upfronthosting.co.za> Message-ID: <1538771777.09.0.545547206417.issue34876@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I have never looked at the trace of a decorated object before. The 3.7 behavior treating the inner decorator line as the first line of the decorated function definition looks wrong to me. I actually expected the line pointer to move down to the def line, analogously to the following, at least until after MAKE_FUNCTION, but moving to the beginning of the statement for the rest would seem proper. >>> dis.dis("""a = f( f( f( 3)))""") 1 0 LOAD_NAME 0 (f) 2 2 LOAD_NAME 0 (f) 3 4 LOAD_NAME 0 (f) 4 6 LOAD_CONST 0 (3) 8 CALL_FUNCTION 1 10 CALL_FUNCTION 1 12 CALL_FUNCTION 1 14 STORE_NAME 1 (a) 16 LOAD_CONST 1 (None) 18 RETURN_VALUE ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 16:42:35 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Oct 2018 20:42:35 +0000 Subject: [issue34884] Python loads incorrect libraries on MacOS, 2.7 In-Reply-To: <1538562876.74.0.545547206417.issue34884@psf.upfronthosting.co.za> Message-ID: <1538772155.98.0.545547206417.issue34884@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- title: Python loads incorrect libraries -> Python loads incorrect libraries on MacOS, 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 16:55:27 2018 From: report at bugs.python.org (Ned Batchelder) Date: Fri, 05 Oct 2018 20:55:27 +0000 Subject: [issue34876] Python3.8 changes how decorators are traced In-Reply-To: <1538521604.52.0.545547206417.issue34876@psf.upfronthosting.co.za> Message-ID: <1538772927.79.0.545547206417.issue34876@psf.upfronthosting.co.za> Ned Batchelder added the comment: This is the --trace output for some stacked decorators: $ cat -n /tmp/decdec.py 1 def decorator1(f): 2 return f 3 4 def decorator2(f): 5 return f 6 7 def decorator3(f): 8 return f 9 10 @decorator1 11 @decorator2 12 @decorator3 13 def func(): 14 print("hello") 15 16 func() $ python3.7 -m trace --trace /tmp/decdec.py --- modulename: decdec, funcname: decdec.py(1): def decorator1(f): decdec.py(4): def decorator2(f): decdec.py(7): def decorator3(f): decdec.py(10): @decorator1 decdec.py(11): @decorator2 decdec.py(12): @decorator3 --- modulename: decdec, funcname: decorator3 decdec.py(8): return f --- modulename: decdec, funcname: decorator2 decdec.py(5): return f --- modulename: decdec, funcname: decorator1 decdec.py(2): return f decdec.py(16): func() --- modulename: decdec, funcname: func decdec.py(14): print("hello") hello $ python3.8 -m trace --trace /tmp/decdec.py --- modulename: decdec, funcname: decdec.py(1): def decorator1(f): decdec.py(4): def decorator2(f): decdec.py(7): def decorator3(f): decdec.py(10): @decorator1 decdec.py(11): @decorator2 decdec.py(12): @decorator3 decdec.py(10): @decorator1 --- modulename: decdec, funcname: decorator3 decdec.py(8): return f --- modulename: decdec, funcname: decorator2 decdec.py(5): return f --- modulename: decdec, funcname: decorator1 decdec.py(2): return f decdec.py(16): func() --- modulename: decdec, funcname: func decdec.py(14): print("hello") hello In Python3.8, "@decorator1" appears twice, as both the first and the last decorator line traced. There's no conceptual reason to show that line twice. I'd like to consider the stacked decorator case separately from the multi-line function call case. Yes, they are consequences of the same change. One change can have good effects and bad effects. We can do further work to eliminate the bad effects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 17:00:13 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Oct 2018 21:00:13 +0000 Subject: [issue34895] Mark optional stdlib modules in documentation In-Reply-To: <1538670818.19.0.545547206417.issue34895@psf.upfronthosting.co.za> Message-ID: <1538773213.75.0.545547206417.issue34895@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Some modules are marked 'unix-only' or 'windows-only'. The Windows installer includes all dependencies unless one asks that tcl/tk, tkinter, IDLE, (and turtle?) not be installed. I believe the situation is now similar on Mac. Please give specific examples of doc you think is deficient. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 17:02:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 21:02:28 +0000 Subject: [issue34899] Possible assertion failure due to int_from_bytes_impl() In-Reply-To: <1538691047.46.0.545547206417.issue34899@psf.upfronthosting.co.za> Message-ID: <1538773348.5.0.545547206417.issue34899@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 7bb9cd0a6766fd3e7b3c1e8f2315304ae192b34c by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-34899: Fix a possible assertion failure due to int_from_bytes_impl() (GH-9705) https://github.com/python/cpython/commit/7bb9cd0a6766fd3e7b3c1e8f2315304ae192b34c ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 17:02:36 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Oct 2018 21:02:36 +0000 Subject: [issue34899] Possible assertion failure due to int_from_bytes_impl() In-Reply-To: <1538691047.46.0.545547206417.issue34899@psf.upfronthosting.co.za> Message-ID: <1538773356.57.0.545547206417.issue34899@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9115 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 17:02:45 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Oct 2018 21:02:45 +0000 Subject: [issue34899] Possible assertion failure due to int_from_bytes_impl() In-Reply-To: <1538691047.46.0.545547206417.issue34899@psf.upfronthosting.co.za> Message-ID: <1538773365.09.0.545547206417.issue34899@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9116 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 17:14:33 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 05 Oct 2018 21:14:33 +0000 Subject: [issue34839] doctest: Change example under warnings section In-Reply-To: <1538180284.16.0.545547206417.issue34839@psf.upfronthosting.co.za> Message-ID: <1538774073.23.0.545547206417.issue34839@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Thanks for the discussion. I'll mark this as 'easy' for a first-time contribution. ---------- keywords: +easy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 17:20:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Oct 2018 21:20:44 +0000 Subject: [issue34870] Core dump when Python VSCode debugger is attached In-Reply-To: <1538470259.0.0.545547206417.issue34870@psf.upfronthosting.co.za> Message-ID: <1538774444.03.0.545547206417.issue34870@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- resolution: -> third party stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 17:24:30 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Oct 2018 21:24:30 +0000 Subject: [issue34899] Possible assertion failure due to int_from_bytes_impl() In-Reply-To: <1538691047.46.0.545547206417.issue34899@psf.upfronthosting.co.za> Message-ID: <1538774670.96.0.545547206417.issue34899@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 526929be39e139a7d89f4c363d79c28566f30d71 by Miss Islington (bot) in branch '3.6': bpo-34899: Fix a possible assertion failure due to int_from_bytes_impl() (GH-9705) https://github.com/python/cpython/commit/526929be39e139a7d89f4c363d79c28566f30d71 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 17:29:01 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Oct 2018 21:29:01 +0000 Subject: [issue34899] Possible assertion failure due to int_from_bytes_impl() In-Reply-To: <1538691047.46.0.545547206417.issue34899@psf.upfronthosting.co.za> Message-ID: <1538774941.39.0.545547206417.issue34899@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 1596fea0a329e1f5e4cce0135724881ca5f1d341 by Miss Islington (bot) in branch '3.7': bpo-34899: Fix a possible assertion failure due to int_from_bytes_impl() (GH-9705) https://github.com/python/cpython/commit/1596fea0a329e1f5e4cce0135724881ca5f1d341 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 17:29:49 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Oct 2018 21:29:49 +0000 Subject: [issue34839] doctest: Change example under warnings section In-Reply-To: <1538180284.16.0.545547206417.issue34839@psf.upfronthosting.co.za> Message-ID: <1538774989.98.0.545547206417.issue34839@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am posting this on core-mentorship. If you want to do this, post here and submit the PR within a day. I will do the merge is no-one else does. ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 17:43:57 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 05 Oct 2018 21:43:57 +0000 Subject: [issue34839] doctest: Change example under warnings section In-Reply-To: <1538180284.16.0.545547206417.issue34839@psf.upfronthosting.co.za> Message-ID: <1538775837.76.0.545547206417.issue34839@psf.upfronthosting.co.za> Lysandros Nikolaou added the comment: I would be happy to change this. I will submit a PR ASAP. ---------- nosy: +lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 18:29:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 22:29:00 +0000 Subject: [issue34876] Python3.8 changes how decorators are traced In-Reply-To: <1538521604.52.0.545547206417.issue34876@psf.upfronthosting.co.za> Message-ID: <1538778540.98.0.545547206417.issue34876@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +9117 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 18:30:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Oct 2018 22:30:35 +0000 Subject: [issue34876] Python3.8 changes how decorators are traced In-Reply-To: <1538521604.52.0.545547206417.issue34876@psf.upfronthosting.co.za> Message-ID: <1538778635.22.0.545547206417.issue34876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Seems PR 9731 fixes this issue. I'll add tests later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 18:38:07 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Oct 2018 22:38:07 +0000 Subject: [issue34902] Azure pipelines PR build fails with "Unexpected vmImage 'vs2017-win2017'" In-Reply-To: <1538718327.26.0.545547206417.issue34902@psf.upfronthosting.co.za> Message-ID: <1538779087.83.0.545547206417.issue34902@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Sure, thanks for the details and fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 18:57:06 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 05 Oct 2018 22:57:06 +0000 Subject: [issue34158] Documentation of datetime '%z' format code is odd In-Reply-To: <1532036087.85.0.56676864532.issue34158@psf.upfronthosting.co.za> Message-ID: <1538780226.98.0.545547206417.issue34158@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: New changeset 92878829c31ab2fc71c60555ce87a5f6cbc876f0 by Alexander Belopolsky (Christophe Nanteuil) in branch 'master': bpo-34158: Documentation UTC offset update (GH-8377) https://github.com/python/cpython/commit/92878829c31ab2fc71c60555ce87a5f6cbc876f0 ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 18:57:13 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Oct 2018 22:57:13 +0000 Subject: [issue34158] Documentation of datetime '%z' format code is odd In-Reply-To: <1532036087.85.0.56676864532.issue34158@psf.upfronthosting.co.za> Message-ID: <1538780233.9.0.545547206417.issue34158@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9118 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 19:05:07 2018 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 05 Oct 2018 23:05:07 +0000 Subject: [issue34910] PyObject_Print() doesn't always return -1 on error Message-ID: <1538780707.1.0.545547206417.issue34910@psf.upfronthosting.co.za> New submission from Zackery Spytz : PyObject_Print() returns 0 if PyUnicode_AsEncodedString() fails. ---------- components: Interpreter Core messages: 327197 nosy: ZackerySpytz priority: normal severity: normal status: open title: PyObject_Print() doesn't always return -1 on error type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 19:08:19 2018 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 05 Oct 2018 23:08:19 +0000 Subject: [issue34910] PyObject_Print() doesn't always return -1 on error In-Reply-To: <1538780707.1.0.545547206417.issue34910@psf.upfronthosting.co.za> Message-ID: <1538780899.5.0.545547206417.issue34910@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +9119 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 19:23:46 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 05 Oct 2018 23:23:46 +0000 Subject: [issue34893] Add 2to3 fixer to change send and recv methods of socket object. In-Reply-To: <1538664300.49.0.545547206417.issue34893@psf.upfronthosting.co.za> Message-ID: <1538781826.19.0.545547206417.issue34893@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Please find attached the fixer I wrote. Wouldn't this break programs that had already run encode() on the input (as they were already supposed to be doing, and as they would be doing for code that runs under both Python2 and Python3)? ---------- nosy: +rhettinger, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 19:38:48 2018 From: report at bugs.python.org (Paul Bailey) Date: Fri, 05 Oct 2018 23:38:48 +0000 Subject: [issue34911] Allow Cookies for Secure WebSockets Message-ID: <1538782728.4.0.545547206417.issue34911@psf.upfronthosting.co.za> New submission from Paul Bailey : http.cookiejar.DefaultCookiePolicy should support the secure websocket protocol wss. WebSockets start off as HTTP requests and then get upgraded but have a different protocol of `wss` instead of `https`. This means secure cookies are not passed through by default. ---------- components: Library (Lib) messages: 327199 nosy: Paul Bailey priority: normal severity: normal status: open title: Allow Cookies for Secure WebSockets type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 19:44:11 2018 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Oct 2018 23:44:11 +0000 Subject: [issue34911] Allow Cookies for Secure WebSockets In-Reply-To: <1538782728.4.0.545547206417.issue34911@psf.upfronthosting.co.za> Message-ID: <1538783051.44.0.545547206417.issue34911@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +9120 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 19:44:31 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Oct 2018 23:44:31 +0000 Subject: [issue34903] strptime %d handling of single digit day of month In-Reply-To: <1538724686.61.0.545547206417.issue34903@psf.upfronthosting.co.za> Message-ID: <1538783071.51.0.545547206417.issue34903@psf.upfronthosting.co.za> Brett Cannon added the comment: So the documentation reads that way because it was originally written for strftime and has been repurposed to represent both. If the code does the right thing then adding a note that strptime supports single digits accurately would probably be a welcome pull request! ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 19:50:33 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Oct 2018 23:50:33 +0000 Subject: [issue34908] netrc parding is overly strict In-Reply-To: <1538760084.12.0.545547206417.issue34908@psf.upfronthosting.co.za> Message-ID: <1538783433.59.0.545547206417.issue34908@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. There is no spec for .netrc files and the closest I can find is [0]. The error is present in master also. Could this be considered as an enhancement? [0] https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 19:51:58 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 05 Oct 2018 23:51:58 +0000 Subject: [issue34856] Make the repr of lambda contain signature and body expression. In-Reply-To: <1538331263.14.0.545547206417.issue34856@psf.upfronthosting.co.za> Message-ID: <1538783518.89.0.545547206417.issue34856@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +0 This would help with debugging and would compensate for the lack of a docstring. FWIW, I've found the new longer repr's for regex match objects to be helpful, and this would be another step in the right direction. Terry's suggestion to truncate a long repr makes sense. The repr's for long lists and dicts are different in that they are expected to round-trip, but there is no such expectation for lambdas. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 19:55:45 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 05 Oct 2018 23:55:45 +0000 Subject: [issue34906] Fix typo in the documentation In-Reply-To: <1538749042.1.0.545547206417.issue34906@psf.upfronthosting.co.za> Message-ID: <1538783745.21.0.545547206417.issue34906@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- pull_requests: +9122 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 19:57:38 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 05 Oct 2018 23:57:38 +0000 Subject: [issue34906] Fix typo in the documentation In-Reply-To: <1538749042.1.0.545547206417.issue34906@psf.upfronthosting.co.za> Message-ID: <1538783858.15.0.545547206417.issue34906@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I just created a new PR where I fix typos in the Misc directory (mainly). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 20:02:30 2018 From: report at bugs.python.org (Ian Remmel) Date: Sat, 06 Oct 2018 00:02:30 +0000 Subject: [issue34908] netrc parding is overly strict In-Reply-To: <1538760084.12.0.545547206417.issue34908@psf.upfronthosting.co.za> Message-ID: <1538784150.93.0.545547206417.issue34908@psf.upfronthosting.co.za> Ian Remmel added the comment: Yea, somehow, I suspected it was because there's no formal spec :) I guess technically it's an enhancement, but given that configuration dictated by third-parties can break the environment, it does feel like a bug. For example, I can't use a python app to authenticate to github via netrc because of how heroku says I have to configure my netrc. Also, there are probably two subtly different issues: 1. a machine with a password but no login breaks parsing 2. a machine with an unrecognized key breaks parsing ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 20:02:54 2018 From: report at bugs.python.org (Ian Remmel) Date: Sat, 06 Oct 2018 00:02:54 +0000 Subject: [issue34908] netrc parsing is overly strict In-Reply-To: <1538760084.12.0.545547206417.issue34908@psf.upfronthosting.co.za> Message-ID: <1538784174.83.0.545547206417.issue34908@psf.upfronthosting.co.za> Change by Ian Remmel : ---------- title: netrc parding is overly strict -> netrc parsing is overly strict _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 20:29:08 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 06 Oct 2018 00:29:08 +0000 Subject: [issue34856] Make the repr of lambda contain signature and body expression. In-Reply-To: <1538331263.14.0.545547206417.issue34856@psf.upfronthosting.co.za> Message-ID: <1538785748.0.0.545547206417.issue34856@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 20:30:17 2018 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 06 Oct 2018 00:30:17 +0000 Subject: [issue34856] Make the repr of lambda contain signature and body expression. In-Reply-To: <1538785748.44.0.668975606942.issue34856@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: OK, if it gets truncated beyond a reasonable length I remove my objection. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 21:04:28 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 06 Oct 2018 01:04:28 +0000 Subject: [issue33173] GzipFile's .seekable() returns True even if underlying buffer is not seekable In-Reply-To: <1522254528.0.0.467229070634.issue33173@psf.upfronthosting.co.za> Message-ID: <1538787868.21.0.545547206417.issue33173@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Allowing for non seekable files was added in issue1675951. And under that issue in msg117131, the author of the change wrote: "The patch creates another problem with is not yet fixed: The implementation of .seekable() is becoming wrong. As one can now use non seekable files the implementation should check if the file object used for reading is really seekable." issue23529 made significant changes to the code and seekable() is again mentioned in msg239245 and subsequent comments. Nosying the devs who worked on those issues. ---------- nosy: +cheryl.sabella, martin.panter, pitrou versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:12:59 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 06 Oct 2018 02:12:59 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1538791979.07.0.545547206417.issue34909@psf.upfronthosting.co.za> Ned Deily added the comment: Ethan, do you an ETA of a fix for this? 3.7.1 final is scheduled for fewer than 24 hours from now but if it's truly a release blocker I will hold for a fix and probably do a rc2 instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:18:45 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 06 Oct 2018 02:18:45 +0000 Subject: [issue34565] Launcher does not validate major versions In-Reply-To: <1535918620.54.0.56676864532.issue34565@psf.upfronthosting.co.za> Message-ID: <1538792325.28.0.545547206417.issue34565@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 28dd737c46d50f4952c61651426c69cc43991bfa by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-34565: Change a PC/launcher.c comment to accurately describe valid major versions. (GH-9037) (GH-9065) https://github.com/python/cpython/commit/28dd737c46d50f4952c61651426c69cc43991bfa ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:20:02 2018 From: report at bugs.python.org (Ethan Furman) Date: Sat, 06 Oct 2018 02:20:02 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1538792402.37.0.545547206417.issue34909@psf.upfronthosting.co.za> Ethan Furman added the comment: It really is. I got a message from Michal Arbet from OpenStack about it. I just finished the fix and am currently running the tests locally. Is it okay to have the PR directly against 3.7 instead of doing 3.8 first and backporting? ---------- stage: test needed -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:22:48 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 06 Oct 2018 02:22:48 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1538792568.68.0.545547206417.issue34909@psf.upfronthosting.co.za> Ned Deily added the comment: > I just finished the fix and am currently running the tests locally. Great. Thanks! > Is it okay to have the PR directly against 3.7 instead of doing 3.8 first and backporting? If you want but it's probably easier to do it the normal way and let the bot do the backport, assuming master and 3.7 are still similar in that area. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:44:29 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 06 Oct 2018 02:44:29 +0000 Subject: [issue34158] Documentation of datetime '%z' format code is odd In-Reply-To: <1532036087.85.0.56676864532.issue34158@psf.upfronthosting.co.za> Message-ID: <1538793869.34.0.545547206417.issue34158@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 0991b9bb94036e0f271d223c8db7d81980c76736 by Ned Deily (Miss Islington (bot)) in branch '3.7': [3.7] bpo-34158: Documentation UTC offset update (GH-8377) (GH-9732) https://github.com/python/cpython/commit/0991b9bb94036e0f271d223c8db7d81980c76736 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:50:56 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 06 Oct 2018 02:50:56 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1538794255.99.0.545547206417.issue33729@psf.upfronthosting.co.za> Ned Deily added the comment: What's the status of this issue for 3.7 and for 3.6? Is everyone OK with what is currently in 3.7, i.e. no revert needed or has it already been reverted elsewhere? Also, there is the open PR for 3.6. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 22:55:41 2018 From: report at bugs.python.org (Eryk Sun) Date: Sat, 06 Oct 2018 02:55:41 +0000 Subject: [issue34840] dlopen() error with no error message from dlerror() In-Reply-To: <1538203086.61.0.545547206417.issue34840@psf.upfronthosting.co.za> Message-ID: <1538794541.02.0.545547206417.issue34840@psf.upfronthosting.co.za> Eryk Sun added the comment: > FWIW, the method does not exist on Windows In Windows it's FreeLibrary, for which the implementation in NT calls loader and runtime library functions such as LdrUnloadDll and RtlImageNtHeaderEx. These OS functions internally use structured exception handling (SEH) to retun status codes such as STATUS_DLL_NOT_FOUND and STATUS_INVALID_IMAGE_FORMAT instead of crashing the process when passed an invalid module handle (i.e. module base address). For POSIX, I don't see what can be done to avoid a crash when dlclose is passed a bad handle (i.e. module address). We can check for NULL, the obvious case, but otherwise AFAIK we can only detect an invalid address by trying to access it, which triggers a segfault. This is the reason that dlclose is only available in the private _ctypes module, and ctypes itself never even calls it. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 5 23:10:09 2018 From: report at bugs.python.org (Ethan Furman) Date: Sat, 06 Oct 2018 03:10:09 +0000 Subject: [issue34282] Enum._convert shadows members named _convert In-Reply-To: <1532972199.25.0.56676864532.issue34282@psf.upfronthosting.co.za> Message-ID: <1538795409.54.0.545547206417.issue34282@psf.upfronthosting.co.za> Ethan Furman added the comment: New changeset 22e86fbbca04d251233fc07515885d2b67945094 by Ethan Furman (Miss Islington (bot)) in branch '3.6': [3.7] bpo-34282: Fix Enum._convert method shadowing members named _convert (GH-9034) (GH-9229) https://github.com/python/cpython/commit/22e86fbbca04d251233fc07515885d2b67945094 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 00:46:02 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 06 Oct 2018 04:46:02 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1538801162.53.0.545547206417.issue34909@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Ethan, the issue appears with your patch 0c076caaa82a9c6596e1fe1dbe6384d53f30a1a3 is the first bad commit commit 0c076caaa82a9c6596e1fe1dbe6384d53f30a1a3 Author: Ethan Furman Date: Fri Sep 21 22:26:32 2018 -0700 [3.7] bpo-29577: Enum: mixin classes don't mix well with already mixed Enums (GH-9328) (GH-9486) * bpo-29577: allow multiple mixin classes (found with git bisect and your test) ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 00:47:46 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 06 Oct 2018 04:47:46 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1538801266.05.0.545547206417.issue34909@psf.upfronthosting.co.za> St?phane Wirtel added the comment: git bisect start # bad: [1596fea0a329e1f5e4cce0135724881ca5f1d341] bpo-34899: Fix a possible assertion failure due to int_from_bytes_impl() (GH-9705) git bisect bad 1596fea0a329e1f5e4cce0135724881ca5f1d341 # good: [84b0129b5e0a0e22aad22ae8db2e3833a228aa57] _Py_CoerceLegacyLocale() restores LC_CTYPE on fail (GH-9044) (GH-9046) git bisect good 84b0129b5e0a0e22aad22ae8db2e3833a228aa57 # good: [470a435f3b42c9be5fdb7f7b04f3df5663ba7305] bpo-34623: Use XML_SetHashSalt in _elementtree (GH-9146) git bisect good 470a435f3b42c9be5fdb7f7b04f3df5663ba7305 # bad: [92ad2612bef198f2e3f8f09bf552189e27afcc4e] bpo-1529353: IDLE: Squeezer What's New for 3.6.7 (GH-9567) git bisect bad 92ad2612bef198f2e3f8f09bf552189e27afcc4e # good: [e5fde1f992e94f166415ab96d874ed1d2e0c8004] bpo-34537: Fix test_gdb:test_strings with LC_ALL=C (GH-9483) git bisect good e5fde1f992e94f166415ab96d874ed1d2e0c8004 # bad: [394e55a9279d17240ef6fe85d3b4ea3fe7b6dff5] [3.7] bpo-17239: Disable external entities in SAX parser (GH-9217) (GH-9511) git bisect bad 394e55a9279d17240ef6fe85d3b4ea3fe7b6dff5 # bad: [44989bc2696320cf55ae6f329aaf58edd49d792a] bpo-34472: Add data descriptor signature to zipfile (GH-8871) (GH-9399) git bisect bad 44989bc2696320cf55ae6f329aaf58edd49d792a # good: [c00f7037df3607c89323e68db3ab996b7df394de] bpo-34759: Fix error handling in ssl 'unwrap()' (GH-9468) git bisect good c00f7037df3607c89323e68db3ab996b7df394de # bad: [0c076caaa82a9c6596e1fe1dbe6384d53f30a1a3] [3.7] bpo-29577: Enum: mixin classes don't mix well with already mixed Enums (GH-9328) (GH-9486) git bisect bad 0c076caaa82a9c6596e1fe1dbe6384d53f30a1a3 # first bad commit: [0c076caaa82a9c6596e1fe1dbe6384d53f30a1a3] [3.7] bpo-29577: Enum: mixin classes don't mix well with already mixed Enums (GH-9328) (GH-9486) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 01:12:25 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 06 Oct 2018 05:12:25 +0000 Subject: [issue34839] doctest: Change example under warnings section In-Reply-To: <1538180284.16.0.545547206417.issue34839@psf.upfronthosting.co.za> Message-ID: <1538802745.59.0.545547206417.issue34839@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Terry, You say we need to keep this illustration with a section 'before 3.6' but in think it's a bad thing. 1. when you read a documentation, you just copy the example, and sometimes you don't read the requirements. 2. why do we need to keep an illustration for a previous version of Python? since >= 3.6 we keep the order (officially in 3.7), in this case, the example is useless, because you read the documentation of >= 3.7. I would prefer to remove this example for >= 3.6 and keep the illustration for the previous version. I am really interested by the feedback of Tim, Cheryl and Raymond. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 01:13:33 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Oct 2018 05:13:33 +0000 Subject: [issue34839] doctest: Change example under warnings section In-Reply-To: <1538180284.16.0.545547206417.issue34839@psf.upfronthosting.co.za> Message-ID: <1538802813.91.0.545547206417.issue34839@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Raymond, what do you think? I concur with Tim. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 01:15:12 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Oct 2018 05:15:12 +0000 Subject: [issue34839] doctest: Change example under warnings section In-Reply-To: <1538180284.16.0.545547206417.issue34839@psf.upfronthosting.co.za> Message-ID: <1538802912.48.0.545547206417.issue34839@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, set objects are still unordered, so they too require sorting for a reproducible doctest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 01:20:12 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 06 Oct 2018 05:20:12 +0000 Subject: [issue34839] doctest: Change example under warnings section In-Reply-To: <1538180284.16.0.545547206417.issue34839@psf.upfronthosting.co.za> Message-ID: <1538803212.52.0.545547206417.issue34839@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +9123 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 01:21:17 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 06 Oct 2018 05:21:17 +0000 Subject: [issue34839] doctest: Change example under warnings section In-Reply-To: <1538180284.16.0.545547206417.issue34839@psf.upfronthosting.co.za> Message-ID: <1538803277.35.0.545547206417.issue34839@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Raymond, Ok, if you agree with Tim, I just created a PR. Have a nice day, ---------- keywords: -patch stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 01:27:28 2018 From: report at bugs.python.org (Tim Peters) Date: Sat, 06 Oct 2018 05:27:28 +0000 Subject: [issue34839] doctest: Change example under warnings section In-Reply-To: <1538180284.16.0.545547206417.issue34839@psf.upfronthosting.co.za> Message-ID: <1538803648.03.0.545547206417.issue34839@psf.upfronthosting.co.za> Tim Peters added the comment: Stephane, it's not deep. People who need to write doctests that work across N versions of Python shouldn't need to read N versions of the documentation. This is hardly unique to doctest. We routinely add "Changed in version m.n" blurbs all over the place. Ways that were _necessary_ for robust dict testing continue to work fine in 3.6 and 3.7, so it doesn't harm anything if people mindlessly copy an example that _could_ be spelled some other way under 3.6+. It's not like there's even anything slightly obscure about, e.g., >>> foo() == {"Hermione": "hippogryph", "Harry": "broomstick"} True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 01:30:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2018 05:30:57 +0000 Subject: [issue34893] Add 2to3 fixer to change send and recv methods of socket object. In-Reply-To: <1538664300.49.0.545547206417.issue34893@psf.upfronthosting.co.za> Message-ID: <1538803857.74.0.545547206417.issue34893@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm sure that this would break the code which sends bytes objects and expects to receive bytes objects. s.send(struct.pack('!I', x)) q, w, e = struct.unpack('!IHQ', s.recv(4)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 01:31:56 2018 From: report at bugs.python.org (Windson Yang) Date: Sat, 06 Oct 2018 05:31:56 +0000 Subject: [issue34912] Update overflow checks in resize_buffer Message-ID: <1538803916.84.0.545547206417.issue34912@psf.upfronthosting.co.za> New submission from Windson Yang : In [resize_buffer](https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Modules/_io/stringio.c#L85) /* For simplicity, stay in the range of the signed type. Anyway, Python doesn't allow strings to be longer than this. */ if (size > PY_SSIZE_T_MAX) goto overflow; ... IMO, we should check the overflow with if (size > PY_SSIZE_T_MAX/sizeof(Py_UCS4)) Or we can just delete this code because we will check later at [alloc_check](https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Modules/_io/stringio.c#L107? BTW, I found we only use PY_SIZE_MAX here in CPython, I wonder why we do not use PY_SSIZE_T_MAX instead? ---------- components: IO messages: 327223 nosy: Windson Yang priority: normal severity: normal status: open title: Update overflow checks in resize_buffer versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 01:37:42 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 06 Oct 2018 05:37:42 +0000 Subject: [issue34839] doctest: Change example under warnings section In-Reply-To: <1538180284.16.0.545547206417.issue34839@psf.upfronthosting.co.za> Message-ID: <1538804262.23.0.545547206417.issue34839@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Tim, I understand. It's just my experience, I have seen a lot of new comers (in my python trainings), they just copy the examples and don't read the total explanation. sometimes, because english is not their native language and in this case, they try to find an example, copy/paste and run it and when there is an exception, they will try to read the doc. so, I have pushed a PR, I just changed sentences, I am waiting for your suggestions. Thank you for your explanation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 01:41:44 2018 From: report at bugs.python.org (Ethan Furman) Date: Sat, 06 Oct 2018 05:41:44 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1538804504.85.0.545547206417.issue34909@psf.upfronthosting.co.za> Change by Ethan Furman : ---------- keywords: +patch pull_requests: +9124 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 01:47:32 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 06 Oct 2018 05:47:32 +0000 Subject: [issue34884] Python may load incorrect libraries when embedding the macOS system python 2.7 In-Reply-To: <1538562876.74.0.545547206417.issue34884@psf.upfronthosting.co.za> Message-ID: <1538804852.42.0.545547206417.issue34884@psf.upfronthosting.co.za> Ned Deily added the comment: Ugh! That's a messy one. Just for the record, the problem of searching other than the system Python images is reproducible with other distributions of Python, including the python.org Python 2.7 - so it is not limited to Homebrew. The key seems to be which "python" (or possibly "python2.7") is found first on $PATH. It also appears to not be limited to framework builds of Python; a non-framework build of 2.7 inserted first on $PATH also caused a failure. I took a quick look at how lldb apparently invokes python, following the link in the StackOverflow item referenced in the llvm bug tracker issue: http://llvm.org/svn/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp and I'm not going to try to try to step through all that. Much of the magic that's involved in initializing Python search paths is in Modules/getpath.c. In it, you'll see that we do some magic using long deprecated macOS dyld APIs, namely NSModuleForSymbol, NSLookupAndBindSymbol, and NSLibraryNameForModule. It's quite possible that the behavior seen is due to how they search for symbols. One could try to track them down in the dyld sources found in https://opensource.apple.com. But now that I think of it, we have had an open issue (Issue15498) for a long time to avoid the use of those deprecated APIs and, lo and behold, one of the comments under it (msg173828) might very well be the key to what's going on here: "Apple seems to have switched to using dlopen in their version of getpath.c (see , this is the version in OSX 10.8.2) This causes a problem for some people, as noticed on the pythonmac mailing list. This is something we should test before applying my patch to avoid regressions. [...]" If so, the problem may have to be fixed by Apple in the system Python. Ronald undoubtedly has better insight into this. ---------- components: -Library (Lib) title: Python loads incorrect libraries on MacOS, 2.7 -> Python may load incorrect libraries when embedding the macOS system python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 02:03:22 2018 From: report at bugs.python.org (Martin Panter) Date: Sat, 06 Oct 2018 06:03:22 +0000 Subject: [issue33173] GzipFile's .seekable() returns True even if underlying buffer is not seekable In-Reply-To: <1522254528.0.0.467229070634.issue33173@psf.upfronthosting.co.za> Message-ID: <1538805802.85.0.545547206417.issue33173@psf.upfronthosting.co.za> Martin Panter added the comment: If a change is made, it would be nice to bring the ?gzip?, ?bzip? and LZMA modules closer together. The current ?bzip? and LZMA modules rely on the underlying ?seekable? method without a fallback implementation, but also have a check for read mode. I think the seeking functionality in these modules is a misfeature. But since it is already here, it is probably best to leave it alone, and just document it. My comment about making ?seekable? stricter is at . Even if the underlying stream is not seekable, GzipFile can still fast-forward. Here is a demonstration: >>> z = BytesIO(bytes.fromhex( ... "1F8B08000000000002FFF348CD29D051F05448CC55282E294DCE56C8CC53485448AFCA" ... "2C5048CBCC490500F44BF0A01F000000" ... )) >>> def seek(*args): raise UnsupportedOperation() ... >>> z.seek = seek # Make the underlying stream not seekable >>> f = GzipFile(fileobj=z) >>> f.read(10) b'Help, I am' >>> f.seek(20) # Fast forward 20 >>> f.read() b'a gzip file' >>> f.seek(0) # Rewind Traceback (most recent call last): File "", line 1, in File "/home/proj/python/cpython/Lib/gzip.py", line 368, in seek return self._buffer.seek(offset, whence) File "/home/proj/python/cpython/Lib/_compression.py", line 137, in seek self._rewind() File "/home/proj/python/cpython/Lib/gzip.py", line 515, in _rewind super()._rewind() File "/home/proj/python/cpython/Lib/_compression.py", line 115, in _rewind self._fp.seek(0) File "/home/proj/python/cpython/Lib/gzip.py", line 105, in seek return self.file.seek(off) File "", line 1, in seek io.UnsupportedOperation ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 02:09:25 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 06 Oct 2018 06:09:25 +0000 Subject: [issue34903] strptime %d handling of single digit day of month In-Reply-To: <1538724686.61.0.545547206417.issue34903@psf.upfronthosting.co.za> Message-ID: <1538806165.27.0.545547206417.issue34903@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: In addition to %d there are also other items that support single digit though zero padding is mentioned with strptime as below in the context of strftime : >>> import datetime >>> datetime.datetime.strptime("1/1/2018 1:1:1", "%d/%m/%Y %I:%M:%S") datetime.datetime(2018, 1, 1, 1, 1, 1) >>> datetime.datetime.strftime(datetime.datetime(year=2018, month=1, day=1, hour=1, second=1, minute=1), "%d/%m/%Y %I:%M:%S") '01/01/2018 01:01:01' I couldn't find exact set of words that can be used to denote that zero padding is optional in strptime and it's returned as zero padded in strftime but if we are changing %d then I propose changing other items too with similar wording. Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 02:29:40 2018 From: report at bugs.python.org (Ethan Furman) Date: Sat, 06 Oct 2018 06:29:40 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1538807380.31.0.545547206417.issue34909@psf.upfronthosting.co.za> Ethan Furman added the comment: New changeset cd45385ffad8910293e5659cfe7ab036e70613b7 by Ethan Furman in branch 'master': bpo-34909: keep searching mixins until base class is found (GH-9737) https://github.com/python/cpython/commit/cd45385ffad8910293e5659cfe7ab036e70613b7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 02:30:06 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Oct 2018 06:30:06 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1538807406.78.0.545547206417.issue34909@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 02:44:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2018 06:44:29 +0000 Subject: [issue34910] PyObject_Print() doesn't always return -1 on error In-Reply-To: <1538780707.1.0.545547206417.issue34910@psf.upfronthosting.co.za> Message-ID: <1538808269.48.0.545547206417.issue34910@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ae62f015240c9162773341a9922794e6b960779d by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-34910: Ensure that PyObject_Print() always returns -1 on error. (GH-9733) https://github.com/python/cpython/commit/ae62f015240c9162773341a9922794e6b960779d ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 02:44:37 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Oct 2018 06:44:37 +0000 Subject: [issue34910] PyObject_Print() doesn't always return -1 on error In-Reply-To: <1538780707.1.0.545547206417.issue34910@psf.upfronthosting.co.za> Message-ID: <1538808277.22.0.545547206417.issue34910@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9126 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 02:44:45 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Oct 2018 06:44:45 +0000 Subject: [issue34910] PyObject_Print() doesn't always return -1 on error In-Reply-To: <1538780707.1.0.545547206417.issue34910@psf.upfronthosting.co.za> Message-ID: <1538808285.06.0.545547206417.issue34910@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9127 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 03:06:04 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 06 Oct 2018 07:06:04 +0000 Subject: [issue34913] Document gzip command line interface Message-ID: <1538809564.11.0.545547206417.issue34913@psf.upfronthosting.co.za> New submission from Karthikeyan Singaravelan : gzip supports command line interface with `python -m gzip` like zipfile and tarfile but there is no help available from the command line which can be covered when issue23596 is merged that uses argparse along with tests for which are also lacking at the moment. There can be at least docs about command line arguments at https://docs.python.org/3/library/gzip.html. Currently there is no way to know how the command line interface works for gzip without looking at the source code. ---------- assignee: docs at python components: Documentation messages: 327230 nosy: docs at python, xtreak priority: normal severity: normal status: open title: Document gzip command line interface versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 03:06:58 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Oct 2018 07:06:58 +0000 Subject: [issue34910] PyObject_Print() doesn't always return -1 on error In-Reply-To: <1538780707.1.0.545547206417.issue34910@psf.upfronthosting.co.za> Message-ID: <1538809618.78.0.545547206417.issue34910@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 177254c96f9258a62e3e571c2aee0b642070a374 by Miss Islington (bot) in branch '3.6': bpo-34910: Ensure that PyObject_Print() always returns -1 on error. (GH-9733) https://github.com/python/cpython/commit/177254c96f9258a62e3e571c2aee0b642070a374 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 03:07:15 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Oct 2018 07:07:15 +0000 Subject: [issue34910] PyObject_Print() doesn't always return -1 on error In-Reply-To: <1538780707.1.0.545547206417.issue34910@psf.upfronthosting.co.za> Message-ID: <1538809635.64.0.545547206417.issue34910@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 49fb49d6f57661f2a7601f1d759163866f707fed by Miss Islington (bot) in branch '3.7': bpo-34910: Ensure that PyObject_Print() always returns -1 on error. (GH-9733) https://github.com/python/cpython/commit/49fb49d6f57661f2a7601f1d759163866f707fed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 03:11:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2018 07:11:01 +0000 Subject: [issue34910] PyObject_Print() doesn't always return -1 on error In-Reply-To: <1538780707.1.0.545547206417.issue34910@psf.upfronthosting.co.za> Message-ID: <1538809861.49.0.545547206417.issue34910@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Zackery for catching such kind of errors. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 03:43:24 2018 From: report at bugs.python.org (Ethan Furman) Date: Sat, 06 Oct 2018 07:43:24 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1538811804.74.0.545547206417.issue34909@psf.upfronthosting.co.za> Ethan Furman added the comment: New changeset 453b3b0e87cb16345c276b9064a4480ce3794a74 by Ethan Furman (Miss Islington (bot)) in branch '3.7': bpo-34909: keep searching mixins until base class is found (GH-9737) (GH-9738) https://github.com/python/cpython/commit/453b3b0e87cb16345c276b9064a4480ce3794a74 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 03:51:27 2018 From: report at bugs.python.org (Vinodhini) Date: Sat, 06 Oct 2018 07:51:27 +0000 Subject: [issue29341] Missing accepting path-like object in docstrings of os module functions In-Reply-To: <1485064061.59.0.597221589705.issue29341@psf.upfronthosting.co.za> Message-ID: <1538812287.63.0.545547206417.issue29341@psf.upfronthosting.co.za> Vinodhini added the comment: This is now carried forward in 3.8 also. Is anyone working on this issue ? It needs to be corrected in doc-string for all method where its applicable ---------- nosy: +Vinu2003 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 04:06:57 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 06 Oct 2018 08:06:57 +0000 Subject: [issue34914] Clarify text encoding used to enable UTF-8 mode Message-ID: <1538813217.24.0.545547206417.issue34914@psf.upfronthosting.co.za> New submission from Nick Coghlan : While working on the docs updates for bpo-34589 (clarifying that "PYTHONCOERCECLOCALE=0" and "PYTHONCOERCELOCALE=warn" need both the environment variable name and the value to be encoded as ASCII in order to have any effect), I realised that it was less explicit how to reliably enable UTF-8 mode, since that can be enabled even when the current locale is a nominally ASCII-incompatible one like gb18030, and the command line settings get processed as wchar strings rather than 8-bit char strings. >From what I've been able to figure out, the environment variable case is the same as for locale coercion: both the environment variable name and the value need to be encoded as ASCII. This actually happens implicitly, as even encodings like gb18030 still encode ASCII letters and numbers the same way ASCII does - their incompatibilities with ASCII lie elsewhere. Fully incompatible encodings like UTF-16 and UTF-32 don't get used as locale encodings in the first place because they'd break too many applications. I believe the same holds true for the command line arguments, just in the other direction: they get converted to wchar* with either mbstowcs or mrbtowc, and then compared using wcscmp or wcsncmp, but for all encodings that actually get used as locale encodings, the ASCII code points that CPython cares about get mapped directly to the corresponding UTF-16-LE or UTF-32 code point at both compile time (in the code) and at runtime (when reading the arg string). Given that simply not thinking about the problem will actually do the right thing in all cases, I don't think this needs to be documented prominently, but I do think it would be good to explicitly address the point somewhere. ---------- assignee: docs at python components: Documentation messages: 327236 nosy: docs at python, eric.snow, ncoghlan, vstinner priority: low severity: normal stage: needs patch status: open title: Clarify text encoding used to enable UTF-8 mode type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 04:48:13 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 06 Oct 2018 08:48:13 +0000 Subject: [issue34905] Cannot assign memoryview values from array.array In-Reply-To: <1538742292.09.0.545547206417.issue34905@psf.upfronthosting.co.za> Message-ID: <1538815693.38.0.545547206417.issue34905@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 04:56:27 2018 From: report at bugs.python.org (Mike Gleen) Date: Sat, 06 Oct 2018 08:56:27 +0000 Subject: [issue34903] strptime %d handling of single digit day of month In-Reply-To: <1538806165.27.0.545547206417.issue34903@psf.upfronthosting.co.za> Message-ID: Mike Gleen added the comment: Thanks for the quick response. I would be happy to write a pull request for the doc change. I've never done this before so it'll take a little while to get my head around the process, but the "Helping with Documentation" chapter seems good. Mike On Sat, Oct 6, 2018 at 7:09 AM Karthikeyan Singaravelan < report at bugs.python.org> wrote: > > Karthikeyan Singaravelan added the comment: > > In addition to %d there are also other items that support single digit > though zero padding is mentioned with strptime as below in the context of > strftime : > > >>> import datetime > >>> datetime.datetime.strptime("1/1/2018 1:1:1", "%d/%m/%Y %I:%M:%S") > datetime.datetime(2018, 1, 1, 1, 1, 1) > > > >>> datetime.datetime.strftime(datetime.datetime(year=2018, month=1, > day=1, hour=1, second=1, minute=1), "%d/%m/%Y %I:%M:%S") > '01/01/2018 01:01:01' > > I couldn't find exact set of words that can be used to denote that zero > padding is optional in strptime and it's returned as zero padded in > strftime but if we are changing %d then I propose changing other items too > with similar wording. > > Thanks > > ---------- > nosy: +xtreak > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 05:05:47 2018 From: report at bugs.python.org (Anthony Flury) Date: Sat, 06 Oct 2018 09:05:47 +0000 Subject: [issue34891] Multi-processing example inaccurate warning In-Reply-To: <1538649606.04.0.545547206417.issue34891@psf.upfronthosting.co.za> Message-ID: <1538816747.49.0.545547206417.issue34891@psf.upfronthosting.co.za> Anthony Flury added the comment: An example that does work : $ python3 Python 3.6.6 (default, Sep 12 2018, 18:26:19) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from multiprocessing import Pool >>> def f(x): ... return x**2 ... >>> with Pool(10) as p: ... print(p.map(f, range(1,10))) [1, 4, 9, 16, 25, 36, 49, 64, 81] So something about having Pool as a context manager means it works - very odd then. BTW - with the exception of the example saying 'don't do this it doesn't work', none of the examples on the page are shown on the command line interpreter; but the first example uses a Pool context manager - which works as above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 05:43:45 2018 From: report at bugs.python.org (Thomas Jollans) Date: Sat, 06 Oct 2018 09:43:45 +0000 Subject: [issue33342] urllib IPv6 parsing fails with special characters in passwords In-Reply-To: <1524491070.85.0.682650639539.issue33342@psf.upfronthosting.co.za> Message-ID: <1538819025.22.0.545547206417.issue33342@psf.upfronthosting.co.za> Thomas Jollans added the comment: RFC 2396 explicitly excludes the use of [ and ] in URLs. RFC 2732 defines the syntax for IPv6 URLs, and allows [ and ] ONLY in the host part. So I'd say that the behaviour is arguably correct (if somewhat unfortunate) ---------- nosy: +tjollans _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 05:59:56 2018 From: report at bugs.python.org (Stefan Krah) Date: Sat, 06 Oct 2018 09:59:56 +0000 Subject: [issue34905] Cannot assign memoryview values from array.array In-Reply-To: <1538742292.09.0.545547206417.issue34905@psf.upfronthosting.co.za> Message-ID: <1538819996.55.0.545547206417.issue34905@psf.upfronthosting.co.za> Stefan Krah added the comment: >>> mview.format 'B' >>> mview[:] = array.array('B', b'hello') Bytes have format 'B', so this works as expected. ---------- assignee: -> skrah nosy: +skrah resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 07:25:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2018 11:25:28 +0000 Subject: [issue34876] Python3.8 changes how decorators are traced In-Reply-To: <1538521604.52.0.545547206417.issue34876@psf.upfronthosting.co.za> Message-ID: <1538825128.32.0.545547206417.issue34876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See 09aaa88328a5083469b2682230c7f3c62942afab. The position of the AST node for decorated function and class was changed to the position of the first decorator. It was made to help inspect.getsource() for functions to include decorator lines in the result. But the position of `def` and `class` lines was lost. ---------- nosy: +christian.heimes, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 07:49:15 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 06 Oct 2018 11:49:15 +0000 Subject: [issue34848] range.index only takes one argument when it's documented as taking the usual 3 In-Reply-To: <1538279738.27.0.545547206417.issue34848@psf.upfronthosting.co.za> Message-ID: <1538826554.99.0.545547206417.issue34848@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 08:03:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2018 12:03:47 +0000 Subject: [issue34848] range.index only takes one argument when it's documented as taking the usual 3 In-Reply-To: <1538279738.27.0.545547206417.issue34848@psf.upfronthosting.co.za> Message-ID: <1538827427.35.0.545547206417.issue34848@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: One bug or feature request per issue please. If you want to change list.index() or operator.indexOf(), open new issues for this. This issue is for the error in the range.index() docstring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 09:15:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2018 13:15:03 +0000 Subject: [issue31310] semaphore tracker isn't protected against crashes In-Reply-To: <1504108352.86.0.17423028145.issue31310@psf.upfronthosting.co.za> Message-ID: <1538831703.05.0.545547206417.issue31310@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, that bug was actually introduced in issue33613. ---------- stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 09:22:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Oct 2018 13:22:29 +0000 Subject: [issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error In-Reply-To: <1527069849.43.0.682650639539.issue33613@psf.upfronthosting.co.za> Message-ID: <1538832149.77.0.545547206417.issue33613@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: After this change tests are failed when ran with -Werror. $ ./python -Werror -m test -vuall -m 'test_semaphore_tracker_sig*' test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_spawn ... ====================================================================== ERROR: test_semaphore_tracker_sigkill (test.test_multiprocessing_fork.TestSemaphoreTracker) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4562, in test_semaphore_tracker_sigkill self.check_semaphore_tracker_death(signal.SIGKILL, True) File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4526, in check_semaphore_tracker_death _semaphore_tracker.ensure_running() File "/home/serhiy/py/cpython/Lib/multiprocessing/semaphore_tracker.py", line 64, in ensure_running warnings.warn('semaphore_tracker: process died unexpectedly, ' UserWarning: semaphore_tracker: process died unexpectedly, relaunching. Some semaphores might leak. ---------------------------------------------------------------------- ... ====================================================================== ERROR: test_semaphore_tracker_sigint (test.test_multiprocessing_forkserver.TestSemaphoreTracker) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4554, in test_semaphore_tracker_sigint self.check_semaphore_tracker_death(signal.SIGINT, False) File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4526, in check_semaphore_tracker_death _semaphore_tracker.ensure_running() File "/home/serhiy/py/cpython/Lib/multiprocessing/semaphore_tracker.py", line 64, in ensure_running warnings.warn('semaphore_tracker: process died unexpectedly, ' UserWarning: semaphore_tracker: process died unexpectedly, relaunching. Some semaphores might leak. ====================================================================== ERROR: test_semaphore_tracker_sigkill (test.test_multiprocessing_forkserver.TestSemaphoreTracker) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4562, in test_semaphore_tracker_sigkill self.check_semaphore_tracker_death(signal.SIGKILL, True) File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4534, in check_semaphore_tracker_death sem = ctx.Semaphore() File "/home/serhiy/py/cpython/Lib/multiprocessing/context.py", line 82, in Semaphore return Semaphore(value, ctx=self.get_context()) File "/home/serhiy/py/cpython/Lib/multiprocessing/synchronize.py", line 126, in __init__ SemLock.__init__(self, SEMAPHORE, value, SEM_VALUE_MAX, ctx=ctx) File "/home/serhiy/py/cpython/Lib/multiprocessing/synchronize.py", line 80, in __init__ register(self._semlock.name) File "/home/serhiy/py/cpython/Lib/multiprocessing/semaphore_tracker.py", line 104, in register self._send('REGISTER', name) File "/home/serhiy/py/cpython/Lib/multiprocessing/semaphore_tracker.py", line 111, in _send self.ensure_running() File "/home/serhiy/py/cpython/Lib/multiprocessing/semaphore_tracker.py", line 64, in ensure_running warnings.warn('semaphore_tracker: process died unexpectedly, ' UserWarning: semaphore_tracker: process died unexpectedly, relaunching. Some semaphores might leak. ---------------------------------------------------------------------- ... ====================================================================== ERROR: test_semaphore_tracker_sigint (test.test_multiprocessing_spawn.TestSemaphoreTracker) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4554, in test_semaphore_tracker_sigint self.check_semaphore_tracker_death(signal.SIGINT, False) File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4526, in check_semaphore_tracker_death _semaphore_tracker.ensure_running() File "/home/serhiy/py/cpython/Lib/multiprocessing/semaphore_tracker.py", line 64, in ensure_running warnings.warn('semaphore_tracker: process died unexpectedly, ' UserWarning: semaphore_tracker: process died unexpectedly, relaunching. Some semaphores might leak. ====================================================================== ERROR: test_semaphore_tracker_sigkill (test.test_multiprocessing_spawn.TestSemaphoreTracker) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4562, in test_semaphore_tracker_sigkill self.check_semaphore_tracker_death(signal.SIGKILL, True) File "/home/serhiy/py/cpython/Lib/test/_test_multiprocessing.py", line 4534, in check_semaphore_tracker_death sem = ctx.Semaphore() File "/home/serhiy/py/cpython/Lib/multiprocessing/context.py", line 82, in Semaphore return Semaphore(value, ctx=self.get_context()) File "/home/serhiy/py/cpython/Lib/multiprocessing/synchronize.py", line 126, in __init__ SemLock.__init__(self, SEMAPHORE, value, SEM_VALUE_MAX, ctx=ctx) File "/home/serhiy/py/cpython/Lib/multiprocessing/synchronize.py", line 80, in __init__ register(self._semlock.name) File "/home/serhiy/py/cpython/Lib/multiprocessing/semaphore_tracker.py", line 104, in register self._send('REGISTER', name) File "/home/serhiy/py/cpython/Lib/multiprocessing/semaphore_tracker.py", line 111, in _send self.ensure_running() File "/home/serhiy/py/cpython/Lib/multiprocessing/semaphore_tracker.py", line 64, in ensure_running warnings.warn('semaphore_tracker: process died unexpectedly, ' UserWarning: semaphore_tracker: process died unexpectedly, relaunching. Some semaphores might leak. ---------------------------------------------------------------------- And I'm puzzled by the line issubclass(the_warn.category, UserWarning) ---------- resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 09:36:16 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 06 Oct 2018 13:36:16 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1538832976.7.0.545547206417.issue34909@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Ethan, I think you have fixed the issue, could you close this issue? Thank you ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 09:58:56 2018 From: report at bugs.python.org (Ales Kvapil) Date: Sat, 06 Oct 2018 13:58:56 +0000 Subject: [issue34915] LWPCookieJar.save() creates *.lwp file in 644 mode Message-ID: <1538834336.96.0.545547206417.issue34915@psf.upfronthosting.co.za> New submission from Ales Kvapil : The LWPCookieJar.save() creates an *.lwp file containing session cookies in non-safe 644 mode (everyone can read it). This is not a secure behavior, especially for storing session keys or session cookies. The file should be created in 600 mode in my opinion. https://github.com/python/cpython/blob/3.7/Lib/http/cookiejar.py#L1872 ---------- assignee: christian.heimes components: IO, Library (Lib), SSL messages: 327246 nosy: aleskva, christian.heimes priority: normal severity: normal status: open title: LWPCookieJar.save() creates *.lwp file in 644 mode type: security versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 10:30:54 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 06 Oct 2018 14:30:54 +0000 Subject: [issue32174] nonASCII punctuation characters can not display in python363.chm. In-Reply-To: <1512013530.29.0.213398074469.issue32174@psf.upfronthosting.co.za> Message-ID: <1538836254.3.0.545547206417.issue32174@psf.upfronthosting.co.za> Steve Dower added the comment: Until someone creates and enables a Sphinx extension/option to only generate ASCII output, it will remain. Volunteers are welcome ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 10:35:58 2018 From: report at bugs.python.org (Julien Palard) Date: Sat, 06 Oct 2018 14:35:58 +0000 Subject: [issue34906] Fix typo in the documentation In-Reply-To: <1538749042.1.0.545547206417.issue34906@psf.upfronthosting.co.za> Message-ID: <1538836558.34.0.545547206417.issue34906@psf.upfronthosting.co.za> Julien Palard added the comment: New changeset 683281f536981da395575b5a07d6761118259fd2 by Julien Palard (St?phane Wirtel) in branch 'master': bpo-34906: Doc: Fix typos (2) (GH-9735) https://github.com/python/cpython/commit/683281f536981da395575b5a07d6761118259fd2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 10:42:17 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 06 Oct 2018 14:42:17 +0000 Subject: [issue34725] Py_GetProgramFullPath() odd behaviour in Windows In-Reply-To: <1537291607.58.0.956365154283.issue34725@psf.upfronthosting.co.za> Message-ID: <1538836937.55.0.545547206417.issue34725@psf.upfronthosting.co.za> Nick Coghlan added the comment: Directly addressing the topic of the bug: Py_SetProgramName() should be a relative or absolute path that can be used to set sys.executable and other values appropriately. This is used in Programs/_testembed.c for example. I didn't know it didn't work the same way on Windows as it does on other platforms, and I have no idea why it's different there. (The divergence between the Windows and *nix implementations of getpath predates my own involvement in startup sequence modifications, and I've never even read the Windows version of the code) On the startup sequence refactoring in general: Yeah, eventually being able to eliminate getpath.c in favour of a froze _getpath.py module has been one of my long term hopes for the PEP 432 startup sequence refactoring. The underlying issue making that difficult that is that it's always been murky as to exactly what Python code could safely execute at the point where that path information needs to be calculated, and the tests of path configuration are weak enough that it's easy to introduce regressions even with small changes, let alone a wholesale rewrite. If a new setting is genuinely needed, then where to put things in the new config is still open for discussion - at the moment, it's pretty much just a straight transcription of the way CPython has historically done things, and is hence heavy on the use of low level C data types (especially wchar* where paths are concerned). This means that the CoreConfig struct currently still contains a lot of things that aren't actually needed if all you want is a running Python interpreter and can live without a fully populated sys module. The *advantage* of that approach is that it means it still maps pretty easily to the existing Py_Initialize approach: the PySet_* API writes to a global copy of a the CoreConfig struct, and then Py_Initialize reads that in to the active runtime state. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 11:47:30 2018 From: report at bugs.python.org (Vinodhini) Date: Sat, 06 Oct 2018 15:47:30 +0000 Subject: [issue32995] Add a glossary entry for context variables In-Reply-To: <1520244692.22.0.467229070634.issue32995@psf.upfronthosting.co.za> Message-ID: <1538840850.35.0.545547206417.issue32995@psf.upfronthosting.co.za> Change by Vinodhini : ---------- keywords: +patch pull_requests: +9128 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 12:27:27 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Sat, 06 Oct 2018 16:27:27 +0000 Subject: [issue34769] _asyncgen_finalizer_hook running in wrong thread In-Reply-To: <1537627184.81.0.956365154283.issue34769@psf.upfronthosting.co.za> Message-ID: <1538843247.69.0.545547206417.issue34769@psf.upfronthosting.co.za> twisteroid ambassador added the comment: I?m now convinced that the bug we?re fixing and the original bug with debug mode off are two separate bugs. With the fix in place and debug mode off, I?m still seeing the original buggy behavior. Bummer. In my actual program, I have an async generator that spawns two tasks. In the finally clause I cancel and wait for them, then check and log any exceptions. The program ran on Python 3.7. The symptom of the original bug is occasional ?Task exception was never retrieved? log entries about one of the spawned tasks. After I patched 3.7 with the fix, the symptom remains, so the fix does not actually fix the original bug. Running the same program on master, there are additional error and warning messages about open stream objects being garbage collected, unclosed sockets, etc. Are these logging messages new to 3.8? If not, perhaps 3.8 introduced additional bugs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 12:53:10 2018 From: report at bugs.python.org (Vinodhini) Date: Sat, 06 Oct 2018 16:53:10 +0000 Subject: [issue32995] Add a glossary entry for context variables In-Reply-To: <1520244692.22.0.467229070634.issue32995@psf.upfronthosting.co.za> Message-ID: <1538844790.64.0.545547206417.issue32995@psf.upfronthosting.co.za> Change by Vinodhini : ---------- pull_requests: +9130 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:20:52 2018 From: report at bugs.python.org (Big Stone) Date: Sat, 06 Oct 2018 17:20:52 +0000 Subject: [issue33436] Add an interactive shell for Sqlite3 In-Reply-To: <1525657620.33.0.682650639539.issue33436@psf.upfronthosting.co.za> Message-ID: <1538846452.21.0.545547206417.issue33436@psf.upfronthosting.co.za> Big Stone added the comment: as a graphical sqlite browser, you have sqlite_bro that may give you inspiration. It's about one single file. ---------- nosy: +Big Stone _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:29:26 2018 From: report at bugs.python.org (Big Stone) Date: Sat, 06 Oct 2018 17:29:26 +0000 Subject: [issue34916] include sqlite-3.25+ (with window functions) Message-ID: <1538846966.09.0.545547206417.issue34916@psf.upfronthosting.co.za> New submission from Big Stone : sqlite-3.25 now includes window functions, something very important in modern SQL. https://www.sqlite.org/windowfunctions.html Could it be included in next Python maintenance release ? ---------- messages: 327253 nosy: Big Stone priority: normal severity: normal status: open title: include sqlite-3.25+ (with window functions) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:38:16 2018 From: report at bugs.python.org (Ethan Furman) Date: Sat, 06 Oct 2018 17:38:16 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1538847496.93.0.545547206417.issue34909@psf.upfronthosting.co.za> Ethan Furman added the comment: St?phane, thanks for the tip about bisect! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:41:51 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Oct 2018 17:41:51 +0000 Subject: [issue34824] _ssl.c: Possible null pointer dereference In-Reply-To: <1538068077.13.0.545547206417.issue34824@psf.upfronthosting.co.za> Message-ID: <1538847711.38.0.545547206417.issue34824@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 365ad2ead5bbaf7a3b18648ffa36e819559d3f75 by Miss Islington (bot) (Zackery Spytz) in branch 'master': bpo-34824: Fix a possible NULL pointer dereference in _ssl.c (GH-9606) https://github.com/python/cpython/commit/365ad2ead5bbaf7a3b18648ffa36e819559d3f75 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:42:03 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Oct 2018 17:42:03 +0000 Subject: [issue34824] _ssl.c: Possible null pointer dereference In-Reply-To: <1538068077.13.0.545547206417.issue34824@psf.upfronthosting.co.za> Message-ID: <1538847723.16.0.545547206417.issue34824@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9131 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:42:09 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Oct 2018 17:42:09 +0000 Subject: [issue34824] _ssl.c: Possible null pointer dereference In-Reply-To: <1538068077.13.0.545547206417.issue34824@psf.upfronthosting.co.za> Message-ID: <1538847729.66.0.545547206417.issue34824@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9132 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 13:52:13 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Oct 2018 17:52:13 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1538848333.4.0.545547206417.issue33729@psf.upfronthosting.co.za> Christian Heimes added the comment: Ned, I'm currently travelling until next weekend. The PR is rather large and I don't have any means or time to review it properly. Perhaps Gregory or Dmitry Chestnykh (original author of pyblake2) are able to assist. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 14:15:16 2018 From: report at bugs.python.org (Pranav Devarakonda) Date: Sat, 06 Oct 2018 18:15:16 +0000 Subject: [issue34893] Add 2to3 fixer to change send and recv methods of socket object. In-Reply-To: <1538664300.49.0.545547206417.issue34893@psf.upfronthosting.co.za> Message-ID: <1538849716.2.0.545547206417.issue34893@psf.upfronthosting.co.za> Pranav Devarakonda added the comment: Thanks for pointing out these cases. I kept in mind the Python 2 documentation which says socket.send method expects a string and hence made that fixer. I have tweaked that fixer to handle the pointed cases and a few additional ones too. Please find attached the updated fixer. To summarize, the following send() cases would not be changed, data = "Data" s.send(str.encode(data)) s.send(data.encode('utf-8)) s.send(bytes(data, 'utf-8')) s.send(struct.pack('!I', x)) Similary, the following recv() cases would not be changed, data = s.recv(1024).decode('utf-8') q, w, e = struct.unpack('!IHQ', s.recv(4)) The remaining generic cases will be handled as expected. I know we cannot handle cases where the data has already been converted to bytes(since there is no way to find the 'type' of the object here) and then sent as an argument to socket.send(). But if we have to go by the documentation, then this is probably the right thing to do. ---------- Added file: https://bugs.python.org/file47854/fix_socket_send_recv_updated.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 14:18:07 2018 From: report at bugs.python.org (Tim Peters) Date: Sat, 06 Oct 2018 18:18:07 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538849887.43.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: As a sanity check, I tried the 32-bit version of MurmurHash2 (version 3 doesn't have a 32-bit version). All of my Python tests had collisions, and while the new tuple test dropped to 15, product([0.5, 0.25], repeat=20) skyrocketed from 141 (32-bit xxHash) to 3848. I could live with that too, but xxHash does better overall on our tiny tests, and requires less code and fewer cycles. Here's what I used: static Py_hash_t tuplehash(PyTupleObject *v) { const Py_uhash_t m = 0x5bd1e995; const int r = 24; Py_uhash_t x, t; /* Unsigned for defined overflow behavior. */ Py_hash_t y; Py_ssize_t len = Py_SIZE(v); PyObject **p; x = 0x345678UL ^ (Py_uhash_t)len; p = v->ob_item; while (--len >= 0) { y = PyObject_Hash(*p++); if (y == -1) return -1; Py_uhash_t t = (Py_uhash_t)y; t *= m; t ^= t >> r; t *= m; x *= m; x ^= t; } x ^= x >> 13; x *= m; x ^= x >> 15; if (x == (Py_uhash_t)-1) x = -2; return x; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 15:08:53 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Sat, 06 Oct 2018 19:08:53 +0000 Subject: [issue32788] Better error handling in sqlite3 In-Reply-To: <1518004914.65.0.467229070634.issue32788@psf.upfronthosting.co.za> Message-ID: <1538852933.17.0.545547206417.issue32788@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- nosy: +sir-sigurd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 17:48:10 2018 From: report at bugs.python.org (Paul Hoffman) Date: Sat, 06 Oct 2018 21:48:10 +0000 Subject: [issue30588] Missing documentation for codecs.escape_decode In-Reply-To: <1496847775.57.0.842403144977.issue30588@psf.upfronthosting.co.za> Message-ID: <1538862490.25.0.545547206417.issue30588@psf.upfronthosting.co.za> Paul Hoffman added the comment: Bumping this thread a bit. It appears that this "internal" function is being talked about out in the real world. I came across it in a recent blog post, saw that it wasn't in the official documentation, and went looking here. I propose that it be documented even if it feels like a tad of a kludge. ---------- nosy: +paulehoffman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 18:24:15 2018 From: report at bugs.python.org (Tim Peters) Date: Sat, 06 Oct 2018 22:24:15 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538864655.8.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: Thinking about the way xxHash works prompted me to try this initialization change: x = 0x345678UL + (Py_uhash_t)len; // adding in the length is new That was a pure win in my tests, slashing the number of collisions in the new tuple test, 32-bit build, from 51 to 17. In the 64-bit build, cut from 11 to 10, but when looking at the high 32 hash bits instead from 27 to 15. There were also small improvements in other 32-bit build collision stats. Full-blown xxHash (& SeaHash, and murmurhash, and ...) also fold in the length, but not inside their core loops. It's useful info! But they fold it in _after_ their core loops, not before. They're apparently worried about this: if their internal state ever reaches 0, that's a fixed point so long as all remaining incoming data is zeroes (in Python, e.g., picture adding one or more trailing integer or float zeroes or ..., which hash to 0). Folding in the length at the end snaps it slightly out of zeroland. I don't really care about that. Folding in the length at the start quickly leads to large differences across iterations for tuples of different lengths (thanks to repeated mulitiplication and "propagate right" steps), which is especially helpful in things like the nested tuple tests where there's almost as much variation in tuple lengths as there is in the few little integers bottom-level tuples contain. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 19:46:31 2018 From: report at bugs.python.org (AmjadHD) Date: Sat, 06 Oct 2018 23:46:31 +0000 Subject: [issue34917] add time decorator to timeit.py Message-ID: <1538869590.35.0.545547206417.issue34917@psf.upfronthosting.co.za> New submission from AmjadHD : I made this simple time decorator, it's not perfect but it does make python more pythonic :) : it can be used as a decorator: ``` @timef def fun_to_time(a, b): ... ``` or as a function call `timef(print)("Hello world!")` just a simple decorator no need for `timeit.timeit("fun_to_time(a, b)", setup="from __main__ import a, b", number=1)` it's also customizable as you can control number of repetitions, garbage collection, unit ... and it produces a formatted output such as: `fun_to_time: 24.1056 ms`. It is somewhat badly written so waiting for your word people of wisdom :). I think python needs this in the standard library as the current way is (sometimes) tedious. ---------- components: Library (Lib) files: timeit.py messages: 327261 nosy: amjad ben hedhili priority: normal severity: normal status: open title: add time decorator to timeit.py type: enhancement versions: Python 3.7 Added file: https://bugs.python.org/file47855/timeit.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 6 21:09:28 2018 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 07 Oct 2018 01:09:28 +0000 Subject: [issue34917] add time decorator to timeit.py In-Reply-To: <1538869590.35.0.545547206417.issue34917@psf.upfronthosting.co.za> Message-ID: <1538874568.43.0.545547206417.issue34917@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks for the decorator, however this should probably be discussed on python-ideas first to decide if a decorator should be added in the first place. If the idea is accepted, the exact implementation should be discussed and defined, and finally a pull request should be submitted. The decorator you submitted can't be accepted as it is, so for the time being, I'm going to reject it and close the issue. ---------- nosy: +ezio.melotti resolution: -> rejected stage: -> resolved status: open -> closed versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 00:28:22 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Oct 2018 04:28:22 +0000 Subject: [issue34806] distutils tests fail with recent 3.7 branch In-Reply-To: <1537949180.44.0.545547206417.issue34806@psf.upfronthosting.co.za> Message-ID: <1538886502.46.0.545547206417.issue34806@psf.upfronthosting.co.za> Ned Deily added the comment: @doko, Is this still reproducible with either 3.7.1rc1 or current 3.7 head? Otherwise, let's consider closing it. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 00:33:44 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Oct 2018 04:33:44 +0000 Subject: [issue34334] QueueHandler logs exc_info twice In-Reply-To: <1533377293.21.0.56676864532.issue34334@psf.upfronthosting.co.za> Message-ID: <1538886824.29.0.545547206417.issue34334@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 1a2189353f744f79a43511707c090c3807a4978e by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-34334: Don't log traceback twice in QueueHandler (GH-9537) (GH-9581) https://github.com/python/cpython/commit/1a2189353f744f79a43511707c090c3807a4978e ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 00:34:18 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Oct 2018 04:34:18 +0000 Subject: [issue34334] QueueHandler logs exc_info twice In-Reply-To: <1533377293.21.0.56676864532.issue34334@psf.upfronthosting.co.za> Message-ID: <1538886858.2.0.545547206417.issue34334@psf.upfronthosting.co.za> Change by Ned Deily : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 01:09:01 2018 From: report at bugs.python.org (Adrian Keister) Date: Sun, 07 Oct 2018 05:09:01 +0000 Subject: [issue34918] Python 3 tkinter measurement problem Message-ID: <1538888941.11.0.545547206417.issue34918@psf.upfronthosting.co.za> New submission from Adrian Keister : tkinter.Tk().winfo_screenmmwidth() and tkinter.Tk().winfo_screenmmheight() give manifestly incorrect values in Windows. This does not appear to be an issue in Linux. I have not tested a Mac. The values reported in Windows are too large by as much as 58%. Searching online seems to indicate that the issue is some applications in Windows are "dpi aware"; unfortunately, none of the so-called work-arounds I've found actually fix the problem. The tkinter.Tk().winfo_screenwidth() and tkinter.Tk().winfo_screenheight() functions, reporting their results in pixels, appear to be correct. A MWE is simply import tkinter tkinter.Tk().winfo_screenmmwidth() This reports a 508 mm on my 15.6" screen, when the true value is closer to 343 mm. This is a 48% error, and hence an unusable result. Thank you for your time! ---------- components: Tkinter messages: 327265 nosy: Ackbach priority: normal severity: normal status: open title: Python 3 tkinter measurement problem type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 01:46:18 2018 From: report at bugs.python.org (Caleb Hattingh) Date: Sun, 07 Oct 2018 05:46:18 +0000 Subject: [issue34831] Asyncio Tutorial In-Reply-To: <1538134577.09.0.545547206417.issue34831@psf.upfronthosting.co.za> Message-ID: <1538891178.94.0.545547206417.issue34831@psf.upfronthosting.co.za> Caleb Hattingh added the comment: A CLI client is a necessary step along the way anyway, so that sounds good by me. You suggested: > I'd organize the tutorial in a dedicated directory like "Doc/library/asyncio-tutorial/" I had a look at the source tree, there is an existing "howto" directory; do you still prefer your suggestion of using "Doc/library/" over something like "Doc/howto/asyncio.rst"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 02:03:54 2018 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Oct 2018 06:03:54 +0000 Subject: [issue34903] strptime %d handling of single digit day of month In-Reply-To: <1538724686.61.0.545547206417.issue34903@psf.upfronthosting.co.za> Message-ID: <1538892234.46.0.545547206417.issue34903@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +9133 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 03:10:11 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 07 Oct 2018 07:10:11 +0000 Subject: [issue6721] Locks in the standard library should be sanitized on fork In-Reply-To: <1250550378.97.0.072881968798.issue6721@psf.upfronthosting.co.za> Message-ID: <1538896211.97.0.545547206417.issue6721@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset 3b699932e5ac3e76031bbb6d700fbea07492641d by Gregory P. Smith (Miss Islington (bot)) in branch '3.7': bpo-6721: Hold logging locks across fork() (GH-4071) (#9291) https://github.com/python/cpython/commit/3b699932e5ac3e76031bbb6d700fbea07492641d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 03:26:18 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Sun, 07 Oct 2018 07:26:18 +0000 Subject: [issue34898] add mtime argument to gzip.compress In-Reply-To: <1538688124.68.0.545547206417.issue34898@psf.upfronthosting.co.za> Message-ID: <1538897178.77.0.545547206417.issue34898@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- nosy: +sir-sigurd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 03:58:25 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2018 07:58:25 +0000 Subject: [issue30588] Missing documentation for codecs.escape_decode In-Reply-To: <1496847775.57.0.842403144977.issue30588@psf.upfronthosting.co.za> Message-ID: <1538899105.25.0.545547206417.issue30588@psf.upfronthosting.co.za> Andrew Svetlov added the comment: -1 Internal function means: you can use it on your risk but the function can be changed or even removed in any Python release. I see no point in documenting and making it public. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 04:49:53 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 07 Oct 2018 08:49:53 +0000 Subject: [issue22232] str.splitlines splitting on non-\r\n characters In-Reply-To: <1408528911.37.0.452679392827.issue22232@psf.upfronthosting.co.za> Message-ID: <1538902193.95.0.545547206417.issue22232@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I don't like the idea of adding a second bool parameter to splitlines. Guido has a rough rule of thumb (which I agree with) of "no constant bool parameters". If people will typically call a function with some sort of "mode" parameter using a hard-coded bool, then we should usually prefer to split the two modes into distinct functions. As an example, we have statistics.stdev and pstdev rather than stdev(data, population=False). Obviously this is a guideline, not a hard rule, and there are exceptions. Such as str.splitlines :-) In any case, I suggest a separate string method. Even though the name is slightly inaccurate, I suggest "ascii_splitlines" which I think is accurate enough to capture the spirit of what we intend (split on *only* \n \r and \r\n) and we can leave the details in the docs. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 06:04:26 2018 From: report at bugs.python.org (cwickens) Date: Sun, 07 Oct 2018 10:04:26 +0000 Subject: [issue34919] Crash caused by certain characters in a string Message-ID: <1538906666.64.0.545547206417.issue34919@psf.upfronthosting.co.za> New submission from cwickens : Clone the following repo and follow the repro steps described in the readme: https://github.com/oTree-org/py37bug It seems that using certain non-ASCII characters in parts of a string crashes Python. In the README I listed the strings that are OK and those that crash. Also attaching the repo. ---------- components: Windows files: py37bug-master.zip messages: 327270 nosy: cwickens, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Crash caused by certain characters in a string type: crash versions: Python 3.7 Added file: https://bugs.python.org/file47856/py37bug-master.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 06:25:37 2018 From: report at bugs.python.org (Caleb Hattingh) Date: Sun, 07 Oct 2018 10:25:37 +0000 Subject: [issue34831] Asyncio Tutorial In-Reply-To: <1538134577.09.0.545547206417.issue34831@psf.upfronthosting.co.za> Message-ID: <1538907937.86.0.545547206417.issue34831@psf.upfronthosting.co.za> Change by Caleb Hattingh : ---------- keywords: +patch pull_requests: +9134 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 06:29:06 2018 From: report at bugs.python.org (Caleb Hattingh) Date: Sun, 07 Oct 2018 10:29:06 +0000 Subject: [issue34831] Asyncio Tutorial In-Reply-To: <1538134577.09.0.545547206417.issue34831@psf.upfronthosting.co.za> Message-ID: <1538908146.95.0.545547206417.issue34831@psf.upfronthosting.co.za> Caleb Hattingh added the comment: I set up a basic structure under "Doc/library/asyncio-tutorial" as suggested, and opened a PR to show you how that looks. When I make more progress on a section, I'll post an update here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 06:30:17 2018 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 07 Oct 2018 10:30:17 +0000 Subject: [issue34920] PYTHONWARNINGS entries are escaped Message-ID: <1538908217.47.0.545547206417.issue34920@psf.upfronthosting.co.za> New submission from Nikolaus Rath : According to https://docs.python.org/3/library/warnings.html#describing-warning-filters: "The meaning of each of these fields [of PYTHONWARNINGS] is as described in ." The description of the "The Warnings filter" says "module is a string containing a regular expression that the module name must match." However, when parsing PYTHONWARNINGS, the warnings module explicitly escapes the module field. ---------- components: Library (Lib) messages: 327272 nosy: nikratio priority: normal severity: normal status: open title: PYTHONWARNINGS entries are escaped type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 07:31:35 2018 From: report at bugs.python.org (Danish Prakash) Date: Sun, 07 Oct 2018 11:31:35 +0000 Subject: [issue34901] Missing isolated (-I) flag in sys.flags table In-Reply-To: <1538718824.99.0.545547206417.issue34901@psf.upfronthosting.co.za> Message-ID: <1538911895.55.0.545547206417.issue34901@psf.upfronthosting.co.za> Danish Prakash added the comment: Thanks for the concise explanation, that makes sense. > Also there will be no binary releases and only source releases for security only branches. Is there any particular reason as to why this happens? IS it just to make it easier for the team to focus on the development of current versions or something else? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 07:46:05 2018 From: report at bugs.python.org (Ismo Toijala) Date: Sun, 07 Oct 2018 11:46:05 +0000 Subject: [issue34921] NoReturn not allowed by get_type_hints when future import annotations is used Message-ID: <1538912765.08.0.545547206417.issue34921@psf.upfronthosting.co.za> New submission from Ismo Toijala : The following example should work but does not. Note that it does work without the future import. from __future__ import annotations import typing def f() -> typing.NoReturn: pass typing.get_type_hints(f) Traceback (most recent call last): File "foo.py", line 8, in typing.get_type_hints(f) File "/usr/lib/python3.7/typing.py", line 1001, in get_type_hints value = _eval_type(value, globalns, localns) File "/usr/lib/python3.7/typing.py", line 260, in _eval_type return t._evaluate(globalns, localns) File "/usr/lib/python3.7/typing.py", line 466, in _evaluate is_argument=self.__forward_is_argument__) File "/usr/lib/python3.7/typing.py", line 135, in _type_check raise TypeError(f"Plain {arg} is not valid as type argument") TypeError: Plain typing.NoReturn is not valid as type argument ---------- components: Library (Lib) messages: 327274 nosy: itoijala priority: normal severity: normal status: open title: NoReturn not allowed by get_type_hints when future import annotations is used type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 07:48:20 2018 From: report at bugs.python.org (Caleb Hattingh) Date: Sun, 07 Oct 2018 11:48:20 +0000 Subject: [issue34831] Asyncio Tutorial In-Reply-To: <1538134577.09.0.545547206417.issue34831@psf.upfronthosting.co.za> Message-ID: <1538912900.78.0.545547206417.issue34831@psf.upfronthosting.co.za> Caleb Hattingh added the comment: I tested the Python 3.7.0 release version for Mac, the download called "macOS 64-bit installer" with checksum ae0717a02efea3b0eb34aadc680dc498 on this page: https://www.python.org/downloads/release/python-370/ I downloaded, installed that on a mac, and the chat client app launched no problem. (I added a screenshot to my github repo readme). Your error "ModuleNotFoundError: No module named '_tkinter'" suggests that the python you were using is a different one, because in the release download, Tk 8.6.8 is bundled and the _tkinter module was built against it and must exist. Anyway, I just wanted to check that it does work on mac :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 08:26:54 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 07 Oct 2018 12:26:54 +0000 Subject: [issue34920] PYTHONWARNINGS entries are escaped In-Reply-To: <1538908217.47.0.545547206417.issue34920@psf.upfronthosting.co.za> Message-ID: <1538915214.78.0.545547206417.issue34920@psf.upfronthosting.co.za> Martin Panter added the comment: D?j? vu. Maybe duplicate of Issue 34624? ---------- nosy: +martin.panter superseder: -> -W option does not accept module regexes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 08:40:30 2018 From: report at bugs.python.org (shuoz) Date: Sun, 07 Oct 2018 12:40:30 +0000 Subject: [issue34922] hashlib segmentation fault Message-ID: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> New submission from shuoz : python hashlib a signd overflow maybe cause a memory over read. python version: Python 3.6.7rc1+ (heads/3.6:cb0bec3, Oct 1 2018, 02:19:39) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. ``` [----------------------------------registers-----------------------------------] RAX: 0x0 RBX: 0x7fffffffd5f0 --> 0x41b58ab3 RCX: 0x0 RDX: 0x1ffffffffffffff6 RSI: 0x7ffff35ae880 --> 0x0 RDI: 0x7fffffffd650 --> 0x7d828fe8a42b9c7f RBP: 0xffffffffabe --> 0x0 RSP: 0x7fffffffd5c8 --> 0x7ffff2a5f793 (<_sha3_shake_128_hexdigest+627>: test eax,eax) RIP: 0x7ffff2a5ec60 (<_PySHA3_KeccakWidth1600_SpongeSqueeze>: push r15) R8 : 0x65fc7ba985946aff R9 : 0xefbdaa140b587a16 R10: 0x50573373c9b2b8dc R11: 0xfba4d93abbdabffc R12: 0x7fffffffd770 --> 0x7fffffffd7d0 --> 0xffffffffb00 --> 0x0 R13: 0x7fffffffd650 --> 0x7d828fe8a42b9c7f R14: 0x7ffff35ae880 --> 0x0 R15: 0xfffffffffffffff6 EFLAGS: 0xa06 (carry PARITY adjust zero sign trap INTERRUPT direction OVERFLOW) [-------------------------------------code-------------------------------------] 0x7ffff2a5ec50 <_PySHA3_KeccakP1600_ExtractBytes+160>: jmp 0x7ffff2a54d10 <_PySHA3_KeccakP1600_ExtractBytesInLane at plt> 0x7ffff2a5ec55: nop 0x7ffff2a5ec56: nop WORD PTR cs:[rax+rax*1+0x0] => 0x7ffff2a5ec60 <_PySHA3_KeccakWidth1600_SpongeSqueeze>: push r15 0x7ffff2a5ec62 <_PySHA3_KeccakWidth1600_SpongeSqueeze+2>: push r14 0x7ffff2a5ec64 <_PySHA3_KeccakWidth1600_SpongeSqueeze+4>: push r13 0x7ffff2a5ec66 <_PySHA3_KeccakWidth1600_SpongeSqueeze+6>: push r12 0x7ffff2a5ec68 <_PySHA3_KeccakWidth1600_SpongeSqueeze+8>: mov r13,rdx [------------------------------------stack-------------------------------------] 0000| 0x7fffffffd5c8 --> 0x7ffff2a5f793 (<_sha3_shake_128_hexdigest+627>: test eax,eax) 0008| 0x7fffffffd5d0 --> 0x7fffffffd5f0 --> 0x41b58ab3 0016| 0x7fffffffd5d8 --> 0xffffefdb33b --> 0x0 0024| 0x7fffffffd5e0 --> 0x7ffff7ed99d8 --> 0x0 0032| 0x7fffffffd5e8 --> 0x7ffff3606910 --> 0x6190000096e5 --> 0x9000009828000000 0040| 0x7fffffffd5f0 --> 0x41b58ab3 0048| 0x7fffffffd5f8 --> 0x7ffff2a68c08 ("2 32 8 6 length 96 224 4 temp ") 0056| 0x7fffffffd600 --> 0x7ffff2a5f520 (<_sha3_shake_128_hexdigest>: push r15) [------------------------------------------------------------------------------] Legend: code, data, rodata, value Breakpoint 2, _PySHA3_KeccakWidth1600_SpongeSqueeze (instance=0x7fffffffd650, data=0x7ffff35ae880 "", dataByteLen=0x1ffffffffffffff6) at /home/test/cpython/Modules/_sha3/kcp/KeccakSponge.inc:272 ``` dataByteLen=0x1ffffffffffffff6 ``` RAX: 0x7ffff3615f90 --> 0xfffffffffffffffa RBX: 0xa8 RCX: 0x7ffff3616028 --> 0xf938000001a4 RDX: 0x18 RSI: 0x7fffffffd6e0 --> 0x6ab2a5fe4fe8efd RDI: 0x7ffff3615fe0 --> 0x44b6a41dfdc1a3df RBP: 0x7fffffffd510 --> 0xa8 RSP: 0x7fffffffcc78 --> 0x7ffff6e936cf (mov rcx,QWORD PTR [rbp-0x38]) RIP: 0x7ffff6120786 (<__memmove_sse2_unaligned_erms+614>: movntdq XMMWORD PTR [rdi+0x20],xmm2) R8 : 0xfffffffffffffff0 R9 : 0x10007e6bac07 --> 0x0 R10: 0x7ffff3616038 --> 0x0 R11: 0x7ffff3615f90 --> 0xfffffffffffffffa R12: 0x7ffff3615f90 --> 0xfffffffffffffffa R13: 0x7fffffffd650 --> 0xa35bf3e9cd13e78e R14: 0x7ffff3615f90 --> 0xfffffffffffffffa R15: 0x0 EFLAGS: 0x10206 (carry PARITY adjust zero sign trap INTERRUPT direction overflow) [-------------------------------------code-------------------------------------] 0x7ffff6120779 <__memmove_sse2_unaligned_erms+601>: sub rdx,0x40 0x7ffff612077d <__memmove_sse2_unaligned_erms+605>: movntdq XMMWORD PTR [rdi],xmm0 0x7ffff6120781 <__memmove_sse2_unaligned_erms+609>: movntdq XMMWORD PTR [rdi+0x10],xmm1 => 0x7ffff6120786 <__memmove_sse2_unaligned_erms+614>: movntdq XMMWORD PTR [rdi+0x20],xmm2 0x7ffff612078b <__memmove_sse2_unaligned_erms+619>: movntdq XMMWORD PTR [rdi+0x30],xmm3 0x7ffff6120790 <__memmove_sse2_unaligned_erms+624>: add rdi,0x40 0x7ffff6120794 <__memmove_sse2_unaligned_erms+628>: cmp rdx,0x40 0x7ffff6120798 <__memmove_sse2_unaligned_erms+632>: ja 0x7ffff6120758 <__memmove_sse2_unaligned_erms+568> [------------------------------------stack-------------------------------------] 0000| 0x7fffffffcc78 --> 0x7ffff6e936cf (mov rcx,QWORD PTR [rbp-0x38]) 0008| 0x7fffffffcc80 --> 0x7fffffffccf0 --> 0x41b58ab3 0016| 0x7fffffffcc88 --> 0x7fffffffcd90 --> 0x6 0024| 0x7fffffffcc90 --> 0xffffffff99e --> 0x0 0032| 0x7fffffffcc98 --> 0x7fffffffcd50 --> 0x0 0040| 0x7fffffffcca0 --> 0x0 0048| 0x7fffffffcca8 --> 0x7ffff3616038 --> 0x0 0056| 0x7fffffffccb0 --> 0x7ffff358a068 --> 0x1 [------------------------------------------------------------------------------] Legend: code, data, rodata, value Stopped reason: SIGSEGV __memmove_sse2_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:492 492 ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory. gdb-peda$ bt #0 __memmove_sse2_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:492 #1 0x00007ffff6e936cf in ?? () from /usr/lib/x86_64-linux-gnu/libasan.so.4 #2 0x00007ffff2a5eab4 in memcpy (__len=0xa8, __src=, __dest=) at /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34 #3 _PySHA3_KeccakP1600_ExtractLanes (state=, data=, laneCount=0x15) at /home/test/cpython/Modules/_sha3/kcp/KeccakP-1600-opt64.c:342 #4 0x00007ffff2a5ec2c in _PySHA3_KeccakP1600_ExtractBytes (state=0x7fffffffd650, data=0x7ffff3615f90 "\372\377\377\377\377\377\377\377\002", offset=, length=0xa8) at /home/test/cpython/Modules/_sha3/kcp/KeccakP-1600-opt64.c:375 #5 0x00007ffff2a5ee1d in _PySHA3_KeccakWidth1600_SpongeSqueeze (instance=0x7fffffffd650, data=, dataByteLen=0x1ffffffffffffff6) at /home/test/cpython/Modules/_sha3/kcp/KeccakSponge.inc:287 #6 0x00007ffff2a5f793 in _SHAKE_digest (hex=0x1, digestlen=0xfffffffffffffff6, self=0x7ffff7ed98e8) at /home/test/cpython/Modules/_sha3/sha3module.c:620 #7 _sha3_shake_128_hexdigest_impl (length=0xfffffffffffffff6, self=0x7ffff7ed98e8) at /home/test/cpython/Modules/_sha3/sha3module.c:669 #8 _sha3_shake_128_hexdigest (self=0x7ffff7ed98e8, args=, nargs=, kwnames=) at /home/test/cpython/Modules/_sha3/clinic/sha3module.c.h:149 #9 0x000055555583eab6 in _PyCFunction_FastCallDict (kwargs=0x0, nargs=0x1, args=0x616000021518, func_obj=0x7ffff2e86f30) at Objects/methodobject.c:250 #10 _PyCFunction_FastCallKeywords (func=func at entry=0x7ffff2e86f30, stack=0x616000021518, nargs=nargs at entry=0x1, kwnames=kwnames at entry=0x0) at Objects/methodobject.c:294 #11 0x0000555555995945 in call_function (pp_stack=pp_stack at entry=0x7fffffffdc30, oparg=oparg at entry=0x1, kwnames=kwnames at entry=0x0) at Python/ceval.c:4837 #12 0x000055555599feaa in _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3335 #13 0x0000555555994939 in PyEval_EvalFrameEx (throwflag=0x0, f=0x616000021398) at Python/ceval.c:754 #14 _PyEval_EvalCodeWithName (_co=_co at entry=0x7ffff36088a0, globals=globals at entry=0x0, locals=locals at entry=0x7ffff355a9d8, args=args at entry=0x0, argcount=argcount at entry=0x0, kwnames=kwnames at entry=0x0, kwargs=0x0, kwcount=0x0, kwstep=0x2, defs=0x0, defcount=0x0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:4166 #15 0x0000555555997b73 in PyEval_EvalCodeEx (closure=0x0, kwdefs=0x0, defcount=0x0, defs=0x0, kwcount=0x0, kws=0x0, argcount=0x0, args=0x0, locals=locals at entry=0x7ffff355a9d8, globals=globals at entry=0x0, _co=_co at entry=0x7ffff36088a0) at Python/ceval.c:4187 #16 PyEval_EvalCode (co=co at entry=0x7ffff36088a0, globals=globals at entry=0x7ffff7e5a318, locals=locals at entry=0x7ffff7e5a318) at Python/ceval.c:731 #17 0x00005555556b5b3b in run_mod (arena=0x7ffff7e75150, flags=, locals=0x7ffff7e5a318, globals=0x7ffff7e5a318, filename=0x7ffff358d270, mod=0x62500001e300) at Python/pythonrun.c:1025 #18 PyRun_FileExFlags (fp=, filename_str=, start=, globals=, locals=, closeit=, flags=) at Python/pythonrun.c:978 #19 0x00005555556b5fdc in PyRun_SimpleFileExFlags (fp=, filename=0x7ffff35c2680 "\314\070\064\302\227\a\254\bJf\331u\230N\273\022\355@\200\352\024`z[\267&\257+\022Q\324\017\310\nSyF2+\001{\327\354\355\245\275\002\064d-\235x\\\327O\230?\036?F\222\326\336\060\027q\220\037\217\b\364#=\366\224,\362\355\224i4h\030.c\377\225\360.?M\033\066\251\ve'M=\261\t\365\307\016\267\203Q\316\313n\251]+\351H\222\244\266{\224FG\257\022\340\071\233r\300\220\065\031\236][\266\v\027\071#\354?\310\\\243M\243\251\250\372_\362^?\306?\222\365\062O1nY\224p?\243IV\364\070\356\232\\\222z\242\321\v\027|\342\027\325\325O?\300\252a0\250"..., closeit=0x1, flags=) at Python/pythonrun.c:419 #20 0x00005555556f2704 in run_file (p_cf=0x7fffffffe2b0, filename=0x604000000010 L"crash.py", fp=0x616000034880) at Modules/main.c:340 #21 Py_Main (argc=, argv=) at Modules/main.c:810 #22 0x000055555569a293 in main (argc=argc at entry=0x2, argv=argv at entry=0x7fffffffe528) at ./Programs/python.c:69 #23 0x00007ffff6086b97 in __libc_start_main (main=0x55555569a050
, argc=0x2, argv=0x7fffffffe528, init=, fini=, rtld_fini=, stack_end=0x7fffffffe518) at ../csu/libc-start.c:310 #24 0x000055555569bb2a in _start () ``` x.py ``` import hashlib hashlib.shake_128().hexdigest(-10) ``` ---------- components: Demos and Tools messages: 327277 nosy: shuoz priority: normal severity: normal status: open title: hashlib segmentation fault type: security versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 09:02:05 2018 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 07 Oct 2018 13:02:05 +0000 Subject: [issue34920] PYTHONWARNINGS entries are escaped In-Reply-To: <1538908217.47.0.545547206417.issue34920@psf.upfronthosting.co.za> Message-ID: <1538917325.41.0.545547206417.issue34920@psf.upfronthosting.co.za> Nikolaus Rath added the comment: yes, this is a duplicate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 09:02:32 2018 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 07 Oct 2018 13:02:32 +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: <1538917352.28.0.545547206417.issue34624@psf.upfronthosting.co.za> Change by Nikolaus Rath : ---------- nosy: +nikratio title: -W option does not accept module regexes -> -W option and PYTHONWARNINGS env variable does not accept module regexes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 09:39:45 2018 From: report at bugs.python.org (=?utf-8?q?Anders_Hovm=C3=B6ller?=) Date: Sun, 07 Oct 2018 13:39:45 +0000 Subject: [issue34861] Improve cProfile standard output In-Reply-To: <1538392397.89.0.545547206417.issue34861@psf.upfronthosting.co.za> Message-ID: <1538919585.15.0.545547206417.issue34861@psf.upfronthosting.co.za> Anders Hovm?ller added the comment: Output before this patch: 3666 function calls (3556 primitive calls) in 0.005 seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 2 0.000 0.000 0.002 0.001 :1009(_handle_fromlist) 7 0.000 0.000 0.000 0.000 :103(release) 5 0.000 0.000 0.000 0.000 :143(__init__) 5 0.000 0.000 0.000 0.000 :147(__enter__) 5 0.000 0.000 0.000 0.000 :151(__exit__) 7 0.000 0.000 0.000 0.000 :157(_get_module_lock) 5 0.000 0.000 0.000 0.000 :176(cb) 2 0.000 0.000 0.000 0.000 :194(_lock_unlock_module) 7/1 0.000 0.000 0.003 0.003 :211(_call_with_frames_removed) 53 0.000 0.000 0.000 0.000 :222(_verbose_message) 5 0.000 0.000 0.000 0.000 :307(__init__) 5 0.000 0.000 0.000 0.000 :311(__enter__) 5 0.000 0.000 0.000 0.000 :318(__exit__) 20 0.000 0.000 0.000 0.000 :321() 4 0.000 0.000 0.000 0.000 :35(_new_module) 5 0.000 0.000 0.000 0.000 :369(__init__) 9 0.000 0.000 0.000 0.000 :403(cached) 7 0.000 0.000 0.000 0.000 :416(parent) 5 0.000 0.000 0.000 0.000 :424(has_location) 5 0.000 0.000 0.000 0.000 :504(_init_module_attrs) 5 0.000 0.000 0.000 0.000 :576(module_from_spec) 5 0.000 0.000 0.000 0.000 :58(__init__) 5/1 0.000 0.000 0.004 0.004 :663(_load_unlocked) 5 0.000 0.000 0.000 0.000 :719(find_spec) 7 0.000 0.000 0.000 0.000 :78(acquire) 5 0.000 0.000 0.000 0.000 :792(find_spec) 15 0.000 0.000 0.000 0.000 :855(__enter__) 15 0.000 0.000 0.000 0.000 :859(__exit__) 5 0.000 0.000 0.001 0.000 :882(_find_spec) 5/1 0.000 0.000 0.004 0.004 :948(_find_and_load_unlocked) 5/1 0.000 0.000 0.004 0.004 :978(_find_and_load) 1 0.000 0.000 0.000 0.000 :1072(__init__) 1 0.000 0.000 0.000 0.000 :1083(create_module) 1 0.000 0.000 0.000 0.000 :1091(exec_module) 1 0.000 0.000 0.000 0.000 :1233(_path_hooks) 12 0.000 0.000 0.000 0.000 :1246(_path_importer_cache) 5 0.000 0.000 0.001 0.000 :1283(_get_spec) 5 0.000 0.000 0.001 0.000 :1315(find_spec) 1 0.000 0.000 0.000 0.000 :1362(__init__) 8 0.000 0.000 0.000 0.000 :1368() 5 0.000 0.000 0.000 0.000 :1394(_get_spec) 10 0.000 0.000 0.001 0.000 :1399(find_spec) 1 0.000 0.000 0.000 0.000 :1447(_fill_cache) 1 0.000 0.000 0.000 0.000 :1476() 1 0.000 0.000 0.000 0.000 :1488(path_hook_for_FileFinder) 8 0.000 0.000 0.000 0.000 :282(cache_from_source) 10 0.000 0.000 0.000 0.000 :36(_relax_case) 5 0.000 0.000 0.000 0.000 :412(_get_cached) 4 0.000 0.000 0.000 0.000 :444(_check_name_wrapper) 4 0.000 0.000 0.000 0.000 :481(_classify_pyc) 12 0.000 0.000 0.000 0.000 :51(_r_long) 4 0.000 0.000 0.000 0.000 :514(_validate_timestamp_pyc) 51 0.000 0.000 0.000 0.000 :56(_path_join) 4 0.000 0.000 0.000 0.000 :566(_compile_bytecode) 51 0.000 0.000 0.000 0.000 :58() 5 0.000 0.000 0.000 0.000 :617(spec_from_file_location) 8 0.000 0.000 0.000 0.000 :62(_path_split) 23 0.000 0.000 0.000 0.000 :74(_path_stat) 4 0.000 0.000 0.000 0.000 :762(create_module) 4/1 0.000 0.000 0.004 0.004 :765(exec_module) 4 0.000 0.000 0.001 0.000 :836(get_code) 9 0.000 0.000 0.000 0.000 :84(_path_is_mode_type) 4 0.000 0.000 0.000 0.000 :927(__init__) 8 0.000 0.000 0.000 0.000 :93(_path_isfile) 4 0.000 0.000 0.000 0.000 :952(get_filename) 4 0.000 0.000 0.000 0.000 :957(get_data) 1 0.000 0.000 0.000 0.000 :98(_path_isdir) 4 0.000 0.000 0.000 0.000 :994(path_stats) 100 0.000 0.000 0.001 0.000 __init__.py:183(dumps) 1 0.000 0.000 0.003 0.003 __init__.py:97() 1 0.000 0.000 0.002 0.002 decoder.py:2() 1 0.000 0.000 0.000 0.000 decoder.py:20(JSONDecodeError) 1 0.000 0.000 0.000 0.000 decoder.py:254(JSONDecoder) 1 0.000 0.000 0.000 0.000 decoder.py:284(__init__) 1 0.000 0.000 0.000 0.000 encoder.py:104(__init__) 100 0.000 0.000 0.000 0.000 encoder.py:182(encode) 1 0.000 0.000 0.001 0.001 encoder.py:2() 100 0.000 0.000 0.000 0.000 encoder.py:204(iterencode) 1 0.000 0.000 0.000 0.000 encoder.py:73(JSONEncoder) 20 0.000 0.000 0.000 0.000 enum.py:275(__call__) 20 0.000 0.000 0.000 0.000 enum.py:525(__new__) 23 0.000 0.000 0.000 0.000 enum.py:602(name) 5 0.000 0.000 0.000 0.000 enum.py:607(value) 2 0.000 0.000 0.000 0.000 enum.py:765(_missing_) 2 0.000 0.000 0.000 0.000 enum.py:772(_create_pseudo_member_) 4 0.000 0.000 0.000 0.000 enum.py:802(__or__) 6 0.000 0.000 0.000 0.000 enum.py:808(__and__) 3 0.000 0.000 0.000 0.000 enum.py:827(_high_bit) 2 0.000 0.000 0.000 0.000 enum.py:844(_decompose) 2 0.000 0.000 0.000 0.000 enum.py:862() 5 0.000 0.000 0.000 0.000 enum.py:873() 5 0.000 0.000 0.000 0.000 enum.py:879(_power_of_two) 6 0.000 0.000 0.001 0.000 re.py:232(compile) 6 0.000 0.000 0.001 0.000 re.py:271(_compile) 1 0.000 0.000 0.001 0.001 scanner.py:2() 14 0.000 0.000 0.000 0.000 sre_compile.py:249(_compile_charset) 14 0.000 0.000 0.000 0.000 sre_compile.py:276(_optimize_charset) 4 0.000 0.000 0.000 0.000 sre_compile.py:411(_mk_bitmap) 4 0.000 0.000 0.000 0.000 sre_compile.py:413() 9 0.000 0.000 0.000 0.000 sre_compile.py:423(_simple) 13 0.000 0.000 0.000 0.000 sre_compile.py:453(_get_iscased) 8/5 0.000 0.000 0.000 0.000 sre_compile.py:461(_get_literal_prefix) 5 0.000 0.000 0.000 0.000 sre_compile.py:492(_get_charset_prefix) 6 0.000 0.000 0.000 0.000 sre_compile.py:536(_compile_info) 12 0.000 0.000 0.000 0.000 sre_compile.py:595(isstring) 6 0.000 0.000 0.001 0.000 sre_compile.py:598(_code) 12 0.000 0.000 0.000 0.000 sre_compile.py:65(_combine_flags) 25/6 0.000 0.000 0.000 0.000 sre_compile.py:71(_compile) 6 0.000 0.000 0.001 0.000 sre_compile.py:759(compile) 26 0.000 0.000 0.000 0.000 sre_parse.py:111(__init__) 52 0.000 0.000 0.000 0.000 sre_parse.py:160(__len__) 123 0.000 0.000 0.000 0.000 sre_parse.py:164(__getitem__) 10 0.000 0.000 0.000 0.000 sre_parse.py:168(__setitem__) 25 0.000 0.000 0.000 0.000 sre_parse.py:172(append) 31/12 0.000 0.000 0.000 0.000 sre_parse.py:174(getwidth) 6 0.000 0.000 0.000 0.000 sre_parse.py:224(__init__) 102 0.000 0.000 0.000 0.000 sre_parse.py:233(__next) 71 0.000 0.000 0.000 0.000 sre_parse.py:249(match) 71 0.000 0.000 0.000 0.000 sre_parse.py:254(get) 4 0.000 0.000 0.000 0.000 sre_parse.py:258(getwhile) 38 0.000 0.000 0.000 0.000 sre_parse.py:286(tell) 16 0.000 0.000 0.000 0.000 sre_parse.py:295(_class_escape) 4 0.000 0.000 0.000 0.000 sre_parse.py:355(_escape) 9 0.000 0.000 0.000 0.000 sre_parse.py:432(_uniq) 13/6 0.000 0.000 0.001 0.000 sre_parse.py:441(_parse_sub) 15/6 0.000 0.000 0.001 0.000 sre_parse.py:499(_parse) 6 0.000 0.000 0.000 0.000 sre_parse.py:76(__init__) 24 0.000 0.000 0.000 0.000 sre_parse.py:81(groups) 6 0.000 0.000 0.000 0.000 sre_parse.py:84(opengroup) 6 0.000 0.000 0.000 0.000 sre_parse.py:927(fix_flags) 6 0.000 0.000 0.001 0.000 sre_parse.py:943(parse) 6 0.000 0.000 0.000 0.000 sre_parse.py:96(closegroup) 1 0.000 0.000 0.005 0.005 stats_test.py:1() 28 0.000 0.000 0.000 0.000 types.py:164(__get__) 2 0.000 0.000 0.000 0.000 {built-in method __new__ of type object at 0x10402e370} 4 0.000 0.000 0.000 0.000 {built-in method _imp._fix_co_filename} 27 0.000 0.000 0.000 0.000 {built-in method _imp.acquire_lock} 1 0.000 0.000 0.000 0.000 {built-in method _imp.create_dynamic} 1 0.000 0.000 0.000 0.000 {built-in method _imp.exec_dynamic} 2 0.000 0.000 0.000 0.000 {built-in method _imp.is_builtin} 5 0.000 0.000 0.000 0.000 {built-in method _imp.is_frozen} 27 0.000 0.000 0.000 0.000 {built-in method _imp.release_lock} 6 0.000 0.000 0.000 0.000 {built-in method _sre.compile} 10 0.000 0.000 0.000 0.000 {built-in method _thread.allocate_lock} 14 0.000 0.000 0.000 0.000 {built-in method _thread.get_ident} 3 0.000 0.000 0.000 0.000 {built-in method builtins.__build_class__} 1 0.000 0.000 0.002 0.002 {built-in method builtins.__import__} 5 0.000 0.000 0.000 0.000 {built-in method builtins.any} 32 0.000 0.000 0.000 0.000 {built-in method builtins.chr} 5/1 0.000 0.000 0.005 0.005 {built-in method builtins.exec} 30 0.000 0.000 0.000 0.000 {built-in method builtins.getattr} 22 0.000 0.000 0.000 0.000 {built-in method builtins.hasattr} 389 0.000 0.000 0.000 0.000 {built-in method builtins.isinstance} 331/303 0.000 0.000 0.000 0.000 {built-in method builtins.len} 4 0.000 0.000 0.000 0.000 {built-in method builtins.max} 59 0.000 0.000 0.000 0.000 {built-in method builtins.min} 17 0.000 0.000 0.000 0.000 {built-in method builtins.ord} 3 0.000 0.000 0.000 0.000 {built-in method builtins.setattr} 12 0.000 0.000 0.000 0.000 {built-in method from_bytes} 4 0.000 0.000 0.000 0.000 {built-in method marshal.loads} 13 0.000 0.000 0.000 0.000 {built-in method posix.fspath} 2 0.000 0.000 0.000 0.000 {built-in method posix.getcwd} 1 0.000 0.000 0.000 0.000 {built-in method posix.listdir} 23 0.000 0.000 0.000 0.000 {built-in method posix.stat} 312 0.000 0.000 0.000 0.000 {method 'append' of 'list' objects} 3 0.000 0.000 0.000 0.000 {method 'bit_length' of 'int' objects} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} 6 0.000 0.000 0.000 0.000 {method 'endswith' of 'str' objects} 12 0.000 0.000 0.000 0.000 {method 'extend' of 'list' objects} 48 0.000 0.000 0.000 0.000 {method 'find' of 'bytearray' objects} 33 0.000 0.000 0.000 0.000 {method 'format' of 'str' objects} 38 0.000 0.000 0.000 0.000 {method 'get' of 'dict' objects} 1 0.000 0.000 0.000 0.000 {method 'insert' of 'list' objects} 8 0.000 0.000 0.000 0.000 {method 'items' of 'dict' objects} 159 0.000 0.000 0.000 0.000 {method 'join' of 'str' objects} 6 0.000 0.000 0.000 0.000 {method 'lower' of 'str' objects} 4 0.000 0.000 0.000 0.000 {method 'read' of '_io.FileIO' objects} 38 0.000 0.000 0.000 0.000 {method 'rpartition' of 'str' objects} 110 0.000 0.000 0.000 0.000 {method 'rstrip' of 'str' objects} 34 0.000 0.000 0.000 0.000 {method 'setdefault' of 'dict' objects} 2 0.000 0.000 0.000 0.000 {method 'sort' of 'list' objects} 2 0.000 0.000 0.000 0.000 {method 'startswith' of 'str' objects} 4 0.000 0.000 0.000 0.000 {method 'translate' of 'bytearray' objects} After: 3666 function calls (3556 primitive calls) in 0.005 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 5/1 0.000 0.000 0.005 0.005 {built-in method builtins.exec} 1 0.000 0.000 0.005 0.005 stats_test.py:1() 5/1 0.000 0.000 0.004 0.004 :978(_find_and_load) 5/1 0.000 0.000 0.004 0.004 :948(_find_and_load_unlocked) 5/1 0.000 0.000 0.004 0.004 :663(_load_unlocked) 4/1 0.000 0.000 0.004 0.004 :765(exec_module) 7/1 0.000 0.000 0.004 0.004 :211(_call_with_frames_removed) 1 0.000 0.000 0.004 0.004 json/__init__.py:97() 1 0.000 0.000 0.002 0.002 decoder.py:2() 2 0.000 0.000 0.002 0.001 :1009(_handle_fromlist) 1 0.000 0.000 0.002 0.002 {built-in method builtins.__import__} 6 0.000 0.000 0.001 0.000 re.py:232(compile) 6 0.000 0.000 0.001 0.000 re.py:271(_compile) 6 0.000 0.000 0.001 0.000 sre_compile.py:759(compile) 1 0.000 0.000 0.001 0.001 scanner.py:2() 6 0.000 0.000 0.001 0.000 sre_parse.py:943(parse) 5 0.000 0.000 0.001 0.000 :882(_find_spec) 5 0.000 0.000 0.001 0.000 :1315(find_spec) 5 0.000 0.000 0.001 0.000 :1283(_get_spec) 13/6 0.000 0.000 0.001 0.000 sre_parse.py:441(_parse_sub) 4 0.000 0.000 0.001 0.000 :836(get_code) 15/6 0.000 0.000 0.001 0.000 sre_parse.py:499(_parse) 1 0.000 0.000 0.001 0.001 encoder.py:2() 100 0.000 0.000 0.001 0.000 json/__init__.py:183(dumps) 10 0.000 0.000 0.001 0.000 :1399(find_spec) 100 0.000 0.000 0.000 0.000 encoder.py:182(encode) 6 0.000 0.000 0.000 0.000 sre_compile.py:598(_code) 5 0.000 0.000 0.000 0.000 :576(module_from_spec) 25/6 0.000 0.000 0.000 0.000 sre_compile.py:71(_compile) 1 0.000 0.000 0.000 0.000 :1083(create_module) 1 0.000 0.000 0.000 0.000 {built-in method _imp.create_dynamic} 100 0.000 0.000 0.000 0.000 encoder.py:204(iterencode) 4 0.000 0.000 0.000 0.000 :566(_compile_bytecode) 23 0.000 0.000 0.000 0.000 :74(_path_stat) 4 0.000 0.000 0.000 0.000 :957(get_data) 23 0.000 0.000 0.000 0.000 {built-in method posix.stat} 4 0.000 0.000 0.000 0.000 {built-in method marshal.loads} 14 0.000 0.000 0.000 0.000 sre_compile.py:276(_optimize_charset) 6 0.000 0.000 0.000 0.000 sre_compile.py:536(_compile_info) 20 0.000 0.000 0.000 0.000 enum.py:275(__call__) 51 0.000 0.000 0.000 0.000 :56(_path_join) 4 0.000 0.000 0.000 0.000 enum.py:802(__or__) 12 0.000 0.000 0.000 0.000 :1246(_path_importer_cache) 5 0.000 0.000 0.000 0.000 :504(_init_module_attrs) 9 0.000 0.000 0.000 0.000 :84(_path_is_mode_type) 20 0.000 0.000 0.000 0.000 enum.py:525(__new__) 8 0.000 0.000 0.000 0.000 :93(_path_isfile) 4 0.000 0.000 0.000 0.000 {method 'read' of '_io.FileIO' objects} 31/12 0.000 0.000 0.000 0.000 sre_parse.py:174(getwidth) 2 0.000 0.000 0.000 0.000 enum.py:765(_missing_) 2 0.000 0.000 0.000 0.000 enum.py:772(_create_pseudo_member_) 123 0.000 0.000 0.000 0.000 sre_parse.py:164(__getitem__) 389 0.000 0.000 0.000 0.000 {built-in method builtins.isinstance} 8 0.000 0.000 0.000 0.000 :282(cache_from_source) 71 0.000 0.000 0.000 0.000 sre_parse.py:254(get) 1 0.000 0.000 0.000 0.000 :1447(_fill_cache) 102 0.000 0.000 0.000 0.000 sre_parse.py:233(__next) 3 0.000 0.000 0.000 0.000 {built-in method builtins.__build_class__} 2 0.000 0.000 0.000 0.000 enum.py:844(_decompose) 6 0.000 0.000 0.000 0.000 sre_parse.py:96(closegroup) 9 0.000 0.000 0.000 0.000 :403(cached) 1 0.000 0.000 0.000 0.000 {built-in method posix.listdir} 51 0.000 0.000 0.000 0.000 :58() 5 0.000 0.000 0.000 0.000 :147(__enter__) 4 0.000 0.000 0.000 0.000 :994(path_stats) 2 0.000 0.000 0.000 0.000 {built-in method posix.getcwd} 5 0.000 0.000 0.000 0.000 :412(_get_cached) 1 0.000 0.000 0.000 0.000 :1233(_path_hooks) 331/303 0.000 0.000 0.000 0.000 {built-in method builtins.len} 312 0.000 0.000 0.000 0.000 {method 'append' of 'list' objects} 33 0.000 0.000 0.000 0.000 {method 'format' of 'str' objects} 6 0.000 0.000 0.000 0.000 enum.py:808(__and__) 7 0.000 0.000 0.000 0.000 :157(_get_module_lock) 16 0.000 0.000 0.000 0.000 sre_parse.py:295(_class_escape) 5 0.000 0.000 0.000 0.000 :1394(_get_spec) 4 0.000 0.000 0.000 0.000 sre_compile.py:411(_mk_bitmap) 2 0.000 0.000 0.000 0.000 enum.py:862() 71 0.000 0.000 0.000 0.000 sre_parse.py:249(match) 6 0.000 0.000 0.000 0.000 sre_parse.py:927(fix_flags) 1 0.000 0.000 0.000 0.000 :1488(path_hook_for_FileFinder) 14 0.000 0.000 0.000 0.000 sre_compile.py:249(_compile_charset) 5 0.000 0.000 0.000 0.000 :318(__exit__) 25 0.000 0.000 0.000 0.000 sre_parse.py:172(append) 9 0.000 0.000 0.000 0.000 sre_compile.py:423(_simple) 159 0.000 0.000 0.000 0.000 {method 'join' of 'str' objects} 30 0.000 0.000 0.000 0.000 {built-in method builtins.getattr} 59 0.000 0.000 0.000 0.000 {built-in method builtins.min} 5 0.000 0.000 0.000 0.000 :151(__exit__) 53 0.000 0.000 0.000 0.000 :222(_verbose_message) 4 0.000 0.000 0.000 0.000 :481(_classify_pyc) 7 0.000 0.000 0.000 0.000 :78(acquire) 5 0.000 0.000 0.000 0.000 :617(spec_from_file_location) 38 0.000 0.000 0.000 0.000 sre_parse.py:286(tell) 6 0.000 0.000 0.000 0.000 sre_parse.py:224(__init__) 48 0.000 0.000 0.000 0.000 {method 'find' of 'bytearray' objects} 7 0.000 0.000 0.000 0.000 :103(release) 8/5 0.000 0.000 0.000 0.000 sre_compile.py:461(_get_literal_prefix) 26 0.000 0.000 0.000 0.000 sre_parse.py:111(__init__) 8 0.000 0.000 0.000 0.000 :62(_path_split) 4 0.000 0.000 0.000 0.000 sre_compile.py:413() 38 0.000 0.000 0.000 0.000 {method 'rpartition' of 'str' objects} 22 0.000 0.000 0.000 0.000 {built-in method builtins.hasattr} 2 0.000 0.000 0.000 0.000 :194(_lock_unlock_module) 9 0.000 0.000 0.000 0.000 sre_parse.py:432(_uniq) 6 0.000 0.000 0.000 0.000 {built-in method _sre.compile} 12 0.000 0.000 0.000 0.000 :51(_r_long) 6 0.000 0.000 0.000 0.000 sre_parse.py:84(opengroup) 52 0.000 0.000 0.000 0.000 sre_parse.py:160(__len__) 38 0.000 0.000 0.000 0.000 {method 'get' of 'dict' objects} 1 0.000 0.000 0.000 0.000 :98(_path_isdir) 28 0.000 0.000 0.000 0.000 types.py:164(__get__) 5 0.000 0.000 0.000 0.000 sre_compile.py:492(_get_charset_prefix) 4 0.000 0.000 0.000 0.000 :514(_validate_timestamp_pyc) 1 0.000 0.000 0.000 0.000 decoder.py:284(__init__) 110 0.000 0.000 0.000 0.000 {method 'rstrip' of 'str' objects} 32 0.000 0.000 0.000 0.000 {built-in method builtins.chr} 1 0.000 0.000 0.000 0.000 :1362(__init__) 5 0.000 0.000 0.000 0.000 :58(__init__) 4 0.000 0.000 0.000 0.000 sre_parse.py:258(getwhile) 34 0.000 0.000 0.000 0.000 {method 'setdefault' of 'dict' objects} 5 0.000 0.000 0.000 0.000 {built-in method builtins.any} 5 0.000 0.000 0.000 0.000 :176(cb) 15 0.000 0.000 0.000 0.000 :855(__enter__) 12 0.000 0.000 0.000 0.000 {method 'extend' of 'list' objects} 12 0.000 0.000 0.000 0.000 sre_compile.py:595(isstring) 24 0.000 0.000 0.000 0.000 sre_parse.py:81(groups) 12 0.000 0.000 0.000 0.000 {built-in method from_bytes} 27 0.000 0.000 0.000 0.000 {built-in method _imp.acquire_lock} 15 0.000 0.000 0.000 0.000 :859(__exit__) 12 0.000 0.000 0.000 0.000 sre_compile.py:65(_combine_flags) 10 0.000 0.000 0.000 0.000 sre_parse.py:168(__setitem__) 6 0.000 0.000 0.000 0.000 {method 'endswith' of 'str' objects} 27 0.000 0.000 0.000 0.000 {built-in method _imp.release_lock} 4 0.000 0.000 0.000 0.000 {built-in method _imp._fix_co_filename} 4 0.000 0.000 0.000 0.000 :35(_new_module) 10 0.000 0.000 0.000 0.000 :36(_relax_case) 20 0.000 0.000 0.000 0.000 :321() 5 0.000 0.000 0.000 0.000 :792(find_spec) 4 0.000 0.000 0.000 0.000 :444(_check_name_wrapper) 5 0.000 0.000 0.000 0.000 enum.py:879(_power_of_two) 2 0.000 0.000 0.000 0.000 {method 'sort' of 'list' objects} 5 0.000 0.000 0.000 0.000 {built-in method _imp.is_frozen} 10 0.000 0.000 0.000 0.000 {built-in method _thread.allocate_lock} 5 0.000 0.000 0.000 0.000 :311(__enter__) 7 0.000 0.000 0.000 0.000 :416(parent) 1 0.000 0.000 0.000 0.000 :1091(exec_module) 6 0.000 0.000 0.000 0.000 sre_parse.py:76(__init__) 5 0.000 0.000 0.000 0.000 :369(__init__) 5 0.000 0.000 0.000 0.000 :719(find_spec) 1 0.000 0.000 0.000 0.000 :1476() 4 0.000 0.000 0.000 0.000 sre_parse.py:355(_escape) 4 0.000 0.000 0.000 0.000 {method 'translate' of 'bytearray' objects} 17 0.000 0.000 0.000 0.000 {built-in method builtins.ord} 3 0.000 0.000 0.000 0.000 {built-in method builtins.setattr} 5 0.000 0.000 0.000 0.000 :143(__init__) 4 0.000 0.000 0.000 0.000 :927(__init__) 23 0.000 0.000 0.000 0.000 enum.py:602(name) 3 0.000 0.000 0.000 0.000 enum.py:827(_high_bit) 2 0.000 0.000 0.000 0.000 {built-in method __new__ of type object at 0x10fe1c370} 2 0.000 0.000 0.000 0.000 {method 'startswith' of 'str' objects} 2 0.000 0.000 0.000 0.000 {built-in method _imp.is_builtin} 13 0.000 0.000 0.000 0.000 {built-in method posix.fspath} 14 0.000 0.000 0.000 0.000 {built-in method _thread.get_ident} 5 0.000 0.000 0.000 0.000 :307(__init__) 8 0.000 0.000 0.000 0.000 :1368() 1 0.000 0.000 0.000 0.000 decoder.py:254(JSONDecoder) 5 0.000 0.000 0.000 0.000 enum.py:607(value) 13 0.000 0.000 0.000 0.000 sre_compile.py:453(_get_iscased) 1 0.000 0.000 0.000 0.000 encoder.py:104(__init__) 1 0.000 0.000 0.000 0.000 encoder.py:73(JSONEncoder) 1 0.000 0.000 0.000 0.000 {method 'insert' of 'list' objects} 3 0.000 0.000 0.000 0.000 {method 'bit_length' of 'int' objects} 8 0.000 0.000 0.000 0.000 {method 'items' of 'dict' objects} 4 0.000 0.000 0.000 0.000 {built-in method builtins.max} 4 0.000 0.000 0.000 0.000 :762(create_module) 1 0.000 0.000 0.000 0.000 :1072(__init__) 1 0.000 0.000 0.000 0.000 decoder.py:20(JSONDecodeError) 5 0.000 0.000 0.000 0.000 enum.py:873() 6 0.000 0.000 0.000 0.000 {method 'lower' of 'str' objects} 1 0.000 0.000 0.000 0.000 {built-in method _imp.exec_dynamic} 5 0.000 0.000 0.000 0.000 :424(has_location) 4 0.000 0.000 0.000 0.000 :952(get_filename) 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} The sorting is easy to see, but the other change is that this line: 100 0.000 0.000 0.001 0.000 __init__.py:183(dumps) ...now looks like this: 100 0.000 0.000 0.001 0.000 json/__init__.py:183(dumps) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 09:40:54 2018 From: report at bugs.python.org (Danish Prakash) Date: Sun, 07 Oct 2018 13:40:54 +0000 Subject: [issue34812] [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag In-Reply-To: <1537978023.88.0.545547206417.issue34812@psf.upfronthosting.co.za> Message-ID: <1538919654.85.0.545547206417.issue34812@psf.upfronthosting.co.za> Danish Prakash added the comment: > I expect to get: ['-I'] instead of ['-s', '-E', '-I'] >From what I understand, this can be done in one of two ways. First, we could edit https://github.com/python/cpython/blob/ad73a9cf97770023665a1bb1c6390a3c99478139/Modules/main.c#L430 and not incrementing -s and -E. But I believe this would have consequences that I'm unable to think of right now, so I'd like some inputs on this. Secondly, we could handle this condition in `_args_from_interpreted_flags()` itself but that might be looked upon as bad practice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 10:35:30 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 07 Oct 2018 14:35:30 +0000 Subject: [issue33084] Computing median, median_high an median_low in statistics library In-Reply-To: <1521179882.82.0.467229070634.issue33084@psf.upfronthosting.co.za> Message-ID: <1538922930.86.0.545547206417.issue33084@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I want to revisit this for 3.8. I agree that the current implementation-dependent behaviour when there are NANs in the data is troublesome. But I don't think that there is a single right answer. I also agree with Mark that if we change median, we ought to change the other functions so that people can get consistent behaviour. It wouldn't be good for median to ignore NANs and mean to process them. I'm inclined to add a parameter to the statistics functions to deal with NANs, that allow the caller to select from: - implementation-dependent, i.e. what happens now; (for speed, and backwards compatibility, this would be the default) - raise an exception; - return a NAN; - skip any NANs (treat them as missing values to be ignored). I think that raise/return/ignore will cover most use-cases for NANs, and the default will be suitable for the "easy cases" where there are no NANs, without paying any performance penalty if you already know your data has no NANs. Thoughts? I'm especially looking for ideas on what to call the first option. ---------- assignee: -> steven.daprano versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 10:51:24 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 07 Oct 2018 14:51:24 +0000 Subject: [issue28716] Fractions instantiation revisited In-Reply-To: <1479319587.68.0.845103759053.issue28716@psf.upfronthosting.co.za> Message-ID: <1538923884.82.0.545547206417.issue28716@psf.upfronthosting.co.za> Change by Steven D'Aprano : ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 11:47:25 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 07 Oct 2018 15:47:25 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1538927245.96.0.545547206417.issue34922@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 12:18:21 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Oct 2018 16:18:21 +0000 Subject: [issue34901] Missing isolated (-I) flag in sys.flags table In-Reply-To: <1538718824.99.0.545547206417.issue34901@psf.upfronthosting.co.za> Message-ID: <1538929101.98.0.545547206417.issue34901@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9135 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 12:18:24 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Oct 2018 16:18:24 +0000 Subject: [issue34901] Missing isolated (-I) flag in sys.flags table In-Reply-To: <1538718824.99.0.545547206417.issue34901@psf.upfronthosting.co.za> Message-ID: <1538929104.08.0.545547206417.issue34901@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c59e75ccf0ea8d882738214e0385f41eed51e3c7 by Miss Islington (bot) in branch '3.7': bpo-34901: add isolated (-I) flag to sys.flags (GH-9708) https://github.com/python/cpython/commit/c59e75ccf0ea8d882738214e0385f41eed51e3c7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 12:22:21 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Oct 2018 16:22:21 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1538929341.58.0.545547206417.issue34922@psf.upfronthosting.co.za> Ned Deily added the comment: See also Issue33729. We need this addressed for 3.6.7. ---------- nosy: +christian.heimes, ned.deily, serhiy.storchaka priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 12:31:16 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Oct 2018 16:31:16 +0000 Subject: [issue34831] Asyncio Tutorial In-Reply-To: <1538134577.09.0.545547206417.issue34831@psf.upfronthosting.co.za> Message-ID: <1538929876.89.0.545547206417.issue34831@psf.upfronthosting.co.za> Ned Deily added the comment: Yury, based on the file paths, you appear to be running a MacPorts python3.7. Like many other third-party distributors (but unlike the python.org installers), MacPorts separates Tkinter support into a separately-installable component. Try: port install py37-tkinter ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 12:32:57 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 07 Oct 2018 16:32:57 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1538929977.29.0.545547206417.issue34922@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. Interesting, this is not reproducible on master and latest 3.7 branches though both have different errors but reproducible in latest 3.6 and v3.7.0 . As Ned noted this seems to have been fixed with issue33729 but still there is no decision on reverting/keeping the commits made with the linked issue. # master ./python.exe Python 3.8.0a0 (heads/master:7dfbd49671, Oct 7 2018, 16:00:31) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import hashlib >>> hashlib.shake_128().hexdigest(-10) Traceback (most recent call last): File "", line 1, in ValueError: value must be positive # upstream/3.7 ./python.exe Python 3.7.1rc1+ (remotes/upstream/3.7:3b699932e5, Oct 7 2018, 21:44:03) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import hashlib >>> hashlib.shake_128().hexdigest(-10) Traceback (most recent call last): File "", line 1, in OverflowError: can't convert negative value to unsigned int # 3.7.0 segfaults ./python.exe Python 3.7.0 (tags/v3.7.0:1bf9cc5093, Oct 7 2018, 21:51:43) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import hashlib >>> hashlib.shake_128().hexdigest(-10) [1] 67585 bus error ./python.exe # upstream/3.6 segfaults ./python.exe Python 3.6.7rc1+ (remotes/upstream/3.6:177254c96f, Oct 7 2018, 21:42:19) [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. >>> import hashlib >>> hashlib.shake_128().hexdigest(-10) [1] 49096 bus error ./python.exe Thanks ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 12:33:51 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 07 Oct 2018 16:33:51 +0000 Subject: [issue34831] Asyncio Tutorial In-Reply-To: <1538134577.09.0.545547206417.issue34831@psf.upfronthosting.co.za> Message-ID: <1538930031.92.0.545547206417.issue34831@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Yury, based on the file paths, you appear to be running a MacPorts python3.7. Like many other third-party distributors (but unlike the python.org installers), MacPorts separates Tkinter support into a separately-installable component. Try: Thanks, Ned! Yeah, I know why my python37 doesn't have Tk and how to fix it. It's just I don't think the tutorial should require some component that we know is missing when python is installed through certain channels (with default flags/config). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 12:39:46 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Oct 2018 16:39:46 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1538930386.6.0.545547206417.issue34922@psf.upfronthosting.co.za> Change by Ned Deily : ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 12:42:16 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Oct 2018 16:42:16 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1538930536.28.0.545547206417.issue33729@psf.upfronthosting.co.za> Ned Deily added the comment: OK. This is now blocking the release of 3.7.1rc2 and 3.6.7rc2. See also Issue34922. ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 12:45:02 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 07 Oct 2018 16:45:02 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1538930702.92.0.545547206417.issue34922@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Sorry Ned, my comment seems to have changed the priority while submitting the comment. I would also propose adding the attached report as a unit test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 12:47:59 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 07 Oct 2018 16:47:59 +0000 Subject: [issue34812] [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag In-Reply-To: <1537978023.88.0.545547206417.issue34812@psf.upfronthosting.co.za> Message-ID: <1538930879.59.0.545547206417.issue34812@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: > From what I understand, this can be done in one of two ways. First, we could edit https://github.com/python/cpython/blob/ad73a9cf97770023665a1bb1c6390a3c99478139/Modules/main.c#L430 and not incrementing -s and -E. But I believe this would have consequences that I'm unable to think of right now, so I'd like some inputs on this. As in the docs for -I it implies -s and -E so removing the increment is not a good solution in my opinion and will break code. I don't know how this can be handled since -I sets -s and -E implicitly and _args_from_interpreted_flags just looks for the set flag. This could also get a little complex if we remove -s and -E based on -I since one might pass -I and -s. Maybe we can do an intersection of the command line arguments passes and the set bits in _args_from_interpreted_flags so that only -I remains? Victor prefers -I only and maybe has an approach to solve this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 12:53:51 2018 From: report at bugs.python.org (Shadow Raven) Date: Sun, 07 Oct 2018 16:53:51 +0000 Subject: [issue34923] Decimal Multiplication problems: Wrong solution Message-ID: <1538931231.02.0.545547206417.issue34923@psf.upfronthosting.co.za> New submission from Shadow Raven : Some decimals, when multiplied with others, give wrong solutions: 6.23*5 = 31.150000000000002 6.89*5 = 34.449999999999996 There are more but I can't list all. ---------- messages: 327290 nosy: Shadow Raven priority: normal severity: normal status: open title: Decimal Multiplication problems: Wrong solution versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 12:57:07 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 07 Oct 2018 16:57:07 +0000 Subject: [issue34919] Crash caused by certain characters in a string In-Reply-To: <1538906666.64.0.545547206417.issue34919@psf.upfronthosting.co.za> Message-ID: <1538931427.34.0.545547206417.issue34919@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. Can you please try this with 3.7.0 RC1 to see if it's reproducible? I think this similar to issue34087 that was present only in 3.7 and master which also has a Django project. There was a similar report with issue34241 with a similar Django project POC causing this in the templates layer. 3.7.0 RC1 : https://www.python.org/downloads/release/python-370rc1/ ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 13:01:23 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 07 Oct 2018 17:01:23 +0000 Subject: [issue34923] Decimal Multiplication problems: Wrong solution In-Reply-To: <1538931231.02.0.545547206417.issue34923@psf.upfronthosting.co.za> Message-ID: <1538931683.59.0.545547206417.issue34923@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. I think this a known limitation and not a bug. Please read more about floating point limitation at https://docs.python.org/3/tutorial/floatingpoint.html . I would propose closing this. Similar issue reported few days back : issue34907 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 13:06:31 2018 From: report at bugs.python.org (Shadow Raven) Date: Sun, 07 Oct 2018 17:06:31 +0000 Subject: [issue34923] Decimal Multiplication problems: Wrong solution In-Reply-To: <1538931231.02.0.545547206417.issue34923@psf.upfronthosting.co.za> Message-ID: <1538931991.49.0.545547206417.issue34923@psf.upfronthosting.co.za> Shadow Raven added the comment: Oh okay thanks ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 13:32:45 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Oct 2018 17:32:45 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1538933565.98.0.545547206417.issue34922@psf.upfronthosting.co.za> Ned Deily added the comment: No problem; that's something to watch out for when you get an update conflict message from the bug tracker! Regarding this issue, I believe Serhiy is going to do a PR but perhaps you can work with him on providing the test case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 13:42:52 2018 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Oct 2018 17:42:52 +0000 Subject: [issue34923] Decimal Multiplication problems: Wrong solution In-Reply-To: <1538931231.02.0.545547206417.issue34923@psf.upfronthosting.co.za> Message-ID: <1538934172.79.0.545547206417.issue34923@psf.upfronthosting.co.za> Change by Mark Dickinson : ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 13:53:29 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 07 Oct 2018 17:53:29 +0000 Subject: [issue34893] Add 2to3 fixer to change send and recv methods of socket object. In-Reply-To: <1538664300.49.0.545547206417.issue34893@psf.upfronthosting.co.za> Message-ID: <1538934809.13.0.545547206417.issue34893@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I have tweaked that fixer to handle the pointed cases > and a few additional ones too Playing whack-a-mole with a few cases will always fall short of being able to guarantee correct transformations and not break existing code that is working correctly. One possibility is to add a type check to the generated code, "send(x)" -> send(x.encode() if type(x)==bytes else x)" but this has its own issues and isn't satisfying. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 13:56:51 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 07 Oct 2018 17:56:51 +0000 Subject: [issue34921] NoReturn not allowed by get_type_hints when future import annotations is used In-Reply-To: <1538912765.08.0.545547206417.issue34921@psf.upfronthosting.co.za> Message-ID: <1538935011.36.0.545547206417.issue34921@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. I am adding Ivan who might have a better explanation since this is related to typing and type(NoReturn) has with __future__ import and without __future__. Ivan, feel free to remove yourself if this irrelevant. ---------- nosy: +levkivskyi, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 13:58:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Oct 2018 17:58:05 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1538935085.45.0.545547206417.issue34922@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka components: +Extension Modules -Demos and Tools type: security -> crash versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 14:01:17 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 07 Oct 2018 18:01:17 +0000 Subject: [issue34901] Missing isolated (-I) flag in sys.flags table In-Reply-To: <1538718824.99.0.545547206417.issue34901@psf.upfronthosting.co.za> Message-ID: <1538935277.4.0.545547206417.issue34901@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: >> Also there will be no binary releases and only source releases for security only branches. > Is there any particular reason as to why this happens? IS it just to make it easier for the team to focus on the development of current versions or something else? Sorry, I don't have a better explanation over the workflow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 14:05:41 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Sun, 07 Oct 2018 18:05:41 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538935541.06.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: I updated PR 9471 with a tuple hash function based on xxHash. The only change w.r.t. the official xxHash specification is that I'm not using parallellism and just using 1 accumulator. Please have a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 14:10:04 2018 From: report at bugs.python.org (Pranav Devarakonda) Date: Sun, 07 Oct 2018 18:10:04 +0000 Subject: [issue34893] Add 2to3 fixer to change send and recv methods of socket object. In-Reply-To: <1538664300.49.0.545547206417.issue34893@psf.upfronthosting.co.za> Message-ID: <1538935804.14.0.545547206417.issue34893@psf.upfronthosting.co.za> Pranav Devarakonda added the comment: > One possibility is to add a type check to the generated code, "send(x)" -> send(x.encode() if type(x)==bytes else x)" That would have solved the problem. However we cannot check the type of the object while the parsing is going on. For example, printing out the type(x) for the above example in any of the fixers would print "lib2to3.pytree.Node" (or "lib2to3.pytree.Leaf" depending on the object) but not the expected type() of the object like str or bytes. I haven't found out any method that can actually find out the type of the object in the fixer. If that can be done, then writing the fixer is pretty much straight forward. The other fixers in lib2to3, for example fix_dict.py, would convert all instances of viewkeys() to keys() irrespective of the type of the object that has called the method. That is also the case with all other fixers as well. Would appreciate very much if somebody can suggest how to do this. But since that is not the case, the fixer code has to handle these cases individually and I expect the current fixer to do a good job for the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 14:21:57 2018 From: report at bugs.python.org (noah) Date: Sun, 07 Oct 2018 18:21:57 +0000 Subject: [issue34921] NoReturn not allowed by get_type_hints when future import annotations is used In-Reply-To: <1538912765.08.0.545547206417.issue34921@psf.upfronthosting.co.za> Message-ID: <1538936517.48.0.545547206417.issue34921@psf.upfronthosting.co.za> Change by noah : ---------- keywords: +patch pull_requests: +9136 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 14:24:05 2018 From: report at bugs.python.org (Pranav Devarakonda) Date: Sun, 07 Oct 2018 18:24:05 +0000 Subject: [issue34893] Add 2to3 fixer to change send and recv methods of socket object. In-Reply-To: <1538664300.49.0.545547206417.issue34893@psf.upfronthosting.co.za> Message-ID: <1538936645.84.0.545547206417.issue34893@psf.upfronthosting.co.za> Pranav Devarakonda added the comment: I am sorry. I got you completely wrong with this > "One possibility is to add a type check to the generated code" I thought you were asking to check the type in the fixer itself. I get it now. So you meant to add the type check for the changed/generate code.I think that is a good idea. > but this has its own issues and isn't satisfying. Why do you think this way? Can you please elaborate? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 14:28:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Oct 2018 18:28:50 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1538936930.0.0.545547206417.issue34922@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +9138 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 14:28:54 2018 From: report at bugs.python.org (noah) Date: Sun, 07 Oct 2018 18:28:54 +0000 Subject: [issue34921] NoReturn not allowed by get_type_hints when future import annotations is used In-Reply-To: <1538912765.08.0.545547206417.issue34921@psf.upfronthosting.co.za> Message-ID: <1538936934.25.0.545547206417.issue34921@psf.upfronthosting.co.za> noah added the comment: Is this a feature request? Because it doesn't look like a bug to me. Where NoReturn is defined it says it's supposed to fail in static type checkers. Anyway, I'm not entirely sure on the whole process of contributing but here goes: The code ultimately fails at _type_check. According to _type_check, "special forms like Union are not valid, while Union[int, str] is OK, etc." NoReturn isn't subscriptable. So basically the code is getting to this point and executing _type_check(NoReturn, msg) which fails on any special form. If you try to force NoReturn to have additional parameters it will fail at __getitem__ because NoReturn is not subscriptable. Any is also not subscriptable, but it's specifically handled in the _type_check() function ala: if (isinstance(arg, _SpecialForm) and arg is not Any or ... if you wanted to add NoReturn you could do something like if (isinstance(arg, _SpecialForm) and arg not in [Any, NoReturn] or ... Tested it and it works fine on 3.7 and 3.8 for me! I've submitted a pull request with my proposed fix ---------- nosy: +ngwood111 -levkivskyi, xtreak versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 15:08:07 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Oct 2018 19:08:07 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1538939287.75.0.545547206417.issue33729@psf.upfronthosting.co.za> Ned Deily added the comment: The question remains if Christian's and Victor's concern with 3.7 compatibility have been satisfied by Serihy's response in msg322798. While there is plenty of time to resolve concerns about what was merged into master by PR 8346, we shouldn't release the PR 8581 changes in 3.7.1 if there are still valid compatibility concerns. Since PR 9657 for 3.6 hasn't been reviewed or merged, the only pressing issue for 3.6.7 is ensuring the segfault documented in Issue34922 is blocked, correct? And PR 8581 prevents the segfault for 3.7 so we would only need a similar fix for it if the PR were reverted, correct? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 15:37:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Oct 2018 19:37:01 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1538941021.27.0.545547206417.issue33729@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have reviewed PR 8346 yet one time. No documented working behavior was changed. Some documentation was updated to match the code, some code was updated to match the documentation, and other minor errors were fixed. I don't think this change breaks compatibility. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 15:40:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Oct 2018 19:40:47 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1538941247.48.0.545547206417.issue33729@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Other variant of the crash in issue34922 still is reproducible in 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 15:46:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Oct 2018 19:46:09 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1538941569.98.0.545547206417.issue34922@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The original crash is nor reproducible in 3.7 and master, but Victor found other example that causes a crash in 3.7 and master. import hashlib; hashlib.shake_128().hexdigest(2*64-10) Use 2*32-10 on 32-bit platforms. I suppose that passing 2**29 on 32-bit platforms will cause problems too. And this is just 512 MiB. So this issue affects 3.6, 3.7 and master. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 15:59:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Oct 2018 19:59:20 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1538942360.1.0.545547206417.issue34922@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 16:45:11 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2018 20:45:11 +0000 Subject: [issue34795] loop.sock_recv failure because of delayed callback handling In-Reply-To: <1537825222.42.0.545547206417.issue34795@psf.upfronthosting.co.za> Message-ID: <1538945111.49.0.545547206417.issue34795@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Yuri, do you mean `socket._io_refs` manipulations? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 16:48:13 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Sun, 07 Oct 2018 20:48:13 +0000 Subject: [issue22232] str.splitlines splitting on non-\r\n characters In-Reply-To: <1408528911.37.0.452679392827.issue22232@psf.upfronthosting.co.za> Message-ID: <1538945293.62.0.545547206417.issue22232@psf.upfronthosting.co.za> Neil Schemenauer added the comment: I too would prefer a new method name rather than overloading splitlines() with more keyword args (passed as hardcoded constants, usually). Again, I think we want: list(open(..).read().()) == list(open(..)) readlines() returns a list but I think this method should return an iterator (seems more Python 3 like to me, call list if you want a list). In that case, iterlines() seems like the right name to me. I think it should take a 'newline' keyword that behaves the same as the open() version of the keyword. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 17:00:57 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 07 Oct 2018 21:00:57 +0000 Subject: [issue34795] loop.sock_recv failure because of delayed callback handling In-Reply-To: <1537825222.42.0.545547206417.issue34795@psf.upfronthosting.co.za> Message-ID: <1538946057.05.0.545547206417.issue34795@psf.upfronthosting.co.za> Yury Selivanov added the comment: yes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 17:04:39 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2018 21:04:39 +0000 Subject: [issue34795] loop.sock_recv failure because of delayed callback handling In-Reply-To: <1537825222.42.0.545547206417.issue34795@psf.upfronthosting.co.za> Message-ID: <1538946279.51.0.545547206417.issue34795@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Looks like a hack but we have no choice ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 17:13:39 2018 From: report at bugs.python.org (Tim Peters) Date: Sun, 07 Oct 2018 21:13:39 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538946819.58.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: Attaching htest.py so we have a common way to compare what various things do on the tests that have been suggested. unittest sucks for that. doctest too. Here's current code output from a 32-bit build; "ideally" we want "got" values not much larger than "mean" (these are counting collisions): range(100) by 3; 32-bit hash codes; mean 116.42 got 0 -10 .. 8 by 4; 32-bit hash codes; mean 1.28 got 69,596 -50 .. 50 less -1 by 3; 32-bit hash codes; mean 116.42 got 708,066 0..99 << 60 by 3; 32-bit hash codes; mean 116.42 got 875,000 [-3, 3] by 20; 32-bit hash codes; mean 128.00 got 1,047,552 [0.5, 0.25] by 20; 32-bit hash codes; mean 128.00 got 1,048,568 old tuple test; 32-bit hash codes; mean 7.43 got 6 new tuple test; 32-bit hash codes; mean 13.87 got 102,922 And under a 64-bit build, where the full hash code is considered, and also its lowest and highest 32 bits. Note, e.g., that the old tuple test is an utter disaster if we only look at the high 32 bits. Which is actually fine by me - the point of this is to show what happens. Judging is a different (albeit related) issue ;-) range(100) by 3; 64-bit hash codes; mean 0.00 got 0 range(100) by 3; 32-bit lower hash codes; mean 116.42 got 0 range(100) by 3; 32-bit upper hash codes; mean 116.42 got 989,670 -10 .. 8 by 4; 64-bit hash codes; mean 0.00 got 69,596 -10 .. 8 by 4; 32-bit lower hash codes; mean 1.28 got 69,596 -10 .. 8 by 4; 32-bit upper hash codes; mean 1.28 got 101,438 -50 .. 50 less -1 by 3; 64-bit hash codes; mean 0.00 got 708,066 -50 .. 50 less -1 by 3; 32-bit lower hash codes; mean 116.42 got 708,066 -50 .. 50 less -1 by 3; 32-bit upper hash codes; mean 116.42 got 994,287 0..99 << 60 by 3; 64-bit hash codes; mean 0.00 got 500,000 0..99 << 60 by 3; 32-bit lower hash codes; mean 116.42 got 875,000 0..99 << 60 by 3; 32-bit upper hash codes; mean 116.42 got 989,824 [-3, 3] by 20; 64-bit hash codes; mean 0.00 got 1,047,552 [-3, 3] by 20; 32-bit lower hash codes; mean 128.00 got 1,047,552 [-3, 3] by 20; 32-bit upper hash codes; mean 128.00 got 1,047,552 [0.5, 0.25] by 20; 64-bit hash codes; mean 0.00 got 1,048,544 [0.5, 0.25] by 20; 32-bit lower hash codes; mean 128.00 got 1,048,575 [0.5, 0.25] by 20; 32-bit upper hash codes; mean 128.00 got 1,048,544 old tuple test; 64-bit hash codes; mean 0.00 got 0 old tuple test; 32-bit lower hash codes; mean 7.43 got 6 old tuple test; 32-bit upper hash codes; mean 7.43 got 128,494 new tuple test; 64-bit hash codes; mean 0.00 got 102,920 new tuple test; 32-bit lower hash codes; mean 13.87 got 102,922 new tuple test; 32-bit upper hash codes; mean 13.87 got 178,211 ---------- Added file: https://bugs.python.org/file47857/htest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 17:26:37 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Oct 2018 21:26:37 +0000 Subject: [issue34849] Drop logging when asyncio waits in selector.select() In-Reply-To: <1538283891.7.0.545547206417.issue34849@psf.upfronthosting.co.za> Message-ID: <1538947597.45.0.545547206417.issue34849@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 Oct 7 21:04:58 2018 From: report at bugs.python.org (shuoz) Date: Mon, 08 Oct 2018 01:04:58 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1538960698.06.0.545547206417.issue34922@psf.upfronthosting.co.za> shuoz added the comment: I send this to security at python.org. Victor Stinner response me. "import hashlib; hashlib.shake_128().hexdigest((-1)&2**64-1)" can crash python3.7 and master ``` fan at fan:~/github/new$ ./py3.7/bin/python3 Python 3.7.1rc1+ (heads/3.7:c59e75c, Oct 8 2018, 08:53:13) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import hashlib; hashlib.shake_128().hexdigest((-1)&2**64-1) ASAN:SIGSEGV ================================================================= ==29245==ERROR: AddressSanitizer: SEGV on unknown address 0x7f3a50713000 (pc 0x7f3a537994c1 bp 0x7ffd978e27f0 sp 0x7ffd978e1f78 T0) #0 0x7f3a537994c0 (/lib/x86_64-linux-gnu/libc.so.6+0x1564c0) #1 0x7f3a543df5d0 in __asan_memcpy (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x8c5d0) #2 0x7f3a4f5a8603 in memcpy /usr/include/x86_64-linux-gnu/bits/string3.h:53 #3 0x7f3a4f5a8603 in _PySHA3_KeccakP1600_ExtractLanes /home/fan/github/new/cpython3.7/Modules/_sha3/kcp/KeccakP-1600-opt64.c:342 #4 0x7f3a4f5a877b in _PySHA3_KeccakP1600_ExtractBytes /home/fan/github/new/cpython3.7/Modules/_sha3/kcp/KeccakP-1600-opt64.c:375 #5 0x7f3a4f5a8965 in _PySHA3_KeccakWidth1600_SpongeSqueeze /home/fan/github/new/cpython3.7/Modules/_sha3/kcp/KeccakSponge.inc:287 #6 0x7f3a4f5a92a2 in _SHAKE_digest /home/fan/github/new/cpython3.7/Modules/_sha3/sha3module.c:615 #7 0x465348 in _PyMethodDef_RawFastCallKeywords Objects/call.c:644 #8 0x74c83c in _PyMethodDescr_FastCallKeywords Objects/descrobject.c:288 #9 0x441c3b in call_function Python/ceval.c:4579 #10 0x441c3b in _PyEval_EvalFrameDefault Python/ceval.c:3110 #11 0x5a3b1f in _PyEval_EvalCodeWithName Python/ceval.c:3930 #12 0x5a40c2 in PyEval_EvalCodeEx Python/ceval.c:3959 #13 0x5a40c2 in PyEval_EvalCode Python/ceval.c:524 #14 0x605047 in run_mod Python/pythonrun.c:1035 #15 0x6097c4 in PyRun_InteractiveOneObjectEx Python/pythonrun.c:256 #16 0x609d65 in PyRun_InteractiveLoopFlags Python/pythonrun.c:120 #17 0x60ad2b in PyRun_AnyFileExFlags Python/pythonrun.c:78 #18 0x44d7c5 in pymain_run_file Modules/main.c:427 #19 0x44d7c5 in pymain_run_filename Modules/main.c:1537 #20 0x44d7c5 in pymain_run_python Modules/main.c:2626 #21 0x44d7c5 in pymain_main Modules/main.c:2787 #22 0x44e33b in _Py_UnixMain Modules/main.c:2822 #23 0x7f3a5366382f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #24 0x442db8 in _start (/home/fan/github/new/py3.7/bin/python3.7+0x442db8) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV ??:0 ?? ==29245==ABORTING ``` ``` (venv) fan at fan:~/github/new$ python Python 3.8.0a0 (heads/master:f6c8007, Sep 25 2018, 12:42:29) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import hashlib; hashlib.shake_128().hexdigest((-1)&2**64-1) ASAN:SIGSEGV ================================================================= ==29347==ERROR: AddressSanitizer: SEGV on unknown address 0x7f6df36db000 (pc 0x7f6df1a0a210 bp 0x7ffdc8f57a80 sp 0x7ffdc8f57208 T0) #0 0x7f6df1a0a20f (/lib/x86_64-linux-gnu/libc.so.6+0x15720f) #1 0x7f6df264f5d0 in __asan_memcpy (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x8c5d0) #2 0x7f6ded528643 in memcpy /usr/include/x86_64-linux-gnu/bits/string3.h:53 #3 0x7f6ded528643 in _PySHA3_KeccakP1600_ExtractLanes /home/fan/github/new/cpython_a/Modules/_sha3/kcp/KeccakP-1600-opt64.c:342 #4 0x7f6ded5287bb in _PySHA3_KeccakP1600_ExtractBytes /home/fan/github/new/cpython_a/Modules/_sha3/kcp/KeccakP-1600-opt64.c:375 #5 0x7f6ded5289a5 in _PySHA3_KeccakWidth1600_SpongeSqueeze /home/fan/github/new/cpython_a/Modules/_sha3/kcp/KeccakSponge.inc:287 #6 0x7f6ded529312 in _SHAKE_digest /home/fan/github/new/cpython_a/Modules/_sha3/sha3module.c:609 #7 0x7f6ded529312 in _sha3_shake_128_hexdigest_impl /home/fan/github/new/cpython_a/Modules/_sha3/sha3module.c:658 #8 0x7f6ded529312 in _sha3_shake_128_hexdigest /home/fan/github/new/cpython_a/Modules/_sha3/clinic/sha3module.c.h:116 #9 0x46b389 in _PyMethodDef_RawFastCallKeywords Objects/call.c:644 #10 0x81403c in _PyMethodDescr_FastCallKeywords Objects/descrobject.c:288 #11 0x4416b1 in call_function Python/ceval.c:4600 #12 0x4416b1 in _PyEval_EvalFrameDefault Python/ceval.c:3186 #13 0x5ecfbb in PyEval_EvalFrameEx Python/ceval.c:536 #14 0x5ecfbb in _PyEval_EvalCodeWithName Python/ceval.c:3951 #15 0x5ed4d2 in PyEval_EvalCodeEx Python/ceval.c:3980 #16 0x5ed4d2 in PyEval_EvalCode Python/ceval.c:513 #17 0x68addd in run_mod Python/pythonrun.c:1031 #18 0x68addd in PyRun_InteractiveOneObjectEx Python/pythonrun.c:256 #19 0x68b3f5 in PyRun_InteractiveLoopFlags Python/pythonrun.c:120 #20 0x68b71b in PyRun_AnyFileExFlags Python/pythonrun.c:78 #21 0x44db6b in pymain_run_stdin Modules/main.c:1182 #22 0x44db6b in pymain_run_python Modules/main.c:1610 #23 0x44db6b in pymain_main Modules/main.c:1755 #24 0x44e39b in _Py_UnixMain Modules/main.c:1792 #25 0x7f6df18d382f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #26 0x446228 in _start (/home/fan/github/new/py/bin/python3.8+0x446228) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV ??:0 ?? ==29347==ABORTING ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 21:53:51 2018 From: report at bugs.python.org (Dan Snider) Date: Mon, 08 Oct 2018 01:53:51 +0000 Subject: [issue34924] inspect.signature isn't aware that types.MethodType can wrap any callable Message-ID: <1538963631.37.0.545547206417.issue34924@psf.upfronthosting.co.za> New submission from Dan Snider : I actually noticed this due to it confusingly breaking IDLE call tips and code completion. >>> import inspect >>> from types import MethodType >>> bound_len = MethodType(len, 'abc') >>> bound_len() 3 >>> inspect.signature(bound_len) >>> inspect.signature(len) ---------- components: Library (Lib) messages: 327313 nosy: bup priority: normal severity: normal status: open title: inspect.signature isn't aware that types.MethodType can wrap any callable versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 22:13:22 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Oct 2018 02:13:22 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538964802.38.0.545547206417.issue34872@psf.upfronthosting.co.za> Ned Deily added the comment: Is there any reason this issue needs to remain open? Or can we at least remove the "release blocker" priority? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 22:18:37 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 08 Oct 2018 02:18:37 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538965117.78.0.545547206417.issue34872@psf.upfronthosting.co.za> Yury Selivanov added the comment: Closing it now, Ned, thanks! I assume it will make it into 3.7.1rc2, right? ---------- priority: release blocker -> normal resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 22:19:33 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Oct 2018 02:19:33 +0000 Subject: [issue34872] investigate task/future cancellation in asynciomodule.c In-Reply-To: <1538508638.07.0.545547206417.issue34872@psf.upfronthosting.co.za> Message-ID: <1538965173.51.0.545547206417.issue34872@psf.upfronthosting.co.za> Ned Deily added the comment: Both 3.7.1rc2 and 3.6.7rc2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 23:33:04 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Oct 2018 03:33:04 +0000 Subject: [issue34925] 25% speed-up to common case bisect() Message-ID: <1538969584.76.0.545547206417.issue34925@psf.upfronthosting.co.za> New submission from Raymond Hettinger : The common case for bisect calls is to have two positional arguments and no keyword arguments. For this case, PyArg_ParseTupleAndKeywords() is unnecessarily expensive. Timings ------- $ pytime -r 11 -s 'from bisect import bisect' -s 'arr=list(range(5))' 'bisect(arr, 2)' 2000000 loops, best of 11: 152 nsec per loop $ pytime -r 11 -s 'from bisect import bisect' -s 'arr=list(range(5))' 'bisect(arr, 2)' 2000000 loops, best of 11: 152 nsec per loop $ pytime -r 11 -s 'from bisect import bisect' -s 'arr=list(range(5))' 'bisect(arr, 2)' 2000000 loops, best of 11: 152 nsec per loop ------- patched -------- $ pytime -r 11 -s 'from bisect import bisect' -s 'arr=list(range(5))' 'bisect(arr, 2)' 2000000 loops, best of 11: 112 nsec per loop $ pytime -r 11 -s 'from bisect import bisect' -s 'arr=list(range(5))' 'bisect(arr, 2)' 2000000 loops, best of 11: 113 nsec per loop $ pytime -r 11 -s 'from bisect import bisect' -s 'arr=list(range(5))' 'bisect(arr, 2)' 2000000 loops, best of 11: 113 nsec per loop ---------- components: Extension Modules messages: 327317 nosy: rhettinger priority: normal severity: normal status: open title: 25% speed-up to common case bisect() type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 23:35:54 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Oct 2018 03:35:54 +0000 Subject: [issue34925] 25% speed-up to common case bisect() In-Reply-To: <1538969584.76.0.545547206417.issue34925@psf.upfronthosting.co.za> Message-ID: <1538969754.44.0.545547206417.issue34925@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +9139 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 23:37:37 2018 From: report at bugs.python.org (Danish Prakash) Date: Mon, 08 Oct 2018 03:37:37 +0000 Subject: [issue34812] [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag In-Reply-To: <1537978023.88.0.545547206417.issue34812@psf.upfronthosting.co.za> Message-ID: <1538969857.53.0.545547206417.issue34812@psf.upfronthosting.co.za> Danish Prakash added the comment: You're right Karthikeyan, although I personally think that returning ['-s', '-E', '-I'] should be a plausible solution here since it has been stated explicitly that it implies '-s' and '-E' but I'm still waiting for what Victor has to say on this. > The only thing here is that '-I' returns '-s -E -I' unlike other options where args can be used for comparison logic in check_options. Karthikeyan, do you happen to have a use case where this might come into action? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 23:39:45 2018 From: report at bugs.python.org (Tim Peters) Date: Mon, 08 Oct 2018 03:39:45 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1538969985.27.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: Here's htest.py output from git pull https://github.com/jdemeyer/cpython.git bpo34751 and a variation. The number of collisions in the variation appear in square brackets at the end of each line. 32-bit build: range(100) by 3; 32-bit hash codes; mean 116.42 got 0 [0] -10 .. 8 by 4; 32-bit hash codes; mean 1.28 got 0 [0] -50 .. 50 less -1 by 3; 32-bit hash codes; mean 116.42 got 0 [0] 0..99 << 60 by 3; 32-bit hash codes; mean 116.42 got 0 [0] [-3, 3] by 20; 32-bit hash codes; mean 128.00 got 140 [108] [0.5, 0.25] by 20; 32-bit hash codes; mean 128.00 got 99 [154] old tuple test; 32-bit hash codes; mean 7.43 got 4 [2] new tuple test; 32-bit hash codes; mean 13.87 got 19 [21] 64-bit build: range(100) by 3; 64-bit hash codes; mean 0.00 got 0 [0] range(100) by 3; 32-bit lower hash codes; mean 116.42 got 130 [0] range(100) by 3; 32-bit upper hash codes; mean 116.42 got 94 [6] -10 .. 8 by 4; 64-bit hash codes; mean 0.00 got 0 [0] -10 .. 8 by 4; 32-bit lower hash codes; mean 1.28 got 1 [0] -10 .. 8 by 4; 32-bit upper hash codes; mean 1.28 got 1 [0] -50 .. 50 less -1 by 3; 64-bit hash codes; mean 0.00 got 0 [0] -50 .. 50 less -1 by 3; 32-bit lower hash codes; mean 116.42 got 128 [0] -50 .. 50 less -1 by 3; 32-bit upper hash codes; mean 116.42 got 116 [8] 0..99 << 60 by 3; 64-bit hash codes; mean 0.00 got 0 [0] 0..99 << 60 by 3; 32-bit lower hash codes; mean 116.42 got 123 [258] 0..99 << 60 by 3; 32-bit upper hash codes; mean 116.42 got 121 [0] [-3, 3] by 20; 64-bit hash codes; mean 0.00 got 0 [0] [-3, 3] by 20; 32-bit lower hash codes; mean 128.00 got 129 [117] [-3, 3] by 20; 32-bit upper hash codes; mean 128.00 got 137 [115] [0.5, 0.25] by 20; 64-bit hash codes; mean 0.00 got 0 [0] [0.5, 0.25] by 20; 32-bit lower hash codes; mean 128.00 got 126 [131] [0.5, 0.25] by 20; 32-bit upper hash codes; mean 128.00 got 137 [130] old tuple test; 64-bit hash codes; mean 0.00 got 0 [0] old tuple test; 32-bit lower hash codes; mean 7.43 got 12 [5] old tuple test; 32-bit upper hash codes; mean 7.43 got 54 [52] new tuple test; 64-bit hash codes; mean 0.00 got 0 [0] new tuple test; 32-bit lower hash codes; mean 13.87 got 10 [6] new tuple test; 32-bit upper hash codes; mean 13.87 got 20 [30] They're all fine by me. This is what the variation does: 1. Removes all "final mix" code after the loop ends. 2. Changes initialization to add in the length: Py_uhash_t acc = _PyHASH_XXPRIME_5 + (Py_uhash_t)len; The vast bulk of the "final mix" code applies a chain of tuple-agnostic permutations. The only exception is adding in the length, which #2 moves to the start instead. Applying permutations after the loop ends changes nothing about the number of full-width hash collisions, which is Python's _primary_ concern. Two full-width hash codes are the same after the final mix if and only if they're the same before the final mix starts. In xxHash they're concerned about getting close to "avalanche" perfection (each input bit affects all final output bits with probability about 0.5 for each). There aren't enough permutations _inside_ the loop to achieve that for the last input or two, so they pile up more permutations after the loop. While we do care about "propagate left" and "propagate right" to mix up very regular and/or sparse hash codes, "avalanche perfection" is of no particular value to us. To the contrary, in _typical_ cases like `product(range(100), repeat=3)` it's better for us _not_ to destroy all the regularity: range(100) by 3; 32-bit lower hash codes; mean 116.42 got 130 [0] range(100) by 3; 32-bit upper hash codes; mean 116.42 got 94 [6] "Avalanche perfection" is what drives the number of collisions up with the final mix code intact. Without it, we get "waaaaaaay better than random" numbers of collisions. The other reason it's attractive to drop it: the final mix code is one long critical path (no instruction-level parallelism), adding 8 serialized machine instructions including two multiplies. That's a real expense for typically-short tuples used as dict keys or set elements. Nothing is anywhere near disaster territory either way, although "worse than random" remains quite possible, especially when cutting a 64-bit hash in half (do note that, either way, there are no collisions in any test when retaining the full 64-bit hash code). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 23:42:59 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Oct 2018 03:42:59 +0000 Subject: [issue34893] Add 2to3 fixer to change send and recv methods of socket object. In-Reply-To: <1538664300.49.0.545547206417.issue34893@psf.upfronthosting.co.za> Message-ID: <1538970179.95.0.545547206417.issue34893@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Benjamin, I'm dubious about this going forward, but it is up to you. ---------- assignee: -> benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 7 23:44:37 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Oct 2018 03:44:37 +0000 Subject: [issue34925] 25% speed-up to common case for bisect() In-Reply-To: <1538969584.76.0.545547206417.issue34925@psf.upfronthosting.co.za> Message-ID: <1538970277.02.0.545547206417.issue34925@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- title: 25% speed-up to common case bisect() -> 25% speed-up to common case for bisect() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 00:08:45 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 08 Oct 2018 04:08:45 +0000 Subject: [issue34812] [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag In-Reply-To: <1537978023.88.0.545547206417.issue34812@psf.upfronthosting.co.za> Message-ID: <1538971725.49.0.545547206417.issue34812@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: >> The only thing here is that '-I' returns '-s -E -I' unlike other options where args can be used for comparison logic in check_options. > Karthikeyan, do you happen to have a use case where this might come into action? I don't have a use case in mind. The comment was that returning '-s -E -I' would need the helper function used in the test to be changed. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 02:01:58 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 08 Oct 2018 06:01:58 +0000 Subject: [issue24307] 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: <1538978518.87.0.545547206417.issue24307@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Since @tanbro-liu hasn't responded I am proposing this to be an easy issue. The issue is that %default in optparse doesn't handle unicode values. The fix would be to make the patch in msg244244 as a PR attributing to the original author and add a test called test_unicode_default with a unicode value as default similar to test_float_default [1] that uses a default float value. [1] https://github.com/python/cpython/blob/4a7dd30f5810e8861a3834159a222ab32d5c97d0/Lib/test/test_optparse.py#L607 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 02:07:24 2018 From: report at bugs.python.org (YoSTEALTH) Date: Mon, 08 Oct 2018 06:07:24 +0000 Subject: [issue34926] Adding "mine_type" method to pathlib.Path Message-ID: <1538978844.01.0.545547206417.issue34926@psf.upfronthosting.co.za> New submission from YoSTEALTH : How about adding basic "mime_type" method to "pathlib.Path" ? Code would do something like: import mimetypes def mime_type(name): """Mime-type of the file.""" find = name.rfind('.') ext = '' if find == -1 else name[find:] return mimetypes.types_map.get(ext, 'application/octet-stream') Users would use it like so: import pathlib file = pathlib.Path('hello_world.py') print(file.mime_type) # 'text/x-python' ---------- components: Extension Modules messages: 327323 nosy: YoSTEALTH priority: normal severity: normal status: open title: Adding "mine_type" method to pathlib.Path type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 02:24:01 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 08 Oct 2018 06:24:01 +0000 Subject: [issue34817] Ellipsis docs has extra dot in the markdown that makes it look like .... (four dots) In-Reply-To: <1538032499.31.0.545547206417.issue34817@psf.upfronthosting.co.za> Message-ID: <1538979841.5.0.545547206417.issue34817@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +9140 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 02:26:42 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 08 Oct 2018 06:26:42 +0000 Subject: [issue34817] Ellipsis docs has extra dot in the markdown that makes it look like .... (four dots) In-Reply-To: <1538032499.31.0.545547206417.issue34817@psf.upfronthosting.co.za> Message-ID: <1538980002.63.0.545547206417.issue34817@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks Martin for the suggestion. I have created a PR with your suggestion and added a description in the PR that shows the visual distinction between the current doc and suggested change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 02:46:34 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 08 Oct 2018 06:46:34 +0000 Subject: [issue34926] Adding "mime_type" method to pathlib.Path In-Reply-To: <1538978844.01.0.545547206417.issue34926@psf.upfronthosting.co.za> Message-ID: <1538981194.42.0.545547206417.issue34926@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- title: Adding "mine_type" method to pathlib.Path -> Adding "mime_type" method to pathlib.Path _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 02:53:37 2018 From: report at bugs.python.org (Carol Willing) Date: Mon, 08 Oct 2018 06:53:37 +0000 Subject: [issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring In-Reply-To: <1520351440.06.0.467229070634.issue33014@psf.upfronthosting.co.za> Message-ID: <1538981617.81.0.545547206417.issue33014@psf.upfronthosting.co.za> Carol Willing added the comment: New changeset ffc5a14d00db984c8e72c7b67da8a493e17e2c14 by Carol Willing (Sanyam Khurana) in branch 'master': bpo-33014: Clarify str.isidentifier docstring (GH-6088) https://github.com/python/cpython/commit/ffc5a14d00db984c8e72c7b67da8a493e17e2c14 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 03:32:02 2018 From: report at bugs.python.org (Aivar Annamaa) Date: Mon, 08 Oct 2018 07:32:02 +0000 Subject: [issue34927] Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1) Message-ID: <1538983922.23.0.545547206417.issue34927@psf.upfronthosting.co.za> New submission from Aivar Annamaa : After switching from Python 3.7.0 to 3.7.1rc1 (macOS, 64-bit only downloaded from python.org), my rather big Tkinter application started to segfault whenever I close a system dialog (eg. the one created by askopenfilename or showerror) by keypress (eg. Escape or Enter). The crash does not happen when I close the dialog with mouse click. The code that calls the dialog runs fine, and the crash seems to happen next time the control goes back to Tk mainloop. It looks like the keypress performed in the dialog somehow remains in Tk event queue. Here is the system log for main thread, (more detailed information can be seen at https://bitbucket.org/plas/thonny/issues/545/quit): Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY VM Regions Near 0: --> __TEXT 000000010ab7e000-000000010ab7f000 [ 4K] r-x/rwx SM=COW /Users/USER/Desktop/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff97e1a8ea __kill + 10 1 libsystem_platform.dylib 0x00007fff96dba52a _sigtramp + 26 2 ??? 000000000000000000 0 + 0 3 libtk8.6.dylib 0x000000010b876e84 -[TKApplication(TKKeyEvent) tkProcessKeyEvent:] + 160 4 libtk8.6.dylib 0x000000010b87d6d9 TkMacOSXEventsCheckProc + 360 5 libtcl8.6.dylib 0x000000010b714d06 Tcl_DoOneEvent + 316 6 _tkinter.cpython-37m-darwin.so 0x000000010b64501d _tkinter_tkapp_mainloop + 269 7 org.python.python 0x000000010aba752e _PyMethodDef_RawFastCallKeywords + 430 8 org.python.python 0x000000010abad192 _PyMethodDescr_FastCallKeywords + 82 9 org.python.python 0x000000010ac6640c call_function + 780 10 org.python.python 0x000000010ac6339c _PyEval_EvalFrameDefault + 25164 11 org.python.python 0x000000010ac66f06 _PyEval_EvalCodeWithName + 2422 12 org.python.python 0x000000010aba6a61 _PyFunction_FastCallKeywords + 257 13 org.python.python 0x000000010ac663e2 call_function + 738 14 org.python.python 0x000000010ac633b6 _PyEval_EvalFrameDefault + 25190 15 org.python.python 0x000000010aba6ed0 function_code_fastcall + 128 16 org.python.python 0x000000010ac663e2 call_function + 738 17 org.python.python 0x000000010ac63457 _PyEval_EvalFrameDefault + 25351 18 org.python.python 0x000000010ac66f06 _PyEval_EvalCodeWithName + 2422 19 org.python.python 0x000000010ac5d074 PyEval_EvalCode + 100 20 org.python.python 0x000000010ac5a65d builtin_exec + 557 21 org.python.python 0x000000010aba752e _PyMethodDef_RawFastCallKeywords + 430 22 org.python.python 0x000000010aba6a9a _PyCFunction_FastCallKeywords + 42 23 org.python.python 0x000000010ac663d4 call_function + 724 24 org.python.python 0x000000010ac63457 _PyEval_EvalFrameDefault + 25351 25 org.python.python 0x000000010ac66f06 _PyEval_EvalCodeWithName + 2422 26 org.python.python 0x000000010aba6a61 _PyFunction_FastCallKeywords + 257 27 org.python.python 0x000000010ac663e2 call_function + 738 28 org.python.python 0x000000010ac63457 _PyEval_EvalFrameDefault + 25351 29 org.python.python 0x000000010ac66f06 _PyEval_EvalCodeWithName + 2422 30 org.python.python 0x000000010aba663b _PyFunction_FastCallDict + 523 31 org.python.python 0x000000010acb8743 pymain_run_module + 147 32 org.python.python 0x000000010acb7b47 pymain_main + 5303 33 org.python.python 0x000000010acb868a _Py_UnixMain + 58 34 libdyld.dylib 0x00007fff921c35ad start + 1 ---------- components: Tkinter messages: 327326 nosy: aivarannamaa priority: normal severity: normal status: open title: Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1) versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 03:33:34 2018 From: report at bugs.python.org (Aivar Annamaa) Date: Mon, 08 Oct 2018 07:33:34 +0000 Subject: [issue34927] Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1) In-Reply-To: <1538983922.23.0.545547206417.issue34927@psf.upfronthosting.co.za> Message-ID: <1538984014.88.0.545547206417.issue34927@psf.upfronthosting.co.za> Aivar Annamaa added the comment: Here is a simple application that also exposes this problem. Click at the button and press Escape when dialog appears. import tkinter as tk import tkinter.filedialog as fd root = tk.Tk() def dostuff(): fd.askopenfile() bt = tk.Button(root, text="Click me!", command=dostuff) bt.grid() root.mainloop() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 03:42:51 2018 From: report at bugs.python.org (Aivar Annamaa) Date: Mon, 08 Oct 2018 07:42:51 +0000 Subject: [issue34927] Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1) In-Reply-To: <1538983922.23.0.545547206417.issue34927@psf.upfronthosting.co.za> Message-ID: <1538984571.71.0.545547206417.issue34927@psf.upfronthosting.co.za> Aivar Annamaa added the comment: Looks like the workaround is to provide explicit `parent` named argument to the dialog call. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 03:55:01 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 08 Oct 2018 07:55:01 +0000 Subject: [issue34927] Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1) In-Reply-To: <1538983922.23.0.545547206417.issue34927@psf.upfronthosting.co.za> Message-ID: <1538985301.08.0.545547206417.issue34927@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report and script. I can't reproduce this with 3.7.1rc1 tag and also tried this on v3.7.0 which works fine on Mac OS running 10.10.4 and tcl version 8.5 . I checked out the 3.7.1rc1 tag and did a clean rebuild with `git clean -xdf && ./configure --with-pydebug && make -s -j4` and tried below Steps I followed : * I executed the script. * clicked on "click me" button. * A file open dialog opened and I closed this with esc. * Again clicked "click me" button and selected a file to click enter the file open dialog disappeared * Closed the main box with "click me". No segfault. Since the report says it's a regression between 3.7.0 and 3.7.1RC1 I am adding Ned as a friendly ping about this issue so that this can be tracked better between RC releases. ---------- nosy: +ned.deily, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 04:12:43 2018 From: report at bugs.python.org (Aivar Annamaa) Date: Mon, 08 Oct 2018 08:12:43 +0000 Subject: [issue34927] Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1) In-Reply-To: <1538983922.23.0.545547206417.issue34927@psf.upfronthosting.co.za> Message-ID: <1538986363.37.0.545547206417.issue34927@psf.upfronthosting.co.za> Aivar Annamaa added the comment: I got the segfault with Tk 8.6, provided with python.org installer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 04:41:49 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 08 Oct 2018 08:41:49 +0000 Subject: [issue34927] Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1) In-Reply-To: <1538983922.23.0.545547206417.issue34927@psf.upfronthosting.co.za> Message-ID: <1538988109.22.0.545547206417.issue34927@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks, I can confirm that this works with 3.7.0 and segfaults with 3.7.1RC1 Mac OS installer that uses Tk 8.6 . Clicking the button and closing the file open dialog triggers this segfault as noted in your description. I don't know how I can configure my local build to use Tk 8.6 and maybe it's a problem with Tk 8.6. It seems from 3.7 and above the installer uses 8.6 while 3.6 dynamically links to the apple's version 8.5 as noted in https://www.python.org/download/mac/tcltk/#built-in-8-6-8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 05:09:35 2018 From: report at bugs.python.org (Aivar Annamaa) Date: Mon, 08 Oct 2018 09:09:35 +0000 Subject: [issue34927] Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1) In-Reply-To: <1538983922.23.0.545547206417.issue34927@psf.upfronthosting.co.za> Message-ID: <1538989775.6.0.545547206417.issue34927@psf.upfronthosting.co.za> Aivar Annamaa added the comment: Can it be caused by https://github.com/python/cpython/commit/adf493227f1efd5d6b34f46b854142bf3b5a411c ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 05:13:06 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Oct 2018 09:13:06 +0000 Subject: [issue34927] Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1) In-Reply-To: <1538983922.23.0.545547206417.issue34927@psf.upfronthosting.co.za> Message-ID: <1538989986.13.0.545547206417.issue34927@psf.upfronthosting.co.za> Ned Deily added the comment: > Can it be caused by https://github.com/python/cpython/commit/adf493227f1efd5d6b34f46b854142bf3b5a411c ? It very likely could be. Thanks for the report. I'll take a look at it a bit later. ---------- assignee: -> ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 05:33:46 2018 From: report at bugs.python.org (Marc Richter) Date: Mon, 08 Oct 2018 09:33:46 +0000 Subject: [issue13828] Further improve casefold documentation In-Reply-To: <1326992763.46.0.576190503242.issue13828@psf.upfronthosting.co.za> Message-ID: <1538991226.32.0.545547206417.issue13828@psf.upfronthosting.co.za> Marc Richter added the comment: +1 as well. To be honest, I did not understand what this function does in detail yet. Since not too long ago (2017) in Germany, there was an uppercase-variant for the special letter from this function's example (?) been added to the official orthography [1]. Is this something that needs to be changed in this function's behavior now or stays this expected behavior? I'm still puzzled and I think the whole function should get a more clear description. [1]: https://en.wikipedia.org/wiki/Capital_%E1%BA%9E ---------- nosy: +Marc Richter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 05:38:43 2018 From: report at bugs.python.org (Ma Lin) Date: Mon, 08 Oct 2018 09:38:43 +0000 Subject: [issue32174] nonASCII punctuation characters can not display in python363.chm. In-Reply-To: <1512013530.29.0.213398074469.issue32174@psf.upfronthosting.co.za> Message-ID: <1538991523.92.0.545547206417.issue32174@psf.upfronthosting.co.za> Ma Lin added the comment: I will create a PR to fix this within a day. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 05:49:32 2018 From: report at bugs.python.org (Marc Richter) Date: Mon, 08 Oct 2018 09:49:32 +0000 Subject: =?utf-8?q?=5Bissue34928=5D_string_method_=2Eupper=28=29_converts_=27?= =?utf-8?b?w58nIHRvICdTUycgaW5zdGVhZCBvZiAn4bqeJw==?= Message-ID: <1538992172.47.0.545547206417.issue34928@psf.upfronthosting.co.za> New submission from Marc Richter : There's a special letter in German orthography called "eszett" (?). This letter had no uppercase variant for hundreds of years until 2017, there was an uppercase variant added to the official German orthography called "capital eszett" (?) [1]. Python's .upper() string method still translates this to "SS" (which was correct before 2017): ~ $ python3.7.0 Python 3.7.0 (default, Aug 29 2018, 17:15:17) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> 'gru?'.upper() 'GRUSS' >>> The result of this example should have been 'GRU?' instead. That being said, it's fair to inform about the fact that this letter is still quite unpopular in Germany; it is not even typeable with German keyboards, yet. Anyways, I think since this became officials orthography, it's not Python's job to adopt behaviors but clear rules instead. I'm not sure if this affects .casefold() as well, since I do not get that method's scope. BR, Marc Richter [1]: https://en.wikipedia.org/wiki/Capital_%E1%BA%9E ---------- components: Interpreter Core messages: 327336 nosy: Marc Richter priority: normal severity: normal status: open title: string method .upper() converts '?' to 'SS' instead of '?' type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 06:14:30 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 08 Oct 2018 10:14:30 +0000 Subject: =?utf-8?q?=5Bissue34928=5D_string_method_=2Eupper=28=29_converts_=27?= =?utf-8?b?w58nIHRvICdTUycgaW5zdGVhZCBvZiAn4bqeJw==?= In-Reply-To: <1538992172.47.0.545547206417.issue34928@psf.upfronthosting.co.za> Message-ID: <1538993670.89.0.545547206417.issue34928@psf.upfronthosting.co.za> Steven D'Aprano added the comment: We match the Unicode specification, not arbitrary language rules. (Austrian and Swiss German are, I believe, phasing out ? altogether, and haven't added an uppercase variant.) Until the Unicode consortium change their case conversion rules, it is still correct for .upper() to convert '?' to 'SS'. The eszett is just one of the many annoying anomalies in case conversion, like Turkish dotted and dotless i. Natural language is hard, and messy. http://unicode.org/faq/casemap_charprop.html ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 06:24:47 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 08 Oct 2018 10:24:47 +0000 Subject: =?utf-8?q?=5Bissue34928=5D_string_method_=2Eupper=28=29_converts_=27?= =?utf-8?b?w58nIHRvICdTUycgaW5zdGVhZCBvZiAn4bqeJw==?= In-Reply-To: <1538992172.47.0.545547206417.issue34928@psf.upfronthosting.co.za> Message-ID: <1538994287.03.0.545547206417.issue34928@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report and details but I think this exact case was already discussed in issue30810. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 06:27:07 2018 From: report at bugs.python.org (Lele Gaifax) Date: Mon, 08 Oct 2018 10:27:07 +0000 Subject: [issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring In-Reply-To: <1520351440.06.0.467229070634.issue33014@psf.upfronthosting.co.za> Message-ID: <1538994427.77.0.545547206417.issue33014@psf.upfronthosting.co.za> Change by Lele Gaifax : ---------- keywords: +patch pull_requests: +9141 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 06:28:44 2018 From: report at bugs.python.org (Marc Richter) Date: Mon, 08 Oct 2018 10:28:44 +0000 Subject: =?utf-8?q?=5Bissue34928=5D_string_method_=2Eupper=28=29_converts_=27?= =?utf-8?b?w58nIHRvICdTUycgaW5zdGVhZCBvZiAn4bqeJw==?= In-Reply-To: <1538992172.47.0.545547206417.issue34928@psf.upfronthosting.co.za> Message-ID: <1538994524.84.0.545547206417.issue34928@psf.upfronthosting.co.za> Marc Richter added the comment: Sorry then; that did not show up in my search :/ Yes, seems like this is duplicating that one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 06:30:57 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 08 Oct 2018 10:30:57 +0000 Subject: =?utf-8?q?=5Bissue34928=5D_string_method_=2Eupper=28=29_converts_=27?= =?utf-8?b?w58nIHRvICdTUycgaW5zdGVhZCBvZiAn4bqeJw==?= In-Reply-To: <1538992172.47.0.545547206417.issue34928@psf.upfronthosting.co.za> Message-ID: <1538994657.96.0.545547206417.issue34928@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: No problem. Thanks for the confirmation I am closing this as a duplicate. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Germany made the upper case ? official. '?'.upper() should now return ?. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 06:36:52 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 08 Oct 2018 10:36:52 +0000 Subject: [issue34925] 25% speed-up to common case for bisect() In-Reply-To: <1538969584.76.0.545547206417.issue34925@psf.upfronthosting.co.za> Message-ID: <1538995012.19.0.545547206417.issue34925@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 07:13:28 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Oct 2018 11:13:28 +0000 Subject: [issue34929] Extract asyncio sendfile tests into a separate test file Message-ID: <1538997208.2.0.545547206417.issue34929@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- components: Tests, asyncio nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Extract asyncio sendfile tests into a separate test file versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 07:14:49 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Oct 2018 11:14:49 +0000 Subject: [issue34929] Extract asyncio sendfile tests into a separate test file Message-ID: <1538997289.28.0.545547206417.issue34929@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +9142 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 07:21:20 2018 From: report at bugs.python.org (Ma Lin) Date: Mon, 08 Oct 2018 11:21:20 +0000 Subject: [issue32174] nonASCII punctuation characters can not display in python363.chm. In-Reply-To: <1512013530.29.0.213398074469.issue32174@psf.upfronthosting.co.za> Message-ID: <1538997680.42.0.545547206417.issue32174@psf.upfronthosting.co.za> Change by Ma Lin : ---------- keywords: +patch pull_requests: +9143 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 07:24:10 2018 From: report at bugs.python.org (Justin Dray) Date: Mon, 08 Oct 2018 11:24:10 +0000 Subject: [issue33643] Mock functions with autospec STILL don't support assert_called_once, assert_called, assert_not_called In-Reply-To: <1527233959.88.0.682650639539.issue33643@psf.upfronthosting.co.za> Message-ID: <1538997850.62.0.545547206417.issue33643@psf.upfronthosting.co.za> Justin Dray added the comment: I can still reproduce this with python 3.6.5: https://gist.github.com/justin8/c6a565d3b64222a9ba3a2568d1d830ee no .assert_called() on autospec'd functions, but it works with normal mock.MagicMock() ipython autocomplete shows assert_any_call, assert_called_once, assert_called_with and assert_has_calls as valid functions however? ---------- nosy: +Justin Dray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 07:33:06 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 08 Oct 2018 11:33:06 +0000 Subject: [issue33643] Mock functions with autospec STILL don't support assert_called_once, assert_called, assert_not_called In-Reply-To: <1527233959.88.0.682650639539.issue33643@psf.upfronthosting.co.za> Message-ID: <1538998386.8.0.545547206417.issue33643@psf.upfronthosting.co.za> St?phane Wirtel added the comment: There is a problem with your code, you use `mock` library but this one does not exist in the standard library. You should use `unittest.mock` Because this issue is not related with the unittest.mock library, I am going to close this issue. ---------- nosy: +matrixise stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 07:37:02 2018 From: report at bugs.python.org (Antoine Pietri) Date: Mon, 08 Oct 2018 11:37:02 +0000 Subject: [issue34930] sha1module: Switch sha1 implementation to sha1dc/hardened sha1 Message-ID: <1538998622.72.0.545547206417.issue34930@psf.upfronthosting.co.za> New submission from Antoine Pietri : SHA-1 has been broken a while ago. While the general recommandation is to migrate to more recent hashes (like SHA-2 and SHA-3), a lot of industry applications (notably Merkle DAG implementations like Git or Blockchains) require backwards compatibility with SHA-1, at least for the time being required for all the users to transition. The SHAttered authors published along with their paper a reference implementation of a "hardened SHA-1" algorithm, a SHA-1 implementation that uses counter-cryptanalysis to detect inputs that were forged to produce a hash collision. What that means is that Hardened SHA-1 is a secure hash function that produces the same output as SHA-1 in 99.999999...% of cases, and only differs when two inputs were specifically made to generate collisions. The reference implementation is here: https://github.com/cr-marcstevens/sha1collisiondetection A large part of the industry has adopted Hardened SHA-1 as a temporary replacement for SHA-1, most notably Git under the name "sha1dc": https://github.com/git/git/commit/28dc98e343ca4eb370a29ceec4c19beac9b5c01e Since CPython has its own implementation of SHA-1, I think it would be a good idea to provide a hardened SHA-1 implementation. So either: 1. we replace the current implementation of sha1 by sha1dc completely, which might be a problem for people who write script to detect whether two files collide with classic sha1 2. we replace the current implementation but we keep the old one under a new name, like "sha1_broken" or "sha1_classic", which breaks backwards compatibility in a few marginal cases but the functionality can be trivially restored by changing the name of the hash 3. we keep the current implementation but add a new one under a new name "sha1dc", which probably means most people will stay on a broken implementation for no good reason, but it will be fully backwards-compatible even in the marginal cases 4. we don't implement Hardened SHA-1 at all, and we advise people to change their hash algorithm, while realizing that this solution is not feasible in a lot of cases. I'd suggest going with either 1. or 2. What would be your favorite option? Not sure whether this should go in security or enhancement, so I put it in the latter category to be more conservative in issue prioritization. I added the devs who worked the most on Modules/sha1module.c in the Nosy list. ---------- components: Library (Lib) messages: 327343 nosy: antoine.pietri, christian.heimes, loewis, vstinner priority: normal severity: normal status: open title: sha1module: Switch sha1 implementation to sha1dc/hardened sha1 type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 07:43:56 2018 From: report at bugs.python.org (Ma Lin) Date: Mon, 08 Oct 2018 11:43:56 +0000 Subject: [issue32174] nonASCII punctuation characters can not display in python363.chm. In-Reply-To: <1512013530.29.0.213398074469.issue32174@psf.upfronthosting.co.za> Message-ID: <1538999036.83.0.545547206417.issue32174@psf.upfronthosting.co.za> Ma Lin added the comment: It seems impossible to specify the encoding of .chm to ASCII [1], the available encodings of .chm are limited to a list [2]. So I wrote a Sphinx extension for .chm output, it escapes the characters which (codepoint > 0x7F) to 7-bit ASCII. Most escaped characters are: ?????? [1] https://github.com/sphinx-doc/sphinx/blob/master/sphinx/builders/htmlhelp.py#L203-L206 [2] https://github.com/sphinx-doc/sphinx/blob/master/sphinx/builders/htmlhelp.py#L136-L170 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 07:59:32 2018 From: report at bugs.python.org (rb) Date: Mon, 08 Oct 2018 11:59:32 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1538999972.52.0.545547206417.issue28167@psf.upfronthosting.co.za> rb added the comment: > Maintaining the necessary logic Python is not really possible in the stdlib. It's better to have a PyPI module for this which can be updated much more easily. The /etc/os-release syntax is stable, the file is implemented nearly everywhere and is unlikely to change, so I don't see why it'll be difficult to maintain. Just parse and give us the key/value pairs, please! It's disappointing to have to add Yet Another Dependency to get this functionality, contrary to Python's "batteries included" philosophy. ---------- nosy: +rb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 08:06:01 2018 From: report at bugs.python.org (Jan Novak) Date: Mon, 08 Oct 2018 12:06:01 +0000 Subject: [issue34931] os.path.splitext with more dots Message-ID: <1539000361.1.0.545547206417.issue34931@psf.upfronthosting.co.za> New submission from Jan Novak : There are some old tickets about changing splitext() in 2007: https://bugs.python.org/issue1115886 https://bugs.python.org/issue1681842 Present python documentation: Leading periods on the basename are ignored; splitext('.cshrc') returns ('.cshrc', ''). Changed in version 2.6: Earlier versions could produce an empty root when the only period was the first character. But nobody take care about more than one dots: For example this possible corect filenames: >>> os.path.splitext('....jpg') ('....jpg', '') So present function is insuficient (buggy) to use to detect right extension. Maybe new parameter would be helpfull for that? Like parameter "preserve_dotfiles" discussed in 2007. And what to do with the wrong '.', '..', '...', ... filenames? ---------- messages: 327346 nosy: xnovakj priority: normal severity: normal status: open title: os.path.splitext with more dots type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 08:11:49 2018 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 08 Oct 2018 12:11:49 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1539000709.52.0.545547206417.issue28167@psf.upfronthosting.co.za> Petr Viktorin added the comment: In the recommended library, distro, real-world issues blew the code size up to 1000 lines of code and the open issue count to 15 ? so while it's definitely useful, it doesn't seem either fully complete or trivial to maintain: https://github.com/nir0s/distro/blob/master/distro.py If you can do better, please make a library to implement the simple name/value parsing, publish it on PyPI (sadly, as Yet Another Dependency at this point), make sure it's unit-tested, documented and widely useful in the real world, and *then* suggest inclusion in the standard library. That's how things get into the stdlib nowadays. If that sounds like a lot of work, please consider your tone when asking others to do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 08:20:00 2018 From: report at bugs.python.org (Ma Lin) Date: Mon, 08 Oct 2018 12:20:00 +0000 Subject: [issue32174] nonASCII punctuation characters can not display in python363.chm. In-Reply-To: <1512013530.29.0.213398074469.issue32174@psf.upfronthosting.co.za> Message-ID: <1539001200.74.0.545547206417.issue32174@psf.upfronthosting.co.za> Change by Ma Lin : Added file: https://bugs.python.org/file47858/PR 9758 effects.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 08:33:10 2018 From: report at bugs.python.org (rb) Date: Mon, 08 Oct 2018 12:33:10 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1539001990.77.0.545547206417.issue28167@psf.upfronthosting.co.za> rb added the comment: Apologies for my tone. I wasn't aware that starting out with a PyPI module is the only accepted process for getting functionality into stdlib. That certainly is a lot of work for what would be a trivial handful of lines to parse key/value pairs and handle error paths, etc (and corresponding tests of course). As a distribution developer, from my perspective we've already (finally) managed to reach widespread standardization and unification on a simple key/value pair specification, so it is particularly surprising to me that as a Python developer I cannot easily get to it. IMHO, forcing the PyPI route seems like a recipe for scope creep to me in this case. Looking at that module, it tries to do so much more. /etc/os-release is widely accepted nowadays, and I think it would be widely useful to the majority of users to simply pass the values through to a Python dictionary, reflecting "this is what the OS says it is" over "this is my promised stable view". Many of the issues there are because it's trying to be "clever", IMHO, rather than just passing through the provided information from the platform. My proposed API promise would simply be "this is what os-release says" or "os-release information not available". Of course the most popular PyPI module to solve a particular problem will always be the one with the widest scope, so there seems little point in writing a parallel minimal one. The cost of adding Yet Another Dependency has to be paid in either case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 08:58:52 2018 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 08 Oct 2018 12:58:52 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1539003532.86.0.545547206417.issue28167@psf.upfronthosting.co.za> Petr Viktorin added the comment: > I wasn't aware that starting out with a PyPI module is the only accepted process for getting functionality into stdlib. It's the main way things should get in. (Other ways exist, for example, dataclasses were added as simplification/merging of several existing libraries.) > That certainly is a lot of work for what would be a trivial handful of lines to parse key/value pairs and handle error paths, etc (and corresponding tests of course). Releasing on PyPI is trivial once you have the tests and documentation. I'll be glad to help with that. > IMHO, forcing the PyPI route seems like a recipe for scope creep to me in this case. Not necessarily. You just need to carefully define the scope of the PyPI module ? same as you would for the stdlib module. There's not much difference between stdlib and PyPI here: after all, I'd argue the main reason platform.linux_distribution() was removed is that its scope was too wide to be maintainable. > The cost of adding Yet Another Dependency has to be paid in either case. Indeed. But it will be hard to get in otherwise. BTW, another way a PyPI release help is that the functionality would be useful for previous versions of Python. At this point new features are targetting Python 3.8. So, even if this does get into stdlib, a backport on PyPI would still be useful. Consider prior art like: https://pypi.org/project/dataclasses/ https://pypi.org/project/asyncio/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 09:07:16 2018 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 08 Oct 2018 13:07:16 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1539004036.51.0.545547206417.issue28167@psf.upfronthosting.co.za> Petr Viktorin added the comment: Actually, the scope (right balance between usefulness and maintainability) is probably the hardest real problem to solve here. PyPI lets you iterate on that. For a straight-to-stdlib module, you'd need to get it exactly right on the first time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 09:13:05 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Mon, 08 Oct 2018 13:13:05 +0000 Subject: [issue28167] remove platform.linux_distribution() In-Reply-To: <1473933007.75.0.131793274646.issue28167@psf.upfronthosting.co.za> Message-ID: <1539004385.99.0.545547206417.issue28167@psf.upfronthosting.co.za> Change by Chih-Hsuan Yen : ---------- nosy: -yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 09:38:10 2018 From: report at bugs.python.org (Robert) Date: Mon, 08 Oct 2018 13:38:10 +0000 Subject: [issue34932] Add macOS TCP_KEEPALIVE to available socket options Message-ID: <1539005890.42.0.545547206417.issue34932@psf.upfronthosting.co.za> New submission from Robert : macOS uses TCP_KEEPALIVE in place of TCP_KEEPIDLE. It would be good to have this available in the socket library to use directly. Pull request coming up. ---------- components: Library (Lib) messages: 327351 nosy: llawall priority: normal severity: normal status: open title: Add macOS TCP_KEEPALIVE to available socket options type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 09:42:30 2018 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Oct 2018 13:42:30 +0000 Subject: [issue34932] Add macOS TCP_KEEPALIVE to available socket options In-Reply-To: <1539005890.42.0.545547206417.issue34932@psf.upfronthosting.co.za> Message-ID: <1539006150.97.0.545547206417.issue34932@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +9144 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 09:59:44 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 08 Oct 2018 13:59:44 +0000 Subject: [issue34931] os.path.splitext with more dots In-Reply-To: <1539000361.1.0.545547206417.issue34931@psf.upfronthosting.co.za> Message-ID: <1539007184.17.0.545547206417.issue34931@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 10:11:26 2018 From: report at bugs.python.org (Juozas Masiulis) Date: Mon, 08 Oct 2018 14:11:26 +0000 Subject: [issue34933] json.dumps serializes double quotes incorrectly Message-ID: <1539007886.12.0.545547206417.issue34933@psf.upfronthosting.co.za> New submission from Juozas Masiulis : currently python behaves like this: >>> import json >>> a={'a': '//a[@asdf="asdf"]'} >>> json.dumps(a) '{"a": "//a[@asdf=\\"asdf\\"]"}' this behaviour is incorrect. the resulting string should be '{"a": "//a[@asdf=\"asdf\"]"}' The difference is that double quotes inside double quotes are escaped twice instead of once. compare it to behaviour in javascript: > var a = {'a': '//a[@asdf="asdf"]'} undefined JSON.stringify(a) "{"a":"//a[@asdf=\"asdf\"]"}" ---------- messages: 327352 nosy: Juozas.Masiulis priority: normal severity: normal status: open title: json.dumps serializes double quotes incorrectly type: behavior versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 10:25:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Oct 2018 14:25:22 +0000 Subject: [issue34933] json.dumps serializes double quotes incorrectly In-Reply-To: <1539007886.12.0.545547206417.issue34933@psf.upfronthosting.co.za> Message-ID: <1539008722.65.0.545547206417.issue34933@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: >>> print(json.dumps(a)) {"a": "//a[@asdf=\"asdf\"]"} You seen the repr or the resulting string, not the resulting string itself. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 10:32:57 2018 From: report at bugs.python.org (Ondra Kutal) Date: Mon, 08 Oct 2018 14:32:57 +0000 Subject: [issue34934] Consider making Windows select.select interruptable using WSAEventSelect & WSAWaitForMultipleEvents Message-ID: <1539009177.63.0.545547206417.issue34934@psf.upfronthosting.co.za> New submission from Ondra Kutal : At the moment, socket select.select() function is not interruptable on Windows OS (in main thread). Following code cannot be interrupted (for example by CTRL+C): import select, socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setblocking(False) s.bind(('0.0.0.0', 6666)) s.listen(100) select.select([s], [], [], None) s.close() However this can be achieved by replacing select() calls with use of Windows native APIs WSAEventSelect and WSAWaitForMultipleEvents (see for example https://stackoverflow.com/questions/10353017). I have tried a quick prototype in selectmodule.c, replacing Py_BEGIN_ALLOW_THREADS errno = 0; n = select(max, &ifdset, &ofdset, &efdset, tvp); Py_END_ALLOW_THREADS with #ifndef MS_WINDOWS Py_BEGIN_ALLOW_THREADS errno = 0; n = select(max, &ifdset, &ofdset, &efdset, tvp); Py_END_ALLOW_THREADS #else if (!_PyOS_IsMainThread()) { Py_BEGIN_ALLOW_THREADS errno = 0; n = select(max, &ifdset, &ofdset, &efdset, tvp); Py_END_ALLOW_THREADS } else { // quick prototype, only for read sockets WSAEVENT events[50]; for (u_int i = 0; i < ifdset.fd_count; ++i) { events[i+1] = WSACreateEvent(); WSAEventSelect(ifdset.fd_array[i], events[i+1], FD_ACCEPT | FD_READ); } /* putting interrupt event as a first one in the list */ events[0] = _PyOS_SigintEvent(); ResetEvent(events[0]); Py_BEGIN_ALLOW_THREADS errno = 0; n = WSAWaitForMultipleEvents(ifdset.fd_count, events, FALSE, tvp ? (DWORD)_PyTime_AsMilliseconds(timeout, _PyTime_ROUND_CEILING) : WSA_INFINITE, FALSE); Py_END_ALLOW_THREADS if (n == 0) errno = EINTR; else if (n == WSA_WAIT_FAILED) n = SOCKET_ERROR; else n = 1; /* prototype implementation, acting like just 1 socket is ready, for actual number it will be probably necessary to query WSAWaitForMultipleEvents multiple times since it otherwise returns only index of first ready event... */ } #endif and then I was able to interrupt the script above. I noticed slight performance loss when having timeout 0, repeating select 1000 times it took ~2000 us, wile after this update it took ~3000 us. I am just throwing it here to consider as a possibility. Clearly my code above is just proof of concept, modification would be needed (include write fd, some proper fd limit, possibly check multiple times to get actual number of ready fds, etc...). ---------- components: Interpreter Core, Windows messages: 327354 nosy: Ondra Kutal, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Consider making Windows select.select interruptable using WSAEventSelect & WSAWaitForMultipleEvents type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 10:53:49 2018 From: report at bugs.python.org (ondrej.kutal) Date: Mon, 08 Oct 2018 14:53:49 +0000 Subject: [issue34934] Consider making Windows select.select interruptible using WSAEventSelect & WSAWaitForMultipleEvents In-Reply-To: <1539009177.63.0.545547206417.issue34934@psf.upfronthosting.co.za> Message-ID: <1539010429.39.0.545547206417.issue34934@psf.upfronthosting.co.za> Change by ondrej.kutal : ---------- title: Consider making Windows select.select interruptable using WSAEventSelect & WSAWaitForMultipleEvents -> Consider making Windows select.select interruptible using WSAEventSelect & WSAWaitForMultipleEvents _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 10:59:35 2018 From: report at bugs.python.org (Brian Curtin) Date: Mon, 08 Oct 2018 14:59:35 +0000 Subject: [issue13407] tarfile doesn't support multistream bzipped tar files In-Reply-To: <1321352961.33.0.0944615995053.issue13407@psf.upfronthosting.co.za> Message-ID: <1539010775.68.0.545547206417.issue13407@psf.upfronthosting.co.za> Change by Brian Curtin : ---------- assignee: docs at python -> brian.curtin resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 11:02:47 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Oct 2018 15:02:47 +0000 Subject: [issue34925] 25% speed-up to common case for bisect() In-Reply-To: <1538969584.76.0.545547206417.issue34925@psf.upfronthosting.co.za> Message-ID: <1539010967.35.0.545547206417.issue34925@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset de2e448414530689f2e60e84fd78bdfebb772898 by Raymond Hettinger in branch 'master': bpo-34925: Optimize common case for bisect() argument parsing (#9753) https://github.com/python/cpython/commit/de2e448414530689f2e60e84fd78bdfebb772898 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 11:03:07 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Oct 2018 15:03:07 +0000 Subject: [issue34925] 25% speed-up to common case for bisect() In-Reply-To: <1538969584.76.0.545547206417.issue34925@psf.upfronthosting.co.za> Message-ID: <1539010987.47.0.545547206417.issue34925@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 11:08:14 2018 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 08 Oct 2018 15:08:14 +0000 Subject: [issue34903] strptime %d handling of single digit day of month In-Reply-To: <1538724686.61.0.545547206417.issue34903@psf.upfronthosting.co.za> Message-ID: <1539011294.74.0.545547206417.issue34903@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 11:28:17 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Mon, 08 Oct 2018 15:28:17 +0000 Subject: [issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring In-Reply-To: <1520351440.06.0.467229070634.issue33014@psf.upfronthosting.co.za> Message-ID: <1539012497.86.0.545547206417.issue33014@psf.upfronthosting.co.za> Sanyam Khurana added the comment: Marking this fixed via https://github.com/python/cpython/commit/ffc5a14d00db984c8e72c7b67da8a493e17e2c14 and https://github.com/python/cpython/commit/fc8205cb4b87edd1c19e1bcc26deaa1570f87988 Thanks, everyone! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 11:38:20 2018 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Mon, 08 Oct 2018 15:38:20 +0000 Subject: [issue34935] Misleading error message in str.decode() Message-ID: <1539013100.29.0.545547206417.issue34935@psf.upfronthosting.co.za> New submission from Walter D?rwald : The following code issues a misleading exception message: >>> b'\xed\xa0\xbd\xed\xb3\x9e'.decode("utf-8") Traceback (most recent call last): File "", line 1, in UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 0: invalid continuation byte The cause for the exception is *not* an invalid continuation byte, but UTF-8 encoded surrogates. In fact using the 'surrogatepass' error handler doesn't raise an exception: >>> b'\xed\xa0\xbd\xed\xb3\x9e'.decode("utf-8", "surrogatepass") '\ud83d\udcde' I would have expected an exception message like: UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 0-2: surrogates not allowed (Note that the input bytes are an improperly UTF-8 encoded version of U+1F4DE (telephone receiver)) ---------- components: Unicode messages: 327357 nosy: doerwalter, ezio.melotti, vstinner priority: normal severity: normal status: open title: Misleading error message in str.decode() versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 11:52:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Oct 2018 15:52:44 +0000 Subject: [issue34935] Misleading error message in str.decode() In-Reply-To: <1539013100.29.0.545547206417.issue34935@psf.upfronthosting.co.za> Message-ID: <1539013964.21.0.545547206417.issue34935@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This behavior is intentional, for conformance with the Unicode Standard recommendations. See issue8271. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 11:56:55 2018 From: report at bugs.python.org (Juliette Monsel) Date: Mon, 08 Oct 2018 15:56:55 +0000 Subject: [issue34936] tkinter.Spinbox.selection_element() raises TclError Message-ID: <1539014215.23.0.545547206417.issue34936@psf.upfronthosting.co.za> New submission from Juliette Monsel : Spinbox.selection_element() raises `TclError: expected integer but got "none"` while it should return the currently selected element according to the docstring. I think this issue comes from the Spinbox.selection method which tries to convert to int the output of self.tk.call((self._w, 'selection', 'element')) while it returns a string ("none", "buttonup" or "buttondown"). ---------- components: Tkinter messages: 327359 nosy: j-4321-i priority: normal severity: normal status: open title: tkinter.Spinbox.selection_element() raises TclError type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 12:29:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Oct 2018 16:29:34 +0000 Subject: [issue34829] Add missing selection_ methods to tkinter Spinbox In-Reply-To: <1538123875.3.0.545547206417.issue34829@psf.upfronthosting.co.za> Message-ID: <1539016174.69.0.545547206417.issue34829@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset af5658ae93b0a87ab4420a7dc30a07fa5a83e252 by Serhiy Storchaka (Juliette Monsel) in branch 'master': bpo-34829: Add missing selection_ methods to the Tkinter Spinbox. (GH-9617) https://github.com/python/cpython/commit/af5658ae93b0a87ab4420a7dc30a07fa5a83e252 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 12:31:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Oct 2018 16:31:47 +0000 Subject: [issue34829] Add missing selection_ methods to tkinter Spinbox In-Reply-To: <1538123875.3.0.545547206417.issue34829@psf.upfronthosting.co.za> Message-ID: <1539016307.19.0.545547206417.issue34829@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 Oct 8 12:46:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Oct 2018 16:46:00 +0000 Subject: [issue34880] About the "assert" bytecode In-Reply-To: <1538549910.96.0.545547206417.issue34880@psf.upfronthosting.co.za> Message-ID: <1539017160.36.0.545547206417.issue34880@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This can't be changed in 3.6. There are two ways of changing it: 1. Make the marshal module supporting AssertionError as it supports booleans, None, Ellipsis and StopIteration. This will require adding the new marshal format version. 2. Add a new opcode in bytecode. The latter way is easier. Bytecode is changed in every feature release, and it was already changed in 3.8. New marshal versions are added less often. There was similar issue with StopAsyncIteration. See issue33041. ---------- nosy: +serhiy.storchaka versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 12:48:24 2018 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Mon, 08 Oct 2018 16:48:24 +0000 Subject: [issue34935] Misleading error message in str.decode() In-Reply-To: <1539013100.29.0.545547206417.issue34935@psf.upfronthosting.co.za> Message-ID: <1539017304.94.0.545547206417.issue34935@psf.upfronthosting.co.za> Walter D?rwald added the comment: OK, I see, http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf (Table 3-7 on page 93) states that the only valid 3-bytes UTF-8 sequences starting with the byte 0xED have a value for the second byte in the range 0x80 to 0x9F. 0xA0 is just beyond that range (as that would result in an encoded surrogate). Python handles all invalid sequences according to that table with the same error message. I think this issue can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 12:48:34 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Oct 2018 16:48:34 +0000 Subject: [issue34630] Don't log ssl cert errors in asyncio In-Reply-To: <1536685169.66.0.0269046726804.issue34630@psf.upfronthosting.co.za> Message-ID: <1539017314.05.0.545547206417.issue34630@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- assignee: -> asvetlov components: +asyncio nosy: +yselivanov versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 12:48:45 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Oct 2018 16:48:45 +0000 Subject: [issue34630] Don't log ssl cert errors in asyncio In-Reply-To: <1536685169.66.0.0269046726804.issue34630@psf.upfronthosting.co.za> Message-ID: <1539017325.5.0.545547206417.issue34630@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 Oct 8 12:49:17 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Oct 2018 16:49:17 +0000 Subject: [issue34383] asyncio passes SSL certificate error to loop.call_exception_handler() In-Reply-To: <1534015725.83.0.56676864532.issue34383@psf.upfronthosting.co.za> Message-ID: <1539017357.78.0.545547206417.issue34383@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Duplicate of #34630 ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 12:50:46 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Oct 2018 16:50:46 +0000 Subject: [issue34445] asyncio support in doctests In-Reply-To: <1534786239.59.0.56676864532.issue34445@psf.upfronthosting.co.za> Message-ID: <1539017446.07.0.545547206417.issue34445@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 12:54:26 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 Oct 2018 16:54:26 +0000 Subject: [issue34725] Py_GetProgramFullPath() odd behaviour in Windows In-Reply-To: <1537291607.58.0.956365154283.issue34725@psf.upfronthosting.co.za> Message-ID: <1539017666.48.0.545547206417.issue34725@psf.upfronthosting.co.za> Steve Dower added the comment: > Py_SetProgramName() should be a relative or absolute path that can be used to set sys.executable and other values appropriately. Key point here is *can be*, but it doesn't have to be. Given it has fallbacks all the way to "python"/"python3", we can't realistically use it as sys.executable just because it has a value. And right now, it's used to locate the current executable (which is unnecessary on Windows), which is then assumed to be correct for sys.executable. Most embedding cases require *this* assumption to be overridden, not the previous assumption. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 13:17:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Oct 2018 17:17:59 +0000 Subject: [issue34936] tkinter.Spinbox.selection_element() raises TclError In-Reply-To: <1539014215.23.0.545547206417.issue34936@psf.upfronthosting.co.za> Message-ID: <1539019079.8.0.545547206417.issue34936@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka stage: -> needs patch versions: +Python 2.7, Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 13:19:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Oct 2018 17:19:32 +0000 Subject: [issue34936] tkinter.Spinbox.selection_element() raises TclError In-Reply-To: <1539014215.23.0.545547206417.issue34936@psf.upfronthosting.co.za> Message-ID: <1539019172.58.0.545547206417.issue34936@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Do you mind to create a PR against master for fixing this issue Juliette? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 13:39:51 2018 From: report at bugs.python.org (JP Sugarbroad) Date: Mon, 08 Oct 2018 17:39:51 +0000 Subject: [issue15994] memoryview to freed memory can cause segfault In-Reply-To: <1348173441.91.0.841080415833.issue15994@psf.upfronthosting.co.za> Message-ID: <1539020391.24.0.545547206417.issue15994@psf.upfronthosting.co.za> Change by JP Sugarbroad : ---------- nosy: +taralx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 13:59:54 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 08 Oct 2018 17:59:54 +0000 Subject: [issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files In-Reply-To: <1389140120.63.0.492860390436.issue20179@psf.upfronthosting.co.za> Message-ID: <1539021594.6.0.545547206417.issue20179@psf.upfronthosting.co.za> Tal Einat added the comment: Can someone clarify whether Modules/overlapped.c should be converted to use AC? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 14:49:37 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Oct 2018 18:49:37 +0000 Subject: [issue34911] Allow Cookies for Secure WebSockets In-Reply-To: <1538782728.4.0.545547206417.issue34911@psf.upfronthosting.co.za> Message-ID: <1539024577.43.0.545547206417.issue34911@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset 4c339970570d07916bee6ade51f4e9781d51627a by Andrew Svetlov (Paul Bailey) in branch 'master': bpo-34911: Added support for secure websocket cookies (GH-9734) https://github.com/python/cpython/commit/4c339970570d07916bee6ade51f4e9781d51627a ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 14:50:04 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Oct 2018 18:50:04 +0000 Subject: [issue34911] Allow Cookies for Secure WebSockets In-Reply-To: <1538782728.4.0.545547206417.issue34911@psf.upfronthosting.co.za> Message-ID: <1539024604.21.0.545547206417.issue34911@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 14:50:21 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 08 Oct 2018 18:50:21 +0000 Subject: [issue34921] NoReturn not allowed by get_type_hints when future import annotations is used In-Reply-To: <1538912765.08.0.545547206417.issue34921@psf.upfronthosting.co.za> Message-ID: <1539024621.53.0.545547206417.issue34921@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: New changeset 5eea0ad50c32d38909ff4e29309e2cc3c6ccb2c0 by Ivan Levkivskyi (Noah Wood) in branch 'master': bpo-34921: Allow escaped NoReturn in get_type_hints (GH-9750) https://github.com/python/cpython/commit/5eea0ad50c32d38909ff4e29309e2cc3c6ccb2c0 ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 15:04:38 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 08 Oct 2018 19:04:38 +0000 Subject: [issue34921] NoReturn not allowed by get_type_hints when future import annotations is used In-Reply-To: <1538912765.08.0.545547206417.issue34921@psf.upfronthosting.co.za> Message-ID: <1539025478.62.0.545547206417.issue34921@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 Mon Oct 8 15:32:19 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Oct 2018 19:32:19 +0000 Subject: [issue34937] Extract asyncio tests for sock_*() methods into a separate test file Message-ID: <1539027139.89.0.545547206417.issue34937@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- components: Tests, asyncio nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Extract asyncio tests for sock_*() methods into a separate test file versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 15:32:56 2018 From: report at bugs.python.org (Juliette Monsel) Date: Mon, 08 Oct 2018 19:32:56 +0000 Subject: [issue34936] tkinter.Spinbox.selection_element() raises TclError In-Reply-To: <1539014215.23.0.545547206417.issue34936@psf.upfronthosting.co.za> Message-ID: <1539027176.29.0.545547206417.issue34936@psf.upfronthosting.co.za> Change by Juliette Monsel : ---------- keywords: +patch pull_requests: +9146 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 15:33:06 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Oct 2018 19:33:06 +0000 Subject: [issue34937] Extract asyncio tests for sock_*() methods into a separate test file Message-ID: <1539027186.44.0.545547206417.issue34937@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +9147 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 16:05:00 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Oct 2018 20:05:00 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1539029100.38.0.545547206417.issue31715@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset 0854b92cd25613269d21de3cb5239379ddc0f2fb by Andrew Svetlov (Bradley Meck) in branch 'master': bpo-31715 Add mimetype for extension .mjs (#3908) https://github.com/python/cpython/commit/0854b92cd25613269d21de3cb5239379ddc0f2fb ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 16:05:22 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Oct 2018 20:05:22 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1539029122.67.0.545547206417.issue31715@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 16:06:41 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Oct 2018 20:06:41 +0000 Subject: [issue34937] Extract asyncio tests for sock_*() methods into a separate test file Message-ID: <1539029201.32.0.545547206417.issue34937@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 Oct 8 16:18:31 2018 From: report at bugs.python.org (Juliette Monsel) Date: Mon, 08 Oct 2018 20:18:31 +0000 Subject: [issue23831] tkinter canvas lacks of moveto method. In-Reply-To: <1427832932.11.0.38662420535.issue23831@psf.upfronthosting.co.za> Message-ID: <1539029911.36.0.545547206417.issue23831@psf.upfronthosting.co.za> Change by Juliette Monsel : ---------- nosy: +j-4321-i _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 16:19:22 2018 From: report at bugs.python.org (Mario) Date: Mon, 08 Oct 2018 20:19:22 +0000 Subject: [issue34725] Py_GetProgramFullPath() odd behaviour in Windows In-Reply-To: <1539017666.48.0.545547206417.issue34725@psf.upfronthosting.co.za> Message-ID: <911419f5-6f0e-7f76-1cf8-00ed3640d5c4@gmail.com> Mario added the comment: On 08/10/2018 17:54, Steve Dower wrote: > > Steve Dower added the comment: > >> Py_SetProgramName() should be a relative or absolute path that can be used to set sys.executable and other values appropriately. > > Key point here is *can be*, but it doesn't have to be. Given it has fallbacks all the way to "python"/"python3", we can't realistically use it as sys.executable just because it has a value. > > And right now, it's used to locate the current executable (which is unnecessary on Windows), which is then assumed to be correct for sys.executable. Most embedding cases require *this* assumption to be overridden, not the previous assumption. I still would like my use case to be acknowledged. site.py uses the value of sys.executable to set up a virtual environment, which is a very valuable thing even in an embedded cases. This constraint is strong enough to force it to point to python.exe or python3 as it would normally do in a scripted (non embedded case). I still believe the 2 concepts should be decoupled to avoid them clashing and having supporters of one disagreeing with supporters of the other. Andrea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 17:21:04 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 Oct 2018 21:21:04 +0000 Subject: [issue32174] nonASCII punctuation characters can not display in python363.chm. In-Reply-To: <1512013530.29.0.213398074469.issue32174@psf.upfronthosting.co.za> Message-ID: <1539033664.25.0.545547206417.issue32174@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 6261ae9b01fb8429b779169f8de37ff567c144e8 by Steve Dower (animalize) in branch 'master': bpo-32174: Let .chm document display non-ASCII characters properly (GH-9758) https://github.com/python/cpython/commit/6261ae9b01fb8429b779169f8de37ff567c144e8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 17:21:19 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Oct 2018 21:21:19 +0000 Subject: [issue32174] nonASCII punctuation characters can not display in python363.chm. In-Reply-To: <1512013530.29.0.213398074469.issue32174@psf.upfronthosting.co.za> Message-ID: <1539033679.47.0.545547206417.issue32174@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9148 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 17:21:26 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Oct 2018 21:21:26 +0000 Subject: [issue32174] nonASCII punctuation characters can not display in python363.chm. In-Reply-To: <1512013530.29.0.213398074469.issue32174@psf.upfronthosting.co.za> Message-ID: <1539033686.1.0.545547206417.issue32174@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9149 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 17:21:26 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 Oct 2018 21:21:26 +0000 Subject: [issue32174] nonASCII punctuation characters can not display in python363.chm. In-Reply-To: <1512013530.29.0.213398074469.issue32174@psf.upfronthosting.co.za> Message-ID: <1539033686.7.0.545547206417.issue32174@psf.upfronthosting.co.za> Steve Dower added the comment: Thanks, that looks perfect! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 17:26:49 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Oct 2018 21:26:49 +0000 Subject: [issue32174] nonASCII punctuation characters can not display in python363.chm. In-Reply-To: <1512013530.29.0.213398074469.issue32174@psf.upfronthosting.co.za> Message-ID: <1539034009.72.0.545547206417.issue32174@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 64bcedce8d61e1daa9ff7980cc07988574049b1f by Miss Islington (bot) in branch '3.6': bpo-32174: Let .chm document display non-ASCII characters properly (GH-9758) https://github.com/python/cpython/commit/64bcedce8d61e1daa9ff7980cc07988574049b1f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 17:26:58 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Oct 2018 21:26:58 +0000 Subject: [issue32174] nonASCII punctuation characters can not display in python363.chm. In-Reply-To: <1512013530.29.0.213398074469.issue32174@psf.upfronthosting.co.za> Message-ID: <1539034018.68.0.545547206417.issue32174@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c4c86fad8024dc91af8d785c33187c092b4e49d9 by Miss Islington (bot) in branch '3.7': bpo-32174: Let .chm document display non-ASCII characters properly (GH-9758) https://github.com/python/cpython/commit/c4c86fad8024dc91af8d785c33187c092b4e49d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 18:13:09 2018 From: report at bugs.python.org (YoSTEALTH) Date: Mon, 08 Oct 2018 22:13:09 +0000 Subject: [issue34938] Fix mimetype.init() to account for from import Message-ID: <1539036789.21.0.545547206417.issue34938@psf.upfronthosting.co.za> New submission from YoSTEALTH : When a user uses from import, there is a flaw in how mimetype.init() updates its global references. # Option-1 (flawed) # ----------------- from mimetypes import init, types_map print(types_map.get('.gz')) # None init() # <- initialize print(types_map.get('.gz')) # None # Option-2 # -------- import mimetypes print(mimetypes.types_map.get('.gz')) # None mimetypes.init() # <- initialize print(mimetypes.types_map.get('.gz')) # application/gzip As you can see in https://github.com/python/cpython/blob/master/Lib/mimetypes.py#L344 line:358 global reference is reassigned and thus it prevents `from mimetype import types_map` from being updated and using old `types_map` reference. Potential solution would be to `types_map.update(new dict content)` vs reassigning the variable. ---------- messages: 327375 nosy: YoSTEALTH priority: normal severity: normal status: open title: Fix mimetype.init() to account for from import type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 18:18:18 2018 From: report at bugs.python.org (Danish Prakash) Date: Mon, 08 Oct 2018 22:18:18 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1539037098.25.0.545547206417.issue12345@psf.upfronthosting.co.za> Change by Danish Prakash : ---------- pull_requests: +9150 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 18:33:56 2018 From: report at bugs.python.org (YoSTEALTH) Date: Mon, 08 Oct 2018 22:33:56 +0000 Subject: [issue34926] Adding "mime_type" method to pathlib.Path In-Reply-To: <1538978844.01.0.545547206417.issue34926@psf.upfronthosting.co.za> Message-ID: <1539038036.85.0.545547206417.issue34926@psf.upfronthosting.co.za> Change by YoSTEALTH : ---------- components: -Extension Modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 19:18:03 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 Oct 2018 23:18:03 +0000 Subject: [issue32174] nonASCII punctuation characters can not display in python363.chm. In-Reply-To: <1512013530.29.0.213398074469.issue32174@psf.upfronthosting.co.za> Message-ID: <1539040683.62.0.545547206417.issue32174@psf.upfronthosting.co.za> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 19:34:18 2018 From: report at bugs.python.org (Jack) Date: Mon, 08 Oct 2018 23:34:18 +0000 Subject: [issue9694] argparse required arguments displayed under "optional arguments" In-Reply-To: <1282846759.11.0.900867962743.issue9694@psf.upfronthosting.co.za> Message-ID: <1539041658.08.0.545547206417.issue9694@psf.upfronthosting.co.za> Jack added the comment: I'd like to note that this also happens with a required mutually exclusive group: group = parser.add_mutually_exclusive_group(required=True) The arguments in the group are listed under ?optional arguments:?. I'm guessing the mechanism is the same. ---------- nosy: +Jacktose _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 21:03:03 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 Oct 2018 01:03:03 +0000 Subject: [issue34926] Adding "mime_type" method to pathlib.Path In-Reply-To: <1538978844.01.0.545547206417.issue34926@psf.upfronthosting.co.za> Message-ID: <1539046983.2.0.545547206417.issue34926@psf.upfronthosting.co.za> Raymond Hettinger added the comment: -0 There is some value in having a separation of responsibilities and in not adding another dependency. On the other hand, I can see how this would sometimes be convenient. Assigning to Antoine to make the decision. ---------- assignee: -> pitrou nosy: +pitrou, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 21:58:38 2018 From: report at bugs.python.org (Rohan Padhye) Date: Tue, 09 Oct 2018 01:58:38 +0000 Subject: [issue34939] Possibly spurious SyntaxError: annotated name can't be global Message-ID: <1539050318.57.0.545547206417.issue34939@psf.upfronthosting.co.za> New submission from Rohan Padhye : The following code when run as a script file gives syntax error: ``` def set_x(): global x x = 1 x:int = 0 # SyntaxError: annotated name 'x' can't be global ``` PEP 526 does not seem to forbid this. The error message "annotated name [...] can't be global" is usually seen when using the `global x` declaration *in the same scope* as an annotated assignment. In the above case, the annotated assignment is outside the function scope, yet Python 3.7 gives a syntax error. Is this a bug in CPython? Or should the PEP 526 document say something about forward references? Interestingly, if the above program is run in interactive mode, there is no syntax error. In interactive mode: ``` >>> def set_x(): ... global x ... x = 1 ... >>> x:int = 0 >>> set_x() >>> print(x) 1 ``` Further, forward references work fine with `nonlocal`. For example, the following works fine both as a script file and in interactive mode: ``` def outer(): def inner(): nonlocal y y = 1 y:int = 0 ``` I don't see why a forward reference in `global` is a problem. ---------- components: Interpreter Core messages: 327378 nosy: rohanpadhye priority: normal severity: normal status: open title: Possibly spurious SyntaxError: annotated name can't be global type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 22:15:59 2018 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 09 Oct 2018 02:15:59 +0000 Subject: [issue34899] Possible assertion failure due to int_from_bytes_impl() In-Reply-To: <1538691047.46.0.545547206417.issue34899@psf.upfronthosting.co.za> Message-ID: <1539051359.51.0.545547206417.issue34899@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 Mon Oct 8 22:23:39 2018 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 09 Oct 2018 02:23:39 +0000 Subject: [issue34940] Possible assertion failure due to _check_for_legacy_statements() Message-ID: <1539051819.92.0.545547206417.issue34940@psf.upfronthosting.co.za> New submission from Zackery Spytz : The PyUnicode_Tailmatch() and PyUnicode_FromString() calls in _check_for_legacy_statements() are not properly checked for failure. ---------- components: Interpreter Core messages: 327379 nosy: ZackerySpytz priority: normal severity: normal status: open title: Possible assertion failure due to _check_for_legacy_statements() type: crash versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 8 22:25:27 2018 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 09 Oct 2018 02:25:27 +0000 Subject: [issue34940] Possible assertion failure due to _check_for_legacy_statements() In-Reply-To: <1539051819.92.0.545547206417.issue34940@psf.upfronthosting.co.za> Message-ID: <1539051927.37.0.545547206417.issue34940@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +9151 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 00:31:45 2018 From: report at bugs.python.org (Tim Peters) Date: Tue, 09 Oct 2018 04:31:45 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1539059505.34.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: We need to worry about timing too :-( I'm using this as a test. It's very heavy on using 3-tuples of little ints as dict keys. Getting hash codes for ints is relatively cheap, and there's not much else going on, so this is intended to be very sensitive to changes in the speed of tuple hashing: def doit(): from time import perf_counter as now from itertools import product s = now() d = dict.fromkeys(product(range(150), repeat=3), 0) for k in d: d[k] += 1 for k in d: d[k] *= 2 f = now() return f - s I run that five times in a loop on a mostly quiet box, and pick the smallest time as "the result". Compared to current master, a 64-bit release build under Visual Studio takes 20.7% longer. Ouch! That's a real hit. Fiddling the code a bit (see the PR) to convince Visual Studio to emit a rotate instruction instead of some shifts and an add reduces that to 19.3% longer. A little better. The variant I discussed last time (add in the length at the start, and get rid of all the post-loop avalanche code) reduces it to 8.88% longer. The avalanche code is fixed overhead independent of tuple length, so losing it is more valuable (for relative speed) the shorter the tuple. I can't speed it more. These high-quality hashes have unforgiving long critical paths, and every operation appears crucial to their good results in _some_ test we already have. But "long" is relative to our current tuple hash, which does relatively little to scramble bits, and never "propagates right" at all. In its loop, it does one multiply nothing waits on, and increments the multplier for the next iteration while the multiply is going on. Note: "the real" xxHash runs 4 independent streams, but it only has to read 8 bytes to get the next value to fold in. That can go on - in a single thread - while other streams are doing arithmetic (ILP). We pretty much have to "stop the world" to call PyObject_Hash() instead. We could call that 4 times in a row and _then_ start arithmetic. But most tuples that get hashed are probably less than 4 long, and the code to mix stream results together at the end is another bottleneck. My first stab at trying to split it into 2 streams ran substantially slower on realistic-length (i.e., small) tuples - so that was also my last stab ;-) I can live with the variant. When I realized we never "propagate right" now, I agreed with Jeroen that the tuple hash is fundamentally "broken", despite that people hadn't reported it as such yet, and despite that that flaw had approximately nothing to do with the issue this bug report was opened about. Switching to "a real" hash will avoid a universe of bad cases, and xxHash appears to be as cheap as a hash without glaringly obvious weaknesses gets: two multiplies, an add, and a rotate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 00:44:05 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 09 Oct 2018 04:44:05 +0000 Subject: [issue34758] http.server module sets incorrect mimetype for WebAssembly files In-Reply-To: <1537488564.12.0.956365154283.issue34758@psf.upfronthosting.co.za> Message-ID: <1539060245.59.0.545547206417.issue34758@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset 199a280af540e3194405eb250ca1a8d487f6a4f7 by Andrew Svetlov (travisoneill) in branch 'master': bpo-34758: add .wasm to recognized file extensions in mimetypes module (GH-9464) https://github.com/python/cpython/commit/199a280af540e3194405eb250ca1a8d487f6a4f7 ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 00:44:47 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 09 Oct 2018 04:44:47 +0000 Subject: [issue34758] http.server module sets incorrect mimetype for WebAssembly files In-Reply-To: <1537488564.12.0.956365154283.issue34758@psf.upfronthosting.co.za> Message-ID: <1539060287.26.0.545547206417.issue34758@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 00:53:24 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 09 Oct 2018 04:53:24 +0000 Subject: [issue34929] Extract asyncio sendfile tests into a separate test file Message-ID: <1539060804.5.0.545547206417.issue34929@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 Oct 9 01:22:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Oct 2018 05:22:39 +0000 Subject: [issue34939] Possibly spurious SyntaxError: annotated name can't be global In-Reply-To: <1539050318.57.0.545547206417.issue34939@psf.upfronthosting.co.za> Message-ID: <1539062559.12.0.545547206417.issue34939@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +gvanrossum, levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 01:33:56 2018 From: report at bugs.python.org (wim glenn) Date: Tue, 09 Oct 2018 05:33:56 +0000 Subject: [issue29636] Specifying indent in the json.tool command In-Reply-To: <1487880356.98.0.87296874253.issue29636@psf.upfronthosting.co.za> Message-ID: <1539063236.06.0.545547206417.issue29636@psf.upfronthosting.co.za> Change by wim glenn : ---------- keywords: +patch pull_requests: +9152 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 02:10:59 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 09 Oct 2018 06:10:59 +0000 Subject: [issue34926] Adding "mime_type" method to pathlib.Path In-Reply-To: <1538978844.01.0.545547206417.issue34926@psf.upfronthosting.co.za> Message-ID: <1539065459.63.0.545547206417.issue34926@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. There was a similar request to add pathlib.rmtree (issue33498) and adding more methods as Raymond mentioned might be convenient but there is a maintenance cost (msg316517) since there is a consensus that pathlib should do everything os.path does. It's up to Antoine to decide on this. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 02:13:01 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 09 Oct 2018 06:13:01 +0000 Subject: [issue34938] Fix mimetype.init() to account for from import In-Reply-To: <1539036789.21.0.545547206417.issue34938@psf.upfronthosting.co.za> Message-ID: <1539065581.95.0.545547206417.issue34938@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 03:51:29 2018 From: report at bugs.python.org (ondrej.kutal) Date: Tue, 09 Oct 2018 07:51:29 +0000 Subject: [issue34934] Consider making Windows select.select interruptible using WSAEventSelect & WSAWaitForMultipleEvents In-Reply-To: <1539009177.63.0.545547206417.issue34934@psf.upfronthosting.co.za> Message-ID: <1539071489.69.0.545547206417.issue34934@psf.upfronthosting.co.za> Change by ondrej.kutal : ---------- components: +Extension Modules -Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 04:08:41 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Oct 2018 08:08:41 +0000 Subject: [issue34926] Adding "mime_type" method to pathlib.Path In-Reply-To: <1538978844.01.0.545547206417.issue34926@psf.upfronthosting.co.za> Message-ID: <1539072521.65.0.545547206417.issue34926@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I would rather have the mimetypes module improved to accept Path-like objects, so that the following works: >>> p = Path('LICENSE.txt') >>> mimetypes.guess_type(p) ('text/plain', None) It should be quite simple to implement as well. ---------- components: +Library (Lib) keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 04:09:02 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Oct 2018 08:09:02 +0000 Subject: [issue34926] Allow querying a Path's mime-type In-Reply-To: <1538978844.01.0.545547206417.issue34926@psf.upfronthosting.co.za> Message-ID: <1539072542.64.0.545547206417.issue34926@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- title: Adding "mime_type" method to pathlib.Path -> Allow querying a Path's mime-type _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 04:26:31 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 09 Oct 2018 08:26:31 +0000 Subject: [issue34939] Possibly spurious SyntaxError: annotated name can't be global In-Reply-To: <1539050318.57.0.545547206417.issue34939@psf.upfronthosting.co.za> Message-ID: <1539073591.14.0.545547206417.issue34939@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: The error message was added with 6cff8744a0ae58c88728df8bbca4580ffa6c6a86 and issue27999. The docs were also changed as below with the commit : https://docs.python.org/3.8/reference/simple_stmts.html#the-global-statement > Names listed in a global statement must not be defined as formal parameters or in a for loop control target, class definition, function definition, import statement, or variable annotation. Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 04:57:06 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 09 Oct 2018 08:57:06 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1539075426.37.0.545547206417.issue30064@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- assignee: -> asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 04:57:24 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 09 Oct 2018 08:57:24 +0000 Subject: [issue34795] loop.sock_recv failure because of delayed callback handling In-Reply-To: <1537825222.42.0.545547206417.issue34795@psf.upfronthosting.co.za> Message-ID: <1539075444.32.0.545547206417.issue34795@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- assignee: -> asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 05:32:15 2018 From: report at bugs.python.org (Jack Jansen) Date: Tue, 09 Oct 2018 09:32:15 +0000 Subject: [issue34941] xml.etree.ElementTree findall() fails when using custom TreeBuilder Message-ID: <1539077535.05.0.545547206417.issue34941@psf.upfronthosting.co.za> New submission from Jack Jansen : When using a TreeBuilder with a custom factory (returning a subclass of Element with some extra functionality) there is an issue with findall(). XPaths using an indexed predicate no longer work: the findall() result is always empty. The attached test script shows the problem. I have analysed this as far as finding that the issue is in ElementPath.prepare_predicate..select(), the last one. Specifically, the statement elems = list(parent.findall(elem.tag)) always returns an empty list (if the Element class is subclassed). When using Python 2.7 everything works fine. When adding a findall() method to the Element subclass that simply calls Element.findall() everything also works fine. I suspect some issue with the _elementtree C implementation but I don't understand it. ---------- components: Library (Lib) files: testetns.py messages: 327385 nosy: jackjansen priority: normal severity: normal stage: needs patch status: open title: xml.etree.ElementTree findall() fails when using custom TreeBuilder type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file47859/testetns.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 05:36:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Oct 2018 09:36: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: <1539077811.45.0.545547206417.issue23867@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 05:38:05 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 09 Oct 2018 09:38:05 +0000 Subject: [issue34939] Possibly spurious SyntaxError: annotated name can't be global In-Reply-To: <1539050318.57.0.545547206417.issue34939@psf.upfronthosting.co.za> Message-ID: <1539077885.55.0.545547206417.issue34939@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Hm, I think this should be allowed. The formulation in the docs is not very clear, but the wording in the PEP clarifies the intention. Indeed, only annotations at the same scope with global declarations should be prohibited. So I think this is a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 05:40:41 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 09 Oct 2018 09:40:41 +0000 Subject: [issue34916] include sqlite-3.25+ (with window functions) In-Reply-To: <1538846966.09.0.545547206417.issue34916@psf.upfronthosting.co.za> Message-ID: <1539078041.13.0.545547206417.issue34916@psf.upfronthosting.co.za> Ronald Oussoren added the comment: To completely do this requires two things: 1) Upgrade SQLite included in a number of binary distributions 2) Update the sqlite extension to allow creating custom window functions in Python The latter is definitely something that cannot be done in a maintenance release. The former is up to the release managers. ---------- nosy: +ghaering, ronaldoussoren type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 05:58:34 2018 From: report at bugs.python.org (Jack Jansen) Date: Tue, 09 Oct 2018 09:58:34 +0000 Subject: [issue34941] xml.etree.ElementTree findall() fails when using custom TreeBuilder In-Reply-To: <1539077535.05.0.545547206417.issue34941@psf.upfronthosting.co.za> Message-ID: <1539079114.74.0.545547206417.issue34941@psf.upfronthosting.co.za> Jack Jansen added the comment: Correction to the last line: When using Python 2.7 everything works fine. When adding a findall() method to the Element subclass that simply calls ElementPath.findall() everything also works fine. I suspect some issue with the _elementtree C implementation but I don't understand it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 06:05:20 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 09 Oct 2018 10:05:20 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1539079520.72.0.545547206417.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: I pushed a documentation-only patch on PR 9540 to better document status quo. Can somebody please review either PR 6653 or PR 9540? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 06:06:51 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 09 Oct 2018 10:06:51 +0000 Subject: [issue34942] Add an FAQ note about floating point representation Message-ID: <1539079611.42.0.545547206417.issue34942@psf.upfronthosting.co.za> New submission from Karthikeyan Singaravelan : There have been tickets raised due to floating point representation being misleading where "0.1 + 0.2" returns 0.30000000000000004 and "0.1 + 0.3" returns 0.4. This is explained at [0] but I think it's worth to add this as a question to FAQ and link to the tutorial and possibly to some external links like [1] and [2] so that the user can understand the limitation instead of assuming it's a bug in CPython. Searching for "floatingpoint.html" gives 64 issues [4] were the documentation was linked out of which 3 were reported in the past one month. If there is also any other page where this can be linked to get better visibility then this could avoid a lot of confusion especially for beginners where "0.1 + 0.3" silently seems to work fine but "0.1 + 0.2" has a misleading representation along with variations in other floating point arithmetic operations making the user think it's a CPython bug. Adding Raymond to see if it's worth adding it in FAQ or any other place and also that he might have more feedback on teaching users and wording this in a better way. [0] https://docs.python.org/3/tutorial/floatingpoint.html [1] https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html [2] https://0.30000000000000004.com/ [4] https://bugs.python.org/issue?%40columns=id%2Cactivity%2Ctitle%2Ccreator%2Cassignee%2Cstatus%2Ctype&%40sort=-activity&%40filter=status&%40action=searchid&ignore=file%3Acontent&%40search_text=floatingpoint.html&submit=search&status=-1%2C1%2C2%2C3 ---------- assignee: docs at python components: Documentation messages: 327390 nosy: docs at python, rhettinger, xtreak priority: normal severity: normal status: open title: Add an FAQ note about floating point representation versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 06:23:36 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 09 Oct 2018 10:23:36 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1539080616.36.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > Changes initialization to add in the length: What's the rationale for that change? You always asked me to stay as close as possible to the "official" hash function which adds in the length at the end. Is there an actual benefit from doing it in the beginning? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 06:32:11 2018 From: report at bugs.python.org (Martin Panter) Date: Tue, 09 Oct 2018 10:32:11 +0000 Subject: [issue34942] Add an FAQ note about floating point representation In-Reply-To: <1539079611.42.0.545547206417.issue34942@psf.upfronthosting.co.za> Message-ID: <1539081131.04.0.545547206417.issue34942@psf.upfronthosting.co.za> Martin Panter added the comment: Have you seen ? It already links to the tutorial. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 06:33:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Oct 2018 10:33:16 +0000 Subject: [issue34941] xml.etree.ElementTree findall() fails when using custom TreeBuilder In-Reply-To: <1539077535.05.0.545547206417.issue34941@psf.upfronthosting.co.za> Message-ID: <1539081196.89.0.545547206417.issue34941@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka components: +XML nosy: +eli.bendersky, scoder, serhiy.storchaka versions: +Python 2.7, Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 06:37:58 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 09 Oct 2018 10:37:58 +0000 Subject: [issue34942] Add an FAQ note about floating point representation In-Reply-To: <1539079611.42.0.545547206417.issue34942@psf.upfronthosting.co.za> Message-ID: <1539081478.95.0.545547206417.issue34942@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks Martin, I was searching in the general and programming FAQ for this and did a general search with the link and nothing showed up in the bug tracker or search engine in FAQ. My bad, I will close this. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 07:13:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Oct 2018 11:13:59 +0000 Subject: [issue34942] Add an FAQ note about floating point representation In-Reply-To: <1539079611.42.0.545547206417.issue34942@psf.upfronthosting.co.za> Message-ID: <1539083639.85.0.545547206417.issue34942@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: fixed -> out of date _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 07:38:53 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 09 Oct 2018 11:38:53 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1539085133.57.0.545547206417.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: I pushed an update at PR 9471. I think I took into account all your comments, except for moving the length addition from the end to the begin of the function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 07:46:03 2018 From: report at bugs.python.org (Gus Goulart) Date: Tue, 09 Oct 2018 11:46:03 +0000 Subject: [issue34187] Issues with lazy fd support in _WindowsConsoleIO fileno() and close() In-Reply-To: <1532250349.34.0.56676864532.issue34187@psf.upfronthosting.co.za> Message-ID: <1539085563.94.0.545547206417.issue34187@psf.upfronthosting.co.za> Gus Goulart added the comment: Hi everyone, I would like to let you know that I'm starting working on this one. Thanks! ---------- nosy: +Gus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 07:46:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Oct 2018 11:46:26 +0000 Subject: [issue34941] xml.etree.ElementTree findall() fails when using custom TreeBuilder In-Reply-To: <1539077535.05.0.545547206417.issue34941@psf.upfronthosting.co.za> Message-ID: <1539085586.8.0.545547206417.issue34941@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +9153 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 08:28:53 2018 From: report at bugs.python.org (ajneu) Date: Tue, 09 Oct 2018 12:28:53 +0000 Subject: [issue34943] sched cancel (wrong item removed from queue) Message-ID: <1539088133.47.0.545547206417.issue34943@psf.upfronthosting.co.za> New submission from ajneu : Hi, in the code given below, the last assert fails when running with /mingw64/bin/python3 (Python 3.7.0 -- mingw64's python3 from msys2 project) C:\Python36\python.exe (Python 3.6.6 -- windows installer) It does not fail when running with /usr/bin/python3 (Python 3.6.6 -- msys's python3 from msys2 project) import sched, time, threading class A(threading.Thread): def __init__(self, sched): threading.Thread.__init__(self) self._sched = sched self.start() def run(self): self._sched.run() s = sched.scheduler(time.monotonic, time.sleep) ev1=None def go1(a=''): print(a) global ev1 ev1 = s.enterabs(time.monotonic()+1, 1, go1, argument=('a',)) ev2=None def go2(a=''): print(a) global ev2 ev2 = s.enterabs(time.monotonic()+1, 1, go2, argument=('b',)) ev1 = s.enterabs(time.monotonic()+1, 1, go1, argument=('a',)) ev2 = s.enterabs(time.monotonic()+1, 1, go2, argument=('b',)) a = A(s) time.sleep(2.5) print('schedu queue before', s.queue) assert 1 == 1 print('remove', ev2) assert ev2 in s.queue s.cancel(ev2) print('schedu queue after', s.queue) assert ev2 not in s.queue # fails (SOMETIMES) # what is going on here??? # does the last assert also fail from anybody else? ---------- components: Library (Lib) messages: 327396 nosy: ajneu priority: normal severity: normal status: open title: sched cancel (wrong item removed from queue) type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 08:36:56 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 09 Oct 2018 12:36:56 +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: <1539088616.18.0.545547206417.issue23867@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 08:46:29 2018 From: report at bugs.python.org (ajneu) Date: Tue, 09 Oct 2018 12:46:29 +0000 Subject: [issue34943] sched cancel (wrong item removed from queue) In-Reply-To: <1539088133.47.0.545547206417.issue34943@psf.upfronthosting.co.za> Message-ID: <1539089189.9.0.545547206417.issue34943@psf.upfronthosting.co.za> ajneu added the comment: Ah ... https://bugs.python.org/issue19270 amazing! assert ev1 == ev2 does not fail! (the equality just checks timestamp as far as I can see) Terrible. In particular: Terrible if the documentation blatently lies to me: https://docs.python.org/3/library/sched.html#sched.scheduler.cancel ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:05:46 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 09 Oct 2018 13:05: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: <1539090346.57.0.545547206417.issue21880@psf.upfronthosting.co.za> Tal Einat added the comment: I'll get this up on a git branch so that we can continue hacking on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:10:35 2018 From: report at bugs.python.org (Juliette Monsel) Date: Tue, 09 Oct 2018 13:10:35 +0000 Subject: [issue23831] tkinter canvas lacks of moveto method. In-Reply-To: <1427832932.11.0.38662420535.issue23831@psf.upfronthosting.co.za> Message-ID: <1539090635.13.0.545547206417.issue23831@psf.upfronthosting.co.za> Juliette Monsel added the comment: I am willing to create a pull request with the code provided in msg239745 , to add tests and a what's new entry. However I am not sure about how to acknowledge the contribution of msg239745's author. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:12:01 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 09 Oct 2018 13:12:01 +0000 Subject: [issue25592] distutils docs: data_files always uses sys.prefix In-Reply-To: <1447135572.7.0.138478279434.issue25592@psf.upfronthosting.co.za> Message-ID: <1539090721.61.0.545547206417.issue25592@psf.upfronthosting.co.za> Change by Jeroen Demeyer : ---------- pull_requests: +9154 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:15:34 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 09 Oct 2018 13:15:34 +0000 Subject: [issue25592] distutils docs: data_files always uses sys.prefix In-Reply-To: <1447135572.7.0.138478279434.issue25592@psf.upfronthosting.co.za> Message-ID: <1539090934.72.0.545547206417.issue25592@psf.upfronthosting.co.za> Change by Jeroen Demeyer : Removed file: https://bugs.python.org/file40993/data_files_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:28:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Oct 2018 13:28:24 +0000 Subject: [issue23831] tkinter canvas lacks of moveto method. In-Reply-To: <1427832932.11.0.38662420535.issue23831@psf.upfronthosting.co.za> Message-ID: <1539091704.19.0.545547206417.issue23831@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think you can be attributed as the only author. A PR should contain more than just changes in tkinter/__init__.py (tests, documentation changes). And the code can be different than proposed in msg239745. Since this command doesn't return anything meaningful, I suggest to remove "return" and the last sentence in the docstring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:28:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Oct 2018 13:28:45 +0000 Subject: [issue23831] tkinter canvas lacks of moveto method. In-Reply-To: <1427832932.11.0.38662420535.issue23831@psf.upfronthosting.co.za> Message-ID: <1539091725.13.0.545547206417.issue23831@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- stage: test needed -> needs patch versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:53:19 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 09 Oct 2018 13:53:19 +0000 Subject: [issue33261] inspect.isgeneratorfunction fails on hand-created methods In-Reply-To: <1523437193.82.0.682650639539.issue33261@psf.upfronthosting.co.za> Message-ID: <1539093199.98.0.545547206417.issue33261@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: Can somebody please review PR 6448? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:55:53 2018 From: report at bugs.python.org (Juliette Monsel) Date: Tue, 09 Oct 2018 13:55:53 +0000 Subject: [issue23831] tkinter canvas lacks of moveto method. In-Reply-To: <1427832932.11.0.38662420535.issue23831@psf.upfronthosting.co.za> Message-ID: <1539093353.51.0.545547206417.issue23831@psf.upfronthosting.co.za> Change by Juliette Monsel : ---------- keywords: +patch pull_requests: +9155 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 09:55:54 2018 From: report at bugs.python.org (Joe Pamer) Date: Tue, 09 Oct 2018 13:55:54 +0000 Subject: [issue34944] Update _dirnameW to accept long path names Message-ID: <1539093354.15.0.545547206417.issue34944@psf.upfronthosting.co.za> New submission from Joe Pamer : The fix for issue 32557 updated os__getdiskusage_impl to use _dirnameW for obtaining the parent directory of a file. This would cause a regression if the path exceeded 260 characters, since _dirnameW currently returns -1 if given a path >= MAX_PATH in length. As suggested in the issue's comments, _dirnameW should be updated to use PathCchRemoveFileSpec when available (on Win8.1 or greater) to avoid throwing an unnecessary error on a long path. Note: If PathCchRemoveFileSpec isn't available, we can call through PathRemoveFileSpecW, which is otherwise deprecated. What's interesting there is that while the docs say it expects a buffer of size MAX_PATH, analysis of the function shows that it doesn't make assumptions about the size of the path other than it's less than 32k characters in length. It calls through PathCchRemoveFileSpec under the hood on Win8 and greater, passing in 0x8000h as the Cch argument. PathCchRemoveFileSpec then scans through the path for '\' via wcschr, stops when it hits the last one and inserts a NULL. (Analysis of PathRemoveFileSpecW on a Win7 VM shows that it does basically the same thing, and is also resilient to paths greater than MAX_PATH in length.) ---------- components: Windows messages: 327402 nosy: jopamer, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Update _dirnameW to accept long path names versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:05:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Oct 2018 14:05:31 +0000 Subject: [issue28234] In xml.etree.ElementTree docs there are many absent Element class links In-Reply-To: <1474453668.8.0.0192177985612.issue28234@psf.upfronthosting.co.za> Message-ID: <1539093931.86.0.545547206417.issue28234@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9156 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:10:19 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 09 Oct 2018 14:10:19 +0000 Subject: [issue25592] distutils docs: data_files always uses sys.prefix In-Reply-To: <1447135572.7.0.138478279434.issue25592@psf.upfronthosting.co.za> Message-ID: <1539094219.52.0.545547206417.issue25592@psf.upfronthosting.co.za> ?ric Araujo added the comment: If you?re not sure about the reason for that sentence, I think you should not remove it from the docs but investigate more (look at the history, test the conditions (package with extension module), etc). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:14:32 2018 From: report at bugs.python.org (Joe Pamer) Date: Tue, 09 Oct 2018 14:14:32 +0000 Subject: [issue34944] Update _dirnameW to accept long path names In-Reply-To: <1539093354.15.0.545547206417.issue34944@psf.upfronthosting.co.za> Message-ID: <1539094472.16.0.545547206417.issue34944@psf.upfronthosting.co.za> Change by Joe Pamer : ---------- keywords: +patch pull_requests: +9157 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:18:09 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 09 Oct 2018 14:18:09 +0000 Subject: [issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order In-Reply-To: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> Message-ID: <1539094689.47.0.545547206417.issue19270@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Victor: "I would be interested of the same test on Windows." Looks like someone performed it by accident, and filed #34943 in response (because time.monotonic() did in fact return the exact same time twice in a row on Windows). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:19:39 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 09 Oct 2018 14:19:39 +0000 Subject: [issue34945] regression with ./python -m test Message-ID: <1539094779.54.0.545547206417.issue34945@psf.upfronthosting.co.za> New submission from St?phane Wirtel : Hi Steve, I have a regression since the commit d0f49d2f5085ca68e3dc8725f1fb1c9674bfb5ed, commit d0f49d2f5085ca68e3dc8725f1fb1c9674bfb5ed (HEAD) Author: Steve Dower Date: Tue Sep 18 09:10:26 2018 -0700 bpo-34582: Adds JUnit XML output for regression tests (GH-9210) Before, I could use pdb for the debugging or just use the print() function for debugging. Now, this is just impossible, because stdout & stderr are mapped to an other destination. For the test, just add `import pdb; pdb.set_trace()` in a test and try to execute it. Thank you ---------- components: Tests messages: 327405 nosy: matrixise, steve.dower priority: normal severity: normal status: open title: regression with ./python -m test versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:20:25 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 09 Oct 2018 14:20:25 +0000 Subject: [issue34945] regression with ./python -m test and pdb In-Reply-To: <1539094779.54.0.545547206417.issue34945@psf.upfronthosting.co.za> Message-ID: <1539094825.35.0.545547206417.issue34945@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- title: regression with ./python -m test -> regression with ./python -m test and pdb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:22:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Oct 2018 14:22:58 +0000 Subject: [issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0` In-Reply-To: <1519722167.1.0.467229070634.issue32962@psf.upfronthosting.co.za> Message-ID: <1539094978.41.0.545547206417.issue32962@psf.upfronthosting.co.za> STINNER Victor added the comment: More info about -fcf-protection=full -mcet: "Enable control flow protection on x86-64 using -fcf-protection=full -mcet." https://fedoraproject.org/wiki/Changes/HardeningFlags28 man gcc: -fcf-protection=[full|branch|return|none] Enable code instrumentation of control-flow transfers to increase program security by checking that target addresses of control-flow transfer instructions (such as indirect function call, function return, indirect jump) are valid. This prevents diverting the flow of control to an unexpected target. This is intended to protect against such threats as Return-oriented Programming (ROP), and similarly call/jmp-oriented programming (COP/JOP). The value "branch" tells the compiler to implement checking of validity of control-flow transfer at the point of indirect branch instructions, i.e. call/jmp instructions. The value "return" implements checking of validity at the point of returning from a function. The value "full" is an alias for specifying both "branch" and "return". The value "none" turns off instrumentation. The macro "__CET__" is defined when -fcf-protection is used. The first bit of "__CET__" is set to 1 for the value "branch" and the second bit of "__CET__" is set to 1 for the "return". You can also use the "nocf_check" attribute to identify which functions and calls should be skipped from instrumentation. Currently the x86 GNU/Linux target provides an implementation based on Intel Control-flow Enforcement Technology (CET). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:23:53 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 09 Oct 2018 14:23:53 +0000 Subject: [issue25592] distutils docs: data_files always uses sys.prefix In-Reply-To: <1447135572.7.0.138478279434.issue25592@psf.upfronthosting.co.za> Message-ID: <1539095033.02.0.545547206417.issue25592@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > If you?re not sure about the reason for that sentence, I think you should not remove it from the docs If the docs are wrong, their history doesn't matter that much: the docs should be fixed regardless. > test the conditions (package with extension module) I did that before posting this bug report. I also looked at the distutils sources. I couldn't find any evidence that data_files are ever installed in sys.exec_prefix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:24:44 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 09 Oct 2018 14:24:44 +0000 Subject: [issue25592] distutils docs: data_files always uses sys.prefix In-Reply-To: <1447135572.7.0.138478279434.issue25592@psf.upfronthosting.co.za> Message-ID: <1539095084.2.0.545547206417.issue25592@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: Just for fun, let's look at the history. That piece of documentation goes back to commit 632bda3aa06879396561dde5ed3d93ee8fb8900c Author: Fred Drake Date: Fri Mar 8 22:02:06 2002 +0000 Add more explanation of how data_files is used (esp. where the files end up in the installation and how that location is determined). I haven't tried to compile that Python version from 2002 but the distutils sources from that time look quite close to what they are today (scary, no?). So my gut feeling is that those docs were wrong even at the time that they were written. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:32:01 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 09 Oct 2018 14:32:01 +0000 Subject: [issue32680] smtplib SMTP instances missing a default sock attribute In-Reply-To: <1516980375.64.0.467229070634.issue32680@psf.upfronthosting.co.za> Message-ID: <1539095521.47.0.545547206417.issue32680@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: New changeset 7b313971805ca9b53f181f7b97e5376d0b89dc06 by Giampaolo Rodola (Romuald Brunet) in branch 'master': bpo-32680 add default "sock" on SMTP objects (#5345) https://github.com/python/cpython/commit/7b313971805ca9b53f181f7b97e5376d0b89dc06 ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:35:41 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 09 Oct 2018 14:35:41 +0000 Subject: [issue32680] smtplib SMTP instances missing a default sock attribute In-Reply-To: <1516980375.64.0.467229070634.issue32680@psf.upfronthosting.co.za> Message-ID: <1539095741.7.0.545547206417.issue32680@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: PR merged for 3.8 branch. I don't think such a simple change deserves a backport for previous Python versions. Closing this out as resolved. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:35:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Oct 2018 14:35:47 +0000 Subject: [issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0` In-Reply-To: <1519722167.1.0.467229070634.issue32962@psf.upfronthosting.co.za> Message-ID: <1539095747.35.0.545547206417.issue32962@psf.upfronthosting.co.za> STINNER Victor added the comment: I tested the following configurations on my Fedora 28: ./configure --with-pydebug CFLAGS=-O0 -mcet -fcf-protection ./configure CFLAGS=-mcet -fcf-protection ./configure --with-pydebug CFLAGS=-O0 -mcet -fcf-protection=none ./configure CFLAGS=-mcet -fcf-protection=none ./configure --with-pydebug CFLAGS=-O0 -mcet -fcf-protection=branch ./configure CFLAGS=-mcet -fcf-protection=branch ./configure --with-pydebug CFLAGS=-O0 -mcet -fcf-protection=return ./configure CFLAGS=-mcet -fcf-protection=return ./configure --with-pydebug CFLAGS=-O0 -mcet -fcf-protection=full ./configure CFLAGS=-mcet -fcf-protection=full test_gdb now pass with all these configurations ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:40:16 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 09 Oct 2018 14:40:16 +0000 Subject: [issue25592] distutils docs: data_files always uses sys.prefix In-Reply-To: <1447135572.7.0.138478279434.issue25592@psf.upfronthosting.co.za> Message-ID: <1539096016.48.0.545547206417.issue25592@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: There is also commit fa2f4b6d8e297eda09d8ee52dc4a3600b7d458e7 Author: Greg Ward Date: Sat Jun 24 17:22:39 2000 +0000 Changed the default installation directory for data files (used by the "install_data" command to the installation base, which is usually just sys.prefix. (Any setup scripts out there that specify data files will have to set the installation directory, relative to the base, explicitly.) with commit message stating that data_files are installed in sys.prefix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:45:21 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 09 Oct 2018 14:45:21 +0000 Subject: [issue25592] distutils docs: data_files always uses sys.prefix In-Reply-To: <1447135572.7.0.138478279434.issue25592@psf.upfronthosting.co.za> Message-ID: <1539096321.62.0.545547206417.issue25592@psf.upfronthosting.co.za> ?ric Araujo added the comment: > If the docs are wrong, their history doesn't matter that much What I was saying is that I am not sure that the docs are wrong. Distutils is more touchy that the rest of the stdlib and I err on the side of caution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:54:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Oct 2018 14:54:11 +0000 Subject: [issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0` In-Reply-To: <1519722167.1.0.467229070634.issue32962@psf.upfronthosting.co.za> Message-ID: <1539096851.59.0.545547206417.issue32962@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 79d21331e605fdc941f947621846b8563485aab6 by Victor Stinner in branch 'master': bpo-32962: Fix test_gdb failure in debug build with -mcet -fcf-protection -O0 (GH-9656) https://github.com/python/cpython/commit/79d21331e605fdc941f947621846b8563485aab6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:54:31 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Oct 2018 14:54:31 +0000 Subject: [issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0` In-Reply-To: <1519722167.1.0.467229070634.issue32962@psf.upfronthosting.co.za> Message-ID: <1539096871.75.0.545547206417.issue32962@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9158 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 10:54:39 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Oct 2018 14:54:39 +0000 Subject: [issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0` In-Reply-To: <1519722167.1.0.467229070634.issue32962@psf.upfronthosting.co.za> Message-ID: <1539096879.77.0.545547206417.issue32962@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9159 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:00:07 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 09 Oct 2018 15:00:07 +0000 Subject: [issue25592] distutils docs: data_files always uses sys.prefix In-Reply-To: <1447135572.7.0.138478279434.issue25592@psf.upfronthosting.co.za> Message-ID: <1539097207.04.0.545547206417.issue25592@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: Well, I did try it on a minimal Python project. I also read the distutils sources and understood why it installs data_files in sys.prefix by default. So what more do you need to be convinced? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:02:05 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 09 Oct 2018 15:02:05 +0000 Subject: [issue25592] distutils docs: data_files always uses sys.prefix In-Reply-To: <1447135572.7.0.138478279434.issue25592@psf.upfronthosting.co.za> Message-ID: <1539097325.35.0.545547206417.issue25592@psf.upfronthosting.co.za> ?ric Araujo added the comment: Did you try with a minimal project containing a C extension? Did you install in a system where sys.prefix != sys.exec_prefix? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:20:46 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Oct 2018 15:20:46 +0000 Subject: [issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0` In-Reply-To: <1519722167.1.0.467229070634.issue32962@psf.upfronthosting.co.za> Message-ID: <1539098446.36.0.545547206417.issue32962@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 25bfb1aa75c8358becdab11142954c8ee9c3607f by Miss Islington (bot) in branch '3.6': bpo-32962: Fix test_gdb failure in debug build with -mcet -fcf-protection -O0 (GH-9656) https://github.com/python/cpython/commit/25bfb1aa75c8358becdab11142954c8ee9c3607f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:21:22 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Oct 2018 15:21:22 +0000 Subject: [issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0` In-Reply-To: <1519722167.1.0.467229070634.issue32962@psf.upfronthosting.co.za> Message-ID: <1539098482.39.0.545547206417.issue32962@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 0ce31d340b264a550a3c574e1d6913f4affd4669 by Miss Islington (bot) in branch '3.7': bpo-32962: Fix test_gdb failure in debug build with -mcet -fcf-protection -O0 (GH-9656) https://github.com/python/cpython/commit/0ce31d340b264a550a3c574e1d6913f4affd4669 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:30:27 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 09 Oct 2018 15:30:27 +0000 Subject: [issue34769] _asyncgen_finalizer_hook running in wrong thread In-Reply-To: <1537627184.81.0.956365154283.issue34769@psf.upfronthosting.co.za> Message-ID: <1539099027.55.0.545547206417.issue34769@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset c880ffe7d2ce2fedb1831918c8a36e3623e0fb76 by Yury Selivanov (twisteroid ambassador) in branch 'master': bpo-34769: Thread safety for _asyncgen_finalizer_hook(). (GH-9716) https://github.com/python/cpython/commit/c880ffe7d2ce2fedb1831918c8a36e3623e0fb76 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:30:43 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Oct 2018 15:30:43 +0000 Subject: [issue34769] _asyncgen_finalizer_hook running in wrong thread In-Reply-To: <1537627184.81.0.956365154283.issue34769@psf.upfronthosting.co.za> Message-ID: <1539099043.86.0.545547206417.issue34769@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9160 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:30:57 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Oct 2018 15:30:57 +0000 Subject: [issue34769] _asyncgen_finalizer_hook running in wrong thread In-Reply-To: <1537627184.81.0.956365154283.issue34769@psf.upfronthosting.co.za> Message-ID: <1539099057.79.0.545547206417.issue34769@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9161 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:52:38 2018 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 09 Oct 2018 15:52:38 +0000 Subject: [issue34939] Possibly spurious SyntaxError: annotated name can't be global In-Reply-To: <1539077885.55.0.545547206417.issue34939@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I agree with Ivan. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 11:58:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Oct 2018 15:58:13 +0000 Subject: [issue34939] Possibly spurious SyntaxError: annotated name can't be global In-Reply-To: <1539050318.57.0.545547206417.issue34939@psf.upfronthosting.co.za> Message-ID: <1539100693.22.0.545547206417.issue34939@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This looks similar to say x = 1 global x It is an error in a file, but is not an error in interactive mode. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:03:40 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Oct 2018 16:03:40 +0000 Subject: [issue34769] _asyncgen_finalizer_hook running in wrong thread In-Reply-To: <1537627184.81.0.956365154283.issue34769@psf.upfronthosting.co.za> Message-ID: <1539101020.77.0.545547206417.issue34769@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 41e5ec377b36aa951ac095839d2f74f66ee1e665 by Miss Islington (bot) in branch '3.7': bpo-34769: Thread safety for _asyncgen_finalizer_hook(). (GH-9716) https://github.com/python/cpython/commit/41e5ec377b36aa951ac095839d2f74f66ee1e665 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:06:31 2018 From: report at bugs.python.org (Tim Peters) Date: Tue, 09 Oct 2018 16:06:31 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1539101191.52.0.545547206417.issue34751@psf.upfronthosting.co.za> Tim Peters added the comment: >> Changes initialization to add in the length: > What's the rationale for that change? You always asked > me to stay as close as possible to the "official" hash function > which adds in the length at the end. Is there an actual benefit > from doing it in the beginning? The heart of xxHash is the state-updating code, neither initialization nor finalization. Likewise for SeaHash or any of the others. Without the post-loop avalanche code, adding the length at the end has very little effect - it will typically change only the last two bits of the final result. _With_ the avalanche code, the length can affect every bit in the result. But adding it in at the start also achieves that - same as changing any bit in the initial accumulator value. Adding it in at the start instead also takes the addition off the critical path. Which may or may not save a cycle or two (depending on processor and compiler), but can't hurt speed. I noted before that adding the length at the end _can_ break out of a zero fixed-point (accumulator becomes 0 and all remaining values hash to 0). Adding it at the start loses that. So there is a theoretical danger there ... OK, trying it both ways I don't see any significant differences in my test results or a timing difference outside the noise range. So I'm happy either way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:07:14 2018 From: report at bugs.python.org (Rohan Padhye) Date: Tue, 09 Oct 2018 16:07:14 +0000 Subject: [issue34939] Possibly spurious SyntaxError: annotated name can't be global In-Reply-To: <1539050318.57.0.545547206417.issue34939@psf.upfronthosting.co.za> Message-ID: <1539101234.87.0.545547206417.issue34939@psf.upfronthosting.co.za> Rohan Padhye added the comment: Another point I'd like to make is that there is no error in either file or interactive if the annotated assignment appears before the `global` declaration like so: ``` x:int = 0 def set_x(): global x x = 1 # Works fine! ``` The syntax error specifically occurs when the annotated assignment occurs after a `global` declaration in the program, even if the assignment is in a different scope. Neither the docs nor the PEP say anything about such an ordering constraint. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:07:39 2018 From: report at bugs.python.org (Steven Packard) Date: Tue, 09 Oct 2018 16:07:39 +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: <1539101259.34.0.545547206417.issue34079@psf.upfronthosting.co.za> Steven Packard added the comment: I don't think you can blindly change that value of that definition. It will likely break the compilation of the module using Solaris Sun Studio while fixing compilation with gcc. The attached patch should do the correct thing in the presence of either toolchain. ---------- nosy: +spackard Added file: https://bugs.python.org/file47860/solaris_gcc_mutiprocessing.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:10:38 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 09 Oct 2018 16:10:38 +0000 Subject: [issue23596] gzip argparse interface In-Reply-To: <1425603271.14.0.91808493248.issue23596@psf.upfronthosting.co.za> Message-ID: <1539101438.42.0.545547206417.issue23596@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- pull_requests: +9162 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:13:33 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 09 Oct 2018 16:13:33 +0000 Subject: [issue34934] Consider making Windows select.select interruptible using WSAEventSelect & WSAWaitForMultipleEvents In-Reply-To: <1539009177.63.0.545547206417.issue34934@psf.upfronthosting.co.za> Message-ID: <1539101613.13.0.545547206417.issue34934@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:14:13 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 09 Oct 2018 16:14:13 +0000 Subject: [issue23596] gzip argparse interface In-Reply-To: <1425603271.14.0.91808493248.issue23596@psf.upfronthosting.co.za> Message-ID: <1539101653.4.0.545547206417.issue23596@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Berker, Here is my PR for this issue. >From this PR, I will add the new CLI with argparse. And after this issue, I will work on https://bugs.python.org/issue34913 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 12:57:08 2018 From: report at bugs.python.org (thautwarm) Date: Tue, 09 Oct 2018 16:57:08 +0000 Subject: [issue34880] About the "assert" bytecode In-Reply-To: <1538549910.96.0.545547206417.issue34880@psf.upfronthosting.co.za> Message-ID: <1539104227.99.0.545547206417.issue34880@psf.upfronthosting.co.za> thautwarm added the comment: Hi, Serhiy, there could be an another way to fix all this sort of problems IMO. We can figure out all the cases that implicitly require shadow builtins, and then change symtable visitor to add corresponding free variables with name mangling, for instance: 1. implicitly add free variable ".AssertionError" ``` def f(): assert 1 ``` where ".AssertionError" is a name-mangled free variable and is assigned once the module is executed. The same to `StopAsyncIteration`, `TypeError`, `__build_class__` and so on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 14:13:59 2018 From: report at bugs.python.org (Chris Bremner) Date: Tue, 09 Oct 2018 18:13:59 +0000 Subject: [issue34946] inspect.getcallargs is marked as deprecated in documentation, but doesn't issue a DeprecationWarning when used Message-ID: <1539108839.31.0.545547206417.issue34946@psf.upfronthosting.co.za> New submission from Chris Bremner : Looking in the documentation for inspect.getcallargs (https://docs.python.org/3/library/inspect.html#inspect.getcallargs), it appears that inspect.getcallargs is deprecated in favor of inspect.Signature.bind and inspect.Signature.bind_partial. However, when I use inspect.getcallargs, I do not get a DeprecationWarning, while I do get one for other methods that have been deprecated in the inspect library. Because a warning is not issued when inspect.getcallargs is used, it confuses me as to whether this method is actually deprecated or not, since there seems to be a lot of discussion in previous issues about whether this method should be deprecated or not. If it is truly deprecated, should a DeprecationWarning be added? For my situation, I would prefer to use inspect.getcallargs due to its more descriptive error messages when incorrect arguments are used, but if it truly is deprecated, then I should use inspect.Signature.bind instead. ---------- messages: 327428 nosy: chrisjbremner priority: normal severity: normal status: open title: inspect.getcallargs is marked as deprecated in documentation, but doesn't issue a DeprecationWarning when used type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 14:19:14 2018 From: report at bugs.python.org (Big Stone) Date: Tue, 09 Oct 2018 18:19:14 +0000 Subject: [issue34916] include sqlite-3.25+ (with window functions) In-Reply-To: <1538846966.09.0.545547206417.issue34916@psf.upfronthosting.co.za> Message-ID: <1539109154.29.0.545547206417.issue34916@psf.upfronthosting.co.za> Big Stone added the comment: hum. On Windows at least, just drop-in replace the sqlite3.dll per the new sqlite-3.25 dll and the window functions just works. ==> I don't see the need for your latter point, at least on Windows. checked with sqlite_bro on Python-3.6.7rc1 with example: CREATE TABLE t2(a, b); INSERT INTO t2 VALUES('a', 'one'), ('a', 'two'), ('a', 'three'), ('b', 'four'), ('c', 'five'), ('c', 'six'); SELECT a AS a, row_number() OVER win AS row_number, rank() OVER win AS rank, dense_rank() OVER win AS dense_rank, percent_rank() OVER win AS percent_rank, cume_dist() OVER win AS cume_dist FROM t2 WINDOW win AS (ORDER BY a); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 14:22:33 2018 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Oct 2018 18:22:33 +0000 Subject: [issue34926] Allow querying a Path's mime-type In-Reply-To: <1538978844.01.0.545547206417.issue34926@psf.upfronthosting.co.za> Message-ID: <1539109353.61.0.545547206417.issue34926@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +9163 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 14:51:24 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 09 Oct 2018 18:51:24 +0000 Subject: [issue34946] inspect.getcallargs is marked as deprecated in documentation, but doesn't issue a DeprecationWarning when used In-Reply-To: <1539108839.31.0.545547206417.issue34946@psf.upfronthosting.co.za> Message-ID: <1539111084.05.0.545547206417.issue34946@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 14:59:32 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 09 Oct 2018 18:59:32 +0000 Subject: [issue34946] inspect.getcallargs is marked as deprecated in documentation, but doesn't issue a DeprecationWarning when used In-Reply-To: <1539108839.31.0.545547206417.issue34946@psf.upfronthosting.co.za> Message-ID: <1539111572.73.0.545547206417.issue34946@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: There was some discussion over undeprecating getcallargs at https://bugs.python.org/issue27172#msg281825 that there are some behavior changes with signature.bind ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 15:19:32 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 09 Oct 2018 19:19:32 +0000 Subject: [issue34946] inspect.getcallargs is marked as deprecated in documentation, but doesn't issue a DeprecationWarning when used In-Reply-To: <1539108839.31.0.545547206417.issue34946@psf.upfronthosting.co.za> Message-ID: <1539112772.88.0.545547206417.issue34946@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: As far as I can see from https://bugs.python.org/issue20438 this deprecation is meant to be a documentation level deprecation discouraging usage than a code level deprecation adding a DeprecationWarning to be removed later. I might be wrong here. I am adding Yury for clarification. Thanks ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 15:23:37 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 09 Oct 2018 19:23:37 +0000 Subject: [issue23596] gzip argparse interface In-Reply-To: <1425603271.14.0.91808493248.issue23596@psf.upfronthosting.co.za> Message-ID: <1539113017.23.0.545547206417.issue23596@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks @matrixise for the PR. This seems to be a good first step for both testing the command line interface and also argparse can generate help string which can be used for issue34913. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 15:43:04 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 09 Oct 2018 19:43:04 +0000 Subject: [issue34916] include sqlite-3.25+ (with window functions) In-Reply-To: <1538846966.09.0.545547206417.issue34916@psf.upfronthosting.co.za> Message-ID: <1539114184.82.0.545547206417.issue34916@psf.upfronthosting.co.za> Ronald Oussoren added the comment: My latter points makes it possible to define custom windowing functions in Python, similar to how it is already possible to define other SQLite functions in Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 16:02:15 2018 From: report at bugs.python.org (Antony Lee) Date: Tue, 09 Oct 2018 20:02:15 +0000 Subject: [issue23596] gzip argparse interface In-Reply-To: <1425603271.14.0.91808493248.issue23596@psf.upfronthosting.co.za> Message-ID: <1539115335.88.0.545547206417.issue23596@psf.upfronthosting.co.za> Change by Antony Lee : ---------- nosy: -Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 16:25:27 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Oct 2018 20:25:27 +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: <1539116727.76.0.545547206417.issue21880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Idlelib modules OutputWindow and configHandler are now outwin and config. I discovered a non-checker .py file consumer. Pygame Zero enables use of pygame to create games without boilerplate. https://pygame-zero.readthedocs.io/en/stable/ide-mode.html One can run a mygame.py file containing, for instance, WIDTH = 800 HEIGHT = 600 def draw(): screen.clear() screen.draw.circle((400, 300), 30, 'white') from a command line with 'pgzrun mygame.py'. In this case, one can instead run from an IDE by adding boilerplate lines 'import pgzrun' and 'pgzrun.go()' at top and bottom. But there might be people (or instructors) who prefer, if possible, to enable pgzrun as a 3rd party .py file consumer with the 'checker' option. One issue with configparser is that it does not read comments in a .cfg file and therefore overwrites them when overwriting a file. We might add a multiline 'comment' option to each application section. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 16:42:28 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Oct 2018 20:42:28 +0000 Subject: [issue23831] tkinter canvas lacks of moveto method. In-Reply-To: <1427832932.11.0.38662420535.issue23831@psf.upfronthosting.co.za> Message-ID: <1539117748.39.0.545547206417.issue23831@psf.upfronthosting.co.za> Terry J. Reedy added the comment: +1 on adding this. We can and sometimes do acknowledge an initial author in the commit message and blurb. In this case, there is no name, so it would be "Based on patch by 'mps'." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 16:58:00 2018 From: report at bugs.python.org (Jan Hermann) Date: Tue, 09 Oct 2018 20:58:00 +0000 Subject: [issue34947] inspect.getclosurevars() does not get all globals Message-ID: <1539118680.94.0.545547206417.issue34947@psf.upfronthosting.co.za> New submission from Jan Hermann : inspect.getclosurevars() omits globals or nonlocals that are bound within comprehensions: 22:50 ~ python3 Python 3.7.0 (default, Aug 17 2018, 21:14:48) [Clang 9.1.0 (clang-902.0.39.2)] on darwin Type "help", "copyright", "credits" or "license" for more information. (ins)>>> import inspect (ins)>>> x = 1 (ins)>>> def f(): (ins)... return [x for _ in range(1)] (ins)... (ins)>>> inspect.getclosurevars(f) ClosureVars(nonlocals={}, globals={}, builtins={'range': }, unbound=set()) (ins)>>> def f(): (ins)... return x (ins)... (ins)>>> inspect.getclosurevars(f) ClosureVars(nonlocals={}, globals={'x': 1}, builtins={}, unbound=set()) It can be fixed quite easily along the following lines: https://github.com/azag0/calcfw/blob/master/caf2/hashing/func.py#L133-L146 Does this look like a reasonable solution? ---------- components: Library (Lib) messages: 327436 nosy: azag0 priority: normal severity: normal status: open title: inspect.getclosurevars() does not get all globals type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 16:59:32 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 09 Oct 2018 20:59:32 +0000 Subject: [issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error In-Reply-To: <1527069849.43.0.682650639539.issue33613@psf.upfronthosting.co.za> Message-ID: <1539118772.86.0.545547206417.issue33613@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- pull_requests: +9164 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 17:16:48 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 09 Oct 2018 21:16:48 +0000 Subject: [issue23596] gzip argparse interface In-Reply-To: <1425603271.14.0.91808493248.issue23596@psf.upfronthosting.co.za> Message-ID: <1539119808.3.0.545547206417.issue23596@psf.upfronthosting.co.za> Julien Palard added the comment: New changeset 84eec1199583bcb034e43337bcb8e2b876ebd269 by Julien Palard (St?phane Wirtel) in branch 'master': bpo-23596: Add unit tests for the command line for the gzip module (GH-9775) https://github.com/python/cpython/commit/84eec1199583bcb034e43337bcb8e2b876ebd269 ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 17:17:09 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Oct 2018 21:17:09 +0000 Subject: [issue23596] gzip argparse interface In-Reply-To: <1425603271.14.0.91808493248.issue23596@psf.upfronthosting.co.za> Message-ID: <1539119829.7.0.545547206417.issue23596@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9165 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 17:17:18 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Oct 2018 21:17:18 +0000 Subject: [issue23596] gzip argparse interface In-Reply-To: <1425603271.14.0.91808493248.issue23596@psf.upfronthosting.co.za> Message-ID: <1539119838.37.0.545547206417.issue23596@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9166 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 17:22:25 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 09 Oct 2018 21:22:25 +0000 Subject: [issue23596] gzip argparse interface In-Reply-To: <1425603271.14.0.91808493248.issue23596@psf.upfronthosting.co.za> Message-ID: <1539120145.92.0.545547206417.issue23596@psf.upfronthosting.co.za> St?phane Wirtel added the comment: And now, I am going to work on the refactoring with argparse ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 17:42:31 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Oct 2018 21:42:31 +0000 Subject: [issue23596] gzip argparse interface In-Reply-To: <1425603271.14.0.91808493248.issue23596@psf.upfronthosting.co.za> Message-ID: <1539121351.55.0.545547206417.issue23596@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 482dc9445d834f1d03c501b45fafd422b6eb8c9c by Miss Islington (bot) in branch '3.6': bpo-23596: Add unit tests for the command line for the gzip module (GH-9775) https://github.com/python/cpython/commit/482dc9445d834f1d03c501b45fafd422b6eb8c9c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 17:43:02 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Oct 2018 21:43:02 +0000 Subject: [issue23596] gzip argparse interface In-Reply-To: <1425603271.14.0.91808493248.issue23596@psf.upfronthosting.co.za> Message-ID: <1539121382.12.0.545547206417.issue23596@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8e23ba021f45df67edd2926a3e3daf6a2a1f0ed8 by Miss Islington (bot) in branch '3.7': bpo-23596: Add unit tests for the command line for the gzip module (GH-9775) https://github.com/python/cpython/commit/8e23ba021f45df67edd2926a3e3daf6a2a1f0ed8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 17:46:14 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 09 Oct 2018 21:46:14 +0000 Subject: [issue23596] gzip argparse interface In-Reply-To: <1425603271.14.0.91808493248.issue23596@psf.upfronthosting.co.za> Message-ID: <1539121574.86.0.545547206417.issue23596@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- pull_requests: +9167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 17:58:19 2018 From: report at bugs.python.org (Robert) Date: Tue, 09 Oct 2018 21:58:19 +0000 Subject: [issue34932] Add macOS TCP_KEEPALIVE to available socket options In-Reply-To: <1539005890.42.0.545547206417.issue34932@psf.upfronthosting.co.za> Message-ID: <1539122299.16.0.545547206417.issue34932@psf.upfronthosting.co.za> Robert added the comment: Acknowledging the test failure and message pointing to #32394: ====================================================================== FAIL: test_new_tcp_flags (test.test_socket.TestMSWindowsTCPFlags) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_socket.py", line 5992, in test_new_tcp_flags self.assertEqual([], unknown, AssertionError: Lists differ: [] != ['TCP_KEEPALIVE'] Second list contains 1 additional elements. First extra element 0: 'TCP_KEEPALIVE' - [] + ['TCP_KEEPALIVE'] : New TCP flags were discovered. See bpo-32394 for more information ---------------------------------------------------------------------- It appears that TCP_KEEPALIVE is defined in Windows (in ws2ipdef.h) despite not being documented on https://docs.microsoft.com/en-us/windows/desktop/winsock/ipproto-tcp-socket-options Given that TCP_KEEPIDLE is #define as the value of TCP_KEEPALIVE, I'd guess that it was added at the same time in which case it probably ought to be added to win_runtime_flags for exclusion based on the same Windows version 1709 too. steve.dower: I've added you to the nosy list based on your active participation in #32394. Any thoughts on this one? ---------- components: +Extension Modules -Library (Lib) nosy: +steve.dower versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 18:41:43 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 09 Oct 2018 22:41:43 +0000 Subject: [issue23596] gzip argparse interface In-Reply-To: <1425603271.14.0.91808493248.issue23596@psf.upfronthosting.co.za> Message-ID: <1539124903.98.0.545547206417.issue23596@psf.upfronthosting.co.za> Julien Palard added the comment: New changeset e8bbc52debfd1b28517946d65db257e6b6d92e29 by Julien Palard (St?phane Wirtel) in branch 'master': bpo-23596: Use argparse for the command line of gzip (GH-9781) https://github.com/python/cpython/commit/e8bbc52debfd1b28517946d65db257e6b6d92e29 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 18:45:13 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 09 Oct 2018 22:45:13 +0000 Subject: [issue23596] gzip argparse interface In-Reply-To: <1425603271.14.0.91808493248.issue23596@psf.upfronthosting.co.za> Message-ID: <1539125113.77.0.545547206417.issue23596@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I have added some tests for 3.6, 3.7 and 3.8. But for the new CLI, just for 3.8 now, I am going to close this issue. ---------- stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 18:59:25 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 09 Oct 2018 22:59:25 +0000 Subject: [issue34913] Document gzip command line interface In-Reply-To: <1538809564.11.0.545547206417.issue34913@psf.upfronthosting.co.za> Message-ID: <1539125965.66.0.545547206417.issue34913@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +9168 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 19:04:58 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 09 Oct 2018 23:04:58 +0000 Subject: [issue34947] inspect.getclosurevars() does not get all globals In-Reply-To: <1539118680.94.0.545547206417.issue34947@psf.upfronthosting.co.za> Message-ID: <1539126298.13.0.545547206417.issue34947@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Problem: The variables from the nested functions (which comprehensions are effectively a special case of) aren't actually closure variables for the function being inspected. Allowing recursive identification of all closure variables might be helpful in some contexts, but you wouldn't want it to be the only behavior; it's easier to convert a non-recursive solution to a recursive solution than the other way around. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 19:34:49 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 09 Oct 2018 23:34:49 +0000 Subject: [issue34906] Fix typo in the documentation In-Reply-To: <1538749042.1.0.545547206417.issue34906@psf.upfronthosting.co.za> Message-ID: <1539128089.43.0.545547206417.issue34906@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- pull_requests: +9169 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 19:41:47 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 09 Oct 2018 23:41:47 +0000 Subject: [issue26441] email.charset: to_splittable and from_splittable are not there anymore! In-Reply-To: <1456440480.97.0.346838980393.issue26441@psf.upfronthosting.co.za> Message-ID: <1539128507.13.0.545547206417.issue26441@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- assignee: -> docs at python components: +Documentation -email keywords: +easy nosy: +docs at python stage: -> needs patch type: -> enhancement versions: +Python 3.8 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 20:00:27 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 10 Oct 2018 00:00:27 +0000 Subject: [issue20216] Misleading docs for sha1, sha256, sha512, md5 modules In-Reply-To: <1389320490.58.0.128009418019.issue20216@psf.upfronthosting.co.za> Message-ID: <1539129627.61.0.545547206417.issue20216@psf.upfronthosting.co.za> Cheryl Sabella added the comment: @vajrasky, Would you be interested in converting your patch to a GitHub pull request? Thanks! ---------- nosy: +cheryl.sabella stage: -> needs patch versions: +Python 3.8 -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 20:01:01 2018 From: report at bugs.python.org (William Schwartz) Date: Wed, 10 Oct 2018 00:01:01 +0000 Subject: [issue5614] Malloc errors in test_io In-Reply-To: <1238450576.61.0.363286616174.issue5614@psf.upfronthosting.co.za> Message-ID: <1539129661.57.0.545547206417.issue5614@psf.upfronthosting.co.za> William Schwartz added the comment: In Jupyter Notebook, I tried to pass a large amount of data (about 2.3 GB) to Statsmodels's KDEUnivariate.fit (https://www.statsmodels.org/dev/generated/statsmodels.nonparametric.kde.KDEUnivariate.fit.html#statsmodels.nonparametric.kde.KDEUnivariate.fit) with kernel='cos'. In the Notebook, I got a MemoryError exception and traceback (which unfortunately I have since lost). In the terminal where I was running the Jupyter server, the Python 3.7 kernel spat out: Python(86244,0x7fff91104380) malloc: *** mach_vm_map(size=465845322670080) failed (error code=3) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug The MemoryError coming up in the Notebook interface is the correct behavior, but I wanted to bring to your attention that the malloc junk on stderr happens even outside of Python's tests. I'm on macOS 10.13.5. ---------- components: +macOS nosy: +William.Schwartz versions: +Python 3.7 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 20:11:29 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 10 Oct 2018 00:11:29 +0000 Subject: [issue34725] Py_GetProgramFullPath() odd behaviour in Windows In-Reply-To: <1537291607.58.0.956365154283.issue34725@psf.upfronthosting.co.za> Message-ID: <1539130289.56.0.545547206417.issue34725@psf.upfronthosting.co.za> Steve Dower added the comment: We'll need to bring in venv specialists to check whether using it outside of Py_Main() is valid. Or perhaps you could explain what you are actually trying to do? I don't believe it is necessary when you are calling Py_SetPath yourself, and only the "launch normally with alternate args" case for scripts that use sys.executable are affected. But I'm happy to be set right here (with example scenarios, preferably). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 20:53:48 2018 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Oct 2018 00:53:48 +0000 Subject: [issue2771] Test issue In-Reply-To: <1538534293.39.0.545547206417.issue2771@psf.upfronthosting.co.za> Message-ID: Ezio Melotti added the comment: mail test ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 21:50:43 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 10 Oct 2018 01:50:43 +0000 Subject: [issue34948] Document __warningregister__ Message-ID: <1539136243.9.0.788709270274.issue34948@psf.upfronthosting.co.za> New submission from Steven D'Aprano : The warnings module makes use of a per-module global ``__warningregister__`` which is briefly mentioned in the docs but not documented. https://docs.python.org/3/library/warnings.html#warnings.warn_explicit Given that it is part of the warn_explicit API, we should accept that the registry file is now part of the public API not just an implementation detail, and so we should explicitly document its existence and state the expected format. ---------- components: Library (Lib) messages: 327449 nosy: steven.daprano priority: normal severity: normal status: open title: Document __warningregister__ type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 21:53:47 2018 From: report at bugs.python.org (Ma Lin) Date: Wed, 10 Oct 2018 01:53:47 +0000 Subject: [issue34932] Add macOS TCP_KEEPALIVE to available socket options In-Reply-To: <1539005890.42.0.545547206417.issue34932@psf.upfronthosting.co.za> Message-ID: <1539136427.67.0.788709270274.issue34932@psf.upfronthosting.co.za> Ma Lin added the comment: I searched on Google, an article [1] said: Of note, Mac OS X defines keepidle and keepintvl in terms of milliseconds as opposed to Linux using seconds. On Windows, it's also seconds. Will this option make trouble for cross-platform programs? [1] http://coryklein.com/tcp/2015/11/25/custom-configuration-of-tcp-socket-keep-alive-timeouts.html ---------- nosy: +Ma Lin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:14:47 2018 From: report at bugs.python.org (shashank) Date: Wed, 10 Oct 2018 02:14:47 +0000 Subject: [issue21109] tarfile: Traversal attack vulnerability In-Reply-To: <1396253659.12.0.842636239516.issue21109@psf.upfronthosting.co.za> Message-ID: <1539137687.76.0.788709270274.issue21109@psf.upfronthosting.co.za> shashank added the comment: It won't exactly be drop-in replacement. I mean if users decide to replace Tarfile with SafeTarFile, existing code may break since there might be cases where dodgy tarballs are acceptable and/or used then SafeTarFile.open will throw an exception. Having said that, I am refactoring the tests right now since the test file is ~3000 lines and adding SafeTarFile tests for every TarFile test is cluttering it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:41:14 2018 From: report at bugs.python.org (joshu coats) Date: Wed, 10 Oct 2018 02:41:14 +0000 Subject: [issue34949] ntpath.abspath no longer uses normpath Message-ID: <1539139274.74.0.788709270274.issue34949@psf.upfronthosting.co.za> New submission from joshu coats : After the changes from https://github.com/python/cpython/pull/8544, ntpath.abspath no longer calls normpath on the output of nt._getfullpathname. This unfortunately causes "python setup.py develop" on a project to become upset in some instances because two paths (which should be equal) differ by a trailing slash. Presumably this could be corrected by updating https://github.com/python/cpython/blob/0185f34ddcf07b78feb6ac666fbfd4615d26b028/Lib/ntpath.py#L526 to use normpath when it calls _getfullpathname. ---------- components: Library (Lib), Windows messages: 327452 nosy: paul.moore, rhwlo, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: ntpath.abspath no longer uses normpath type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 22:58:35 2018 From: report at bugs.python.org (Fabio Amendola) Date: Wed, 10 Oct 2018 02:58:35 +0000 Subject: [issue34950] Parse more features from X509 certificate in get_peer_cert() Message-ID: <1539140315.19.0.788709270274.issue34950@psf.upfronthosting.co.za> Change by Fabio Amendola : ---------- assignee: christian.heimes components: SSL nosy: christian.heimes, famendola priority: normal severity: normal status: open title: Parse more features from X509 certificate in get_peer_cert() versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 23:20:15 2018 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 10 Oct 2018 03:20:15 +0000 Subject: [issue34908] netrc parsing is overly strict In-Reply-To: <1538760084.12.0.545547206417.issue34908@psf.upfronthosting.co.za> Message-ID: <1539141615.5.0.788709270274.issue34908@psf.upfronthosting.co.za> Xiang Zhang added the comment: My PR https://github.com/python/cpython/pull/127 has tried to solve some restrictions of the current netrc library. It's somewhat outdated since no reviewer for a long time. As you can see there are also other libraries suffering from the restrictions. Revising it I think it still doesn't solve the case here, although it should be easy. There is no formal spec we can refer to. :-( But since there is real world problem and curl allows it, we should take it into mind. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 9 23:45:09 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 10 Oct 2018 03:45:09 +0000 Subject: [issue34878] Lock Objects documentation clarification In-Reply-To: <1538523706.16.0.545547206417.issue34878@psf.upfronthosting.co.za> Message-ID: <1539143109.14.0.788709270274.issue34878@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- priority: normal -> low resolution: not a bug -> status: closed -> open title: Lock Objects documentation bug -> Lock Objects documentation clarification _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 00:17:32 2018 From: report at bugs.python.org (Fabio Amendola) Date: Wed, 10 Oct 2018 04:17:32 +0000 Subject: [issue34950] Parse trusted and signature information from X509 certificate Message-ID: <1539145052.06.0.788709270274.issue34950@psf.upfronthosting.co.za> Change by Fabio Amendola : ---------- title: Parse more features from X509 certificate in get_peer_cert() -> Parse trusted and signature information from X509 certificate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 00:31:40 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 10 Oct 2018 04:31:40 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1539145900.91.0.788709270274.issue28397@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- pull_requests: +9170 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 01:10:26 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Oct 2018 05:10:26 +0000 Subject: [issue28806] Improve the netrc library In-Reply-To: <1480158810.39.0.736994382472.issue28806@psf.upfronthosting.co.za> Message-ID: <1539148226.62.0.788709270274.issue28806@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 01:11:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Oct 2018 05:11:01 +0000 Subject: [issue34948] Document __warningregister__ In-Reply-To: <1539136243.9.0.788709270274.issue34948@psf.upfronthosting.co.za> Message-ID: <1539148261.39.0.788709270274.issue34948@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think that it is necessary to state its format. It is an opaque dictionary, and its format is an implementation detail. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 02:16:01 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 10 Oct 2018 06:16:01 +0000 Subject: [issue25592] distutils docs: data_files always uses sys.prefix In-Reply-To: <1447135572.7.0.138478279434.issue25592@psf.upfronthosting.co.za> Message-ID: <1539152161.4.0.788709270274.issue25592@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > Did you try with a minimal project containing a C extension? > Did you install in a system where sys.prefix != sys.exec_prefix? Yes to both questions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 02:28:32 2018 From: report at bugs.python.org (Julien Palard) Date: Wed, 10 Oct 2018 06:28:32 +0000 Subject: [issue34913] Document gzip command line interface In-Reply-To: <1538809564.11.0.545547206417.issue34913@psf.upfronthosting.co.za> Message-ID: <1539152912.75.0.788709270274.issue34913@psf.upfronthosting.co.za> Julien Palard added the comment: New changeset 7c817e620be9013466d4dd008a2f1dbffcf7517e by Julien Palard (St?phane Wirtel) in branch 'master': bpo-34913: Document gzip command line interface (GH-9782) https://github.com/python/cpython/commit/7c817e620be9013466d4dd008a2f1dbffcf7517e ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 02:44:38 2018 From: report at bugs.python.org (Julien Palard) Date: Wed, 10 Oct 2018 06:44:38 +0000 Subject: [issue34913] Document gzip command line interface In-Reply-To: <1538809564.11.0.545547206417.issue34913@psf.upfronthosting.co.za> Message-ID: <1539153878.17.0.788709270274.issue34913@psf.upfronthosting.co.za> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 02:49:12 2018 From: report at bugs.python.org (Julien Palard) Date: Wed, 10 Oct 2018 06:49:12 +0000 Subject: [issue23596] gzip argparse interface In-Reply-To: <1425603271.14.0.91808493248.issue23596@psf.upfronthosting.co.za> Message-ID: <1539154152.81.0.788709270274.issue23596@psf.upfronthosting.co.za> Change by Julien Palard : ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 03:07:36 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 10 Oct 2018 07:07:36 +0000 Subject: [issue5614] Malloc errors in test_io In-Reply-To: <1238450576.61.0.363286616174.issue5614@psf.upfronthosting.co.za> Message-ID: <1539155256.91.0.788709270274.issue5614@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The error is printed by libc, there's nothing we can do about that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 03:16:51 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 10 Oct 2018 07:16:51 +0000 Subject: [issue21109] tarfile: Traversal attack vulnerability In-Reply-To: <1396253659.12.0.842636239516.issue21109@psf.upfronthosting.co.za> Message-ID: <1539155811.37.0.788709270274.issue21109@psf.upfronthosting.co.za> Tal Einat added the comment: > Having said that, I am refactoring the tests right now since the test file is ~3000 lines and adding SafeTarFile tests for every TarFile test is cluttering it. This must be done without adding much test code and with minimal changes to the existing tests. That's why I referenced some existing places in our code where similar things are done in tests, please take a look at those. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 03:40:23 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Oct 2018 07:40:23 +0000 Subject: [issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error In-Reply-To: <1527069849.43.0.682650639539.issue33613@psf.upfronthosting.co.za> Message-ID: <1539157223.41.0.788709270274.issue33613@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset 3058b7d85697f95573fa042d6b9e4d6e2a9e739c by Pablo Galindo in branch 'master': bpo-33613: Fix test_semaphore_tracker signal tests when using -Werror (GH-9778) https://github.com/python/cpython/commit/3058b7d85697f95573fa042d6b9e4d6e2a9e739c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 04:04:55 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 10 Oct 2018 08:04:55 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1539158695.71.0.788709270274.issue34751@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > it will typically change only the last two bits of the final result Which is great if all that you care about is avoiding collisions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 04:05:41 2018 From: report at bugs.python.org (Alberto Moral) Date: Wed, 10 Oct 2018 08:05:41 +0000 Subject: [issue34951] cookielib/cookiejar cookies' Expires date parse fails with long month names Message-ID: <1539158741.03.0.788709270274.issue34951@psf.upfronthosting.co.za> New submission from Alberto Moral : http.cookiejar (cookielib, for python2.*) does not parse some cookies' Expires date. For example: "Friday, 1-August-1997 00:00:00 GMT" does not work (while: "Fri, 01 Aug 1997 00:00:00 GMT" works fine) This is basically due to long names of months (it is compared with MONTHS_LOWER: list of 3-letter months). So, I propose a small change in the definition of LOOSE_HTTP_DATE_RE (see fifth line): LOOSE_HTTP_DATE_RE = re.compile( r"""^ (\d\d?) # day (?:\s+|[-\/]) (\w{3})\w* # month (3 first letters only) ... Instead of: LOOSE_HTTP_DATE_RE = re.compile( r"""^ (\d\d?) # day (?:\s+|[-\/]) (\w+) # month ... I've tested only http.cookiejar (python 3.6), but I suposse the same change will work on cookielib Thanks in advance ---------- components: Library (Lib) messages: 327461 nosy: alb_moral priority: normal severity: normal status: open title: cookielib/cookiejar cookies' Expires date parse fails with long month names type: behavior versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 04:18:02 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Oct 2018 08:18:02 +0000 Subject: [issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error In-Reply-To: <1527069849.43.0.682650639539.issue33613@psf.upfronthosting.co.za> Message-ID: <1539159482.32.0.788709270274.issue33613@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 04:40:35 2018 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Oct 2018 08:40:35 +0000 Subject: [issue34935] Misleading error message in str.decode() In-Reply-To: <1539013100.29.0.545547206417.issue34935@psf.upfronthosting.co.za> Message-ID: <1539160835.62.0.788709270274.issue34935@psf.upfronthosting.co.za> Change by Ezio Melotti : ---------- assignee: -> ezio.melotti resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 04:51:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Oct 2018 08:51:06 +0000 Subject: [issue34945] regression with ./python -m test and pdb In-Reply-To: <1539094779.54.0.545547206417.issue34945@psf.upfronthosting.co.za> Message-ID: <1539161466.84.0.788709270274.issue34945@psf.upfronthosting.co.za> STINNER Victor added the comment: More generally, previously it was possible to add print("HERE") in tests. I use that often do debug tests. Now, the output is hidden, I don't understand the rationale for hiding the output. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 05:15:45 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 10 Oct 2018 09:15:45 +0000 Subject: [issue34948] Document __warningregister__ In-Reply-To: <1539148261.39.0.788709270274.issue34948@psf.upfronthosting.co.za> Message-ID: <20181010091537.GX3817@ando.pearwood.info> Steven D'Aprano added the comment: On Wed, Oct 10, 2018 at 05:11:01AM +0000, Serhiy Storchaka wrote: > I don't think that it is necessary to state its format. It is an > opaque dictionary, and its format is an implementation detail. There is at least one use-case for wanting to manipulate the registry: https://redd.it/9mqb45 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 05:55:34 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 10 Oct 2018 09:55:34 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1539165334.18.0.788709270274.issue28397@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- nosy: +sir-sigurd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 06:06:12 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Wed, 10 Oct 2018 10:06:12 +0000 Subject: [issue34748] Incorrect HTML link in functools.partial In-Reply-To: <1537442713.28.0.956365154283.issue34748@psf.upfronthosting.co.za> Message-ID: <1539165972.97.0.788709270274.issue34748@psf.upfronthosting.co.za> Lysandros Nikolaou added the comment: Can I submit a PR for this or is anybody else on it? ---------- nosy: +lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 06:35:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Oct 2018 10:35:16 +0000 Subject: [issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0` In-Reply-To: <1519722167.1.0.467229070634.issue32962@psf.upfronthosting.co.za> Message-ID: <1539167716.02.0.788709270274.issue32962@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9171 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 06:54:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Oct 2018 10:54:07 +0000 Subject: [issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0` In-Reply-To: <1519722167.1.0.467229070634.issue32962@psf.upfronthosting.co.za> Message-ID: <1539168847.84.0.788709270274.issue32962@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b274f1ce5c62dd517338b8323fb9eb5aaa09c7cd by Victor Stinner in branch '2.7': bpo-32962: Fix test_gdb failure in debug build with -mcet -fcf-protection -O0 (GH-9656) (GH-9788) https://github.com/python/cpython/commit/b274f1ce5c62dd517338b8323fb9eb5aaa09c7cd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 06:55:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Oct 2018 10:55:19 +0000 Subject: [issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0` In-Reply-To: <1519722167.1.0.467229070634.issue32962@psf.upfronthosting.co.za> Message-ID: <1539168919.93.0.788709270274.issue32962@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, the issue should now be fixed. Thanks Iryna Shcherbina for your bug report, and thanks Marcel Plch for your initial fix! Marcel: my final fix is based on yours, I just made the "next" conditional. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 08:03:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Oct 2018 12:03:32 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1539173012.32.0.788709270274.issue28397@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also PR 9784 where Raymond shown assempler code generated for two variants. There is the similar difference on 64-bit platform with GCC 7.3: $ gcc -O3 -o issue28397 issue28397-2.c $ time ./issue28397-2 0 real 0m2,740s user 0m2,739s sys 0m0,000s $ time ./issue28397-2 1 real 0m2,449s user 0m2,449s sys 0m0,000s But with GCC 8.2 there is not a difference. $ time ./issue28397-2 0 real 0m2,498s user 0m2,498s sys 0m0,000s $ time ./issue28397-2 1 real 0m2,500s user 0m2,496s sys 0m0,004s Both versions generate the same code for tested functions, there are only minor differences in the main() function (some independent instructions are reordered). I don't know what is the cause of such difference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 08:39:43 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Oct 2018 12:39:43 +0000 Subject: [issue34906] Fix typo in the documentation In-Reply-To: <1538749042.1.0.545547206417.issue34906@psf.upfronthosting.co.za> Message-ID: <1539175183.94.0.788709270274.issue34906@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- pull_requests: +9172 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 08:47:30 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Oct 2018 12:47:30 +0000 Subject: [issue34906] Fix typo in the documentation In-Reply-To: <1538749042.1.0.545547206417.issue34906@psf.upfronthosting.co.za> Message-ID: <1539175650.26.0.788709270274.issue34906@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- pull_requests: +9173 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 09:08:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Oct 2018 13:08:25 +0000 Subject: [issue23420] python -m cProfile -s fails with non informative message In-Reply-To: <1423483542.47.0.873331461969.issue23420@psf.upfronthosting.co.za> Message-ID: <1539176905.36.0.788709270274.issue23420@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 09:14:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Oct 2018 13:14:13 +0000 Subject: [issue34952] Problems with the warningregistry() decorator in Lib/unittest/test/test_loader.py Message-ID: <1539177252.94.0.788709270274.issue34952@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : There are other issues in the warningregistry() decorator in Lib/unittest/test/test_loader.py. It contains a code: missing = [] saved = getattr(warnings, '__warningregistry__', missing).copy() ... if saved is missing: The problem is that the condition `saved is missing` is always false. If __warningregistry__ was absent, saved is `missing.copy()` which is a new empty list. As result, warnings.__warningregistry__ is set to [] after the test if it did not exist before the test. Other problem is that this decorator works with __warningregistry__ in the warnings module. It is changed only when warnings are emitted by the code of the warnings module. Is it intentional? I don't know any code that emits warnings in the warnings module. It is hard to understand what was the intention of this decorator. From initial it was not working and cause the decorated tests be silently skipped. This was fixed in issue27063, but now I am not sure that it works as intended. Tests continue to pass after removing it. ---------- components: Tests messages: 327468 nosy: barry, ezio.melotti, michael.foord, rbcollins, serhiy.storchaka priority: normal severity: normal status: open title: Problems with the warningregistry() decorator in Lib/unittest/test/test_loader.py versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 09:15:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Oct 2018 13:15:59 +0000 Subject: [issue34952] Problems with the warningregistry() decorator in Lib/unittest/test/test_loader.py In-Reply-To: <1539177252.94.0.788709270274.issue34952@psf.upfronthosting.co.za> Message-ID: <1539177359.67.0.788709270274.issue34952@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The decorator was added in issue16662. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 09:22:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Oct 2018 13:22:50 +0000 Subject: [issue24294] DeprecationWarnings should be visible by default in the interactive REPL In-Reply-To: <1432713990.67.0.935342603332.issue24294@psf.upfronthosting.co.za> Message-ID: <1539177770.28.0.788709270274.issue24294@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: After implementing PEP 565, are there reasons to keep this issue open? ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 09:31:52 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Oct 2018 13:31:52 +0000 Subject: [issue34839] doctest: Change example under warnings section In-Reply-To: <1538180284.16.0.545547206417.issue34839@psf.upfronthosting.co.za> Message-ID: <1539178312.27.0.788709270274.issue34839@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Raymond and Tim, I just updated the PR with your recommendations. Have a nice day, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 09:35:21 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Oct 2018 13:35:21 +0000 Subject: [issue34951] cookielib/cookiejar cookies' Expires date parse fails with long month names In-Reply-To: <1539158741.03.0.788709270274.issue34951@psf.upfronthosting.co.za> Message-ID: <1539178521.96.0.788709270274.issue34951@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 09:39:22 2018 From: report at bugs.python.org (Julien Palard) Date: Wed, 10 Oct 2018 13:39:22 +0000 Subject: [issue34906] Fix typo in the documentation In-Reply-To: <1538749042.1.0.545547206417.issue34906@psf.upfronthosting.co.za> Message-ID: <1539178762.63.0.788709270274.issue34906@psf.upfronthosting.co.za> Julien Palard added the comment: New changeset a4910c2498b15555d6ad61d5ae34ba991d61d6a3 by Julien Palard (St?phane Wirtel) in branch '3.7': [3.7] bpo-34906: Doc: Fix typos (2) (GH-9735) https://github.com/python/cpython/commit/a4910c2498b15555d6ad61d5ae34ba991d61d6a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 09:39:38 2018 From: report at bugs.python.org (Julien Palard) Date: Wed, 10 Oct 2018 13:39:38 +0000 Subject: [issue34906] Fix typo in the documentation In-Reply-To: <1538749042.1.0.545547206417.issue34906@psf.upfronthosting.co.za> Message-ID: <1539178778.25.0.788709270274.issue34906@psf.upfronthosting.co.za> Julien Palard added the comment: New changeset e7ebf1453beb1a40e65630897fa1e35a3c2d3ec1 by Julien Palard (St?phane Wirtel) in branch '3.6': [3.6] bpo-34906: Doc: Fix typos (2) (GH-9735) https://github.com/python/cpython/commit/e7ebf1453beb1a40e65630897fa1e35a3c2d3ec1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 09:39:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Oct 2018 13:39:39 +0000 Subject: [issue34948] Document __warningregister__ In-Reply-To: <1539136243.9.0.788709270274.issue34948@psf.upfronthosting.co.za> Message-ID: <1539178779.26.0.788709270274.issue34948@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And this case looks like playing with implementation details. The official way to make the specified warning emitted more than once is to use warnings.filterwarnings(): >>> import warnings >>> warnings.filterwarnings('always', "NOBODY expects the Spanish Inquisition!", UserWarning) >>> warnings.warn("NOBODY expects the Spanish Inquisition!") :1: UserWarning: NOBODY expects the Spanish Inquisition! >>> warnings.warn("NOBODY expects the Spanish Inquisition!") :1: UserWarning: NOBODY expects the Spanish Inquisition! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 10:01:11 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Oct 2018 14:01:11 +0000 Subject: [issue34951] cookielib/cookiejar cookies' Expires date parse fails with long month names In-Reply-To: <1539158741.03.0.788709270274.issue34951@psf.upfronthosting.co.za> Message-ID: <1539180071.61.0.788709270274.issue34951@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. As far as I can see from the RFC month seems to follow three letter code. Is there a part of RFC where Python is not compliant? I can't find any related issues or RFC links allowing month format specified in the report. Can you please add the relevant part of RFC or links if any? Date RFC 6265 5.1.1 : https://tools.ietf.org/html/rfc6265.html#section-5.1.1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 10:09:02 2018 From: report at bugs.python.org (Julien Palard) Date: Wed, 10 Oct 2018 14:09:02 +0000 Subject: [issue34906] Fix typo in the documentation In-Reply-To: <1538749042.1.0.545547206417.issue34906@psf.upfronthosting.co.za> Message-ID: <1539180542.85.0.788709270274.issue34906@psf.upfronthosting.co.za> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 10:22:13 2018 From: report at bugs.python.org (Matthew Belisle) Date: Wed, 10 Oct 2018 14:22:13 +0000 Subject: [issue34866] CGI DOS vulnerability via long post list In-Reply-To: <1538429007.97.0.545547206417.issue34866@psf.upfronthosting.co.za> Message-ID: <1539181333.65.0.788709270274.issue34866@psf.upfronthosting.co.za> Matthew Belisle added the comment: Sorry, looks like I forgot to attach example.py. Attaching now. ---------- Added file: https://bugs.python.org/file47861/example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 10:35:13 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 10 Oct 2018 14:35:13 +0000 Subject: [issue34878] Lock Objects documentation clarification In-Reply-To: <1538523706.16.0.545547206417.issue34878@psf.upfronthosting.co.za> Message-ID: <1539182113.37.0.788709270274.issue34878@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with Benjamin that the docs are reasonable as-is. ---------- nosy: +rhettinger resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 10:46:55 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 10 Oct 2018 14:46:55 +0000 Subject: [issue34926] Allow querying a Path's mime-type In-Reply-To: <1538978844.01.0.545547206417.issue34926@psf.upfronthosting.co.za> Message-ID: <1539182815.83.0.788709270274.issue34926@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 7e18deef652a9d413d5dbd19d61073ba7eb5460e by Antoine Pitrou (Mayank Asthana) in branch 'master': bpo-34926: Make mimetypes.guess_type accept os.PathLike objects (GH-9777) https://github.com/python/cpython/commit/7e18deef652a9d413d5dbd19d61073ba7eb5460e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 11:32:39 2018 From: report at bugs.python.org (Radek Podgorny) Date: Wed, 10 Oct 2018 15:32:39 +0000 Subject: [issue24209] Allow IPv6 bind in http.server In-Reply-To: <1431784485.93.0.0140060801451.issue24209@psf.upfronthosting.co.za> Message-ID: <1539185559.31.0.788709270274.issue24209@psf.upfronthosting.co.za> Change by Radek Podgorny : ---------- nosy: +rpodgorny _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 12:27:09 2018 From: report at bugs.python.org (twisteroid ambassador) Date: Wed, 10 Oct 2018 16:27:09 +0000 Subject: [issue34769] _asyncgen_finalizer_hook running in wrong thread In-Reply-To: <1537627184.81.0.956365154283.issue34769@psf.upfronthosting.co.za> Message-ID: <1539188829.89.0.788709270274.issue34769@psf.upfronthosting.co.za> Change by twisteroid ambassador : ---------- pull_requests: +9174 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 12:43:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Oct 2018 16:43:20 +0000 Subject: [issue34022] 6 tests fail using SOURCE_DATE_EPOCH env var In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1539189800.59.0.788709270274.issue34022@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a6b3ec5b6d4f6387820fccc570eea08b9615620d by Victor Stinner (Elvis Pranskevichus) in branch 'master': bpo-34022: Stop forcing of hash-based invalidation with SOURCE_DATE_EPOCH (GH-9607) https://github.com/python/cpython/commit/a6b3ec5b6d4f6387820fccc570eea08b9615620d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 12:43:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Oct 2018 16:43:20 +0000 Subject: [issue29708] support reproducible Python builds In-Reply-To: <1488540966.18.0.904677570473.issue29708@psf.upfronthosting.co.za> Message-ID: <1539189800.81.0.702299269573.issue29708@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a6b3ec5b6d4f6387820fccc570eea08b9615620d by Victor Stinner (Elvis Pranskevichus) in branch 'master': bpo-34022: Stop forcing of hash-based invalidation with SOURCE_DATE_EPOCH (GH-9607) https://github.com/python/cpython/commit/a6b3ec5b6d4f6387820fccc570eea08b9615620d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 12:53:18 2018 From: report at bugs.python.org (Ram Rachum) Date: Wed, 10 Oct 2018 16:53:18 +0000 Subject: [issue34953] Implement `mmap.mmap.__repr__` Message-ID: <1539190398.83.0.788709270274.issue34953@psf.upfronthosting.co.za> Change by Ram Rachum : ---------- components: Library (Lib) nosy: cool-RR priority: normal severity: normal status: open title: Implement `mmap.mmap.__repr__` type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 12:55:29 2018 From: report at bugs.python.org (Alex Corcoles) Date: Wed, 10 Oct 2018 16:55:29 +0000 Subject: [issue34954] Getting an email's subject is error-prone Message-ID: <1539190529.38.0.788709270274.issue34954@psf.upfronthosting.co.za> New submission from Alex Corcoles : Hi, This is something that has hit us a few times, as we write a significant quantity of software which parses email messages. The thing is, we use email.header.decode_header to decode the Subject: header and it is pretty common for headers to be word-wrapped. If they are, decode_header will return a string with newlines in it. This is something which is unexpected for many people, and can cause bugs which are very difficult to detect in code review or testing, as it's easy to not trigger wordwrapping if not done deliberately. We would humbly suggest to provide a friendly way to get an email's subject in the expected fashion (i.e. with no newlines) or point out this caveat in the docs (or maybe change decode_header to remove newlines itself). Kind regards, ?lex ---------- components: email messages: 327481 nosy: Alex Corcoles, barry, r.david.murray priority: normal severity: normal status: open title: Getting an email's subject is error-prone type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 13:17:17 2018 From: report at bugs.python.org (Alberto Moral) Date: Wed, 10 Oct 2018 17:17:17 +0000 Subject: [issue34951] cookielib/cookiejar cookies' Expires date parse fails with long month names In-Reply-To: <1539158741.03.0.788709270274.issue34951@psf.upfronthosting.co.za> Message-ID: <1539191837.32.0.788709270274.issue34951@psf.upfronthosting.co.za> Alberto Moral added the comment: Thanks for your answer. I have not found any RFCs with full month names either. I'm afraid I'm not an expert here. But the case is that I get them in my work. Here is an example of response header: HTTP/1.1 200 OK Server: Oracle-iPlanet-Web-Server/7.0 Date: Tue, 10 Oct 2018 14:29:44 GMT Version-auth-credencial: v.3.0.1 Iplanet - Sun Solaris - Contexto Multiple Set-cookie: JSESSIONIDE=Del; expires=Friday, 1-August-1997 00:00:00 GMT; domain=... I do not know if it's an old date format (?)... or if it is a quite rare case... I have created some previous bash scripts using wget and they work fine, but I have had problems with python3 (and requests module) till I realized this issue. And it was not very easy: I am very new with python :( That's the reason of my proposal. It's just to be coherent: if we compare 3 letters of a month with MONTHS_LOWER, let's use just 3 (first) letters. Perhaps modifying LOOSE_HTTP_DATE_RE is not a good idea. Another option could be to truncate the month variable (mon). It could be done inside the _str2time funtion, for example: def _str2time(day, mon, yr, hr, min, sec, tz): mon = mon[:3] # assure 3 letters yr = int(yr) Anyway, I'll try to find why those long month names appear. Thank you ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 13:26:07 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 10 Oct 2018 17:26:07 +0000 Subject: [issue34769] _asyncgen_finalizer_hook running in wrong thread In-Reply-To: <1537627184.81.0.956365154283.issue34769@psf.upfronthosting.co.za> Message-ID: <1539192367.14.0.788709270274.issue34769@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset a14dda5df62369d01db6c7519e73aae71d0e7cfe by Yury Selivanov (twisteroid ambassador) in branch '3.6': [3.6] bpo-34769: Thread safety for _asyncgen_finalizer_hook(). (GH-9716) (GH-9792) https://github.com/python/cpython/commit/a14dda5df62369d01db6c7519e73aae71d0e7cfe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 13:26:34 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Oct 2018 17:26:34 +0000 Subject: [issue34951] cookielib/cookiejar cookies' Expires date parse fails with long month names In-Reply-To: <1539158741.03.0.788709270274.issue34951@psf.upfronthosting.co.za> Message-ID: <1539192394.63.0.788709270274.issue34951@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: No problem, I am also not an expert and I just skimmed through the RFC and cannot find any point related to month full name. So I just wanted to check if there are any recent changes I am missing or if the server is configured to set cookie expiration with full month name since there was no related issues raised as far as I have searched in the bug tracker. I will wait for others comment on this. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 13:26:47 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 10 Oct 2018 17:26:47 +0000 Subject: [issue34769] _asyncgen_finalizer_hook running in wrong thread In-Reply-To: <1537627184.81.0.956365154283.issue34769@psf.upfronthosting.co.za> Message-ID: <1539192407.59.0.788709270274.issue34769@psf.upfronthosting.co.za> Yury Selivanov added the comment: I'll close this issue now. If you find another bug in how asyncio handles async generators please open a new one. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 13:27:07 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 10 Oct 2018 17:27:07 +0000 Subject: [issue34769] _asyncgen_finalizer_hook running in wrong thread In-Reply-To: <1537627184.81.0.956365154283.issue34769@psf.upfronthosting.co.za> Message-ID: <1539192427.92.0.788709270274.issue34769@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 13:38:50 2018 From: report at bugs.python.org (Alberto Moral) Date: Wed, 10 Oct 2018 17:38:50 +0000 Subject: [issue34951] cookielib/cookiejar cookies' Expires date parse fails with long month names In-Reply-To: <1539158741.03.0.788709270274.issue34951@psf.upfronthosting.co.za> Message-ID: <1539193130.38.0.788709270274.issue34951@psf.upfronthosting.co.za> Alberto Moral added the comment: Yes, I was thinking that it could be a matter of configuration of the server (?). By the way, and just for fun, I've just realized that truncating mon at the begining of the _str2time funtion is a very bad idea because mon could also be an int. A better place is when looking the MONTHS_LOWER array index (and possible exception is handle): try: mon = MONTHS_LOWER.index(mon[:3].lower())+1 (perhaps in 2 sentences for clarity) OK, waiting for experts' comments. I'm really enjoying Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 13:41:15 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Oct 2018 17:41:15 +0000 Subject: [issue34954] Getting an email's subject is error-prone In-Reply-To: <1539190529.38.0.788709270274.issue34954@psf.upfronthosting.co.za> Message-ID: <1539193275.69.0.788709270274.issue34954@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 13:50:41 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Oct 2018 17:50:41 +0000 Subject: [issue34953] Implement `mmap.mmap.__repr__` Message-ID: <1539193841.95.0.788709270274.issue34953@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 14:05:41 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Oct 2018 18:05:41 +0000 Subject: [issue34954] Getting an email's subject is error-prone In-Reply-To: <1539190529.38.0.788709270274.issue34954@psf.upfronthosting.co.za> Message-ID: <1539194741.14.0.788709270274.issue34954@psf.upfronthosting.co.za> R. David Murray added the comment: Use the new email policies in python3. It handles all the decoding for you. I'm afraid you are on your own for python2. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 14:21:25 2018 From: report at bugs.python.org (Alex Corcoles) Date: Wed, 10 Oct 2018 18:21:25 +0000 Subject: [issue34954] Getting an email's subject is error-prone In-Reply-To: <1539190529.38.0.788709270274.issue34954@psf.upfronthosting.co.za> Message-ID: <1539195685.42.0.788709270274.issue34954@psf.upfronthosting.co.za> Alex Corcoles added the comment: To clarify (and maybe help someone which might come across), you mean: In [1]: message_text = """To: alex at corcoles.net ...: Subject: ** ACKNOWLEDGEMENT Host Alert: archerc7.bcn.int.pdp7.net is DOWN ...: ** ...: User-Agent: Heirloom mailx 12.5 7/5/10 ...: MIME-Version: 1.0 ...: Content-Type: text/plain; charset=us-ascii ...: Content-Transfer-Encoding: 7bit ...: ...: ***** Nagios ***** ...: """ In [2]: import email In [4]: message = email.message_from_string(message_text) In [5]: message.get('Subject') Out[5]: '** ACKNOWLEDGEMENT Host Alert: archerc7.bcn.int.pdp7.net is DOWN\n **' In [7]: from email import policy In [8]: message = email.message_from_string(message_text, policy=policy.HTTP) In [9]: message.get('Subject') Out[9]: '** ACKNOWLEDGEMENT Host Alert: archerc7.bcn.int.pdp7.net is DOWN **' Yeah, there's a bundled policy that does what I need, but I think it's not very intuitive. I get that the stdlib is deliberately low level in these parts, and it's more of building block to create higher level libraries on top of that, but still I feel that getting an email's subject in a friendly fashion should be easy and intuitive in the stdlib, or the stdlib's docs should point out clearly to go and look for a higher level library because email is hard. OTOH, working with mail sucks and should be discouraged, so if you want to close this definitely I won't complain. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 15:28:14 2018 From: report at bugs.python.org (Mario) Date: Wed, 10 Oct 2018 19:28:14 +0000 Subject: [issue34725] Py_GetProgramFullPath() odd behaviour in Windows In-Reply-To: <1539130289.56.0.545547206417.issue34725@psf.upfronthosting.co.za> Message-ID: <0ba7d63a-70ae-6a0c-14e5-7409efbb7454@gmail.com> Mario added the comment: On 10/10/2018 01:11, Steve Dower wrote: > > Steve Dower added the comment: > > We'll need to bring in venv specialists to check whether using it outside of Py_Main() is valid. Or perhaps you could explain what you are actually trying to do? > Sure 1) Create a virtual environment ("python -m venv") 2) Activate 2) Pip install some modules 3) Try to use them form inside an embedded application (e.g. the one I attached) 4) Do it in Linux and Windows Result Works in Linux, fails in Windows. Reason in site.py https://github.com/python/cpython/blob/73870bfeb9cf350d84ee88bd25430c104b3c6191/Lib/site.py#L462 sys.executable is used to construct the correct search path. Looking at the sys.path from inside an embedded application is very instructive and you can see in the first post why the failure in windows. Andrea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 15:55:15 2018 From: report at bugs.python.org (Marnanel Thurman) Date: Wed, 10 Oct 2018 19:55:15 +0000 Subject: [issue34955] passing a dict to bytes() gives unhelpful error message Message-ID: <1539201315.54.0.788709270274.issue34955@psf.upfronthosting.co.za> New submission from Marnanel Thurman : bytes() doesn't accept a dict as parameter. If you attempt to pass one, you receive a TypeError with the baffling message "'str' object cannot be interpreted as an integer". >> bytes({'a':1}) Traceback (most recent call last): File "", line 1, in TypeError: 'str' object cannot be interpreted as an integer ---------- components: Interpreter Core messages: 327490 nosy: marnanel priority: normal severity: normal status: open title: passing a dict to bytes() gives unhelpful error message versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 16:27:23 2018 From: report at bugs.python.org (Martin Panter) Date: Wed, 10 Oct 2018 20:27:23 +0000 Subject: [issue34951] cookielib/cookiejar cookies' Expires date parse fails with long month names In-Reply-To: <1539158741.03.0.788709270274.issue34951@psf.upfronthosting.co.za> Message-ID: <1539203243.3.0.788709270274.issue34951@psf.upfronthosting.co.za> Martin Panter added the comment: RFC 6265 says that only the first three letters of the month are significant, and the rest of the token should be ignored. See : month = ( "jan" / "feb" / "mar" / "apr" / "may" / "jun" / "jul" / "aug" / "sep" / "oct" / "nov" / "dec" ) *OCTET I have not heard of an Expires field syntax with a numeric month. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 16:55:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Oct 2018 20:55:14 +0000 Subject: [issue34955] passing a dict to bytes() gives unhelpful error message In-Reply-To: <1539201315.54.0.788709270274.issue34955@psf.upfronthosting.co.za> Message-ID: <1539204914.12.0.788709270274.issue34955@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: bytes() accepts: 1. An integer. 2. An object supporting the buffer protocol. 3. An iterable of integers in the range 0 to 255. Dict is an iterable. But iterating it produces string object which cannot be interpreted as an integer. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 17:22:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Oct 2018 21:22:23 +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: <1539206543.18.0.788709270274.issue23867@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm a little bit sad that the PR doesn't add new tests :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 17:27:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Oct 2018 21:27:55 +0000 Subject: [issue34930] sha1module: Switch sha1 implementation to sha1dc/hardened sha1 In-Reply-To: <1538998622.72.0.545547206417.issue34930@psf.upfronthosting.co.za> Message-ID: <1539206874.99.0.788709270274.issue34930@psf.upfronthosting.co.za> STINNER Victor added the comment: I dislike modifying a hash function to return its output but keep the same name. For name, "SHA1" must remain "SHA1". If you want a variant, it should have a different name, but I would expect that the existing sha1 function remains unchanged. How do you keep the compatibility between different programming languages and applications if one use SHA1 and the other uses "hardened SHA-1"? One alternative is to stop using sha1 :-D > A large part of the industry has adopted Hardened SHA-1 ... Do you have examples? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 17:28:48 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Oct 2018 21:28:48 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1539206928.67.0.788709270274.issue34922@psf.upfronthosting.co.za> Ned Deily added the comment: We've reached the cutoff point for 3.7.1rc2 and 3.6.7rc2 and I don't see a PR or a resolution of this for either branch yet. If there's a chance for merged PRs in the next couple of hours, I'll wait a bit longer but otherwise these fixes will have to wait. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 17:37:59 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 10 Oct 2018 21:37:59 +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: <1539207479.54.0.788709270274.issue21880@psf.upfronthosting.co.za> Tal Einat added the comment: Update: I've nearly got an updated version ready and working based on the current master branch. I hope to have a PR up by tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 17:43:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Oct 2018 21:43:38 +0000 Subject: [issue34914] Clarify text encoding used to enable UTF-8 mode In-Reply-To: <1538813217.24.0.545547206417.issue34914@psf.upfronthosting.co.za> Message-ID: <1539207818.03.0.788709270274.issue34914@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm not sure that I understand your issue. There are 3 ways to enable the UTF-8 Mode: * if the LC_CTYPE locale is "C" or "POSIX" * if PYTHONUTF8 env var is equal to "1" * using -X utf8 or -X utf8=1 command line option For the first 2 cases are fine if the locale encoding is gb18030. For the command line argument, first Python decodes the command line from gb18030. If -X utf8 is present, the command line is decoded again from UTF-8 (and the old configuration is removed, to parse the new configuration). I understand that your question if is decoding the command line argument from gb18030 can miss -X utf8 or enable UTF-8 by mistake. It seems like gb18030 encodes "-X utf8" text the same way than ASCII: >>> "-X utf8".encode("gb18030") b'-X utf8' >>> b'-X utf8'.decode("gb18030") '-X utf8' I'm aware of mojibake causing a security issue, but it was for a function checking for a single byte, not a substring: https://unicodebook.readthedocs.io/issues.html#check-byte-strings-before-decoding-them-to-character-strings I don't know well gb18030, so maybe I missed something. To me, using gb18030 with the UTF-8 mode doesn't seem to cause any issue to decode the command line arguments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 17:47:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Oct 2018 21:47:34 +0000 Subject: [issue34914] Clarify text encoding used to enable UTF-8 mode In-Reply-To: <1538813217.24.0.545547206417.issue34914@psf.upfronthosting.co.za> Message-ID: <1539208054.87.0.788709270274.issue34914@psf.upfronthosting.co.za> STINNER Victor added the comment: Well, I'm not saying that using gb18030 with UTF-8 will be just fine for everything. Mojibake is likely around the corner :-) C locale coercion and the UTF-8 mode are workarounds for the crappy and wild Unix world :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 18:05:12 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Oct 2018 22:05:12 +0000 Subject: [issue34954] Getting an email's subject is error-prone In-Reply-To: <1539190529.38.0.788709270274.issue34954@psf.upfronthosting.co.za> Message-ID: <1539209112.59.0.788709270274.issue34954@psf.upfronthosting.co.za> R. David Murray added the comment: The new policies *make* the email library that higher level library, that was pretty much the whole point :) I don't know how to make getting the fully decoded subject more intuitive than: msg['subject'] The fact that you have to specify a policy is due to backward compatibility concerns, and there's not really any way around that. That's the only difference between your two examples (other than the fact that the second one does what you want :). Note that you *really* want to be using message_from_bytes, and for email either policy.default or policy.SMTP. This *is* documented in the python3 docs. If you don't find them clear, then an issue to improve the docs would be welcome. Since python2 is approaching EOL, we could also start transitioning to policy.default actually being the *default*. That will take two release cycles (one that will generate a deprecation notice that the default is going to change, and another that will actually make the change). ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 18:11:54 2018 From: report at bugs.python.org (Antoine Pietri) Date: Wed, 10 Oct 2018 22:11:54 +0000 Subject: [issue34930] sha1module: Switch sha1 implementation to sha1dc/hardened sha1 In-Reply-To: <1539206874.99.0.788709270274.issue34930@psf.upfronthosting.co.za> Message-ID: Antoine Pietri added the comment: On Wed, Oct 10, 2018 at 11:27 PM STINNER Victor wrote: > I dislike modifying a hash function to return its output but keep the same name. For name, "SHA1" must remain "SHA1". If you want a variant, it should have a different name, but I would expect that the existing sha1 function remains unchanged. How do you keep the compatibility between different programming languages and applications if one use SHA1 and the other uses "hardened SHA-1"? Well, as I said we could almost consider both algorithms to be "compatible", in that they only differ in an infinitesimally small number of cases that were specifically *designed* to break SHA1. I agree it's not ideal to just replace the function directly, and that's why I suggested 4 possible alternatives. But you have to understand that the decision is not as simple as just "it doesn't give the same outputs so it should have a different name", because it *does* give the same outputs in *all of the cases that weren't designed to break it*, and the tradeoff for not making that the default is that most people who don't care about seeing the collisions happen will keep using a broken implementation for no reason. I'm not saying I disagree with you here, I'm just making sure you're aware of the tradeoff. If we make it the default, it's a *very slight* break of backwards compatibility, but it will be a positive change for 99.99% of users. The only affected people will be the ones that were writing scripts to check whether collisions did exist in the old algorithm, and if we change the name of the "classic sha1" they could trivially change it themselves. That said, if you'd rather have another name for it, it also works for me, it's better than having nothing. > One alternative is to stop using sha1 :-D Totally agree with you here, but it's not always an option, so I'd argue we should do our best to mitigate the problem. > Do you have examples? I already gave the Git example: https://github.com/git/git/commit/28dc98e343ca4eb370a29ceec4c19beac9b5c01e#diff-a44b837d82653a78649b57443ba99460 Fossil also migrated to it: https://www.fossil-scm.org/xfer/doc/trunk/www/hashpolicy.wiki The truth is, most of the other Merkle Tree implementations (like Bitcoin) were using a different hash in the first place, and that seems to be the main application where you have to keep backward compatibility with your hashes. So the fact that two of the main SHA-1 Merkle tree implementations moved to Hardened SHA-1 is huge, IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 18:22:11 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 10 Oct 2018 22:22:11 +0000 Subject: [issue34955] passing a dict to bytes() gives unhelpful error message In-Reply-To: <1539201315.54.0.788709270274.issue34955@psf.upfronthosting.co.za> Message-ID: <1539210131.92.0.788709270274.issue34955@psf.upfronthosting.co.za> Eric V. Smith added the comment: You can in fact pass a dict to bytes(), as long as the keys are ints in the correct range: >>> bytes({0:10, 1:20}) b'\x00\x01' I'm not claiming it's very useful, but it does conform to the docs. I'm not sure the error message can be improved, so I suggest closing this issue. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 19:45:24 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Oct 2018 23:45:24 +0000 Subject: [issue12978] Figure out extended attributes on BSDs In-Reply-To: <1316014526.21.0.982877507813.issue12978@psf.upfronthosting.co.za> Message-ID: <1539215124.87.0.788709270274.issue12978@psf.upfronthosting.co.za> Ned Deily added the comment: On 2018-10-02, worr asked on the python-dev mailing list: > Can I get a review for GH-1690[PR 1690]? It fixes bpo-12978 and > has been sitting for a handful of years now. This adds > support for os.*xattr on DragonflyBSD, FreeBSD and NetBSD. ---------- versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 19:48:52 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 10 Oct 2018 23:48:52 +0000 Subject: [issue34953] Implement `mmap.mmap.__repr__` Message-ID: <1539215332.4.0.788709270274.issue34953@psf.upfronthosting.co.za> New submission from Eric V. Smith : What do you propose the repr would look like? ---------- components: +Interpreter Core -Library (Lib) nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 19:54:39 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 10 Oct 2018 23:54:39 +0000 Subject: [issue26467] Add async magic method support to unittest.mock.Mock In-Reply-To: <1456872706.59.0.97059255221.issue26467@psf.upfronthosting.co.za> Message-ID: <1539215679.18.0.788709270274.issue26467@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 22:43:45 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 11 Oct 2018 02:43:45 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1539225825.8.0.788709270274.issue34576@psf.upfronthosting.co.za> Senthil Kumaran added the comment: New changeset 1d26c72e6a9c5b28b27c158f2f196217707dbb0f by Senthil Kumaran (Felipe Rodrigues) in branch 'master': bpo-34576 warn users on security for http.server (#9720) https://github.com/python/cpython/commit/1d26c72e6a9c5b28b27c158f2f196217707dbb0f ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 22:43:46 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 11 Oct 2018 02:43:46 +0000 Subject: [issue26005] Denial of Service in SimpleHTTPServer and BaseHTTPServer In-Reply-To: <1451897650.58.0.64883073344.issue26005@psf.upfronthosting.co.za> Message-ID: <1539225826.15.0.702299269573.issue26005@psf.upfronthosting.co.za> Senthil Kumaran added the comment: New changeset 1d26c72e6a9c5b28b27c158f2f196217707dbb0f by Senthil Kumaran (Felipe Rodrigues) in branch 'master': bpo-34576 warn users on security for http.server (#9720) https://github.com/python/cpython/commit/1d26c72e6a9c5b28b27c158f2f196217707dbb0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 22:44:21 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Oct 2018 02:44:21 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1539225861.25.0.788709270274.issue34576@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9176 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 22:44:21 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Oct 2018 02:44:21 +0000 Subject: [issue26005] Denial of Service in SimpleHTTPServer and BaseHTTPServer In-Reply-To: <1451897650.58.0.64883073344.issue26005@psf.upfronthosting.co.za> Message-ID: <1539225861.51.0.663665092547.issue26005@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9177 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 22:44:28 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Oct 2018 02:44:28 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1539225868.31.0.788709270274.issue34576@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9178 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 22:44:28 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Oct 2018 02:44:28 +0000 Subject: [issue26005] Denial of Service in SimpleHTTPServer and BaseHTTPServer In-Reply-To: <1451897650.58.0.64883073344.issue26005@psf.upfronthosting.co.za> Message-ID: <1539225868.46.0.663665092547.issue26005@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9179 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 23:10:54 2018 From: report at bugs.python.org (Gus Goulart) Date: Thu, 11 Oct 2018 03:10:54 +0000 Subject: [issue34203] documentation: recommend Python 3 over 2 in faq In-Reply-To: <1532397328.96.0.56676864532.issue34203@psf.upfronthosting.co.za> Message-ID: <1539227454.92.0.788709270274.issue34203@psf.upfronthosting.co.za> Change by Gus Goulart : ---------- keywords: +patch pull_requests: +9180 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 23:17:13 2018 From: report at bugs.python.org (Gus Goulart) Date: Thu, 11 Oct 2018 03:17:13 +0000 Subject: [issue34203] documentation: recommend Python 3 over 2 in faq In-Reply-To: <1532397328.96.0.56676864532.issue34203@psf.upfronthosting.co.za> Message-ID: <1539227833.64.0.788709270274.issue34203@psf.upfronthosting.co.za> Gus Goulart added the comment: Thanks for pointing that out. If you don't mind, I have created a PR to address your requests. ---------- nosy: +gus, taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 23:29:08 2018 From: report at bugs.python.org (Kevin Walzer) Date: Thu, 11 Oct 2018 03:29:08 +0000 Subject: [issue34956] 3.7.0 _tkinter module links against /System/Library/Frameworks Message-ID: <1539228548.05.0.788709270274.issue34956@psf.upfronthosting.co.za> New submission from Kevin Walzer : I'm trying to build Python 3.7.0 on macOS 10.14, and Tkinter is not linking to my installation of Tcl/Tk 8.6.8 in /Library/Frameworks. Instead it is linking to the ancient 8.5 Tk installed in /System/Library/Frameworks. My usual way of forcing Python to link to my installation is to edit setup.py and comment out all search directories except /Library/Frameworks, but that seems to be ignored here. My basic invocation is "./configure --enable-framework" which, along with omitting the system libraries from setup.py, has always been sufficient in the past. Please advise. ---------- components: macOS messages: 327508 nosy: ned.deily, ronaldoussoren, wordtech priority: normal severity: normal status: open title: 3.7.0 _tkinter module links against /System/Library/Frameworks versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 23:31:34 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Oct 2018 03:31:34 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1539228694.21.0.788709270274.issue34576@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3baee3b39765f5e8ec616b2b71b731b140486394 by Miss Islington (bot) in branch '3.6': bpo-34576 warn users on security for http.server (GH-9720) https://github.com/python/cpython/commit/3baee3b39765f5e8ec616b2b71b731b140486394 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 23:31:34 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Oct 2018 03:31:34 +0000 Subject: [issue26005] Denial of Service in SimpleHTTPServer and BaseHTTPServer In-Reply-To: <1451897650.58.0.64883073344.issue26005@psf.upfronthosting.co.za> Message-ID: <1539228694.4.0.702299269573.issue26005@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3baee3b39765f5e8ec616b2b71b731b140486394 by Miss Islington (bot) in branch '3.6': bpo-34576 warn users on security for http.server (GH-9720) https://github.com/python/cpython/commit/3baee3b39765f5e8ec616b2b71b731b140486394 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 23:40:23 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Oct 2018 03:40:23 +0000 Subject: [issue34930] sha1module: Switch sha1 implementation to sha1dc/hardened sha1 In-Reply-To: <1538998622.72.0.545547206417.issue34930@psf.upfronthosting.co.za> Message-ID: <1539229223.83.0.788709270274.issue34930@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Assigning to Christian to make the call. +1 for option #1, replacing sha1 implementation with the harden version, helping us move close to more-secure-by-default. ---------- assignee: -> christian.heimes nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 23:55:37 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Oct 2018 03:55:37 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1539230137.72.0.788709270274.issue34576@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 57038bcb24407abbbb46e6d278d0ab4b6ad25bbf by Miss Islington (bot) in branch '3.7': bpo-34576 warn users on security for http.server (GH-9720) https://github.com/python/cpython/commit/57038bcb24407abbbb46e6d278d0ab4b6ad25bbf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 10 23:55:37 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Oct 2018 03:55:37 +0000 Subject: [issue26005] Denial of Service in SimpleHTTPServer and BaseHTTPServer In-Reply-To: <1451897650.58.0.64883073344.issue26005@psf.upfronthosting.co.za> Message-ID: <1539230137.9.0.702299269573.issue26005@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 57038bcb24407abbbb46e6d278d0ab4b6ad25bbf by Miss Islington (bot) in branch '3.7': bpo-34576 warn users on security for http.server (GH-9720) https://github.com/python/cpython/commit/57038bcb24407abbbb46e6d278d0ab4b6ad25bbf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 00:35:20 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Oct 2018 04:35:20 +0000 Subject: [issue34955] passing a dict to bytes() gives unhelpful error message In-Reply-To: <1539201315.54.0.788709270274.issue34955@psf.upfronthosting.co.za> Message-ID: <1539232520.37.0.788709270274.issue34955@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I'm not sure the error message can be improved, so I suggest closing this issue. I concur. ---------- assignee: -> rhettinger nosy: +rhettinger resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 00:41:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Oct 2018 04:41:07 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1539232867.76.0.788709270274.issue34922@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 9b8c2e767643256202bb11456ba8665593b9a500 by Serhiy Storchaka in branch 'master': bpo-34922: Fix integer overflow in the digest() and hexdigest() methods (GH-9751) https://github.com/python/cpython/commit/9b8c2e767643256202bb11456ba8665593b9a500 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 00:41:25 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Oct 2018 04:41:25 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1539232885.52.0.788709270274.issue34922@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9182 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 00:49:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Oct 2018 04:49:10 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1539233350.67.0.788709270274.issue34922@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9183 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 00:56:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Oct 2018 04:56:11 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1539233771.64.0.788709270274.issue33729@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f543e18708efb04ed3a0b78c8dc31fbb1404ac7d by Serhiy Storchaka in branch '3.6': [3.6] bpo-33729: Fix issues with arguments parsing in hashlib. (GH-8346) (GH-8581) (GH-9657) https://github.com/python/cpython/commit/f543e18708efb04ed3a0b78c8dc31fbb1404ac7d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 00:57:46 2018 From: report at bugs.python.org (Ram Rachum) Date: Thu, 11 Oct 2018 04:57:46 +0000 Subject: [issue34953] Implement `mmap.mmap.__repr__` In-Reply-To: <1539215332.4.0.788709270274.issue34953@psf.upfronthosting.co.za> Message-ID: <1539233866.17.0.788709270274.issue34953@psf.upfronthosting.co.za> Ram Rachum added the comment: There are a few ways we can go with this, depending on how verbose we want to be and how willing we are to make calls to the data. Here are a few pieces of information we could expose: - Length - Whether it's a file or anonymous memory - The entire contents - The clipped contents - Whether it's opened or closed - The access type So here's an example: And another: I don't know whether we're able to include the file name on there, that would be nice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 01:06:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Oct 2018 05:06:40 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1539234400.2.0.788709270274.issue34922@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8b040e55395b37bdb8fd4ec85a270cfc9ec95307 by Serhiy Storchaka in branch '3.7': [3.7] bpo-34922: Fix integer overflow in the digest() and hexdigest() methods (GH-9751) (GH-9798) https://github.com/python/cpython/commit/8b040e55395b37bdb8fd4ec85a270cfc9ec95307 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 01:06:50 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Oct 2018 05:06:50 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1539234410.91.0.788709270274.issue34922@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9184 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 01:37:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Oct 2018 05:37:41 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1539236261.97.0.788709270274.issue34922@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 69e6ad6cdfa28a7b8e7b8780b07dfcdbfb0e7030 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': [3.6] bpo-34922: Fix integer overflow in the digest() and hexdigest() methods (GH-9751) (GH-9798) (GH-9801) https://github.com/python/cpython/commit/69e6ad6cdfa28a7b8e7b8780b07dfcdbfb0e7030 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 01:49:25 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Oct 2018 05:49:25 +0000 Subject: [issue34955] passing a dict to bytes() gives unhelpful error message In-Reply-To: <1539201315.54.0.788709270274.issue34955@psf.upfronthosting.co.za> Message-ID: <1539236965.8.0.788709270274.issue34955@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 02:50:00 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Thu, 11 Oct 2018 06:50:00 +0000 Subject: [issue34095] [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault In-Reply-To: <1531314252.99.0.56676864532.issue34095@psf.upfronthosting.co.za> Message-ID: <1539240600.75.0.788709270274.issue34095@psf.upfronthosting.co.za> Chih-Hsuan Yen added the comment: I got a similar error and managed to fix it by installing the noto-fonts package [1]. ttf-dejavu [2] works, too. I guess at least one font should be installed to allow those tests to run. [1] https://www.archlinux.org/packages/extra/any/noto-fonts/ [2] https://www.archlinux.org/packages/extra/any/ttf-dejavu/ ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 03:04:36 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Thu, 11 Oct 2018 07:04:36 +0000 Subject: [issue34095] [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault In-Reply-To: <1531314252.99.0.56676864532.issue34095@psf.upfronthosting.co.za> Message-ID: <1539241476.58.0.788709270274.issue34095@psf.upfronthosting.co.za> Chih-Hsuan Yen added the comment: Here is partial backtrace from commit 1d26c72e6a9c5b28b27c158f2f196217707dbb0f: #0 0x00007ffff6763197 in GetTkFontAttributes (faPtr=faPtr at entry=0x555555cd91e8, ftFont=) at /usr/src/debug/tk8.6.8/unix/../unix/tkUnixRFont.c:167 #1 0x00007ffff67639fa in InitFont (tkwin=tkwin at entry=0x555555ee94a0, pattern=pattern at entry=0x555555cfc690, fontPtr=0x555555cd91b0, fontPtr at entry=0x0) at /usr/src/debug/tk8.6.8/unix/../unix/tkUnixRFont.c:313 #2 0x00007ffff6763c4e in TkpGetFontFromAttributes (tkFontPtr=tkFontPtr at entry=0x0, tkwin=tkwin at entry=0x555555ee94a0, faPtr=0x555555d1e8b8) at /usr/src/debug/tk8.6.8/unix/../unix/tkUnixRFont.c:482 #3 0x00007ffff66b5ee2 in Tk_AllocFontFromObj (interp=0x555555c4b900, tkwin=tkwin at entry=0x555555ee94a0, objPtr=0x555555e39000) at /usr/src/debug/tk8.6.8/unix/../generic/tkFont.c:1158 #4 0x00007ffff66ac053 in DoObjConfig (interp=interp at entry=0x555555c4b900, recordPtr=recordPtr at entry=0x555555e53390 "0r\354UUU", optionPtr=optionPtr at entry=0x555555f4e010, valuePtr=, valuePtr at entry=0x555555e39000, tkwin=tkwin at entry=0x555555ee94a0, savedOptionPtr=savedOptionPtr at entry=0x0) at /usr/src/debug/tk8.6.8/unix/../generic/tkConfig.c:717 #5 0x00007ffff66ace92 in Tk_InitOptions (interp=interp at entry=0x555555c4b900, recordPtr=recordPtr at entry=0x555555e53390 "0r\354UUU", optionTable=optionTable at entry=0x555555f4de10, tkwin=0x555555ee94a0) at /usr/src/debug/tk8.6.8/unix/../generic/tkConfig.c:496 #6 0x00007ffff67250b2 in CreateWidget (sharedPtr=0x555555ec7230, tkwin=, interp=0x555555c4b900, parent=, objc=, objv=) at /usr/src/debug/tk8.6.8/unix/../generic/tkText.c:664 #7 0x00007ffff62efe16 in TclNRRunCallbacks () from /usr/lib/libtcl8.6.so #8 0x00007ffff67eba0c in Tkapp_Call (selfptr=0x7ffff40242b0, args=) at /home/yen/Projects/cpython/Modules/_tkinter.c:1508 Looks more like a Tk issue than a CPython one. For Arch Linux packagers: adding checkdepends=('ttf-font') to PKGBUILD can fix testing errors. Here's an example: https://github.com/archlinuxcn/repo/commit/e4de4598bccd44ba38c37854dc5edfb490dbe09a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 03:42:52 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Oct 2018 07:42:52 +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: <1539243772.03.0.788709270274.issue21880@psf.upfronthosting.co.za> Change by Tal Einat : ---------- pull_requests: +9185 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 03:44:33 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 11 Oct 2018 07:44:33 +0000 Subject: [issue34956] _tkinter built on macOS 10.14 does not link to Tcl and Tk in /Library/Frameworks In-Reply-To: <1539228548.05.0.788709270274.issue34956@psf.upfronthosting.co.za> Message-ID: <1539243873.69.0.788709270274.issue34956@psf.upfronthosting.co.za> Ned Deily added the comment: macOS 10.14 appears to have introduced some subtle differences in the search order for finding header files and/or frameworks and libraries. I'm not 100% sure I understand completely what has changed but I'm confident that the workaround outlined below should get you going until we have a better solution (but beware of the potential gotcha). Python has never fully supported building only from an Xcode-only installation, i.e. we have required at a minimum installing system header files into /usr/include et al by using "xcode-select --install". As of 10.14, xcode-select no longer installs header files in /usr/include. So that further cripples Python builds in that header files for several third-party libraries shipped with macOS are no longer found, like zlib and sqlite3. When using an Xcode-only installation (no Command Line Tools) in previous releases of macOS, I believe it was the case that essentially the system root directory ('/') was searched by the compiler tool chain for header files, for libraries, and for frameworks, and for frameworks the long standard fallback framework search path order was honored by default: first search /Library/Frameworks, then /System/Library/Frameworks. That worked fine if you were installing frameworks like Tcl and TK into /Library/Frameworks and wanting them to override the system ones. If you did not install the Command Line Tools, then the tool chain used the MacOSX.sdk embedded in Xcode.app as the system root for searching. By default, that's found in: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk With an unmodified Xcode install, that directory contains usr and System directories but no Library. So the contents of /Library were ignored by the tool chain with the net effect that _tkinter builds would also link with the Apple-supplied Tcl and Tk 8.5 in /System/Library/Frameworks. With 10.14, Xcode-only installs still work the same way but now Command Line Tools seem to effectively use the SDK embedded in /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk as the system root, rather than the system /. Just like the Xcode copy of the sdk, the CLT copy does not have a Library directory so now the results are the same as Xcode-only builds: _tkinter only links with the /System/Library Tcl and Tk. From the viewpoint of developers trying to build applications for distribution to others, it makes sense to try to ensure that /Library does not influence the build because /Library is under user control, not the system (Apple). Until we "recently" started shipping our private version of Tcl and Tk 8.6.x, which we do not install to /Library btw, it made sense to default to linking to /Library and falling back to /System/Library, allowing optional use of a third-party Tcl/Tk (like from ActiveState) and it all sort of worked if you used the tool chain from the CLT. But with 10.14, that no longer works. Python's build system complicates this all in large part because the top-level setup.py tries to guess what directories the compiler tool chain are going to search; that was always kind of iffy and now it's much more broken with macOS 10.14. There are ways to work around most of the issues but we need to have better default behavior. That's kind of a bigger deal. For the specific case of building _tkinter to link with Tcl and Tk frameworks in /Library, I think the easiest workaround is to add a Library symlink to the SDK in use, either under /Library/Developer/CommandTools or /Applications/Xcode.app. "xcode-select --print-path" will show which one is in use, but, alas, not the full path to the SDK. either: $ xcode-select --print-path /Library/Developer/CommandLineTools $ cd /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/ or: $ xcode-select --print-path /Applications/Xcode.app/Contents/Developer $ xcodebuild -version -sdk macosx Path /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk $ cd $(xcodebuild -version -sdk macosx Path) You can then carefully create a symlink from the SDK to /Library. $ sudo ln -s /Library . Now the Python builds should find the Current version of Tcl and Tk frameworks in /Library. *But* be aware that this might affect other builds if there are other frameworks you have installed in /Library. So this workaround should be used with caution and you might consider removing the symlink once you are done building Python. There are other, more complicated workarounds but this seems to me to be the simplest and most foolproof as long as one is aware of the risks and is prepared to potentially recreate the Library symlink after software updates to Xcode or the Command Line Tools. ---------- assignee: -> ned.deily priority: normal -> high title: 3.7.0 _tkinter module links against /System/Library/Frameworks -> _tkinter built on macOS 10.14 does not link to Tcl and Tk in /Library/Frameworks versions: +Python 2.7, Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 03:44:39 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Oct 2018 07:44:39 +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: <1539243879.13.0.788709270274.issue21880@psf.upfronthosting.co.za> Tal Einat added the comment: See PR9802. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 03:51:45 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 11 Oct 2018 07:51:45 +0000 Subject: [issue34956] _tkinter built on macOS 10.14 does not link to Tcl and Tk in /Library/Frameworks In-Reply-To: <1539228548.05.0.788709270274.issue34956@psf.upfronthosting.co.za> Message-ID: <1539244305.44.0.788709270274.issue34956@psf.upfronthosting.co.za> Ned Deily added the comment: Correction: in the original second paragraph, the fourth sentence obviously has the case backwards. It should read: "When using a *Command Line Tools installation (no Xcode)* in previous releases of macOS, I believe it was the case that essentially the system root directory ('/') was searched by the compiler tool chain for header files, for libraries, and for frameworks, and for frameworks the long standard fallback framework search path order was honored by default: first search /Library/Frameworks, then /System/Library/Frameworks. [...]" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 03:59:17 2018 From: report at bugs.python.org (Alex Corcoles) Date: Thu, 11 Oct 2018 07:59:17 +0000 Subject: [issue34954] Getting an email's subject is error-prone In-Reply-To: <1539190529.38.0.788709270274.issue34954@psf.upfronthosting.co.za> Message-ID: <1539244757.02.0.788709270274.issue34954@psf.upfronthosting.co.za> Alex Corcoles added the comment: Well, I think that having to choose the "HTTP" policy to get a message subject's without newlines goes against the expectations of anyone who is not well knowledgeable of email. It's not very easy to deduct that, out of all the available policies, HTTP is the one that has this effect (or writing your own). It's not obvious that a subject can have newlines, as I don't think I've ever seen a MUA that does not hide them. You can be bitten quite easily by that (we have, more than once). It's the stdlib's maintainers' prerrogative to decide that they are going to provide low-level libraries (and in general, I agree with that, high-level stdlibs have a lot of problems), but at least I'd include some warning like: "Email is an old and annoying protocol, and parsing email is full of annoyances and exceptions. email provides low-level building blocks to handle email in detail. If you want high-level processing we advise you to look at libraries that build on it". In any case, email.policy provides more hints as to headers being wordwrapped, and while it's not ideal, it certainly is an improvement WRT to Python 2, so this bug has helped me and I hope maybe someone will read it when Googling for the same problem, so while I think some more could be done, if you close this I won't complain. Thanks, ?lex ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 04:32:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Oct 2018 08:32:16 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1539246736.71.0.788709270274.issue34576@psf.upfronthosting.co.za> STINNER Victor added the comment: The render is surprising: it looks like the full documentation is part of the ? Security Considerations: https://docs.python.org/dev/library/http.server.html#security-considerations I suggest to add a new title for the rest of the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 05:43:26 2018 From: report at bugs.python.org (Stefan Rink) Date: Thu, 11 Oct 2018 09:43:26 +0000 Subject: [issue34957] Segementation faults on ARM and ARM64 Message-ID: <1539251006.2.0.788709270274.issue34957@psf.upfronthosting.co.za> New submission from Stefan Rink : When trying to run dask distributed on ARM you will end with a segmentation fault on multiple in multiple tests; Works on AMD64 but does not work on ARM or AARCH64 and results in a Signal 11. Example; # python Python 3.6.6 (default, Sep 29 2018, 05:50:41) [GCC 4.2.1 Compatible FreeBSD Clang 6.0.1 (tags/RELEASE_601/final 335540)] on freebsd12 Type "help", "copyright", "credits" or "license" for more information. >>> from dask.distributed import Client >>> client = Client() Segmentation fault (core dumped) # gdb /usr/local/bin/python3.6 python3.6.core GNU gdb (GDB) 8.1 [GDB v8.1 for FreeBSD] Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "aarch64-portbld-freebsd12.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/local/bin/python3.6...(no debugging symbols found)...done. [New LWP 101213] Core was generated by `python'. Program terminated with signal SIGSEGV, Segmentation fault. #0 testcancel (curthread=0x3e8) at /usr/src/lib/libthr/thread/thr_cancel.c:144 144 { (gdb) bt #0 testcancel (curthread=0x3e8) at /usr/src/lib/libthr/thread/thr_cancel.c:144 #1 _thr_cancel_enter (curthread=0x3e8) at /usr/src/lib/libthr/thread/thr_cancel.c:146 #2 0x00000000402a5b54 in __thr_connect (fd=3, name=0xffffffffd310, namelen=106) at /usr/src/lib/libthr/thread/thr_syscalls.c:179 #3 0x000000004240e23c in uuid_generate_time () from /usr/local/lib/libuuid.so.1 #4 0x0000000042382068 in ffi_call_SYSV () from /lib/libffi.so.6 #5 0x00000000423822c8 in ffi_call () from /lib/libffi.so.6 #6 0x000000004234664c in _ctypes_callproc () from /usr/local/lib/python3.6/lib-dynload/_ctypes.so #7 0x00000000423403f0 in ?? () from /usr/local/lib/python3.6/lib-dynload/_ctypes.so #8 0x00000000422f5720 in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) ---------- components: Build, Cross-Build, FreeBSD, ctypes messages: 327527 nosy: Alex.Willmer, koobs, stefanrink at yahoo.com priority: normal severity: normal status: open title: Segementation faults on ARM and ARM64 type: crash versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 06:04:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Oct 2018 10:04:36 +0000 Subject: [issue34957] Segementation faults on ARM and ARM64 In-Reply-To: <1539251006.2.0.788709270274.issue34957@psf.upfronthosting.co.za> Message-ID: <1539252276.33.0.788709270274.issue34957@psf.upfronthosting.co.za> STINNER Victor added the comment: Is it possible that this bug is a duplicate of bpo-29804? Would you be able to test Python 3.7.1RC1? Sadly, this issue says "OK, PR 1559 (in 3.7.0) for Issue30353 has been backported to 3.6 in PR 5954 for release in 3.6.5". I know that FreeBSD uses our bundled copy of libffi. I'm not sure that the copy in the 3.6 branch contains latest fixes for ARM64 :-( It seems to be libffi 3.1. The latest version is libffi-3.2.1 ("released on November 12, 2014": no release for 4 days?) on https://sourceware.org/libffi/ ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 06:18:20 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 11 Oct 2018 10:18:20 +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: <1539253100.01.0.788709270274.issue32153@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I think the original error has been fixed with issue28919 where the attribute errors are ignored while copying the functions as suggested by Anthony in solution 2. So can this issue be closed as outdated to reopen a new one for using update_wrapper as enhancement or the title can be changed to reflect the fact that autospec should now use update_wrapper instead of using _copy_func_details ? Correct me if I am wrong on the workflow to update the ticket. Also there doesn't seem to be any test for this that can possibly added. Current implementation : def _copy_func_details(func, funcopy): # we explicitly don't copy func.__dict__ into this copy as it would # expose original attributes that should be mocked for attribute in ( '__name__', '__doc__', '__text_signature__', '__module__', '__defaults__', '__kwdefaults__', ): try: setattr(funcopy, attribute, getattr(func, attribute)) except AttributeError: pass Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 06:24:25 2018 From: report at bugs.python.org (Stefan Rink) Date: Thu, 11 Oct 2018 10:24:25 +0000 Subject: [issue34957] Segementation faults on ARM and ARM64 In-Reply-To: <1539251006.2.0.788709270274.issue34957@psf.upfronthosting.co.za> Message-ID: <1539253465.89.0.788709270274.issue34957@psf.upfronthosting.co.za> Stefan Rink added the comment: * (re)installed libffi but it was already version 3.2.1. * Currently compiling python3.7 on both ARM and AARCH64 to test them. This may take a while because I need to install dask again for 3.7 to test.. Didn't try this on Linux ARM yet so I'll also try that. Ps. If someone wants to try a fix or something but doesn't have access to ARM64 hardware give me a notice; you can try it on one of my sopine nodes, pine64 or on a raspberry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 06:51:10 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 11 Oct 2018 10:51: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: <1539255070.79.0.788709270274.issue32153@psf.upfronthosting.co.za> Berker Peksag added the comment: Yes, it would be great if we could convert the snippet in msg307115 to a test case before closing this issue. 3.6 still has this bug, but since we are pretty close to the end of its bugfix maintenance period, we can skip it. ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 09:04:53 2018 From: report at bugs.python.org (Xiao Di Guan) Date: Thu, 11 Oct 2018 13:04:53 +0000 Subject: [issue2142] difflib.unified_diff(...) produces invalid patches In-Reply-To: <1203365817.7.0.0998491412302.issue2142@psf.upfronthosting.co.za> Message-ID: <1539263093.35.0.788709270274.issue2142@psf.upfronthosting.co.za> Change by Xiao Di Guan : ---------- nosy: +puxlit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 09:05:23 2018 From: report at bugs.python.org (Xiao Di Guan) Date: Thu, 11 Oct 2018 13:05:23 +0000 Subject: [issue29427] Option to skip padding for base64 urlsafe encoding/decoding In-Reply-To: <1486085117.43.0.563120448637.issue29427@psf.upfronthosting.co.za> Message-ID: <1539263123.68.0.788709270274.issue29427@psf.upfronthosting.co.za> Change by Xiao Di Guan : ---------- nosy: +puxlit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 09:17:52 2018 From: report at bugs.python.org (Mayank Asthana) Date: Thu, 11 Oct 2018 13:17:52 +0000 Subject: [issue29427] Option to skip padding for base64 urlsafe encoding/decoding In-Reply-To: <1486085117.43.0.563120448637.issue29427@psf.upfronthosting.co.za> Message-ID: <1539263872.55.0.788709270274.issue29427@psf.upfronthosting.co.za> Change by Mayank Asthana : ---------- nosy: +masthana _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 09:49:09 2018 From: report at bugs.python.org (Xiao Di Guan) Date: Thu, 11 Oct 2018 13:49:09 +0000 Subject: [issue34958] urllib.error.HTTPError.fp is not closed when error is finalized on Windows Message-ID: <1539265749.67.0.788709270274.issue34958@psf.upfronthosting.co.za> New submission from Xiao Di Guan : Following changes introduced in bpo-15002, HTTPError closes its fp when GCed via tempfile._TemporaryFileCloser's finalizer. However, the current implementation of _TemporaryFileCloser only defines __del__ for non-NT platforms. Assuming HTTPError.fp is part of the API (though it's currently undocumented), and assuming the desired behaviour is to close fp when HTTPError is finalized, then perhaps _TemporaryFileCloser should always define __del__? A contrived example follows: ``` from urllib.error import HTTPError from urllib.request import urlopen def make_request(): try: urlopen('https://httpbin.org/status/418') assert False except HTTPError as err: assert err.code == 418 return err.fp fp = make_request() assert fp.isclosed() # Fails on Windows, passes on other platforms ``` ---------- components: Library (Lib) messages: 327532 nosy: puxlit priority: normal severity: normal status: open title: urllib.error.HTTPError.fp is not closed when error is finalized on Windows type: behavior versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 10:25:13 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 11 Oct 2018 14:25:13 +0000 Subject: [issue34959] Are the tests optional on travis? Message-ID: <1539267913.63.0.788709270274.issue34959@psf.upfronthosting.co.za> New submission from St?phane Wirtel : In the config of Travis, we can see there is a OPTIONAL=true env var for the tests at line 72: https://github.com/python/cpython/blob/master/.travis.yml#L72 If I read the doc, normally the tests can crash and this is not a problem? Is it right, because I am not an expert of Travis. Thank you, St?phane ---------- messages: 327533 nosy: matrixise priority: normal severity: normal status: open title: Are the tests optional on travis? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 10:42:40 2018 From: report at bugs.python.org (Orivej Desh) Date: Thu, 11 Oct 2018 14:42:40 +0000 Subject: [issue32696] Fix pickling exceptions with multiple arguments In-Reply-To: <1517156155.35.0.467229070634.issue32696@psf.upfronthosting.co.za> Message-ID: <1539268960.52.0.788709270274.issue32696@psf.upfronthosting.co.za> Change by Orivej Desh : ---------- nosy: +orivej _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 10:43:02 2018 From: report at bugs.python.org (Orivej Desh) Date: Thu, 11 Oct 2018 14:43:02 +0000 Subject: [issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__ Message-ID: <1539268982.47.0.788709270274.issue1692335@psf.upfronthosting.co.za> Change by Orivej Desh : ---------- nosy: +orivej _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 10:59:35 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 11 Oct 2018 14:59:35 +0000 Subject: [issue34959] Are the tests optional on travis? In-Reply-To: <1539267913.63.0.788709270274.issue34959@psf.upfronthosting.co.za> Message-ID: <1539269975.03.0.788709270274.issue34959@psf.upfronthosting.co.za> St?phane Wirtel added the comment: this issue is useless :/ ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 11:00:09 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 11 Oct 2018 15:00:09 +0000 Subject: [issue34959] Are the tests optional on travis? In-Reply-To: <1539267913.63.0.788709270274.issue34959@psf.upfronthosting.co.za> Message-ID: <1539270009.53.0.788709270274.issue34959@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- resolution: -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 11:04:45 2018 From: report at bugs.python.org (Stefan Rink) Date: Thu, 11 Oct 2018 15:04:45 +0000 Subject: [issue34957] Segementation faults on ARM and ARM64 In-Reply-To: <1539251006.2.0.788709270274.issue34957@psf.upfronthosting.co.za> Message-ID: <1539270285.27.0.788709270274.issue34957@psf.upfronthosting.co.za> Stefan Rink added the comment: On ARM32 it still crashed but on the ARM64 upgrade to 3.7 helped! Need to do some more testing but it looks like it's working now. # python3.7 Python 3.7.0 (default, Sep 29 2018, 05:58:20) [Clang 6.0.1 (tags/RELEASE_601/final 335540)] on freebsd12 Type "help", "copyright", "credits" or "license" for more information. >>> from dask.distributed import Client >>> client = Client() >>> client.cluster LocalCluster('tcp://127.0.0.1:22415', workers=4, ncores=4) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 11:06:28 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Oct 2018 15:06:28 +0000 Subject: [issue34095] [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault In-Reply-To: <1531314252.99.0.56676864532.issue34095@psf.upfronthosting.co.za> Message-ID: <1539270388.84.0.788709270274.issue34095@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Additional notes: I am puzzled that test_idle output starts with test_io, as that is alphabetically in the middle of the files in idle_test/. There are 2 independent 'test_io' modules: test/test_io, which tests the io module, and idlelib/test_idle/test_io, which tests idlelib.PyShell.PseudoFile and subclasses (which are all derived from io.TextIOBase). Only the latter is an issue here. The former is an irrelevant distraction and should not have been included with test_idle in msg321737. Since log.all ends with "test_writelines (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... /usr/bin/xvfb-run: line 181: ...", I initially thought that test_writelines, in particular, stimulated the failure. But in the msg321737 output, test_writelines ran 'OK'. The fact that xvfv ... test_idle runs by itself but not when alphabetically preceding tests are run says that some preceding test alters something. The failure of test_audioop seems an unlikely cause. I suspect test__all__, by importing _tkinter either directly or via Tkinter or some IDLE module. This could be tested with xvfb ... test___all__ test_idle. Since the tests are mostly run alphabetically and the tkinter tests, test_tcl, test_tk, test_ttk_guionly, and test_ttk_textonly alphabetically follow test_idle, they should not be the cause of the crash during test_idle. On the other hand, if the test above crashes, and so does xvbf ... -ugui test___all__ test_tcl test_tk test_ttk_guionly test_ttk_textonly then test_idle would be eliminated as the direct culprit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 11:31:21 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Oct 2018 15:31:21 +0000 Subject: [issue34954] Getting an email's subject is error-prone In-Reply-To: <1539190529.38.0.788709270274.issue34954@psf.upfronthosting.co.za> Message-ID: <1539271881.73.0.788709270274.issue34954@psf.upfronthosting.co.za> R. David Murray added the comment: Can you demonstrate that policy.default and policy.SMTP produce a subject with newlines? If they do, that is a serious bug. Please don't reopen the issue. I'll reopen it if you convince me there is a bug :) The statement you suggest we add is not appropriate[*], since the python3 email library *is* a high level library now. If it isn't handling something for you when you use policy.default or policy.SMTP, then that is a bug. (Well, it's MIME Multipart handling still leaves something to be desired...you still have to know more than is optimal about multiparts, but the hooks are there for someone to improve that aspect further.) [*] The part about the protocol is certainly true, though :) ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 11:33:43 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Oct 2018 15:33:43 +0000 Subject: [issue34954] Getting an email's subject is error-prone In-Reply-To: <1539190529.38.0.788709270274.issue34954@psf.upfronthosting.co.za> Message-ID: <1539272023.65.0.788709270274.issue34954@psf.upfronthosting.co.za> R. David Murray added the comment: I'm guessing you got confused by the fact that the HTTP policy doesn't *add* new lines when *serializing*. If you can point to the part of the docs you read that produced that confusion, maybe we can improve it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 11:47:46 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 11 Oct 2018 15:47:46 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1539272866.36.0.788709270274.issue34576@psf.upfronthosting.co.za> Senthil Kumaran added the comment: @Victor - Surprising. Thanks for noticing this. I will fix it shortly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 11:47:30 2018 From: report at bugs.python.org (Alex Corcoles) Date: Thu, 11 Oct 2018 15:47:30 +0000 Subject: [issue34954] Getting an email's subject is error-prone In-Reply-To: <1539190529.38.0.788709270274.issue34954@psf.upfronthosting.co.za> Message-ID: <1539272850.06.0.788709270274.issue34954@psf.upfronthosting.co.za> Alex Corcoles added the comment: Duh, I'm an idiot, I only tested policy.HTTP and *NOT* supplying a policy (which I believed was equivalent to using policy.default). policy.default and policy.SMTP do indeed produce a newline-less subject indeed. I only tested policy.HTTP because the docs talk about unlimited line-length, but that's a problem of the docs, but rather, a problem of my idiocy. Given this, I agree with everything you said. Personally I'd prefer if policy.default was the default, but I guess that won't change due to backwards compatibility reasons and I guess it'd be excessive to create a new set of function calls and deprecate the old, so I'm happy if this remains closed. Apologies for my stupidity, ?lex ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 11:57:01 2018 From: report at bugs.python.org (Stefan Rink) Date: Thu, 11 Oct 2018 15:57:01 +0000 Subject: [issue34957] Segementation faults on ARM and ARM64 In-Reply-To: <1539251006.2.0.788709270274.issue34957@psf.upfronthosting.co.za> Message-ID: <1539273421.03.0.788709270274.issue34957@psf.upfronthosting.co.za> Stefan Rink added the comment: Upgrade to 3.7 fixed the main problem for me, or at least on the hardware/arch I use. -- On ARM32 it still failed but I don't have debugging symbols there so not so easy to troubleshoot further -- ---------- resolution: -> works for me _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 11:59:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Oct 2018 15:59:39 +0000 Subject: [issue34811] test_gdb fails with latest gdb In-Reply-To: <1537972642.29.0.545547206417.issue34811@psf.upfronthosting.co.za> Message-ID: <1539273579.52.0.788709270274.issue34811@psf.upfronthosting.co.za> STINNER Victor added the comment: Update: I reproduced the bug but then I was unable to go futher, I was blocked by gdb which decided to crash in Fedora rawhide (gdb 8.2.50.20181006-4.fc30) :-/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 12:02:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Oct 2018 16:02:33 +0000 Subject: [issue34957] Segementation faults on ARM and ARM64 In-Reply-To: <1539251006.2.0.788709270274.issue34957@psf.upfronthosting.co.za> Message-ID: <1539273753.28.0.788709270274.issue34957@psf.upfronthosting.co.za> STINNER Victor added the comment: > Upgrade to 3.7 fixed the main problem for me, or at least on the hardware/arch I use. For Python, we should try to identify the required backport, or upgrade libffi in Python 3.6. But I'm scared by Modules/_ctypes/libffi/ since it's unclear to me if we patched it or not... IHMO the best option for FreeBSD would be to change how FreeBSD builds Python 3.6 to use --with-system-ffi (use recent libffi rather than Python old copy). ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 12:10:38 2018 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Oct 2018 16:10:38 +0000 Subject: [issue34957] Segementation faults on ARM and ARM64 In-Reply-To: <1539251006.2.0.788709270274.issue34957@psf.upfronthosting.co.za> Message-ID: <1539274238.39.0.788709270274.issue34957@psf.upfronthosting.co.za> Zachary Ware added the comment: IIRC, the default in 3.6 is to use `--with-system-ffi` if available on all platforms but macOS, falling back to the bundled copy only if a system copy can't be found; 3.7 removes the bundled copy. Also, the version bundled with 3.6 is v3.2.1. Note though that this is all from memory, I haven't actually gone to look at the code again :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 13:57:24 2018 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 11 Oct 2018 17:57:24 +0000 Subject: [issue2142] difflib.unified_diff(...) produces invalid patches In-Reply-To: <1203365817.7.0.0998491412302.issue2142@psf.upfronthosting.co.za> Message-ID: <1539280644.89.0.788709270274.issue2142@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 14:11:21 2018 From: report at bugs.python.org (Simon Wells) Date: Thu, 11 Oct 2018 18:11:21 +0000 Subject: [issue34960] python-config bad ldflags on macOS Message-ID: <1539281481.26.0.788709270274.issue34960@psf.upfronthosting.co.za> New submission from Simon Wells : if you didn't build python as a framework it adds sysconfig.get_config_vars('LINKFORSHARED') when you run 'python-config --ldflags' this resolves to >>> sysconfig.get_config_var('LINKFORSHARED') '-Wl,-stack_size,1000000 -framework CoreFoundation /usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/Python' the '-Wl,-stack_size' ldflag causes issues for clang with the error "ld: -stack_size option can only be used when linking a main executable" ---------- components: macOS messages: 327545 nosy: ned.deily, ronaldoussoren, xzcvczx priority: normal severity: normal status: open title: python-config bad ldflags on macOS type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 15:05:21 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 11 Oct 2018 19:05:21 +0000 Subject: [issue34960] python-config bad ldflags on macOS In-Reply-To: <1539281481.26.0.788709270274.issue34960@psf.upfronthosting.co.za> Message-ID: <1539284721.65.0.788709270274.issue34960@psf.upfronthosting.co.za> Ned Deily added the comment: Sorry, I can't reproduce that behavior. What's more, that LINKFORSHARED value does not appear to be correct. Have you tried doing a build from a clean build dicectory while rerunning ./configure? What does your ./configure look like and do have any relevant env variables set? >>> sysconfig.get_config_var('LINKFORSHARED') '-Wl,-stack_size,1000000 -framework CoreFoundation' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 15:15:04 2018 From: report at bugs.python.org (multun) Date: Thu, 11 Oct 2018 19:15:04 +0000 Subject: [issue34961] Global scoping when shadowing local names in class definitions Message-ID: <1539285304.26.0.788709270274.issue34961@psf.upfronthosting.co.za> New submission from multun : Hello, >>> a="global" >>> def func(a): ... class wtf(): ... a=a ... return wtf ... >>> func("local").a 'global' >>> def func2(a): ... class wtf(): ... b=a ... return wtf ... >>> func2("local").b 'local' Is this behavior legit ? Best regards, -- Victor "multun" Collod ---------- components: Interpreter Core files: weird_class_scope.py messages: 327547 nosy: multun priority: normal severity: normal status: open title: Global scoping when shadowing local names in class definitions 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/file47862/weird_class_scope.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 15:18:06 2018 From: report at bugs.python.org (Simon Wells) Date: Thu, 11 Oct 2018 19:18:06 +0000 Subject: [issue34960] python-config bad ldflags on macOS In-Reply-To: <1539281481.26.0.788709270274.issue34960@psf.upfronthosting.co.za> Message-ID: <1539285486.61.0.788709270274.issue34960@psf.upfronthosting.co.za> Simon Wells added the comment: with a fresh 3.7.0 download ./configure --prefix=... --enable-shared make -j5 make install path/to/python3-config --ldflags -lpython3.7m -ldl -framework CoreFoundation -Wl,-stack_size,1000000 -framework CoreFoundation ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 15:40:00 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 11 Oct 2018 19:40:00 +0000 Subject: [issue34960] python-config bad ldflags on macOS In-Reply-To: <1539281481.26.0.788709270274.issue34960@psf.upfronthosting.co.za> Message-ID: <1539286800.33.0.788709270274.issue34960@psf.upfronthosting.co.za> Ned Deily added the comment: Oh, you didn't mention --enable-shared! But still it's not clear to me what problem your last results shows. The value of python3-config --ldflags looks fine (ignore the repeated -framework CoreFoundation). Are you still getting the "ld: -stack_size option can ...' message when you built the second time? An installed --enable-shared build for me works just fine when using a non-standard prefix, i.e. a location where there is not already a Python3 installed. So I still can't reproduce a problem. By the way, I always recommend to avoid using the --enable-shared option for macOS builds; I know there are cases in the past where there *has* been build issues when building shared and there is already a Python installed at that prefix. If possible, stick either a "plain Unix" build (no --enable-shared, no --enable-framework) or a framework build. You're less likely to run into at first glance head-scratching building and linking issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 15:42:55 2018 From: report at bugs.python.org (Simon Wells) Date: Thu, 11 Oct 2018 19:42:55 +0000 Subject: [issue34960] python-config bad ldflags on macOS In-Reply-To: <1539281481.26.0.788709270274.issue34960@psf.upfronthosting.co.za> Message-ID: <1539286975.94.0.788709270274.issue34960@psf.upfronthosting.co.za> Simon Wells added the comment: ah ok, sorry i wasn't clear at first, the issue isn't when building python its when building a library which depends on python in this case libxml2, which when given the --enable-python stuff uses "PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags`" and therefore is being given the -Wl,stack_size linker option which is not valid for non main executables according to the error produced from clang ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 16:00:10 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 11 Oct 2018 20:00:10 +0000 Subject: [issue34960] macOS builds expose stack_size option in LINKEDFOORSHARED and pyconfig In-Reply-To: <1539281481.26.0.788709270274.issue34960@psf.upfronthosting.co.za> Message-ID: <1539288010.08.0.788709270274.issue34960@psf.upfronthosting.co.za> Ned Deily added the comment: OK, now I finally get it, thanks, my fault. Yes, we probably shouldn't be passing stack_size through to applications trying to embed Python in LINkFORSHARED and pyconfig. That's an area that we don't test very well nor have tests for, AFAIK. Would it possible for you to provide a simple example of building libxml2 that would allow us to more easily test this? https://docs.python.org/3/extending/embedding.html#compiling-and-linking-under-unix-like-systems ---------- title: python-config bad ldflags on macOS -> macOS builds expose stack_size option in LINKEDFOORSHARED and pyconfig versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 16:24:38 2018 From: report at bugs.python.org (Simon Wells) Date: Thu, 11 Oct 2018 20:24:38 +0000 Subject: [issue34960] macOS builds expose stack_size option in LINKEDFOORSHARED and pyconfig In-Reply-To: <1539281481.26.0.788709270274.issue34960@psf.upfronthosting.co.za> Message-ID: <1539289478.78.0.788709270274.issue34960@psf.upfronthosting.co.za> Simon Wells added the comment: oh the rabbit hole... as i have other builds of python3.7 on my system i wanted to ensure it used the correct python and python-config (python 3.7 was built and installed into $HOME/Projects/python/inst/) as such its a rather convoluted configure command for libxml2 LDFLAGS="-L$HOME/Projects/python/inst/lib" PATH=/Users/simon/Projects/python/inst/bin/:$PATH ./configure --prefix=/Users/simon/Projects/python/inst/ --with-python=/Users/simon/Projects/python/inst/bin/python3 --with-python-install-dir=/Users/simon/Projects/python/inst/lib/python3.7/site-packages the LDFLAGS envvar was required as python-config --ldflags also does not provide -L for the python libary $make ld: library not found for -lpython3.7m in config.log for libxml2 (PYTHON_LIBS which is the output of $HOME/Projects/python/python3-config --ldflags) PYTHON_LIBS='-lpython3.7m -ldl -framework CoreFoundation -Wl,-stack_size,1000000 -framework CoreFoundation' after LDFLAGS="..." is added $make ... CCLD libxml2mod.la ld: -stack_size option can only be used when linking a main executable clang: error: linker command failed with exit code 1 (use -v to see invocation) if you want more log lines please let me know but those should be the only relevant ones ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 16:33:52 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 11 Oct 2018 20:33:52 +0000 Subject: [issue34962] make doctest does not pass :/ Message-ID: <1539290032.19.0.788709270274.issue34962@psf.upfronthosting.co.za> New submission from St?phane Wirtel : make -C Doc/ doctest does not pass the tests. ---------- messages: 327553 nosy: matrixise priority: normal severity: normal status: open title: make doctest does not pass :/ versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 16:37:08 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 11 Oct 2018 20:37:08 +0000 Subject: [issue34939] Possibly spurious SyntaxError: annotated name can't be global In-Reply-To: <1539050318.57.0.545547206417.issue34939@psf.upfronthosting.co.za> Message-ID: <1539290228.58.0.788709270274.issue34939@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: I think we can just go ahead and allow this. If there is a volunteer, please go ahead, otherwise I will try to find time for this myself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 16:37:22 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 11 Oct 2018 20:37:22 +0000 Subject: [issue34962] make doctest does not pass :/ In-Reply-To: <1539290032.19.0.788709270274.issue34962@psf.upfronthosting.co.za> Message-ID: <1539290242.94.0.788709270274.issue34962@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +9186 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 20:19:23 2018 From: report at bugs.python.org (Gus Goulart) Date: Fri, 12 Oct 2018 00:19:23 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1539303563.75.0.788709270274.issue27741@psf.upfronthosting.co.za> Gus Goulart added the comment: It is true that time.srtptime() does not return microseconds, but as the documentation suggests, it will return the microseconds after you wrap it up with datetime(). I have attached a walkthrough of how I see that section of the docs. Please let me know if you have anything else in mind. Thanks! ---------- nosy: +gus Added file: https://bugs.python.org/file47863/datetime_docs.PNG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 20:20:16 2018 From: report at bugs.python.org (Gus Goulart) Date: Fri, 12 Oct 2018 00:20:16 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1539303616.74.0.788709270274.issue27741@psf.upfronthosting.co.za> Change by Gus Goulart : ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 21:38:01 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Oct 2018 01:38:01 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1539308281.32.0.788709270274.issue27741@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 21:57:38 2018 From: report at bugs.python.org (Kevin Walzer) Date: Fri, 12 Oct 2018 01:57:38 +0000 Subject: [issue34956] _tkinter built on macOS 10.14 does not link to Tcl and Tk in /Library/Frameworks In-Reply-To: <1539228548.05.0.788709270274.issue34956@psf.upfronthosting.co.za> Message-ID: <1539309458.28.0.788709270274.issue34956@psf.upfronthosting.co.za> Kevin Walzer added the comment: Thank you, this helped. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 23:01:00 2018 From: report at bugs.python.org (Pranav Devarakonda) Date: Fri, 12 Oct 2018 03:01:00 +0000 Subject: [issue34893] Add 2to3 fixer to change send and recv methods of socket object. In-Reply-To: <1538664300.49.0.545547206417.issue34893@psf.upfronthosting.co.za> Message-ID: <1539313260.49.0.788709270274.issue34893@psf.upfronthosting.co.za> Pranav Devarakonda added the comment: I have added a final condition that converts the arguments passed to bytes only if the type of object is socket and the method is send() in the generated code. All the other conversions still function as expected. ---------- Added file: https://bugs.python.org/file47864/fix_socket_send_recv_reupdated.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 23:03:15 2018 From: report at bugs.python.org (=?utf-8?q?Alexander_B=C3=B6hn?=) Date: Fri, 12 Oct 2018 03:03:15 +0000 Subject: =?utf-8?q?=5Bissue34963=5D_String_representation_for_types_created_with_t?= =?utf-8?q?yping=2ENewType=28=E2=80=A6=29_are_opaque_and_unappealing?= Message-ID: <1539313395.67.0.788709270274.issue34963@psf.upfronthosting.co.za> New submission from Alexander B?hn : When creating a new type with `typing.NewType(?)` the result is a function defined on-the-fly with no reasonable `__repr__` definition ? the string representation of the type looks something like e.g. ?.new_type at 0x108ae6950>? which isn?t very useful or aesthetically appealing. ---------- components: Extension Modules messages: 327558 nosy: fish2000 priority: normal severity: normal status: open title: String representation for types created with typing.NewType(?) are opaque and unappealing type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 23:08:07 2018 From: report at bugs.python.org (=?utf-8?q?Alexander_B=C3=B6hn?=) Date: Fri, 12 Oct 2018 03:08:07 +0000 Subject: =?utf-8?q?=5Bissue34963=5D_String_representation_for_types_created_with_t?= =?utf-8?q?yping=2ENewType=28=E2=80=A6=29_are_opaque_and_unappealing?= In-Reply-To: <1539313395.67.0.788709270274.issue34963@psf.upfronthosting.co.za> Message-ID: <1539313687.81.0.788709270274.issue34963@psf.upfronthosting.co.za> Change by Alexander B?hn : ---------- keywords: +patch pull_requests: +9187 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 11 23:53:09 2018 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Oct 2018 03:53:09 +0000 Subject: [issue34748] Incorrect HTML link in functools.partial In-Reply-To: <1537442713.28.0.956365154283.issue34748@psf.upfronthosting.co.za> Message-ID: <1539316389.11.0.788709270274.issue34748@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +9188 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 00:00:05 2018 From: report at bugs.python.org (=?utf-8?q?Alexander_B=C3=B6hn?=) Date: Fri, 12 Oct 2018 04:00:05 +0000 Subject: =?utf-8?q?=5Bissue34963=5D_String_representation_for_types_created_with_t?= =?utf-8?q?yping=2ENewType=28=E2=80=A6=29_are_opaque_and_unappealing?= In-Reply-To: <1539313395.67.0.788709270274.issue34963@psf.upfronthosting.co.za> Message-ID: <1539316805.96.0.788709270274.issue34963@psf.upfronthosting.co.za> Change by Alexander B?hn : ---------- components: +Library (Lib) -Extension Modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 00:04:47 2018 From: report at bugs.python.org (Andrei Petre) Date: Fri, 12 Oct 2018 04:04:47 +0000 Subject: [issue34748] Incorrect HTML link in functools.partial In-Reply-To: <1537442713.28.0.956365154283.issue34748@psf.upfronthosting.co.za> Message-ID: <1539317087.07.0.788709270274.issue34748@psf.upfronthosting.co.za> Andrei Petre added the comment: Hi, I've also looked into this and I've added a patch addressing both updates (mentioned by xitop and xtreak). ---------- nosy: +andreip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 00:05:11 2018 From: report at bugs.python.org (=?utf-8?q?Alexander_B=C3=B6hn?=) Date: Fri, 12 Oct 2018 04:05:11 +0000 Subject: =?utf-8?q?=5Bissue34963=5D_String_representation_for_types_created_with_t?= =?utf-8?q?yping=2ENewType=28=E2=80=A6=29_are_opaque_and_unappealing?= In-Reply-To: <1539313395.67.0.788709270274.issue34963@psf.upfronthosting.co.za> Message-ID: <1539317111.59.0.788709270274.issue34963@psf.upfronthosting.co.za> Change by Alexander B?hn : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 01:05:48 2018 From: report at bugs.python.org (Andrei Petre) Date: Fri, 12 Oct 2018 05:05:48 +0000 Subject: [issue18114] Update PyImport_ImportFrozenModuleObject() to set __package__ In-Reply-To: <1370056399.99.0.692031308648.issue18114@psf.upfronthosting.co.za> Message-ID: <1539320748.92.0.788709270274.issue18114@psf.upfronthosting.co.za> Andrei Petre added the comment: Hi, is this still relevant? I see the file has changed quite a bit. ---------- nosy: +andreip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 02:08:48 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 12 Oct 2018 06:08:48 +0000 Subject: [issue34547] Wsgiref server does not handle closed connections gracefully In-Reply-To: <1535624235.67.0.56676864532.issue34547@psf.upfronthosting.co.za> Message-ID: <1539324528.61.0.788709270274.issue34547@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 02:15:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 06:15:19 +0000 Subject: [issue34696] PyByteArray_FromObject() has undocumented (and untested) behavior In-Reply-To: <1537028654.15.0.956365154283.issue34696@psf.upfronthosting.co.za> Message-ID: <1539324919.52.0.788709270274.issue34696@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue26759. ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 02:30:54 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 12 Oct 2018 06:30:54 +0000 Subject: [issue34547] Wsgiref server does not handle closed connections gracefully In-Reply-To: <1535624235.67.0.56676864532.issue34547@psf.upfronthosting.co.za> Message-ID: <1539325854.45.0.788709270274.issue34547@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report and PR. I think this is the same as issue27682. I noticed the same during running `make serve` locally for documentation and it's worth fixing. I am just wondering if it makes sense to fix the TypeError and AttributeError too. Also I couldn't see any tests for this and I don't know if it's possible to test this scenario. I will leave it to the reviewer to close this and raise PR against issue27682 or continue discussion here. Thanks again! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 02:39:52 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 12 Oct 2018 06:39:52 +0000 Subject: [issue27682] wsgiref: Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1539326392.36.0.788709270274.issue27682@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I think this is an issue with wsgiref handling client closure rather than a Windows/Django bug. I saw this sporadically but not consistently while running `make serve` to serve the docs which uses wsgiref simple server to serve docs on my Mac OS. Related issue34547 with a PR that catches ConnectionAbortedError and returns. PR link : https://github.com/python/cpython/pull/9713/ Sample traceback while serving docs locally with `make serve` on Mac OS: 127.0.0.1 - - [12/Oct/2018 10:56:57] "GET /_sources/library/asyncio-eventloop.rst.txt HTTP/1.1" 500 59 ---------------------------------------- Exception happened during processing of request from ('127.0.0.1', 50436) Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 138, in run self.finish_response() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 180, in finish_response self.write(data) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 274, in write self.send_headers() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 332, in send_headers self.send_preamble() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 255, in send_preamble ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1') File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 453, in _write result = self.stdout.write(data) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 796, in write self._sock.sendall(b) BrokenPipeError: [Errno 32] Broken pipe During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 141, in run self.handle_error() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 368, in handle_error self.finish_response() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 180, in finish_response self.write(data) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 274, in write self.send_headers() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 331, in send_headers if not self.origin_server or self.client_is_modern(): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 344, in client_is_modern return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9' TypeError: 'NoneType' object is not subscriptable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 313, in _handle_request_noblock self.process_request(request, client_address) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 344, in process_request self.finish_request(request, client_address) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 357, in finish_request self.RequestHandlerClass(request, client_address, self) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 717, in __init__ self.handle() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/simple_server.py", line 133, in handle handler.run(self.server.get_app()) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 144, in run self.close() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/simple_server.py", line 35, in close self.status.split(' ',1)[0], self.bytes_sent AttributeError: 'NoneType' object has no attribute 'split' Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 02:49:13 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 12 Oct 2018 06:49:13 +0000 Subject: [issue34926] Allow querying a Path's mime-type In-Reply-To: <1538978844.01.0.545547206417.issue34926@psf.upfronthosting.co.za> Message-ID: <1539326953.97.0.788709270274.issue34926@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: As part of triaging, I am closing this since this was merged with doc changes and there was no back port done since it's an enhancement. Antoine, feel free to reopen this if there are any changes left. Thanks everybody for the feedback and review. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 03:00:45 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Oct 2018 07:00:45 +0000 Subject: [issue34926] Allow querying a Path's mime-type In-Reply-To: <1538978844.01.0.545547206417.issue34926@psf.upfronthosting.co.za> Message-ID: <1539327645.59.0.788709270274.issue34926@psf.upfronthosting.co.za> Antoine Pitrou added the comment: No, I simply forgot to close it. Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 03:18:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 07:18:26 +0000 Subject: [issue16965] 2to3 should rewrite execfile() to open in 'rb' mode In-Reply-To: <1358187846.57.0.700535378161.issue16965@psf.upfronthosting.co.za> Message-ID: <1539328706.91.0.788709270274.issue16965@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: `exec(compile(open("fn", "rb").read(), "fn", 'exec'))` will emit a resource warning because the open file is not closed explicitly. But this is a different issue. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 03:51:15 2018 From: report at bugs.python.org (Julien Palard) Date: Fri, 12 Oct 2018 07:51:15 +0000 Subject: [issue34962] make doctest does not pass :/ In-Reply-To: <1539290032.19.0.788709270274.issue34962@psf.upfronthosting.co.za> Message-ID: <1539330675.58.0.788709270274.issue34962@psf.upfronthosting.co.za> Julien Palard added the comment: New changeset 859c068e52a31e13e2b9bb6a3f861fa8c290cb0e by Julien Palard (St?phane Wirtel) in branch 'master': bpo-34962: make doctest in Doc/ now passes, and is enforced in CI (GH-9806) https://github.com/python/cpython/commit/859c068e52a31e13e2b9bb6a3f861fa8c290cb0e ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 03:51:47 2018 From: report at bugs.python.org (Julien Palard) Date: Fri, 12 Oct 2018 07:51:47 +0000 Subject: [issue34962] make doctest does not pass :/ In-Reply-To: <1539290032.19.0.788709270274.issue34962@psf.upfronthosting.co.za> Message-ID: <1539330707.89.0.788709270274.issue34962@psf.upfronthosting.co.za> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 04:21:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 08:21:12 +0000 Subject: [issue34940] Possible assertion failure due to _check_for_legacy_statements() In-Reply-To: <1539051819.92.0.545547206417.issue34940@psf.upfronthosting.co.za> Message-ID: <1539332472.49.0.788709270274.issue34940@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset a4b48f194a131bad6fe1fcfb1f90ae2029304735 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-34940: Fix the error handling in _check_for_legacy_statements(). (GH-9764) https://github.com/python/cpython/commit/a4b48f194a131bad6fe1fcfb1f90ae2029304735 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 04:23:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 08:23:51 +0000 Subject: [issue34940] Possible assertion failure due to _check_for_legacy_statements() In-Reply-To: <1539051819.92.0.545547206417.issue34940@psf.upfronthosting.co.za> Message-ID: <1539332631.93.0.788709270274.issue34940@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Seems failure is not possible here, but it is safer to always check for errors. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 04:23:54 2018 From: report at bugs.python.org (Petter S) Date: Fri, 12 Oct 2018 08:23:54 +0000 Subject: [issue27682] wsgiref: Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1539332634.71.0.788709270274.issue27682@psf.upfronthosting.co.za> Petter S added the comment: The Github pull request https://github.com/python/cpython/pull/9713 addresses this. ---------- nosy: +Petter S _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 04:31:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 08:31:28 +0000 Subject: [issue31516] current_thread() becomes "dummy" thread during shutdown In-Reply-To: <1505820834.6.0.00526419251789.issue31516@psf.upfronthosting.co.za> Message-ID: <1539333088.09.0.788709270274.issue31516@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 65d2f8c044bf597685ba72f66cbcc6b3f7a3ee9c by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-31516: Skip test_main_thread_during_shutdown() with COUNT_ALLOCS builds. (GH-8052) https://github.com/python/cpython/commit/65d2f8c044bf597685ba72f66cbcc6b3f7a3ee9c ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 04:31:34 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Oct 2018 08:31:34 +0000 Subject: [issue31516] current_thread() becomes "dummy" thread during shutdown In-Reply-To: <1505820834.6.0.00526419251789.issue31516@psf.upfronthosting.co.za> Message-ID: <1539333094.08.0.788709270274.issue31516@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9191 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 04:31:40 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Oct 2018 08:31:40 +0000 Subject: [issue31516] current_thread() becomes "dummy" thread during shutdown In-Reply-To: <1505820834.6.0.00526419251789.issue31516@psf.upfronthosting.co.za> Message-ID: <1539333100.62.0.788709270274.issue31516@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9192 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 04:49:12 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Oct 2018 08:49:12 +0000 Subject: [issue31516] current_thread() becomes "dummy" thread during shutdown In-Reply-To: <1505820834.6.0.00526419251789.issue31516@psf.upfronthosting.co.za> Message-ID: <1539334152.23.0.788709270274.issue31516@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c327a5499fa823f627366c17e20687065fd70449 by Miss Islington (bot) in branch '3.7': bpo-31516: Skip test_main_thread_during_shutdown() with COUNT_ALLOCS builds. (GH-8052) https://github.com/python/cpython/commit/c327a5499fa823f627366c17e20687065fd70449 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 04:52:17 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 12 Oct 2018 08:52:17 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1539334337.59.0.788709270274.issue27741@psf.upfronthosting.co.za> Tal Einat added the comment: At least with Python 3.7.0, the equivalence is not complete: datetime.strptime() is better, since it retains both microseconds and timezone data. See examples below. >>> from datetime import datetime, timezone >>> import time >>> s = datetime.strftime(datetime.now(), '%a %b %d %H:%M:%S %f') >>> s 'Fri Oct 12 11:33:32 999810' >>> datetime.strptime(s, '%a %b %d %H:%M:%S %f') datetime.datetime(1900, 10, 12, 11, 33, 32, 999810) >>> datetime(*time.strptime(s, '%a %b %d %H:%M:%S %f')[:6]) datetime.datetime(1900, 10, 12, 11, 33, 32) >>> s2 = datetime.strftime(datetime.now(timezone(timedelta(hours=1))), '%a %b %d %H:%M:%S %f%z') >>> s2 'Fri Oct 12 09:48:40 347076+0100' >>> datetime.strptime(s2, '%a %b %d %H:%M:%S %f%z') datetime.datetime(1900, 10, 12, 9, 48, 40, 347076, tzinfo=datetime.timezone(datetime.timedelta(seconds=3600))) >>> datetime(*time.strptime(s2, '%a %b %d %H:%M:%S %f%z')[:6]) datetime.datetime(1900, 10, 12, 9, 48, 40) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 04:54:24 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Oct 2018 08:54:24 +0000 Subject: [issue31516] current_thread() becomes "dummy" thread during shutdown In-Reply-To: <1505820834.6.0.00526419251789.issue31516@psf.upfronthosting.co.za> Message-ID: <1539334464.06.0.788709270274.issue31516@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d918e98056b7ef8d90d71805531cec3e67b5450e by Miss Islington (bot) in branch '3.6': bpo-31516: Skip test_main_thread_during_shutdown() with COUNT_ALLOCS builds. (GH-8052) https://github.com/python/cpython/commit/d918e98056b7ef8d90d71805531cec3e67b5450e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 05:16:54 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 12 Oct 2018 09:16:54 +0000 Subject: [issue34203] documentation: recommend Python 3 over 2 in faq In-Reply-To: <1532397328.96.0.56676864532.issue34203@psf.upfronthosting.co.za> Message-ID: <1539335814.92.0.788709270274.issue34203@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 4505f65ae7807f2420ed14d4f060e7cd5c4039d3 by Tal Einat (Gus Goulart) in branch 'master': bpo-34203: FAQ now recommends python 3.x over 2.x (GH-9796) https://github.com/python/cpython/commit/4505f65ae7807f2420ed14d4f060e7cd5c4039d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 05:16:55 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Oct 2018 09:16:55 +0000 Subject: [issue34203] documentation: recommend Python 3 over 2 in faq In-Reply-To: <1532397328.96.0.56676864532.issue34203@psf.upfronthosting.co.za> Message-ID: <1539335815.65.0.788709270274.issue34203@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9193 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 05:17:02 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Oct 2018 09:17:02 +0000 Subject: [issue34203] documentation: recommend Python 3 over 2 in faq In-Reply-To: <1532397328.96.0.56676864532.issue34203@psf.upfronthosting.co.za> Message-ID: <1539335822.51.0.788709270274.issue34203@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9194 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 05:17:10 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Oct 2018 09:17:10 +0000 Subject: [issue34203] documentation: recommend Python 3 over 2 in faq In-Reply-To: <1532397328.96.0.56676864532.issue34203@psf.upfronthosting.co.za> Message-ID: <1539335830.56.0.788709270274.issue34203@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9195 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 05:25:38 2018 From: report at bugs.python.org (Anton Barkovsky) Date: Fri, 12 Oct 2018 09:25:38 +0000 Subject: [issue27261] io.BytesIO.truncate does not work as advertised In-Reply-To: <1465332777.38.0.718878645897.issue27261@psf.upfronthosting.co.za> Message-ID: <1539336338.44.0.788709270274.issue27261@psf.upfronthosting.co.za> Change by Anton Barkovsky : ---------- nosy: +anton.barkovsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 06:28:00 2018 From: report at bugs.python.org (=?utf-8?q?Alexander_B=C3=B6hn?=) Date: Fri, 12 Oct 2018 10:28:00 +0000 Subject: =?utf-8?q?=5Bissue34963=5D_String_representation_for_types_created_with_t?= =?utf-8?q?yping=2ENewType=28=E2=80=A6=29_are_opaque_and_unappealing?= In-Reply-To: <1539313395.67.0.788709270274.issue34963@psf.upfronthosting.co.za> Message-ID: <1539340080.04.0.788709270274.issue34963@psf.upfronthosting.co.za> Change by Alexander B?hn : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 06:36:07 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 12 Oct 2018 10:36:07 +0000 Subject: [issue34900] unittest subTests() fails when called from debug() In-Reply-To: <1538691873.85.0.545547206417.issue34900@psf.upfronthosting.co.za> Message-ID: <1539340567.8.0.788709270274.issue34900@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset da2bf9f66d0c95b988c5d87646d168f65499b316 by Berker Peksag (Bruno Oliveira) in branch 'master': bpo-34900: Make TestCase.debug() work with subtests (GH-9707) https://github.com/python/cpython/commit/da2bf9f66d0c95b988c5d87646d168f65499b316 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 06:36:09 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Oct 2018 10:36:09 +0000 Subject: [issue34900] unittest subTests() fails when called from debug() In-Reply-To: <1538691873.85.0.545547206417.issue34900@psf.upfronthosting.co.za> Message-ID: <1539340569.09.0.788709270274.issue34900@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9196 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 06:36:15 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Oct 2018 10:36:15 +0000 Subject: [issue34900] unittest subTests() fails when called from debug() In-Reply-To: <1538691873.85.0.545547206417.issue34900@psf.upfronthosting.co.za> Message-ID: <1539340575.32.0.788709270274.issue34900@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9197 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 06:55:18 2018 From: report at bugs.python.org (Anton Barkovsky) Date: Fri, 12 Oct 2018 10:55:18 +0000 Subject: [issue27261] io.BytesIO.truncate does not work as advertised In-Reply-To: <1465332777.38.0.718878645897.issue27261@psf.upfronthosting.co.za> Message-ID: <1539341718.24.0.788709270274.issue27261@psf.upfronthosting.co.za> Anton Barkovsky added the comment: I'm willing to try to fix this behavior. I just want to check that this would not be considered breaking backwards compatibility. I can imagine in theory some code relying on it, but I would say that it would be relying on a bug. If some code is passed BytesIO in place of a file, then the current behavior is clearly undesirable. If some code specifically uses BytesIO and relies on this... I guess this can happen, but should be very rare and contrary to widely documented behavior. So it seems ok to just fix this, but I'm not very familiar with how such changes are usually handled in cPython, so I'd like to get approval from someone experienced. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 07:07:06 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 12 Oct 2018 11:07:06 +0000 Subject: [issue34900] unittest subTests() fails when called from debug() In-Reply-To: <1538691873.85.0.545547206417.issue34900@psf.upfronthosting.co.za> Message-ID: <1539342426.58.0.788709270274.issue34900@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 7a98e302c37781f9c6448a28bc70bff18b7e2862 by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-34900: Make TestCase.debug() work with subtests (GH-9707) https://github.com/python/cpython/commit/7a98e302c37781f9c6448a28bc70bff18b7e2862 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 07:07:48 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 12 Oct 2018 11:07:48 +0000 Subject: [issue34900] unittest subTests() fails when called from debug() In-Reply-To: <1538691873.85.0.545547206417.issue34900@psf.upfronthosting.co.za> Message-ID: <1539342468.96.0.788709270274.issue34900@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset c1fe49c01f3850aaa32a7d75e47f90eb5c5f7efe by Berker Peksag (Miss Islington (bot)) in branch '3.6': bpo-34900: Make TestCase.debug() work with subtests (GH-9707) https://github.com/python/cpython/commit/c1fe49c01f3850aaa32a7d75e47f90eb5c5f7efe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 07:07:57 2018 From: report at bugs.python.org (Anton Barkovsky) Date: Fri, 12 Oct 2018 11:07:57 +0000 Subject: [issue23794] http package should support HTTP/2 In-Reply-To: <1427479110.25.0.801999785412.issue23794@psf.upfronthosting.co.za> Message-ID: <1539342477.7.0.788709270274.issue23794@psf.upfronthosting.co.za> Change by Anton Barkovsky : ---------- nosy: +anton.barkovsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 07:09:21 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 12 Oct 2018 11:09:21 +0000 Subject: [issue34900] unittest subTests() fails when called from debug() In-Reply-To: <1538691873.85.0.545547206417.issue34900@psf.upfronthosting.co.za> Message-ID: <1539342561.68.0.788709270274.issue34900@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 07:18:22 2018 From: report at bugs.python.org (Anton Barkovsky) Date: Fri, 12 Oct 2018 11:18:22 +0000 Subject: [issue34961] Global scoping when shadowing local names in class definitions In-Reply-To: <1539285304.26.0.788709270274.issue34961@psf.upfronthosting.co.za> Message-ID: <1539343102.48.0.788709270274.issue34961@psf.upfronthosting.co.za> Change by Anton Barkovsky : ---------- nosy: +anton.barkovsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 08:06:12 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Oct 2018 12:06:12 +0000 Subject: [issue34203] documentation: recommend Python 3 over 2 in faq In-Reply-To: <1532397328.96.0.56676864532.issue34203@psf.upfronthosting.co.za> Message-ID: <1539345972.22.0.788709270274.issue34203@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d4ed8809ddfaa23fe5edf2987c03afc32f5576c0 by Miss Islington (bot) in branch '3.7': bpo-34203: FAQ now recommends python 3.x over 2.x (GH-9796) https://github.com/python/cpython/commit/d4ed8809ddfaa23fe5edf2987c03afc32f5576c0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 08:06:16 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Oct 2018 12:06:16 +0000 Subject: [issue34203] documentation: recommend Python 3 over 2 in faq In-Reply-To: <1532397328.96.0.56676864532.issue34203@psf.upfronthosting.co.za> Message-ID: <1539345976.25.0.788709270274.issue34203@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 86cfac47cf736fae90a617959288ccade18fd07e by Miss Islington (bot) in branch '3.6': bpo-34203: FAQ now recommends python 3.x over 2.x (GH-9796) https://github.com/python/cpython/commit/86cfac47cf736fae90a617959288ccade18fd07e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 08:06:20 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Oct 2018 12:06:20 +0000 Subject: [issue34203] documentation: recommend Python 3 over 2 in faq In-Reply-To: <1532397328.96.0.56676864532.issue34203@psf.upfronthosting.co.za> Message-ID: <1539345980.11.0.788709270274.issue34203@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6198976ec807cf3b658e902fd63db88a3ac99b8c by Miss Islington (bot) in branch '2.7': bpo-34203: FAQ now recommends python 3.x over 2.x (GH-9796) https://github.com/python/cpython/commit/6198976ec807cf3b658e902fd63db88a3ac99b8c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 08:18:38 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 12 Oct 2018 12:18:38 +0000 Subject: [issue34203] documentation: recommend Python 3 over 2 in faq In-Reply-To: <1532397328.96.0.56676864532.issue34203@psf.upfronthosting.co.za> Message-ID: <1539346718.16.0.788709270274.issue34203@psf.upfronthosting.co.za> Change by Tal Einat : ---------- pull_requests: +9198 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 09:06:22 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 12 Oct 2018 13:06:22 +0000 Subject: [issue20304] Argument Clinic: char convertor should use default values of type bytes In-Reply-To: <1390146665.62.0.375243979235.issue20304@psf.upfronthosting.co.za> Message-ID: <1539349582.22.0.788709270274.issue20304@psf.upfronthosting.co.za> Tal Einat added the comment: This was fixed in PR GH-8039. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 09:42:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 13:42:07 +0000 Subject: [issue34964] Make Tkinter sources more readable by adding blank lines Message-ID: <1539351727.5.0.788709270274.issue34964@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Tkinter sources are old and don't conform PEP 8. Usually we don't reformat existing sources for avoiding problems with backporting and breaking the history of lines. But I think that we can make some refinements in Tkinter sources. The tkinter module contains a lot of small methods (often just 1 or 2 lines of code), but with large multiline docstrings. Currently methods are not separated by blank lines. As result, the code of the method is visually closer to the header of the following method that to the header of its method. The proposed patch adds empty lines between methods and double empty lines between class (and removes few redundant empty lines). Most changes are made automatically: autopep8 --select E301,E303,E305 --in-place --recursive Lib/tkinter/ and edited after this (added missed empty lines and removed few unwanted changes). Since it affects only empty lines, it doesn't break the lines history. And I think this will not make backporting more difficult. ---------- components: Library (Lib), Tkinter messages: 327585 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Make Tkinter sources more readable by adding blank lines type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 09:43:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 13:43:32 +0000 Subject: [issue34964] Make Tkinter sources more readable by adding blank lines In-Reply-To: <1539351727.5.0.788709270274.issue34964@psf.upfronthosting.co.za> Message-ID: <1539351812.06.0.788709270274.issue34964@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +9199 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 10:20:59 2018 From: report at bugs.python.org (Srikanth) Date: Fri, 12 Oct 2018 14:20:59 +0000 Subject: [issue34965] Python on Docker container using flask is going down after sometime Message-ID: <1539354059.88.0.788709270274.issue34965@psf.upfronthosting.co.za> New submission from Srikanth : We are have created Python 3.5 image on docker container. All applications which are running on non-flask are working fine, but applications which are running on flask 0.12.2 are failing after prolonged usage of the application (Approx after 12 hours). Note: We have enabled heart beat check for python to make sure the container is up which hits every 10 seconds. After approx 12 hours, the application is stopping to respond to heart beat. Any expert suggestion plz. ---------- components: Tests messages: 327586 nosy: sri_spl priority: normal severity: normal status: open title: Python on Docker container using flask is going down after sometime type: crash versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 10:27:51 2018 From: report at bugs.python.org (Anton Barkovsky) Date: Fri, 12 Oct 2018 14:27:51 +0000 Subject: [issue34965] Python on Docker container using flask is going down after sometime In-Reply-To: <1539354059.88.0.788709270274.issue34965@psf.upfronthosting.co.za> Message-ID: <1539354471.93.0.788709270274.issue34965@psf.upfronthosting.co.za> Anton Barkovsky added the comment: Do you have any evidence to believe that this is caused by a bug in CPython itself or its stdlib? If not, it's probably an issue with your code, libraries, or environment, and so out of scope in this tracker. ---------- nosy: +anton.barkovsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 10:33:42 2018 From: report at bugs.python.org (Antoine Pietri) Date: Fri, 12 Oct 2018 14:33:42 +0000 Subject: [issue34961] Global scoping when shadowing local names in class definitions In-Reply-To: <1539285304.26.0.788709270274.issue34961@psf.upfronthosting.co.za> Message-ID: <1539354822.84.0.788709270274.issue34961@psf.upfronthosting.co.za> Antoine Pietri added the comment: Tracking down the issue a bit further: a = 10 def main(): a = 42 class wtf(): print(a) class wtf2(): print(a) a = 2 main() prints: 42 10 It seems that when there is an assignation in the class body, prior usages of the variables in the class body are done by loading the variable using LOAD_NAME instead of LOAD_CLASSDEREF: Disassembly of : [...] 8 8 LOAD_NAME 3 (print) 10 LOAD_CLASSDEREF 0 (a) 12 CALL_FUNCTION 1 14 POP_TOP 16 LOAD_CONST 1 (None) 18 RETURN_VALUE Disassembly of : [...] 11 8 LOAD_NAME 3 (print) 10 LOAD_NAME 4 (a) 12 CALL_FUNCTION 1 14 POP_TOP 12 16 LOAD_CONST 1 (2) 18 STORE_NAME 4 (a) 20 LOAD_CONST 2 (None) 22 RETURN_VALUE ---------- nosy: +antoine.pietri _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 10:35:00 2018 From: report at bugs.python.org (Srikanth) Date: Fri, 12 Oct 2018 14:35:00 +0000 Subject: [issue34965] Python on Docker container using flask is going down after sometime In-Reply-To: <1539354059.88.0.788709270274.issue34965@psf.upfronthosting.co.za> Message-ID: <1539354900.41.0.788709270274.issue34965@psf.upfronthosting.co.za> Srikanth added the comment: @anton.barkovsky Thank you so much for quick response. I am not pretty sure, but below are the findings so far. The same docker container is used by 30+ applications. All applications are working fine until last week and all of a sudden all apps are going down one by one. Our preliminary analysis is all projects using flask are going down where as apps not using flask are good. We use Kubernetes service layer, so we are checking if there is anything suspicious upgrade happened there as well. I am trying to explore more to see if anybody faced such issues with flask Eg: https://stackoverflow.com/questions/24884901/python-flask-webserver-stop-responding Thanks much for taking time ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 10:37:39 2018 From: report at bugs.python.org (Mayank Asthana) Date: Fri, 12 Oct 2018 14:37:39 +0000 Subject: [issue23794] http package should support HTTP/2 In-Reply-To: <1427479110.25.0.801999785412.issue23794@psf.upfronthosting.co.za> Message-ID: <1539355059.53.0.788709270274.issue23794@psf.upfronthosting.co.za> Change by Mayank Asthana : ---------- nosy: +masthana _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 10:54:18 2018 From: report at bugs.python.org (Windson Yang) Date: Fri, 12 Oct 2018 14:54:18 +0000 Subject: [issue34965] Python on Docker container using flask is going down after sometime In-Reply-To: <1539354059.88.0.788709270274.issue34965@psf.upfronthosting.co.za> Message-ID: <1539356058.65.0.788709270274.issue34965@psf.upfronthosting.co.za> Windson Yang added the comment: Hello, Srikanth, We can't fix/find the bug by the info you give, Would you mind provide the traceback log after crashing? ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 10:55:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Oct 2018 14:55:25 +0000 Subject: [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1539356125.33.0.788709270274.issue11233@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2d6097d027e0dd3debbabc702aa9c98d94ba32a3 by Victor Stinner (Cheryl Sabella) in branch 'master': bpo-11233: Create availability directive for documentation (GH-9692) https://github.com/python/cpython/commit/2d6097d027e0dd3debbabc702aa9c98d94ba32a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 10:57:22 2018 From: report at bugs.python.org (Srikanth) Date: Fri, 12 Oct 2018 14:57:22 +0000 Subject: [issue34965] Python on Docker container using flask is going down after sometime In-Reply-To: <1539354059.88.0.788709270274.issue34965@psf.upfronthosting.co.za> Message-ID: <1539356242.09.0.788709270274.issue34965@psf.upfronthosting.co.za> Srikanth added the comment: @Windson Yang The container is neither crashing nor responding for requests. Is there a way I can pull any dumps or tracelog, so I can gather and give it to you ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 11:09:47 2018 From: report at bugs.python.org (Mayank Asthana) Date: Fri, 12 Oct 2018 15:09:47 +0000 Subject: [issue29341] Missing accepting path-like object in docstrings of os module functions In-Reply-To: <1485064061.59.0.597221589705.issue29341@psf.upfronthosting.co.za> Message-ID: <1539356987.28.0.788709270274.issue29341@psf.upfronthosting.co.za> Change by Mayank Asthana : ---------- nosy: +masthana _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 11:50:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 15:50:11 +0000 Subject: [issue34966] Pydoc: better support of method aliases Message-ID: <1539359411.67.0.788709270274.issue34966@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Pydoc supports aliases. If the alias is defined in the same class class A: def foo(self, x=42): pass bar = foo it will render the docstring only for the original function. For the alias it will output just "bar = foo(self, x=42)". But this doesn't work if the original function or alias are inherited. It often happened in the tkinter and turtle modules which have a hierarchy of classes, and aliases defined in parent classes. Compare for example the rendering for methods itemconfig and lift in help(tkinter.Listbox). The proposed PR makes pydoc detecting aliases for inherited methods. ---------- components: Library (Lib) messages: 327593 nosy: serhiy.storchaka, yselivanov priority: normal severity: normal status: open title: Pydoc: better support of method aliases type: behavior versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 11:59:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 15:59:57 +0000 Subject: [issue34966] Pydoc: better support of method aliases In-Reply-To: <1539359411.67.0.788709270274.issue34966@psf.upfronthosting.co.za> Message-ID: <1539359997.84.0.788709270274.issue34966@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +9200 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 12:01:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 16:01:08 +0000 Subject: [issue34964] Make Tkinter sources more readable by adding blank lines In-Reply-To: <1539351727.5.0.788709270274.issue34964@psf.upfronthosting.co.za> Message-ID: <1539360068.29.0.788709270274.issue34964@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset dc0d571b6401527f236b0513f29847e2b9b8a188 by Serhiy Storchaka in branch 'master': bpo-34964: Make Tkinter sources more readable by adding blank lines. (GH-9822) https://github.com/python/cpython/commit/dc0d571b6401527f236b0513f29847e2b9b8a188 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 12:02:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 16:02:03 +0000 Subject: [issue34964] Make Tkinter sources more readable by adding blank lines In-Reply-To: <1539351727.5.0.788709270274.issue34964@psf.upfronthosting.co.za> Message-ID: <1539360123.61.0.788709270274.issue34964@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 Oct 12 12:18:14 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Oct 2018 16:18:14 +0000 Subject: [issue34912] Update overflow checks in resize_buffer In-Reply-To: <1538803916.84.0.545547206417.issue34912@psf.upfronthosting.co.za> Message-ID: <1539361094.05.0.788709270274.issue34912@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 12:23:11 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Oct 2018 16:23:11 +0000 Subject: [issue34948] Document __warningregistry__ In-Reply-To: <1539136243.9.0.788709270274.issue34948@psf.upfronthosting.co.za> Message-ID: <1539361391.71.0.788709270274.issue34948@psf.upfronthosting.co.za> Change by ?ric Araujo : ---------- title: Document __warningregister__ -> Document __warningregistry__ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 12:38:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 16:38:39 +0000 Subject: =?utf-8?q?=5Bissue34963=5D_String_representation_for_types_created_with_t?= =?utf-8?q?yping=2ENewType=28=E2=80=A6=29_are_opaque_and_unappealing?= In-Reply-To: <1539313395.67.0.788709270274.issue34963@psf.upfronthosting.co.za> Message-ID: <1539362319.07.0.788709270274.issue34963@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: For repr you need to set __qualname__, not just __name__. It may be worth to set also __module__ for pickleability and better help. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 12:42:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 16:42:24 +0000 Subject: =?utf-8?q?=5Bissue34963=5D_String_representation_for_types_created_with_t?= =?utf-8?q?yping=2ENewType=28=E2=80=A6=29_are_opaque_and_unappealing?= In-Reply-To: <1539313395.67.0.788709270274.issue34963@psf.upfronthosting.co.za> Message-ID: <1539362544.79.0.788709270274.issue34963@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You can determine the module of the caller by using sys._getframe(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 12:44:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 16:44:15 +0000 Subject: [issue23831] tkinter canvas lacks of moveto method. In-Reply-To: <1427832932.11.0.38662420535.issue23831@psf.upfronthosting.co.za> Message-ID: <1539362655.43.0.788709270274.issue23831@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset bf034715db9d6e1603ea432d40041e5577ed3332 by Serhiy Storchaka (Juliette Monsel) in branch 'master': bpo-23831: Add moveto method to the tkinter.Canvas widget. (GH-9768) https://github.com/python/cpython/commit/bf034715db9d6e1603ea432d40041e5577ed3332 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 12:44:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 16:44:47 +0000 Subject: [issue23831] tkinter canvas lacks of moveto method. In-Reply-To: <1427832932.11.0.38662420535.issue23831@psf.upfronthosting.co.za> Message-ID: <1539362687.51.0.788709270274.issue23831@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 Oct 12 12:48:19 2018 From: report at bugs.python.org (Anthony Sottile) Date: Fri, 12 Oct 2018 16:48:19 +0000 Subject: [issue12782] Multiple context expressions do not support parentheses for continuation across lines In-Reply-To: <1313719817.79.0.828403712604.issue12782@psf.upfronthosting.co.za> Message-ID: <1539362899.8.0.788709270274.issue12782@psf.upfronthosting.co.za> Change by Anthony Sottile : ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 12:52:07 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Oct 2018 16:52:07 +0000 Subject: [issue34918] Python 3 tkinter measurement problem In-Reply-To: <1538888941.11.0.545547206417.issue34918@psf.upfronthosting.co.za> Message-ID: <1539363127.44.0.788709270274.issue34918@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I cannot reproduce 'too large'. My screen in 340 mm high. It is reported as 305 in console Python 3.7.1rc1 and in IDLE run normally and with -n (no subprocess) and in console Python 3.6.7. The point of trying '-n' is to run the test code in the IDLE process, which now makes a DPIAwareness call. I am fairly sure that my console does not. In any case, tkinter interfaces to tcl/tk via _tkinter. Unless it can be shown that _tkinter distorts the value returned by tk, I think this should be closed as '3rd party'. ---------- nosy: +serhiy.storchaka, terry.reedy versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 13:05:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 17:05:24 +0000 Subject: [issue34918] Python 3 tkinter measurement problem In-Reply-To: <1538888941.11.0.545547206417.issue34918@psf.upfronthosting.co.za> Message-ID: <1539363924.38.0.788709270274.issue34918@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a Tk issue. Tkinter returns the same result as a plain Tk (unsurprisingly). $ rlwrap wish % winfo screenmmwidth . 1016 % winfo screenwidth . 3840 % puts [expr "25.4*[winfo screenwidth .]/[winfo screenmmwidth .]"] 96.0 ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 13:06:16 2018 From: report at bugs.python.org (Julien Palard) Date: Fri, 12 Oct 2018 17:06:16 +0000 Subject: [issue34967] Sphinx is deprecating add_description_unit Message-ID: <1539363976.13.0.788709270274.issue34967@psf.upfronthosting.co.za> New submission from Julien Palard : When running `make -C Doc/ autobuild-dev-html` with a recent Sphinx, I'm getting: /.../site-packages/sphinx/application.py:927: RemovedInSphinx20Warning: app.add_description_unit() is now deprecated. Use app.add_object_type() instead. Looks easy to fix. ---------- assignee: docs at python components: Documentation keywords: easy messages: 327600 nosy: docs at python, mdk priority: normal severity: normal status: open title: Sphinx is deprecating add_description_unit versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 13:08:55 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 12 Oct 2018 17:08:55 +0000 Subject: [issue23892] Introduce sys.implementation.opt_levels In-Reply-To: <1428529304.36.0.272921433795.issue23892@psf.upfronthosting.co.za> Message-ID: <1539364135.92.0.788709270274.issue23892@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +9201 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 13:14:32 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 12 Oct 2018 17:14:32 +0000 Subject: [issue23892] Introduce sys.implementation.opt_levels In-Reply-To: <1428529304.36.0.272921433795.issue23892@psf.upfronthosting.co.za> Message-ID: <1539364472.07.0.788709270274.issue23892@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Brett, I know you're away this month, so please ignore this, Eric, I hope the changes I made reflect your original intent in the code review for #23731. This is my first change to the C code, so I hope it's close. The tests passed, so it must be correct. ;-) [j/k] ---------- nosy: +cheryl.sabella versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 13:15:35 2018 From: report at bugs.python.org (Big Stone) Date: Fri, 12 Oct 2018 17:15:35 +0000 Subject: [issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1539364535.47.0.788709270274.issue17535@psf.upfronthosting.co.za> Big Stone added the comment: Dear Mike Thompson, I think your most reasonnable option this year is to use the IDLEX fork, that works on Python-3.6/3.7 now: pip install IDLEX python idlex.pyw # or python [directory of python.exe]\scripts\idlex.pyw ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 13:24:01 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Oct 2018 17:24:01 +0000 Subject: [issue34919] Crash caused by certain characters in a string In-Reply-To: <1538906666.64.0.545547206417.issue34919@psf.upfronthosting.co.za> Message-ID: <1539365041.91.0.788709270274.issue34919@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The report is based on a crash running the otree plugin (proper term?) for the Django framework. For a bug to be our responsibility, it must be present in the cpython repository, and should be reproducible without installing 3rd party modules. For instance, while #34807 and #34241 reported crashes while using Django, the test added to the test suite involved a trivial expression: int/float/complex('\u3053\u3093\u306b\u3061\u306f') The fix in #34807 was merged after 3.7.0 was released, hence the request to test with 3.7.1rc1 (or the upcoming soon 3.7.1rc2) or an updated clone. The literal "?AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" by itself does not cause a crash. If the crash persists with 3.7.1, please find the code that processes the label string and extract the minimal code that results in a crash. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 13:26:37 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Oct 2018 17:26:37 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1539365197.67.0.788709270274.issue34922@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Should this be closed as fixed? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 13:34:10 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Oct 2018 17:34:10 +0000 Subject: [issue34924] inspect.signature isn't aware that types.MethodType can wrap any callable In-Reply-To: <1538963631.37.0.545547206417.issue34924@psf.upfronthosting.co.za> Message-ID: <1539365650.02.0.788709270274.issue34924@psf.upfronthosting.co.za> Terry J. Reedy added the comment: What do you consider to be a bug? The empty signature is correct, as your successful call shows, and the IDLE calltip is, correctly, '()'. I also do not see how name completion is affected. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 13:44:33 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 17:44:33 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1539366273.39.0.788709270274.issue34922@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since it is tagged as a release blocker, I think that only Ned can close it. Personally I don't think that this issue is a security issue. digest() and hexdigest() argument usually is a constant. It is unlikely that the crash can be triggered by user data. ---------- assignee: serhiy.storchaka -> ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 13:54:26 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 12 Oct 2018 17:54:26 +0000 Subject: [issue34967] Sphinx is deprecating add_description_unit In-Reply-To: <1539363976.13.0.788709270274.issue34967@psf.upfronthosting.co.za> Message-ID: <1539366866.58.0.788709270274.issue34967@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +9202 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 14:06:22 2018 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Fri, 12 Oct 2018 18:06:22 +0000 Subject: [issue33381] Incorrect documentation for strftime()/strptime() format code %f In-Reply-To: <1524963978.65.0.682650639539.issue33381@psf.upfronthosting.co.za> Message-ID: <1539367582.7.0.788709270274.issue33381@psf.upfronthosting.co.za> Change by Fred L. Drake, Jr. : ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 14:17:11 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Oct 2018 18:17:11 +0000 Subject: [issue34961] Global scoping when shadowing local names in class definitions In-Reply-To: <1539285304.26.0.788709270274.issue34961@psf.upfronthosting.co.za> Message-ID: <1539368231.87.0.788709270274.issue34961@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Questions about whether basic syntax behavior is correct should be asked elsewhere, such as python-list. A proper answer requires a careful reading of the doc and a non-trivial answer. Someone on python-list should do that. Classes and scoping are known to have some non-intuitive corner cases. Quite aside from the fact that the default assumption should be that the implementation of heavily used syntax is correct, my memory is that what you see is correct. But I have not read the appropriate parts of the doc for a few years. PS. 3.4 and 3.5 currently only get security fixes. The same will be true of 3.6 sometime next year. ---------- nosy: +terry.reedy versions: -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 14:27:58 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Oct 2018 18:27:58 +0000 Subject: [issue34966] Pydoc: better support of method aliases In-Reply-To: <1539359411.67.0.788709270274.issue34966@psf.upfronthosting.co.za> Message-ID: <1539368878.24.0.788709270274.issue34966@psf.upfronthosting.co.za> Terry J. Reedy added the comment: What do you mean by 'does not work'. Alias of function in same namespace. | itemconfig = itemconfigure(self, index, cnf=None, **kw) | | itemconfigure(self, index, cnf=None, **kw) | Configure resources of an ITEM. Alias of function in inherited namespace. | lift = tkraise(self, aboveThis=None) | Raise this widget in the stacking order. This is also marked as an alias. The difference is the inclusions of the docstring of the original. I think it should be, since it would not otherwise be present in the help output. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 14:51:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 18:51:47 +0000 Subject: [issue34966] Pydoc: better support of method aliases In-Reply-To: <1539359411.67.0.788709270274.issue34966@psf.upfronthosting.co.za> Message-ID: <1539370307.57.0.788709270274.issue34966@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The original function is present too. | tkraise(self, aboveThis=None) | Raise this widget in the stacking order. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 15:59:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 19:59:22 +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: <1539374362.82.0.788709270274.issue20180@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9203 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 16:10:53 2018 From: report at bugs.python.org (=?utf-8?q?Alexander_B=C3=B6hn?=) Date: Fri, 12 Oct 2018 20:10:53 +0000 Subject: =?utf-8?q?=5Bissue34963=5D_String_representation_for_types_created_with_t?= =?utf-8?q?yping=2ENewType=28=E2=80=A6=29_are_opaque_and_unappealing?= In-Reply-To: <1539313395.67.0.788709270274.issue34963@psf.upfronthosting.co.za> Message-ID: <1539375053.66.0.788709270274.issue34963@psf.upfronthosting.co.za> Alexander B?hn added the comment: The proposed solution in the PR replaces the identity-function return value of `NewType(?)` with a callable class instance that adds an explicit `__repr__` function ? which that function cobbles together the string representations of the supplied type and the new types? name into a sensible and stylistically consistent ?repr? output. In this capacity the `__name__` vs. `__qualname__` consideration would appear to be an implementation detail ? in this case, calculating a `__qualname__` value, ? la PEP-3155, doesn?t seem to be possible nor advantageous, in this specific case. On the other hand, adding `__module__` seems like it?d be a win ? although I am wary about introducing a dependency on a function that starts with an underscore. How reliable and/or portable is `sys._getframe()` ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 16:20:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Oct 2018 20:20:08 +0000 Subject: =?utf-8?q?=5Bissue34963=5D_String_representation_for_types_created_with_t?= =?utf-8?q?yping=2ENewType=28=E2=80=A6=29_are_opaque_and_unappealing?= In-Reply-To: <1539313395.67.0.788709270274.issue34963@psf.upfronthosting.co.za> Message-ID: <1539375608.92.0.788709270274.issue34963@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are disadvantages of using a callable class. First, creating a class is 10-100 times slower than creating a function. Second, calling it is slower than calling a function. sys._getframe() is already used in the typing module (and also in collections and enum). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 16:56:52 2018 From: report at bugs.python.org (multun) Date: Fri, 12 Oct 2018 20:56:52 +0000 Subject: [issue34961] Global scoping when shadowing local names in class definitions In-Reply-To: <1539285304.26.0.788709270274.issue34961@psf.upfronthosting.co.za> Message-ID: <1539377812.16.0.788709270274.issue34961@psf.upfronthosting.co.za> multun added the comment: Closing, this is documented, and as such most likely intended. "A class definition is an executable statement that may use and define names. These references follow the normal rules for name resolution with an exception that unbound local variables are looked up in the global namespace." https://docs.python.org/3.7/reference/executionmodel.html#builtins-and-restricted-execution ---------- resolution: -> not a bug stage: -> resolved status: open -> closed versions: +Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 17:53:18 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 12 Oct 2018 21:53:18 +0000 Subject: [issue32052] Provide access to buffer of asyncio.StreamReader In-Reply-To: <1510859388.33.0.213398074469.issue32052@psf.upfronthosting.co.za> Message-ID: <1539381198.97.0.788709270274.issue32052@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- dependencies: +Add asyncio.BufferedProtocol stage: -> needs patch versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 17:56:22 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 12 Oct 2018 21:56:22 +0000 Subject: [issue32052] Provide access to buffer of asyncio.StreamReader In-Reply-To: <1510859388.33.0.213398074469.issue32052@psf.upfronthosting.co.za> Message-ID: <1539381382.09.0.788709270274.issue32052@psf.upfronthosting.co.za> Yury Selivanov added the comment: So we have BufferedProtocol in 3.7; now we need to re-implement asyncio streams on top of it. But even after doing that I'm not that sure we want to expose the low-level buffer. ---------- stage: needs patch -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 18:09:55 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 12 Oct 2018 22:09:55 +0000 Subject: [issue23554] EchoServerClientProtocol class should be called EchoServerProtocol In-Reply-To: <1425189572.41.0.939168822868.issue23554@psf.upfronthosting.co.za> Message-ID: <1539382195.59.0.788709270274.issue23554@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Here's a link to the example that the original OP is referring to: https://docs.python.org/3/library/asyncio-protocol.html?highlight=echoserverclientprotocol#tcp-echo-server Since this doc page was recently rewritten, I'm not sure if this should be considered a typo. ---------- nosy: +cheryl.sabella, yselivanov versions: +Python 3.8 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 18:17:34 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 12 Oct 2018 22:17:34 +0000 Subject: [issue23554] EchoServerClientProtocol class should be called EchoServerProtocol In-Reply-To: <1425189572.41.0.939168822868.issue23554@psf.upfronthosting.co.za> Message-ID: <1539382654.31.0.788709270274.issue23554@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Agree, EchoServer is the better name ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 18:56:16 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 12 Oct 2018 22:56:16 +0000 Subject: [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1539384976.75.0.788709270274.issue11233@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- pull_requests: +9204 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 19:00:22 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 12 Oct 2018 23:00:22 +0000 Subject: [issue23554] EchoServerClientProtocol class should be called EchoServerProtocol In-Reply-To: <1425189572.41.0.939168822868.issue23554@psf.upfronthosting.co.za> Message-ID: <1539385222.52.0.788709270274.issue23554@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Thanks @asvetlov. I'm going to mark this as an Easy Documentation issue, good for a first-time contributor. ---------- keywords: +easy stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 19:50:11 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 12 Oct 2018 23:50:11 +0000 Subject: [issue23554] EchoServerClientProtocol class should be called EchoServerProtocol In-Reply-To: <1425189572.41.0.939168822868.issue23554@psf.upfronthosting.co.za> Message-ID: <1539388211.8.0.788709270274.issue23554@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Cool! Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 22:20:02 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Sat, 13 Oct 2018 02:20:02 +0000 Subject: [issue34968] loop.call_soon_threadsafe should be documented to be re-entrant-safe too Message-ID: <1539397202.71.0.788709270274.issue34968@psf.upfronthosting.co.za> New submission from Nathaniel Smith : Asyncio needs a way to schedule work from other threads; and it also needs a way to scheduler work from code that can run at arbitrary times in the same thread, such as signal handlers or object finalizers ("reentrant contexts"). Currently loop.call_soon_threadsafe is documented to be the way to schedule work from other threads, but there is no documented way to schedule work from reentrant contexts. These are not quite the same thing, because reentrant contexts block the main thread while they're running. Generally, making code safe to call from __del__ or signal handlers is strictly harder than making it safe to call from other threads. (See bpo-14976 for an example of stdlib code being thread-safe but not reentrant-safe.) Technically speaking, this means that right now, if you need to call an asyncio API from a __del__ method, then the only officially supported way to do that is to write something like: def __del__(self): def actual_cleanup_code(): ... def thread_dispatcher(): loop.call_soon_threadsafe(actual_cleanup_code) thread = threading.Thread(target=thread_dispatcher) thread.start() But this is kind of silly. There should be some equivalent of loop.call_soon that *is* safe to call from reentrant contexts, so we could just write: def __del__(self): def actual_cleanup_code(): ... loop.call_soon_reentrant_safe(actual_cleanup_code) But... it doesn't really make sense to add a new method for this, since the desired semantics are strictly more powerful than the current loop.call_soon_threadsafe. Instead, we should tighten the guarantees on call_soon_threadsafe, by documenting that it's safe to use from reentrant contexts. Also, AFAICT the stdlib's implementation of call_soon_threadsafe is already reentrant-safe, so this wouldn't require any changes to stdlib code, only to the docs. But it would provide an additional formal guarantee that user-level code could take advantage of, and impose an additional constraint on developers of third-party loops. (I don't think the constraint is *too* onerous, fortunately. It's quite tricky to implement a version of call_soon that's thread-safe, reentrant-safe, *and* guarantees that the callback will eventually be invoked, even if call_soon races with loop shutdown. But in asyncio, all variants of call_soon are allowed to silently drop callbacks at loop shutdown, which makes this much easier.) ---------- components: asyncio messages: 327618 nosy: asvetlov, njs, yselivanov priority: normal severity: normal status: open title: loop.call_soon_threadsafe should be documented to be re-entrant-safe too versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 23:20:39 2018 From: report at bugs.python.org (Martin Panter) Date: Sat, 13 Oct 2018 03:20:39 +0000 Subject: [issue34920] PYTHONWARNINGS entries are escaped In-Reply-To: <1538908217.47.0.545547206417.issue34920@psf.upfronthosting.co.za> Message-ID: <1539400839.37.0.788709270274.issue34920@psf.upfronthosting.co.za> Change by Martin Panter : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 23:32:50 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Oct 2018 03:32:50 +0000 Subject: [issue34783] [3.7] segmentation-fault/core dump when try to run non-existing file specified on commandline In-Reply-To: <1537747248.54.0.956365154283.issue34783@psf.upfronthosting.co.za> Message-ID: <1539401570.74.0.788709270274.issue34783@psf.upfronthosting.co.za> Change by Ned Deily : ---------- pull_requests: +9205 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 23:41:30 2018 From: report at bugs.python.org (shuoz) Date: Sat, 13 Oct 2018 03:41:30 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1539402090.47.0.788709270274.issue34922@psf.upfronthosting.co.za> shuoz added the comment: oh brother, maybe this worth open a cve. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 23:53:41 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Oct 2018 03:53:41 +0000 Subject: [issue34783] [3.7] segmentation-fault/core dump when try to run non-existing file specified on commandline In-Reply-To: <1537747248.54.0.956365154283.issue34783@psf.upfronthosting.co.za> Message-ID: <1539402821.9.0.788709270274.issue34783@psf.upfronthosting.co.za> Ned Deily added the comment: Re-opening. The new test_cmd_line_script fails on macOS framework builds because the test case assumes that the file name in sys.executable will appear in the error message. For macOS framework builds, sys.executable is the file name of the stub launcher and its file name bears no relationship to the file name of the actual python executable: $ python3.7 -c 'import sys;print(sys.executable)' /usr/local/bin/python3.7 $ python3.7 -m test test_cmd_line_script Run tests sequentially 0:00:00 load avg: 1.12 [1/1] test_cmd_line_script test test_cmd_line_script failed -- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/test/test_cmd_line_script.py", line 648, in test_nonexisting_script self.assertIn(program, err) AssertionError: 'python3.7' not found in "/Library/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'nonexistingscript.py': [Errno 2] No such file or directory\n" test_cmd_line_script failed For now, I'm going to disable the test for macOS frameworks but the test should get fixed. ---------- nosy: +ned.deily resolution: fixed -> stage: resolved -> patch review status: closed -> open versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 23:54:24 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Oct 2018 03:54:24 +0000 Subject: [issue34783] [3.7] segmentation-fault/core dump when try to run non-existing file specified on commandline In-Reply-To: <1537747248.54.0.956365154283.issue34783@psf.upfronthosting.co.za> Message-ID: <1539402864.84.0.788709270274.issue34783@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset f6c29a65e2a6da5c0014c868cf963c975b74e72b by Ned Deily in branch 'master': bpo-34783: Disable test_nonexisting_script for macOS framework builds (GH-9831) https://github.com/python/cpython/commit/f6c29a65e2a6da5c0014c868cf963c975b74e72b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 12 23:54:41 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Oct 2018 03:54:41 +0000 Subject: [issue34783] [3.7] segmentation-fault/core dump when try to run non-existing file specified on commandline In-Reply-To: <1537747248.54.0.956365154283.issue34783@psf.upfronthosting.co.za> Message-ID: <1539402881.17.0.788709270274.issue34783@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9206 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 00:07:05 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Oct 2018 04:07:05 +0000 Subject: [issue34783] [3.7] segmentation-fault/core dump when try to run non-existing file specified on commandline In-Reply-To: <1537747248.54.0.956365154283.issue34783@psf.upfronthosting.co.za> Message-ID: <1539403625.18.0.788709270274.issue34783@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 5d8ef8bc3f7307cd15f9d82ad4846e82b498ae88 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-34783: Disable test_nonexisting_script for macOS framework builds (GH-9831) (GH-9832) https://github.com/python/cpython/commit/5d8ef8bc3f7307cd15f9d82ad4846e82b498ae88 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 00:27:04 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Oct 2018 04:27:04 +0000 Subject: [issue34521] Multiple tests (test_socket, test_multiprocessing_*) fail due to incorrect recvmsg(2) buffer lengths, causing failures on FreeBSD CURRENT In-Reply-To: <1535389978.32.0.56676864532.issue34521@psf.upfronthosting.co.za> Message-ID: <1539404824.01.0.788709270274.issue34521@psf.upfronthosting.co.za> Ned Deily added the comment: Shouldn't there be a NEWS entry for this change since the change seems to be to Lib/multiprocessing and not just its tests? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 00:52:08 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Oct 2018 04:52:08 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1539406328.55.0.788709270274.issue34909@psf.upfronthosting.co.za> Ned Deily added the comment: Can you please merge a NEWS item for this issue using blurb since it is a user-visible problem? I'll cherry-pick it into the 3.7.1 final. ---------- priority: release blocker -> deferred blocker stage: resolved -> commit review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 00:53:28 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Oct 2018 04:53:28 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1539406408.48.0.788709270274.issue34576@psf.upfronthosting.co.za> Change by Ned Deily : ---------- priority: normal -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 01:33:12 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sat, 13 Oct 2018 05:33:12 +0000 Subject: [issue34095] [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault In-Reply-To: <1531314252.99.0.56676864532.issue34095@psf.upfronthosting.co.za> Message-ID: <1539408792.33.0.788709270274.issue34095@psf.upfronthosting.co.za> Chih-Hsuan Yen added the comment: Sorry, after reading the original issue carefully, I realize that my issue is slightly different. In my case running test_idle only crashes, and it crashes before the first test in test_idle, not in test_writelines. I copied the Arch Linux packaging script mentioned by Eli [2], modified it so that test_idle, test_tk and test_ttk_guionly are not skipped, and added a dependency ttf-font. With the modified PKGBUILD, the only failing test is test_ssl. I guess the issue has been fixed. Erich Eckner, could you still reproduce the original crash? [1] https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/python2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 01:45:43 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 13 Oct 2018 05:45:43 +0000 Subject: [issue34969] Add --fast, --best to the gzip CLI Message-ID: <1539409543.55.0.788709270274.issue34969@psf.upfronthosting.co.za> New submission from St?phane Wirtel : the gzip module has a CLI but this one does not allow to specify the compression method (slow, fast) ---------- assignee: matrixise messages: 327626 nosy: matrixise priority: normal severity: normal status: open title: Add --fast, --best to the gzip CLI versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 01:48:59 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 13 Oct 2018 05:48:59 +0000 Subject: [issue34969] Add --fast, --best to the gzip CLI In-Reply-To: <1539409543.55.0.788709270274.issue34969@psf.upfronthosting.co.za> Message-ID: <1539409739.3.0.788709270274.issue34969@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +9207 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 02:14:13 2018 From: report at bugs.python.org (Julien Palard) Date: Sat, 13 Oct 2018 06:14:13 +0000 Subject: [issue34967] Sphinx is deprecating add_description_unit In-Reply-To: <1539363976.13.0.788709270274.issue34967@psf.upfronthosting.co.za> Message-ID: <1539411253.12.0.788709270274.issue34967@psf.upfronthosting.co.za> Julien Palard added the comment: New changeset e385d0661ecf8bc9ba95c4395d9a11262c2cbfec by Julien Palard (St?phane Wirtel) in branch 'master': bpo-34967: Sphinx is deprecating add_description_unit, use add_object_type (GH-9827) https://github.com/python/cpython/commit/e385d0661ecf8bc9ba95c4395d9a11262c2cbfec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 02:14:21 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Oct 2018 06:14:21 +0000 Subject: [issue34967] Sphinx is deprecating add_description_unit In-Reply-To: <1539363976.13.0.788709270274.issue34967@psf.upfronthosting.co.za> Message-ID: <1539411261.64.0.788709270274.issue34967@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9208 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 02:14:32 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Oct 2018 06:14:32 +0000 Subject: [issue34967] Sphinx is deprecating add_description_unit In-Reply-To: <1539363976.13.0.788709270274.issue34967@psf.upfronthosting.co.za> Message-ID: <1539411272.2.0.788709270274.issue34967@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9209 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 02:14:40 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Oct 2018 06:14:40 +0000 Subject: [issue34967] Sphinx is deprecating add_description_unit In-Reply-To: <1539363976.13.0.788709270274.issue34967@psf.upfronthosting.co.za> Message-ID: <1539411280.79.0.788709270274.issue34967@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9210 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 02:20:46 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 13 Oct 2018 06:20:46 +0000 Subject: [issue34969] Add --fast, --best to the gzip CLI In-Reply-To: <1539409543.55.0.788709270274.issue34969@psf.upfronthosting.co.za> Message-ID: <1539411646.36.0.788709270274.issue34969@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- nosy: +mdk stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 02:33:16 2018 From: report at bugs.python.org (Julien Palard) Date: Sat, 13 Oct 2018 06:33:16 +0000 Subject: [issue34969] Add --fast, --best to the gzip CLI In-Reply-To: <1539409543.55.0.788709270274.issue34969@psf.upfronthosting.co.za> Message-ID: <1539412396.22.0.788709270274.issue34969@psf.upfronthosting.co.za> Julien Palard added the comment: Hi St?phane thanks for the proposal and the PR. But are those options usefull in real life? (I may be biased as a Linux user). I see this gzip CLI usefull to decompress a gzip file on platforms not having a gzip program installed, but I don't think it's usefull to compress. (Yet I'm OK with the current status-quo: If we allow to decompress, let's allow to compress, for consistency). But why drifting from "let's allow to compress just for consistency" to "let's replace the gzip command"? I mean, except is it's usefull in some cases that I don't see. Also so does it mean we'll have to add the 16 other gzip options at the end? ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 02:46:17 2018 From: report at bugs.python.org (cwickens) Date: Sat, 13 Oct 2018 06:46:17 +0000 Subject: [issue34919] Crash caused by certain characters in a string In-Reply-To: <1538906666.64.0.545547206417.issue34919@psf.upfronthosting.co.za> Message-ID: <1539413177.94.0.788709270274.issue34919@psf.upfronthosting.co.za> cwickens added the comment: OK thank you for the explanations. It does indeed sound a lot like issue 34241. I will test as soon as I get a chance. Anyway, I am OK with this bug being closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 03:04:26 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 13 Oct 2018 07:04:26 +0000 Subject: [issue34919] Crash caused by certain characters in a string In-Reply-To: <1538906666.64.0.545547206417.issue34919@psf.upfronthosting.co.za> Message-ID: <1539414266.21.0.788709270274.issue34919@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Just noticed that you have mentioned that it doesn't crash in Linux in the GitHub repo. I tried the same in Ubuntu and if it's due to the mentioned issue I think it should crash in Linux too. Anyway it's worth giving 3.7RC1 a try to validate this. You can also attach the core dump stack trace file if possible. Unfortunately, I don't have a Windows machine to test this. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 03:51:51 2018 From: report at bugs.python.org (pmpp) Date: Sat, 13 Oct 2018 07:51:51 +0000 Subject: [issue34969] Add --fast, --best to the gzip CLI In-Reply-To: <1539409543.55.0.788709270274.issue34969@psf.upfronthosting.co.za> Message-ID: <1539417111.49.0.788709270274.issue34969@psf.upfronthosting.co.za> pmpp added the comment: Hi, on platform without gzip ( there are some , including some widely used OS eg: https://github.com/bazelbuild/rules_docker/issues/507 ) ability to use python gzip cli is extremely usefull as a fallback. Though as discussed on irc default compression to 6 is a good tradeoff for the basic options fast (-1) / best(-9) and require less memory for decompression on target (could be embedded). ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 04:11:44 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Oct 2018 08:11:44 +0000 Subject: [issue34970] Protect all_tasks manipulation in asyncio.all_tasks() Message-ID: <1539418304.75.0.788709270274.issue34970@psf.upfronthosting.co.za> New submission from Andrew Svetlov : Traceback (most recent call last): File "C:\Users\max\AppData\Local\Programs\Python\Python37\lib\threading.py", line 917, in _bootstrap_inner self.run() File "D:\Proj\antwork\code\antwork_backend\server\data_handlers\order\playback_hd.py", line 147, in run send_to_ws(channel=self.room_name, data=json.loads(msg)) File "D:\Proj\antwork\code\antwork_backend\server\data_exchange.py", line 26, in send_to_ws asyncio.run(channel_layer.group_send(channel, send_data)) File "C:\Users\max\AppData\Local\Programs\Python\Python37\lib\asyncio\runners.py", line 46, in run _cancel_all_tasks(loop) File "C:\Users\max\AppData\Local\Programs\Python\Python37\lib\asyncio\runners.py", line 54, in _cancel_all_tasks to_cancel = tasks.all_tasks(loop) File "C:\Users\max\AppData\Local\Programs\Python\Python37\lib\asyncio\tasks.py", line 38, in all_tasks return {t for t in _all_tasks File "C:\Users\max\AppData\Local\Programs\Python\Python37\lib\asyncio\tasks.py", line 38, in return {t for t in _all_tasks File "C:\Users\max\AppData\Local\Programs\Python\Python37\lib\_weakrefset.py", line 61, in __iter__ for itemref in self.data: RuntimeError: Set changed size during iteration https://github.com/python/cpython/commit/416c1ebd9896b394790dcb4f9f035b1a44ebe9ff#commitcomment-30887909 ---------- components: asyncio messages: 327632 nosy: asvetlov, ned.deily, yselivanov priority: release blocker severity: normal status: open title: Protect all_tasks manipulation in asyncio.all_tasks() versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 04:13:48 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Oct 2018 08:13:48 +0000 Subject: [issue34970] Protect tasks weak set manipulation in asyncio.all_tasks() In-Reply-To: <1539418304.75.0.788709270274.issue34970@psf.upfronthosting.co.za> Message-ID: <1539418428.67.0.788709270274.issue34970@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- title: Protect all_tasks manipulation in asyncio.all_tasks() -> Protect tasks weak set manipulation in asyncio.all_tasks() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 04:15:59 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Oct 2018 08:15:59 +0000 Subject: [issue34970] Protect tasks weak set manipulation in asyncio.all_tasks() In-Reply-To: <1539418304.75.0.788709270274.issue34970@psf.upfronthosting.co.za> Message-ID: <1539418559.38.0.788709270274.issue34970@psf.upfronthosting.co.za> Andrew Svetlov added the comment: The issue is hard to reproduce, the problem happens on an implicit garbage collector run during iteration over `_all_tasks` weakset. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 04:16:33 2018 From: report at bugs.python.org (cwickens) Date: Sat, 13 Oct 2018 08:16:33 +0000 Subject: [issue34919] Crash caused by certain characters in a string In-Reply-To: <1538906666.64.0.545547206417.issue34919@psf.upfronthosting.co.za> Message-ID: <1539418593.23.0.788709270274.issue34919@psf.upfronthosting.co.za> cwickens added the comment: Actually I was mistaken: it does reproduce with 3.7.0 on MacOS. I just tried it again; I guess the first time I must have copied the problematic string incorrectly (as even changing by 1 char seems to affect whether it crashes). Below is the crash report. Anyway, my next step will be to try with the 3.7.1 RC. Though I guess I need to uninstall my existing 3.7 and I wonder how this will affect my existing projects and virtualenvs. Process: Python [558] Path: /Library/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: 3.7.0 (3.7.0) Code Type: X86-64 (Native) Parent Process: bash [476] Responsible: Terminal [467] User ID: 502 Date/Time: 2018-10-13 16:59:09.845 +0900 OS Version: Mac OS X 10.11.2 (15C50) Report Version: 11 Anonymous UUID: 091D73EC-486B-5A63-9222-A9291F26FB6E Time Awake Since Boot: 330 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: EXC_I386_GPFLT Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 org.python.python 0x00000001017f75aa pymalloc_alloc + 74 1 org.python.python 0x00000001017f5493 _PyObject_Calloc + 35 2 org.python.python 0x00000001017d1cdb PyList_New + 123 3 org.python.python 0x00000001017d4758 list_subscript + 280 4 org.python.python 0x00000001017a1068 PyObject_GetItem + 72 5 org.python.python 0x0000000101871514 _PyEval_EvalFrameDefault + 4596 6 org.python.python 0x00000001017ba1f0 function_code_fastcall + 128 7 org.python.python 0x00000001017b97e4 _PyFunction_FastCallDict + 148 8 org.python.python 0x00000001017bab4f _PyObject_FastCall_Prepend + 127 9 org.python.python 0x000000010180ea00 slot_mp_subscript + 160 10 org.python.python 0x00000001017a1068 PyObject_GetItem + 72 11 org.python.python 0x0000000101871514 _PyEval_EvalFrameDefault + 4596 12 org.python.python 0x000000010187a096 _PyEval_EvalCodeWithName + 2422 13 org.python.python 0x00000001017b9d81 _PyFunction_FastCallKeywords + 257 14 org.python.python 0x00000001018795bb call_function + 795 15 org.python.python 0x0000000101876601 _PyEval_EvalFrameDefault + 25313 16 org.python.python 0x00000001017ba1f0 function_code_fastcall + 128 17 org.python.python 0x00000001018795bb call_function + 795 18 org.python.python 0x0000000101876601 _PyEval_EvalFrameDefault + 25313 19 org.python.python 0x000000010187a096 _PyEval_EvalCodeWithName + 2422 20 org.python.python 0x00000001017b9d81 _PyFunction_FastCallKeywords + 257 21 org.python.python 0x00000001018795bb call_function + 795 22 org.python.python 0x0000000101876601 _PyEval_EvalFrameDefault + 25313 23 org.python.python 0x00000001017ba1f0 function_code_fastcall + 128 24 org.python.python 0x00000001018795bb call_function + 795 25 org.python.python 0x0000000101876601 _PyEval_EvalFrameDefault + 25313 26 org.python.python 0x000000010187a096 _PyEval_EvalCodeWithName + 2422 27 org.python.python 0x00000001017b9d81 _PyFunction_FastCallKeywords + 257 28 org.python.python 0x00000001018795bb call_function + 795 29 org.python.python 0x0000000101876560 _PyEval_EvalFrameDefault + 25152 30 org.python.python 0x000000010187a096 _PyEval_EvalCodeWithName + 2422 31 org.python.python 0x00000001017b9d81 _PyFunction_FastCallKeywords + 257 32 org.python.python 0x00000001018795bb call_function + 795 33 org.python.python 0x0000000101876560 _PyEval_EvalFrameDefault + 25152 34 org.python.python 0x00000001017ba1f0 function_code_fastcall + 128 35 org.python.python 0x00000001018795bb call_function + 795 36 org.python.python 0x0000000101876601 _PyEval_EvalFrameDefault + 25313 37 org.python.python 0x000000010187a096 _PyEval_EvalCodeWithName + 2422 38 org.python.python 0x00000001017b9d81 _PyFunction_FastCallKeywords + 257 39 org.python.python 0x00000001018795bb call_function + 795 40 org.python.python 0x0000000101876560 _PyEval_EvalFrameDefault + 25152 41 org.python.python 0x000000010187a096 _PyEval_EvalCodeWithName + 2422 42 org.python.python 0x00000001017b9d81 _PyFunction_FastCallKeywords + 257 43 org.python.python 0x00000001018795bb call_function + 795 44 org.python.python 0x0000000101876601 _PyEval_EvalFrameDefault + 25313 45 org.python.python 0x000000010187a096 _PyEval_EvalCodeWithName + 2422 46 org.python.python 0x00000001017b9d81 _PyFunction_FastCallKeywords + 257 47 org.python.python 0x00000001018795bb call_function + 795 48 org.python.python 0x0000000101876601 _PyEval_EvalFrameDefault + 25313 49 org.python.python 0x000000010187a096 _PyEval_EvalCodeWithName + 2422 50 org.python.python 0x00000001017b9d81 _PyFunction_FastCallKeywords + 257 51 org.python.python 0x00000001018795bb call_function + 795 52 org.python.python 0x0000000101876546 _PyEval_EvalFrameDefault + 25126 53 org.python.python 0x000000010187a096 _PyEval_EvalCodeWithName + 2422 54 org.python.python 0x00000001017b9d81 _PyFunction_FastCallKeywords + 257 55 org.python.python 0x00000001018795bb call_function + 795 56 org.python.python 0x0000000101876546 _PyEval_EvalFrameDefault + 25126 57 org.python.python 0x000000010187a096 _PyEval_EvalCodeWithName + 2422 58 org.python.python 0x00000001017b9d81 _PyFunction_FastCallKeywords + 257 59 org.python.python 0x00000001018795bb call_function + 795 60 org.python.python 0x0000000101876560 _PyEval_EvalFrameDefault + 25152 61 org.python.python 0x000000010187a096 _PyEval_EvalCodeWithName + 2422 62 org.python.python 0x00000001017b9d81 _PyFunction_FastCallKeywords + 257 63 org.python.python 0x00000001018795bb call_function + 795 64 org.python.python 0x00000001018766a7 _PyEval_EvalFrameDefault + 25479 65 org.python.python 0x000000010187a096 _PyEval_EvalCodeWithName + 2422 66 org.python.python 0x00000001017b9d81 _PyFunction_FastCallKeywords + 257 67 org.python.python 0x00000001018795bb call_function + 795 68 org.python.python 0x00000001018766a7 _PyEval_EvalFrameDefault + 25479 69 org.python.python 0x00000001017ba1f0 function_code_fastcall + 128 70 org.python.python 0x00000001018795bb call_function + 795 71 org.python.python 0x0000000101876546 _PyEval_EvalFrameDefault + 25126 72 org.python.python 0x000000010187a096 _PyEval_EvalCodeWithName + 2422 73 org.python.python 0x00000001017b995b _PyFunction_FastCallDict + 523 74 org.python.python 0x00000001017bac2f _PyObject_Call_Prepend + 143 75 org.python.python 0x00000001017b9ee7 PyObject_Call + 135 76 org.python.python 0x0000000101876871 _PyEval_EvalFrameDefault + 25937 77 org.python.python 0x000000010187a096 _PyEval_EvalCodeWithName + 2422 78 org.python.python 0x00000001017b995b _PyFunction_FastCallDict + 523 79 org.python.python 0x00000001017bac2f _PyObject_Call_Prepend + 143 80 org.python.python 0x00000001017b9ee7 PyObject_Call + 135 81 org.python.python 0x0000000101876871 _PyEval_EvalFrameDefault + 25937 82 org.python.python 0x00000001017ba1f0 function_code_fastcall + 128 83 org.python.python 0x00000001018795bb call_function + 795 84 org.python.python 0x0000000101876546 _PyEval_EvalFrameDefault + 25126 85 org.python.python 0x000000010187a096 _PyEval_EvalCodeWithName + 2422 86 org.python.python 0x00000001017b9d81 _PyFunction_FastCallKeywords + 257 87 org.python.python 0x00000001018795bb call_function + 795 88 org.python.python 0x0000000101876601 _PyEval_EvalFrameDefault + 25313 89 org.python.python 0x000000010187a096 _PyEval_EvalCodeWithName + 2422 90 org.python.python 0x0000000101870244 PyEval_EvalCode + 100 91 org.python.python 0x00000001018ad041 PyRun_FileExFlags + 209 92 org.python.python 0x00000001018ac8eb PyRun_SimpleFileExFlags + 859 93 org.python.python 0x00000001018ca93c pymain_main + 8044 94 org.python.python 0x00000001018cada1 _Py_UnixMain + 129 95 libdyld.dylib 0x00007fff9b9395ad start + 1 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000103324000 rbx: 0x0000000000000000 rcx: 0x207463656a626f20 rdx: 0x000000010198c660 rdi: 0x00007fff5e465380 rsi: 0x000000010198c670 rbp: 0x00007fff5e465370 rsp: 0x00007fff5e465340 r8: 0xffffffffffffffff r9: 0x00000001019f41e0 r10: 0x00000000000000ff r11: 0x0015bba8bea50dc9 r12: 0x0000000000000000 r13: 0x0000000102030e08 r14: 0x00007fff5e465380 r15: 0x0000000000000000 rip: 0x00000001017f75aa rfl: 0x0000000000010206 cr2: 0x00000001044a1020 Logical CPU: 0 Error Code: 0x00000000 Trap Number: 13 Binary Images: 0x101796000 - 0x101796fff +org.python.python (3.7.0 - 3.7.0) <4B030EC4-815E-34B7-90E7-D0720C31E072> /Library/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python 0x101799000 - 0x10196fff7 +org.python.python (3.7.0, [c] 2001-2018 Python Software Foundation. - 3.7.0) <4C64F346-20C8-3CBF-B1BD-134CC385C83F> /Library/Frameworks/Python.framework/Versions/3.7/Python 0x101f5c000 - 0x101f5dfff +_heapq.cpython-37m-darwin.so (0) /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_heapq.cpython-37m-darwin.so 0x102022000 - 0x102025ff7 +zlib.cpython-37m-darwin.so (0) /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/zlib.cpython-37m-darwin.so 0x1020ab000 - 0x1020acff7 +_bz2.cpython-37m-darwin.so (0) <382FBB0E-773D-3087-B299-0BA7E84EE925> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_bz2.cpython-37m-darwin.so 0x1020b0000 - 0x1020e0ff7 +_lzma.cpython-37m-darwin.so (0) <9FA6A0AA-2744-3173-87D4-B1346E700996> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_lzma.cpython-37m-darwin.so 0x1020ea000 - 0x1020eaff7 +grp.cpython-37m-darwin.so (0) <7C368BF4-6AA8-3B5C-9E18-74281C3ECE9A> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/grp.cpython-37m-darwin.so 0x1020ed000 - 0x1020f1fff +_struct.cpython-37m-darwin.so (0) <2379780F-4AB4-394B-B5AB-55A517D6627E> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_struct.cpython-37m-darwin.so 0x1020fa000 - 0x1020fdff7 +binascii.cpython-37m-darwin.so (0) <088500A1-3BAE-31D2-9F50-CD4708778D6A> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/binascii.cpython-37m-darwin.so 0x10218a000 - 0x10218bff7 +_posixsubprocess.cpython-37m-darwin.so (0) <0636949E-6CED-3FF2-B9FD-272A08A1BEEA> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_posixsubprocess.cpython-37m-darwin.so 0x10218f000 - 0x102191fff +select.cpython-37m-darwin.so (0) <869F8AE3-73B4-35C4-82CA-3D954FD00F78> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/select.cpython-37m-darwin.so 0x102197000 - 0x10219bfff +math.cpython-37m-darwin.so (0) /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/math.cpython-37m-darwin.so 0x1021e2000 - 0x1021f0ff7 +_datetime.cpython-37m-darwin.so (0) <96B5C955-7E6C-3CF9-B307-8C6ADFE919AE> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_datetime.cpython-37m-darwin.so 0x1021fb000 - 0x102224fff +pyexpat.cpython-37m-darwin.so (0) /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/pyexpat.cpython-37m-darwin.so 0x1022b7000 - 0x1022b9ff7 +_hashlib.cpython-37m-darwin.so (0) <2AEB8626-9BAA-318E-B041-15914DAE6098> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_hashlib.cpython-37m-darwin.so 0x1022be000 - 0x1022ffff7 +libssl.1.1.dylib (0) <13A15B8F-4D8A-39CA-B43F-738443A66D95> /Library/Frameworks/Python.framework/Versions/3.7/lib/libssl.1.1.dylib 0x102320000 - 0x1024fc6a7 +libcrypto.1.1.dylib (0) /Library/Frameworks/Python.framework/Versions/3.7/lib/libcrypto.1.1.dylib 0x10257c000 - 0x102581ff7 +_blake2.cpython-37m-darwin.so (0) <307B827A-5804-3D9A-B975-65BE192D02EB> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_blake2.cpython-37m-darwin.so 0x102586000 - 0x102596fff +_sha3.cpython-37m-darwin.so (0) <565BB110-FFC3-36D5-A854-7D617A0A1107> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_sha3.cpython-37m-darwin.so 0x10259c000 - 0x10259cff7 +_bisect.cpython-37m-darwin.so (0) /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_bisect.cpython-37m-darwin.so 0x10259f000 - 0x1025a0ff7 +_random.cpython-37m-darwin.so (0) /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_random.cpython-37m-darwin.so 0x1025a4000 - 0x1025adff7 +_socket.cpython-37m-darwin.so (0) <2ED26552-1156-396E-93EB-E190096E567D> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_socket.cpython-37m-darwin.so 0x10267a000 - 0x10267aff7 +_opcode.cpython-37m-darwin.so (0) <11A650B3-FF7B-3DF1-81E2-A906553221C9> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_opcode.cpython-37m-darwin.so 0x102a0d000 - 0x102a12fff +_json.cpython-37m-darwin.so (0) <15DD9506-43B8-3BAF-A0DE-2A23C18746D0> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_json.cpython-37m-darwin.so 0x102a57000 - 0x102a9bff7 +_decimal.cpython-37m-darwin.so (0) <84654D81-C934-3938-B3D0-432E1D6D0E1B> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_decimal.cpython-37m-darwin.so 0x102c3c000 - 0x102c3cfff +_uuid.cpython-37m-darwin.so (0) <4283C23E-E755-3642-9450-F25DED17AE4D> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_uuid.cpython-37m-darwin.so 0x102c3f000 - 0x102d3cfff +unicodedata.cpython-37m-darwin.so (0) <24E54F7A-66F5-36C7-BD07-D8AAED82B232> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/unicodedata.cpython-37m-darwin.so 0x102f82000 - 0x102f83fff +fcntl.cpython-37m-darwin.so (0) /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/fcntl.cpython-37m-darwin.so 0x103087000 - 0x103088ff7 +termios.cpython-37m-darwin.so (0) /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/termios.cpython-37m-darwin.so 0x10314d000 - 0x10315aff7 +_ssl.cpython-37m-darwin.so (0) <882A8463-F574-30B6-A0A6-2AE0CC05785F> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_ssl.cpython-37m-darwin.so 0x1031eb000 - 0x1031feff7 +_pickle.cpython-37m-darwin.so (0) /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_pickle.cpython-37m-darwin.so 0x10320a000 - 0x10320bff7 +_queue.cpython-37m-darwin.so (0) <96B587F0-3902-3377-9E68-CAE6B521876C> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_queue.cpython-37m-darwin.so 0x10338f000 - 0x10339fff7 +_ctypes.cpython-37m-darwin.so (0) <78FCD5A2-0B47-331E-A406-2876C1289C15> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_ctypes.cpython-37m-darwin.so 0x1034f0000 - 0x1035bafff +_sqlite3.cpython-37m-darwin.so (0) <56ADC430-4CB3-3DB6-A1EE-7C38626DA630> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_sqlite3.cpython-37m-darwin.so 0x103a65000 - 0x103a65ff7 +_scproxy.cpython-37m-darwin.so (0) /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_scproxy.cpython-37m-darwin.so 0x103ce8000 - 0x103cebff7 +_csv.cpython-37m-darwin.so (0) <95274561-6355-3870-BAB8-FD52767BAC79> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_csv.cpython-37m-darwin.so 0x104271000 - 0x104276ff7 +array.cpython-37m-darwin.so (0) /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/array.cpython-37m-darwin.so 0x7fff65c82000 - 0x7fff65cb8fa7 dyld (360.18) <1A7F8274-FC32-3B86-9979-66B8F2B7B5E2> /usr/lib/dyld 0x7fff88de2000 - 0x7fff88e0bfff libsystem_info.dylib (477.20.1) <6513635B-4ADE-3B45-BF63-ED7AC565B0C9> /usr/lib/system/libsystem_info.dylib 0x7fff88e6e000 - 0x7fff88e9dffb libsystem_m.dylib (3105) <26655445-CA97-321E-B221-801CB378D1AA> /usr/lib/system/libsystem_m.dylib 0x7fff89145000 - 0x7fff89153ff7 libbz2.1.0.dylib (38) <28E54258-C0FE-38D4-AB76-1734CACCB344> /usr/lib/libbz2.1.0.dylib 0x7fff8a217000 - 0x7fff8a22efff libsystem_asl.dylib (322) <3C2D3ACD-0DD1-337A-8247-44A910D67A65> /usr/lib/system/libsystem_asl.dylib 0x7fff8bb09000 - 0x7fff8bb19fff libbsm.0.dylib (34) <7E14504C-A8B0-3574-B6EB-5D5FABC72926> /usr/lib/libbsm.0.dylib 0x7fff8ca93000 - 0x7fff8ca9aff7 libcompiler_rt.dylib (62) /usr/lib/system/libcompiler_rt.dylib 0x7fff8cc8f000 - 0x7fff8cd06fe7 libcorecrypto.dylib (335.20.1) /usr/lib/system/libcorecrypto.dylib 0x7fff8ce1e000 - 0x7fff8ce26fff libcopyfile.dylib (127) /usr/lib/system/libcopyfile.dylib 0x7fff8d3c3000 - 0x7fff8d3ecfff libxpc.dylib (756.20.4) <61AB4610-9304-354C-9E9B-D57198AE9866> /usr/lib/system/libxpc.dylib 0x7fff8d3ed000 - 0x7fff8d47afff libsystem_c.dylib (1082.20.4) /usr/lib/system/libsystem_c.dylib 0x7fff8d4ef000 - 0x7fff8d518fff libc++abi.dylib (125) /usr/lib/libc++abi.dylib 0x7fff8d51c000 - 0x7fff8d51cff7 libunc.dylib (29) <1D0F8265-F026-3CBD-93D3-F8DF14FFCE68> /usr/lib/system/libunc.dylib 0x7fff8d79a000 - 0x7fff8d79bfff libDiagnosticMessagesClient.dylib (100) <4243B6B4-21E9-355B-9C5A-95A216233B96> /usr/lib/libDiagnosticMessagesClient.dylib 0x7fff8d92b000 - 0x7fff8d97eff7 libc++.1.dylib (120.1) <8FC3D139-8055-3498-9AC5-6467CB7F4D14> /usr/lib/libc++.1.dylib 0x7fff8dab1000 - 0x7fff8dab3ff7 libsystem_configuration.dylib (802.20.7) <5FD79070-36CC-3D02-BEA7-BB5D2AE97D5D> /usr/lib/system/libsystem_configuration.dylib 0x7fff8dd43000 - 0x7fff8dd4bffb libsystem_dnssd.dylib (625.20.4) <945B5FB1-DA91-3D45-A961-A8FAD53C1E7E> /usr/lib/system/libsystem_dnssd.dylib 0x7fff8de81000 - 0x7fff8de9ffff libsystem_kernel.dylib (3248.20.55) <0E688457-4915-36DD-8798-5C2EDEE3F1A3> /usr/lib/system/libsystem_kernel.dylib 0x7fff8f970000 - 0x7fff8f971fff libsystem_secinit.dylib (20) /usr/lib/system/libsystem_secinit.dylib 0x7fff90184000 - 0x7fff9018dff7 libsystem_pthread.dylib (138.10.4) <327CECD0-B881-3153-8FCC-4FD4818B7F16> /usr/lib/system/libsystem_pthread.dylib 0x7fff90195000 - 0x7fff901f3fff com.apple.SystemConfiguration (1.14 - 1.14) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration 0x7fff92017000 - 0x7fff92018ffb libremovefile.dylib (41) /usr/lib/system/libremovefile.dylib 0x7fff929e3000 - 0x7fff92a44ff7 libsystem_network.dylib (583.20.10) <1C0410F3-F66E-3B0D-B8AD-0D49AB15A529> /usr/lib/system/libsystem_network.dylib 0x7fff946e5000 - 0x7fff946e8ff7 libsystem_sandbox.dylib (460.20.9) <1C891336-1B25-365D-B43E-96D5B3BE66B0> /usr/lib/system/libsystem_sandbox.dylib 0x7fff94d90000 - 0x7fff94d92ff7 libquarantine.dylib (80) <163CF63A-7455-3D1F-AE57-8C4475A9204C> /usr/lib/system/libquarantine.dylib 0x7fff95e01000 - 0x7fff95e03fff libsystem_coreservices.dylib (19.2) <1B3F5AFC-FFCD-3ECB-8B9A-5538366FB20D> /usr/lib/system/libsystem_coreservices.dylib 0x7fff962ef000 - 0x7fff964fcffb libicucore.A.dylib (551.41) /usr/lib/libicucore.A.dylib 0x7fff9839d000 - 0x7fff986fff3f libobjc.A.dylib (680) <9F45830D-F1D5-3CDF-9461-1A5477ED7D1E> /usr/lib/libobjc.A.dylib 0x7fff98f48000 - 0x7fff98f49fff libsystem_blocks.dylib (65) <49D42329-7DE9-3413-92C3-A473A7E9CF35> /usr/lib/system/libsystem_blocks.dylib 0x7fff99239000 - 0x7fff9923eff3 libunwind.dylib (35.3) <124E0F05-2350-3774-A32C-7F5BF38EDE73> /usr/lib/system/libunwind.dylib 0x7fff9942b000 - 0x7fff99471ff7 libauto.dylib (186) <999E610F-41FC-32A3-ADCA-5EC049B65DFB> /usr/lib/libauto.dylib 0x7fff9a4c0000 - 0x7fff9a4c1ffb libSystem.B.dylib (1226.10.1) <54388DF0-3813-33E4-BE8D-7743A81ACF4D> /usr/lib/libSystem.B.dylib 0x7fff9b737000 - 0x7fff9b73ffff libsystem_networkextension.dylib (385.20.6) /usr/lib/system/libsystem_networkextension.dylib 0x7fff9b79c000 - 0x7fff9b7b2ff7 libsystem_coretls.dylib (83.20.8) <30AF7134-6CA7-3582-B9D3-507D6ED19A88> /usr/lib/system/libsystem_coretls.dylib 0x7fff9b8f7000 - 0x7fff9b900ff3 libsystem_notify.dylib (150.20.3) <243FADE1-255A-3B78-8033-F336CD64B817> /usr/lib/system/libsystem_notify.dylib 0x7fff9b936000 - 0x7fff9b939ffb libdyld.dylib (360.18) <5F3777A7-F07E-3D5F-BFA3-A920FF4170ED> /usr/lib/system/libdyld.dylib 0x7fff9b93a000 - 0x7fff9b93fff7 libmacho.dylib (875.1) /usr/lib/system/libmacho.dylib 0x7fff9bc42000 - 0x7fff9bc5eff7 libsystem_malloc.dylib (67) <9EECAB18-F025-34C4-8E32-7EFFA6720EFC> /usr/lib/system/libsystem_malloc.dylib 0x7fff9c0a7000 - 0x7fff9c0b2ff7 libcommonCrypto.dylib (60075.20.1) <766BC3F5-41F3-3315-BABC-72718A98EA92> /usr/lib/system/libcommonCrypto.dylib 0x7fff9c3ac000 - 0x7fff9c3acff7 libkeymgr.dylib (28) <09397E01-6066-3179-A50C-2CE666FDA929> /usr/lib/system/libkeymgr.dylib 0x7fff9cb03000 - 0x7fff9cf79fff com.apple.CoreFoundation (6.9 - 1256.14) <068D1BA9-3859-34C7-986A-97EDF739C5C8> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x7fff9d248000 - 0x7fff9d250fe7 libsystem_platform.dylib (74.10.3) /usr/lib/system/libsystem_platform.dylib 0x7fff9d5e5000 - 0x7fff9d5f6ff7 libz.1.dylib (61.20.1) /usr/lib/libz.1.dylib 0x7fff9d916000 - 0x7fff9d91afff libcache.dylib (75) <6B245C0A-F3EA-383B-A542-5B0D0456A41B> /usr/lib/system/libcache.dylib 0x7fff9f41d000 - 0x7fff9f42eff7 libsystem_trace.dylib (201.10.3) /usr/lib/system/libsystem_trace.dylib 0x7fff9f4b1000 - 0x7fff9f4defff libdispatch.dylib (501.20.1) <324C9189-2AF3-3356-847F-6F4CE1C6E901> /usr/lib/system/libdispatch.dylib 0x7fff9f4df000 - 0x7fff9f4dfff7 liblaunch.dylib (756.20.4) /usr/lib/system/liblaunch.dylib External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 405 thread_create: 0 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=114.4M resident=0K(0%) swapped_out_or_unallocated=114.4M(100%) Writable regions: Total=91.6M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=91.6M(100%) VIRTUAL REGION REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Activity Tracing 2048K 2 Kernel Alloc Once 4K 2 MALLOC 72.8M 34 MALLOC guard page 16K 4 MALLOC_LARGE (reserved) 384K 3 reserved VM address space (unallocated) STACK GUARD 4K 2 Stack 16.0M 2 VM_ALLOCATE 8K 3 __DATA 4004K 89 __LINKEDIT 92.9M 40 __TEXT 21.5M 85 __UNICODE 552K 2 shared memory 12K 4 =========== ======= ======= TOTAL 210.1M 259 TOTAL, minus reserved VM space 209.8M 259 Model: Macmini7,1, BootROM MM71.0220.B06, 2 processors, Intel Core i5, 1.4 GHz, 4 GB, SMC 2.24f32 Graphics: Intel HD Graphics 5000, Intel HD Graphics 5000, Built-In Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1600 MHz, 0x80CE, 0x4B3445384533303445452D45474345000000 Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1600 MHz, 0x80CE, 0x4B3445384533303445452D45474345000000 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x13B), Broadcom BCM43xx 1.0 (7.21.94.136.1a1) Bluetooth: Version 4.4.3f4 16616, 3 services, 27 devices, 1 incoming serial ports Network Service: Wi-Fi, AirPort, en1 Serial ATA Device: APPLE HDD HTS545050A7E362, 500.11 GB USB Device: USB 3.0 Bus USB Device: USB Receiver USB Device: IR Receiver USB Device: BRCM20702 Hub USB Device: Bluetooth USB Host Controller USB Device: Kinesis Keyboard Hub USB Device: Composite Device Thunderbolt Bus: Mac mini, Apple Inc., 26.1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 04:16:54 2018 From: report at bugs.python.org (cwickens) Date: Sat, 13 Oct 2018 08:16:54 +0000 Subject: [issue34919] Crash caused by certain characters in a string In-Reply-To: <1538906666.64.0.545547206417.issue34919@psf.upfronthosting.co.za> Message-ID: <1539418614.29.0.788709270274.issue34919@psf.upfronthosting.co.za> Change by cwickens : ---------- components: -Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 04:22:49 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Oct 2018 08:22:49 +0000 Subject: [issue34970] Protect tasks weak set manipulation in asyncio.all_tasks() In-Reply-To: <1539418304.75.0.788709270274.issue34970@psf.upfronthosting.co.za> Message-ID: <1539418969.93.0.788709270274.issue34970@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +9211 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 04:29:11 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Oct 2018 08:29:11 +0000 Subject: [issue34970] Protect tasks weak set manipulation in asyncio.all_tasks() In-Reply-To: <1539418304.75.0.788709270274.issue34970@psf.upfronthosting.co.za> Message-ID: <1539419351.31.0.788709270274.issue34970@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Ned, would be nice to have this trivial bugfix in 3.7.1. The problem happens if wakes up on weakset iteration. The chance is very low, it leads to a flaky scary bug. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 04:35:21 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Oct 2018 08:35:21 +0000 Subject: [issue34970] Protect tasks weak set manipulation in asyncio.all_tasks() In-Reply-To: <1539418304.75.0.788709270274.issue34970@psf.upfronthosting.co.za> Message-ID: <1539419721.46.0.788709270274.issue34970@psf.upfronthosting.co.za> Ned Deily added the comment: 3.7.1rc2 is about to be released so to add this would require retagging and remanufacturing release bits. If the chances of it happening are "very low", I would prefer to not further delay rc2. If you and Yury agree that the risk is low and the benefit is high, we could consider risking cherry-picking it to 3.7.1 final. Sound OK? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 04:43:25 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 13 Oct 2018 08:43:25 +0000 Subject: [issue34969] Add --fast, --best to the gzip CLI In-Reply-To: <1539409543.55.0.788709270274.issue34969@psf.upfronthosting.co.za> Message-ID: <1539420205.58.0.788709270274.issue34969@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Julien, Currently, the default compresslevel for gzip.open, GzipFile is 9, for the best method compression. Maybe we could define 6 as the tradeoff and specify 1 (for fast), 9 (for best), 6 (tradeoff). Maybe in an other issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 04:47:40 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Cardona?=) Date: Sat, 13 Oct 2018 08:47:40 +0000 Subject: [issue34971] add support for tls/ssl sessions in asyncio Message-ID: <1539420460.92.0.788709270274.issue34971@psf.upfronthosting.co.za> New submission from R?mi Cardona : cpython has had TLS session support since 3.6, using the SSLContext.wrap_* methods. Unfortunately, this support is not available when using asyncio's create_connection. While I've managed to monkeypatch asyncio.sslproto._SSLPipe from my own code (it's a filthy hack but it's short and it gets the job done) running on 3.6.6, I feel this should be properly supported out of the box. A patch is ready (tests work), a github PR will be created shortly. Notes in no particular order: - argument and attribute naming is all over the place, but I could not decide between "sslsession" (matching "sslcontext") and "ssl_session" (matching "ssl_handshake_timeout") so I just picked one - tested on jessie (with openssl 1.0.2 from jessie-backports) and on gentoo - the new asyncio tests added in the patch are adapted from test_ssl.py's test_session, with the server-side stats left out. I felt they were not useful if one assumes that the hard work is done by SSLContext.wrap_*. - I did not reuse test_asyncio.utils.run_test_server which AIUI creates a new server-side context for each incoming connection, thus breaking sessions completely TIA for considering this bug and patch ---------- components: asyncio messages: 327638 nosy: RemiCardona, asvetlov, yselivanov priority: normal severity: normal status: open title: add support for tls/ssl sessions in asyncio type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 04:55:55 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 13 Oct 2018 08:55:55 +0000 Subject: [issue34919] Crash caused by certain characters in a string In-Reply-To: <1538906666.64.0.545547206417.issue34919@psf.upfronthosting.co.za> Message-ID: <1539420955.08.0.788709270274.issue34919@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks @cwickens for the confirmation. It's still weird that I used one of the problematic strings in the repo and it didn't crash with 3.7.0 on my Ubuntu machine. I tried testing with Mac OS again since you mentioned it was reproducible now. I cloned the repo and even with the normal repo it crashes with 3.7.0 on Mac. I installed 3.7.1 RC1 and it fixes the issue. Please find my testing as below with the default clone from git : Python 3.7.0 for Mac OS installed from python.org segfaults : ? py37bug git:(master) python3.7 -m ../venv py37-venv ? py37bug git:(master) source ../venv py37-venv/bin/activate (py37-venv) ? py37bug git:(master) python3.7 Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> ^D (py37-venv) ? py37bug git:(master) pip install otree (py37-venv) ? py37bug git:(master) otree resetdb --noinput [1] 2590 segmentation fault otree resetdb --noinput Python 3.7.1 RC 1 for Mac OS installed from python.org works fine : ? py37bug git:(master) python3.7 -m ../venv py37-rc-1-venv ? py37bug git:(master) source ../venv py37-rc-1-venv/bin/activate (py37-rc-1-venv) ? py37bug git:(master) python3.7 Python 3.7.1rc1 (v3.7.1rc1:2064bcf6ce, Sep 26 2018, 03:09:51) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> ^D (py37-rc-1-venv) ? py37bug git:(master) pip install otree (py37-rc-1-venv) ? py37bug git:(master) otree resetdb --noinput INFO Database engine: SQLite INFO Retrieving Existing Tables... INFO Dropping Tables... INFO Creating Database 'default'... Operations to perform: Synchronize unmigrated apps: auth, channels, contenttypes, demoapp, djhuey, forms, idmap, messages, otree, sessions, staticfiles Apply all migrations: (none) Synchronizing apps without migrations: Creating tables... Creating table otree_pagecompletion Creating table otree_pagetimeout Creating table otree_completedgroupwaitpage Creating table otree_completedsubsessionwaitpage Creating table otree_participanttoplayerlookup Creating table otree_participantlockmodel Creating table otree_undefinedformmodel Creating table otree_roomtosession Creating table otree_failedsessioncreation Creating table otree_participantroomvisit Creating table otree_browserbotslaunchersessioncode Creating table otree_chatmessage Creating table otree_session Creating table otree_participant Creating table auth_permission Creating table auth_group Creating table auth_user Creating table django_content_type Creating table django_session Creating table demoapp_subsession Creating table demoapp_group Creating table demoapp_player Running deferred SQL... Running migrations: No migrations to apply. INFO Created new tables and columns. For some odd reason even with Python 3.7.0 installed the segfault still shows 3.7.1RC1 in my Mac OS report. I had RC1 installed first and then did an install of 3.7.0 for testing this so I don't know why it's not updated to 3.7.0 in the segfault but my tests show with 3.7.1RC1 it works fine. If you can try with 3.7.1 RC1 as you are available then it will be a helpful confirmation. Attaching the core dump similar to yours for reference. Hope it helps. Thanks ---------- Added file: https://bugs.python.org/file47865/Python_2018-10-13-141913_Karthikeyans-MacBook-Air.crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 04:56:54 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Oct 2018 08:56:54 +0000 Subject: [issue34968] loop.call_soon_threadsafe should be documented to be re-entrant-safe too In-Reply-To: <1539397202.71.0.788709270274.issue34968@psf.upfronthosting.co.za> Message-ID: <1539421014.49.0.788709270274.issue34968@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Agree. Docs update sounds good. Nathaniel, would you create a docs patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 05:01:44 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Oct 2018 09:01:44 +0000 Subject: [issue34971] add support for tls/ssl sessions in asyncio In-Reply-To: <1539420460.92.0.788709270274.issue34971@psf.upfronthosting.co.za> Message-ID: <1539421304.3.0.788709270274.issue34971@psf.upfronthosting.co.za> Andrew Svetlov added the comment: TLS session support is awesome. IFAIK ssl_proto.py is under heavy reconstruction now. Please coordinate your work with Yuri. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 05:03:22 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Oct 2018 09:03:22 +0000 Subject: [issue34970] Protect tasks weak set manipulation in asyncio.all_tasks() In-Reply-To: <1539418304.75.0.788709270274.issue34970@psf.upfronthosting.co.za> Message-ID: <1539421402.26.0.788709270274.issue34970@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Let's wait for Yuri opinion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 05:25:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Oct 2018 09:25:13 +0000 Subject: [issue22851] 2.7 core crashes with generator.gi_frame.f_restricted In-Reply-To: <1415787631.95.0.914662505329.issue22851@psf.upfronthosting.co.za> Message-ID: <1539422713.89.0.788709270274.issue22851@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 68ddb59417ee0b0dedf5c8b66a304138c9ce0a63 by Serhiy Storchaka (Zackery Spytz) in branch '2.7': [2.7] bpo-22851: Fix a segfault when accessing generator.gi_frame.f_restricted. (GH-9348) https://github.com/python/cpython/commit/68ddb59417ee0b0dedf5c8b66a304138c9ce0a63 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 05:26:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Oct 2018 09:26:14 +0000 Subject: [issue22872] multiprocessing.Queue raises AssertionError In-Reply-To: <1415986488.54.0.734820295311.issue22872@psf.upfronthosting.co.za> Message-ID: <1539422774.19.0.788709270274.issue22872@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 0461704060474cb358d3495322950c4fd00616a0 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-22872: multiprocessing.Queue's put() and get() now raise ValueError if the queue is closed. (GH-9010) https://github.com/python/cpython/commit/0461704060474cb358d3495322950c4fd00616a0 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 05:27:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Oct 2018 09:27:35 +0000 Subject: [issue16965] 2to3 should rewrite execfile() to open in 'rb' mode In-Reply-To: <1358187846.57.0.700535378161.issue16965@psf.upfronthosting.co.za> Message-ID: <1539422855.02.0.788709270274.issue16965@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d4d60134b29290049e28df54f23493de4f1824b6 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-16965: 2to3 now rewrites execfile() to open with 'rb'. (GH-8569) https://github.com/python/cpython/commit/d4d60134b29290049e28df54f23493de4f1824b6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 05:27:43 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Oct 2018 09:27:43 +0000 Subject: [issue16965] 2to3 should rewrite execfile() to open in 'rb' mode In-Reply-To: <1358187846.57.0.700535378161.issue16965@psf.upfronthosting.co.za> Message-ID: <1539422863.92.0.788709270274.issue16965@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9212 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 05:27:50 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Oct 2018 09:27:50 +0000 Subject: [issue16965] 2to3 should rewrite execfile() to open in 'rb' mode In-Reply-To: <1358187846.57.0.700535378161.issue16965@psf.upfronthosting.co.za> Message-ID: <1539422870.94.0.788709270274.issue16965@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9213 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 05:28:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Oct 2018 09:28:43 +0000 Subject: [issue22851] 2.7 core crashes with generator.gi_frame.f_restricted In-Reply-To: <1415787631.95.0.914662505329.issue22851@psf.upfronthosting.co.za> Message-ID: <1539422923.76.0.788709270274.issue22851@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 Oct 13 05:48:22 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Oct 2018 09:48:22 +0000 Subject: [issue16965] 2to3 should rewrite execfile() to open in 'rb' mode In-Reply-To: <1358187846.57.0.700535378161.issue16965@psf.upfronthosting.co.za> Message-ID: <1539424102.88.0.788709270274.issue16965@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 22381394ad1541db0b652eed802601f62510d22f by Miss Islington (bot) in branch '3.7': bpo-16965: 2to3 now rewrites execfile() to open with 'rb'. (GH-8569) https://github.com/python/cpython/commit/22381394ad1541db0b652eed802601f62510d22f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 05:50:43 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Cardona?=) Date: Sat, 13 Oct 2018 09:50:43 +0000 Subject: [issue34971] add support for tls/ssl sessions in asyncio In-Reply-To: <1539420460.92.0.788709270274.issue34971@psf.upfronthosting.co.za> Message-ID: <1539424243.74.0.788709270274.issue34971@psf.upfronthosting.co.za> Change by R?mi Cardona : ---------- keywords: +patch pull_requests: +9214 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 05:51:39 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Oct 2018 09:51:39 +0000 Subject: [issue16965] 2to3 should rewrite execfile() to open in 'rb' mode In-Reply-To: <1358187846.57.0.700535378161.issue16965@psf.upfronthosting.co.za> Message-ID: <1539424299.04.0.788709270274.issue16965@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 950fa40eee483f7507cd825b574a018b957dd253 by Miss Islington (bot) in branch '3.6': bpo-16965: 2to3 now rewrites execfile() to open with 'rb'. (GH-8569) https://github.com/python/cpython/commit/950fa40eee483f7507cd825b574a018b957dd253 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 06:16:46 2018 From: report at bugs.python.org (My-Tien Nguyen) Date: Sat, 13 Oct 2018 10:16:46 +0000 Subject: [issue34972] json dump silently converts int keys to string Message-ID: <1539425806.36.0.788709270274.issue34972@psf.upfronthosting.co.za> Change by My-Tien Nguyen : ---------- nosy: My-Tien Nguyen priority: normal severity: normal status: open title: json dump silently converts int keys to string _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 06:21:57 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Oct 2018 10:21:57 +0000 Subject: [issue32052] Provide access to buffer of asyncio.StreamReader In-Reply-To: <1510859388.33.0.213398074469.issue32052@psf.upfronthosting.co.za> Message-ID: <1539426117.02.0.788709270274.issue32052@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Exposing internal buffer means committing on a new API contract forever. I feel a need for reacher read*() API but pretty sure that making internal buffer public is a bad idea. With BufferedProtocol it could be even worse: SLAB allocators can spit a buffer into several separate chunks. `str.startswith()` supports a tuple of separators, maybe we can do the same for streaming API ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 06:24:23 2018 From: report at bugs.python.org (My-Tien Nguyen) Date: Sat, 13 Oct 2018 10:24:23 +0000 Subject: [issue34972] json dump silently converts int keys to string Message-ID: <1539426263.62.0.788709270274.issue34972@psf.upfronthosting.co.za> New submission from My-Tien Nguyen : When int keys are silently converted to string on json serialization, the user needs to remember to convert it back to int on loading. I think that a warning should be shown at least. In my case I serialize a dict to json with int keys, later load it back into a dict (resulting in a dict with string keys) and test for existence of an int key in the dict which will then return False incorrectly. I am aware that json does not support int keys, but this can be easily forgotten. ---------- components: +Library (Lib) type: -> behavior versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 07:48:46 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 13 Oct 2018 11:48:46 +0000 Subject: [issue34972] json dump silently converts int keys to string In-Reply-To: <1539426263.62.0.788709270274.issue34972@psf.upfronthosting.co.za> Message-ID: <1539431326.29.0.788709270274.issue34972@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. There was a related issue few days back issue32816. I think this is a documented behavior at https://docs.python.org/3.8/library/json.html#json.dumps . Having a warning in place might break code and I don't know if there is a safe way to introduce this as a code level warning given that this is a documented behavior in Python 2 and 3. I think this is the case with other languages too like JavaScript itself converting int to string without warning adhering to JSON standard. Correct me if I am wrong or other languages have a warning related to this > Note: Keys in key/value pairs of JSON are always of the type str. When a dictionary is converted into JSON, all the keys of the dictionary are coerced to strings. As a result of this, if a dictionary is converted into JSON and then back into a dictionary, the dictionary may not equal the original one. That is, loads(dumps(x)) != x if x has non-string keys You can try doing json.loads(data, parse_int=int) but it will try converting the values. >>> json.loads(json.dumps({1:'1'}), parse_int=int) {'1': '1'} >>> json.loads(json.dumps({1:1}), parse_int=int) {'1': 1} Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 08:11:14 2018 From: report at bugs.python.org (Martin Panter) Date: Sat, 13 Oct 2018 12:11:14 +0000 Subject: [issue30250] StringIO module truncate behavior of current position In-Reply-To: <1493803286.93.0.729183089652.issue30250@psf.upfronthosting.co.za> Message-ID: <1539432674.42.0.788709270274.issue30250@psf.upfronthosting.co.za> Change by Martin Panter : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python title: StreamIO truncate behavior of current position -> StringIO module truncate behavior of current position _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 08:44:32 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 13 Oct 2018 12:44:32 +0000 Subject: [issue34953] Implement `mmap.mmap.__repr__` In-Reply-To: <1539215332.4.0.788709270274.issue34953@psf.upfronthosting.co.za> Message-ID: <1539434672.97.0.788709270274.issue34953@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 08:47:46 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 13 Oct 2018 12:47:46 +0000 Subject: [issue34882] f(a=1, *args) should be a SyntaxError In-Reply-To: <1538553672.9.0.545547206417.issue34882@psf.upfronthosting.co.za> Message-ID: <1539434866.66.0.788709270274.issue34882@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 09:15:23 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 13 Oct 2018 13:15:23 +0000 Subject: [issue34970] Protect tasks weak set manipulation in asyncio.all_tasks() In-Reply-To: <1539418304.75.0.788709270274.issue34970@psf.upfronthosting.co.za> Message-ID: <1539436523.07.0.788709270274.issue34970@psf.upfronthosting.co.za> Yury Selivanov added the comment: >> we could consider risking cherry-picking it to 3.7.1 final. Sound OK? > Let's wait for Yuri opinion. I agree it's a pretty serious bug; basically a time bomb that can crash a perfectly fine asyncio application. The PR itself seems to be safe to cherry-pick to 3.7.1 even after rc2. I suggest to merge it asap though to have some time for buildbots to test it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 09:24:20 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 13 Oct 2018 13:24:20 +0000 Subject: [issue34968] loop.call_soon_threadsafe should be documented to be re-entrant-safe too In-Reply-To: <1539397202.71.0.788709270274.issue34968@psf.upfronthosting.co.za> Message-ID: <1539437060.31.0.788709270274.issue34968@psf.upfronthosting.co.za> Yury Selivanov added the comment: > AFAICT the stdlib's implementation of call_soon_threadsafe is already reentrant-safe What would make it not reentrant-safe? We'll need to document that for the benefit of asyncio and third-party maintainers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 09:37:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Oct 2018 13:37:47 +0000 Subject: [issue34973] Crash in bytes constructor with mutating list Message-ID: <1539437867.82.0.788709270274.issue34973@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Constructing bytes from mutating list can cause a crash. class X: def __index__(self): if len(a) < 1000: a.append(self) return 0 a = [X()] bytes(a) This is not an issue about weird integer-like objects. It is about . The size of the list can be changed in other thread while iterate it in the bytes constructor. The optimization for the case of the list argument was added in issue6688. The code was refactored several times since, but this flaw was always. ---------- assignee: serhiy.storchaka components: Interpreter Core messages: 327653 nosy: alexandre.vassalotti, serhiy.storchaka priority: normal severity: normal status: open title: Crash in bytes constructor with mutating list type: crash versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 10:56:17 2018 From: report at bugs.python.org (My-Tien Nguyen) Date: Sat, 13 Oct 2018 14:56:17 +0000 Subject: [issue34972] json dump silently converts int keys to string In-Reply-To: <1539426263.62.0.788709270274.issue34972@psf.upfronthosting.co.za> Message-ID: <1539442577.54.0.788709270274.issue34972@psf.upfronthosting.co.za> My-Tien Nguyen added the comment: I don?t think, ?other languages do that too? is a good argument here. This would apply if behaving differently would break user expectation. But here we would do nothing more than explicitly inform the user of a relevant operation. If they already expected that behaviour, they can disregard the warning. I don?t see how `parse_int`would help me here, I would need a `parse_str=int`, but then it would try to parse every string, and I don?t see the use case for that. I would suggest a warning similar to this: --- json/encoder.py +++ json/encoder.py @@ -1,6 +1,7 @@ """Implementation of JSONEncoder """ import re +import warnings try: from _json import encode_basestring_ascii as c_encode_basestring_ascii @@ -353,7 +354,9 @@ items = sorted(dct.items(), key=lambda kv: kv[0]) else: items = dct.items() + non_str_key = False for key, value in items: + non_str_key = non_str_key or not isinstance(key, str) if isinstance(key, str): pass # JavaScript is weakly typed for these, so it makes sense to @@ -403,6 +406,8 @@ else: chunks = _iterencode(value, _current_indent_level) yield from chunks + if non_str_key: + warnings.warn("Encountered non-string key(s), converted to string.", RuntimeWarning) if newline_indent is not None: _current_indent_level -= 1 yield '\n' + _indent * _current_indent_level ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 11:18:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Oct 2018 15:18:25 +0000 Subject: [issue34973] Crash in bytes constructor with mutating list In-Reply-To: <1539437867.82.0.788709270274.issue34973@psf.upfronthosting.co.za> Message-ID: <1539443905.6.0.788709270274.issue34973@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +9215 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 11:28:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Oct 2018 15:28:14 +0000 Subject: [issue34973] Crash in bytes constructor with mutating list In-Reply-To: <1539437867.82.0.788709270274.issue34973@psf.upfronthosting.co.za> Message-ID: <1539444494.53.0.788709270274.issue34973@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9216 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 11:36:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Oct 2018 15:36:50 +0000 Subject: [issue34973] Crash in bytes constructor with mutating list In-Reply-To: <1539437867.82.0.788709270274.issue34973@psf.upfronthosting.co.za> Message-ID: <1539445010.19.0.788709270274.issue34973@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have two options for solving this result. 1. Add necessary checks for the list case. This will add a bunch of code and will slow down handling all lists because of additional checks. 2. Use the optimization for lists only when there are no other references to it. If no other references, the list can not be changed. This will not add much code, and may even slightly speed up cases for tuples and lists. But the code will be more fragile. Of course there is an option of removing this optimization at all. But bytes([x]) and bytes((x,)) are common cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 12:10:48 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 13 Oct 2018 16:10:48 +0000 Subject: [issue34932] Add macOS TCP_KEEPALIVE to available socket options In-Reply-To: <1539005890.42.0.545547206417.issue34932@psf.upfronthosting.co.za> Message-ID: <1539447048.79.0.788709270274.issue34932@psf.upfronthosting.co.za> Steve Dower added the comment: Yes, looks like TCP_KEEPIDLE is only available from 1709, so it should get the same handling as the TCP_KEEPCNT. If TCP_KEEPALIVE is just a synonym, then it applies for both. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 12:13:59 2018 From: report at bugs.python.org (Bruce Merry) Date: Sat, 13 Oct 2018 16:13:59 +0000 Subject: [issue32052] Provide access to buffer of asyncio.StreamReader In-Reply-To: <1510859388.33.0.213398074469.issue32052@psf.upfronthosting.co.za> Message-ID: <1539447239.91.0.788709270274.issue32052@psf.upfronthosting.co.za> Bruce Merry added the comment: A sequence of possible terminators would cover my immediate use case and certainly be an improvement. To facilitate more general use cases without exposing implementation details, would it be practical and maintainable to have a "putback" method that prepends data to the buffer? It might not be fast in all cases (e.g. it might have to make a copy of what's still in the buffer), but possibly BufferedReader could detect the common case (putting back a suffix of what's just been read) and adjust its offsets into its internal buffer (although I'm not at all familiar with BufferedReader, so feel free to tell me I'm talking nonsense). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 12:15:45 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 13 Oct 2018 16:15:45 +0000 Subject: [issue34945] regression with ./python -m test and pdb In-Reply-To: <1539094779.54.0.545547206417.issue34945@psf.upfronthosting.co.za> Message-ID: <1539447345.13.0.788709270274.issue34945@psf.upfronthosting.co.za> Steve Dower added the comment: Thanks for spotting this! There's no "rationale" for hiding the output - what happened is I streamlined the test suite to always capture output, instead of some tests deciding whether they ought to capture it or not (and some doing incredibly weird things when capturing, and others capturing the capture). While I was testing I went immediately to `print(file=sys.__stderr__)`, since that's what I normally do, but it shouldn't be too hard to make the test suite only capture output when collecting it for the test results. I'll try and get to it in the next two weeks, depending on how my conference schedules work out. I'm also happy to review someone else's change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 12:37:16 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 13 Oct 2018 16:37:16 +0000 Subject: [issue34725] Py_GetProgramFullPath() odd behaviour in Windows In-Reply-To: <1537291607.58.0.956365154283.issue34725@psf.upfronthosting.co.za> Message-ID: <1539448636.83.0.788709270274.issue34725@psf.upfronthosting.co.za> Steve Dower added the comment: I meant why are you using an embedded application with a virtual environment? What sort of application do you have that requires users to configure a virtual environment, rather than providing its own set of libraries? The embedding scenarios I'm aware of almost always want privacy/isolation from whatever a user has installed/configured, so that they can work reliably even when users modify other parts of their own system. I'm trying to understand what scenario (other than "I am an interactive Python shell") would want to automatically pick up the configuration rather than having its own configuration files/settings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 12:39:01 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 13 Oct 2018 16:39:01 +0000 Subject: [issue34939] Possibly spurious SyntaxError: annotated name can't be global In-Reply-To: <1539050318.57.0.545547206417.issue34939@psf.upfronthosting.co.za> Message-ID: <1539448741.81.0.788709270274.issue34939@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +9217 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 13:01:40 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 13 Oct 2018 17:01:40 +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: <1539450100.48.0.788709270274.issue33234@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- pull_requests: +9218 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 14:12:43 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Oct 2018 18:12:43 +0000 Subject: [issue34970] Protect tasks weak set manipulation in asyncio.all_tasks() In-Reply-To: <1539418304.75.0.788709270274.issue34970@psf.upfronthosting.co.za> Message-ID: <1539454363.9.0.788709270274.issue34970@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 97cf0828727ac2a269c89c5aa09570a69a22c83c by Miss Islington (bot) (Andrew Svetlov) in branch 'master': bpo-34970: Protect tasks weak set manipulation in asyncio.all_tasks() (GH-9837) https://github.com/python/cpython/commit/97cf0828727ac2a269c89c5aa09570a69a22c83c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 14:12:59 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Oct 2018 18:12:59 +0000 Subject: [issue34970] Protect tasks weak set manipulation in asyncio.all_tasks() In-Reply-To: <1539418304.75.0.788709270274.issue34970@psf.upfronthosting.co.za> Message-ID: <1539454379.49.0.788709270274.issue34970@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9219 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 14:16:59 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 13 Oct 2018 18:16:59 +0000 Subject: [issue34521] Multiple tests (test_socket, test_multiprocessing_*) fail due to incorrect recvmsg(2) buffer lengths, causing failures on FreeBSD CURRENT In-Reply-To: <1535389978.32.0.56676864532.issue34521@psf.upfronthosting.co.za> Message-ID: <1539454619.61.0.788709270274.issue34521@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- pull_requests: +9220 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 14:56:36 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 13 Oct 2018 18:56:36 +0000 Subject: [issue25246] Alternative algorithm for deque_remove() In-Reply-To: <1443343421.14.0.18683145075.issue25246@psf.upfronthosting.co.za> Message-ID: <1539456996.8.0.788709270274.issue25246@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- pull_requests: +9221 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 15:18:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Oct 2018 19:18:56 +0000 Subject: [issue34974] bytes and bytearray constructors replace unexpected exceptions Message-ID: <1539458336.75.0.788709270274.issue34974@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : bytes() and bytearray() replace some unexpected exceptions (including MemoryError and KeyboardInterrupt) with TypeError. 1) Exception in __index__. class X: def __index__(self): raise MemoryError `bytes(X())` results in: Traceback (most recent call last): File "", line 1, in TypeError: cannot convert 'X' object to bytes `bytearray(X())` results in: Traceback (most recent call last): File "", line 1, in TypeError: 'X' object is not iterable This is related to issue29159. 2) Exception in __iter__. class X: def __iter__(self): raise MemoryError `bytes(X())` results in: Traceback (most recent call last): File "", line 1, in TypeError: cannot convert 'X' object to bytes `bytearray(X())` works correctly (raises a MemoryError). The proper solution is to replace just a TypeError and allow other exceptions to emerge. ---------- assignee: serhiy.storchaka components: Interpreter Core messages: 327661 nosy: belopolsky, inada.naoki, serhiy.storchaka priority: normal severity: normal status: open title: bytes and bytearray constructors replace unexpected exceptions type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 15:26:52 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Oct 2018 19:26:52 +0000 Subject: [issue34970] Protect tasks weak set manipulation in asyncio.all_tasks() In-Reply-To: <1539418304.75.0.788709270274.issue34970@psf.upfronthosting.co.za> Message-ID: <1539458812.9.0.788709270274.issue34970@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset 5dbb1b7df1d9ecaa6b5344028cd1777502cf5c73 by Andrew Svetlov (Miss Islington (bot)) in branch '3.7': bpo-34970: Protect tasks weak set manipulation in asyncio.all_tasks() (GH-9837) (GH-9849) https://github.com/python/cpython/commit/5dbb1b7df1d9ecaa6b5344028cd1777502cf5c73 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 15:28:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Oct 2018 19:28:24 +0000 Subject: [issue34974] bytes and bytearray constructors replace unexpected exceptions In-Reply-To: <1539458336.75.0.788709270274.issue34974@psf.upfronthosting.co.za> Message-ID: <1539458904.54.0.788709270274.issue34974@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +9222 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 15:28:59 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Oct 2018 19:28:59 +0000 Subject: [issue34970] Protect tasks weak set manipulation in asyncio.all_tasks() In-Reply-To: <1539418304.75.0.788709270274.issue34970@psf.upfronthosting.co.za> Message-ID: <1539458939.74.0.788709270274.issue34970@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Ned, the fix has landed on both master and 3.7 Your turn, please. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 15:29:11 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Oct 2018 19:29:11 +0000 Subject: [issue34919] Crash caused by certain characters in a string In-Reply-To: <1538906666.64.0.545547206417.issue34919@psf.upfronthosting.co.za> Message-ID: <1539458951.32.0.788709270274.issue34919@psf.upfronthosting.co.za> Terry J. Reedy added the comment: An upgrade of the same version and bitness binary by the PSF Windows and Mac installers is done, by default, in place, so your Python scripts should not notice the difference, except for the bug fixes. At least on Windows, downgrading requires uninstall, but one can choose to leave the directory and added files, including packages in site-packages, alone, so that installing the older maintenance version should again leave everything the same except for adding bugs back. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 15:47:51 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 13 Oct 2018 19:47:51 +0000 Subject: [issue26301] ceval.c: reintroduce fast-path for list[index] in BINARY_SUBSCR In-Reply-To: <1454722839.37.0.315889112887.issue26301@psf.upfronthosting.co.za> Message-ID: <1539460071.46.0.788709270274.issue26301@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- pull_requests: +9223 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 16:03:13 2018 From: report at bugs.python.org (Ian Good) Date: Sat, 13 Oct 2018 20:03:13 +0000 Subject: [issue34975] start_tls() difficult when using asyncio.start_server() Message-ID: <1539460993.6.0.788709270274.issue34975@psf.upfronthosting.co.za> New submission from Ian Good : There does not seem to be a public API for replacing the transport of the StreamReader / StreamWriter provided to the callback of a call to asyncio.start_server(). The only way I have found to use the new SSL transport is to update protected members of the StreamReaderProtocol object, e.g.: async def callback(reader, writer): loop = asyncio.get_event_loop() transport = writer.transport protocol = transport.get_protocol() new_transport = await loop.start_tls( transport, protocol, ssl_context, server_side=True) protocol._stream_reader = StreamReader(loop=loop) protocol._client_connected_cb = do_stuff_after_start_tls protocol.connection_made(new_transport) async def do_stuff_after_start_tls(ssl_reader, ssl_writer): ... ---------- components: asyncio messages: 327665 nosy: asvetlov, icgood, yselivanov priority: normal severity: normal status: open title: start_tls() difficult when using asyncio.start_server() versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 16:03:17 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Oct 2018 20:03:17 +0000 Subject: [issue34970] Protect tasks weak set manipulation in asyncio.all_tasks() In-Reply-To: <1539418304.75.0.788709270274.issue34970@psf.upfronthosting.co.za> Message-ID: <1539460997.16.0.788709270274.issue34970@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks, Andrew and Yury! Just leave the issue open as a "release blocker" for now and I will take care of it for 3.7.1 final. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 16:35:54 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Oct 2018 20:35:54 +0000 Subject: [issue34970] Protect tasks weak set manipulation in asyncio.all_tasks() In-Reply-To: <1539418304.75.0.788709270274.issue34970@psf.upfronthosting.co.za> Message-ID: <1539462954.43.0.788709270274.issue34970@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Cool! Thanks, Ned ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 16:39:49 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Oct 2018 20:39:49 +0000 Subject: [issue34927] Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1) In-Reply-To: <1538983922.23.0.545547206417.issue34927@psf.upfronthosting.co.za> Message-ID: <1539463189.8.0.788709270274.issue34927@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset f55c3ae657595d12ce78aca76c9c6b998d632424 by Ned Deily in branch '3.6': bpo-34370: Revert to using released Tk 8.6.8 with macOS installers https://github.com/python/cpython/commit/f55c3ae657595d12ce78aca76c9c6b998d632424 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 16:39:49 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Oct 2018 20:39:49 +0000 Subject: [issue34370] Tkinter scroll issues on macOS In-Reply-To: <1533895636.89.0.56676864532.issue34370@psf.upfronthosting.co.za> Message-ID: <1539463189.9.0.702299269573.issue34370@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset f55c3ae657595d12ce78aca76c9c6b998d632424 by Ned Deily in branch '3.6': bpo-34370: Revert to using released Tk 8.6.8 with macOS installers https://github.com/python/cpython/commit/f55c3ae657595d12ce78aca76c9c6b998d632424 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 16:46:38 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Oct 2018 20:46:38 +0000 Subject: [issue34927] Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1) In-Reply-To: <1538983922.23.0.545547206417.issue34927@psf.upfronthosting.co.za> Message-ID: <1539463598.72.0.788709270274.issue34927@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset d8b6425e58a1fccdf8ddbbcde63066c13c1bcfaf by Ned Deily in branch '3.7': bpo-34370: Revert to using released Tk 8.6.8 with macOS installers https://github.com/python/cpython/commit/d8b6425e58a1fccdf8ddbbcde63066c13c1bcfaf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 16:46:38 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Oct 2018 20:46:38 +0000 Subject: [issue34370] Tkinter scroll issues on macOS In-Reply-To: <1533895636.89.0.56676864532.issue34370@psf.upfronthosting.co.za> Message-ID: <1539463598.84.0.702299269573.issue34370@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset d8b6425e58a1fccdf8ddbbcde63066c13c1bcfaf by Ned Deily in branch '3.7': bpo-34370: Revert to using released Tk 8.6.8 with macOS installers https://github.com/python/cpython/commit/d8b6425e58a1fccdf8ddbbcde63066c13c1bcfaf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 17:02:19 2018 From: report at bugs.python.org (Tal Einat) Date: Sat, 13 Oct 2018 21:02:19 +0000 Subject: [issue34976] IDLE: Replace the search dialog with a search bar Message-ID: <1539464539.46.0.788709270274.issue34976@psf.upfronthosting.co.za> New submission from Tal Einat : Search dialogs are clunky and arguably outdated. Most modern editors, IDEs and browsers use a search bar instead. I created a search bar for IDLE as an extension years ago, it can be found on PyPI as "SearchBar". I hadn't updated it in recent years and it doesn't work with modern IDLE. I doubt that it has seen much use. I suggest that having this built into IDLE would be a great benefit to its users. ---------- assignee: terry.reedy components: IDLE messages: 327672 nosy: cheryl.sabella, taleinat, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Replace the search dialog with a search bar type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 17:06:01 2018 From: report at bugs.python.org (Tal Einat) Date: Sat, 13 Oct 2018 21:06:01 +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: <1539464761.57.0.788709270274.issue34976@psf.upfronthosting.co.za> Change by Tal Einat : ---------- keywords: +patch pull_requests: +9224 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 17:15:06 2018 From: report at bugs.python.org (Tal Einat) Date: Sat, 13 Oct 2018 21:15:06 +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: <1539465306.51.0.788709270274.issue34976@psf.upfronthosting.co.za> Tal Einat added the comment: See PR GH-9855 for a working implementation based on my old "SearchBar" extension. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 17:35:08 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Oct 2018 21:35:08 +0000 Subject: [issue34975] start_tls() difficult when using asyncio.start_server() In-Reply-To: <1539460993.6.0.788709270274.issue34975@psf.upfronthosting.co.za> Message-ID: <1539466508.72.0.788709270274.issue34975@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thanks for raising the problem. I'm in the middle of streams API refactoring. https://github.com/asvetlov/cpython/blob/async-streams/Lib/asyncio/streams.py#L801-L812 is a draft. A help is very appreciated. Would you pick up this snippet and make a pull request with tests and documentation update? ---------- assignee: -> asvetlov versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 17:58:54 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Oct 2018 21:58:54 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1539467933.99.0.788709270274.issue33729@psf.upfronthosting.co.za> Ned Deily added the comment: Serhiy's fixes (thanks!) are now released in 3.7.0rc2 and 3.6.7rc2 so I'm removing the "release blocker" status. If there is nothing more to be done for this issue, can we close it? ---------- priority: release blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 18:02:33 2018 From: report at bugs.python.org (Tal Einat) Date: Sat, 13 Oct 2018 22:02:33 +0000 Subject: [issue33656] IDLE: Turn on DPI awareness on Windows In-Reply-To: <1527376490.94.0.682650639539.issue33656@psf.upfronthosting.co.za> Message-ID: <1539468153.95.0.788709270274.issue33656@psf.upfronthosting.co.za> Tal Einat added the comment: Ping? Do we want to get this in for 3.7.1 and 3.6.7? ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 18:06:37 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Oct 2018 22:06:37 +0000 Subject: [issue34922] hashlib segmentation fault In-Reply-To: <1538916029.97.0.545547206417.issue34922@psf.upfronthosting.co.za> Message-ID: <1539468397.95.0.788709270274.issue34922@psf.upfronthosting.co.za> Ned Deily added the comment: Serhiy's fixes (thanks!) are now released in 3.7.0rc2 and 3.6.7rc2 so I'm removing the "release blocker" status. If there is nothing more to be done for this issue, can we close it? shuoz: > oh brother, maybe this worth open a cve. Note that Serhiy believes that this is not a security issue since it is unlikely that the crash can be triggered by user data. Anyone can cause segfaults or do damage if they have unrestricted access to a Python interpreter; that's a threat model for any language that allows sometime like Python's os.system or subprocess. A better question is can a user of an application written in Python likely cause a DOS or create a privilege escalation. Is that the case here? ---------- priority: release blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 18:38:52 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 13 Oct 2018 22:38:52 +0000 Subject: [issue34975] start_tls() difficult when using asyncio.start_server() In-Reply-To: <1539460993.6.0.788709270274.issue34975@psf.upfronthosting.co.za> Message-ID: <1539470332.57.0.788709270274.issue34975@psf.upfronthosting.co.za> Yury Selivanov added the comment: One thing: I'm -1 on adding starttls to current stream api; let's add it only to the new one (same for sendfile) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 18:43:47 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 13 Oct 2018 22:43:47 +0000 Subject: [issue34977] Release Windows Store app containing Python Message-ID: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> New submission from Steve Dower : The Windows Store can now install unrestricted apps, which means we can provide the Python interpreter in there. Advantages: * far more reliable installation * can have specific executables on PATH * automatic updates * other apps can act as extensions (with permission), so things like Mu could also become store apps in the future Disadvantages: * only --user installs for pip will work * harder to find/modify installed files I think for a (very significant) subset of our users, this will be a much better experience than downloading our current installer. It also has the advantage of making "Python" appear in searches in the start menu, which will link directly to a one-click "Install" button. The biggest issue is likely to be pip not installing with --user by default, as well as subsequent issues with apps that require users to navigate to their %AppData% directories manually (since these will be redirected to different locations). But until we get a package available for testing, it will be hard to figure out what needs fixing. Given this is just distribution and not a new platform, I plan to enable it for Python 3.7 (probably 3.7.2, but it may be possible to bundle 3.7.1 as-is for testing). ---------- assignee: steve.dower components: Windows messages: 327679 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Release Windows Store app containing Python type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 19:13:23 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 13 Oct 2018 23:13:23 +0000 Subject: [issue31522] _mboxMMDF.get_string() fails to pass param to get_bytes() In-Reply-To: <1505860469.5.0.965882587471.issue31522@psf.upfronthosting.co.za> Message-ID: <1539472403.03.0.788709270274.issue31522@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +9225 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 19:16:29 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 13 Oct 2018 23:16:29 +0000 Subject: [issue31522] _mboxMMDF.get_string() fails to pass param to get_bytes() In-Reply-To: <1505860469.5.0.965882587471.issue31522@psf.upfronthosting.co.za> Message-ID: <1539472589.62.0.788709270274.issue31522@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- versions: +Python 3.8 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 19:42:04 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Oct 2018 23:42:04 +0000 Subject: [issue33656] IDLE: Turn on DPI awareness on Windows In-Reply-To: <1527376490.94.0.682650639539.issue33656@psf.upfronthosting.co.za> Message-ID: <1539474124.51.0.788709270274.issue33656@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +9226 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 19:46:53 2018 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Oct 2018 23:46:53 +0000 Subject: [issue23554] EchoServerClientProtocol class should be called EchoServerProtocol In-Reply-To: <1425189572.41.0.939168822868.issue23554@psf.upfronthosting.co.za> Message-ID: <1539474413.2.0.788709270274.issue23554@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +9227 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 19:47:23 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Oct 2018 23:47:23 +0000 Subject: [issue33656] IDLE: Turn on DPI awareness on Windows In-Reply-To: <1527376490.94.0.682650639539.issue33656@psf.upfronthosting.co.za> Message-ID: <1539474443.37.0.788709270274.issue33656@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There is still no rush as guarding the ctypes import on Windows builds that can run IDLE may never be needed. But I grepped the stdlib .py code and uuid is the only .py module that imports ctypes, and all are directly or indirectly guarded in the code or test_uuid. So I moved the import inside the existing try block and added ImportError to those caught. ---------- stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 19:57:11 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 13 Oct 2018 23:57:11 +0000 Subject: [issue34725] Py_GetProgramFullPath() odd behaviour in Windows In-Reply-To: <1537291607.58.0.956365154283.issue34725@psf.upfronthosting.co.za> Message-ID: <1539475031.46.0.788709270274.issue34725@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: +patch pull_requests: +9229 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 19:58:40 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 13 Oct 2018 23:58:40 +0000 Subject: [issue34725] Py_GetProgramFullPath() odd behaviour in Windows In-Reply-To: <1537291607.58.0.956365154283.issue34725@psf.upfronthosting.co.za> Message-ID: <1539475120.63.0.788709270274.issue34725@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +9230 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 19:59:25 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 13 Oct 2018 23:59:25 +0000 Subject: [issue34725] Py_GetProgramFullPath() odd behaviour in Windows In-Reply-To: <1537291607.58.0.956365154283.issue34725@psf.upfronthosting.co.za> Message-ID: <1539475165.66.0.788709270274.issue34725@psf.upfronthosting.co.za> Change by Steve Dower : ---------- versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 20:00:35 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 14 Oct 2018 00:00:35 +0000 Subject: [issue33656] IDLE: Turn on DPI awareness on Windows In-Reply-To: <1527376490.94.0.682650639539.issue33656@psf.upfronthosting.co.za> Message-ID: <1539475235.12.0.788709270274.issue33656@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset d274afb5e579a5d9d990f68f9af856cf4c918779 by Terry Jan Reedy in branch 'master': bpo-33656: Move pyshell ctypes import inside try block. (GH-9858) https://github.com/python/cpython/commit/d274afb5e579a5d9d990f68f9af856cf4c918779 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 20:00:44 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Oct 2018 00:00:44 +0000 Subject: [issue33656] IDLE: Turn on DPI awareness on Windows In-Reply-To: <1527376490.94.0.682650639539.issue33656@psf.upfronthosting.co.za> Message-ID: <1539475244.8.0.788709270274.issue33656@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9231 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 20:00:52 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Oct 2018 00:00:52 +0000 Subject: [issue33656] IDLE: Turn on DPI awareness on Windows In-Reply-To: <1527376490.94.0.682650639539.issue33656@psf.upfronthosting.co.za> Message-ID: <1539475252.75.0.788709270274.issue33656@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9232 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 20:05:49 2018 From: report at bugs.python.org (Pranav Devarakonda) Date: Sun, 14 Oct 2018 00:05:49 +0000 Subject: [issue34978] check type of object in fix_dict.py in 2to3 Message-ID: <1539475549.65.0.788709270274.issue34978@psf.upfronthosting.co.za> New submission from Pranav Devarakonda : fix_dict.py applies fixes to every instance of keys(), items() or values() irrespective of the type of object. Since 2to3 cannot check the type of the object, we can at least add the check to the generated code like... d.keys() -> list(d.keys) if type(d) == dict else d.keys() and similarly d.viewkeys() -> d.keys() if type(d) == dict else d.viewkeys() PFA the tweaked fixer. ---------- components: 2to3 (2.x to 3.x conversion tool) files: fix_dict.py messages: 327682 nosy: benjamin.peterson, devarakondapranav priority: normal severity: normal status: open title: check type of object in fix_dict.py in 2to3 type: enhancement Added file: https://bugs.python.org/file47866/fix_dict.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 20:19:27 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Oct 2018 00:19:27 +0000 Subject: [issue33656] IDLE: Turn on DPI awareness on Windows In-Reply-To: <1527376490.94.0.682650639539.issue33656@psf.upfronthosting.co.za> Message-ID: <1539476367.3.0.788709270274.issue33656@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 77e0abe228564a5be23284bd8e963c11952eb55b by Miss Islington (bot) in branch '3.7': bpo-33656: Move pyshell ctypes import inside try block. (GH-9858) https://github.com/python/cpython/commit/77e0abe228564a5be23284bd8e963c11952eb55b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 20:25:05 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 14 Oct 2018 00:25:05 +0000 Subject: [issue34972] json dump silently converts int keys to string In-Reply-To: <1539426263.62.0.788709270274.issue34972@psf.upfronthosting.co.za> Message-ID: <1539476705.01.0.788709270274.issue34972@psf.upfronthosting.co.za> Eric V. Smith added the comment: I can't think of another place where we issue a warning for anything similar. I'm opposed to any changes here: it's clearly documented behavior. It's like being surprised .ini files convert to strings: it's just how that format works. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 20:28:08 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Oct 2018 00:28:08 +0000 Subject: [issue33656] IDLE: Turn on DPI awareness on Windows In-Reply-To: <1527376490.94.0.682650639539.issue33656@psf.upfronthosting.co.za> Message-ID: <1539476888.03.0.788709270274.issue33656@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 68299305c7898eb8eb0cea6cad19c299d0d1ba2d by Miss Islington (bot) in branch '3.6': bpo-33656: Move pyshell ctypes import inside try block. (GH-9858) https://github.com/python/cpython/commit/68299305c7898eb8eb0cea6cad19c299d0d1ba2d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 20:41:17 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 14 Oct 2018 00:41:17 +0000 Subject: [issue33656] IDLE: Turn on DPI awareness on Windows In-Reply-To: <1527376490.94.0.682650639539.issue33656@psf.upfronthosting.co.za> Message-ID: <1539477677.78.0.788709270274.issue33656@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 21:44:43 2018 From: report at bugs.python.org (Braden Groom) Date: Sun, 14 Oct 2018 01:44:43 +0000 Subject: [issue26441] email.charset: to_splittable and from_splittable are not there anymore! In-Reply-To: <1456440480.97.0.346838980393.issue26441@psf.upfronthosting.co.za> Message-ID: <1539481483.15.0.788709270274.issue26441@psf.upfronthosting.co.za> Change by Braden Groom : ---------- keywords: +patch pull_requests: +9234 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 22:01:39 2018 From: report at bugs.python.org (Lu jaymin) Date: Sun, 14 Oct 2018 02:01:39 +0000 Subject: =?utf-8?q?=5Bissue34979=5D_Python_throws_=E2=80=9CSyntaxError=3A_Non-UTF-?= =?utf-8?q?8_code_start_with_=5Cxe8=2E=2E=2E=E2=80=9D_when_parse_source_fi?= =?utf-8?q?le?= Message-ID: <1539482499.11.0.788709270274.issue34979@psf.upfronthosting.co.za> New submission from Lu jaymin : ``` # demo.py s = '????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????' ``` The file on above is for testing, it's encoding is utf-8, the length of `s` is 1020 bytes(3 * 340). When execute `python3 demo.py` on terminal, Python will throws the following error: ``` $ python3 -V Python 3.6.4 $ python3 demo.py File "demo.py", line 2 SyntaxError: Non-UTF-8 code starting with '\xe8' in file demo.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ``` I've found this error occurred on about line 630(the bottom of the function `decoding_fgets`) of the file `cpython/Parser/tokenizer.c` after I read Python-3.6.6's source code. When Python execute xxx.py, Python will call the function `decoding_fgets` to read one line of raw bytes from file and save the raw bytes to a buffer, the initial length of the buffer is 1024 bytes, `decoding_fgets` will use the function `valid_utf8` to check raw bytes's encoding. If the lenght of raw bytes is too long(like greater than 1023 bytes), then Python will call `decoding_fgets` multiple times and increase buffer's size by 1024 bytes every time.so raw bytes read by `decoding_fgets` is maybe incomplete, for example, raw bytes contains a part of bytes of a character, that will cause `valide_utf8` failed. I suggest that we should always use `fp_readl` to read source coe from file. ---------- components: Interpreter Core messages: 327686 nosy: Lu jaymin priority: normal severity: normal status: open title: Python throws ?SyntaxError: Non-UTF-8 code start with \xe8...? when parse source file type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 22:02:39 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Oct 2018 02:02:39 +0000 Subject: [issue34927] Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1) In-Reply-To: <1538983922.23.0.545547206417.issue34927@psf.upfronthosting.co.za> Message-ID: <1539482559.23.0.788709270274.issue34927@psf.upfronthosting.co.za> Ned Deily added the comment: It appears that the segfault behavior *was* introduced by some change in the Tk 8.6 development snapshot I chose to use for the python.org macOS installer builds in 3.7.1rc1 and 3.6.7rc2. For 3.7.1rc2 and 3.6.7rc2, I reverted back to using the standard Tk 8.6.8 release and the segfault seems to have gone away on the systems where I was able to reproduce it with rc1 - whether it segfaulted seems to be system dependent. We'll probably wait for the official release of Tk 8.6.9 before trying to upgrade Tk again. Let us know if the problem reappears. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 23:12:57 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Oct 2018 03:12:57 +0000 Subject: [issue34972] json dump silently converts int keys to string In-Reply-To: <1539426263.62.0.788709270274.issue34972@psf.upfronthosting.co.za> Message-ID: <1539486777.79.0.788709270274.issue34972@psf.upfronthosting.co.za> Steve Dower added the comment: Agreed with Eric. json.dump needs to produce valid JSON, which requires keys to be strings. Try using pickle if you need to preserve full Python semantics. ---------- nosy: +steve.dower resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 13 23:45:49 2018 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 14 Oct 2018 03:45:49 +0000 Subject: =?utf-8?q?=5Bissue34979=5D_Python_throws_=E2=80=9CSyntaxError=3A_Non-UTF-?= =?utf-8?q?8_code_start_with_=5Cxe8=2E=2E=2E=E2=80=9D_when_parse_source_fi?= =?utf-8?q?le?= In-Reply-To: <1539482499.11.0.788709270274.issue34979@psf.upfronthosting.co.za> Message-ID: <1539488749.98.0.788709270274.issue34979@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 01:06:19 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 14 Oct 2018 05:06:19 +0000 Subject: =?utf-8?q?=5Bissue34979=5D_Python_throws_=E2=80=9CSyntaxError=3A_Non-UTF-?= =?utf-8?q?8_code_start_with_=5Cxe8=2E=2E=2E=E2=80=9D_when_parse_source_fi?= =?utf-8?q?le?= In-Reply-To: <1539482499.11.0.788709270274.issue34979@psf.upfronthosting.co.za> Message-ID: <1539493579.51.0.788709270274.issue34979@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. Is this a case of encoding not being declared at the top of the file or am I missing something? ? cpython git:(master) cat ../backups/bpo34979.py s = '????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????' print("str len : ", len(s)) print("bytes len : ", len(s.encode('utf-8'))) ? cpython git:(master) ./python.exe ../backups/bpo34979.py File "../backups/bpo34979.py", line 1 SyntaxError: Non-UTF-8 code starting with '\xe8' in file ../backups/bpo34979.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details # With encoding declared ? cpython git:(master) cat ../backups/bpo34979.py # -*- coding: utf-8 -*- s = '????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????' print("str len : ", len(s)) print("bytes len : ", len(s.encode('utf-8'))) ? cpython git:(master) ./python.exe ../backups/bpo34979.py str len : 340 bytes len : 1020 # Double the original string ? cpython git:(master) cat ../backups/bpo34979.py # -*- coding: utf-8 -*- s = '????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????' print("str len : ", len(s)) print("bytes len : ", len(s.encode('utf-8'))) ? cpython git:(master) ./python.exe ../backups/bpo34979.py str len : 680 bytes len : 2040 Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 01:38:06 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 14 Oct 2018 05:38:06 +0000 Subject: [issue34978] check type of object in fix_dict.py in 2to3 In-Reply-To: <1539475549.65.0.788709270274.issue34978@psf.upfronthosting.co.za> Message-ID: <1539495486.31.0.788709270274.issue34978@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the patch but I feel adding type checks will add more complexity to the code being converted and there are a lot of cases to handle. I have some code below where running 2to3 will just wrap the keys() call to a list but with the patch the if call might be have an inner if call if I am understanding the patch correctly as you have handled the for loop case. $ cat ../backups/bpo34978.py a = {1: 1} True if 1 in a.keys() else False $ 2to3 -w ../backups/bpo34978.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ../backups/bpo34978.py --- ../backups/bpo34978.py (original) +++ ../backups/bpo34978.py (refactored) @@ -1,3 +1,3 @@ a = {1: 1} -True if 1 in a.keys() else False +True if 1 in list(a.keys()) else False RefactoringTool: Files that need to be modified: RefactoringTool: ../backups/bpo34978.py ? cpython git:(master) cat ../backups/bpo34978.py a = {1: 1} True if 1 in a.keys() else False With the patch the above might be as below which throws syntax error. True if 1 in list(a.keys()) if type(a) == dict else a.keys() else False I think this is one case which can be handled like for but there might be other places where this might return invalid results that I couldn't think of like nested if clauses in list comprehensions and so on. I think this fixer was written with the notion that .keys() and .values() is a very common method for dict and these methods are not something many people define themselves as far as I have seen from other's code since they are more attached with dict so that the fixer affects those cases. I think the gain is minimal here with cases to handle. `list(d.keys())` seems to be more Pythonic than `list(d.keys) if type(d) == dict else d.keys()` though it provides some additional type checks. # With current 2to3 keys = list(a.keys()) if 1 in list(a.keys()): True else: False # With patch this also increases line length and more to understand when looking at the code keys = list(a.keys()) if type(a) == dict else a.keys() if 1 in list(a.keys()) if type(a) == dict else a.keys(): True else: False I couldn't find any discussions at the moment to see if this was discussed earlier when 2to3 was written. This is just my suggestion and I will leave it to Benjamin and others for thoughts on this. Feel free to correct me if I am misunderstanding the patch where it was handled. Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 02:02:43 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 14 Oct 2018 06:02:43 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1539496963.11.0.788709270274.issue34977@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: +1 for reliable installation. There were some cases (issue33220, issue30944) where the installer was detected as a Virus by some vendors which would be reduced since this is installed from the App store as a verified app. I hope this will also reduce the scenarios where users need to resort to bug tracker with log files when there are installation failures [1] providing a more smooth one click install. There is a long standing open issue [2] to make `pip install --user` as a default which I hope gets resolved and there is an issue with using `pip install --user` inside a virtualenv which seems to block the earlier issue [3] Thanks a lot for this! [1] https://bugs.python.org/issue?%40columns=id%2Cactivity%2Ctitle%2Ccreator%2Cassignee%2Cstatus%2Ctype&%40sort=-activity&%40filter=status&%40action=searchid&ignore=file%3Acontent&%40search_text=windows+msi+install&submit=search&status=-1%2C1%2C2%2C3 [2] https://github.com/pypa/pip/issues/1668 [3] https://github.com/pypa/pip/issues/5702 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 02:13:14 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 14 Oct 2018 06:13:14 +0000 Subject: [issue34927] Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1) In-Reply-To: <1538983922.23.0.545547206417.issue34927@psf.upfronthosting.co.za> Message-ID: <1539497594.34.0.788709270274.issue34927@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the release Ned. I can confirm that there is no segfault with Python 3.7.1rc2 (v3.7.1rc2:6c06ef7dc3). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 03:19:46 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Sun, 14 Oct 2018 07:19:46 +0000 Subject: [issue34968] loop.call_soon_threadsafe should be documented to be re-entrant-safe too In-Reply-To: <1539397202.71.0.788709270274.issue34968@psf.upfronthosting.co.za> Message-ID: <1539501586.32.0.788709270274.issue34968@psf.upfronthosting.co.za> Nathaniel Smith added the comment: > What would make it not reentrant-safe? Probably the most obvious example of a non-reentrant-safe operation is taking a lock. It's very natural to write code like: def call_soon(...): with self._call_soon_lock: ... but now imagine that inside the body of that 'with' statement, a signal arrives, so the interpreter pauses what it's doing to invoke the signal handler, and the signal handler turns around and invokes call_soon, which tries to acquire the same lock that it already holds ? instant deadlock. And this rules out quite a few of the tools you might normally expect to use in thread-safe code, like queue.Queue, since they use locks internally. The reason I think the stdlib's call_soon is OK is that it doesn't perform any blocking operations, and the critical operation is simply 'self._ready.append(...)', which in CPython is atomic with respect to threads/signals/GC. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 03:26:26 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Sun, 14 Oct 2018 07:26:26 +0000 Subject: [issue34980] KillPython target doesn't detect 64-bit processes Message-ID: <1539501986.24.0.788709270274.issue34980@psf.upfronthosting.co.za> New submission from Jeremy Kloth : Since the KillPython target has been rewritten as an InlineTask, it can no longer detect 64-bit processes due to MSBuild being 32-bit. This leads to stuck buildbot runs: https://buildbot.python.org/all/#/builders/17/builds/348 A few solutions that I can think of: 1) Switch the InlineTask to an Exec using a PowerShell script to kill the processes. In my limited testing, PowerShell is installed by default on the supported OSes (Win7+). 2) When building for platform x64, modify find_msbuild.bat to locate the 64-bit MSBuild executable 3) On 64-bit OS, always use the 64-bit MSBuild executable 4) Only use the 64-bit MSBuild (when available) for the KillPython target (the 64-bit KillPython target can detect 32-bit processes) I am unsure of any issues that may arise from building with the 64-bit MSBuild toolchain. ---------- components: Build, Windows messages: 327694 nosy: jkloth, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: KillPython target doesn't detect 64-bit processes versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 03:32:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2018 07:32:23 +0000 Subject: [issue34941] xml.etree.ElementTree findall() fails when using custom TreeBuilder In-Reply-To: <1539077535.05.0.545547206417.issue34941@psf.upfronthosting.co.za> Message-ID: <1539502343.11.0.788709270274.issue34941@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b11c5667f99c4f0018e3394c4d07c519d835671a by Serhiy Storchaka in branch 'master': bpo-34941: Fix searching Element subclasses. (GH-9766) https://github.com/python/cpython/commit/b11c5667f99c4f0018e3394c4d07c519d835671a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 03:32:34 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Oct 2018 07:32:34 +0000 Subject: [issue34941] xml.etree.ElementTree findall() fails when using custom TreeBuilder In-Reply-To: <1539077535.05.0.545547206417.issue34941@psf.upfronthosting.co.za> Message-ID: <1539502354.86.0.788709270274.issue34941@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9235 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 03:55:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2018 07:55:28 +0000 Subject: [issue34941] xml.etree.ElementTree findall() fails when using custom TreeBuilder In-Reply-To: <1539077535.05.0.545547206417.issue34941@psf.upfronthosting.co.za> Message-ID: <1539503728.69.0.788709270274.issue34941@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9236 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 03:55:52 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Oct 2018 07:55:52 +0000 Subject: [issue34941] xml.etree.ElementTree findall() fails when using custom TreeBuilder In-Reply-To: <1539077535.05.0.545547206417.issue34941@psf.upfronthosting.co.za> Message-ID: <1539503752.65.0.788709270274.issue34941@psf.upfronthosting.co.za> miss-islington added the comment: New changeset b1c800303e8458e00428ae66351ad492a503a46f by Miss Islington (bot) in branch '3.7': bpo-34941: Fix searching Element subclasses. (GH-9766) https://github.com/python/cpython/commit/b1c800303e8458e00428ae66351ad492a503a46f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 04:22:55 2018 From: report at bugs.python.org (Lu jaymin) Date: Sun, 14 Oct 2018 08:22:55 +0000 Subject: =?utf-8?q?=5Bissue34979=5D_Python_throws_=E2=80=9CSyntaxError=3A_Non-UTF-?= =?utf-8?q?8_code_start_with_=5Cxe8=2E=2E=2E=E2=80=9D_when_parse_source_fi?= =?utf-8?q?le?= In-Reply-To: <1539493579.51.0.788709270274.issue34979@psf.upfronthosting.co.za> Message-ID: Lu jaymin added the comment: If you declare the encoding at the top of the file, then everything is fine, because in this case Python will use `io.open` to open the file and use `stream.readline` to read one line of code, please see function `fp_setreadl` in `cpython/Parser/tokenizer.c` for detail. But if you did not declare the encoding, then Python will use `Py_UniversalNewlineFgets` to read one line of raw bytes and check these raw bytes's encoding by `valid_utf8`. In my opinion, when the encoding of the file is utf-8, and because the default file encoding of Python3 is utf-8, so whether we declare encoding or did not is ok. Karthikeyan Singaravelan ?2018?10?14??? ??1:06??? > > Karthikeyan Singaravelan added the comment: > > Thanks for the report. Is this a case of encoding not being declared at > the top of the file or am I missing something? > > ? cpython git:(master) cat ../backups/bpo34979.py > s = > '????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????' > > print("str len : ", len(s)) > print("bytes len : ", len(s.encode('utf-8'))) > ? cpython git:(master) ./python.exe ../backups/bpo34979.py > File "../backups/bpo34979.py", line 1 > SyntaxError: Non-UTF-8 code starting with '\xe8' in file > ../backups/bpo34979.py on line 1, but no encoding declared; see > http://python.org/dev/peps/pep-0263/ for details > > # With encoding declared > > ? cpython git:(master) cat ../backups/bpo34979.py > # -*- coding: utf-8 -*- > > s = > '????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????' > > print("str len : ", len(s)) > print("bytes len : ", len(s.encode('utf-8'))) > ? cpython git:(master) ./python.exe ../backups/bpo34979.py > str len : 340 > bytes len : 1020 > > # Double the original string > > ? cpython git:(master) cat ../backups/bpo34979.py > # -*- coding: utf-8 -*- > > s = > '????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????' > > print("str len : ", len(s)) > print("bytes len : ", len(s.encode('utf-8'))) > ? cpython git:(master) ./python.exe ../backups/bpo34979.py > str len : 680 > bytes len : 2040 > > > Thanks > > ---------- > nosy: +xtreak > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 04:40:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2018 08:40:24 +0000 Subject: [issue34941] xml.etree.ElementTree findall() fails when using custom TreeBuilder In-Reply-To: <1539077535.05.0.545547206417.issue34941@psf.upfronthosting.co.za> Message-ID: <1539506424.85.0.788709270274.issue34941@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 7c1c42b3209f1d2546daab6cd77f953eb255df6c by Serhiy Storchaka in branch '3.6': [3.6] bpo-34941: Fix searching Element subclasses. (GH-9766) (GH-9868) https://github.com/python/cpython/commit/7c1c42b3209f1d2546daab6cd77f953eb255df6c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 04:41:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2018 08:41:19 +0000 Subject: [issue34941] xml.etree.ElementTree findall() fails when using custom TreeBuilder In-Reply-To: <1539077535.05.0.545547206417.issue34941@psf.upfronthosting.co.za> Message-ID: <1539506479.6.0.788709270274.issue34941@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 Sun Oct 14 05:10:44 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 14 Oct 2018 09:10:44 +0000 Subject: =?utf-8?q?=5Bissue34979=5D_Python_throws_=E2=80=9CSyntaxError=3A_Non-UTF-?= =?utf-8?q?8_code_start_with_=5Cxe8=2E=2E=2E=E2=80=9D_when_parse_source_fi?= =?utf-8?q?le?= In-Reply-To: <1539482499.11.0.788709270274.issue34979@psf.upfronthosting.co.za> Message-ID: <1539508244.82.0.788709270274.issue34979@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Got it. Thanks for the details and patience. I tested with less number of characters and it seems to work fine so using the encoding at the top is not a good way to test the original issue as you have mentioned. Then I searched around and found issue14811 with test. This seems to be a very similar issue and there is a patch to detect this scenario to throw SyntaxError that the line is longer than the internal buffer instead of an encoding related error. I applied the patch to master and it throws an error about the internal buffer length as expected. But the patch was not applied and it seems Victor had another solution in mind as per msg167154. I tested with the patch as below : # master ? cpython git:(master) cat ../backups/bpo34979.py s = '????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????' print("str len : ", len(s)) print("bytes len : ", len(s.encode('utf-8'))) ? cpython git:(master) ./python.exe ../backups/bpo34979.py File "../backups/bpo34979.py", line 2 SyntaxError: Non-UTF-8 code starting with '\xe8' in file ../backups/bpo34979.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details # Applying the patch file from issue14811 ? cpython git:(master) ? ./python.exe ../backups/bpo34979.py File "../backups/bpo34979.py", line 2 SyntaxError: Line 2 of file ../backups/bpo34979.py is longer than the internal buffer (1024) # Patch on master diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index fc75bae537..48b3ac0ee9 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -586,6 +586,7 @@ static char * decoding_fgets(char *s, int size, struct tok_state *tok) { char *line = NULL; + size_t len; int badchar = 0; for (;;) { if (tok->decoding_state == STATE_NORMAL) { @@ -597,6 +598,15 @@ decoding_fgets(char *s, int size, struct tok_state *tok) /* We want a 'raw' read. */ line = Py_UniversalNewlineFgets(s, size, tok->fp, NULL); + if (line != NULL) { + len = strlen(line); + if (1 < len && line[len-1] != '\n') { + PyErr_Format(PyExc_SyntaxError, + "Line %i of file %U is longer than the internal buffer (%i)", + tok->lineno + 1, tok->filename, size); + return error_ret(tok); + } + } break; } else { /* We have not yet determined the encoding. If it's the same issue then I think closing this issue and discussing there will be good since the issue has a patch with test and relevant discussion. Also it seems BUFSIZ is platform dependent so adding your platform details would also help. TIL about difference Python 2 and 3 on handling unicode related files. Thanks again! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 05:13:12 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 14 Oct 2018 09:13:12 +0000 Subject: [issue6686] xml.sax.xmlreader.XMLReader.getProperty (xml.sax.handler.property_xml_string) returns bytes In-Reply-To: <1250018393.94.0.435666063731.issue6686@psf.upfronthosting.co.za> Message-ID: <1539508392.14.0.788709270274.issue6686@psf.upfronthosting.co.za> Tal Einat added the comment: See additional research and discussion in the comments of PR GH-9715. Simply changing this to return a string rather than bytes would break backwards compatibility. I certainly agree that this should have returned a string in the first place, especially since the Unicode decoding is otherwise completely abstracted away and the encoding used is not made available. Our options: 1. Return a string starting with 3.8, document the change in What's New & fix the docs for older 3.x. 2. Continue returning bytes, update the docs for all 3.x that this returns bytes, and that there's no good way to know the proper encoding to use for decoding it. 3. As 2 above, but also expose the encoding used. Since this appears to be rarely used and option 3 requires significantly more effort than the others, I am against it. Option 2 seems the safest, but I'd like to hear more from those more experienced with XML. ---------- nosy: +Jonathan.Gossage, taleinat versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 06:23:29 2018 From: report at bugs.python.org (Mario) Date: Sun, 14 Oct 2018 10:23:29 +0000 Subject: [issue34725] Py_GetProgramFullPath() odd behaviour in Windows In-Reply-To: <1539448636.83.0.788709270274.issue34725@psf.upfronthosting.co.za> Message-ID: <97b2e83b-e59f-c9ae-bf13-c37495d2de59@gmail.com> Mario added the comment: On 13/10/2018 17:37, Steve Dower wrote: > > Steve Dower added the comment: > > I meant why are you using an embedded application with a virtual environment? What sort of application do you have that requires users to configure a virtual environment, rather than providing its own set of libraries? > > The embedding scenarios I'm aware of almost always want privacy/isolation from whatever a user has installed/configured, so that they can work reliably even when users modify other parts of their own system. I'm trying to understand what scenario (other than "I am an interactive Python shell") would want to automatically pick up the configuration rather than having its own configuration files/settings. Does it really matter who owns main(), whether it is in python.exe or in some other C app. This is exactly how you described, users want to use some C application which will call into python using some (user defined) python modules to execute some tasks which are scriptable. And they want to be able to do in a confined environment where they can install the exact set of packages they require. And it is possible at the same time to set up multiple environments where different versions are tested independently. There is as well the totally independent scenario where the app ships exactly what it needs, but there are some ways in between where one can script an app and in doing so you might need packages that the app itself knew nothing about. For another example have a look at JEP https://github.com/ninia/jep/search?q=virtual&unscoped_q=virtual This is a way to call python from Java: same problem above, people might want to run it in a virtual environment and the only way to do this now is to manually set up PYTHONHOME, but it is pretty weak and does not replicate exactly what happens with virtual environments (e.g. inherit system's site-packages). Again, in Linux, JEP works out of the box with no need to tell it about virtual environments, Py_Initialise() finds it (if they are indeed present) with absolutely no extra configuration (no need to change PYTHONPATH). Andrea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 07:12:29 2018 From: report at bugs.python.org (Lu jaymin) Date: Sun, 14 Oct 2018 11:12:29 +0000 Subject: =?utf-8?q?=5Bissue34979=5D_Python_throws_=E2=80=9CSyntaxError=3A_Non-UTF-?= =?utf-8?q?8_code_start_with_=5Cxe8=2E=2E=2E=E2=80=9D_when_parse_source_fi?= =?utf-8?q?le?= In-Reply-To: <1539508244.82.0.788709270274.issue34979@psf.upfronthosting.co.za> Message-ID: Lu jaymin added the comment: I think these two issue is the same issue, and the following is a patch write by me, hope this patch will help. ``` diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 1af27bf..ba6fb3a 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -617,32 +617,21 @@ decoding_fgets(char *s, int size, struct tok_state *tok) if (!check_coding_spec(line, strlen(line), tok, fp_setreadl)) { return error_ret(tok); } - } -#ifndef PGEN - /* The default encoding is UTF-8, so make sure we don't have any - non-UTF-8 sequences in it. */ - if (line && !tok->encoding) { - unsigned char *c; - int length; - printf("[DEBUG] - [decoding_fgets]: line = %s\n", line); - for (c = (unsigned char *)line; *c; c += length) - if (!(length = valid_utf8(c))) { - badchar = *c; - break; + if(!tok->encoding){ + char* cs = new_string("utf-8", 5, tok); + int r = fp_setreadl(tok, cs); + if (r) { + tok->encoding = cs; + tok->decoding_state = STATE_NORMAL; + } else { + PyErr_Format(PyExc_SyntaxError, + "You did not decalre the file encoding at the top of the file, " + "and we found that the file is not encoding by utf-8," + "see http://python.org/dev/peps/pep-0263/ for details."); + PyMem_FREE(cs); } + } } - if (badchar) { - /* Need to add 1 to the line number, since this line - has not been counted, yet. */ - PyErr_Format(PyExc_SyntaxError, - "Non-UTF-8 code starting with '\\x%.2x' " - "in file %U on line %i, " - "but no encoding declared; " - "see http://python.org/dev/peps/pep-0263/ for details", - badchar, tok->filename, tok->lineno + 1); - return error_ret(tok); - } -#endif return line; } ``` by the way, my platform is macOS Mojave Version 10.14 Karthikeyan Singaravelan ?2018?10?14??? ??5:10??? > > Karthikeyan Singaravelan added the comment: > > Got it. Thanks for the details and patience. I tested with less number of > characters and it seems to work fine so using the encoding at the top is > not a good way to test the original issue as you have mentioned. Then I > searched around and found issue14811 with test. This seems to be a very > similar issue and there is a patch to detect this scenario to throw > SyntaxError that the line is longer than the internal buffer instead of an > encoding related error. I applied the patch to master and it throws an > error about the internal buffer length as expected. But the patch was not > applied and it seems Victor had another solution in mind as per msg167154. > I tested with the patch as below : > > # master > > ? cpython git:(master) cat ../backups/bpo34979.py > > s = > '????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????' > > print("str len : ", len(s)) > print("bytes len : ", len(s.encode('utf-8'))) > ? cpython git:(master) ./python.exe ../backups/bpo34979.py > File "../backups/bpo34979.py", line 2 > SyntaxError: Non-UTF-8 code starting with '\xe8' in file > ../backups/bpo34979.py on line 2, but no encoding declared; see > http://python.org/dev/peps/pep-0263/ for details > > > # Applying the patch file from issue14811 > > ? cpython git:(master) ? ./python.exe ../backups/bpo34979.py > File "../backups/bpo34979.py", line 2 > SyntaxError: Line 2 of file ../backups/bpo34979.py is longer than the > internal buffer (1024) > > # Patch on master > > diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c > index fc75bae537..48b3ac0ee9 100644 > --- a/Parser/tokenizer.c > +++ b/Parser/tokenizer.c > @@ -586,6 +586,7 @@ static char * > decoding_fgets(char *s, int size, struct tok_state *tok) > { > char *line = NULL; > + size_t len; > int badchar = 0; > for (;;) { > if (tok->decoding_state == STATE_NORMAL) { > @@ -597,6 +598,15 @@ decoding_fgets(char *s, int size, struct tok_state > *tok) > /* We want a 'raw' read. */ > line = Py_UniversalNewlineFgets(s, size, > tok->fp, NULL); > + if (line != NULL) { > + len = strlen(line); > + if (1 < len && line[len-1] != '\n') { > + PyErr_Format(PyExc_SyntaxError, > + "Line %i of file %U is longer than the > internal buffer (%i)", > + tok->lineno + 1, tok->filename, size); > + return error_ret(tok); > + } > + } > break; > } else { > /* We have not yet determined the encoding. > > > If it's the same issue then I think closing this issue and discussing > there will be good since the issue has a patch with test and relevant > discussion. Also it seems BUFSIZ is platform dependent so adding your > platform details would also help. > > TIL about difference Python 2 and 3 on handling unicode related files. > Thanks again! > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 07:32:16 2018 From: report at bugs.python.org (My-Tien Nguyen) Date: Sun, 14 Oct 2018 11:32:16 +0000 Subject: [issue34972] json dump silently converts int keys to string In-Reply-To: <1539426263.62.0.788709270274.issue34972@psf.upfronthosting.co.za> Message-ID: <1539516736.62.0.788709270274.issue34972@psf.upfronthosting.co.za> My-Tien Nguyen added the comment: Sure, I can do that, but wanted to propose this regardless. I guess this is a disagreement on a language design level. As a proponent of strong typing I wouldn?t have allowed non-string keys in the first place, and if they are allowed I would warn about conversion. This is also more aligned with the ?explicit is better than implicit? principle. ---------- resolution: not a bug -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 07:32:57 2018 From: report at bugs.python.org (skycraper) Date: Sun, 14 Oct 2018 11:32:57 +0000 Subject: [issue34981] Unable to install Python from web-based installer and executable installer Message-ID: <1539516777.52.0.788709270274.issue34981@psf.upfronthosting.co.za> New submission from skycraper : I have a PC with 2 HDD with 2 Vista OS at each other. One system is old and it has Python 3.7 installed and working successfully. The second system is new-installed and it has a problems with running web-based installers and executable-installer of the latest Python`s version from there: https://www.python.org/downloads/windows/ So I can run an install from any MSI-package for every version, but 3.5-3.7 versions don`t have it. When I`m trying to install wb-inst or exe-inst nothing happens: no error window, no system lags etc. I suppose that this problem connected with Microsoft libraries or extensions. I installed all Visual Studio C++ packages, but it didn`t help. Could you tell me which components I forgot to intall. ---------- components: Installation messages: 327704 nosy: skycraper priority: normal severity: normal status: open title: Unable to install Python from web-based installer and executable installer type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 07:33:13 2018 From: report at bugs.python.org (My-Tien Nguyen) Date: Sun, 14 Oct 2018 11:33:13 +0000 Subject: [issue34972] json dump silently converts int keys to string In-Reply-To: <1539426263.62.0.788709270274.issue34972@psf.upfronthosting.co.za> Message-ID: <1539516793.96.0.788709270274.issue34972@psf.upfronthosting.co.za> Change by My-Tien Nguyen : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 07:46:08 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 14 Oct 2018 11:46:08 +0000 Subject: [issue34972] json dump silently converts int keys to string In-Reply-To: <1539426263.62.0.788709270274.issue34972@psf.upfronthosting.co.za> Message-ID: <1539517568.61.0.788709270274.issue34972@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 07:48:45 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 14 Oct 2018 11:48:45 +0000 Subject: [issue34981] Unable to install Python from web-based installer and executable installer In-Reply-To: <1539516777.52.0.788709270274.issue34981@psf.upfronthosting.co.za> Message-ID: <1539517725.37.0.788709270274.issue34981@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 09:13:24 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 14 Oct 2018 13:13:24 +0000 Subject: [issue34912] Update overflow checks in resize_buffer In-Reply-To: <1538803916.84.0.545547206417.issue34912@psf.upfronthosting.co.za> Message-ID: <1539522804.44.0.788709270274.issue34912@psf.upfronthosting.co.za> Stefan Behnel added the comment: If I understand the code right, "PY_SSIZE_T_MAX/sizeof(Py_UCS4)" would not be correct since it would unnecessarily limit the length of ASCII-only unicode strings. I think the initial check avoids the risk of integer overflow in the calculations below, so it's not entirely redundant. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 09:25:05 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 14 Oct 2018 13:25:05 +0000 Subject: =?utf-8?q?=5Bissue34979=5D_Python_throws_=E2=80=9CSyntaxError=3A_Non-UTF-?= =?utf-8?q?8_code_start_with_=5Cxe8=2E=2E=2E=E2=80=9D_when_parse_source_fi?= =?utf-8?q?le?= In-Reply-To: <1539482499.11.0.788709270274.issue34979@psf.upfronthosting.co.za> Message-ID: <1539523505.59.0.788709270274.issue34979@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the confirmation. I think the expected solution is to use a buffer that can be resized. CPython accepts GitHub PRs so if you have time then I would suggest raising a PR against the linked issue since a lot of people have subscribed there and would get a good feedback. As a suggestion when you reply from email please remove the quoted content since it makes the message very long and hard to read in the bug tracker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 09:32:52 2018 From: report at bugs.python.org (purificant) Date: Sun, 14 Oct 2018 13:32:52 +0000 Subject: [issue34982] re.sub() different behavior in 3.7 Message-ID: <1539523972.89.0.788709270274.issue34982@psf.upfronthosting.co.za> New submission from purificant : A call to re.sub() returns different results in Python 3.7 compared to versions 3.6 / 3.5 and 2.7 Example behavior in 2.7 / 3.5 and 3.6: >>> re.sub(r'(([^/]*)(/.*)?)', r'\2.zip/\1/', 'example') 'example.zip/example/' Example in 3.7.0 and 3.7.1rc2: >>> re.sub(r'(([^/]*)(/.*)?)', r'\2.zip/\1/', 'example') 'example.zip/example/.zip//' As you can see the returned string is different for the same regex. re.subn() confirms that 2 replacements are made instead of 1. Is it intended to have different behaviour in 3.7+ or is this a bug? Thanks ---------- components: Regular Expressions messages: 327707 nosy: ezio.melotti, mrabarnett, purificant priority: normal severity: normal status: open title: re.sub() different behavior in 3.7 versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 09:40:26 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 14 Oct 2018 13:40:26 +0000 Subject: [issue34982] re.sub() different behavior in 3.7 In-Reply-To: <1539523972.89.0.788709270274.issue34982@psf.upfronthosting.co.za> Message-ID: <1539524426.55.0.788709270274.issue34982@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 09:52:28 2018 From: report at bugs.python.org (Jonathan Gossage) Date: Sun, 14 Oct 2018 13:52:28 +0000 Subject: [issue6686] xml.sax.xmlreader.XMLReader.getProperty (xml.sax.handler.property_xml_string) returns bytes In-Reply-To: <1250018393.94.0.435666063731.issue6686@psf.upfronthosting.co.za> Message-ID: <1539525148.64.0.788709270274.issue6686@psf.upfronthosting.co.za> Jonathan Gossage added the comment: The other thing to consider which also supports option 2 is that xml.parsers.expat provides an interface to the Expat parser which is easier to use and more complete than the Sax parser implementation and is the implementation likely to be used by anyone needing a streaming parser. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 09:53:15 2018 From: report at bugs.python.org (Lu jaymin) Date: Sun, 14 Oct 2018 13:53:15 +0000 Subject: =?utf-8?q?=5Bissue34979=5D_Python_throws_=E2=80=9CSyntaxError=3A_Non-UTF-?= =?utf-8?q?8_code_start_with_=5Cxe8=2E=2E=2E=E2=80=9D_when_parse_source_fi?= =?utf-8?q?le?= In-Reply-To: <1539523505.59.0.788709270274.issue34979@psf.upfronthosting.co.za> Message-ID: Lu jaymin added the comment: Thanks for your suggestions. I will make a PR on github. The buffer is resizeable now, please see cpython/Parser/tokenizer.c#L1043 for details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 09:58:27 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 14 Oct 2018 13:58:27 +0000 Subject: [issue34982] re.sub() different behavior in 3.7 In-Reply-To: <1539523972.89.0.788709270274.issue34982@psf.upfronthosting.co.za> Message-ID: <1539525507.21.0.788709270274.issue34982@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. git bisect tells me this change was introduced with fbb490fd2f38bd817d99c20c05121ad0168a38ee (issue32308) # ../backups/bpo34982.py import re print(re.sub(r'(([^/]*)(/.*)?)', r'\2.zip/\1/', 'example')) # Running script at fbb490fd2f38bd817d99c20c05121ad0168a38ee ? cpython git:(fbb490fd2f) ./python.exe ../backups/bpo34982.py example.zip/example/.zip// # Script at fbb490fd2f38bd817d99c20c05121ad0168a38ee~1 ? cpython git:(fbb490fd2f) git checkout -q fbb490fd2f38bd817d99c20c05121ad0168a38ee~1 ? cpython git:(0cc99c8cd7) make > /dev/null ? cpython git:(0cc99c8cd7) ./python.exe ../backups/bpo34982.py example.zip/example/ I think is an intended change as noted in the message that might break third party code (msg308229) . Adding Serhiy for thoughts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 09:58:42 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 14 Oct 2018 13:58:42 +0000 Subject: [issue34982] re.sub() different behavior in 3.7 In-Reply-To: <1539523972.89.0.788709270274.issue34982@psf.upfronthosting.co.za> Message-ID: <1539525522.38.0.788709270274.issue34982@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 10:08:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2018 14:08:48 +0000 Subject: [issue34982] re.sub() different behavior in 3.7 In-Reply-To: <1539523972.89.0.788709270274.issue34982@psf.upfronthosting.co.za> Message-ID: <1539526128.29.0.788709270274.issue34982@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, this is an intended change. Your pattern matches an empty string at the end of the input string. It was a bug in earlier Python versions that re.sub() didn't replace empty matches adjacent to a previous non-empty match. It is not clear what is the purpose of your code, but adding anchors or replacing * with + usually helps. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 10:28:47 2018 From: report at bugs.python.org (purificant) Date: Sun, 14 Oct 2018 14:28:47 +0000 Subject: [issue34982] re.sub() different behavior in 3.7 In-Reply-To: <1539523972.89.0.788709270274.issue34982@psf.upfronthosting.co.za> Message-ID: <1539527327.24.0.788709270274.issue34982@psf.upfronthosting.co.za> purificant added the comment: Great, thank you for explaining. My specific use case can be fixed by replacing * with + as per your suggestion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 12:24:56 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 14 Oct 2018 16:24:56 +0000 Subject: [issue34983] expose symtable.Symbol.is_nonlocal() Message-ID: <1539534296.44.0.788709270274.issue34983@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : The symtable has information about if a particular symbol is nonlocal though the DEF_LOCAL flag but this information is not exposed in symtable.py, making impossible to ask if a symbol is declared as nonlocal using the python symtable module. ---------- components: Interpreter Core messages: 327713 nosy: pablogsal priority: normal severity: normal status: open title: expose symtable.Symbol.is_nonlocal() type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 12:25:12 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 14 Oct 2018 16:25:12 +0000 Subject: [issue34983] expose symtable.Symbol.is_nonlocal() In-Reply-To: <1539534296.44.0.788709270274.issue34983@psf.upfronthosting.co.za> Message-ID: <1539534312.39.0.788709270274.issue34983@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +9237 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 12:25:14 2018 From: report at bugs.python.org (Srinivas Reddy T) Date: Sun, 14 Oct 2018 16:25:14 +0000 Subject: [issue20216] Misleading docs for sha1, sha256, sha512, md5 modules In-Reply-To: <1389320490.58.0.128009418019.issue20216@psf.upfronthosting.co.za> Message-ID: <1539534314.3.0.788709270274.issue20216@psf.upfronthosting.co.za> Change by Srinivas Reddy T : ---------- pull_requests: +9238 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 12:41:15 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 14 Oct 2018 16:41:15 +0000 Subject: [issue34521] Multiple tests (test_socket, test_multiprocessing_*) fail due to incorrect recvmsg(2) buffer lengths, causing failures on FreeBSD CURRENT In-Reply-To: <1535389978.32.0.56676864532.issue34521@psf.upfronthosting.co.za> Message-ID: <1539535275.49.0.788709270274.issue34521@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset bd036d3d15fc1310ccc32a43a3296b8c157ac221 by Pablo Galindo in branch 'master': bpo-34521: Add NEWS entry for changes in GH-9613 (GH-9850) https://github.com/python/cpython/commit/bd036d3d15fc1310ccc32a43a3296b8c157ac221 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 12:53:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2018 16:53:27 +0000 Subject: [issue34984] Improve error messages in bytes and bytearray constructors Message-ID: <1539536007.23.0.788709270274.issue34984@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The proposed PR improves error messages in bytes and bytearray constructors. 1. When pass only encoding or errors to the bytes or bytearray constructor, it raises a TypeError with the message "encoding or errors without sequence argument". But the required argument is not a sequence, it is a string. "sequence argument" will be replaced with "a string argument". 2. Also "encoding or errors" will be replaced with just "encoding" or "errors", as in bytes(0, 'utf-8') and bytes(0, errors='utf-8'). 3. When pass an unsupported type to the bytearray constructor, it raises a TypeError with the message like "'float' object is not iterable". It will be replaced with "cannot convert 'float' object to bytearray" (similar to the message raised in the bytes constructor). 4. When pass an unsupported type to the bytearray's extend() method, it raises a TypeError with the message like "'float' object is not iterable". It will be replaced with "can't extend bytearray with float". ---------- assignee: serhiy.storchaka components: Interpreter Core messages: 327715 nosy: r.david.murray, serhiy.storchaka priority: normal severity: normal status: open title: Improve error messages in bytes and bytearray constructors type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 12:54:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2018 16:54:57 +0000 Subject: [issue34984] Improve error messages in bytes and bytearray constructors In-Reply-To: <1539536007.23.0.788709270274.issue34984@psf.upfronthosting.co.za> Message-ID: <1539536097.57.0.788709270274.issue34984@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +9239 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 12:56:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2018 16:56:09 +0000 Subject: [issue29159] Regression in bytes constructor In-Reply-To: <1483559394.32.0.335371111214.issue29159@psf.upfronthosting.co.za> Message-ID: <1539536169.82.0.788709270274.issue29159@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -1003 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 13:01:07 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 14 Oct 2018 17:01:07 +0000 Subject: [issue34939] Possibly spurious SyntaxError: annotated name can't be global In-Reply-To: <1539050318.57.0.545547206417.issue34939@psf.upfronthosting.co.za> Message-ID: <1539536467.17.0.788709270274.issue34939@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset de2aea0ff02fa9486365ce9d215bef150fae3a0b by Pablo Galindo in branch 'master': bpo-34939: Allow annotated global names in module namespace (GH-9844) https://github.com/python/cpython/commit/de2aea0ff02fa9486365ce9d215bef150fae3a0b ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 13:04:26 2018 From: report at bugs.python.org (Jonathan Gossage) Date: Sun, 14 Oct 2018 17:04:26 +0000 Subject: [issue9453] pulldom.SAX2DOM Doesn't support processing instructions before the root element In-Reply-To: <1280746158.2.0.563581992561.issue9453@psf.upfronthosting.co.za> Message-ID: <1539536666.35.0.788709270274.issue9453@psf.upfronthosting.co.za> Jonathan Gossage added the comment: This test case demonstrates that the issue still exists in 3.8. The fix is relatively simple but I am unsure whether it is worthwhile as the original comments on the quality and usability of SAX2DOM are spot on. My recommendation would be to mark it as pending and close it at the end of a month if no-one submits a fix. ---------- nosy: +Jonathan.Gossage, taleinat Added file: https://bugs.python.org/file47867/issue9453.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 13:07:08 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 14 Oct 2018 17:07:08 +0000 Subject: [issue34939] Possibly spurious SyntaxError: annotated name can't be global In-Reply-To: <1539050318.57.0.545547206417.issue34939@psf.upfronthosting.co.za> Message-ID: <1539536828.46.0.788709270274.issue34939@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 14:07:08 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 14 Oct 2018 18:07:08 +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: <1539540428.15.0.788709270274.issue34976@psf.upfronthosting.co.za> Cheryl Sabella added the comment: +1 on adding this to IDLE I haven't looked at the code or all the details yet, but just downloading the patch and running code in IDLE, this is a nice change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 14:49:27 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 14 Oct 2018 18:49:27 +0000 Subject: [issue17561] Add socket.create_server_sock() convenience function In-Reply-To: <1364402909.97.0.467946240817.issue17561@psf.upfronthosting.co.za> Message-ID: <1539542967.93.0.788709270274.issue17561@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Since Tulip/asyncio has gone through a lot of development since this issue was added, I wasn't sure if this has been included already or if there was still interest in it. In either case, I think it might be able to be closed, but I wanted to make sure first. Thanks! ---------- nosy: +asvetlov, cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 14:55:45 2018 From: report at bugs.python.org (Srinivas Reddy T) Date: Sun, 14 Oct 2018 18:55:45 +0000 Subject: [issue34848] range.index only takes one argument when it's documented as taking the usual 3 In-Reply-To: <1538279738.27.0.545547206417.issue34848@psf.upfronthosting.co.za> Message-ID: <1539543345.51.0.788709270274.issue34848@psf.upfronthosting.co.za> Change by Srinivas Reddy T : ---------- keywords: +patch pull_requests: +9240 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 15:20:56 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 14 Oct 2018 19:20:56 +0000 Subject: [issue9453] pulldom.SAX2DOM Doesn't support processing instructions before the root element In-Reply-To: <1280746158.2.0.563581992561.issue9453@psf.upfronthosting.co.za> Message-ID: <1539544856.15.0.788709270274.issue9453@psf.upfronthosting.co.za> Tal Einat added the comment: Proposing removal of SAX2DOM doesn't seem unreasonable to me. However, considering it hasn't been removed so far, we'll need good reason to do so since that would break backwards compatibility. Jonathan, if the solution to this is simple, I say go for it and make a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 17:03:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Oct 2018 21:03:01 +0000 Subject: [issue34974] bytes and bytearray constructors replace unexpected exceptions In-Reply-To: <1539458336.75.0.788709270274.issue34974@psf.upfronthosting.co.za> Message-ID: <1539550981.17.0.788709270274.issue34974@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset e890421e334ccf0c000c6b29c4a521d86cd12f47 by Serhiy Storchaka in branch 'master': bpo-34974: Do not replace unexpected errors in bytes() and bytearray(). (GH-9852) https://github.com/python/cpython/commit/e890421e334ccf0c000c6b29c4a521d86cd12f47 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 17:03:17 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Oct 2018 21:03:17 +0000 Subject: [issue34974] bytes and bytearray constructors replace unexpected exceptions In-Reply-To: <1539458336.75.0.788709270274.issue34974@psf.upfronthosting.co.za> Message-ID: <1539550997.52.0.788709270274.issue34974@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9241 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 17:03:24 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Oct 2018 21:03:24 +0000 Subject: [issue34974] bytes and bytearray constructors replace unexpected exceptions In-Reply-To: <1539458336.75.0.788709270274.issue34974@psf.upfronthosting.co.za> Message-ID: <1539551004.79.0.788709270274.issue34974@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9242 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 17:05:45 2018 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Oct 2018 21:05:45 +0000 Subject: [issue34848] range.index only takes one argument when it's documented as taking the usual 3 In-Reply-To: <1538279738.27.0.545547206417.issue34848@psf.upfronthosting.co.za> Message-ID: <1539551145.21.0.788709270274.issue34848@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +9243 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 17:18:03 2018 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Oct 2018 21:18:03 +0000 Subject: [issue34848] range.index only takes one argument when it's documented as taking the usual 3 In-Reply-To: <1538279738.27.0.545547206417.issue34848@psf.upfronthosting.co.za> Message-ID: <1539551883.65.0.788709270274.issue34848@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +9244 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 17:26:32 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Oct 2018 21:26:32 +0000 Subject: [issue34974] bytes and bytearray constructors replace unexpected exceptions In-Reply-To: <1539458336.75.0.788709270274.issue34974@psf.upfronthosting.co.za> Message-ID: <1539552392.14.0.788709270274.issue34974@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 1370832af24cc6f0f464354b9ec3ecdb343d35ce by Miss Islington (bot) in branch '3.7': bpo-34974: Do not replace unexpected errors in bytes() and bytearray(). (GH-9852) https://github.com/python/cpython/commit/1370832af24cc6f0f464354b9ec3ecdb343d35ce ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 17:32:07 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Oct 2018 21:32:07 +0000 Subject: [issue34974] bytes and bytearray constructors replace unexpected exceptions In-Reply-To: <1539458336.75.0.788709270274.issue34974@psf.upfronthosting.co.za> Message-ID: <1539552727.1.0.788709270274.issue34974@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 08ba7eb89d5353af31ef9e66a5337abea1b676ef by Miss Islington (bot) in branch '3.6': bpo-34974: Do not replace unexpected errors in bytes() and bytearray(). (GH-9852) https://github.com/python/cpython/commit/08ba7eb89d5353af31ef9e66a5337abea1b676ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 18:11:20 2018 From: report at bugs.python.org (Srinivas Reddy T) Date: Sun, 14 Oct 2018 22:11:20 +0000 Subject: [issue24653] Mock.assert_has_calls([]) is surprising for users In-Reply-To: <1437126004.09.0.453747784975.issue24653@psf.upfronthosting.co.za> Message-ID: <1539555080.85.0.788709270274.issue24653@psf.upfronthosting.co.za> Change by Srinivas Reddy T : ---------- keywords: +patch pull_requests: +9245 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 19:55:57 2018 From: report at bugs.python.org (Braden Groom) Date: Sun, 14 Oct 2018 23:55:57 +0000 Subject: [issue32321] functools.reduce has a redundant guard or needs a pure Python fallback In-Reply-To: <1513257994.59.0.213398074469.issue32321@psf.upfronthosting.co.za> Message-ID: <1539561357.27.0.788709270274.issue32321@psf.upfronthosting.co.za> Change by Braden Groom : ---------- pull_requests: +9246 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 21:34:15 2018 From: report at bugs.python.org (Eamonn Nugent) Date: Mon, 15 Oct 2018 01:34:15 +0000 Subject: [issue33450] unexpected EPROTOTYPE returned by sendto on MAC OSX In-Reply-To: <1525892699.63.0.682650639539.issue33450@psf.upfronthosting.co.za> Message-ID: <1539567255.37.0.788709270274.issue33450@psf.upfronthosting.co.za> Eamonn Nugent added the comment: Fwiw, this also happens in asyncio. Theoretically, I *think* you could wrap a try-except as a monkey patch. My stack trace is: Fatal write error on socket transport protocol: transport: <_SelectorSocketTransport fd=163 read=polling write=> Traceback (most recent call last): File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/selector_events.py", line 761, in write n = self._sock.send(data) OSError: [Errno 41] Protocol wrong type for socket I can try to PR the fix mentioned by @ronaldoussoren, though it might take me a bit. I'm happy to do whatever to get this fixed, though, since it's flooding my terminal with several hundred errors every time it happens... ---------- nosy: +Eamonn Nugent _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 22:43:46 2018 From: report at bugs.python.org (Kal Sze) Date: Mon, 15 Oct 2018 02:43:46 +0000 Subject: [issue34985] python finds test modules from the wrong directory during PGO build Message-ID: <1539571414.02.0.788709270274.issue34985@psf.upfronthosting.co.za> New submission from Kal Sze : OS: Ubuntu Desktop 18.04.1 x86-64 Python 3.7.0 When trying to build Python 3.7 from source, with the `--enable-shared --enable-optimizations --with-lto` configure options, python needs to run the test suite in order to generate PGO data. However, it turns out that it would find test modules from the wrong directory, if there is already another version of Python 3 installed system-wide (Ubuntu 18.04 comes with Python 3.6 pre-installed). I found out because Ubuntu's automatic crash reporter caught a core dump during `python -m tests.regrtest` and I could see that python found the tests.regrtest module at `/usr/lib/python3.6/test/regrtest.py`. In the end, the build is reported as "successful", I guess it's because the Makefile expects it the crash anyway. In any case, it still seems wrong because it means the wrong test suite is run. I have uploaded Ubuntu's crash report in raw format here, for anybody who knows how to read it (it's in plain text anyway): https://www.dropbox.com/s/6ihxoouoqe1k98f/_usr_lib_python3.6_test_regrtest.py.1000.crash?dl=0 ---------- components: Build messages: 327725 nosy: Kal Sze2 priority: normal severity: normal status: open title: python finds test modules from the wrong directory during PGO build type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 14 23:05:20 2018 From: report at bugs.python.org (Kal Sze) Date: Mon, 15 Oct 2018 03:05:20 +0000 Subject: [issue34986] python finds test modules from the wrong directory during PGO build Message-ID: <1539572718.98.0.788709270274.issue34986@psf.upfronthosting.co.za> New submission from Kal Sze : OS: Ubuntu Desktop 18.04.1 x86-64 Python 3.7.0 When trying to build Python 3.7 from source, with the `--enable-shared --enable-optimizations --with-lto` configure options, python needs to run the test suite in order to generate PGO data. However, it turns out that it would find test modules from the wrong directory, if there is already another version of Python 3 installed system-wide (Ubuntu 18.04 comes with Python 3.6 pre-installed). I found out because Ubuntu's automatic crash reporter caught a core dump during `python -m tests.regrtest` and I could see that python found the tests.regrtest module at `/usr/lib/python3.6/test/regrtest.py`. In the end, the build is reported as "successful", I guess it's because the Makefile expects it the crash anyway. In any case, it still seems wrong because it means the wrong test suite is run. Ubuntu's crash report in raw format is attached, for anybody who knows how to read it (it's in plain text anyway) ---------- components: Build files: _usr_lib_python3.6_test_regrtest.py.1000.crash messages: 327726 nosy: Kal Sze2 priority: normal severity: normal status: open title: python finds test modules from the wrong directory during PGO build type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file47868/_usr_lib_python3.6_test_regrtest.py.1000.crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 00:48:55 2018 From: report at bugs.python.org (Kal Sze) Date: Mon, 15 Oct 2018 04:48:55 +0000 Subject: [issue34986] python finds test modules from the wrong directory during PGO build In-Reply-To: <1539572718.98.0.788709270274.issue34986@psf.upfronthosting.co.za> Message-ID: <1539578935.52.0.788709270274.issue34986@psf.upfronthosting.co.za> Kal Sze added the comment: Oops, sorry for the noise. This is mostly a duplicate of #34985 because the crash log attachment was too big and caused the issue tracker's proxy server to return an error code, so I thought the initial bug report creation failed. An e-mail confirmation arrived only much later. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 00:55:14 2018 From: report at bugs.python.org (Tim Burgess) Date: Mon, 15 Oct 2018 04:55:14 +0000 Subject: [issue34572] C unpickling bypasses import thread safety In-Reply-To: <1535990001.55.0.56676864532.issue34572@psf.upfronthosting.co.za> Message-ID: <1539579314.25.0.788709270274.issue34572@psf.upfronthosting.co.za> Tim Burgess added the comment: Hi! Just wondering if there is anything I can do to move this along? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 01:12:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2018 05:12:17 +0000 Subject: [issue34974] bytes and bytearray constructors replace unexpected exceptions In-Reply-To: <1539458336.75.0.788709270274.issue34974@psf.upfronthosting.co.za> Message-ID: <1539580337.55.0.788709270274.issue34974@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9248 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 01:14:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2018 05:14:59 +0000 Subject: [issue34974] bytes and bytearray constructors replace unexpected exceptions In-Reply-To: <1539458336.75.0.788709270274.issue34974@psf.upfronthosting.co.za> Message-ID: <1539580499.71.0.788709270274.issue34974@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 01:46:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2018 05:46:22 +0000 Subject: [issue34974] bytes and bytearray constructors replace unexpected exceptions In-Reply-To: <1539458336.75.0.788709270274.issue34974@psf.upfronthosting.co.za> Message-ID: <1539582382.1.0.788709270274.issue34974@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 43308dfc3335906cfefe9f14a44e468935f3c321 by Serhiy Storchaka in branch '2.7': [2.7] bpo-34974: Do not replace unexpected errors in bytearray(). (GH-9852) (GH-9885) https://github.com/python/cpython/commit/43308dfc3335906cfefe9f14a44e468935f3c321 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 01:46:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2018 05:46:54 +0000 Subject: [issue34974] bytes and bytearray constructors replace unexpected exceptions In-Reply-To: <1539458336.75.0.788709270274.issue34974@psf.upfronthosting.co.za> Message-ID: <1539582414.52.0.788709270274.issue34974@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 Oct 15 02:21:12 2018 From: report at bugs.python.org (Kubilay Kocak) Date: Mon, 15 Oct 2018 06:21:12 +0000 Subject: [issue34957] Segementation faults on ARM and ARM64 In-Reply-To: <1539251006.2.0.788709270274.issue34957@psf.upfronthosting.co.za> Message-ID: <1539584472.6.0.788709270274.issue34957@psf.upfronthosting.co.za> Kubilay Kocak added the comment: All our FreeBSD ports (lang/python??) and the packages produced from them all contain a LIBFFI option which is enabled by default, since 2015 [1][2]: LIBFFI=on: Use libffi from ports instead of bundled version This means that any 'default' package builds of these ports, including those in the official package repositories, will install and build again st the port/package version of libffi, and not the bundled version. This was originally due to broken builds on i386 (see #22521 and issue23042), but also to due library policy (use external/upstream, not bundled libraries), and not wanting to use outdated/stale version any longer. [1] python27: https://svnweb.freebsd.org/changeset/ports/377581 [2] python34+: https://svnweb.freebsd.org/changeset/ports/378821 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 02:44:10 2018 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 15 Oct 2018 06:44:10 +0000 Subject: [issue34987] A possible null pointer dereference in _pickle.c's save_reduce() Message-ID: <1539585850.77.0.788709270274.issue34987@psf.upfronthosting.co.za> New submission from Zackery Spytz : The get_class() call in save_reduce() is not checked for failure. ---------- components: Extension Modules messages: 327732 nosy: ZackerySpytz priority: normal severity: normal status: open title: A possible null pointer dereference in _pickle.c's save_reduce() type: crash versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 02:47:00 2018 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 15 Oct 2018 06:47: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: <1539586020.91.0.788709270274.issue34987@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +9249 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 02:53:31 2018 From: report at bugs.python.org (Vincent Pelletier) Date: Mon, 15 Oct 2018 06:53:31 +0000 Subject: [issue34747] SSLSocket.context cannot be changed on non-connected sockets In-Reply-To: <1537429145.63.0.956365154283.issue34747@psf.upfronthosting.co.za> Message-ID: <1539586411.57.0.788709270274.issue34747@psf.upfronthosting.co.za> Change by Vincent Pelletier : ---------- assignee: -> christian.heimes components: +Library (Lib), SSL nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 02:59:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2018 06:59:21 +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: <1539586761.22.0.788709270274.issue34987@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is checked, and there is a comment about this. p = obj_class != cls; /* true iff a problem */ ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 02:59:21 2018 From: report at bugs.python.org (thautwarm) Date: Mon, 15 Oct 2018 06:59:21 +0000 Subject: [issue34953] Implement `mmap.mmap.__repr__` In-Reply-To: <1539215332.4.0.788709270274.issue34953@psf.upfronthosting.co.za> Message-ID: <1539586761.45.0.788709270274.issue34953@psf.upfronthosting.co.za> thautwarm added the comment: How about this: ``` # opened # closed ``` ---------- nosy: +thautwarm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 03:59:51 2018 From: report at bugs.python.org (Erich Eckner) Date: Mon, 15 Oct 2018 07:59:51 +0000 Subject: [issue34095] [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault In-Reply-To: <1531314252.99.0.56676864532.issue34095@psf.upfronthosting.co.za> Message-ID: <1539590391.44.0.788709270274.issue34095@psf.upfronthosting.co.za> Erich Eckner added the comment: Yes, I get much further in the test suite, currently (40k lines logged vs. 23k). Now, it succeeds until: 0:08:26 load avg: 0.72 [358/403/3] test_tuple test_addmul (test.test_tuple.TupleTest) ... ok test_bigrepeat (test.test_tuple.TupleTest) ... /usr/bin/xvfb-run: line 181: 231 8 Segmentation fault (core dumped) DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1 ---------- Added file: https://bugs.python.org/file47869/log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 04:34:33 2018 From: report at bugs.python.org (Michael Felt) Date: Mon, 15 Oct 2018 08:34:33 +0000 Subject: [issue34988] Rc2 candidates: "gcc" not found on AIX Message-ID: <1539592473.09.0.788709270274.issue34988@psf.upfronthosting.co.za> New submission from Michael Felt : Both rc2 packages - $ ls -l *.xz -rw-r--r-- 1 aixtools staff 17178404 Oct 13 02:41 Python-3.6.7rc2.tar.xz -rw-r--r-- 1 aixtools staff 16974832 Oct 13 02:24 Python-3.7.1rc2.tar.xz return the same error on a system using gcc as default compiler - BUT xlc is installed. $ cc ksh: cc: not found. $ xlc /opt/IBM/xlc/13.1.3/bin/.orig/xlc: 1501-294 (S) No input file specified. Please use -qhelp for more information. $ xlc_r ksh: xlc_r: not found. $ gcc gcc: fatal error: no input files compilation terminated. $ ./configure checking build system type... powerpc-ibm-aix7.2.0.0 checking host system type... powerpc-ibm-aix7.2.0.0 checking for python3.7... no checking for python3... python3 checking for --enable-universalsdk... no checking for --with-universal-archs... no checking MACHDEP... checking for --without-gcc... checking for --with-icc... no checking for gcc... xlc_r checking whether the C compiler works... no configure: error: in `/home/aixtools/Python-3.7.1rc2': configure: error: C compiler cannot create executables See `config.log' for more details Bug being - it does check for gcc - which is in the PATH yet substitutes it for xlc_r which is not in the PATH. excerpt from ksh -x ./configure: aix7 + CONFIGURE_MACOSX_DEPLOYMENT_TARGET= + EXPORT_MACOSX_DEPLOYMENT_TARGET=# + print -r -- configure:3476: checking for --without-gcc + 1>& 5 + print -rn -- checking for --without-gcc... + 1>& 6 checking for --without-gcc... + test = set + CC=xlc_r + without_gcc= + print -r -- configure:3499: result: + 1>& 5 + print -r -- + 1>& 6 + print -r -- configure:3502: checking for --with-icc ---------- components: Build messages: 327736 nosy: Michael.Felt priority: normal severity: normal status: open title: Rc2 candidates: "gcc" not found on AIX type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 04:36:48 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Oct 2018 08:36:48 +0000 Subject: [issue34747] SSLSocket.context cannot be changed on non-connected sockets In-Reply-To: <1537429145.63.0.956365154283.issue34747@psf.upfronthosting.co.za> Message-ID: <1539592608.77.0.788709270274.issue34747@psf.upfronthosting.co.za> Christian Heimes added the comment: How did you run into the issue? There is no reason to ever replace the context of a listening socket. The context setter is designed for SNI-based virtual hosting to replace the context of a bound server-side connection. You never change the listening socket. We can probably fix the issue, though. ---------- priority: normal -> low versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 04:46:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Oct 2018 08:46:31 +0000 Subject: [issue34988] Rc2 candidates: "gcc" not found on AIX In-Reply-To: <1539592473.09.0.788709270274.issue34988@psf.upfronthosting.co.za> Message-ID: <1539593191.53.0.788709270274.issue34988@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 04:47:44 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Oct 2018 08:47:44 +0000 Subject: [issue34521] Multiple tests (test_socket, test_multiprocessing_*) fail due to incorrect recvmsg(2) buffer lengths, causing failures on FreeBSD CURRENT In-Reply-To: <1535389978.32.0.56676864532.issue34521@psf.upfronthosting.co.za> Message-ID: <1539593264.86.0.788709270274.issue34521@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9250 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 04:47:52 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Oct 2018 08:47:52 +0000 Subject: [issue34521] Multiple tests (test_socket, test_multiprocessing_*) fail due to incorrect recvmsg(2) buffer lengths, causing failures on FreeBSD CURRENT In-Reply-To: <1535389978.32.0.56676864532.issue34521@psf.upfronthosting.co.za> Message-ID: <1539593272.62.0.788709270274.issue34521@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9251 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 04:49:08 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Mon, 15 Oct 2018 08:49:08 +0000 Subject: [issue34095] [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault In-Reply-To: <1531314252.99.0.56676864532.issue34095@psf.upfronthosting.co.za> Message-ID: <1539593348.8.0.788709270274.issue34095@psf.upfronthosting.co.za> Chih-Hsuan Yen added the comment: The new crashing test seems the same as https://bugs.python.org/issue33153. I can't reproduce it on 64-bit Arch Linux, so that might be a 32-bit only issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 05:19:51 2018 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 15 Oct 2018 09:19: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: <1539595191.09.0.788709270274.issue34987@psf.upfronthosting.co.za> Zackery Spytz added the comment: It is not properly checked: Py_DECREF() is always called on the result of get_class(), but get_class() can return NULL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 05:31:06 2018 From: report at bugs.python.org (Vincent Pelletier) Date: Mon, 15 Oct 2018 09:31:06 +0000 Subject: [issue34747] SSLSocket.context cannot be changed on non-connected sockets In-Reply-To: <1537429145.63.0.956365154283.issue34747@psf.upfronthosting.co.za> Message-ID: <1539595866.2.0.788709270274.issue34747@psf.upfronthosting.co.za> Vincent Pelletier added the comment: The reason which led me into this is server certificate renewal: my service crashed on that setter 2 months after starting, when it received a new certificate. I toyed with the idea of closing the listening sockets, but without closing would be even better - code changing socket certificate is much simpler than having to stop all worker treads (SocketServer.ThreadingMixIn), close the listening sockets, and start them all again in new threads with a new wrap_socket'ed listening socket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 06:52:57 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 15 Oct 2018 10:52:57 +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: <1539600777.51.0.788709270274.issue34976@psf.upfronthosting.co.za> Tal Einat added the comment: Thanks for giving it a try, Cheryl, I'm glad you like it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 07:11:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Oct 2018 11:11:42 +0000 Subject: [issue34989] python-gdb.py fails with TypeError("'FakeRepr' object is not subscriptable") is gdb fails to read debug symbols Message-ID: <1539601902.93.0.788709270274.issue34989@psf.upfronthosting.co.za> New submission from STINNER Victor : On Fedora 28, gdb fails to read (some?) debug symbols: "Dwarf Error: could not find partial DIE containing offset 0x316 [in module /usr/lib/debug/usr/bin/python3.6-3.6.6-1.fc28.x86_64.debug]" https://bugzilla.redhat.com/show_bug.cgi?id=1613614 In this case, the "py-bt" command of python-gdb.py fails with a TypeError: (gdb) py-bt Traceback (most recent call first): Python Exception 'FakeRepr' object is not subscriptable: Error occurred in Python command: 'FakeRepr' object is not subscriptable python-gdb.py shouldn't fail on such case, but handle the error. Attached PR fix this issue. ---------- components: Demos and Tools messages: 327742 nosy: vstinner priority: normal severity: normal status: open title: python-gdb.py fails with TypeError("'FakeRepr' object is not subscriptable") is gdb fails to read debug symbols versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 07:22:16 2018 From: report at bugs.python.org (Bernhard M. Wiedemann) Date: Mon, 15 Oct 2018 11:22:16 +0000 Subject: [issue34990] year 2038 problem in compileall.py Message-ID: <1539602536.3.0.788709270274.issue34990@psf.upfronthosting.co.za> New submission from Bernhard M. Wiedemann : To reproduce: touch -d 2038-01-20 /usr/lib/python3.6/site-packages/six.py python3 /usr/lib64/python3.6/compileall.py File "/usr/lib64/python3.6/compileall.py", line 198, in compile_path legacy=legacy, optimize=optimize) File "/usr/lib64/python3.6/compileall.py", line 90, in compile_dir legacy, optimize): File "/usr/lib64/python3.6/compileall.py", line 138, in compile_file mtime) struct.error: 'l' format requires -2147483648 <= number <= 2147483647 It could use either 64 bit int (requires new .pyc format with different magic number) or unsigned 32 bit int (gives us only another 68 years) ---------- components: Build messages: 327743 nosy: bmwiedemann priority: normal severity: normal status: open title: year 2038 problem in compileall.py type: compile error versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 07:23:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Oct 2018 11:23:29 +0000 Subject: [issue34989] python-gdb.py fails with TypeError("'FakeRepr' object is not subscriptable") is gdb fails to read debug symbols In-Reply-To: <1539601902.93.0.788709270274.issue34989@psf.upfronthosting.co.za> Message-ID: <1539602609.34.0.788709270274.issue34989@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +9252 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 07:25:37 2018 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 15 Oct 2018 11:25:37 +0000 Subject: [issue16965] 2to3 should rewrite execfile() to open in 'rb' mode In-Reply-To: <1358187846.57.0.700535378161.issue16965@psf.upfronthosting.co.za> Message-ID: <1539602737.53.0.788709270274.issue16965@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- pull_requests: +9253 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 07:26:28 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Oct 2018 11:26:28 +0000 Subject: [issue34989] python-gdb.py fails with TypeError("'FakeRepr' object is not subscriptable") is gdb fails to read debug symbols In-Reply-To: <1539601902.93.0.788709270274.issue34989@psf.upfronthosting.co.za> Message-ID: <1539602788.05.0.788709270274.issue34989@psf.upfronthosting.co.za> STINNER Victor added the comment: The bug can be reproduced using this change: diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py index bf4047419e..f973d4d4bd 100755 --- a/Tools/gdb/libpython.py +++ b/Tools/gdb/libpython.py @@ -402,6 +402,7 @@ class PyObjectPtr(object): the pointer accordingly. ''' try: + raise RuntimeError p = PyObjectPtr(gdbval) cls = cls.subclass_from_type(p.type()) return cls(gdbval, cast_to=cls.get_gdb_type()) (Don't forget to run "make" again to copy Tools/gdb/libpython.py to python-gdb.py.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 07:40:04 2018 From: report at bugs.python.org (thautwarm) Date: Mon, 15 Oct 2018 11:40:04 +0000 Subject: [issue34953] Implement `mmap.mmap.__repr__` In-Reply-To: <1539215332.4.0.788709270274.issue34953@psf.upfronthosting.co.za> Message-ID: <1539603604.28.0.788709270274.issue34953@psf.upfronthosting.co.za> Change by thautwarm : ---------- keywords: +patch pull_requests: +9254 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 07:49:15 2018 From: report at bugs.python.org (Wei-Cheng Pan) Date: Mon, 15 Oct 2018 11:49:15 +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: <1539604155.13.0.788709270274.issue30698@psf.upfronthosting.co.za> Wei-Cheng Pan added the comment: The SSL connection still cannot close cleanly in 3.7.0. It will keep throwing read error during shutdown, so shutdown callback will never be called. I've been test this PR for a while, and at least it fixes my problem. Hope this PR can be included in 3.7.1, or at least 3.7.2. ---------- nosy: +Wei-Cheng.Pan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 07:53:24 2018 From: report at bugs.python.org (Matej Cepl) Date: Mon, 15 Oct 2018 11:53:24 +0000 Subject: [issue34726] Add support of checked hash-based pycs in zipimport In-Reply-To: <1537300190.96.0.956365154283.issue34726@psf.upfronthosting.co.za> Message-ID: <1539604404.2.0.788709270274.issue34726@psf.upfronthosting.co.za> Change by Matej Cepl : ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 08:27:42 2018 From: report at bugs.python.org (Alan) Date: Mon, 15 Oct 2018 12:27:42 +0000 Subject: [issue34991] variable type list [] referential integrity data loss Message-ID: <1539606462.61.0.788709270274.issue34991@psf.upfronthosting.co.za> New submission from Alan : Dear PythonDev, Thank you for your tremendous work in building a simpler programming language for all. As an avid user of lists, I am upset that my list cannot preserve its referential integrity in the attached pythonissue.txt file. In the following, (EXPECTED) includes my expected checkvisit data values, and the following two (OUTPUT)s include the actual checkvisit data structures when called. Perhaps this is not an issue in Python 3.8., but this is a matter in Python 3.6. Sincerely, Alan Jerry Pan, CPA alan.pan at sjtu.edu.cn alt. alan.pan at alumni.iu.edu (EXPECTED) Checkvisit (for every isGoal iteration): [[5, 3, 4, 2, 1, 0]] [[5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0]] [[5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0]] [[5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0]] [[5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0]] [[5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0]] [[5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0], [5, 3, 4, 2, 1, 0]] (OUTPUT) Checkvisit print result inside def(visitedPath): [] [] [] [] [] [[5]] [[5, 3]] [[5, 3, 4]] [[5, 3, 4, 2]] [[5, 3, 4, 2, 1]] [[5], [5]] [[5, 3], [5, 3]] [[5, 3, 4], [5, 3, 4]] [[5, 3, 4, 2], [5, 3, 4, 2]] [[5, 3, 4, 2, 1], [5, 3, 4, 2, 1]] [[5], [5], [5]] [[5, 3], [5, 3], [5, 3]] [[5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2]] [[5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1]] [[5], [5], [5], [5]] [[5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2]] [[5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1]] [[5], [5], [5], [5], [5]] [[5, 3], [5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2]] [[5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1]] [[5], [5], [5], [5], [5], [5]] [[5, 3], [5, 3], [5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2]] [[5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1]] (OUTPUT)Checkvisit print result in while 0 loop [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [[5]] [[5]] [[5]] [[5]] [[5]] [[5, 3]] [[5, 3]] [[5, 3]] [[5, 3]] [[5, 3]] [[5, 3]] [[5, 3, 4]] [[5, 3, 4]] [[5, 3, 4]] [[5, 3, 4]] [[5, 3, 4, 2]] [[5, 3, 4, 2]] [[5, 3, 4, 2, 1]] [[5], [5]] [[5], [5]] [[5], [5]] [[5], [5]] [[5], [5]] [[5, 3], [5, 3]] [[5, 3], [5, 3]] [[5, 3], [5, 3]] [[5, 3], [5, 3]] [[5, 3], [5, 3]] [[5, 3], [5, 3]] [[5, 3, 4], [5, 3, 4]] [[5, 3, 4], [5, 3, 4]] [[5, 3, 4], [5, 3, 4]] [[5, 3, 4], [5, 3, 4]] [[5, 3, 4, 2], [5, 3, 4, 2]] [[5, 3, 4, 2], [5, 3, 4, 2]] [[5, 3, 4, 2, 1], [5, 3, 4, 2, 1]] [[5], [5], [5]] [[5], [5], [5]] [[5], [5], [5]] [[5], [5], [5]] [[5], [5], [5]] [[5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3]] [[5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2]] [[5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2]] [[5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1]] [[5], [5], [5], [5]] [[5], [5], [5], [5]] [[5], [5], [5], [5]] [[5], [5], [5], [5]] [[5], [5], [5], [5]] [[5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2]] [[5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2]] [[5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1]] [[5], [5], [5], [5], [5]] [[5], [5], [5], [5], [5]] [[5], [5], [5], [5], [5]] [[5], [5], [5], [5], [5]] [[5], [5], [5], [5], [5]] [[5, 3], [5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2]] [[5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2]] [[5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1]] [[5], [5], [5], [5], [5], [5]] [[5], [5], [5], [5], [5], [5]] [[5], [5], [5], [5], [5], [5]] [[5], [5], [5], [5], [5], [5]] [[5], [5], [5], [5], [5], [5]] [[5, 3], [5, 3], [5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3], [5, 3], [5, 3], [5, 3], [5, 3], [5, 3]] [[5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4], [5, 3, 4]] [[5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2]] [[5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2], [5, 3, 4, 2]] [[5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1], [5, 3, 4, 2, 1]] ---------- components: IO, Interpreter Core files: pythonissue.txt messages: 327746 nosy: alan.pan priority: normal severity: normal status: open title: variable type list [] referential integrity data loss type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file47870/pythonissue.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 08:50:29 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 15 Oct 2018 12:50:29 +0000 Subject: [issue34990] year 2038 problem in compileall.py In-Reply-To: <1539602536.3.0.788709270274.issue34990@psf.upfronthosting.co.za> Message-ID: <1539607829.13.0.788709270274.issue34990@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 09:08:30 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 15 Oct 2018 13:08:30 +0000 Subject: [issue34990] year 2038 problem in compileall.py In-Reply-To: <1539602536.3.0.788709270274.issue34990@psf.upfronthosting.co.za> Message-ID: <1539608910.13.0.788709270274.issue34990@psf.upfronthosting.co.za> St?phane Wirtel added the comment: With 3.8a Traceback (most recent call last): File "/home/stephane/src/github.com/python/cpython/Lib/runpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/stephane/src/github.com/python/cpython/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/stephane/src/github.com/python/cpython/Lib/compileall.py", line 326, in exit_status = int(not main()) File "/home/stephane/src/github.com/python/cpython/Lib/compileall.py", line 303, in main if not compile_file(dest, args.ddir, args.force, args.rx, File "/home/stephane/src/github.com/python/cpython/Lib/compileall.py", line 142, in compile_file expect = struct.pack('<4sll', importlib.util.MAGIC_NUMBER, struct.error: 'l' format requires -2147483648 <= number <= 2147483647 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 09:09:21 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 15 Oct 2018 13:09:21 +0000 Subject: [issue34990] year 2038 problem in compileall.py In-Reply-To: <1539602536.3.0.788709270274.issue34990@psf.upfronthosting.co.za> Message-ID: <1539608961.67.0.788709270274.issue34990@psf.upfronthosting.co.za> St?phane Wirtel added the comment: But until 2038, maybe there will be a new format for the .pyc file. We should keep this issue and try to fix it for 3.8 or 3.9? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 09:15:46 2018 From: report at bugs.python.org (Bernhard M. Wiedemann) Date: Mon, 15 Oct 2018 13:15:46 +0000 Subject: [issue34990] year 2038 problem in compileall.py In-Reply-To: <1539602536.3.0.788709270274.issue34990@psf.upfronthosting.co.za> Message-ID: <1539609346.89.0.788709270274.issue34990@psf.upfronthosting.co.za> Bernhard M. Wiedemann added the comment: It does not need to be fixed tomorrow, but 2037 is too late, because by then there will be a lot of legacy systems around. (Un)fortunately many systems live 10+ years now ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 09:16:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Oct 2018 13:16:45 +0000 Subject: [issue34990] year 2038 problem in compileall.py In-Reply-To: <1539602536.3.0.788709270274.issue34990@psf.upfronthosting.co.za> Message-ID: <1539609405.63.0.788709270274.issue34990@psf.upfronthosting.co.za> STINNER Victor added the comment: Timestamp with year >= 2038 are accepted: importlib._bootstrap_external._code_to_timestamp_pyc() uses (int(x) & 0xFFFFFFFF). It's not a bug, but by design. compileall should just do the same. Sorry, I don't know if it's specified somewhere, but I know that it's done on purpose. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 09:18:02 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 15 Oct 2018 13:18:02 +0000 Subject: [issue34990] year 2038 problem in compileall.py In-Reply-To: <1539602536.3.0.788709270274.issue34990@psf.upfronthosting.co.za> Message-ID: <1539609482.64.0.788709270274.issue34990@psf.upfronthosting.co.za> St?phane Wirtel added the comment: So we need to fix compileall.py. maybe we could add the label 'easy' to this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 09:23:54 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 15 Oct 2018 13:23:54 +0000 Subject: [issue34992] many warnings with f28 and gcc 8.1.1 Message-ID: <1539609834.54.0.788709270274.issue34992@psf.upfronthosting.co.za> New submission from St?phane Wirtel : I use Fedora 28 and gcc (GCC) 8.1.1 20180712 (Red Hat 8.1.1-5) and I get a lot of warnings, with the standard config of Python (./configure) Objects/call.c: In function '_PyMethodDef_RawFastCallDict': Objects/call.c:515:24: warning: cast between incompatible function types from 'PyCFunction' {aka 'struct _object * (*)(struct _object *, struct _object *)'} to 'PyObject * (*)(PyObject *, PyObject *, PyObject *)' {aka 'struct _object * (*)(struct _object *, struct _object *, struct _object *)'} [-Wcast-function-type] result = (*(PyCFunctionWithKeywords)meth) (self, argstuple, kwargs); ^ Objects/call.c:530:20: warning: cast between incompatible function types from 'PyCFunction' {aka 'struct _object * (*)(struct _object *, struct _object *)'} to 'PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t)' {aka 'struct _object * (*)(struct _object *, struct _object * const*, long int)'} [-Wcast-function-type] result = (*(_PyCFunctionFast)meth) (self, args, nargs); ^ Objects/call.c:538:49: warning: cast between incompatible function types from 'PyCFunction' {aka 'struct _object * (*)(struct _object *, struct _object *)'} to 'PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t, PyObject *)' {aka 'struct _object * (*)(struct _object *, struct _object * const*, long int, struct _object *)'} [-Wcast-function-type] _PyCFunctionFastWithKeywords fastmeth = (_PyCFunctionFastWithKeywords)meth; .... +- 827 warnings ---------- messages: 327752 nosy: matrixise priority: normal severity: normal status: open title: many warnings with f28 and gcc 8.1.1 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 09:29:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Oct 2018 13:29:22 +0000 Subject: [issue34992] many warnings with f28 and gcc 8.1.1 In-Reply-To: <1539609834.54.0.788709270274.issue34992@psf.upfronthosting.co.za> Message-ID: <1539610162.18.0.788709270274.issue34992@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Invalid function cast warnings with gcc 8 for METH_NOARGS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 09:29:37 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 15 Oct 2018 13:29:37 +0000 Subject: [issue34990] year 2038 problem in compileall.py In-Reply-To: <1539602536.3.0.788709270274.issue34990@psf.upfronthosting.co.za> Message-ID: <1539610177.62.0.788709270274.issue34990@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: A reproducer in Python that can be added to test_compileall if needed : def test_compile_all_2038(self): with open(self.source_path, 'r') as f: os.utime(f.name, (2147558400, 2147558400)) # Jan 20, 2038 as touch self.assertTrue(compileall.compile_file(pathlib.Path(self.source_path))) ./python.exe -m unittest -v test.test_compileall.CompileallTestsWithSourceEpoch.test_compile_all_2038 test_compile_all_2038 (test.test_compileall.CompileallTestsWithSourceEpoch) ... ERROR ====================================================================== ERROR: test_compile_all_2038 (test.test_compileall.CompileallTestsWithSourceEpoch) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_py_compile.py", line 30, in wrapper return fxn(*args, **kwargs) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_compileall.py", line 114, in test_compile_all_2038 self.assertTrue(compileall.compile_file(pathlib.Path(self.source_path))) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/compileall.py", line 142, in compile_file expect = struct.pack('<4sll', importlib.util.MAGIC_NUMBER, struct.error: 'l' format requires -2147483648 <= number <= 2147483647 ---------------------------------------------------------------------- Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 09:29:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Oct 2018 13:29:52 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1539610192.05.0.788709270274.issue33012@psf.upfronthosting.co.za> STINNER Victor added the comment: I marked bpo-34992 as a duplicate of this issue: I use Fedora 28 and gcc (GCC) 8.1.1 20180712 (Red Hat 8.1.1-5) and I get a lot of warnings, with the standard config of Python (./configure) Objects/call.c: In function '_PyMethodDef_RawFastCallDict': Objects/call.c:515:24: warning: cast between incompatible function types from 'PyCFunction' {aka 'struct _object * (*)(struct _object *, struct _object *)'} to 'PyObject * (*)(PyObject *, PyObject *, PyObject *)' {aka 'struct _object * (*)(struct _object *, struct _object *, struct _object *)'} [-Wcast-function-type] result = (*(PyCFunctionWithKeywords)meth) (self, argstuple, kwargs); ^ Objects/call.c:530:20: warning: cast between incompatible function types from 'PyCFunction' {aka 'struct _object * (*)(struct _object *, struct _object *)'} to 'PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t)' {aka 'struct _object * (*)(struct _object *, struct _object * const*, long int)'} [-Wcast-function-type] result = (*(_PyCFunctionFast)meth) (self, args, nargs); ^ Objects/call.c:538:49: warning: cast between incompatible function types from 'PyCFunction' {aka 'struct _object * (*)(struct _object *, struct _object *)'} to 'PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t, PyObject *)' {aka 'struct _object * (*)(struct _object *, struct _object * const*, long int, struct _object *)'} [-Wcast-function-type] _PyCFunctionFastWithKeywords fastmeth = (_PyCFunctionFastWithKeywords)meth; .... +- 827 warnings ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 09:48:17 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 15 Oct 2018 13:48:17 +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: <1539611297.66.0.788709270274.issue33234@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 09:48:25 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 15 Oct 2018 13:48:25 +0000 Subject: [issue34981] Unable to install Python from web-based installer and executable installer In-Reply-To: <1539516777.52.0.788709270274.issue34981@psf.upfronthosting.co.za> Message-ID: <1539611305.78.0.788709270274.issue34981@psf.upfronthosting.co.za> Steve Dower added the comment: When you run the installer, it should create log files in your %TEMP% directory. Could you find and attach those here please? There's a chance it is detecting that your system is unsupported. If you are still using Windows Vista, ensure you have installed all available updates and service packs, and then try installing Python 3.6 (the latest version, 3.7, does not support Windows Vista any more). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 09:50:56 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 15 Oct 2018 13:50:56 +0000 Subject: [issue34980] KillPython target doesn't detect 64-bit processes In-Reply-To: <1539501986.24.0.788709270274.issue34980@psf.upfronthosting.co.za> Message-ID: <1539611456.18.0.788709270274.issue34980@psf.upfronthosting.co.za> Steve Dower added the comment: I haven't looked at the logs, but there shouldn't be any problem with 33-bit/64-bit here. Windows doesn't separate processes like that. Perhaps we have builds with slightly different names (casing?) that are failing the comparison? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 09:59:54 2018 From: report at bugs.python.org (Michael Osipov) Date: Mon, 15 Oct 2018 13:59:54 +0000 Subject: [issue12572] HP/UX compiler workarounds In-Reply-To: <1310744425.61.0.885060542603.issue12572@psf.upfronthosting.co.za> Message-ID: <1539611994.93.0.788709270274.issue12572@psf.upfronthosting.co.za> Michael Osipov <1983-01-06 at gmx.net> added the comment: I believe this issue can be safely closed. It is a no-brainer to compile Python from master on HP-UX with aCC these days. It works for me at least. ---------- nosy: +michael-o _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 10:10:45 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 15 Oct 2018 14:10:45 +0000 Subject: [issue34623] _elementtree.c doesn't call XML_SetHashSalt() In-Reply-To: <1536619664.47.0.56676864532.issue34623@psf.upfronthosting.co.za> Message-ID: <1539612645.05.0.788709270274.issue34623@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Will this change be backported to 3.5 and 3.4? It applied cleanly on both however on 3.4 there is a test failure: ====================================================================== ERROR: test_del_attribute (test.test_xml_etree_c.MiscTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.4.9/Lib/test/test_xml_etree_c.py", line 26, in test_del_attribute element = cET.Element('tag') AttributeError: 'NoneType' object has no attribute 'Element' ---------------------------------------------------------------------- ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 11:03:39 2018 From: report at bugs.python.org (Ram Rachum) Date: Mon, 15 Oct 2018 15:03:39 +0000 Subject: [issue34953] Implement `mmap.mmap.__repr__` In-Reply-To: <1539215332.4.0.788709270274.issue34953@psf.upfronthosting.co.za> Message-ID: <1539615819.27.0.788709270274.issue34953@psf.upfronthosting.co.za> Ram Rachum added the comment: thautwarm, your suggestions look good. I'm not sure why you used `entire_contents`, do you want to show the entire content there? Because I saw that the sample you used had truncation. It might be unsafe to show the entire mmap, because it could be huge. I'd truncate in some way or other. (Either show just the beginning, or just the beginning and the end.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 11:04:18 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 15 Oct 2018 15:04:18 +0000 Subject: [issue34991] variable type list [] referential integrity data loss In-Reply-To: <1539606462.61.0.788709270274.issue34991@psf.upfronthosting.co.za> Message-ID: <1539615858.07.0.788709270274.issue34991@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I don't know what you mean by "referential integrity data loss". I have absolutely no idea how to interpret the wall of output you have provided. If there is a bug here, how do you know it is a language bug rather than a bug in your own code? We're not here to debug your code for you, especially when the code you provide is incomplete (what's Graph.isGoal?) and not the code you are actually running. There is no print inside the visitedPath function, so how are you getting the output checkvisit "inside def(visitedPath)" as you say? If there is one difference between the code you run and the code you send us, there could be a hundred differences. Please provide a *minimal* example of the problem, showing clear input, expected result, and actual result. You might find it helpful to read this page first: http://sscce.org/ It is written for Java programmers, but the advice applies equally to Python too. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 11:18:32 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 15 Oct 2018 15:18:32 +0000 Subject: [issue34991] variable type list [] referential integrity data loss In-Reply-To: <1539606462.61.0.788709270274.issue34991@psf.upfronthosting.co.za> Message-ID: <1539616711.99.0.788709270274.issue34991@psf.upfronthosting.co.za> Eric V. Smith added the comment: Agreed with Steven. In addition, please make sure you runnable example only uses imports from python's standard library. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 12:09:24 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 15 Oct 2018 16:09:24 +0000 Subject: [issue34980] KillPython target doesn't detect 64-bit processes In-Reply-To: <1539501986.24.0.788709270274.issue34980@psf.upfronthosting.co.za> Message-ID: <1539619764.59.0.788709270274.issue34980@psf.upfronthosting.co.za> Jeremy Kloth added the comment: My testing shows differently: D:\Public\Devel\cpython\master\PCbuild>set MSBUILD="C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSBuild.exe" D:\Public\Devel\cpython\master\PCbuild>build -k -v -t foo Using py -3.6 (found 3.6 with py.exe) Fetching external libraries... bzip2-1.0.6 already exists, skipping. sqlite-3.21.0.0 already exists, skipping. xz-5.2.2 already exists, skipping. zlib-1.2.11 already exists, skipping. Fetching external binaries... openssl-bin-1.1.0i already exists, skipping. tcltk-8.6.8.0 already exists, skipping. Finished. Using "C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSBuild.exe" (found in the environment) D:\Public\Devel\cpython\master\PCbuild>"C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSBuild.exe" "D:\Public\Devel\cpython\master\PCbuild\\pythoncore.vcxproj" /t:KillPython /v:n /p:Configuration=Release /p:Platform=Win32 /p:KillPython=true Microsoft (R) Build Engine version 14.0.25420.1 Copyright (C) Microsoft Corporation. All rights reserved. Build started 10/15/2018 10:05:36 AM. Project "D:\Public\Devel\cpython\master\PCbuild\pythoncore.vcxproj" on node 1 (KillPython target(s)). KillPython: Killing any running python.exe instances... Looking for D:\Public\Devel\cpython\master\PCbuild\win32\python.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files\Common Files\LogiShrd\sp6\LU1\LogitechUpdate.exe Found running process: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\ServiceHub\Hosts\Serv iceHub.Host.Node.x86\ServiceHub.Host.Node.x86.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\SearchUI.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files\TortoiseHg\TortoiseHgOverlayServer.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Common Files\Acronis\Schedule2\schedhlp.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Origin\QtWebEngineProcess.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\ServiceHub\Hosts\Serv iceHub.Host.CLR.x86\ServiceHub.SettingsHost.exe Found running process: C:\WINDOWS\system32\browser_broker.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Windows\System32\GameBarPresenceWriter.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files\WindowsApps\Microsoft.Windows.Photos_2018.18091.13420.0_x64__8wekyb3d8bbwe\Mi crosoft.Photos.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Program Files (x86)\Steam\bin\cef\cef.win7x64\steamwebhelper.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\WINDOWS\system32\conhost.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Steam\bin\cef\cef.win7x64\steamwebhelper.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Steam\bin\cef\cef.win7x64\steamwebhelper.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Windows\System32\RuntimeBroker.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Windows\System32\RuntimeBroker.exe Found running process: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\ServiceHub\Hosts\Serv iceHub.Host.CLR.x86\ServiceHub.Host.CLR.x86.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\WINDOWS\system32\conhost.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files\Microsoft Xbox 360 Accessories\XBoxStat.exe Found running process: C:\Program Files\Common Files\LogiShrd\sp6\LU1\LULnchr.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\IDE\Microsoft.VisualS tudio.Web.Host.exe Found running process: C:\Program Files (x86)\CorsairLink4\CorsairLink4.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Windows\System32\RuntimeBroker.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\WINDOWS\system32\SettingSyncHost.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Program Files\Microsoft Mouse and Keyboard Center\ipoint.exe Found running process: C:\Program Files\Microsoft Mouse and Keyboard Center\itype.exe Found running process: C:\Program Files (x86)\TextPad 6\TextPad.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\ServiceHub\Hosts\Serv iceHub.Host.CLR.x86\ServiceHub.VSDetouredHost.exe Found running process: C:\WINDOWS\system32\taskhostw.exe Found running process: C:\WINDOWS\Explorer.EXE Found running process: C:\Windows\SystemApps\InputApp_cw5n1h2txyewy\WindowsInternal.ComposableShell.Experiences.TextI nput.InputApp.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Windows\SystemApps\ShellExperienceHost_cw5n1h2txyewy\ShellExperienceHost.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Program Files (x86)\Steam\bin\cef\cef.win7x64\steamwebhelper.exe Found running process: C:\WINDOWS\system32\conhost.exe Found running process: C:\Program Files (x86)\SlySoft\AnyDVD\ADvdDiscHlp64.exe Found running process: C:\Program Files\Common Files\LogiShrd\KHAL3\KHALMNPR.EXE Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\NVIDIA Corporation\NvNode\NVIDIA Web Helper.exe Found running process: C:\Users\Jeremy\AppData\Local\Microsoft\OneDrive\OneDrive.exe Found running process: C:\WINDOWS\system32\svchost.exe Found running process: C:\WINDOWS\system32\svchost.exe Found running process: C:\Windows\System32\RuntimeBroker.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftPdfReader.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Program Files\WindowsApps\SAMSUNGELECTRONICSCoLtd.SamsungFlux_3.5.10.0_x64__wyx1vj98g3asy\S amsungFlow.exe Found running process: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\IDE\PerfWatson2.exe Found running process: C:\Program Files (x86)\SlySoft\AnyDVD\AnyDVDtray.exe Found running process: C:\WINDOWS\system32\cmd.exe Found running process: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\ServiceHub\Hosts\Serv iceHub.Host.CLR.x86\ServiceHub.IdentityHost.exe Found running process: C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat\acrotray.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Program Files\WindowsApps\Microsoft.WindowsStore_11809.1001.8.0_x64__8wekyb3d8bbwe\WinStore .App.exe Found running process: C:\Windows\System32\RuntimeBroker.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Windows\System32\SecurityHealthSystray.exe Found running process: C:\Program Files\WindowsApps\Microsoft.BingNews_4.27.2643.0_x64__8wekyb3d8bbwe\Microsoft.Msn.N ews.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\IDE\devenv.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files\WindowsApps\SAMSUNGELECTRONICSCoLtd.SamsungFlux_3.5.10.0_x64__wyx1vj98g3asy\D esktopApp\SamsungFlowDesktop.exe Found running process: C:\Program Files (x86)\Common Files\Acronis\TibMounter\TibMounterMonitor.exe Found running process: C:\Windows\System32\smartscreen.exe Found running process: C:\Program Files\Logitech\SetPointP\SetPoint.exe Found running process: C:\WINDOWS\system32\svchost.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\WINDOWS\system32\sihost.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\ServiceHub\Hosts\Serv iceHub.Host.CLR.x86\ServiceHub.RoslynCodeAnalysisService32.exe Found running process: C:\Program Files (x86)\Origin\Origin.exe Found running process: C:\Program Files\NVIDIA Corporation\NvContainer\nvcontainer.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Windows\System32\RuntimeBroker.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\WINDOWS\system32\conhost.exe Found running process: C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftPdfReader.exe Found running process: C:\Program Files (x86)\Creative\Sound Blaster Recon3Di\Sound Blaster Recon3Di Control Panel\CT JckCfg.exe Found running process: C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftPdfReader.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\VCDDaemon.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\WINDOWS\system32\MicrosoftEdgeSH.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\WINDOWS\system32\conhost.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Users\Jeremy\AppData\Local\FluxSoftware\Flux\flux.exe Found running process: C:\Program Files (x86)\Origin\QtWebEngineProcess.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Program Files (x86)\Common Files\Java\Java Update\jusched.exe Found running process: C:\Program Files\TortoiseSVN\bin\TSVNCache.exe Found running process: C:\Program Files (x86)\Intel Driver and Support Assistant\DSATray.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Windows\System32\RuntimeBroker.exe Found running process: C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\RemindersServer.exe Found running process: C:\Program Files (x86)\Steam\bin\cef\cef.win7x64\steamwebhelper.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSBuild.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe Found running process: C:\WINDOWS\System32\svchost.exe Found running process: C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftPdfReader.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Program Files (x86)\Creative\Sound Blaster Recon3Di\Sound Blaster Recon3Di Control Panel\SB Rcni.exe Found running process: C:\Program Files (x86)\Steam\Steam.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Samsung\Samsung System Agent\SamsungSystemAgent.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\WINDOWS\system32\ApplicationFrameHost.exe Found running process: C:\WINDOWS\system32\DllHost.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files\WindowsApps\NinjaKiwi.BloonsMonkeyCity_1.11.3.0_x86__g04ay3csa72hr\MonkeyCity -WinRT.Windows.exe Found running process: C:\Windows\System32\MicrosoftEdgeCP.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Windows\System32\RuntimeBroker.exe Found running process: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Found running process: C:\Program Files (x86)\Acronis\TrueImageHome\TrueImageMonitor.exe Done Building Project "D:\Public\Devel\cpython\master\PCbuild\pythoncore.vcxproj" (KillPython target(s)). Build succeeded. 0 Warning(s) 0 Error(s) Time Elapsed 00:00:01.70 D:\Public\Devel\cpython\master\PCbuild>"C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSBuild.exe" "D:\Public\Devel\cpython\master\PCbuild\pcbuild.proj" /t:foo /m /v:n /p:Configuration=Release /p:Platform=Win32 /p:IncludeExternals=true /p:IncludeSSL=true /p:IncludeTkinter=true /p:UseTestMarker= /p:GIT="C:\Program Files\Git\cmd\git.exe" Microsoft (R) Build Engine version 14.0.25420.1 Copyright (C) Microsoft Corporation. All rights reserved. Build started 10/15/2018 10:05:37 AM. 1>Project "D:\Public\Devel\cpython\master\PCbuild\pcbuild.proj" on node 1 (foo target(s)). 1>D:\Public\Devel\cpython\master\PCbuild\pcbuild.proj : error MSB4057: The target "foo" does not exist in the proj ect. 1>Done Building Project "D:\Public\Devel\cpython\master\PCbuild\pcbuild.proj" (foo target(s)) -- FAILED. Build FAILED. "D:\Public\Devel\cpython\master\PCbuild\pcbuild.proj" (foo target) (1) -> D:\Public\Devel\cpython\master\PCbuild\pcbuild.proj : error MSB4057: The target "foo" does not exist in the pr oject. 0 Warning(s) 1 Error(s) Time Elapsed 00:00:00.01 D:\Public\Devel\cpython\master\PCbuild>set MSBUILD="C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" D:\Public\Devel\cpython\master\PCbuild>build -k -v -t foo Using py -3.6 (found 3.6 with py.exe) Fetching external libraries... bzip2-1.0.6 already exists, skipping. sqlite-3.21.0.0 already exists, skipping. xz-5.2.2 already exists, skipping. zlib-1.2.11 already exists, skipping. Fetching external binaries... openssl-bin-1.1.0i already exists, skipping. tcltk-8.6.8.0 already exists, skipping. Finished. Using "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" (found in the environment) D:\Public\Devel\cpython\master\PCbuild>"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "D:\Public\Devel\cpython\master\PCbuild\\pythoncore.vcxproj" /t:KillPython /v:n /p:Configuration=Release /p:Platform=Win32 /p:KillPython=true Microsoft (R) Build Engine version 14.0.25420.1 Copyright (C) Microsoft Corporation. All rights reserved. Build started 10/15/2018 10:06:13 AM. Project "D:\Public\Devel\cpython\master\PCbuild\pythoncore.vcxproj" on node 1 (KillPython target(s)). KillPython: Killing any running python.exe instances... Looking for D:\Public\Devel\cpython\master\PCbuild\win32\python.exe Found running process: C:\Program Files\Common Files\LogiShrd\sp6\LU1\LogitechUpdate.exe Found running process: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\ServiceHub\Hosts\Serv iceHub.Host.Node.x86\ServiceHub.Host.Node.x86.exe Found running process: C:\Program Files (x86)\Common Files\Acronis\Schedule2\schedhlp.exe Found running process: C:\Program Files (x86)\Origin\QtWebEngineProcess.exe Found running process: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\ServiceHub\Hosts\Serv iceHub.Host.CLR.x86\ServiceHub.SettingsHost.exe Found running process: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\ServiceHub\Hosts\Serv iceHub.Host.CLR.x86\ServiceHub.Host.CLR.x86.exe Found running process: C:\Program Files\Common Files\LogiShrd\sp6\LU1\LULnchr.exe Found running process: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\IDE\Microsoft.VisualS tudio.Web.Host.exe Found running process: C:\Program Files (x86)\CorsairLink4\CorsairLink4.exe Found running process: C:\Program Files (x86)\TextPad 6\TextPad.exe Found running process: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\ServiceHub\Hosts\Serv iceHub.Host.CLR.x86\ServiceHub.VSDetouredHost.exe Found running process: C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe Found running process: C:\Program Files (x86)\NVIDIA Corporation\NvNode\NVIDIA Web Helper.exe Found running process: C:\Users\Jeremy\AppData\Local\Microsoft\OneDrive\OneDrive.exe Found running process: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\IDE\PerfWatson2.exe Found running process: C:\Program Files (x86)\SlySoft\AnyDVD\AnyDVDtray.exe Found running process: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\ServiceHub\Hosts\Serv iceHub.Host.CLR.x86\ServiceHub.IdentityHost.exe Found running process: C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat\acrotray.exe Found running process: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\IDE\devenv.exe Found running process: C:\Program Files\WindowsApps\SAMSUNGELECTRONICSCoLtd.SamsungFlux_3.5.10.0_x64__wyx1vj98g3asy\D esktopApp\SamsungFlowDesktop.exe Found running process: C:\Program Files (x86)\Common Files\Acronis\TibMounter\TibMounterMonitor.exe Found running process: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\ServiceHub\Hosts\Serv iceHub.Host.CLR.x86\ServiceHub.RoslynCodeAnalysisService32.exe Found running process: C:\Program Files (x86)\Origin\Origin.exe Found running process: C:\Program Files (x86)\Creative\Sound Blaster Recon3Di\Sound Blaster Recon3Di Control Panel\CT JckCfg.exe Found running process: C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\VCDDaemon.exe Found running process: C:\Users\Jeremy\AppData\Local\FluxSoftware\Flux\flux.exe Found running process: C:\Program Files (x86)\Origin\QtWebEngineProcess.exe Found running process: C:\Program Files (x86)\Common Files\Java\Java Update\jusched.exe Found running process: C:\Program Files (x86)\Creative\Sound Blaster Recon3Di\Sound Blaster Recon3Di Control Panel\SB Rcni.exe Found running process: C:\Program Files (x86)\Steam\Steam.exe Found running process: C:\Program Files (x86)\Samsung\Samsung System Agent\SamsungSystemAgent.exe Found running process: C:\Program Files\WindowsApps\NinjaKiwi.BloonsMonkeyCity_1.11.3.0_x86__g04ay3csa72hr\MonkeyCity -WinRT.Windows.exe Found running process: C:\Program Files (x86)\Acronis\TrueImageHome\TrueImageMonitor.exe Done Building Project "D:\Public\Devel\cpython\master\PCbuild\pythoncore.vcxproj" (KillPython target(s)). Build succeeded. 0 Warning(s) 0 Error(s) Time Elapsed 00:00:01.24 D:\Public\Devel\cpython\master\PCbuild>"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "D:\Public\Devel\cpython\master\PCbuild\pcbuild.proj" /t:foo /m /v:n /p:Configuration=Release /p:Platform=Win32 /p:IncludeExternals=true /p:IncludeSSL=true /p:IncludeTkinter=true /p:UseTestMarker= /p:GIT="C:\Program Files\Git\cmd\git.exe" Microsoft (R) Build Engine version 14.0.25420.1 Copyright (C) Microsoft Corporation. All rights reserved. Build started 10/15/2018 10:06:14 AM. 1>Project "D:\Public\Devel\cpython\master\PCbuild\pcbuild.proj" on node 1 (foo target(s)). 1>D:\Public\Devel\cpython\master\PCbuild\pcbuild.proj : error MSB4057: The target "foo" does not exist in the proj ect. 1>Done Building Project "D:\Public\Devel\cpython\master\PCbuild\pcbuild.proj" (foo target(s)) -- FAILED. Build FAILED. "D:\Public\Devel\cpython\master\PCbuild\pcbuild.proj" (foo target) (1) -> D:\Public\Devel\cpython\master\PCbuild\pcbuild.proj : error MSB4057: The target "foo" does not exist in the pr oject. 0 Warning(s) 1 Error(s) Time Elapsed 00:00:00.00 D:\Public\Devel\cpython\master\PCbuild> Note the lack of 64-bit processes in the second run when using the 32-bit version of MSBuild. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 12:32:11 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 15 Oct 2018 16:32:11 +0000 Subject: [issue34980] KillPython target doesn't detect 64-bit processes In-Reply-To: <1539501986.24.0.788709270274.issue34980@psf.upfronthosting.co.za> Message-ID: <1539621131.64.0.788709270274.issue34980@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Alternatively, to test for yourself: 1) build a 64-bit python: > build -e -d -k -v -p x64 2) start the newly built interpreter: > amd64\python_d.exe 3) in a different command prompt (using dummy target to just do the KillPython) > build -e -d -k -v -p x64 -t foo The expected result should be that the Python interpreter in the first window would by closed, but does not with the 32-bit MSBuild. It does close however with the 64-bit MSBuild. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 13:27:55 2018 From: report at bugs.python.org (xitop) Date: Mon, 15 Oct 2018 17:27:55 +0000 Subject: [issue34993] asyncio.streams.FlowControlMixin should be part of the API Message-ID: <1539624475.24.0.788709270274.issue34993@psf.upfronthosting.co.za> New submission from xitop : This issue report is based on a SO question "How to create asyncio stream reader/writer for stdin/stdout?", its answer and comments. Link: https://stackoverflow.com/q/52089869/5378816 The key point is that two unidirectional pipes should be used the same way as one bidirectional network socket. The answer (more precisely the Linux/Unix part of it) and some following comments - both created by highly competent SO members - suggest that FlowControlMixin is a useful class required to write a proper code for this and similar usecases. That's why the FlowControlMixin or an equivalent should be made available to asyncio programmers as a documented part of the library. ---------- components: asyncio messages: 327764 nosy: asvetlov, xitop, yselivanov priority: normal severity: normal status: open title: asyncio.streams.FlowControlMixin should be part of the API versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 13:36:32 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 15 Oct 2018 17:36:32 +0000 Subject: [issue34993] asyncio.streams.FlowControlMixin should be part of the API In-Reply-To: <1539624475.24.0.788709270274.issue34993@psf.upfronthosting.co.za> Message-ID: <1539624992.38.0.788709270274.issue34993@psf.upfronthosting.co.za> Yury Selivanov added the comment: asvetlov: need to handle this usecase with the new API; -1 on exposing FlowControlMixin though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 13:48:14 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 Oct 2018 17:48:14 +0000 Subject: [issue34095] [2.7] Seg fault on archlinux 32 when run tests with xvfb-run In-Reply-To: <1531314252.99.0.56676864532.issue34095@psf.upfronthosting.co.za> Message-ID: <1539625694.39.0.788709270274.issue34095@psf.upfronthosting.co.za> Terry J. Reedy added the comment: It is not clear what you did differently to get a different result. I changed the title since it seems that idlelib code is not the direct problem. ---------- title: [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault -> [2.7] Seg fault on archlinux 32 when run tests with xvfb-run type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 13:58:39 2018 From: report at bugs.python.org (thautwarm) Date: Mon, 15 Oct 2018 17:58:39 +0000 Subject: [issue34953] Implement `mmap.mmap.__repr__` In-Reply-To: <1539215332.4.0.788709270274.issue34953@psf.upfronthosting.co.za> Message-ID: <1539626319.32.0.788709270274.issue34953@psf.upfronthosting.co.za> thautwarm added the comment: @Ram Rachum Yes yes yes, actually the entire contents will be truncated when its length is bigger than a specific integer(now it's 50). For we use `...` to represent the ignored contents, `start ... end` could also be called *entire_contents* :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 14:08:17 2018 From: report at bugs.python.org (Erich Eckner) Date: Mon, 15 Oct 2018 18:08:17 +0000 Subject: [issue34095] [2.7] Seg fault on archlinux 32 when run tests with xvfb-run In-Reply-To: <1531314252.99.0.56676864532.issue34095@psf.upfronthosting.co.za> Message-ID: <1539626897.4.0.788709270274.issue34095@psf.upfronthosting.co.za> Erich Eckner added the comment: yes, I'm also not sure what's different now - I executed the very same commands on the very same source tree :-/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 14:08:33 2018 From: report at bugs.python.org (Pranav Devarakonda) Date: Mon, 15 Oct 2018 18:08:33 +0000 Subject: [issue34978] check type of object in fix_dict.py in 2to3 In-Reply-To: <1539475549.65.0.788709270274.issue34978@psf.upfronthosting.co.za> Message-ID: <1539626913.21.0.788709270274.issue34978@psf.upfronthosting.co.za> Pranav Devarakonda added the comment: Thank you very much for pointing out some helpful things, Karthikeyan. >True if 1 in list(a.keys()) if type(a) == dict else a.keys() else False True that the fixer would return a syntax error in this case. I missed adding a pair of parenthesis to the whole if statement. I mean True if 1 in (list(a.keys()) if type(a) == dict else a.keys()) else False is valid code. So adding parenthesis would solve the problem as I did in the updated patch I uploaded. I don't see this updated fixer returning errors in other cases like nested if conditions or list comprehensions, since the fixer would convert the respective function calls of dict objects into separate statements, would not interfere with other if statements(or any other statements for that matter) and set the order of precedence appropriately. Please do point out if there any other cases I missed. I know this is a less pythonic but is more accurate :) Thanks. ---------- Added file: https://bugs.python.org/file47871/fix_dict.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 14:10:39 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 Oct 2018 18:10:39 +0000 Subject: [issue12572] HP/UX compiler workarounds In-Reply-To: <1310744425.61.0.885060542603.issue12572@psf.upfronthosting.co.za> Message-ID: <1539627039.57.0.788709270274.issue12572@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thank you for the update. I think any problems with the current HP/UX compiler are best reported on a new issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 14:12:53 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 15 Oct 2018 18:12:53 +0000 Subject: [issue34993] asyncio.streams.FlowControlMixin should be part of the API In-Reply-To: <1539624475.24.0.788709270274.issue34993@psf.upfronthosting.co.za> Message-ID: <1539627173.22.0.788709270274.issue34993@psf.upfronthosting.co.za> Andrew Svetlov added the comment: 1. Trio has *stappled* streams for the case, especially useful for starting TLS session over stdin/stdout. We can master something too. 2. FlowControlMixin was always considered a **private** API. Would be nice to add an underscore prefix to the name if not too late. IIRC the official policy is: if you need the class -- copy and paste it into your project. 3. Even a person with very many stars on StackOverflow doesn't become an asyncio expert automatically; while I very respect the sie and so on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 14:40:08 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 15 Oct 2018 18:40:08 +0000 Subject: [issue34990] year 2038 problem in compileall.py In-Reply-To: <1539602536.3.0.788709270274.issue34990@psf.upfronthosting.co.za> Message-ID: <1539628808.46.0.788709270274.issue34990@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +9256 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 14:41:42 2018 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 15 Oct 2018 18:41:42 +0000 Subject: [issue34844] logging.Formatter enhancement - Checking on style and fmt fields In-Reply-To: <1538252230.83.0.545547206417.issue34844@psf.upfronthosting.co.za> Message-ID: <1539628902.67.0.788709270274.issue34844@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset 18fb1fb943b7dbd7f8a76017ee2a67ef13effb85 by Vinay Sajip (BNMetrics) in branch 'master': bpo-34844: logging.Formatter enhancement - Ensure style and format string matches in logging.Formatter (GH-9703) https://github.com/python/cpython/commit/18fb1fb943b7dbd7f8a76017ee2a67ef13effb85 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 14:43:15 2018 From: report at bugs.python.org (Ethan Furman) Date: Mon, 15 Oct 2018 18:43:15 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1539406328.55.0.788709270274.issue34909@psf.upfronthosting.co.za> Message-ID: Ethan Furman added the comment: On 10/12/2018 09:52 PM, Ned Deily wrote: > Can you please merge a NEWS item for this issue using blurb since it > is a user-visible problem? I'll cherry-pick it into the 3.7.1 final. I don't believe the problem exists in 3.7.0 -- but I also don't know how to select the 3.7.0 "branch"/"bookmark"/"tag"/"whatever-it's-called" to build and test myself. If you can tell me how to get to whatever commit represents 3.7.0 I'm happy to test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 15:16:38 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 15 Oct 2018 19:16:38 +0000 Subject: [issue34990] year 2038 problem in compileall.py In-Reply-To: <1539602536.3.0.788709270274.issue34990@psf.upfronthosting.co.za> Message-ID: <1539630998.61.0.788709270274.issue34990@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Victor seems there was some discussion about 2038 problem in the original PR but I don't know if it's related to this. Reference : https://github.com/python/cpython/pull/4575#discussion_r153376173 Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 15:17:30 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 15 Oct 2018 19:17:30 +0000 Subject: [issue34844] logging.Formatter enhancement - Checking on style and fmt fields In-Reply-To: <1538252230.83.0.545547206417.issue34844@psf.upfronthosting.co.za> Message-ID: <1539631050.1.0.788709270274.issue34844@psf.upfronthosting.co.za> Guido van Rossum added the comment: W00t! Congrats Luna and thanks for your contribution. Thanks Vinay for the prompt reviews! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 15:35:28 2018 From: report at bugs.python.org (Eryk Sun) Date: Mon, 15 Oct 2018 19:35:28 +0000 Subject: [issue34980] KillPython target doesn't detect 64-bit processes In-Reply-To: <1539501986.24.0.788709270274.issue34980@psf.upfronthosting.co.za> Message-ID: <1539632128.91.0.788709270274.issue34980@psf.upfronthosting.co.za> Eryk Sun added the comment: > there shouldn't be any problem with 33-bit/64-bit here. Windows > doesn't separate processes like that. Accessing the MainModule property of a .NET Process object raises an exception if the current process is 32-bit and the process is 64-bit [1]. This is because a 32-bit process can't sensibly read the PEB data of a 64-bit process, such as the loader's module data. It seems we have to P/Invoke QueryFullProcessImageName (which makes an NtQueryInformationProcess system call instead of reading data directly). We already have p.Handle, so the process doesn't have to be opened. Here's an example in 32-bit posh (i.e. %SystemRoot%\SysWOW64\WindowsPowerShell\v1.0\powershell.exe): $MethodDefinition = @" [DllImport("kernel32.dll", SetLastError=true, CharSet=CharSet.Unicode)] public static extern bool QueryFullProcessImageName( [In]IntPtr hProcess, [In]int dwFlags, [Out]StringBuilder lpExeName, ref int lpdwSize); "@ $Kernel32 = Add-Type -Using "System.Text" -MemberDefinition ` $MethodDefinition -Name "Kernel32" -Namespace "Win32" -PassThru $p = [System.Diagnostics.Process]::GetProcessesByName("explorer")[0] $size = 32768 $name = [System.Text.StringBuilder]($size) 32-bit posh can't directly read the executable name: PS C:\> $p.MainModule.FileName -eq $null True But QueryFullProcessImageName works fine: PS C:\> $Kernel32::QueryFullProcessImageName($p.Handle, 0, $name, [ref]$size) True PS C:\> $name.ToString() C:\Windows\explorer.exe [1]: https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 15:47:54 2018 From: report at bugs.python.org (Zyg) Date: Mon, 15 Oct 2018 19:47:54 +0000 Subject: [issue34562] cannot install versions 3.6.5+ on Windows In-Reply-To: <1535796351.86.0.56676864532.issue34562@psf.upfronthosting.co.za> Message-ID: <1539632874.88.0.788709270274.issue34562@psf.upfronthosting.co.za> Zyg added the comment: Thanks for the answer. As you instructed, I have downloaded all the installation files into a directory from another laptop, where I later successfully installed Python. However, on the old laptop, where I originally had this problem, I am still unable to install it. I believe it has something to do with missing Windows updates. Now I am receiving a "System Error" message: "The program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer. Try reinstalling the program to fix this problem." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 15:52:42 2018 From: report at bugs.python.org (Zyg) Date: Mon, 15 Oct 2018 19:52:42 +0000 Subject: [issue34562] cannot install versions 3.6.5+ on Windows In-Reply-To: <1535796351.86.0.56676864532.issue34562@psf.upfronthosting.co.za> Message-ID: <1539633162.91.0.788709270274.issue34562@psf.upfronthosting.co.za> Zyg added the comment: Clarification. After getting that system error 3 times, I saw the message that installation succeeded. But I am unable to start Python because of this same error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 16:10:06 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 15 Oct 2018 20:10:06 +0000 Subject: [issue34994] sysconfig returns the git commands for GITBRANCH, GITVERSION and GITTAG Message-ID: <1539634206.6.0.788709270274.issue34994@psf.upfronthosting.co.za> New submission from St?phane Wirtel : > ./configure --prefix=$PWD-build --with-pydebug --quiet > make -j 4 -s > git --git-dir ./.git rev-parse --short HEAD ee171a26c1 > ./python -m sysconfig | grep GIT GITBRANCH = "git --git-dir ./.git name-rev --name-only HEAD" GITTAG = "git --git-dir ./.git describe --all --always --dirty" GITVERSION = "git --git-dir ./.git rev-parse --short HEAD" Normally, I should get the real values in these variables and not the git commands. I don't understand why there are the git commands, I don't want to execute the commands, just get the git information. The result should be GITBRANCH = "master" GITTAG = "heads/master" GITVERSION = "ee171a26c1" I think there is an issue. Is it right? ---------- messages: 327779 nosy: matrixise priority: normal severity: normal status: open title: sysconfig returns the git commands for GITBRANCH, GITVERSION and GITTAG versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 16:17:55 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 15 Oct 2018 20:17:55 +0000 Subject: [issue34994] sysconfig returns the git commands for GITBRANCH, GITVERSION and GITTAG In-Reply-To: <1539634206.6.0.788709270274.issue34994@psf.upfronthosting.co.za> Message-ID: <1539634675.67.0.788709270274.issue34994@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +9257 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 16:30:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Oct 2018 20:30:09 +0000 Subject: [issue34994] sysconfig returns the git commands for GITBRANCH, GITVERSION and GITTAG In-Reply-To: <1539634206.6.0.788709270274.issue34994@psf.upfronthosting.co.za> Message-ID: <1539635409.28.0.788709270274.issue34994@psf.upfronthosting.co.za> STINNER Victor added the comment: Git informations are available as: >>> sys._git ('CPython', 'heads/fakerepr', 'd353239f83') >>> sys.version '3.8.0a0 (heads/fakerepr:d353239f83, Oct 15 2018, 13:20:43) \n[GCC 8.1.1 20180712 (Red Hat 8.1.1-5)]' ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 16:31:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Oct 2018 20:31:11 +0000 Subject: [issue34095] [2.7] Seg fault on archlinux 32 when run tests with xvfb-run In-Reply-To: <1531314252.99.0.56676864532.issue34095@psf.upfronthosting.co.za> Message-ID: <1539635471.94.0.788709270274.issue34095@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 16:31:49 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 15 Oct 2018 20:31:49 +0000 Subject: [issue34994] sysconfig returns the git commands for GITBRANCH, GITVERSION and GITTAG In-Reply-To: <1539634206.6.0.788709270274.issue34994@psf.upfronthosting.co.za> Message-ID: <1539635509.65.0.788709270274.issue34994@psf.upfronthosting.co.za> St?phane Wirtel added the comment: sure, but you can also get these info from sysconfig. and for me, there is a problem with sysconfig. two solutions, remove GIT* from sysconfig or fix sysconfig with the right values. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 16:31:49 2018 From: report at bugs.python.org (Robert Wall) Date: Mon, 15 Oct 2018 20:31:49 +0000 Subject: [issue34932] Add macOS TCP_KEEPALIVE to available socket options In-Reply-To: <1539005890.42.0.545547206417.issue34932@psf.upfronthosting.co.za> Message-ID: <1539635509.91.0.788709270274.issue34932@psf.upfronthosting.co.za> Robert Wall added the comment: I saw that article too but reading man tcp(4) [1], it says that this value is in seconds for macOS and testing appears to confirm this. Where the unit of time is different, however, is with the old and new Windows keepalive options discussed in #32394. The SIO_KEEPALIVE_VALS set via the WinSock ioctl is in milliseconds [2] whereas the newer TCP_KEEP* flags are set in seconds [3] but this doesn't seem too bad as they are different interfaces. I'll add the tcp_keepalive flag to the same win_runtime_flags structure as the other options with minimum version 1709 and update the failing test accordingly to take account of the new option. [1] https://github.com/apple/darwin-xnu/blob/xnu-4570.1.46/bsd/man/man4/tcp.4#L172 [2] https://msdn.microsoft.com/en-us/library/windows/desktop/dd877220(v=vs.85).aspx [3] https://docs.microsoft.com/en-us/windows/desktop/winsock/ipproto-tcp-socket-options ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 16:37:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Oct 2018 20:37:01 +0000 Subject: [issue34994] sysconfig returns the git commands for GITBRANCH, GITVERSION and GITTAG In-Reply-To: <1539634206.6.0.788709270274.issue34994@psf.upfronthosting.co.za> Message-ID: <1539635821.1.0.788709270274.issue34994@psf.upfronthosting.co.za> STINNER Victor added the comment: It seems like you misunderstood the purpose of these variables. They are only used to build getbuildinfo which is used to fill sys._git. Depending on the platform and git version, there are different ways to get the version, branch and tag. These variables should not be used to get the Git version, branch and tag: sys._git is here for that. Hum, sadly it's not documented. Or you can parse sys.version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 16:52:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Oct 2018 20:52:38 +0000 Subject: [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1539636758.91.0.788709270274.issue11233@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b248a8c9a5e7cf6b8e84a3efda493fccfc511316 by Victor Stinner (Cheryl Sabella) in branch '3.7': [3.7] bpo-11233: Create availability directive for documentation (GH-9692) (GH-9830) https://github.com/python/cpython/commit/b248a8c9a5e7cf6b8e84a3efda493fccfc511316 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:01:47 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Oct 2018 21:01:47 +0000 Subject: [issue34994] sysconfig returns the git commands for GITBRANCH, GITVERSION and GITTAG In-Reply-To: <1539634206.6.0.788709270274.issue34994@psf.upfronthosting.co.za> Message-ID: <1539637307.07.0.788709270274.issue34994@psf.upfronthosting.co.za> Ned Deily added the comment: Victor is correct. Those GIT* variable are there to communicate between ./configure and the Makefile; they are *not* intended to have actual values for change ids or branch names. Many variables in the Makefile are not intended to be used outside of the build except for those that are explicitly documented or are well-known autoconf variables, like CFLAGS. While any Git VCS info for the build is captured in sys._git, the _ prefix indicates it is a Python private attribute and thus is not documented. The documented way to get any VCS info is via the platform module: $ /usr/local/bin/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. >>> import platform >>> platform.python_branch() 'v3.7.1rc2' >>> platform.python_revision() '6c06ef7dc3' >>> platform.python_build() ('v3.7.1rc2:6c06ef7dc3', 'Oct 13 2018 05:10:29') https://docs.python.org/3/library/platform.html#platform.python_revision ---------- nosy: +ned.deily resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:03:23 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 15 Oct 2018 21:03:23 +0000 Subject: [issue34994] sysconfig returns the git commands for GITBRANCH, GITVERSION and GITTAG In-Reply-To: <1539634206.6.0.788709270274.issue34994@psf.upfronthosting.co.za> Message-ID: <1539637403.5.0.788709270274.issue34994@psf.upfronthosting.co.za> St?phane Wirtel added the comment: yep, sure and now, after your explanations (you and victor) I just closed my PR, but to be honnest with your, I was really surprised when I have seen the git commands in the GIT* variables. Thanks for your review and your time. ---------- resolution: not a bug -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:03:29 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 15 Oct 2018 21:03:29 +0000 Subject: [issue34994] sysconfig returns the git commands for GITBRANCH, GITVERSION and GITTAG In-Reply-To: <1539634206.6.0.788709270274.issue34994@psf.upfronthosting.co.za> Message-ID: <1539637409.61.0.788709270274.issue34994@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:12:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Oct 2018 21:12:03 +0000 Subject: [issue34783] [3.7] segmentation-fault/core dump when try to run non-existing file specified on commandline In-Reply-To: <1537747248.54.0.956365154283.issue34783@psf.upfronthosting.co.za> Message-ID: <1539637923.75.0.788709270274.issue34783@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9258 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:14:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Oct 2018 21:14:27 +0000 Subject: [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1539638067.94.0.788709270274.issue11233@psf.upfronthosting.co.za> STINNER Victor added the comment: Thank you Sandro Tosi for the bug report, thanks Georg Brandl for initial patch, and thanks Cheryl Sabella for the final changes in 3.7 and master! According to Yury Selivanov, it's not need to backport this change to 2.7 and 3.6, so I close the issue. https://github.com/python/cpython/pull/9692#issuecomment-429364037 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:20:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Oct 2018 21:20:01 +0000 Subject: [issue34989] python-gdb.py fails with TypeError("'FakeRepr' object is not subscriptable") is gdb fails to read debug symbols In-Reply-To: <1539601902.93.0.788709270274.issue34989@psf.upfronthosting.co.za> Message-ID: <1539638401.46.0.788709270274.issue34989@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2e438cc2554495b28480a3ffe5cdf41b6ab823a0 by Victor Stinner in branch 'master': bpo-34989: python-gdb.py: fix current_line_num() (GH-9889) https://github.com/python/cpython/commit/2e438cc2554495b28480a3ffe5cdf41b6ab823a0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:20:15 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Oct 2018 21:20:15 +0000 Subject: [issue34521] Multiple tests (test_socket, test_multiprocessing_*) fail due to incorrect recvmsg(2) buffer lengths, causing failures on FreeBSD CURRENT In-Reply-To: <1535389978.32.0.56676864532.issue34521@psf.upfronthosting.co.za> Message-ID: <1539638415.26.0.788709270274.issue34521@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d991ede16b34399c5ea9bd30e9a5c520bed6bea8 by Miss Islington (bot) in branch '3.7': bpo-34521: Add NEWS entry for changes in GH-9613 (GH-9850) https://github.com/python/cpython/commit/d991ede16b34399c5ea9bd30e9a5c520bed6bea8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:21:23 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Oct 2018 21:21:23 +0000 Subject: [issue34989] python-gdb.py fails with TypeError("'FakeRepr' object is not subscriptable") is gdb fails to read debug symbols In-Reply-To: <1539601902.93.0.788709270274.issue34989@psf.upfronthosting.co.za> Message-ID: <1539638483.06.0.788709270274.issue34989@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9259 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:21:58 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Oct 2018 21:21:58 +0000 Subject: [issue34989] python-gdb.py fails with TypeError("'FakeRepr' object is not subscriptable") is gdb fails to read debug symbols In-Reply-To: <1539601902.93.0.788709270274.issue34989@psf.upfronthosting.co.za> Message-ID: <1539638518.18.0.788709270274.issue34989@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9260 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:30:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Oct 2018 21:30:07 +0000 Subject: [issue34989] python-gdb.py fails with TypeError("'FakeRepr' object is not subscriptable") is gdb fails to read debug symbols In-Reply-To: <1539601902.93.0.788709270274.issue34989@psf.upfronthosting.co.za> Message-ID: <1539639007.74.0.788709270274.issue34989@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9261 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:39:20 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 15 Oct 2018 21:39:20 +0000 Subject: [issue23554] EchoServerClientProtocol class should be called EchoServerProtocol In-Reply-To: <1425189572.41.0.939168822868.issue23554@psf.upfronthosting.co.za> Message-ID: <1539639560.39.0.788709270274.issue23554@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 43a5bd7b458f0ad2d62b00b033d025689d48d591 by Yury Selivanov (Braden Groom) in branch 'master': bpo-23554: Change echo server example class name from EchoServerClientProtocol to EchoServerProtocol (GH-9859) https://github.com/python/cpython/commit/43a5bd7b458f0ad2d62b00b033d025689d48d591 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:39:28 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Oct 2018 21:39:28 +0000 Subject: [issue23554] EchoServerClientProtocol class should be called EchoServerProtocol In-Reply-To: <1425189572.41.0.939168822868.issue23554@psf.upfronthosting.co.za> Message-ID: <1539639568.16.0.788709270274.issue23554@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9262 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:40:26 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 15 Oct 2018 21:40:26 +0000 Subject: [issue23554] EchoServerClientProtocol class should be called EchoServerProtocol In-Reply-To: <1425189572.41.0.939168822868.issue23554@psf.upfronthosting.co.za> Message-ID: <1539639626.69.0.788709270274.issue23554@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:47:54 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 15 Oct 2018 21:47:54 +0000 Subject: [issue34980] KillPython target doesn't detect 64-bit processes In-Reply-To: <1539501986.24.0.788709270274.issue34980@psf.upfronthosting.co.za> Message-ID: <1539640074.96.0.788709270274.issue34980@psf.upfronthosting.co.za> Change by Jeremy Kloth : ---------- keywords: +patch pull_requests: +9263 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:48:01 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Oct 2018 21:48:01 +0000 Subject: [issue34989] python-gdb.py fails with TypeError("'FakeRepr' object is not subscriptable") is gdb fails to read debug symbols In-Reply-To: <1539601902.93.0.788709270274.issue34989@psf.upfronthosting.co.za> Message-ID: <1539640081.81.0.788709270274.issue34989@psf.upfronthosting.co.za> miss-islington added the comment: New changeset fcea3ddc4a7e756fa8f182789e886ccd3d524484 by Miss Islington (bot) in branch '3.7': bpo-34989: python-gdb.py: fix current_line_num() (GH-9889) https://github.com/python/cpython/commit/fcea3ddc4a7e756fa8f182789e886ccd3d524484 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:50:45 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Oct 2018 21:50:45 +0000 Subject: [issue34989] python-gdb.py fails with TypeError("'FakeRepr' object is not subscriptable") is gdb fails to read debug symbols In-Reply-To: <1539601902.93.0.788709270274.issue34989@psf.upfronthosting.co.za> Message-ID: <1539640245.52.0.788709270274.issue34989@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 71e601eb0857fb03c1dd3c349afb030ef84f95d0 by Miss Islington (bot) in branch '3.6': bpo-34989: python-gdb.py: fix current_line_num() (GH-9889) https://github.com/python/cpython/commit/71e601eb0857fb03c1dd3c349afb030ef84f95d0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:50:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Oct 2018 21:50:59 +0000 Subject: [issue34783] [3.7] segmentation-fault/core dump when try to run non-existing file specified on commandline In-Reply-To: <1537747248.54.0.956365154283.issue34783@psf.upfronthosting.co.za> Message-ID: <1539640259.44.0.788709270274.issue34783@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset ea75187c68b374bb839f1172f310b206044bc3e5 by Victor Stinner in branch 'master': bpo-34783: Fix test_nonexisting_script() (GH-9896) https://github.com/python/cpython/commit/ea75187c68b374bb839f1172f310b206044bc3e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:51:08 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Oct 2018 21:51:08 +0000 Subject: [issue34783] [3.7] segmentation-fault/core dump when try to run non-existing file specified on commandline In-Reply-To: <1537747248.54.0.956365154283.issue34783@psf.upfronthosting.co.za> Message-ID: <1539640268.35.0.788709270274.issue34783@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9264 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:54:48 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Oct 2018 21:54:48 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1539640488.86.0.788709270274.issue34909@psf.upfronthosting.co.za> Ned Deily added the comment: My concern was that it seemed like at least one user had run into this while running 3.7.1rc1 (?), if I understood your comment; if so, I think we should mention in the changelog that the problem was fixed in rc2. In any case, the state of the code for any release is captured as a git tag as described in the devguide. As always, when switching versions, it's important to start with a clean build directory (make distclean or git clean -fdxq may help). git checkout v3.7.0 https://devguide.python.org/devcycle/#development-cycle ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 17:59:55 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Oct 2018 21:59:55 +0000 Subject: [issue23554] EchoServerClientProtocol class should be called EchoServerProtocol In-Reply-To: <1425189572.41.0.939168822868.issue23554@psf.upfronthosting.co.za> Message-ID: <1539640795.21.0.788709270274.issue23554@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 802de12d99d16e621537d454eac942d2f448afee by Miss Islington (bot) in branch '3.7': bpo-23554: Change echo server example class name from EchoServerClientProtocol to EchoServerProtocol (GH-9859) https://github.com/python/cpython/commit/802de12d99d16e621537d454eac942d2f448afee ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 18:06:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Oct 2018 22:06:34 +0000 Subject: [issue34989] python-gdb.py fails with TypeError("'FakeRepr' object is not subscriptable") is gdb fails to read debug symbols In-Reply-To: <1539601902.93.0.788709270274.issue34989@psf.upfronthosting.co.za> Message-ID: <1539641194.69.0.788709270274.issue34989@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset aadb44ee98bc73bc5132acea5848ac6aef1ff8c0 by Victor Stinner in branch '2.7': bpo-34989: python-gdb.py: fix current_line_num() (GH-9889) (GH-9899) https://github.com/python/cpython/commit/aadb44ee98bc73bc5132acea5848ac6aef1ff8c0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 18:09:49 2018 From: report at bugs.python.org (Brett Cannon) Date: Mon, 15 Oct 2018 22:09:49 +0000 Subject: [issue34985] python finds test modules from the wrong directory during PGO build In-Reply-To: <1539571414.02.0.788709270274.issue34985@psf.upfronthosting.co.za> Message-ID: <1539641389.16.0.788709270274.issue34985@psf.upfronthosting.co.za> Brett Cannon added the comment: I think there might be more going on here as the build target as it uses the built Python which has special logic to notice it is being built in a checkout. Did you launch the build from a directory other than the git checkout? Or were you trying to do a build for a different platform? ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 18:14:22 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Oct 2018 22:14:22 +0000 Subject: [issue34890] Support functools.partial in inspect.is*function() checks In-Reply-To: <1538638196.31.0.545547206417.issue34890@psf.upfronthosting.co.za> Message-ID: <1539641662.11.0.788709270274.issue34890@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +9265 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 18:17:29 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Oct 2018 22:17:29 +0000 Subject: [issue34988] Rc2 candidates: "gcc" not found on AIX In-Reply-To: <1539592473.09.0.788709270274.issue34988@psf.upfronthosting.co.za> Message-ID: <1539641849.01.0.788709270274.issue34988@psf.upfronthosting.co.za> Ned Deily added the comment: Do you know if the behavior has changed here for 3.7.1rc2 and 3.6.7rc2 from earlier 3.7.x and 3.6.x releases? I did a quick check of the configure.ac history and did not see any obvious change. It looks like one way to handle this would be be to specify the desired compiler using the CC variable to configure: ./configure CC=gcc Does that work? Looking at the master branch (for the next feature release, 3.8), I see that this area has been changed substantially for 3.8 by the PR 6790 changes for Issue33483. If you haven't already, you might want to test that and see if the behavior is reasonable for AIX. Explicitly specifying CC=gcc should still work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 18:30:09 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Oct 2018 22:30:09 +0000 Subject: [issue34783] [3.7] segmentation-fault/core dump when try to run non-existing file specified on commandline In-Reply-To: <1537747248.54.0.956365154283.issue34783@psf.upfronthosting.co.za> Message-ID: <1539642609.21.0.788709270274.issue34783@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 350aeab8127da551fcd0090230575b7aabff03c9 by Miss Islington (bot) in branch '3.7': bpo-34783: Fix test_nonexisting_script() (GH-9896) https://github.com/python/cpython/commit/350aeab8127da551fcd0090230575b7aabff03c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 18:45:35 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Oct 2018 22:45:35 +0000 Subject: [issue33450] unexpected EPROTOTYPE returned by sendto on MAC OSX In-Reply-To: <1525892699.63.0.682650639539.issue33450@psf.upfronthosting.co.za> Message-ID: <1539643535.83.0.788709270274.issue33450@psf.upfronthosting.co.za> Change by Ned Deily : ---------- components: +asyncio nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 18:58:19 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Oct 2018 22:58:19 +0000 Subject: [issue34805] Explicitly specify `MyClass.__subclasses__()` returns classes in definition order In-Reply-To: <1537942683.07.0.545547206417.issue34805@psf.upfronthosting.co.za> Message-ID: <1539644299.48.0.788709270274.issue34805@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Hi and thank you for the proposal. Could you detail a bit more about your use-case? Thanks ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 19:02:03 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 15 Oct 2018 23:02:03 +0000 Subject: [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1539644523.28.0.788709270274.issue11233@psf.upfronthosting.co.za> Cheryl Sabella added the comment: And thank you, Victor, for reviewing and merging! :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 19:12:09 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Mon, 15 Oct 2018 23:12:09 +0000 Subject: [issue34780] Hang on startup if stdin refers to a pipe with an outstanding concurrent operation on Windows In-Reply-To: <1537732835.69.0.956365154283.issue34780@psf.upfronthosting.co.za> Message-ID: <1539645129.46.0.788709270274.issue34780@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: Ping! Thanks to @eryksun for providing feedback here and for the patch review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 19:14:06 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Oct 2018 23:14:06 +0000 Subject: [issue34158] Documentation of datetime '%z' format code is odd In-Reply-To: <1532036087.85.0.56676864532.issue34158@psf.upfronthosting.co.za> Message-ID: <1539645246.85.0.788709270274.issue34158@psf.upfronthosting.co.za> Ned Deily added the comment: I assume this can now be closed. Thanks, everyone! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 19:18:30 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Oct 2018 23:18:30 +0000 Subject: [issue34565] Launcher does not validate major versions In-Reply-To: <1535918620.54.0.56676864532.issue34565@psf.upfronthosting.co.za> Message-ID: <1539645510.61.0.788709270274.issue34565@psf.upfronthosting.co.za> Ned Deily added the comment: I assume we can close this now. Thanks, all! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 19:30:29 2018 From: report at bugs.python.org (Matt Wilber) Date: Mon, 15 Oct 2018 23:30:29 +0000 Subject: [issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__ Message-ID: <1539646229.14.0.788709270274.issue34995@psf.upfronthosting.co.za> Change by Matt Wilber : ---------- components: Library (Lib) nosy: mwilbz priority: normal severity: normal status: open title: functools.cached_property does not maintain the wrapped method's __isabstractmethod__ versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 19:47:31 2018 From: report at bugs.python.org (Matt Wilber) Date: Mon, 15 Oct 2018 23:47:31 +0000 Subject: [issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__ Message-ID: <1539647251.96.0.788709270274.issue34995@psf.upfronthosting.co.za> Change by Matt Wilber : ---------- keywords: +patch pull_requests: +9266 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 15 22:59:09 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 16 Oct 2018 02:59:09 +0000 Subject: [issue34953] Implement `mmap.mmap.__repr__` In-Reply-To: <1539215332.4.0.788709270274.issue34953@psf.upfronthosting.co.za> Message-ID: <1539658749.96.0.788709270274.issue34953@psf.upfronthosting.co.za> Xiang Zhang added the comment: I don't like the idea to display the contents in the repr, no matter entire or clipped. I think it's not suitable and for contents, just read the object manually. For me, a closed status plus the constructor arguments is a good choice. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 01:16:09 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 16 Oct 2018 05:16:09 +0000 Subject: [issue34953] Implement `mmap.mmap.__repr__` In-Reply-To: <1539215332.4.0.788709270274.issue34953@psf.upfronthosting.co.za> Message-ID: <1539666969.89.0.788709270274.issue34953@psf.upfronthosting.co.za> Eric V. Smith added the comment: I agree with Xiang Zhang: I don't think we should show any content. Especially since basically every file will be truncated, and more often than not the interesting content isn't at the start or end of the file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 01:30:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2018 05:30:28 +0000 Subject: [issue34953] Implement `mmap.mmap.__repr__` In-Reply-To: <1539215332.4.0.788709270274.issue34953@psf.upfronthosting.co.za> Message-ID: <1539667828.53.0.788709270274.issue34953@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think that performing any IO operations in repr() is not a good idea. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 01:45:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2018 05:45:05 +0000 Subject: [issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__ Message-ID: <1539668705.97.0.788709270274.issue34995@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : What is the use case of this? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 01:46:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2018 05:46:40 +0000 Subject: [issue16965] 2to3 should rewrite execfile() to open in 'rb' mode In-Reply-To: <1358187846.57.0.700535378161.issue16965@psf.upfronthosting.co.za> Message-ID: <1539668800.81.0.788709270274.issue16965@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f5e00f490ab5abfcf5e38e58bf969c7b5dcb4818 by Serhiy Storchaka (Zackery Spytz) in branch '2.7': [2.7] bpo-16965: 2to3 now rewrites execfile() to open with rb. (GH-8569) (GH-9890) https://github.com/python/cpython/commit/f5e00f490ab5abfcf5e38e58bf969c7b5dcb4818 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 01:47:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Oct 2018 05:47:18 +0000 Subject: [issue16965] 2to3 should rewrite execfile() to open in 'rb' mode In-Reply-To: <1358187846.57.0.700535378161.issue16965@psf.upfronthosting.co.za> Message-ID: <1539668838.53.0.788709270274.issue16965@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 Oct 16 02:01:59 2018 From: report at bugs.python.org (Matt Wilber) Date: Tue, 16 Oct 2018 06:01:59 +0000 Subject: [issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__ In-Reply-To: <1539668705.97.0.788709270274.issue34995@psf.upfronthosting.co.za> Message-ID: <1539669719.24.0.788709270274.issue34995@psf.upfronthosting.co.za> Matt Wilber added the comment: This allows a developer to add a @cached_property to a method with the @abstractmethod decorator, without breaking the check for abstract methods on ABC instantiation. That is, if you tried to instantiate an ABC with a method that had a method decorated with @cached_property and @abstractmethod now, it would succeed, instead of throwing a TypeError as you might expect. As for why you'd put @cached_property on an abstract method, it's useful for IDEs and type checkers to know that the method is implemented with a property, and that users of the method (and its implementations) can reasonably call it multiple times and know caching is occurring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 02:44:50 2018 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 16 Oct 2018 06:44:50 +0000 Subject: [issue34844] logging.Formatter enhancement - Checking on style and fmt fields In-Reply-To: <1538252230.83.0.545547206417.issue34844@psf.upfronthosting.co.za> Message-ID: <1539672290.31.0.788709270274.issue34844@psf.upfronthosting.co.za> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 02:46:43 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Oct 2018 06:46:43 +0000 Subject: [issue34967] Sphinx is deprecating add_description_unit In-Reply-To: <1539363976.13.0.788709270274.issue34967@psf.upfronthosting.co.za> Message-ID: <1539672403.96.0.788709270274.issue34967@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 514bbfc7fc4dcb868d4364632ad14c0533af154f by Miss Islington (bot) in branch '3.7': bpo-34967: Sphinx is deprecating add_description_unit, use add_object_type (GH-9827) https://github.com/python/cpython/commit/514bbfc7fc4dcb868d4364632ad14c0533af154f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 02:47:10 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Oct 2018 06:47:10 +0000 Subject: [issue34967] Sphinx is deprecating add_description_unit In-Reply-To: <1539363976.13.0.788709270274.issue34967@psf.upfronthosting.co.za> Message-ID: <1539672430.62.0.788709270274.issue34967@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e2c3bc7e79c3506609845f7f62ba102e6c7e9993 by Miss Islington (bot) in branch '3.6': bpo-34967: Sphinx is deprecating add_description_unit, use add_object_type (GH-9827) https://github.com/python/cpython/commit/e2c3bc7e79c3506609845f7f62ba102e6c7e9993 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 02:47:29 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Oct 2018 06:47:29 +0000 Subject: [issue34967] Sphinx is deprecating add_description_unit In-Reply-To: <1539363976.13.0.788709270274.issue34967@psf.upfronthosting.co.za> Message-ID: <1539672449.79.0.788709270274.issue34967@psf.upfronthosting.co.za> miss-islington added the comment: New changeset f82c9f1e1af8d35056a6961281d72467b4c46b8d by Miss Islington (bot) in branch '2.7': bpo-34967: Sphinx is deprecating add_description_unit, use add_object_type (GH-9827) https://github.com/python/cpython/commit/f82c9f1e1af8d35056a6961281d72467b4c46b8d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 02:47:49 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 16 Oct 2018 06:47:49 +0000 Subject: [issue34967] Sphinx is deprecating add_description_unit In-Reply-To: <1539363976.13.0.788709270274.issue34967@psf.upfronthosting.co.za> Message-ID: <1539672469.63.0.788709270274.issue34967@psf.upfronthosting.co.za> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 03:31:03 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Oct 2018 07:31:03 +0000 Subject: [issue34521] Multiple tests (test_socket, test_multiprocessing_*) fail due to incorrect recvmsg(2) buffer lengths, causing failures on FreeBSD CURRENT In-Reply-To: <1535389978.32.0.56676864532.issue34521@psf.upfronthosting.co.za> Message-ID: <1539675063.58.0.788709270274.issue34521@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ae011e00189d9083dd84c357718264e24fe77314 by Miss Islington (bot) in branch '3.6': bpo-34521: Add NEWS entry for changes in GH-9613 (GH-9850) https://github.com/python/cpython/commit/ae011e00189d9083dd84c357718264e24fe77314 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 04:38:33 2018 From: report at bugs.python.org (=?utf-8?q?Pekka_Kl=C3=A4rck?=) Date: Tue, 16 Oct 2018 08:38:33 +0000 Subject: [issue34805] Explicitly specify `MyClass.__subclasses__()` returns classes in definition order In-Reply-To: <1537942683.07.0.545547206417.issue34805@psf.upfronthosting.co.za> Message-ID: <1539679113.26.0.788709270274.issue34805@psf.upfronthosting.co.za> Pekka Kl?rck added the comment: My use case was implementing conversion of strings to different objects based on type information got from function arguments. Initially I had a converter class with methods for each conversion (e.g. `_convert_bool`, `_convert_int`) but this class got so big that I decided to split each converter into a separate class (e.g. `BooleanConverter`, `IntegerConverter`) with a common base class. The base class also has a `converter_for` classmethod that is a factory that returns a concrete converter for a certain type. For the factory to be able to return a correct converter, it obviously needs to know what converters exist and what types they handle. My first idea was to simply go through `cls.__subclasses__()` and return the first one that handles the specified type, but because order matters for us this doesn't work. The reason order matters is that we handle both Boolean and integer types, and `bool` being a subclass of `int` means we need to handle the former first. Because I couldn't use `cls.__subclasses__()`, I needed to implement a custom way for the converters to register themselves. That wasn't particularly complicated but some extra work anyway. The code I wrote happens to be open source and visible at [1] if you are interested to look it more closely. The `@TypeConverter.register` stuff could have been avoided is `cls.__subclasses__()` were ordered. It could also be removed once we drop Python 3.5 support *if* order is guaranteed to be preserved going forward. [1] https://github.com/robotframework/robotframework/blob/master/src/robot/running/arguments/typeconverters.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 05:15:53 2018 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Oct 2018 09:15:53 +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: <1539681353.85.0.788709270274.issue28015@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +9267 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 05:36:10 2018 From: report at bugs.python.org (serge-sans-paille) Date: Tue, 16 Oct 2018 09:36:10 +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: <1539682570.89.0.788709270274.issue28015@psf.upfronthosting.co.za> serge-sans-paille added the comment: Looks like a package dependency issue: installing ``llvm-dev`` package should fix the problem. Or in that particular case ``llvm-3.8-dev``. ---------- nosy: +serge-sans-paille _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 05:36:49 2018 From: report at bugs.python.org (hongweipeng) Date: Tue, 16 Oct 2018 09:36:49 +0000 Subject: [issue31218] del expects __delitem__ if __setitem__ is defined In-Reply-To: <1502880498.02.0.663608848315.issue31218@psf.upfronthosting.co.za> Message-ID: <1539682609.95.0.788709270274.issue31218@psf.upfronthosting.co.za> Change by hongweipeng : ---------- nosy: +hongweipeng _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 05:41:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Oct 2018 09:41:56 +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: <1539682916.31.0.788709270274.issue28015@psf.upfronthosting.co.za> STINNER Victor added the comment: I confirm that it's currently broken. Test on Fedora 28, clang version 6.0.1 (tags/RELEASE_601/final): $ ./configure --with-pydebug CC=clang --with-lto && make (...) checking for x64 gcc inline assembler... yes checking whether float word ordering is bigendian... unknown configure: error: Unknown float word ordering. You need to manually preset ax_cv_c_float_words_bigendian=no (or yes) according to your system. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 05:47:56 2018 From: report at bugs.python.org (Raz Manor) Date: Tue, 16 Oct 2018 09:47:56 +0000 Subject: [issue34996] Add name to process and thread pool Message-ID: <1539683276.05.0.788709270274.issue34996@psf.upfronthosting.co.za> Change by Raz Manor : ---------- components: Library (Lib) nosy: Raz Manor priority: normal severity: normal status: open title: Add name to process and thread pool type: enhancement versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 05:57:12 2018 From: report at bugs.python.org (Raz Manor) Date: Tue, 16 Oct 2018 09:57:12 +0000 Subject: [issue34996] Add name to process and thread pool Message-ID: <1539683832.58.0.788709270274.issue34996@psf.upfronthosting.co.za> Change by Raz Manor : ---------- keywords: +patch pull_requests: +9268 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 06:38:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Oct 2018 10:38:22 +0000 Subject: [issue34989] python-gdb.py fails with TypeError("'FakeRepr' object is not subscriptable") is gdb fails to read debug symbols In-Reply-To: <1539601902.93.0.788709270274.issue34989@psf.upfronthosting.co.za> Message-ID: <1539686302.04.0.788709270274.issue34989@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks ?ukasz Langa for the review! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 06:40:43 2018 From: report at bugs.python.org (Raz Manor) Date: Tue, 16 Oct 2018 10:40:43 +0000 Subject: [issue34996] Add name to process and thread pool Message-ID: <1539686443.16.0.788709270274.issue34996@psf.upfronthosting.co.za> New submission from Raz Manor : Add a human friendly names to the threads opened by multiprocessing.pool.Pool and multiprocessing.pool.ThreadPool objects. Sample usage: ThreadPool(name="ClientsPool", processes=8) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 07:30:26 2018 From: report at bugs.python.org (Michael Felt) Date: Tue, 16 Oct 2018 11:30:26 +0000 Subject: [issue34988] Rc2 candidates: "gcc" not found on AIX In-Reply-To: <1539592473.09.0.788709270274.issue34988@psf.upfronthosting.co.za> Message-ID: <1539689426.95.0.788709270274.issue34988@psf.upfronthosting.co.za> Michael Felt added the comment: I'll compare with the 3.7.0. As I did not have access to gcc then, would have never seen it. Yesterday I used --with-gcc, today I'll use CC=gcc and update after I know more. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 07:46:56 2018 From: report at bugs.python.org (Michael Felt) Date: Tue, 16 Oct 2018 11:46:56 +0000 Subject: [issue34988] Rc2 candidates: "gcc" not found on AIX In-Reply-To: <1539592473.09.0.788709270274.issue34988@psf.upfronthosting.co.za> Message-ID: <1539690416.74.0.788709270274.issue34988@psf.upfronthosting.co.za> Michael Felt added the comment: using CC=gcc ./configure works fine And, this does not appear to be a regression: HEAD is now at 1bf9cc5 3.7.0 final $ cd ../python3-3.7.0 $ ./configure checking for git... found checking build system type... powerpc-ibm-aix7.2.0.0 checking host system type... powerpc-ibm-aix7.2.0.0 checking for python3.7... no checking for python3... python3 checking for --enable-universalsdk... no checking for --with-universal-archs... no checking MACHDEP... checking for --without-gcc... checking for --with-icc... no checking for gcc... xlc_r checking whether the C compiler works... no configure: error: in `/home/aixtools/python/git/python3-3.7.0': configure: error: C compiler cannot create executables See `config.log' for more details ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 08:13:57 2018 From: report at bugs.python.org (serge-sans-paille) Date: Tue, 16 Oct 2018 12:13:57 +0000 Subject: [issue34814] makesetup: must link C extensions to libpython when compiled in shared mode In-Reply-To: <1537980934.49.0.545547206417.issue34814@psf.upfronthosting.co.za> Message-ID: <1539692037.3.0.788709270274.issue34814@psf.upfronthosting.co.za> serge-sans-paille added the comment: Not an expert of Python build, but I've been creating a few ? reverse engineer challenge ? where I had to ship modified version of the interpreter, so played with it a bit. I agree consistency is nice to reason about. It looks better to me to *not* link with libpython.so directly. This is probably better as this does not make ``libpython`` an install requirement (e.g. when one wants to embed a minimal version of python) As a short check, I ran ``` nm libpython3.so | grep ' [tT] ' | cut -d ' ' -f 3 | while read line; do nm python | grep ' [tT] ' | cut -d ' ' -f 3 | grep $line >/dev/null || { echo "bad: $line"; break; }; done ``` and everything looks fine, so all symbols should already be in the interpreter. I've also checked whether that's an issue or not for user-defined native extensions and everything runs smoothly without the explicit dep. So the argument would be: why adding this dep when it's not needed? ---------- nosy: +serge-sans-paille _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 08:15:11 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 16 Oct 2018 12:15:11 +0000 Subject: [issue24307] 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: <1539692111.77.0.788709270274.issue24307@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +9269 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 08:46:44 2018 From: report at bugs.python.org (Ammar Askar) Date: Tue, 16 Oct 2018 12:46:44 +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: <1539694004.32.0.788709270274.issue23867@psf.upfronthosting.co.za> Change by Ammar Askar : ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 08:56:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Oct 2018 12:56:56 +0000 Subject: [issue34814] makesetup: must link C extensions to libpython when compiled in shared mode In-Reply-To: <1537980934.49.0.545547206417.issue34814@psf.upfronthosting.co.za> Message-ID: <1539694616.94.0.788709270274.issue34814@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9270 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 08:57:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Oct 2018 12:57:36 +0000 Subject: [issue34814] makesetup: must link C extensions to libpython when compiled in shared mode In-Reply-To: <1537980934.49.0.545547206417.issue34814@psf.upfronthosting.co.za> Message-ID: <1539694656.03.0.788709270274.issue34814@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote the PR 9912 to ensure that C extensions are never linked to libpython. I tested my change using: git clean -fdx ./configure --with-pydebug --enable-shared make for SO in build/lib.*/*.so Modules/*.so; do ldd $SO|grep libpython; done # grep must not display anything I tested 3 configurations on my Fedora 28 (Linux): * ./configure --with-pydebug --enable-shared: NEVER linked * Modified Modules/Setup (*) with ./configure --with-pydebug --enable-shared: NEVER linked * ./configure --with-pydebug: NEVER linked (well, it doesn't use libpython, but I wanted to test all cases :-)) (*) I modified Modules/Setup to compile 37 C extensions as shared libraries using Makefile. Extract of Modules/Setup: errno errnomodule.c # posix (UNIX) errno values pwd pwdmodule.c # this is needed to find out the user's home dir _sre _sre.c # Fredrik Lundh's new regular expressions _codecs _codecsmodule.c # access to the builtin codecs and codec registry _weakref _weakref.c # weak references _operator _operator.c # operator.add() and similar goodies _collections _collectionsmodule.c # Container types _abc _abc.c # Abstract base classes itertools itertoolsmodule.c # Functions creating iterators for efficient looping atexit atexitmodule.c # Register functions to be run at interpreter-shutdown _stat _stat.c # stat.h interface _locale _localemodule.c # -lintl faulthandler faulthandler.c _tracemalloc _tracemalloc.c hashtable.c _symtable symtablemodule.c readline readline.c -lreadline -ltermcap array arraymodule.c # array objects cmath cmathmodule.c _math.c # -lm # complex math library functions math mathmodule.c _math.c # -lm # math library functions, e.g. sin() _contextvars _contextvarsmodule.c # Context Variables _struct _struct.c # binary structure packing/unpacking _weakref _weakref.c # basic weak reference support _testcapi _testcapimodule.c # Python C API test module _random _randommodule.c # Random number generator _pickle _pickle.c # pickle accelerator _datetime _datetimemodule.c # datetime accelerator _bisect _bisectmodule.c # Bisection algorithms _heapq _heapqmodule.c # Heap queue algorithm _asyncio _asynciomodule.c # Fast asyncio Future unicodedata unicodedata.c # static Unicode character database fcntl fcntlmodule.c # fcntl(2) and ioctl(2) spwd spwdmodule.c # spwd(3) grp grpmodule.c # grp(3) select selectmodule.c # select(2); not on ancient System V mmap mmapmodule.c _csv _csv.c _socket socketmodule.c _crypt _cryptmodule.c # -lcrypt # crypt(3); needs -lcrypt on some systems termios termios.c # Steen Lumholt's termios module resource resource.c # Jeremy Hylton's rlimit interface _posixsubprocess _posixsubprocess.c # POSIX subprocess module helper audioop audioop.c # Operations on audio samples _md5 md5module.c _sha1 sha1module.c _sha256 sha256module.c _sha512 sha512module.c syslog syslogmodule.c # syslog daemon interface _gdbm _gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm binascii binascii.c parser parsermodule.c zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz xxsubtype xxsubtype.c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 09:07:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Oct 2018 13:07:49 +0000 Subject: [issue34811] test_gdb fails with latest gdb In-Reply-To: <1537972642.29.0.545547206417.issue34811@psf.upfronthosting.co.za> Message-ID: <1539695269.91.0.788709270274.issue34811@psf.upfronthosting.co.za> STINNER Victor added the comment: On the master branch of Python, test_gdb fails on Fedora Rawhide, but it's not a Python bug, but a gdb bug, so I close the issue: https://bugzilla.redhat.com/show_bug.cgi?id=1638798 ---------- resolution: -> third party status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 09:09:35 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Oct 2018 13:09:35 +0000 Subject: [issue34997] test.test_logging.ConfigDictTest.test_out_of_order fails in x86 Gentoo Refleaks 3.x Message-ID: <1539695375.29.0.788709270274.issue34997@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : When running the test_logging with the huntleaks option (-R), test_out_of_order fails: ====================================================================== FAIL: test_out_of_order (test.test_logging.ConfigDictTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/test_logging.py", line 3278, in test_out_of_order self.assertRaises(ValueError, self.apply_config, self.out_of_order) AssertionError: ValueError not raised by apply_config ---------------------------------------------------------------------- https://buildbot.python.org/all/#/builders/1/builds/377/steps/4/logs/stdio ---------- assignee: pablogsal components: Tests messages: 327825 nosy: pablogsal priority: normal severity: normal status: open title: test.test_logging.ConfigDictTest.test_out_of_order fails in x86 Gentoo Refleaks 3.x type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 09:14:04 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Oct 2018 13:14:04 +0000 Subject: [issue34997] test.test_logging.ConfigDictTest.test_out_of_order fails in x86 Gentoo Refleaks 3.x In-Reply-To: <1539695375.29.0.788709270274.issue34997@psf.upfronthosting.co.za> Message-ID: <1539695644.07.0.788709270274.issue34997@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: I'm working on this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 09:22:31 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Oct 2018 13:22:31 +0000 Subject: [issue34997] test.test_logging.ConfigDictTest.test_out_of_order fails in x86 Gentoo Refleaks 3.x In-Reply-To: <1539695375.29.0.788709270274.issue34997@psf.upfronthosting.co.za> Message-ID: <1539696151.95.0.788709270274.issue34997@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Bisecting shows that 18fb1fb943b7dbd7f8a76017ee2a67ef13effb85 is the possible culprit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 09:29:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Oct 2018 13:29:09 +0000 Subject: [issue34022] 6 tests fail using SOURCE_DATE_EPOCH env var In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1539696549.39.0.788709270274.issue34022@psf.upfronthosting.co.za> STINNER Victor added the comment: There are still tests which fail when SOURCE_DATE_EPOCH env var is defined: $ SOURCE_DATE_EPOCH=0 ./python -m test -j0 -r (...) 3 tests failed: test_cmd_line_script test_multiprocessing_main_handling test_runpy (...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 09:51:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Oct 2018 13:51:37 +0000 Subject: [issue34997] test.test_logging.ConfigDictTest.test_out_of_order fails in x86 Gentoo Refleaks 3.x In-Reply-To: <1539695375.29.0.788709270274.issue34997@psf.upfronthosting.co.za> Message-ID: <1539697897.47.0.788709270274.issue34997@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 09:53:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Oct 2018 13:53:02 +0000 Subject: [issue34997] test.test_logging.ConfigDictTest.test_out_of_order fails in x86 Gentoo Refleaks 3.x In-Reply-To: <1539695375.29.0.788709270274.issue34997@psf.upfronthosting.co.za> Message-ID: <1539697982.22.0.788709270274.issue34997@psf.upfronthosting.co.za> STINNER Victor added the comment: I suggest to revert the change if you fails to fix it quickly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 09:56:38 2018 From: report at bugs.python.org (Alan) Date: Tue, 16 Oct 2018 13:56:38 +0000 Subject: [issue34991] variable type list [] referential integrity data loss In-Reply-To: <1539606462.61.0.788709270274.issue34991@psf.upfronthosting.co.za> Message-ID: <1539698198.87.0.788709270274.issue34991@psf.upfronthosting.co.za> Alan added the comment: Thank you for your feedback steven.daprano and eric.smith. My first experience with a computer was 22 years ago and started as a computer science student 13 years ago. I began in the Visual Basic programming community in 2008, so I apologize as I am new to the Python community. To summarize, the variable list[] should equal to A, but as the code runs through loops the list[] is mutable (perhaps too literally) into A', A'', A''', etc. There is no immediate solution to this issue, but an alternative to this issue would be to use variable type dictionary {}. A more permanent resolution would probably require a conference presentation and/or publication. Thanks again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 09:57:09 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Oct 2018 13:57:09 +0000 Subject: [issue34997] test.test_logging.ConfigDictTest.test_out_of_order fails in x86 Gentoo Refleaks 3.x In-Reply-To: <1539695375.29.0.788709270274.issue34997@psf.upfronthosting.co.za> Message-ID: <1539698229.31.0.788709270274.issue34997@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +9271 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 10:01:32 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Oct 2018 14:01:32 +0000 Subject: [issue34997] test.test_logging.ConfigDictTest.test_out_of_order fails in x86 Gentoo Refleaks 3.x In-Reply-To: <1539695375.29.0.788709270274.issue34997@psf.upfronthosting.co.za> Message-ID: <1539698492.63.0.788709270274.issue34997@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: I opened PR 9913 to fix it ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 10:05:07 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 16 Oct 2018 14:05:07 +0000 Subject: [issue34930] sha1module: Switch sha1 implementation to sha1dc/hardened sha1 In-Reply-To: <1538998622.72.0.545547206417.issue34930@psf.upfronthosting.co.za> Message-ID: <1539698707.83.0.788709270274.issue34930@psf.upfronthosting.co.za> Christian Heimes added the comment: I wouldn't call SHA1 a secure hash function any more. SHA1DC is both an incompatible implementation and a bandaid for legacy applications that can't easily update to a proper hashing algorithm. Also it's rather pointless to update our SHA1 implementation since OpenSSL still uses the standardized SHA1 implementation. CPython prefers OpenSSL's implementation because it's much, much faster than libtomcrypt's implementation. I need to study SHA1DC first and get some advice before I can make an educated statement. But I'm leaning towards -1 to even support SHA1DC in the standard library, because I don't want to promote SHA1 any more. Applications should move to SHA2, SHA3 and blake2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 10:10:41 2018 From: report at bugs.python.org (thautwarm) Date: Tue, 16 Oct 2018 14:10:41 +0000 Subject: [issue34953] Implement `mmap.mmap.__repr__` In-Reply-To: <1539215332.4.0.788709270274.issue34953@psf.upfronthosting.co.za> Message-ID: <1539699041.3.0.788709270274.issue34953@psf.upfronthosting.co.za> thautwarm added the comment: I think it depends on the use case. If `repr` wouldn't be invoked except debugging,some IO operations might not be that bad. I'm to make some adjustments to avoid displaying the contents if nothing evidence that IO operations is not bad. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 10:18:03 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Oct 2018 14:18:03 +0000 Subject: [issue34997] test.test_logging.ConfigDictTest.test_out_of_order fails in x86 Gentoo Refleaks 3.x In-Reply-To: <1539695375.29.0.788709270274.issue34997@psf.upfronthosting.co.za> Message-ID: <1539699483.38.0.788709270274.issue34997@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset 137b0632dccb992ca11e9445142fb33a29c33a51 by Pablo Galindo in branch 'master': bpo-34997: Fix test_logging.ConfigDictTest.test_out_of_order (GH-9913) https://github.com/python/cpython/commit/137b0632dccb992ca11e9445142fb33a29c33a51 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 10:18:22 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Oct 2018 14:18:22 +0000 Subject: [issue34997] test.test_logging.ConfigDictTest.test_out_of_order fails in x86 Gentoo Refleaks 3.x In-Reply-To: <1539695375.29.0.788709270274.issue34997@psf.upfronthosting.co.za> Message-ID: <1539699502.29.0.788709270274.issue34997@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 10:42:29 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 16 Oct 2018 14:42:29 +0000 Subject: [issue34930] sha1module: Switch sha1 implementation to sha1dc/hardened sha1 In-Reply-To: <1538998622.72.0.545547206417.issue34930@psf.upfronthosting.co.za> Message-ID: <1539700949.28.0.788709270274.issue34930@psf.upfronthosting.co.za> Christian Heimes added the comment: I talked to some experts (Alex Gaynor, Simo Sorce). They all share my sentiment and are against SHA1DC. The algorithm is just a poor bandaid for a gapping security issue. Everybody was strongly against replacing SHA1 with SHA1DC by default, because it's an incompatible implementation. SHA1DC is only able to counteract some of the known flaws, too. Even git doesn't replace SHA1 with SHA1DC directly. Instead it turns a detected collision into a fatal error [1]. I'm -1 to add it to the Python standard library. Alex pointed out that the lack of SHA1DC in OpenSSL is a clear sign that it's not generally useful. SHA1DC may be useful for few applications like git. In general it's not a fool-proof safety net for SHA1. [1] https://github.com/git/git/blob/master/sha1dc_git.c#L17-L23 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 10:55:49 2018 From: report at bugs.python.org (Antoine Pietri) Date: Tue, 16 Oct 2018 14:55:49 +0000 Subject: [issue34930] sha1module: Switch sha1 implementation to sha1dc/hardened sha1 In-Reply-To: <1538998622.72.0.545547206417.issue34930@psf.upfronthosting.co.za> Message-ID: <1539701749.74.0.788709270274.issue34930@psf.upfronthosting.co.za> Antoine Pietri added the comment: Thanks, those arguments are convincing. I guess for applications that really can't move to a more secure hash, it would be better for them to rely on third-party libraries that implement the "band-aid". I'm closing this for now. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 10:56:59 2018 From: report at bugs.python.org (P.C. Kroon) Date: Tue, 16 Oct 2018 14:56:59 +0000 Subject: [issue34998] Logging formatter validation breaks backward ducktyping Message-ID: <1539701819.12.0.788709270274.issue34998@psf.upfronthosting.co.za> New submission from P.C. Kroon : Hi all! This concerns commit 18fb1fb943b7dbd7f8a76017ee2a67ef13effb85 (also known as bpo-34844 or GH-9703). For testing purposes I made something that transparently ducktypes being a string, except that it counts how often its `format` and `__mod__` methods are called. The validation mechanic now tries to pass my object to `self.validation_pattern.search` (line 441), which (of course) doesn't work. Due to backwards compatability I can't pass a validate keyword. To resolve this, I'd like the default `validate` option to be set to `False` instead of `True`. If the judgement is that I'm doing really weird things and should make an actual string subclass I'll also accept that and/or find an alternative solution. Cheers, Peter ---------- messages: 327837 nosy: P.C. Kroon priority: normal severity: normal status: open title: Logging formatter validation breaks backward ducktyping type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 11:22:37 2018 From: report at bugs.python.org (sebix) Date: Tue, 16 Oct 2018 15:22:37 +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: <1539703357.61.0.788709270274.issue9338@psf.upfronthosting.co.za> Change by sebix : ---------- nosy: +sebix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 11:39:27 2018 From: report at bugs.python.org (sebix) Date: Tue, 16 Oct 2018 15:39:27 +0000 Subject: [issue34999] Different behavior of copied loggers in 3.7 Message-ID: <1539704367.04.0.788709270274.issue34999@psf.upfronthosting.co.za> New submission from sebix : For the unittests of project I mock the function returning the logger. The code to tests can re-initialize the logger because of updated configuration (It's a deamon), so it needs to do that correctly and I test if it works. By mocking the function returning I can always control the loggers's and parameters and always return a copy of the same logger. This worked until 3.6 but does no longer work in 3.7 (I tested 3.7.1rc2). Why do I copy it? Because if the tested program sets (for example) a different log level, that would affect my "master copy". I created a minimal example splitted into two files, the code to test and the test itself. The tested code: ------ def log(log_level): pass class Bot(object): def __init__(self): self.logger = None self.__init_logger(logging_level='INFO') self.logger.info('Initialized') self.logger.handlers = [] # remove all existing handlers self.__init_logger(logging_level='DEBUG') self.logger.debug('test') self.logger.info("Bot stopped.") def __init_logger(self, logging_level): self.logger = log(log_level=logging_level) ----- And the test: ----- import copy import io import logging import unittest.mock as mock from intelmq.bot import Bot bot_id = 'test-bot' log_stream = io.StringIO() logger = logging.getLogger(bot_id) logger.setLevel("INFO") console_formatter = logging.Formatter('%(levelname)s - %(message)s') console_handler = logging.StreamHandler(log_stream) console_handler.setFormatter(console_formatter) logger.addHandler(console_handler) def mocked_log(log_level): # Return a copy as the bot may modify the logger and we should always return the intial logger logger_new = copy.copy(logger) logger_new.setLevel(log_level) return logger_new with mock.patch('intelmq.bot.log', mocked_log): bot = Bot() loglines_buffer = log_stream.getvalue() loglines = loglines_buffer.splitlines() print(loglines_buffer) print("INFO - Initialized" in loglines[0]) print('DEBUG - test' in loglines_buffer) print("INFO - Bot stopped." in loglines[-1]) ----- Adapt the import of the "Bot" if you try to run it. In Python 3.4-3.6 it gives: ----- INFO - Initialized DEBUG - test INFO - Bot stopped. True True True ----- And in Python 3.7: ------- INFO - Initialized True False False ------- The minimal code is also here: https://github.com/wagner-certat/intelmq/tree/minimal-1269 ---------- components: Library (Lib) messages: 327838 nosy: sebix priority: normal severity: normal status: open title: Different behavior of copied loggers in 3.7 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 11:49:11 2018 From: report at bugs.python.org (John Andersen) Date: Tue, 16 Oct 2018 15:49:11 +0000 Subject: [issue35000] aexit called after loop close Message-ID: <1539704951.84.0.788709270274.issue35000@psf.upfronthosting.co.za> New submission from John Andersen : aexit called after loop close on death by signal. This seems odd, the __aexit__ method must be running in a loop because it is an async function. However if one calls shield then it dies. ''' $ python3.7 test.py Hello! # Ctrl-C before 5 seconds is up $ python3.7 test.py ^CException ignored in: Traceback (most recent call last): File "test.py", line 18, in func await asyncio.sleep(5) File "test.py", line 14, in __aexit__ await asyncio.shield(self.other()) File "/usr/lib/python3.7/asyncio/tasks.py", line 765, in shield inner = ensure_future(arg, loop=loop) File "/usr/lib/python3.7/asyncio/tasks.py", line 577, in ensure_future task = loop.create_task(coro_or_future) File "/usr/lib/python3.7/asyncio/base_events.py", line 384, in create_task self._check_closed() File "/usr/lib/python3.7/asyncio/base_events.py", line 461, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed sys:1: RuntimeWarning: coroutine 'Test.other' was never awaited ''' import os import signal import asyncio class Test(object): async def other(self): print('Hello!') async def __aenter__(self): pass async def __aexit__(self, a, b, c): await asyncio.shield(self.other()) async def func(): async with Test(): await asyncio.sleep(5) def main(): loop = asyncio.get_event_loop() try: loop.run_until_complete(func()) except KeyboardInterrupt: pass loop.run_until_complete(loop.shutdown_asyncgens()) loop.close() if __name__ == '__main__': main() ---------- components: asyncio messages: 327839 nosy: asvetlov, pdxjohnny, yselivanov priority: normal severity: normal status: open title: aexit called after loop close versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 11:49:58 2018 From: report at bugs.python.org (John Andersen) Date: Tue, 16 Oct 2018 15:49:58 +0000 Subject: [issue35000] aexit called after loop close In-Reply-To: <1539704951.84.0.788709270274.issue35000@psf.upfronthosting.co.za> Message-ID: <1539704998.36.0.788709270274.issue35000@psf.upfronthosting.co.za> Change by John Andersen : Added file: https://bugs.python.org/file47872/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 13:01:43 2018 From: report at bugs.python.org (sebix) Date: Tue, 16 Oct 2018 17:01:43 +0000 Subject: [issue9625] argparse: Problem with defaults for variable nargs when using choices In-Reply-To: <1282036744.37.0.964764969496.issue9625@psf.upfronthosting.co.za> Message-ID: <1539709303.45.0.788709270274.issue9625@psf.upfronthosting.co.za> Change by sebix : ---------- nosy: +sebix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 13:01:51 2018 From: report at bugs.python.org (sebix) Date: Tue, 16 Oct 2018 17:01:51 +0000 Subject: [issue16878] argparse: positional args with nargs='*' defaults to [] In-Reply-To: <1357465299.57.0.35284685768.issue16878@psf.upfronthosting.co.za> Message-ID: <1539709311.65.0.788709270274.issue16878@psf.upfronthosting.co.za> Change by sebix : ---------- nosy: +sebix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 13:02:08 2018 From: report at bugs.python.org (sebix) Date: Tue, 16 Oct 2018 17:02:08 +0000 Subject: [issue16468] argparse only supports iterable choices In-Reply-To: <1352867539.71.0.970228461518.issue16468@psf.upfronthosting.co.za> Message-ID: <1539709328.6.0.788709270274.issue16468@psf.upfronthosting.co.za> Change by sebix : ---------- nosy: +sebix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 13:51:50 2018 From: report at bugs.python.org (Jonathan Gossage) Date: Tue, 16 Oct 2018 17:51:50 +0000 Subject: [issue9453] pulldom.SAX2DOM Doesn't support processing instructions before the root element In-Reply-To: <1280746158.2.0.563581992561.issue9453@psf.upfronthosting.co.za> Message-ID: <1539712310.35.0.788709270274.issue9453@psf.upfronthosting.co.za> Change by Jonathan Gossage : ---------- keywords: +patch pull_requests: +9272 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 14:39:56 2018 From: report at bugs.python.org (thautwarm) Date: Tue, 16 Oct 2018 18:39:56 +0000 Subject: [issue35001] ImportFrom level cannot be optional Message-ID: <1539715196.88.0.788709270274.issue35001@psf.upfronthosting.co.za> New submission from thautwarm : This issue is found from a type hinting problem: ``` class ImportFrom(stmt): class ImportFrom(stmt): module = ... # type: Optional[_identifier] module = ... # type: Optional[_identifier] names = ... # type: typing.List[alias] names = ... # type: typing.List[alias] level = ... # type: Optional[int] ``` As we can see that `level` here is optional, and it's strange. I tried `ast.parse` on both Python 3.5/3.6, and found that None of `from a import *`, `from .a import *`, `from ..a import *` and other regular cases result into an ImportFrom AST whose `level` is None. Then I went to Python-asdl: https://github.com/python/cpython/blob/137b0632dccb992ca11e9445142fb33a29c33a51/Parser/Python.asdl#L44 and got ImportFrom(identifier? module, alias* names, int? level) It seems like a bug. To validate it, I went to https://github.com/python/cpython/blob/97cf0828727ac2a269c89c5aa09570a69a22c83c/Python/ast.c#L3311 and got static stmt_ty ast_for_import_stmt(struct compiling *c, const node *n){ int idx, ndots = 0; ... return ImportFrom(modname, aliases, ndots, lineno, col_offset, c->c_arena); ... } It seems that no reason for `level` being None. If it's really a bug, IMO it could be also an example that type hinting helps to error detection :-) ---------- assignee: docs at python components: Documentation messages: 327840 nosy: docs at python, thautwarm priority: normal severity: normal status: open title: ImportFrom level cannot be optional type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 15:08:05 2018 From: report at bugs.python.org (Srinivas Reddy T) Date: Tue, 16 Oct 2018 19:08:05 +0000 Subject: [issue33947] Dataclasses can raise RecursionError in __repr__ In-Reply-To: <1529758726.17.0.56676864532.issue33947@psf.upfronthosting.co.za> Message-ID: <1539716885.15.0.788709270274.issue33947@psf.upfronthosting.co.za> Change by Srinivas Reddy T : ---------- keywords: +patch pull_requests: +9273 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 15:35:53 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 16 Oct 2018 19:35:53 +0000 Subject: [issue34988] Rc2 candidates: "gcc" not found on AIX In-Reply-To: <1539592473.09.0.788709270274.issue34988@psf.upfronthosting.co.za> Message-ID: <1539718553.73.0.788709270274.issue34988@psf.upfronthosting.co.za> Ned Deily added the comment: I'm glad it works. Any object to closing this issue then? ---------- resolution: -> not a bug stage: -> resolved status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 15:39:02 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 16 Oct 2018 19:39:02 +0000 Subject: [issue34999] Different behavior of copied loggers in 3.7 In-Reply-To: <1539704367.04.0.788709270274.issue34999@psf.upfronthosting.co.za> Message-ID: <1539718742.01.0.788709270274.issue34999@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 16:23:37 2018 From: report at bugs.python.org (Luna Chen) Date: Tue, 16 Oct 2018 20:23:37 +0000 Subject: [issue35002] Potential bug in ConfigParser.read() in python3.6, before os.Pathlike was introduced Message-ID: <1539721417.19.0.788709270274.issue35002@psf.upfronthosting.co.za> New submission from Luna Chen : In `configparser.ConfigParser.read()`, it allows us to pass in either a single filepath or a list of filepath. As python3 supports pathlib Path. We can potentially pass in a `PosixPath` to `configparser.ConfigParser.read()`, especially when passing in a list of `PosixPath` is allowed. However, passing in a single `PosixPath` causes it to raise an exception: File "/Users/bnmetrics/workspace/cpython/Lib/configparser.py", line 694, in read for filename in filenames: TypeError: 'PosixPath' object is not iterable This issue had been addressed with later version of python by checking if the filepath passed in is an instance of `os.Pathlike`. I thought it would be nice if we can pass in a single PosixPath object to `configparser.ConfigParser.read()`. ---------- messages: 327842 nosy: BNMetrics, gvanrossum, vinay.sajip priority: normal severity: normal status: open title: Potential bug in ConfigParser.read() in python3.6, before os.Pathlike was introduced type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 16:32:23 2018 From: report at bugs.python.org (Luna Chen) Date: Tue, 16 Oct 2018 20:32:23 +0000 Subject: [issue35002] Potential bug in ConfigParser.read() in python3.6, before os.Pathlike was introduced In-Reply-To: <1539721417.19.0.788709270274.issue35002@psf.upfronthosting.co.za> Message-ID: <1539721943.91.0.788709270274.issue35002@psf.upfronthosting.co.za> Change by Luna Chen : ---------- keywords: +patch pull_requests: +9274 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 16:48:17 2018 From: report at bugs.python.org (Berker Peksag) Date: Tue, 16 Oct 2018 20:48:17 +0000 Subject: [issue35002] Potential bug in ConfigParser.read() in python3.6, before os.Pathlike was introduced In-Reply-To: <1539721417.19.0.788709270274.issue35002@psf.upfronthosting.co.za> Message-ID: <1539722897.55.0.788709270274.issue35002@psf.upfronthosting.co.za> Berker Peksag added the comment: Unless I'm missing something, you want the following snippet work in 3.6.0, right? import configparser as c import pathlib as p cp = c.ConfigParser() cp.read(p.Path('t.cfg')) t.cfg: $ cat t.cfg [Spam] foo = bar Support for PathLike objects was added in 3.6.1 (see https://github.com/python/cpython/blob/3.6/Lib/configparser.py#L691 for the latest version of the code in the 3.6 branch) and we only support the latest bugfix release of a feature release. So, in other words, we can't add a workaround for 3.6.0 in the next bugfix release of 3.6 (which will be 3.6.7) I suggest to close this as 'outdated'. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 17:01:47 2018 From: report at bugs.python.org (Luna Chen) Date: Tue, 16 Oct 2018 21:01:47 +0000 Subject: [issue35002] Potential bug in ConfigParser.read() in python3.6, before os.Pathlike was introduced In-Reply-To: <1539721417.19.0.788709270274.issue35002@psf.upfronthosting.co.za> Message-ID: <1539723707.83.0.788709270274.issue35002@psf.upfronthosting.co.za> Luna Chen added the comment: Hi Berker, Yes this workaround is mostly for python3.6.0. I have noticed my PR won't let me get to that version it seems. :( This bug seems to be present for python 3.5 as well. Would you recommend adding the fix to 3.5 instead or just simply close it? Thanks very much! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 17:37:14 2018 From: report at bugs.python.org (Luna Chen) Date: Tue, 16 Oct 2018 21:37:14 +0000 Subject: [issue35002] Potential bug in ConfigParser.read() in python3.6, before os.Pathlike was introduced In-Reply-To: <1539721417.19.0.788709270274.issue35002@psf.upfronthosting.co.za> Message-ID: <1539725834.55.0.788709270274.issue35002@psf.upfronthosting.co.za> Change by Luna Chen : ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 18:12:12 2018 From: report at bugs.python.org (Brett Cannon) Date: Tue, 16 Oct 2018 22:12:12 +0000 Subject: [issue35003] Provide an option to venv to put files in a bin/ directory on Windows Message-ID: <1539727932.79.0.788709270274.issue35003@psf.upfronthosting.co.za> New submission from Brett Cannon : Having venv install files into Scripts/ on Windows but into bin/ on UNIX is troublesome for anything that tries to be cross-platform regarding virtual environments. Having a way to create a virtual environment on Windows where bin/ is used over Scripts/ would be handy. ---------- components: Library (Lib) messages: 327845 nosy: brett.cannon priority: normal severity: normal stage: test needed status: open title: Provide an option to venv to put files in a bin/ directory on Windows type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 18:12:19 2018 From: report at bugs.python.org (Brett Cannon) Date: Tue, 16 Oct 2018 22:12:19 +0000 Subject: [issue35003] Provide an option to venv to put files in a bin/ directory on Windows In-Reply-To: <1539727932.79.0.788709270274.issue35003@psf.upfronthosting.co.za> Message-ID: <1539727939.98.0.788709270274.issue35003@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- assignee: -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 18:31:03 2018 From: report at bugs.python.org (Beau Gunderson) Date: Tue, 16 Oct 2018 22:31:03 +0000 Subject: [issue35004] Odd behavior when using datetime.timedelta under cProfile Message-ID: <1539729063.07.0.788709270274.issue35004@psf.upfronthosting.co.za> New submission from Beau Gunderson : In chasing down a bug in my code that only manifests itself when running under cProfile I managed to find the culprit in datetime.timedelta by way of dateutil. Here is a small repro: https://gist.github.com/beaugunderson/68ea6424a4fdcf763ccad08e42a74974 I believe an exception should still be raised in broken() when run under cProfile, but for some reason it is not. ---------- messages: 327846 nosy: beaugunderson priority: normal severity: normal status: open title: Odd behavior when using datetime.timedelta under cProfile versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 18:33:36 2018 From: report at bugs.python.org (Berker Peksag) Date: Tue, 16 Oct 2018 22:33:36 +0000 Subject: [issue35002] Potential bug in ConfigParser.read() in python3.6, before os.Pathlike was introduced In-Reply-To: <1539721417.19.0.788709270274.issue35002@psf.upfronthosting.co.za> Message-ID: <1539729216.24.0.788709270274.issue35002@psf.upfronthosting.co.za> Berker Peksag added the comment: Unfortunately, we can't accept this change for 3.5 either because it's now in security-fix-only mode. See https://devguide.python.org/#status-of-python-branches for more details about the status of branches in the CPython repository. Thank you for spending time to contribute back to Python! ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 19:59:55 2018 From: report at bugs.python.org (Robert Benson) Date: Tue, 16 Oct 2018 23:59:55 +0000 Subject: [issue35005] argparse should accept json and yaml argument types Message-ID: <1539734394.94.0.788709270274.issue35005@psf.upfronthosting.co.za> Change by Robert Benson : ---------- components: Library (Lib) nosy: derelbenkoenig priority: normal severity: normal status: open title: argparse should accept json and yaml argument types type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 20:00:41 2018 From: report at bugs.python.org (Robert Benson) Date: Wed, 17 Oct 2018 00:00:41 +0000 Subject: [issue35005] argparse should accept json and yaml argument types Message-ID: <1539734441.93.0.788709270274.issue35005@psf.upfronthosting.co.za> Change by Robert Benson : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 20:04:10 2018 From: report at bugs.python.org (Robert Benson) Date: Wed, 17 Oct 2018 00:04:10 +0000 Subject: [issue35005] argparse should accept json and yaml argument types Message-ID: <1539734650.75.0.788709270274.issue35005@psf.upfronthosting.co.za> Change by Robert Benson : ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 20:15:38 2018 From: report at bugs.python.org (Robert Benson) Date: Wed, 17 Oct 2018 00:15:38 +0000 Subject: [issue35005] argparse should accept json and yaml argument types Message-ID: <1539735338.04.0.788709270274.issue35005@psf.upfronthosting.co.za> New submission from Robert Benson : Using `argparse`, I wanted to create an argument that was a JSON dictionary. I found that using this in combination with the `fromfile_prefix_args` keyword argument, that the parser assumes that each argument provided in the file must be on a single line. I want the module to be able to support json files that may be pretty-printed. If it is to accept JSON in this manner, it would be not much more effort to implement YAML parsing as well ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 20:26:15 2018 From: report at bugs.python.org (Sebastian Rittau) Date: Wed, 17 Oct 2018 00:26:15 +0000 Subject: [issue35001] ImportFrom level cannot be optional In-Reply-To: <1539715196.88.0.788709270274.issue35001@psf.upfronthosting.co.za> Message-ID: <1539735975.28.0.788709270274.issue35001@psf.upfronthosting.co.za> Change by Sebastian Rittau : ---------- nosy: +srittau _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 20:38:14 2018 From: report at bugs.python.org (Vaibhav Karve) Date: Wed, 17 Oct 2018 00:38:14 +0000 Subject: [issue35006] itertools.combinations has wrong type when using the typing package Message-ID: <1539736694.32.0.788709270274.issue35006@psf.upfronthosting.co.za> New submission from Vaibhav Karve : If I run mypy on the following file called test.py, I get an error: # test.py from typing import Iterator, Tuple import itertools as it a : Iterator[Tuple[int, ...]] a = it.product([1,2,3], repeat = 2) b : Iterator[Tuple[int, ...]] b = it.combinations([1,2,3], 2) The line about a goes through without complain. But mypy complains about b by printing the following error message-- test.py:8: error: Incompatible types in assignment (expression has type "Iterable[Tuple[int, ...]]", variable has type "Iterator[Tuple[int, ...]]") test.py:8: note: 'Iterable' is missing following 'Iterator' protocol member: test.py:8: note: __next__ So basically, it.product is an Iterator but it.combinations is an Iterable (I think it should be an iterator too). I think (without a lot of evidence) that this is a bug in itertools and not in typing. PS: I apologize if my comment is not formatted according to best practices. This is my first time registering a new issue. ---------- components: Demos and Tools messages: 327849 nosy: vaibhavkarve priority: normal severity: normal status: open title: itertools.combinations has wrong type when using the typing package type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 21:11:40 2018 From: report at bugs.python.org (Gus Goulart) Date: Wed, 17 Oct 2018 01:11:40 +0000 Subject: [issue34187] Issues with lazy fd support in _WindowsConsoleIO fileno() and close() In-Reply-To: <1532250349.34.0.56676864532.issue34187@psf.upfronthosting.co.za> Message-ID: <1539738700.86.0.788709270274.issue34187@psf.upfronthosting.co.za> Change by Gus Goulart : ---------- keywords: +patch pull_requests: +9275 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 21:42:04 2018 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 17 Oct 2018 01:42:04 +0000 Subject: [issue34590] "Logging HOWTO" should share an example of best practices for using logging in a library In-Reply-To: <1536179966.39.0.56676864532.issue34590@psf.upfronthosting.co.za> Message-ID: <1539740524.75.0.788709270274.issue34590@psf.upfronthosting.co.za> Vinay Sajip added the comment: Closing, as no specific proposals received. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 21:54:58 2018 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 17 Oct 2018 01:54:58 +0000 Subject: [issue34998] Logging formatter validation breaks backward ducktyping In-Reply-To: <1539701819.12.0.788709270274.issue34998@psf.upfronthosting.co.za> Message-ID: <1539741298.91.0.788709270274.issue34998@psf.upfronthosting.co.za> Vinay Sajip added the comment: Unfortunately, setting the default value of validate to False would completely negate the usefulness of the feature, because it would rely on people coming to know about it and remembering to turn it on. Given that this feature is adding error checking, and that Errors should never pass silently. Unless explicitly silenced. I think that the default should remain as it is. I suggest that you either subclass str for your needs, or work around the backward compatibility issue by checking the version of Python you're running under. ---------- nosy: +BNMetrics, vinay.sajip resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 22:09:09 2018 From: report at bugs.python.org (Zachary Ware) Date: Wed, 17 Oct 2018 02:09:09 +0000 Subject: [issue35005] argparse should accept json and yaml argument types In-Reply-To: <1539735338.04.0.788709270274.issue35005@psf.upfronthosting.co.za> Message-ID: <1539742149.11.0.788709270274.issue35005@psf.upfronthosting.co.za> Change by Zachary Ware : ---------- nosy: +bethard, paul.j3 versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 22:34:10 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 17 Oct 2018 02:34:10 +0000 Subject: [issue35006] itertools.combinations has wrong type when using the typing package In-Reply-To: <1539736694.32.0.788709270274.issue35006@psf.upfronthosting.co.za> Message-ID: <1539743650.68.0.788709270274.issue35006@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Looks like a bug in the typeshed (which mypy depends on to provide typing info for most of the stdlib, which isn't explicitly typed). Affects both combinations and combinations_with_replacement from a quick check of the code: https://github.com/python/typeshed/blob/94485f9e4f86df143801c1810a58df993b2b79b3/stdlib/3/itertools.pyi#L103 Presumably this should be opened on the typeshed tracker. https://github.com/python/typeshed/issues ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 23:22:03 2018 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 17 Oct 2018 03:22:03 +0000 Subject: [issue35001] ImportFrom level cannot be optional In-Reply-To: <1539715196.88.0.788709270274.issue35001@psf.upfronthosting.co.za> Message-ID: <1539746523.7.0.788709270274.issue35001@psf.upfronthosting.co.za> Anthony Sottile added the comment: It appears it has always had this bug since introduction of absolute/relative imports in https://github.com/python/cpython/commit/f7f438ba3b05eb4356e7511401686b07d9dfb6d8 Agree with changing this to `# type: int` and correcting the documentation ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 16 23:26:42 2018 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 17 Oct 2018 03:26:42 +0000 Subject: [issue35001] ImportFrom level cannot be optional In-Reply-To: <1539715196.88.0.788709270274.issue35001@psf.upfronthosting.co.za> Message-ID: <1539746802.44.0.788709270274.issue35001@psf.upfronthosting.co.za> Anthony Sottile added the comment: In fact, trying to use an `ImportFrom` without an integer `level` results in a `ValueError`: >>> x = ast.parse('from os import path') >>> x.body[0].level = None >>> compile(x, '', 'exec') Traceback (most recent call last): File "", line 1, in ValueError: invalid integer value: None ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 00:10:17 2018 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 17 Oct 2018 04:10:17 +0000 Subject: [issue34999] Different behavior of copied loggers in 3.7 In-Reply-To: <1539704367.04.0.788709270274.issue34999@psf.upfronthosting.co.za> Message-ID: <1539749417.01.0.788709270274.issue34999@psf.upfronthosting.co.za> Vinay Sajip added the comment: This doesn't appear to be inherently a logging problem - it seems to be a change in how copy.copy() is working. If you update mocked_log to insert some statements showing the id of the loggers involved in the copy: def mocked_log(log_level): # Return a copy as the bot may modify the logger and we should always return the intial logger print('copying %x' % id(logger)) assert logger.handlers logger_new = copy.copy(logger) logger_new.setLevel(log_level) print('copied to %x' % id(logger_new)) return logger_new Then under Python3.6 you get something like copying 7f2682b3a780 copied to 7f268145bc50 copying 7f2682b3a780 copied to 7f268145bcf8 INFO - Initialized DEBUG - test INFO - Bot stopped. Note the different ids of the copy source and target, and that the assertion failure isn't triggered. Under 3.7, you get copying 7f7084171b38 copied to 7f7084171b38 copying 7f7084171b38 Traceback (most recent call last): File "test.py", line 31, in bot = Bot() File "/home/vinay/projects/scratch/python/34999/bot.py", line 12, in __init__ self.__init_logger(logging_level='DEBUG') File "/home/vinay/projects/scratch/python/34999/bot.py", line 17, in __init_logger self.logger = log(log_level=logging_level) File "test.py", line 23, in mocked_log assert logger.handlers AssertionError So - copy.copy() hasn't actually made a copy of the logger, it's returned the original. I'm not sure why this is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 00:32:01 2018 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 17 Oct 2018 04:32:01 +0000 Subject: [issue35004] Odd behavior when using datetime.timedelta under cProfile In-Reply-To: <1539729063.07.0.788709270274.issue35004@psf.upfronthosting.co.za> Message-ID: <1539750721.28.0.788709270274.issue35004@psf.upfronthosting.co.za> Anthony Sottile added the comment: Here's a simpler reproduction without involving a third party library: >>> import cProfile >>> from datetime import timedelta >>> pr = cProfile.Profile() >>> timedelta.total_seconds(-25200) Traceback (most recent call last): File "", line 1, in TypeError: descriptor 'total_seconds' requires a 'datetime.timedelta' object but received a 'int' >>> pr.enable() >>> timedelta.total_seconds(-25200) 2177366085.870893 >>> pr.disable() >>> timedelta.total_seconds(-25200) Traceback (most recent call last): File "", line 1, in TypeError: descriptor 'total_seconds' requires a 'datetime.timedelta' object but received a 'int' However, it appears fixed on master: $ ./python Python 3.8.0a0 (heads/master:c984d20ec8, Oct 16 2018, 20:47:49) [GCC 7.3.0] on linux >>> >>> import cProfile >>> from datetime import timedelta >>> pr = cProfile.Profile() >>> timedelta.total_seconds(-25200) Traceback (most recent call last): File "", line 1, in TypeError: descriptor 'total_seconds' requires a 'datetime.timedelta' object but received a 'int' >>> pr.enable() >>> timedelta.total_seconds(-25200) Traceback (most recent call last): File "", line 1, in TypeError: descriptor 'total_seconds' for 'datetime.timedelta' objects doesn't apply to 'int' object >>> pr.disable() >>> timedelta.total_seconds(-25200) Traceback (most recent call last): File "", line 1, in TypeError: descriptor 'total_seconds' requires a 'datetime.timedelta' object but received a 'int' Doing a git bisect shows that this commit fixed the issue: https://github.com/python/cpython/pull/8300 Here's the bpo for that: https://bugs.python.org/issue34126 ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 00:38:24 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 17 Oct 2018 04:38:24 +0000 Subject: [issue31218] del expects __delitem__ if __setitem__ is defined In-Reply-To: <1502880498.02.0.663608848315.issue31218@psf.upfronthosting.co.za> Message-ID: <1539751104.87.0.788709270274.issue31218@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This is likely an implementation artifact. In the abstract API, both PyObject_DelItem() and PyObject_SetItem() route through the same slot, m->mp_ass_subscript. The set and delete operations are only differentiated in the downstream concrete APIs. When the *value* parameter is NULL, the operation is deemed to be a deletion. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 00:45:47 2018 From: report at bugs.python.org (hongweipeng) Date: Wed, 17 Oct 2018 04:45:47 +0000 Subject: [issue34475] functools.partial objects have no __qualname__ attribute In-Reply-To: <1535034359.11.0.56676864532.issue34475@psf.upfronthosting.co.za> Message-ID: <1539751547.22.0.788709270274.issue34475@psf.upfronthosting.co.za> hongweipeng added the comment: partial() return an instance not class or function. Why it need __qualname__ attribute? Ref: https://www.python.org/dev/peps/pep-3155/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 01:07:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2018 05:07:29 +0000 Subject: [issue35001] ImportFrom level cannot be optional In-Reply-To: <1539715196.88.0.788709270274.issue35001@psf.upfronthosting.co.za> Message-ID: <1539752849.79.0.788709270274.issue35001@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: None is not integer. This field is optional: >>> from ast import * >>> x = Module(body=[ImportFrom(names=[alias(name='path', asname=None)], lineno=1, col_offset=0)]) >>> compile(x, '', 'exec') at 0x7f73b754da00, file "", line 1> ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 01:25:42 2018 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 17 Oct 2018 05:25:42 +0000 Subject: [issue35001] ImportFrom level cannot be optional In-Reply-To: <1539715196.88.0.788709270274.issue35001@psf.upfronthosting.co.za> Message-ID: <1539753942.77.0.788709270274.issue35001@psf.upfronthosting.co.za> Anthony Sottile added the comment: Hmmm, I don't think mypy has an annotation for "sometimes has an attribute" -- `Optional[T]` is `Union[T, None]` (why I tried `None`). But you're right, `FromImport` is constructable without a `level` -- it seems to behave as `level=0` (I guess as expected!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 01:34:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2018 05:34:18 +0000 Subject: [issue34999] Different behavior of copied loggers in 3.7 In-Reply-To: <1539704367.04.0.788709270274.issue34999@psf.upfronthosting.co.za> Message-ID: <1539754458.19.0.788709270274.issue34999@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a consequence of implementing pickling for loggers in issue30520. It would be surprising if pickling/unpickling and deep copying preserve identity, but shallow copying creates a new object. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 01:40:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2018 05:40:01 +0000 Subject: [issue34475] functools.partial objects have no __qualname__ attribute In-Reply-To: <1535034359.11.0.56676864532.issue34475@psf.upfronthosting.co.za> Message-ID: <1539754801.85.0.788709270274.issue34475@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't see a problem. Not all callables have the __qualname__ attribute. It is not the part of the protocol. The code that expects the __qualname__ attribute should be fixed. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 01:48:33 2018 From: report at bugs.python.org (Frank Millman) Date: Wed, 17 Oct 2018 05:48:33 +0000 Subject: [issue35007] Minor change to weakref docs Message-ID: <1539755313.9.0.788709270274.issue35007@psf.upfronthosting.co.za> New submission from Frank Millman : weakref.WeakKeyDictionary.keyrefs() - The documentation says 'Return an iterable of the weak references to the keys'. I was not sure if this would expose me to the 'dictionary changed size while iterating' error, so I checked the source. The source shows that it returns a list, and the docstring says 'Return a list of weak references to the keys'. I suggest that the documentation be changed to match the docstring. The same applies to valuerefs(). ---------- assignee: docs at python components: Documentation messages: 327863 nosy: docs at python, frankmillman priority: normal severity: normal status: open title: Minor change to weakref docs type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 02:10:11 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 17 Oct 2018 06:10:11 +0000 Subject: [issue35006] itertools.combinations has wrong type when using the typing package In-Reply-To: <1539736694.32.0.788709270274.issue35006@psf.upfronthosting.co.za> Message-ID: <1539756611.35.0.788709270274.issue35006@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. I agree with Josh. I propose closing this as third-party and raising an issue in typeshed GitHub repo. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 02:29:21 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 17 Oct 2018 06:29:21 +0000 Subject: [issue34996] Add name to process and thread pool In-Reply-To: <1539686443.16.0.788709270274.issue34996@psf.upfronthosting.co.za> Message-ID: <1539757761.82.0.788709270274.issue34996@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. I think using current_thread().name gives thread name with number that is useful. I don't know the exact use case or maybe I am misunderstanding the use case and perhaps adding a script where your PR applies with the output will be helpful. I will resort to feedback from others. Adding Antoine as per the expert index for multiprocessing module. Antoine, feel free to remove yourself if this is irrelevant. # bpo34720.py from multiprocessing.pool import ThreadPool def f(x): from threading import current_thread print(current_thread().name) return x*x if __name__ == '__main__': with ThreadPool(5) as p: print(p.map(f, [1, 2, 3])) $ ./python.exe ../backups/bpo34720.py Thread-1 Thread-1 Thread-2 [1, 4, 9] # With PR and name as "custom-name" for ThreadPool from multiprocessing.pool import ThreadPool def f(x): from threading import current_thread print(current_thread().name) return x*x if __name__ == '__main__': with ThreadPool(5, name="custom-name") as p: print(p.map(f, [1, 2, 3])) git:(pr_9906) ./python.exe ../backups/bpo34720.py custom-name-Worker-0 custom-name-Worker-1 custom-name-Worker-2 [1, 4, 9] ---------- nosy: +pitrou, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 02:39:47 2018 From: report at bugs.python.org (Ethan Furman) Date: Wed, 17 Oct 2018 06:39:47 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1539758387.74.0.788709270274.issue34909@psf.upfronthosting.co.za> Ethan Furman added the comment: Working on getting that news entry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 02:47:21 2018 From: report at bugs.python.org (paul j3) Date: Wed, 17 Oct 2018 06:47:21 +0000 Subject: [issue35005] argparse should accept json and yaml argument types In-Reply-To: <1539735338.04.0.788709270274.issue35005@psf.upfronthosting.co.za> Message-ID: <1539758841.97.0.788709270274.issue35005@psf.upfronthosting.co.za> paul j3 added the comment: The results of reading one of these @-prefix files are just spliced into the `argv` list before it is parsed. This is done early in the parsing method, in the _read_args_from_files method. The documentation illustrates how this file reading can be modified to take several strings from each line: https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.convert_arg_line_to_args That shouldn't be taken as the only possible modification. That said, I don't see how reading from a JSON or YAML file fits with this mechanism. Presumably those would define some dictionary like key:value pairs. I assume you'd want to enter those directly into the Namespace, not the argv list that will be parsed. Or otherwise merged with a dictionary produced by parsing the other commandline strings. So what you want to do with a JSON file, and how that relates to argparse is not clear. You need to elaborate before we can discuss this issue further. You might want to search on Stackoverflow with the tags '[argparse] [json]' to see how others have tried to use the two together. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 03:24:07 2018 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 17 Oct 2018 07:24:07 +0000 Subject: [issue34475] functools.partial objects have no __qualname__ attribute In-Reply-To: <1535034359.11.0.56676864532.issue34475@psf.upfronthosting.co.za> Message-ID: <1539761047.08.0.788709270274.issue34475@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Okay, I thought a partial object was supposed to "look" like a function. I'm okay with closing this. ---------- resolution: -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 04:21:25 2018 From: report at bugs.python.org (thautwarm) Date: Wed, 17 Oct 2018 08:21:25 +0000 Subject: [issue35001] ImportFrom level cannot be optional In-Reply-To: <1539715196.88.0.788709270274.issue35001@psf.upfronthosting.co.za> Message-ID: <1539764485.4.0.788709270274.issue35001@psf.upfronthosting.co.za> thautwarm added the comment: Hi, Serhiy, for Python-asdl has made `level` able to optional, certainly we could construct an ImportFrom AST without giving `level`. Moreover, this might evidence that `level` cannot be optional in fact: https://github.com/python/cpython/blob/8e73ad38ab7d218b9ef8976032865928dfad00f1/Python/compile.c#L2918 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 04:25:40 2018 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 17 Oct 2018 08:25:40 +0000 Subject: [issue34973] Crash in bytes constructor with mutating list In-Reply-To: <1539437867.82.0.788709270274.issue34973@psf.upfronthosting.co.za> Message-ID: <1539764740.29.0.788709270274.issue34973@psf.upfronthosting.co.za> Xiang Zhang added the comment: I carefully read both the two PRs. The first one, easy to understand. The second one, I spend some time to figure out why the test doesn't crash, why we need to have reference count checks in two places and make some experiments to test in different cases, how the reference counts will be. I am afraid I have to repeat this procedure after some time when reading the code again. :-( And while in some cases the second approach increases performance. But in others cases it might hurt. Codes storing the array in a variable will go into the iterator branch. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 04:27:08 2018 From: report at bugs.python.org (thautwarm) Date: Wed, 17 Oct 2018 08:27:08 +0000 Subject: [issue35001] ImportFrom level cannot be optional In-Reply-To: <1539715196.88.0.788709270274.issue35001@psf.upfronthosting.co.za> Message-ID: <1539764828.78.0.788709270274.issue35001@psf.upfronthosting.co.za> thautwarm added the comment: @Anthony > I don't think mypy has an annotation for "sometimes has an attribute" Yes.. The annotation for an attribute that **maybe exist** cannot be expressed by mypy.. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 04:43:20 2018 From: report at bugs.python.org (sebix) Date: Wed, 17 Oct 2018 08:43:20 +0000 Subject: [issue34999] copy.copy and deepcopy do return same logger objects in 3.7 In-Reply-To: <1539704367.04.0.788709270274.issue34999@psf.upfronthosting.co.za> Message-ID: <1539765800.61.0.788709270274.issue34999@psf.upfronthosting.co.za> sebix added the comment: Oh, that's something different than I initially thought. Using copy.deepcopy gives the same result as with copy.copy. ---------- title: Different behavior of copied loggers in 3.7 -> copy.copy and deepcopy do return same logger objects in 3.7 type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 04:46:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2018 08:46:01 +0000 Subject: [issue35008] Leaks xml.etree.ElementTree.Element.__setsate__() Message-ID: <1539765961.94.0.788709270274.issue35008@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : When call the __setstate__() method of xml.etree.ElementTree.Element in the C implementation for already initialized element it leaks old children. ---------- assignee: serhiy.storchaka components: Extension Modules messages: 327873 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Leaks xml.etree.ElementTree.Element.__setsate__() type: resource usage versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 04:46:25 2018 From: report at bugs.python.org (P.C. Kroon) Date: Wed, 17 Oct 2018 08:46:25 +0000 Subject: [issue34998] Logging formatter validation breaks backward ducktyping In-Reply-To: <1539701819.12.0.788709270274.issue34998@psf.upfronthosting.co.za> Message-ID: <1539765985.77.0.788709270274.issue34998@psf.upfronthosting.co.za> P.C. Kroon added the comment: Hi Vinay, thanks for the feedback. I agree with your arguments and find an alternative solution. Peter ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 04:49:51 2018 From: report at bugs.python.org (susaki) Date: Wed, 17 Oct 2018 08:49:51 +0000 Subject: =?utf-8?q?=5Bissue34979=5D_Python_throws_=E2=80=9CSyntaxError=3A_Non-UTF-?= =?utf-8?q?8_code_start_with_=5Cxe8=2E=2E=2E=E2=80=9D_when_parse_source_fi?= =?utf-8?q?le?= In-Reply-To: <1539482499.11.0.788709270274.issue34979@psf.upfronthosting.co.za> Message-ID: <1539766191.8.0.788709270274.issue34979@psf.upfronthosting.co.za> Change by susaki : ---------- keywords: +patch pull_requests: +9276 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 04:52:31 2018 From: report at bugs.python.org (thautwarm) Date: Wed, 17 Oct 2018 08:52:31 +0000 Subject: [issue12782] Multiple context expressions do not support parentheses for continuation across lines In-Reply-To: <1313719817.79.0.828403712604.issue12782@psf.upfronthosting.co.za> Message-ID: <1539766351.12.0.788709270274.issue12782@psf.upfronthosting.co.za> thautwarm added the comment: How about: with_stmt: 'with' (with_items | '(' with_items ')') ':' suite ignored: INDENT | NEWLINE | DEDENT with_items: with_item (ignored* ',' ignored* with_item)* ---------- nosy: +thautwarm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 04:57:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2018 08:57:18 +0000 Subject: [issue35008] Leaks xml.etree.ElementTree.Element.__setsate__() In-Reply-To: <1539765961.94.0.788709270274.issue35008@psf.upfronthosting.co.za> Message-ID: <1539766638.31.0.788709270274.issue35008@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +9277 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 04:57:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2018 08:57:56 +0000 Subject: [issue35008] Leaks xml.etree.ElementTree.Element.__setsate__() In-Reply-To: <1539765961.94.0.788709270274.issue35008@psf.upfronthosting.co.za> Message-ID: <1539766676.02.0.788709270274.issue35008@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +eli.bendersky, scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 05:03:08 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 17 Oct 2018 09:03:08 +0000 Subject: [issue23420] python -m cProfile -s fails with non informative message In-Reply-To: <1423483542.47.0.873331461969.issue23420@psf.upfronthosting.co.za> Message-ID: <1539766988.5.0.788709270274.issue23420@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- pull_requests: +9278 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 05:04:28 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 17 Oct 2018 09:04:28 +0000 Subject: [issue23420] python -m cProfile -s fails with non informative message In-Reply-To: <1423483542.47.0.873331461969.issue23420@psf.upfronthosting.co.za> Message-ID: <1539767068.96.0.788709270274.issue23420@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi, Just used the content of the patch and apply it on master, Add a unittest and the blurb entry. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 05:06:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2018 09:06:19 +0000 Subject: [issue34876] Python3.8 changes how decorators are traced In-Reply-To: <1538521604.52.0.545547206417.issue34876@psf.upfronthosting.co.za> Message-ID: <1539767179.26.0.788709270274.issue34876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ned, please look at PR 9731. Does it fixes the issue to you? Georg, you had added the original code for patching the lineno of decorated function. Are your good to remove this patch and to move updating the first line number at the code generation stage? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 05:14:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2018 09:14:15 +0000 Subject: =?utf-8?q?=5Bissue34979=5D_Python_throws_=E2=80=9CSyntaxError=3A_Non-UTF-?= =?utf-8?q?8_code_start_with_=5Cxe8=2E=2E=2E=E2=80=9D_when_parse_source_fi?= =?utf-8?q?le?= In-Reply-To: <1539482499.11.0.788709270274.issue34979@psf.upfronthosting.co.za> Message-ID: <1539767655.28.0.788709270274.issue34979@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a part of more general issue25643. I'll try to revive that issue. ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 05:17:56 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 17 Oct 2018 09:17:56 +0000 Subject: [issue35009] argparse throws UnicodeEncodeError for printing help with unicode choices Message-ID: <1539767876.78.0.788709270274.issue35009@psf.upfronthosting.co.za> New submission from Karthikeyan Singaravelan : argparse module uses str() in a few places where passing unicode strings will throw UnicodeDecodeError. In Python 3 these scripts run fine since Python 3 has unicode strings by default. I am working on this along with finding more places where this can throw error along with adding relevant tests for those scenarios. I couldn't find any related issues for this in the bug tracker. Feel free to close this if it's a duplicate. # foo_argparse.py with unicode choices ``` # -*- coding: utf-8 -*- import argparse parser = argparse.ArgumentParser() parser.add_argument('--foo', help='foo help', choices=[u"???", u"??? ???"]) args = parser.parse_args() ``` # printing help causes error since str is used for choices $ ./python.exe ../backups/foo_argparse.py --help Traceback (most recent call last): File "../backups/foo_argparse.py", line 5, in parser.add_argument('--foo', help='foo help', choices=[u"???", u"??? ???"]) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/argparse.py", line 1308, in add_argument self._get_formatter()._format_args(action, None) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/argparse.py", line 578, in _format_args get_metavar = self._metavar_formatter(action, default_metavar) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/argparse.py", line 565, in _metavar_formatter choice_strs = [str(choice) for choice in action.choices] UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128) In case we use unicode() for the above and then also fix the place where comparison is done then using the correct choice passes. But using wrong choice throws an error where exception string is formed using str that causes error $ ./python.exe ../backups/foo_argparse_unicode.py --foo ??? # passes $ ./python.exe ../backups/foo_argparse_unicode.py --help # passes usage: foo_argparse_unicode.py [-h] [--foo {???,??? ???}] optional arguments: -h, --help show this help message and exit --foo {???,??? ???} foo help $ ./python.exe ../backups/foo_argparse_unicode.py --foo 1 # Fails Traceback (most recent call last): File "../backups/foo_argparse_unicode.py", line 7, in args = parser.parse_args() File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/argparse.py", line 1705, in parse_args args, argv = self.parse_known_args(args, namespace) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/argparse.py", line 1744, in parse_known_args self.error(str(err)) UnicodeEncodeError: 'ascii' codec can't encode characters in position 49-51: ordinal not in range(128) ---------- components: Library (Lib) messages: 327879 nosy: xtreak priority: normal severity: normal status: open title: argparse throws UnicodeEncodeError for printing help with unicode choices type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 05:18:23 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 17 Oct 2018 09:18:23 +0000 Subject: [issue34814] makesetup: must link C extensions to libpython when compiled in shared mode In-Reply-To: <1537980934.49.0.545547206417.issue34814@psf.upfronthosting.co.za> Message-ID: <1539767903.87.0.788709270274.issue34814@psf.upfronthosting.co.za> Change by Xavier de Gaye : ---------- Removed message: https://bugs.python.org/msg326509 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 05:25:19 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 17 Oct 2018 09:25:19 +0000 Subject: [issue34814] makesetup: must link C extensions to libpython when compiled in shared mode In-Reply-To: <1537980934.49.0.545547206417.issue34814@psf.upfronthosting.co.za> Message-ID: <1539768319.27.0.788709270274.issue34814@psf.upfronthosting.co.za> Change by Xavier de Gaye : ---------- nosy: -xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 05:26:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2018 09:26:49 +0000 Subject: [issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__ In-Reply-To: <1539668705.97.0.788709270274.issue34995@psf.upfronthosting.co.za> Message-ID: <1539768409.09.0.788709270274.issue34995@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The comment can serve the same purpose. The caching affects the behavior at run time. Abstract methods should not be executed. The cached_property decorator is not inherited by overriding properties. I don't think that combining the cached_property and the @abstractmethod decorators should be supported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 05:45:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2018 09:45:07 +0000 Subject: [issue24307] 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: <1539769507.3.0.788709270274.issue24307@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I suppose there is a similar issue in Python 3 with bytes default. Using unicode() in Python 2 will make the help string an Unicode string, and this can cause an issue with translated help string. And this will cause an issue with non-ASCII 8-bit strings. Using repr() looks a right way of solving such issues, but this will change the output for 8-bit strings. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 05:55:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Oct 2018 09:55:45 +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: <1539770145.05.0.788709270274.issue24307@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: pip error on windows whose current user name contains non-ascii characters -> [Python 2] pip error on windows whose current user name contains non-ascii characters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 05:58:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2018 09:58:10 +0000 Subject: [issue35001] ImportFrom level cannot be optional In-Reply-To: <1539715196.88.0.788709270274.issue35001@psf.upfronthosting.co.za> Message-ID: <1539770290.0.0.788709270274.issue35001@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The level argument of ast.ImportFrom is optional. If it is not specified or None is passes, the corresponding attribute is set to the default value 0. Type hints are not used in the stdlib. If this is a bug in mypy, this is not the proper tracker for reporting it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 06:02:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Oct 2018 10:02:53 +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: <1539770573.7.0.788709270274.issue24307@psf.upfronthosting.co.za> STINNER Victor added the comment: pip is not part of Python 2, so I suggest to close this issue as "third party". I dislike changing optparse just for pip. For me, the bug should be fixed in pip, not in optparse. I see a high risk of breaking applications which currently work as expected. If the default value is a non-ASCII string, unicode() will raise a UnicodeDecodeError. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 06:03:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Oct 2018 10:03:50 +0000 Subject: [issue23420] python -m cProfile -s fails with non informative message In-Reply-To: <1423483542.47.0.873331461969.issue23420@psf.upfronthosting.co.za> Message-ID: <1539770630.7.0.788709270274.issue23420@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset fcd5e84a515e19409840c570730f0728e9fcfc83 by Victor Stinner (St?phane Wirtel) in branch 'master': bpo-23420: Verify the value of '-s' when execute the CLI of cProfile (GH-9925) https://github.com/python/cpython/commit/fcd5e84a515e19409840c570730f0728e9fcfc83 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 06:10:34 2018 From: report at bugs.python.org (thautwarm) Date: Wed, 17 Oct 2018 10:10:34 +0000 Subject: [issue35001] ImportFrom level cannot be optional In-Reply-To: <1539715196.88.0.788709270274.issue35001@psf.upfronthosting.co.za> Message-ID: <1539771034.05.0.788709270274.issue35001@psf.upfronthosting.co.za> thautwarm added the comment: Firstly, allowing to construct ImportFrom without `level` specified could be the result of referring Python-asdl. Secondly, in C level, `level` is always an integer. Last but not the least, when you can access `level` from an ImportFrom AST, it must be an integer, not None. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 06:10:40 2018 From: report at bugs.python.org (Cyker Way) Date: Wed, 17 Oct 2018 10:10:40 +0000 Subject: [issue35010] sort by partially reversed key tuple Message-ID: <1539771040.54.0.788709270274.issue35010@psf.upfronthosting.co.za> New submission from Cyker Way : The current `sorted` function is somewhat limited and doesn't cover a use case that frequently occurs in real applications: sort by a tuple of keys where each key can be in asc or desc order. For example, you may have a list of site configs where each of specify which user on which site gets how much quota. This data may be loaded from a SQL table where there are 3 columns: url, user, quota. Often you may want to sort by url, but when you want to check which users have been allocated most quota, you probably want to sort by quota. Even more likely, when you are sorting by quota, you still want to sort by url for those having the same quota. Unfortunately, current `sorted` function doesn't allow you to sort by desc quota and asc url at the same time, because the `reverse` parameter acts on the final result, regardless of columns. For numeric columns, there is a trick of using minus sign on the data. But this approach usually doesn't apply to other types of data. The general solution is to enhance the key function, allowing users to specify each column to be considered, with an asc/desc flag: keyspec = [ (itemgetter('url'), False), (itemgetter('user'), True), ] An example is worth 1k words. The full example is provided in the attachment. It's not a lot of code to write but making this feature builtin can save a lot of work since sorting a SQL table or other sheet data is quite common in real applications. ---------- components: Library (Lib) files: c.py messages: 327886 nosy: cykerway priority: normal severity: normal status: open title: sort by partially reversed key tuple type: enhancement versions: Python 3.8 Added file: https://bugs.python.org/file47873/c.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 06:16:11 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 17 Oct 2018 10:16:11 +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: <1539771371.12.0.788709270274.issue24307@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: @Victor I think this is an issue with optparse where it can't handle non-ASCII strings for %default that is exposed by pip. I can see similar places where non-ASCII strings can cause issue in argparse for unicode choices (issue35009). I think this is a general issue where str() is used where non-ASCII strings throw this error. I am quite new to unicode so I don't know if this issue needs to be fixed in Python 2.7 or it's an error from the user end where their script needs to be fixed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 06:33:49 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 17 Oct 2018 10:33:49 +0000 Subject: [issue23420] python -m cProfile -s fails with non informative message In-Reply-To: <1423483542.47.0.873331461969.issue23420@psf.upfronthosting.co.za> Message-ID: <1539772428.99.0.788709270274.issue23420@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- pull_requests: +9279 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 06:34:16 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 17 Oct 2018 10:34:16 +0000 Subject: [issue35010] sort by partially reversed key tuple In-Reply-To: <1539771040.54.0.788709270274.issue35010@psf.upfronthosting.co.za> Message-ID: <1539772456.61.0.788709270274.issue35010@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Since sort is guaranteed to be stable, can't you sort in two runs? py> values = ['bc', 'da', 'ba', 'abx', 'ac', 'ce', 'dc', 'ca', 'aby'] py> values.sort(key=itemgetter(1), reverse=True) py> values.sort(key=itemgetter(0)) py> values ['ac', 'abx', 'aby', 'bc', 'ba', 'ce', 'ca', 'dc', 'da'] Its not as efficient as doing a single sort, but its easier to understand than a complex API to specify each item's sort direction individually, and therefore probably less likely to mess it up and get it wrong. ---------- nosy: +steven.daprano, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 06:36:52 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 17 Oct 2018 10:36:52 +0000 Subject: [issue35010] sort by partially reversed key tuple In-Reply-To: <1539771040.54.0.788709270274.issue35010@psf.upfronthosting.co.za> Message-ID: <1539772612.27.0.788709270274.issue35010@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: There was some discussion about it : https://lists.gt.net/python/python/539896#539896 . As suggested by Raymond in the thread the below can be used to get the desired output items.sort(key=lambda r: r['user'], reverse=True) items.sort(key=lambda r: r['url']) ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 06:40:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2018 10:40:11 +0000 Subject: [issue35010] sort by partially reversed key tuple In-Reply-To: <1539771040.54.0.788709270274.issue35010@psf.upfronthosting.co.za> Message-ID: <1539772811.43.0.788709270274.issue35010@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Would be nice to add an example in the documentation. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 07:18:56 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 17 Oct 2018 11:18:56 +0000 Subject: [issue23420] python -m cProfile -s fails with non informative message In-Reply-To: <1423483542.47.0.873331461969.issue23420@psf.upfronthosting.co.za> Message-ID: <1539775136.7.0.788709270274.issue23420@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- pull_requests: +9280 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 07:24:12 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 17 Oct 2018 11:24:12 +0000 Subject: [issue23420] python -m cProfile -s fails with non informative message In-Reply-To: <1423483542.47.0.873331461969.issue23420@psf.upfronthosting.co.za> Message-ID: <1539775452.4.0.788709270274.issue23420@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- pull_requests: +9281 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 07:48:09 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Oct 2018 11:48:09 +0000 Subject: [issue23420] python -m cProfile -s fails with non informative message In-Reply-To: <1423483542.47.0.873331461969.issue23420@psf.upfronthosting.co.za> Message-ID: <1539776889.29.0.788709270274.issue23420@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 657e3f9a2c0d620807dd81882d566ad8f1ae423e by Miss Islington (bot) (St?phane Wirtel) in branch '3.7': [3.7] bpo-23420: Verify the value of '-s' when execute the CLI of cProfile (GH-9925) (GH-9926) https://github.com/python/cpython/commit/657e3f9a2c0d620807dd81882d566ad8f1ae423e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 07:48:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Oct 2018 11:48:56 +0000 Subject: [issue23420] python -m cProfile -s fails with non informative message In-Reply-To: <1423483542.47.0.873331461969.issue23420@psf.upfronthosting.co.za> Message-ID: <1539776936.72.0.788709270274.issue23420@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 669fa8b6376ee8703ae4383536dfcc0e96e51b78 by Victor Stinner (St?phane Wirtel) in branch '3.6': [3.6] bpo-23420: Verify the value of '-s' when execute the CLI of cProfile (GH-9925) (GH-9927) https://github.com/python/cpython/commit/669fa8b6376ee8703ae4383536dfcc0e96e51b78 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 07:51:31 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Oct 2018 11:51:31 +0000 Subject: [issue23420] python -m cProfile -s fails with non informative message In-Reply-To: <1423483542.47.0.873331461969.issue23420@psf.upfronthosting.co.za> Message-ID: <1539777091.95.0.788709270274.issue23420@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6e57382464101d2669a425622e19fff57586b2ff by Miss Islington (bot) (St?phane Wirtel) in branch '2.7': [2.7] bpo-23420: Verify the value of '-s' when execute the CLI of cProfile (GH-9925) (GH-9928) https://github.com/python/cpython/commit/6e57382464101d2669a425622e19fff57586b2ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 08:36:46 2018 From: report at bugs.python.org (Charlie Dyson) Date: Wed, 17 Oct 2018 12:36:46 +0000 Subject: [issue24564] shutil.copytree fails when copying NFS to NFS In-Reply-To: <1436040350.32.0.650425735541.issue24564@psf.upfronthosting.co.za> Message-ID: <1539779806.73.0.788709270274.issue24564@psf.upfronthosting.co.za> Change by Charlie Dyson : ---------- nosy: +cdyson37 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 09:07:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Oct 2018 13:07:16 +0000 Subject: [issue23420] python -m cProfile -s fails with non informative message In-Reply-To: <1423483542.47.0.873331461969.issue23420@psf.upfronthosting.co.za> Message-ID: <1539781636.81.0.788709270274.issue23420@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Robert Kuska for the bug report and the initial patch, thanks St?phane Wirtel for the PR (with the NEWS entry and the new test ;-)) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 09:09:22 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 17 Oct 2018 13:09:22 +0000 Subject: [issue23420] python -m cProfile -s fails with non informative message In-Reply-To: <1423483542.47.0.873331461969.issue23420@psf.upfronthosting.co.za> Message-ID: <1539781762.87.0.788709270274.issue23420@psf.upfronthosting.co.za> St?phane Wirtel added the comment: welcome ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 09:20:55 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 17 Oct 2018 13:20:55 +0000 Subject: [issue35010] sort by partially reversed key tuple In-Reply-To: <1539771040.54.0.788709270274.issue35010@psf.upfronthosting.co.za> Message-ID: <1539782455.89.0.788709270274.issue35010@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: @Serhiy I just checked the docs to add an example and it's explained with an example at [0] :) ``` Sorts are guaranteed to be stable. That means that when multiple records have the same key, their original order is preserved. This wonderful property lets you build complex sorts in a series of sorting steps. For example, to sort the student data by descending grade and then ascending age, do the age sort first and then sort again using grade: >>> s = sorted(student_objects, key=attrgetter('age')) # sort on secondary key >>> sorted(s, key=attrgetter('grade'), reverse=True) # now sort on primary key, descending [('dave', 'B', 10), ('jane', 'B', 12), ('john', 'A', 15)] The Timsort algorithm used in Python does multiple sorts efficiently because it can take advantage of any ordering already present in a dataset. ``` As noted TimSort makes this efficient by taking advantage of the sorting in the first run though it was not done as a single pass. If I am bench marking correctly in the attached file then for a list with 400 items using multiple pass sort is 4-5x faster than the suggested sorting in Python 3.7 and also more readable (though my lambda call is messy :) Multiple pass sort : 3.871509724 Suggested sort : 17.237952677 [0] https://docs.python.org/3/howto/sorting.html#sort-stability-and-complex-sorts ---------- Added file: https://bugs.python.org/file47874/bpo35010_1.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 09:50:23 2018 From: report at bugs.python.org (Cyker Way) Date: Wed, 17 Oct 2018 13:50:23 +0000 Subject: [issue35010] sort by partially reversed key tuple In-Reply-To: <1539771040.54.0.788709270274.issue35010@psf.upfronthosting.co.za> Message-ID: <1539784223.12.0.788709270274.issue35010@psf.upfronthosting.co.za> Cyker Way added the comment: Multi-pass stable sorts should produce the correct result. But as the number of columns grow the code gets messy. For brevity this example only has 2 columns but it may be 10 or more in a real application. Furthermore, in some cases the application may need to remember which columns are sorted asc/desc so you have to keep that piece of data (termed `keyspec` but can be any meaningful name) anyway. It would be ideal if a builtin function can directly operate on this data instead of manually writing a multi-pass sorting logic; The proposed prototype (`c.py`) is aimed at minimizing the amount of code needed to illustrate the problem and is not optimized for performance. There is a performance hit where it wraps one object into another, but this should be able to be avoided. If you want to compare real performance between single- and multi-pass sorts, you can run this script `performance.py` instead. My test result is that multi-pass sorting takes 75% more time, YMMV. ---------- Added file: https://bugs.python.org/file47875/performance.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 09:54:57 2018 From: report at bugs.python.org (Robert Benson) Date: Wed, 17 Oct 2018 13:54:57 +0000 Subject: [issue35005] argparse should accept json and yaml argument types In-Reply-To: <1539735338.04.0.788709270274.issue35005@psf.upfronthosting.co.za> Message-ID: <1539784497.67.0.788709270274.issue35005@psf.upfronthosting.co.za> Robert Benson added the comment: What I'm talking about is reading a single arg (of a dictionary or collection type) that can be split across multiple lines, rather than a single line containing multiple args My motivation was that reading args from a file should behave in a manner similar to other command-line utilities, such as the `-d` option for `curl` and the `-e` option for `ansible`. These take the entire file you give it and store it as one dictionary or object, not by merging it with the rest of the namespace but by taking the dictionary as the value of just that arg. So: argument_parser.add_argument("-d", "--data", type=argparse.JsonType) # just for example if I call the program with `--data @foo.json` I want argument_parser.parse_args().data to be the dict that is in foo.json, whether foo.json is pretty-printed or not. I haven't done an exhaustive search of StackOverflow, but seeing a couple top answers indicated that this was not readily available without the user at least having to call `json.loads` on a string argument themselves, when it seems logical that it would be built into the library to parse the json into a dictionary ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 10:10:33 2018 From: report at bugs.python.org (Dariush Azimi) Date: Wed, 17 Oct 2018 14:10:33 +0000 Subject: [issue34035] Several AttributeError in zipfile seek() methods In-Reply-To: <1530642274.73.0.56676864532.issue34035@psf.upfronthosting.co.za> Message-ID: <1539785433.54.0.788709270274.issue34035@psf.upfronthosting.co.za> Dariush Azimi added the comment: Had the same issue with python 3.7 and went back to python 3.6. There are no issues with python 3.6.4 ---------- nosy: +Dariush Azimi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 10:32:56 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 17 Oct 2018 14:32:56 +0000 Subject: [issue34996] Add name to process and thread pool In-Reply-To: <1539686443.16.0.788709270274.issue34996@psf.upfronthosting.co.za> Message-ID: <1539786776.24.0.788709270274.issue34996@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Raz, 1. Please could you sign the CLA? 2. About the name, why did you use these names? Is there a discussion somewhere about the names? Thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 10:59:04 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 17 Oct 2018 14:59:04 +0000 Subject: [issue35010] sort by partially reversed key tuple In-Reply-To: <1539771040.54.0.788709270274.issue35010@psf.upfronthosting.co.za> Message-ID: <1539788344.33.0.788709270274.issue35010@psf.upfronthosting.co.za> Steven D'Aprano added the comment: The ``sorted`` docs links to the Sorting HOWTO, the ``list.sort`` docs should do the same. https://docs.python.org/3/library/functions.html#sorted https://docs.python.org/3/library/stdtypes.html#list.sort ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 11:00:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Oct 2018 15:00:44 +0000 Subject: [issue32892] Remove specific constant AST types in favor of ast.Constant In-Reply-To: <1519204597.27.0.467229070634.issue32892@psf.upfronthosting.co.za> Message-ID: <1539788444.43.0.788709270274.issue32892@psf.upfronthosting.co.za> STINNER Victor added the comment: This change broke two templating engines: * Genshi: https://github.com/python/performance/issues/46 * Chameleon: https://github.com/python/performance/issues/47 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 11:07:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Oct 2018 15:07:41 +0000 Subject: [issue32892] Remove specific constant AST types in favor of ast.Constant In-Reply-To: <1519204597.27.0.467229070634.issue32892@psf.upfronthosting.co.za> Message-ID: <1539788861.13.0.788709270274.issue32892@psf.upfronthosting.co.za> STINNER Victor added the comment: > This change broke two templating engines: > * Genshi: https://github.com/python/performance/issues/46 upstream issue: https://genshi.edgewall.org/ticket/612 > * Chameleon: https://github.com/python/performance/issues/47 upstream issue: https://github.com/malthe/chameleon/issues/272 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 11:17:43 2018 From: report at bugs.python.org (=?utf-8?q?Jan-Hein_B=C3=BChrman?=) Date: Wed, 17 Oct 2018 15:17:43 +0000 Subject: [issue30670] pprint for dict in sorted order or insert order? In-Reply-To: <1497492955.33.0.313949068523.issue30670@psf.upfronthosting.co.za> Message-ID: <1539789463.05.0.788709270274.issue30670@psf.upfronthosting.co.za> Jan-Hein B?hrman added the comment: @terry.reedy - If I understand correctly, this issue was closed by you awaiting what would happen with the dict insertion order after 3.6. It has been decided that dict insertion will stay for now and in the future. >>> Should this issue now be reopened? And I would favor backward compatibility (key sort order) with an additional keyword for pprint to display it "unsorted" order (from pprint perspective, insertion order for dicts and OrderedDicts, and whatever other order for whatever other dicts). ---------- nosy: +Jan-Hein B?hrman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 11:19:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Oct 2018 15:19:12 +0000 Subject: [issue31900] localeconv() should decode numeric fields from LC_NUMERIC encoding, not from LC_CTYPE encoding In-Reply-To: <1509370865.74.0.213398074469.issue31900@psf.upfronthosting.co.za> Message-ID: <1539789552.35.0.788709270274.issue31900@psf.upfronthosting.co.za> STINNER Victor added the comment: Victor: > The technical issue here is that the libc has no "stateless" function to process bytes and text with one specific locale. Andreas Schwab: > That's not true. There is a rich set of *_l functions that take a locale_t object and operate on that locale. Oh. Do you want to work on a patch to use these functions? If yes, please open a new issue to enhance the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 11:29:16 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 17 Oct 2018 15:29:16 +0000 Subject: [issue34814] makesetup: must link C extensions to libpython when compiled in shared mode In-Reply-To: <1537980934.49.0.545547206417.issue34814@psf.upfronthosting.co.za> Message-ID: <1539790156.61.0.788709270274.issue34814@psf.upfronthosting.co.za> Ned Deily added the comment: Perhaps you should bring up this proposed change in distutils-sig before committing. It's probably an OK change but it would be good to try to get some feedback from the downstream users who might be affected by it. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 11:34:58 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 17 Oct 2018 15:34:58 +0000 Subject: [issue35010] sort by partially reversed key tuple In-Reply-To: <1539771040.54.0.788709270274.issue35010@psf.upfronthosting.co.za> Message-ID: <1539790498.91.0.788709270274.issue35010@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +9282 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 11:46:57 2018 From: report at bugs.python.org (Cyker Way) Date: Wed, 17 Oct 2018 15:46:57 +0000 Subject: [issue35010] sort by partially reversed key tuple In-Reply-To: <1539771040.54.0.788709270274.issue35010@psf.upfronthosting.co.za> Message-ID: <1539791217.97.0.788709270274.issue35010@psf.upfronthosting.co.za> Cyker Way added the comment: Previous upload `example.py` was missing `__eq__`. Updated in `example-1.py`. ---------- Added file: https://bugs.python.org/file47876/example-1.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 11:50:39 2018 From: report at bugs.python.org (Matt Wilber) Date: Wed, 17 Oct 2018 15:50:39 +0000 Subject: [issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__ In-Reply-To: <1539668705.97.0.788709270274.issue34995@psf.upfronthosting.co.za> Message-ID: <1539791439.09.0.788709270274.issue34995@psf.upfronthosting.co.za> Matt Wilber added the comment: I agree, a comment can serve the same purpose. But for the same reasons it's useful to express typing hints in Python with real syntax, and the reasons it's useful to have the abc module in the first place, I think it is useful to be able to annotate an abstract method with @cachedproperty. The purpose of this change is not to add code developers would try to use at runtime, it is to allow developers to communicate their intentions to static code analysis tools and to other developers, using standard decorators from builtins that do not break one another. Indeed, abstract methods should not be executed (on purpose), but Python still supports abstract methods to protect developers who want to explicitly label their code as "do not execute". Therefore, please do not think of this change as something someone would try to execute. It is for hinting functionality, and it is to protect developers who would decorate a method with @cached_property and @abstractmethod and find that abc's functionality was unexpectedly broken. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 12:20:05 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 17 Oct 2018 16:20:05 +0000 Subject: [issue34901] Missing isolated (-I) flag in sys.flags table In-Reply-To: <1538718824.99.0.545547206417.issue34901@psf.upfronthosting.co.za> Message-ID: <1539793205.52.0.788709270274.issue34901@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In spite of what is said above, PR 9708 was merged before the auto-backport. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 12:24:19 2018 From: report at bugs.python.org (Danish Prakash) Date: Wed, 17 Oct 2018 16:24:19 +0000 Subject: [issue34901] Missing isolated (-I) flag in sys.flags table In-Reply-To: <1538718824.99.0.545547206417.issue34901@psf.upfronthosting.co.za> Message-ID: <1539793459.48.0.788709270274.issue34901@psf.upfronthosting.co.za> Change by Danish Prakash : ---------- pull_requests: +9283 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 12:25:33 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 17 Oct 2018 16:25:33 +0000 Subject: [issue34623] _elementtree.c doesn't call XML_SetHashSalt() In-Reply-To: <1536619664.47.0.56676864532.issue34623@psf.upfronthosting.co.za> Message-ID: <1539793533.06.0.788709270274.issue34623@psf.upfronthosting.co.za> Change by Charalampos Stratakis : ---------- pull_requests: +9284 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 12:27:15 2018 From: report at bugs.python.org (Matt Wilber) Date: Wed, 17 Oct 2018 16:27:15 +0000 Subject: [issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__ In-Reply-To: <1539668705.97.0.788709270274.issue34995@psf.upfronthosting.co.za> Message-ID: <1539793635.19.0.788709270274.issue34995@psf.upfronthosting.co.za> Matt Wilber added the comment: To add some more context, the existing Python documentation is a little misleading in this situation: https://docs.python.org/3/library/abc.html#abc.abstractmethod It shows that labeling a method with @property @abstractmethod ought to be done in the order above, but this ordering currently breaks the abstract method check if you swap our @property for @cached_property. The documentation also says "In order to correctly interoperate with the abstract base class machinery, the descriptor must identify itself as abstract using __isabstractmethod__." which @cached_property does not do, but as the documentation then shows, @property does do this properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 13:38:36 2018 From: report at bugs.python.org (paul j3) Date: Wed, 17 Oct 2018 17:38:36 +0000 Subject: [issue35005] argparse should accept json and yaml argument types In-Reply-To: <1539735338.04.0.788709270274.issue35005@psf.upfronthosting.co.za> Message-ID: <1539797916.05.0.788709270274.issue35005@psf.upfronthosting.co.za> paul j3 added the comment: If I define a 'type' function like: def readdata(astr): if astr.startswith('@'): with open(astr[1:], 'r') as f: d = json.load(f) return d else: return astr I can use it to load a json file, or use the string directly: In [59]: parser = argparse.ArgumentParser() In [60]: parser.add_argument('-d','--data', type=readdata); In [61]: parser.parse_args(['-d','@foo.json']) Out[61]: Namespace(data={'foo': 12, 'bar': 'twelve'}) In [62]: parser.parse_args(['-d','xxx']) Out[62]: Namespace(data='xxx') This seems to behave as the 'curl' and 'ansible' examples you give, where the interpretation of the '@' is option specific. A fully functional version of this type function needs to catch possible errors (not a file, not proper json, etc) and raise a ValueError or argparse.ArgumentTypeError. The fact that 'curl -d' uses the '@', and 'fromfile_prefix_args' uses '@' in the documentation, should be seen as purely coincidental. argparse would be just as happy using '#' or '%' as fromfile-prefix characters, just so long as the shell passes them unchanged to 'sys.argv'. Conversely a type function can pay attention to special characters without needing to define them in the parser definition. argparse doesn't define many custom 'type' functions. Mostly it depends on people using stock Python functions like 'int' and 'float', or writing their own functions. This keeps things simple for the common uses, while giving more advanced users a lot of flexibility. This '@file' sensitivity could also be built into a custom Action subclass. There too, argparse has defined a set of common cases, but lets the users customize to their heart's content. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 13:59:22 2018 From: report at bugs.python.org (Brett Cannon) Date: Wed, 17 Oct 2018 17:59:22 +0000 Subject: [issue35006] itertools.combinations has wrong type when using the typing package In-Reply-To: <1539736694.32.0.788709270274.issue35006@psf.upfronthosting.co.za> Message-ID: <1539799162.56.0.788709270274.issue35006@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 14:10:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Oct 2018 18:10:39 +0000 Subject: [issue32892] Remove specific constant AST types in favor of ast.Constant In-Reply-To: <1519204597.27.0.467229070634.issue32892@psf.upfronthosting.co.za> Message-ID: <1539799839.94.0.788709270274.issue32892@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9285 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 15:30:39 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 17 Oct 2018 19:30:39 +0000 Subject: [issue24658] open().write() fails on 2 GB+ data (OS X) In-Reply-To: <1437188368.42.0.0977367912313.issue24658@psf.upfronthosting.co.za> Message-ID: <1539804639.65.0.788709270274.issue24658@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi all, Could you test the PR with Windows? I don't have a Windows computer. Thank you, St?phane ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 18:00:32 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 17 Oct 2018 22:00:32 +0000 Subject: [issue14911] generator.throw() documentation inaccurate In-Reply-To: <1337943736.85.0.146138312281.issue14911@psf.upfronthosting.co.za> Message-ID: <1539813632.95.0.788709270274.issue14911@psf.upfronthosting.co.za> Cheryl Sabella added the comment: It seems that this patch was close to being merged. Would it be helpful for me to create a PR for it over 3.8? Thanks! ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 18:27:26 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 17 Oct 2018 22:27:26 +0000 Subject: [issue20582] socket.getnameinfo() does not document flags In-Reply-To: <1392042265.22.0.885252016144.issue20582@psf.upfronthosting.co.za> Message-ID: <1539815246.99.0.788709270274.issue20582@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +easy stage: -> needs patch type: -> enhancement versions: +Python 3.8 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 18:34:00 2018 From: report at bugs.python.org (Cyker Way) Date: Wed, 17 Oct 2018 22:34:00 +0000 Subject: [issue35010] sort by partially reversed key tuple In-Reply-To: <1539771040.54.0.788709270274.issue35010@psf.upfronthosting.co.za> Message-ID: <1539815640.06.0.788709270274.issue35010@psf.upfronthosting.co.za> Cyker Way added the comment: As for performance, I think both single-pass and multi-pass sorts have worst-case time complexity `m * n * log(n)`, assuming the number of items is `n` and each item has dimension `m`. Whichever is faster seems to be data-dependent. So I made a more comprehensive performance evaluation in `performance-1.py`. It turns out either single-pass or multi-pass can be 80-100% faster than the other, on different inputs. Since single-pass and multi-pass sorts are good at different inputs and there is currently no statistics on real application data supporting either, both look OK to me. But I hope you can add something in the interface of sorting functions (mainly `sorted` and `list.sort`) so that users don't have to write that multi-pass sort again and again. If the `keyspec` format is deemed too complicated, `keys` and `reverses` also look good to me: sorted(items, keys=(key0, key1, key2), reverses=(True, False, True)) And you are free to use whatever sorting algorithms in its implementation for this kind of task. ---------- Added file: https://bugs.python.org/file47877/performance-1.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 18:53:23 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 17 Oct 2018 22:53:23 +0000 Subject: [issue27405] Ability to trace Tcl commands executed by Tkinter In-Reply-To: <1467101160.96.0.000959009774067.issue27405@psf.upfronthosting.co.za> Message-ID: <1539816802.99.0.788709270274.issue27405@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Seems like this didn't make 3.7. Would it be good to make a PR targeting 3.8? ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 19:05:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Oct 2018 23:05:09 +0000 Subject: [issue24658] open().write() fails on 2 GB+ data (OS X) In-Reply-To: <1437188368.42.0.0977367912313.issue24658@psf.upfronthosting.co.za> Message-ID: <1539817509.65.0.788709270274.issue24658@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 74a8b6ea7e0a8508b13a1c75ec9b91febd8b5557 by Victor Stinner (St?phane Wirtel) in branch 'master': bpo-24658: Fix read/write greater than 2 GiB on macOS (GH-1705) https://github.com/python/cpython/commit/74a8b6ea7e0a8508b13a1c75ec9b91febd8b5557 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 19:06:01 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Oct 2018 23:06:01 +0000 Subject: [issue24658] open().write() fails on 2 GB+ data (OS X) In-Reply-To: <1437188368.42.0.0977367912313.issue24658@psf.upfronthosting.co.za> Message-ID: <1539817561.14.0.788709270274.issue24658@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9286 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 19:07:48 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 17 Oct 2018 23:07:48 +0000 Subject: [issue35010] sort by partially reversed key tuple In-Reply-To: <1539771040.54.0.788709270274.issue35010@psf.upfronthosting.co.za> Message-ID: <1539817668.14.0.788709270274.issue35010@psf.upfronthosting.co.za> Steven D'Aprano added the comment: > And you are free to use whatever sorting algorithms in its implementation for this kind of task. That's very kind of you *wink* At this point, I don't think there's much more point to discussing this further until Tim Peters weighs in and lets us know what he thinks. If he loves the idea, and is able to implement it, it may happen; if he is luke-warm or hates it, probably not. (My own *personal* view is that unless there is an obvious and consistent performance win from adding this, adding the extra complexity to both the sort implementation and the interface isn't worth the effort. Not every simple helper function needs to be a builtin.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 19:09:15 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Oct 2018 23:09:15 +0000 Subject: [issue24658] open().write() fails on 2 GB+ data (OS X) In-Reply-To: <1437188368.42.0.0977367912313.issue24658@psf.upfronthosting.co.za> Message-ID: <1539817755.48.0.788709270274.issue24658@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- versions: +Python 2.7, Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 19:27:19 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 17 Oct 2018 23:27:19 +0000 Subject: [issue24658] open().write() fails on 2 GB+ data (OS X) In-Reply-To: <1437188368.42.0.0977367912313.issue24658@psf.upfronthosting.co.za> Message-ID: <1539818839.81.0.788709270274.issue24658@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- pull_requests: +9287 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 19:52:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Oct 2018 23:52:27 +0000 Subject: [issue24658] open().write() fails on 2 GB+ data (OS X) In-Reply-To: <1437188368.42.0.0977367912313.issue24658@psf.upfronthosting.co.za> Message-ID: <1539820347.21.0.788709270274.issue24658@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a5ebc205beea2bf1501e4ac33ed6e81732dd0604 by Victor Stinner (St?phane Wirtel) in branch '3.6': [3.6] bpo-24658: Fix read/write greater than 2 GiB on macOS (GH-1705) (GH-9937) https://github.com/python/cpython/commit/a5ebc205beea2bf1501e4ac33ed6e81732dd0604 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 20:22:38 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 18 Oct 2018 00:22:38 +0000 Subject: [issue24568] Misc/NEWS: "free-after-use" -> "use-after-free" In-Reply-To: <1436098037.39.0.99506662274.issue24568@psf.upfronthosting.co.za> Message-ID: <1539822158.97.0.788709270274.issue24568@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- pull_requests: +9288 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 20:25:45 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 18 Oct 2018 00:25:45 +0000 Subject: [issue24658] open().write() fails on 2 GB+ data (OS X) In-Reply-To: <1437188368.42.0.0977367912313.issue24658@psf.upfronthosting.co.za> Message-ID: <1539822345.32.0.788709270274.issue24658@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- pull_requests: +9289 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 20:26:15 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 18 Oct 2018 00:26:15 +0000 Subject: [issue35011] Update to expat removed the pyexpatns.h, causing link time symbol conflicts vs other versions in an application Message-ID: <1539822375.56.0.788709270274.issue35011@psf.upfronthosting.co.za> New submission from Gregory P. Smith : These lines used to exist in Modules/expat/expat_external.h: /* Namespace external symbols to allow multiple libexpat version to co-exist. */ #include "pyexpatns.h" https://github.com/python/cpython/commit/5dc3f23b5fb0b510926012cb3732dae63cddea60#diff-3afaf7274c90ce1b7405f75ad825f545 removed them during an expat upgrade. This causes link time conflicts when embedding Python using its own expat in an application that also uses libexpat from the C/C++ side on its own. ---------- messages: 327919 nosy: gregory.p.smith priority: normal severity: normal status: open title: Update to expat removed the pyexpatns.h, causing link time symbol conflicts vs other versions in an application versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 20:28:03 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 18 Oct 2018 00:28:03 +0000 Subject: [issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions In-Reply-To: <1539822375.56.0.788709270274.issue35011@psf.upfronthosting.co.za> Message-ID: <1539822483.82.0.788709270274.issue35011@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Not a release blocker as most users probably do not run into this problem, but the pyexpatns.h mechanics should be restored. ---------- assignee: -> gregory.p.smith components: +Build, Extension Modules nosy: +benjamin.peterson stage: -> needs patch title: Update to expat removed the pyexpatns.h, causing link time symbol conflicts vs other versions in an application -> expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 20:37:53 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 18 Oct 2018 00:37:53 +0000 Subject: [issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions In-Reply-To: <1539822375.56.0.788709270274.issue35011@psf.upfronthosting.co.za> Message-ID: <1539823073.92.0.788709270274.issue35011@psf.upfronthosting.co.za> Gregory P. Smith added the comment: This appears to not have been shipped in a release yet. It is new in 3.6.7. cc'ing ned daily to see if he wants to include the fix (the PR is trivial, coming ASAP). I don't have a good feel for how this impacts the real world or not. We noticed because we embed CPython in larger applications that use a different copy of libexpat on their own. ---------- nosy: +ned.deily priority: normal -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 20:42:05 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 18 Oct 2018 00:42:05 +0000 Subject: [issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions In-Reply-To: <1539822375.56.0.788709270274.issue35011@psf.upfronthosting.co.za> Message-ID: <1539823325.72.0.788709270274.issue35011@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- keywords: +patch pull_requests: +9290 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 20:51:42 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 18 Oct 2018 00:51:42 +0000 Subject: [issue35005] argparse should accept json and yaml argument types In-Reply-To: <1539735338.04.0.788709270274.issue35005@psf.upfronthosting.co.za> Message-ID: <1539823902.27.0.788709270274.issue35005@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Bob, do you prefer the current arrange where the user needs to write their own "type" function to handle JSON and YAML, or would you like to add this as a built-in option? ---------- assignee: -> bob.ippolito nosy: +bob.ippolito, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 21:01:49 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 18 Oct 2018 01:01:49 +0000 Subject: [issue35010] sort by partially reversed key tuple In-Reply-To: <1539771040.54.0.788709270274.issue35010@psf.upfronthosting.co.za> Message-ID: <1539824509.48.0.788709270274.issue35010@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Cyker, thank you for the suggestion, but we're going to decline. The sorting HOWTO docs show how to exploit sort stability with multiple passes to handle a mix of ascending and descending steps. It would complicate the API to have an array of key functions, each with their own ascending and descending flag. Likewise, it would also complicate the implementation. The added complexity just isn't worth it when we already have a reasonable solution and when the use case itself isn't very common. ---------- assignee: -> rhettinger nosy: +rhettinger resolution: -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 21:02:03 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 18 Oct 2018 01:02:03 +0000 Subject: [issue35010] sort by partially reversed key tuple In-Reply-To: <1539771040.54.0.788709270274.issue35010@psf.upfronthosting.co.za> Message-ID: <1539824523.48.0.788709270274.issue35010@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 21:10:52 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 18 Oct 2018 01:10:52 +0000 Subject: [issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions In-Reply-To: <1539822375.56.0.788709270274.issue35011@psf.upfronthosting.co.za> Message-ID: <1539825052.0.0.788709270274.issue35011@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset 9d4712bc8f26bf1d7e626b53ab092fe030bcd68d by Gregory P. Smith in branch 'master': bpo-35011: Restore use of pyexpatns.h in libexpat (GH-9939) https://github.com/python/cpython/commit/9d4712bc8f26bf1d7e626b53ab092fe030bcd68d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 21:11:03 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Oct 2018 01:11:03 +0000 Subject: [issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions In-Reply-To: <1539822375.56.0.788709270274.issue35011@psf.upfronthosting.co.za> Message-ID: <1539825063.58.0.788709270274.issue35011@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9291 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 21:11:11 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Oct 2018 01:11:11 +0000 Subject: [issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions In-Reply-To: <1539822375.56.0.788709270274.issue35011@psf.upfronthosting.co.za> Message-ID: <1539825071.38.0.788709270274.issue35011@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9292 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 21:17:32 2018 From: report at bugs.python.org (Tim Peters) Date: Thu, 18 Oct 2018 01:17:32 +0000 Subject: [issue35010] sort by partially reversed key tuple In-Reply-To: <1539771040.54.0.788709270274.issue35010@psf.upfronthosting.co.za> Message-ID: <1539825452.5.0.788709270274.issue35010@psf.upfronthosting.co.za> Tim Peters added the comment: This comes up every few years, but that's about it. Here's the iteration from 2 years ago: https://mail.python.org/pipermail/python-ideas/2016-October/043039.html Follow the thread. It contains easy-to-use wrappers for both "do it in multiple simple passes" and "do it in one messy pass" approaches. It's impossible for an implementation to guess in advance which will be faster - it depends on the data, which only the user can know about in advance. There's nothing the implementation could do to improve O() behavior regardless. If there were "real" demand for this, someone by now would have packaged those wrappers and made them available on PyPI. Since that seems not to have happened, I agree with Raymond rejecting this idea for the core at this time. There would be a higher-than-usual bar for that anyway, because the sorting code is already highly complex, and building in the wrappers would be a tedious, long-winded exercise in recoding in C what's _easily_ coded in Python already. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 21:50:36 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 18 Oct 2018 01:50:36 +0000 Subject: [issue35010] sort by partially reversed key tuple In-Reply-To: <1539771040.54.0.788709270274.issue35010@psf.upfronthosting.co.za> Message-ID: <1539827436.09.0.788709270274.issue35010@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Sorry to comment on the closed issue. I think the multisort recipe [0] is pretty neat can be added to the sorting howto page instead of being lost in the mailing list thread. It was suggested for addition later in the thread but never got added. I guess I will open up a separate issue for the open PR and possibly add the recipe with the PR if it's okay. Thoughts? Thanks much for the explanation Tim :) [0] https://mail.python.org/pipermail/python-ideas/2016-October/043045.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 22:05:52 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Oct 2018 02:05:52 +0000 Subject: [issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions In-Reply-To: <1539822375.56.0.788709270274.issue35011@psf.upfronthosting.co.za> Message-ID: <1539828352.4.0.788709270274.issue35011@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 4bfecb9298d447d5599ea76f3f68f772c38b8fd0 by Miss Islington (bot) in branch '3.6': [3.6] bpo-35011: Restore use of pyexpatns.h in libexpat (GH-9939) (GH-9941) https://github.com/python/cpython/commit/4bfecb9298d447d5599ea76f3f68f772c38b8fd0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 22:06:34 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Oct 2018 02:06:34 +0000 Subject: [issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions In-Reply-To: <1539822375.56.0.788709270274.issue35011@psf.upfronthosting.co.za> Message-ID: <1539828394.63.0.788709270274.issue35011@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 35ae99d7b394af0ce01460f7bccd7449a82289ad by Miss Islington (bot) in branch '3.7': [3.7] bpo-35011: Restore use of pyexpatns.h in libexpat (GH-9939) (GH-9940) https://github.com/python/cpython/commit/35ae99d7b394af0ce01460f7bccd7449a82289ad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 22:07:24 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 18 Oct 2018 02:07:24 +0000 Subject: [issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions In-Reply-To: <1539822375.56.0.788709270274.issue35011@psf.upfronthosting.co.za> Message-ID: <1539828444.2.0.788709270274.issue35011@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 17 22:20:51 2018 From: report at bugs.python.org (Kevin Walzer) Date: Thu, 18 Oct 2018 02:20:51 +0000 Subject: [issue34370] Tkinter scroll issues on macOS In-Reply-To: <1533895636.89.0.56676864532.issue34370@psf.upfronthosting.co.za> Message-ID: <1539829251.52.0.788709270274.issue34370@psf.upfronthosting.co.za> Kevin Walzer added the comment: Release of Tk 8.6.9 very soon; includes fixes for Mac scrolling as well as support for 10.14 macOS, with Dark Mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 00:00:33 2018 From: report at bugs.python.org (Ethan Furman) Date: Thu, 18 Oct 2018 04:00:33 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1539835233.22.0.788709270274.issue34909@psf.upfronthosting.co.za> Ethan Furman added the comment: Okay, the patch is here: https://github.com/ethanfurman/cpython/tree/enum_news_entry But I managed to screw something up, and my wife just got hit by a car so this is now a really low priority. Ned, if you could grab the relevant pieces from the wreck that is that branch I would be grateful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 00:06:23 2018 From: report at bugs.python.org (Michal Nowikowski) Date: Thu, 18 Oct 2018 04:06:23 +0000 Subject: [issue30999] statistics module: add "key" keyword argument to median, mode, ... In-Reply-To: <1500847822.23.0.66362631161.issue30999@psf.upfronthosting.co.za> Message-ID: <1539835583.36.0.788709270274.issue30999@psf.upfronthosting.co.za> Michal Nowikowski added the comment: What is the progress of this issue? I'm also interested in this feature. I expected that these functions will behave as built-in min and max. They have key argument, see here: https://docs.python.org/3/library/functions.html#max ---------- nosy: +godfryd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 00:23:03 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 18 Oct 2018 04:23:03 +0000 Subject: [issue34670] Add set_post_handshake_auth for TLS 1.3 In-Reply-To: <1536884168.95.0.956365154283.issue34670@psf.upfronthosting.co.za> Message-ID: <1539836583.94.0.788709270274.issue34670@psf.upfronthosting.co.za> Nathaniel Smith added the comment: FYI Christian, your "typical scenario for HTTP" doesn't make sense to me... you can't send HTTP Connection Upgrade in the middle of a regular request/response cycle. I feel like the typical scenario ought to be more like: * client * send ``HTTP GET /path`` * server * recv * verify_client_post_handshake (maybe... via calling SSL_do_handshake again?) * client * recv * send upgrade confirmation (emits Certificate, CertificateVerify, Finish message) * server * recv * verify certificate * send either the requested response, or a 401 Unauthorized depending But I don't really understand the underlying design here, either at the TLS 1.3 level or the openssl level, and haven't found very useful docs yet, so I could be wrong. ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 00:40:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 04:40:37 +0000 Subject: [issue35010] sort by partially reversed key tuple In-Reply-To: <1539771040.54.0.788709270274.issue35010@psf.upfronthosting.co.za> Message-ID: <1539837637.09.0.788709270274.issue35010@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Would be worth to add a wrapper in functools which revert the sorting order? class reverted_order: def __init__(self, value): self.value = value def __lt__(self, other): if isinstance(other, reverted_order): other = other.value return self.value.__ge__(other) # __le__, __gt__, __ge__, __eq__, __ne__, __hash__ Then you could use key=lambda x: (x['url'], reverted_order(x['user'])). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 00:54:49 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 18 Oct 2018 04:54:49 +0000 Subject: [issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions In-Reply-To: <1539822375.56.0.788709270274.issue35011@psf.upfronthosting.co.za> Message-ID: <1539838489.62.0.788709270274.issue35011@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Sorry for breaking that, and thanks for the fix! I'm curious, though, why are you still using the embedded expat rather than linking everything against the same expat? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 01:49:17 2018 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 18 Oct 2018 05:49:17 +0000 Subject: [issue34999] copy.copy and deepcopy do return same logger objects in 3.7 In-Reply-To: <1539704367.04.0.788709270274.issue34999@psf.upfronthosting.co.za> Message-ID: <1539841757.74.0.788709270274.issue34999@psf.upfronthosting.co.za> Vinay Sajip added the comment: Loggers are singletons, so the pickling operation just pickles the name. Unpickling just leads to getting the pickled name and calling getLogger(name), which will return the same object that was pickled (I'd forgotten about issue30520). I suggest as a workaround that a context manager approach could be used to save and restore part of the logging configuration around various operations (at least levels and handlers), as outlined here: https://docs.python.org/3/howto/logging-cookbook.html#using-a-context-manager-for-selective-logging This would avoid the need for making copies just to save and restore state. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 02:47:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Oct 2018 06:47:25 +0000 Subject: [issue35012] [3.7] test_multiprocessing_spawn hangs randomly on AppVeyor Message-ID: <1539845245.85.0.788709270274.issue35012@psf.upfronthosting.co.za> New submission from STINNER Victor : On AppVeyor CI, test_multiprocessing_spawn was running for longer than 50 min, whereas usually it only takes around 2 minutes https://ci.appveyor.com/project/python/cpython/builds/19594644 ... running: test_multiprocessing_spawn (50 min 33 sec) running: test_multiprocessing_spawn (51 min 3 sec) Related PR: https://github.com/python/cpython/pull/9936 ---------- messages: 327936 nosy: vstinner priority: normal severity: normal status: open title: [3.7] test_multiprocessing_spawn hangs randomly on AppVeyor versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 02:49:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 06:49:59 +0000 Subject: [issue35008] Leaks xml.etree.ElementTree.Element.__setsate__() In-Reply-To: <1539765961.94.0.788709270274.issue35008@psf.upfronthosting.co.za> Message-ID: <1539845399.95.0.788709270274.issue35008@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 6f906b3d727d6b341abd5ad9c0652bbcbd5eb024 by Serhiy Storchaka in branch 'master': bpo-35008: Fix possible leaks in Element.__setstate__(). (GH-9924) https://github.com/python/cpython/commit/6f906b3d727d6b341abd5ad9c0652bbcbd5eb024 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 02:50:12 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Oct 2018 06:50:12 +0000 Subject: [issue35008] Leaks xml.etree.ElementTree.Element.__setsate__() In-Reply-To: <1539765961.94.0.788709270274.issue35008@psf.upfronthosting.co.za> Message-ID: <1539845412.66.0.788709270274.issue35008@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9293 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 02:50:20 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Oct 2018 06:50:20 +0000 Subject: [issue35008] Leaks xml.etree.ElementTree.Element.__setsate__() In-Reply-To: <1539765961.94.0.788709270274.issue35008@psf.upfronthosting.co.za> Message-ID: <1539845420.71.0.788709270274.issue35008@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9294 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 02:51:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Oct 2018 06:51:32 +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: <1539845492.27.0.788709270274.issue35012@psf.upfronthosting.co.za> STINNER Victor added the comment: Question: why faulthandler didn't kill the test after 15 min? .github/appveyor.yml runs the test suite using --timeout=1200. Extract of logs: --- PCbuild\rt.bat -q -uall -u-cpu -u-largefile -rwW --slowest --timeout=1200 --fail-env-changed -j0 C:\projects\cpython>"C:\projects\cpython\PCbuild\win32\python.exe" -u -Wd -E -bb -m test -uall -u-cpu -u-largefile -rwW --slowest --timeout 1200 --fail-env-changed -j0 == CPython 3.7.1rc2+ (a4ccd9402d:a4ccd9402d, Oct 17 2018, 23:09:59) [MSC v.1915 32 bit (Intel)] == Windows-10-10.0.14393-SP0 little-endian == cwd: C:\projects\cpython\build\test_python_4988 == CPU count: 2 == encodings: locale=cp1252, FS=utf-8 Using random seed 7230291 Run tests in parallel using 4 child processes 0:00:00 [ 1/416] test_wait4 skipped test_wait4 skipped -- object has no attribute 'fork' 0:00:00 [ 2/416] test_augassign passed (...) --- See also bpo-34714 and "timeout in test_multiprocessing_spawn x86 Windows7 3.x buildbot" and bpo-34513: "test_multiprocessing_spawn fails on x86 Windows7 3.7 buildbot". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 02:56:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 06:56:21 +0000 Subject: [issue35013] Add more type checks for children of xml.etree.ElementTree.Element Message-ID: <1539845781.97.0.788709270274.issue35013@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Currently some methods for xml.etree.ElementTree.Element check the type subelements: append(), extend(), insert(). But there are other ways to add non-Element children: __setitem__(), __setstate__(), __deepcopy__(). This could cause crashes later in the C code and required to add numerous type checks for iterating and searching. Since the intention was to prevent adding non-Element children, it is better to check the type every time when add new children. ---------- assignee: serhiy.storchaka components: Library (Lib), XML messages: 327939 nosy: eli.bendersky, scoder, serhiy.storchaka priority: normal severity: normal status: open title: Add more type checks for children of xml.etree.ElementTree.Element type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 02:58:44 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Oct 2018 06:58:44 +0000 Subject: [issue24658] open().write() fails on 2 GB+ data (OS X) In-Reply-To: <1437188368.42.0.0977367912313.issue24658@psf.upfronthosting.co.za> Message-ID: <1539845924.8.0.788709270274.issue24658@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 178d1c07778553bf66e09fe0bb13796be3fb9abf by Miss Islington (bot) in branch '3.7': bpo-24658: Fix read/write greater than 2 GiB on macOS (GH-1705) https://github.com/python/cpython/commit/178d1c07778553bf66e09fe0bb13796be3fb9abf ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 03:04:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 07:04:25 +0000 Subject: [issue35013] Add more type checks for children of xml.etree.ElementTree.Element In-Reply-To: <1539845781.97.0.788709270274.issue35013@psf.upfronthosting.co.za> Message-ID: <1539846265.46.0.788709270274.issue35013@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +9295 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 03:16:45 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Oct 2018 07:16:45 +0000 Subject: [issue35008] Leaks xml.etree.ElementTree.Element.__setsate__() In-Reply-To: <1539765961.94.0.788709270274.issue35008@psf.upfronthosting.co.za> Message-ID: <1539847005.57.0.788709270274.issue35008@psf.upfronthosting.co.za> miss-islington added the comment: New changeset bcbefe23fe2eb616a03c22764ba4ea79e12e3e28 by Miss Islington (bot) in branch '3.6': bpo-35008: Fix possible leaks in Element.__setstate__(). (GH-9924) https://github.com/python/cpython/commit/bcbefe23fe2eb616a03c22764ba4ea79e12e3e28 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 03:17:19 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Oct 2018 07:17:19 +0000 Subject: [issue35008] Leaks xml.etree.ElementTree.Element.__setsate__() In-Reply-To: <1539765961.94.0.788709270274.issue35008@psf.upfronthosting.co.za> Message-ID: <1539847039.97.0.788709270274.issue35008@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 5b9b9353de502853b42a20d950ad0ac1fadd05ea by Miss Islington (bot) in branch '3.7': bpo-35008: Fix possible leaks in Element.__setstate__(). (GH-9924) https://github.com/python/cpython/commit/5b9b9353de502853b42a20d950ad0ac1fadd05ea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 03:45:29 2018 From: report at bugs.python.org (sebix) Date: Thu, 18 Oct 2018 07:45:29 +0000 Subject: [issue34999] copy.copy and deepcopy do return same logger objects in 3.7 In-Reply-To: <1539704367.04.0.788709270274.issue34999@psf.upfronthosting.co.za> Message-ID: <1539848729.69.0.788709270274.issue34999@psf.upfronthosting.co.za> sebix added the comment: > I suggest as a workaround that a context manager approach could be used to save and restore part of the logging configuration around various operations (at least levels and handlers), as outlined here: > https://docs.python.org/3/howto/logging-cookbook.html#using-a-context-manager-for-selective-logging > This would avoid the need for making copies just to save and restore state. Yeah, I learned about this possibility in my research before reporting this bug and I will try to use it - however I could not get it working yet. I adapted the bug's title as it turned out that - if I understood it correctly - the bug a bit different that I initially thought. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 04:06:11 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 18 Oct 2018 08:06:11 +0000 Subject: [issue34914] Clarify text encoding used to enable UTF-8 mode In-Reply-To: <1539208054.87.0.788709270274.issue34914@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Your explanation is why this is a docs enhancement proposal rather than a bug report: as far as we're aware, all encodings that get used as locale encodings have the property that encoding "-X utf8" with the locale encoding gives the same answer as encoding it with ASCII. Encodings where this isn't true (like UTF-16-LE) don't get used as locale encodings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 04:50:17 2018 From: report at bugs.python.org (=?utf-8?b?UsOpbXkgSHVic2NoZXIgWzpuYXRpbV0=?=) Date: Thu, 18 Oct 2018 08:50:17 +0000 Subject: [issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError Message-ID: <1539852617.86.0.788709270274.issue35014@psf.upfronthosting.co.za> New submission from R?my Hubscher [:natim] : Asyncio.create_subprocess_exec accepts a list of str as parameter which lead to UnicodeEncodeError I think it should accept only bytes shouldn't it? ---------- components: asyncio messages: 327945 nosy: asvetlov, natim, yselivanov priority: normal severity: normal status: open title: asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 04:50:28 2018 From: report at bugs.python.org (Julien Palard) Date: Thu, 18 Oct 2018 08:50:28 +0000 Subject: [issue35015] availability directive breaks po files Message-ID: <1539852628.85.0.788709270274.issue35015@psf.upfronthosting.co.za> New submission from Julien Palard : The new availability directive introduced in 2d6097d027e0dd3debbabc702aa9c98d94ba32a3 (https://bugs.python.org/issue11233) breaks po files (sphinx-build -b gettext): Here's the diff I'm getting on os.po from os.rst: msgid "" -"Availability: Unix, Windows. :func:`spawnlp`, :func:`spawnlpe`, :func:" -"`spawnvp` and :func:`spawnvpe` are not available on Windows. :func:" -"`spawnle` and :func:`spawnve` are not thread-safe on Windows; we advise you " -"to use the :mod:`subprocess` module instead." +"Availability: Unix, Windows. spawnlp(), spawnlpe(), spawnvp() and " +"spawnvpe() are not available on Windows. spawnle() and spawnve() are not " +"thread-safe on Windows; we advise you to use the subprocess module instead." The roles has been removed in the po files (but not in the original rst files), so it looks like the availability directive caused the drop of roles, but I still don't understand why. ---------- assignee: docs at python components: Documentation messages: 327946 nosy: docs at python, georg.brandl, mdk priority: normal severity: normal status: open title: availability directive breaks po files versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 04:52:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Oct 2018 08:52:07 +0000 Subject: [issue34765] Update install-sh In-Reply-To: <1537544827.56.0.956365154283.issue34765@psf.upfronthosting.co.za> Message-ID: <1539852727.16.0.788709270274.issue34765@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b7ad31c8926aad2fdd0d4661373c25cc9d753a40 by Victor Stinner (stratakis) in branch 'master': bpo-34765: Update the install-sh file (GH-9592) https://github.com/python/cpython/commit/b7ad31c8926aad2fdd0d4661373c25cc9d753a40 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 05:32:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Oct 2018 09:32:26 +0000 Subject: [issue34765] Update install-sh In-Reply-To: <1537544827.56.0.956365154283.issue34765@psf.upfronthosting.co.za> Message-ID: <1539855146.35.0.788709270274.issue34765@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Charalampos Stratakis for the change! > If there's no actual bug, it certainly does not need to be done on maintenance branches. I concur. Since install-sh has been updated in the master branch, I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 05:33:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 09:33:45 +0000 Subject: [issue35008] Leaks xml.etree.ElementTree.Element.__setsate__() In-Reply-To: <1539765961.94.0.788709270274.issue35008@psf.upfronthosting.co.za> Message-ID: <1539855225.17.0.788709270274.issue35008@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 Oct 18 05:33:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Oct 2018 09:33:54 +0000 Subject: [issue17837] Support for building on ppc64p7 In-Reply-To: <1366872804.53.0.68863925041.issue17837@psf.upfronthosting.co.za> Message-ID: <1539855234.72.0.788709270274.issue17837@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm sorry, but since nobody is able to review or test your patch, I have to close this issue which didn't get any activity for 5 years :-( ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 05:36:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Oct 2018 09:36:23 +0000 Subject: [issue17837] Support for building on ppc64p7 In-Reply-To: <1366872804.53.0.68863925041.issue17837@psf.upfronthosting.co.za> Message-ID: <1539855383.45.0.788709270274.issue17837@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 05:38:34 2018 From: report at bugs.python.org (Ivan Krivosheev) Date: Thu, 18 Oct 2018 09:38:34 +0000 Subject: [issue35016] \r to match add into address header with not-ascii character Message-ID: <1539855514.48.0.788709270274.issue35016@psf.upfronthosting.co.za> New submission from Ivan Krivosheev : When convert email.message.Message to bytes, into header with non-ascii character in address add to match *\r* symbol. Simple script for reproduce problem: >>> from email.message import Message >>> from email.policy import SMTP >>> msg = Message(policy=SMTP) >>> msg['To'] = '???? ???? ' >>> print(msg.as_bytes()) On python 3.5 result: >>> b'To: =?utf-8?b?0K7Qt9C10YAg0J7QtNC40L0=?= \r\n\r\n' On python 3.6, python 3.7: >>> b'To:\r\n =?utf-8?b?0K7Qt9C10YAg0J7QtNC40L0=?= \r\r\r\r\r\n\r\n' ---------- components: email files: email1.py messages: 327950 nosy: barry, ikrivosheev, r.david.murray priority: normal severity: normal status: open title: \r to match add into address header with not-ascii character type: behavior versions: Python 3.6, Python 3.7 Added file: https://bugs.python.org/file47878/email1.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 05:40:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 09:40:47 +0000 Subject: [issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__ In-Reply-To: <1539668705.97.0.788709270274.issue34995@psf.upfronthosting.co.za> Message-ID: <1539855647.81.0.788709270274.issue34995@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Well, you can combine @abstractmethod with @property in an abstract class. This will give you type hints etc. @cached_property is a detail of concrete implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 05:50:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 09:50:02 +0000 Subject: [issue34999] copy.copy and deepcopy do return same logger objects in 3.7 In-Reply-To: <1539704367.04.0.788709270274.issue34999@psf.upfronthosting.co.za> Message-ID: <1539856202.88.0.788709270274.issue34999@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: So that I think we can close this issue, since this is not a bug, but an intentional behavior. copy.copy() also consider functions and classes as atomic, although they are not immutable, and there are use cases for making a modified copy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 05:50:45 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 18 Oct 2018 09:50:45 +0000 Subject: [issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError In-Reply-To: <1539852617.86.0.788709270274.issue35014@psf.upfronthosting.co.za> Message-ID: <1539856245.17.0.788709270274.issue35014@psf.upfronthosting.co.za> Andrew Svetlov added the comment: List of strings works on both my local Linux box and CPython test suite. Please provide more info about the error. Stacktrace can help ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 05:54:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Oct 2018 09:54:30 +0000 Subject: [issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError In-Reply-To: <1539852617.86.0.788709270274.issue35014@psf.upfronthosting.co.za> Message-ID: <1539856470.85.0.788709270274.issue35014@psf.upfronthosting.co.za> STINNER Victor added the comment: Hi Remy, > Asyncio.create_subprocess_exec accepts a list of str as parameter which lead to UnicodeEncodeError I think it should accept only bytes shouldn't it? Can you elaborate? On which OS? What is your error message? Can you paste a traceback? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 06:04:25 2018 From: report at bugs.python.org (=?utf-8?b?UsOpbXkgSHVic2NoZXIgWzpuYXRpbV0=?=) Date: Thu, 18 Oct 2018 10:04:25 +0000 Subject: [issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError In-Reply-To: <1539852617.86.0.788709270274.issue35014@psf.upfronthosting.co.za> Message-ID: <1539857065.82.0.788709270274.issue35014@psf.upfronthosting.co.za> R?my Hubscher [:natim] added the comment: > List of strings works on both my local Linux box and CPython test suite. Indeed that's why I posted this bug report, in my opinion it should work only with bytes string. > Can you elaborate? On which OS? What is your error message? Can you paste a traceback? If you try to send a UTF-8 string on a linux box for instance, you might get a UnicodeEncodeError. Let me try to provide you with a script to reproduce this error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 06:08:35 2018 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 18 Oct 2018 10:08:35 +0000 Subject: [issue34999] copy.copy and deepcopy do return same logger objects in 3.7 In-Reply-To: <1539704367.04.0.788709270274.issue34999@psf.upfronthosting.co.za> Message-ID: <1539857315.27.0.788709270274.issue34999@psf.upfronthosting.co.za> Vinay Sajip added the comment: Closing as per Serhiy's advice - assume that's OK. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 06:10:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 10:10:27 +0000 Subject: [issue34475] functools.partial objects have no __qualname__ attribute In-Reply-To: <1535034359.11.0.56676864532.issue34475@psf.upfronthosting.co.za> Message-ID: <1539857427.54.0.788709270274.issue34475@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: partial objects lack many other function attributes: __name__, __module__ (and __qualname__ doesn't make sense without __module__), __annotations__, __get__(), etc. It would be nice to make these types more similar, but attributes shouldn't lie. And I am not sure what partial.__qualname__ can be. It shouldn't be the __qualname__ of the wrapped function, since the partial object differs from it, and is not accessible by same name. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 06:14:04 2018 From: report at bugs.python.org (Xiao Di Guan) Date: Thu, 18 Oct 2018 10:14:04 +0000 Subject: [issue34958] urllib.error.HTTPError.fp is not closed when error is finalized on Windows In-Reply-To: <1539265749.67.0.788709270274.issue34958@psf.upfronthosting.co.za> Message-ID: <1539857644.76.0.788709270274.issue34958@psf.upfronthosting.co.za> Change by Xiao Di Guan : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 06:16:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Oct 2018 10:16:20 +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: <1539857780.31.0.788709270274.issue35012@psf.upfronthosting.co.za> STINNER Victor added the comment: I identified a race condition: https://bugs.python.org/issue33966 https://github.com/python/cpython/pull/7966 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 06:17:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Oct 2018 10:17:56 +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: <1539857876.34.0.788709270274.issue35012@psf.upfronthosting.co.za> STINNER Victor added the comment: Extract of bpo-34714: File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\spawn.py", line 107, in spawn_main new_handle = reduction.duplicate(pipe_handle, File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\reduction.py", line 79, in duplicate return _winapi.DuplicateHandle( PermissionError: [WinError 5] Access is denied That's why I'm asking if this issue can be related to bpo-33966. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 06:25:04 2018 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 18 Oct 2018 10:25:04 +0000 Subject: [issue32789] Note missing from logging.debug() docs In-Reply-To: <1518018819.58.0.467229070634.issue32789@psf.upfronthosting.co.za> Message-ID: <1539858304.51.0.788709270274.issue32789@psf.upfronthosting.co.za> Change by Vinay Sajip : ---------- keywords: +patch pull_requests: +9296 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 06:26:08 2018 From: report at bugs.python.org (Ivan Krivosheev) Date: Thu, 18 Oct 2018 10:26:08 +0000 Subject: [issue35016] \r to match add into address header with not-ascii character In-Reply-To: <1539855514.48.0.788709270274.issue35016@psf.upfronthosting.co.za> Message-ID: <1539858368.89.0.788709270274.issue35016@psf.upfronthosting.co.za> Change by Ivan Krivosheev : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 06:31:56 2018 From: report at bugs.python.org (Ivan Krivosheev) Date: Thu, 18 Oct 2018 10:31:56 +0000 Subject: [issue35016] \r to match add into address header with not-ascii character In-Reply-To: <1539855514.48.0.788709270274.issue35016@psf.upfronthosting.co.za> Message-ID: <1539858716.59.0.788709270274.issue35016@psf.upfronthosting.co.za> Change by Ivan Krivosheev : ---------- keywords: +patch pull_requests: +9297 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 06:32:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 10:32:46 +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: <1539858766.68.0.788709270274.issue34987@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You are right. Although, get_class() can return NULL without set an exception. We have to set an exception in such case (the same exception as for `obj_class != cls` looks appropriate). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 06:33:59 2018 From: report at bugs.python.org (Gus Goulart) Date: Thu, 18 Oct 2018 10:33:59 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1539858839.21.0.788709270274.issue27741@psf.upfronthosting.co.za> Gus Goulart added the comment: As far as I can see, every time something changes on datetime.strptime(), it will invalidate that section of the documentation. On the other hand, I believe the comparison with datetime(*(time.strptime(date_string, format)[0:6])" is interesting and valuable to keep. Given that, instead of "This is equivalent to [...]", I would suggest something like: "This is similar to [...], but datetime.strptime() is better since it retains both microseconds and timezone data." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 06:53:44 2018 From: report at bugs.python.org (=?utf-8?b?UsOpbXkgSHVic2NoZXIgWzpuYXRpbV0=?=) Date: Thu, 18 Oct 2018 10:53:44 +0000 Subject: [issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError In-Reply-To: <1539852617.86.0.788709270274.issue35014@psf.upfronthosting.co.za> Message-ID: <1539860024.35.0.788709270274.issue35014@psf.upfronthosting.co.za> R?my Hubscher [:natim] added the comment: I though this would be sufficient to actually reproduce the issue. However it seems that if the system encoding is UTF-8 it does work properly. Here is the traceback I had: ``` UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 69: ordinal not in range(128) File "worker.py", line 393, in return_code = loop.run_until_complete(main(loop)) File "asyncio/base_events.py", line 467, in run_until_complete return future.result() File "worker.py", line 346, in main '-f mp4', '-o', '{}/{}.mp4'.format(download_tempdir, video_id)) File "worker.py", line 268, in run_command proc = await create File "asyncio/subprocess.py", line 225, in create_subprocess_exec stderr=stderr, **kwds) File "asyncio/base_events.py", line 1191, in subprocess_exec bufsize, **kwargs) File "asyncio/unix_events.py", line 191, in _make_subprocess_transport **kwargs) File "asyncio/base_subprocess.py", line 39, in __init__ stderr=stderr, bufsize=bufsize, **kwargs) File "asyncio/unix_events.py", line 697, in _start universal_newlines=False, bufsize=bufsize, **kwargs) File "python3.6/subprocess.py", line 707, in __init__ restore_signals, start_new_session) File "python3.6/subprocess.py", line 1267, in _execute_child restore_signals, start_new_session, preexec_fn) ``` ---------- Added file: https://bugs.python.org/file47879/demo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 06:56:13 2018 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 18 Oct 2018 10:56:13 +0000 Subject: [issue32789] Note missing from logging.debug() docs In-Reply-To: <1518018819.58.0.467229070634.issue32789@psf.upfronthosting.co.za> Message-ID: <1539860173.94.0.788709270274.issue32789@psf.upfronthosting.co.za> Vinay Sajip added the comment: Documentation for 3.6/3.7/3.8 updated. 3.5 is out of scope for this. ---------- nosy: +vinay.sajip resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 07:03:03 2018 From: report at bugs.python.org (=?utf-8?b?UsOpbXkgSHVic2NoZXIgWzpuYXRpbV0=?=) Date: Thu, 18 Oct 2018 11:03:03 +0000 Subject: [issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError In-Reply-To: <1539852617.86.0.788709270274.issue35014@psf.upfronthosting.co.za> Message-ID: <1539860583.36.0.788709270274.issue35014@psf.upfronthosting.co.za> R?my Hubscher [:natim] added the comment: I am adding the following info: If I run the following on the Docker image where I got the error I get: ``` import sys import locale print(sys.getdefaultencoding()) print(locale.getpreferredencoding()) ``` utf-8 ANSI_X3.4-1968 While if I run it on my machine I get: utf-8 UTF-8 I don't know how to force the usage of the later locally to reproduce. Settings LC_ALL=C and LANG=C didn't do the trick ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 07:06:49 2018 From: report at bugs.python.org (=?utf-8?b?UsOpbXkgSHVic2NoZXIgWzpuYXRpbV0=?=) Date: Thu, 18 Oct 2018 11:06:49 +0000 Subject: [issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError In-Reply-To: <1539852617.86.0.788709270274.issue35014@psf.upfronthosting.co.za> Message-ID: <1539860809.59.0.788709270274.issue35014@psf.upfronthosting.co.za> R?my Hubscher [:natim] added the comment: Here we go: ``` $ python3.7 demo.py utf-8 UTF-8 Traceback (most recent call last): File "demo.py", line 21, in asyncio.run(main()) File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run return loop.run_until_complete(main) File "/usr/lib/python3.7/asyncio/base_events.py", line 568, in run_until_complete return future.result() File "demo.py", line 14, in main sys.stdout.write(out.decode('utf-8')) UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 1: ordinal not in range(128) ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 07:07:30 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 18 Oct 2018 11:07:30 +0000 Subject: [issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError In-Reply-To: <1539852617.86.0.788709270274.issue35014@psf.upfronthosting.co.za> Message-ID: <1539860850.51.0.788709270274.issue35014@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I think you'll get the same error on `subprocess.run()` call if your current locale is not UTF-8. I don't recall the details but the Intenet has a lot info about setting locale per user and system-wide. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 07:08:40 2018 From: report at bugs.python.org (=?utf-8?b?UsOpbXkgSHVic2NoZXIgWzpuYXRpbV0=?=) Date: Thu, 18 Oct 2018 11:08:40 +0000 Subject: [issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError In-Reply-To: <1539852617.86.0.788709270274.issue35014@psf.upfronthosting.co.za> Message-ID: <1539860920.94.0.788709270274.issue35014@psf.upfronthosting.co.za> R?my Hubscher [:natim] added the comment: I believe Python 3.7 brings explicit unicode encoding/decoding. If depending on the environment the create_subprocess_exec method can fail, I believe we should not try to encode the command lines attribute but rather enforce it to be bytes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 07:09:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 11:09:52 +0000 Subject: =?utf-8?q?=5Bissue34963=5D_String_representation_for_types_created_with_t?= =?utf-8?q?yping=2ENewType=28=E2=80=A6=29_are_opaque_and_unappealing?= In-Reply-To: <1539313395.67.0.788709270274.issue34963@psf.upfronthosting.co.za> Message-ID: <1539860992.7.0.788709270274.issue34963@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9298 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 07:13:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 11:13:40 +0000 Subject: =?utf-8?q?=5Bissue34963=5D_String_representation_for_types_created_with_t?= =?utf-8?q?yping=2ENewType=28=E2=80=A6=29_are_opaque_and_unappealing?= In-Reply-To: <1539313395.67.0.788709270274.issue34963@psf.upfronthosting.co.za> Message-ID: <1539861220.03.0.788709270274.issue34963@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 9951 is a simpler way. It just sets __qualname__ (and __module__ for completeness). >>> import typing >>> UserId = typing.NewType('UserId', int) >>> UserId ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 07:55:13 2018 From: report at bugs.python.org (Denis Ledoux) Date: Thu, 18 Oct 2018 11:55:13 +0000 Subject: [issue35017] socketserver accept a last request after shutdown Message-ID: <1539863713.13.0.788709270274.issue35017@psf.upfronthosting.co.za> New submission from Denis Ledoux : After the shutdown of a `BaseServer`, the server may accept a last single request if it is sent between the server socket polling and the polling timeout. This can be problematic for instance for a server restart for which you do not want to interrupt the service, by not closing the listening socket during the restart. One request can fail because of this behavior. Note that only one request will fail, following requests will not be accepted, as expected. ---------- components: Library (Lib) messages: 327969 nosy: beledouxdenis priority: normal severity: normal status: open title: socketserver accept a last request after shutdown type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 07:57:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Oct 2018 11:57:42 +0000 Subject: [issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError In-Reply-To: <1539852617.86.0.788709270274.issue35014@psf.upfronthosting.co.za> Message-ID: <1539863862.96.0.788709270274.issue35014@psf.upfronthosting.co.za> STINNER Victor added the comment: I added the UTF-8 Mode for you, for the Docker use case: python3.7 -X utf8. Using that, Python ignores your locale and speaks UTF-8. What is your locale? Try the "locale" command. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 08:00:58 2018 From: report at bugs.python.org (Denis Ledoux) Date: Thu, 18 Oct 2018 12:00:58 +0000 Subject: [issue35017] socketserver accept a last request after shutdown In-Reply-To: <1539863713.13.0.788709270274.issue35017@psf.upfronthosting.co.za> Message-ID: <1539864058.23.0.788709270274.issue35017@psf.upfronthosting.co.za> Change by Denis Ledoux : ---------- keywords: +patch pull_requests: +9299 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 08:19:37 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 18 Oct 2018 12:19:37 +0000 Subject: [issue35015] availability directive breaks po files In-Reply-To: <1539852628.85.0.788709270274.issue35015@psf.upfronthosting.co.za> Message-ID: <1539865177.19.0.788709270274.issue35015@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Do you think it needs to be added to Doc\tools\templates? ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 08:21:09 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 18 Oct 2018 12:21:09 +0000 Subject: [issue35015] availability directive breaks po files In-Reply-To: <1539852628.85.0.788709270274.issue35015@psf.upfronthosting.co.za> Message-ID: <1539865269.16.0.788709270274.issue35015@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Sorry, I meant dummy.html in Docs\tools\templates. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 08:25:46 2018 From: report at bugs.python.org (Julien Palard) Date: Thu, 18 Oct 2018 12:25:46 +0000 Subject: [issue35015] availability directive breaks po files In-Reply-To: <1539852628.85.0.788709270274.issue35015@psf.upfronthosting.co.za> Message-ID: <1539865546.95.0.788709270274.issue35015@psf.upfronthosting.co.za> Julien Palard added the comment: No, at first glance it looks like the implementation of the directive in pyspecific.py is "removing" the roles. It's however not removing the roles while building the html, only removing it from po files, so there's a subtility I can't catch here (just spotted this, didn't have time to diagnose it in depth myself). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 08:31:23 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Oct 2018 12:31:23 +0000 Subject: [issue34996] Add name to process and thread pool In-Reply-To: <1539686443.16.0.788709270274.issue34996@psf.upfronthosting.co.za> Message-ID: <1539865883.88.0.788709270274.issue34996@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- versions: +Python 3.8 -Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 08:40:04 2018 From: report at bugs.python.org (=?utf-8?b?UsOpbXkgSHVic2NoZXIgWzpuYXRpbV0=?=) Date: Thu, 18 Oct 2018 12:40:04 +0000 Subject: [issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError In-Reply-To: <1539852617.86.0.788709270274.issue35014@psf.upfronthosting.co.za> Message-ID: <1539866404.57.0.788709270274.issue35014@psf.upfronthosting.co.za> R?my Hubscher [:natim] added the comment: Here are the locale set: ``` LANG= LANGUAGE= LC_CTYPE="POSIX" LC_NUMERIC="POSIX" LC_TIME="POSIX" LC_COLLATE="POSIX" LC_MONETARY="POSIX" LC_MESSAGES="POSIX" LC_PAPER="POSIX" LC_NAME="POSIX" LC_ADDRESS="POSIX" LC_TELEPHONE="POSIX" LC_MEASUREMENT="POSIX" LC_IDENTIFICATION="POSIX" LC_ALL= ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 08:41:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Oct 2018 12:41:17 +0000 Subject: [issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError In-Reply-To: <1539852617.86.0.788709270274.issue35014@psf.upfronthosting.co.za> Message-ID: <1539866477.14.0.788709270274.issue35014@psf.upfronthosting.co.za> STINNER Victor added the comment: > LC_CTYPE="POSIX" I modified Python 3.7.1 to enable the UTF-8 Mode when the LC_CTYPE is "POSIX". In Python 3.7.0, the UTF-8 Mode is only enabled if the LC_CTYPE is "C". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 08:43:29 2018 From: report at bugs.python.org (=?utf-8?b?UsOpbXkgSHVic2NoZXIgWzpuYXRpbV0=?=) Date: Thu, 18 Oct 2018 12:43:29 +0000 Subject: [issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError In-Reply-To: <1539852617.86.0.788709270274.issue35014@psf.upfronthosting.co.za> Message-ID: <1539866609.67.0.788709270274.issue35014@psf.upfronthosting.co.za> R?my Hubscher [:natim] added the comment: Unicode is complicated, the answer is somewhere here: https://unicodebook.readthedocs.io/ Sorry for the bothering, I thought it was a bug but apparently it's a feature. Thank you for your help, thank you for making Python better. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 08:44:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Oct 2018 12:44:22 +0000 Subject: [issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError In-Reply-To: <1539852617.86.0.788709270274.issue35014@psf.upfronthosting.co.za> Message-ID: <1539866662.76.0.788709270274.issue35014@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is not an asyncio bug: the bug occurs in subprocess. The bug is not a subprocess bug: subprocess works as expected, it encodes Unicode with sys.getfilesystemencoding() (see os.fsencode()). The bug is that you use non-ASCII strings whereas your filesystem encoding is ASCII. You have a different options to fix *your* issue: * Use a different locale which uses a UTF-8 locale * Enable the Python 3.7 UTF-8 mode * Wait for Python 3.7.1 (which enables automatically the UTF-8 Mode for LC_CTYPE="POSIX") Note: You might want to read my ebook http://unicodebook.readthedocs.io/ which explains how to deal with Unicode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 08:44:24 2018 From: report at bugs.python.org (=?utf-8?b?UsOpbXkgSHVic2NoZXIgWzpuYXRpbV0=?=) Date: Thu, 18 Oct 2018 12:44:24 +0000 Subject: [issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError In-Reply-To: <1539852617.86.0.788709270274.issue35014@psf.upfronthosting.co.za> Message-ID: <1539866664.19.0.788709270274.issue35014@psf.upfronthosting.co.za> R?my Hubscher [:natim] added the comment: > I modified Python 3.7.1 to enable the UTF-8 Mode when the LC_CTYPE is "POSIX". In Python 3.7.0, the UTF-8 Mode is only enabled if the LC_CTYPE is "C" Ok works for me thanks :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 08:46:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 12:46:53 +0000 Subject: [issue24294] DeprecationWarnings should be visible by default in the interactive REPL In-Reply-To: <1432713990.67.0.935342603332.issue24294@psf.upfronthosting.co.za> Message-ID: <1539866813.5.0.788709270274.issue24294@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: test needed -> resolved status: pending -> closed versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 08:55:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 12:55:10 +0000 Subject: [issue22872] multiprocessing.Queue raises AssertionError In-Reply-To: <1415986488.54.0.734820295311.issue22872@psf.upfronthosting.co.za> Message-ID: <1539867310.93.0.788709270274.issue22872@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think we need to document AssertionError in older Python versions. This is an implementation detail. We don't document all exceptions that can be raised with improper use of the API. Just don't do this. In addition, using the assert statement for validating user input or the object state which depends on user actions is a bad style. We shouldn't encourage this by documenting it as a behavior of the stdlib. It was a bug, and it is fixed now. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 08:57:45 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 18 Oct 2018 12:57:45 +0000 Subject: [issue35015] availability directive breaks po files In-Reply-To: <1539852628.85.0.788709270274.issue35015@psf.upfronthosting.co.za> Message-ID: <1539867465.54.0.788709270274.issue35015@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 09:12:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Oct 2018 13:12:41 +0000 Subject: [issue34814] makesetup: must link C extensions to libpython when compiled in shared mode In-Reply-To: <1537980934.49.0.545547206417.issue34814@psf.upfronthosting.co.za> Message-ID: <1539868361.32.0.788709270274.issue34814@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 09:18:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 13:18:34 +0000 Subject: [issue34790] Deprecate passing coroutine objects to asyncio.wait() In-Reply-To: <1537807353.36.0.956365154283.issue34790@psf.upfronthosting.co.za> Message-ID: <1539868714.25.0.788709270274.issue34790@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 09:36:44 2018 From: report at bugs.python.org (Cyker Way) Date: Thu, 18 Oct 2018 13:36:44 +0000 Subject: [issue35010] sort by partially reversed key tuple In-Reply-To: <1539771040.54.0.788709270274.issue35010@psf.upfronthosting.co.za> Message-ID: <1539869804.31.0.788709270274.issue35010@psf.upfronthosting.co.za> Cyker Way added the comment: Thank you very much for the great discussion here, especially Tim's great threads in *python-ideas* that give neat and insightful answers to this problem in different ways: - - Since this topic is closed, future discussions probably should go to other python forums. But it might be good to draw some conclusions here for future reference. First of all, either single-pass sort with a vector key or multi-pass sort with a scalar key may work better, depending on the input. However, in most cases, using multi-pass sort for such problem is the right way to go in the current python implementation. The multi-pass sort algorithm typically runs 2x faster or so than a single-pass sort algorithm. This is likely due to constants rather than asymptotic complexity. But when measured in real time, multi-pass sort algorithm clearly wins in most cases. If your input is so special that it aligns much better with single-pass sort algorithms (overwhelming the constant advantage of multi-pass sort algorithm), you may use a single-pass sort algorithm. But there are actually different ways of implementing so. The algorithm posted in Tim's second thread on python-ideas is in fact different from mine in this bug thread, where Tim used a wrapper class for the keys and I used a wrapper class for the scalars. Since there are `n` keys but can be as many as `n * m` scalars, my method would be using more wrapper objects. So I expected it to run slower than Tim's. To my surprise, sometimes it works better. The reason is later found to be easy to understand: Wrapper objects are created only when a column needs to be reversed. The number of columns to be reversed is actually a factor controlling the running time. To give a fair evaluation, I created 500000 random rows with 8 columns and control the number of columns to be reversed. The evaluation shows my algorithm could have running time 80%-120% that of Tim's (excluding the special case where no column needs to be reversed). This shows a new direction of optimizing such algorithms. Finally, this issue was rejected because the added benefits were deemed not enough to complicate the implementation. Considering the current multi-pass sort algorithm has a huge advantage and is easy to implement in python, this decision is fair. Users who care less about performance may write a key adapter in their own code if they want to stick with builtin sort functions. Users who do care about performance can use single-pass sort techniques mentioned in this issue in case multi-pass sort doesn't work well with their data. ---------- Added file: https://bugs.python.org/file47880/performance-2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 10:59:05 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 18 Oct 2018 14:59:05 +0000 Subject: [issue34623] _elementtree.c doesn't call XML_SetHashSalt() In-Reply-To: <1536619664.47.0.56676864532.issue34623@psf.upfronthosting.co.za> Message-ID: <1539874745.59.0.788709270274.issue34623@psf.upfronthosting.co.za> Change by Charalampos Stratakis : ---------- pull_requests: +9301 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 11:22:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 15:22:20 +0000 Subject: [issue34623] _elementtree.c doesn't call XML_SetHashSalt() In-Reply-To: <1536619664.47.0.56676864532.issue34623@psf.upfronthosting.co.za> Message-ID: <1539876140.18.0.788709270274.issue34623@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> larry nosy: +larry priority: normal -> release blocker versions: -Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 11:43:57 2018 From: report at bugs.python.org (Braden Groom) Date: Thu, 18 Oct 2018 15:43:57 +0000 Subject: [issue35005] argparse should accept json and yaml argument types In-Reply-To: <1539735338.04.0.788709270274.issue35005@psf.upfronthosting.co.za> Message-ID: <1539877437.71.0.788709270274.issue35005@psf.upfronthosting.co.za> Braden Groom added the comment: I could try adding JSON and YAML argument types if that's what we want to do. ---------- nosy: +bradengroom _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 12:22:21 2018 From: report at bugs.python.org (Jonathan Gossage) Date: Thu, 18 Oct 2018 16:22:21 +0000 Subject: [issue35018] Sax parser provides no user access to lexical handlers Message-ID: <1539879741.38.0.788709270274.issue35018@psf.upfronthosting.co.za> New submission from Jonathan Gossage : While working on issues bpo-6686 and bpo-9371 I realized that the solution to both involved the use of Sax lexical handlers. Unfortunately, the Python SAX parser does not expose these handlers to the end user, however, support is available in expatreader.py and pyexpat.c. What is missing is the LexicalHandler class which works the same way as the ContentHandler does for the more common handlers and provides a subclassable interface for these handlers. This class is present in the Java implementation of SAX2 and was also present in Pyxml. I have already verified privately that this class works exactly as expected and I am working on a PR which will provide the class along with supporting unit tests that verify that the lexical handlers work. ---------- messages: 327982 nosy: Jonathan.Gossage, taleinat priority: normal severity: normal status: open title: Sax parser provides no user access to lexical handlers type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 12:27:10 2018 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 18 Oct 2018 16:27:10 +0000 Subject: [issue34973] Crash in bytes constructor with mutating list In-Reply-To: <1539437867.82.0.788709270274.issue34973@psf.upfronthosting.co.za> Message-ID: <1539880030.4.0.788709270274.issue34973@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: PR 9841 looks good to me. I wouldn't worry about the performance hit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 12:28:24 2018 From: report at bugs.python.org (Ken Bassford) Date: Thu, 18 Oct 2018 16:28:24 +0000 Subject: [issue35019] Minor Bug found in asyncio - Python 3.5.3 Message-ID: <1539880104.22.0.788709270274.issue35019@psf.upfronthosting.co.za> New submission from Ken Bassford : Found that when using the following function ... "asyncio.start_server(self.processCmd, serverhost, serverport, loop=self.loop)" If 'serverhost' is formatted as a ipaddress.IPv4Address() it will cause a very messy failure. Formatting 'serverhost' as a string eliminates the problem, though I suspect that asyncio developers would/should accept IPv4/IPv6 objects, in addition to strings, as the host parameter. ---------- components: asyncio messages: 327984 nosy: asvetlov, bassford, yselivanov priority: normal severity: normal status: open title: Minor Bug found in asyncio - Python 3.5.3 type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 12:40:22 2018 From: report at bugs.python.org (paul j3) Date: Thu, 18 Oct 2018 16:40:22 +0000 Subject: [issue30220] Why are custom messages for ValueError, TypeError suppressed in argparse? In-Reply-To: <1493655591.13.0.717623445702.issue30220@psf.upfronthosting.co.za> Message-ID: <1539880822.48.0.788709270274.issue30220@psf.upfronthosting.co.za> paul j3 added the comment: I'm going to close this. Python makes it easy to test for Exception class. Testing exception messages is messy, especially if the test wants to compare the message against 'generic message'. I don't see anything generic about the messages produced by `int('1.23')` and `float('xxx')`. Argparse provides a custom class, ArgumentTypeError, for use when you want to pass a custom message. Let's leave it at that, and not try to make things more complicated. If there's to be any change it should be in the documentation as suggested in https://bugs.python.org/issue20039. ---------- resolution: -> not a bug stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 12:41:31 2018 From: report at bugs.python.org (paul j3) Date: Thu, 18 Oct 2018 16:41:31 +0000 Subject: [issue20039] Missing documentation for argparse.ArgumentTypeError In-Reply-To: <1387622425.21.0.562750433804.issue20039@psf.upfronthosting.co.za> Message-ID: <1539880891.81.0.788709270274.issue20039@psf.upfronthosting.co.za> paul j3 added the comment: A related closed request: https://bugs.python.org/issue30220 that wants to test ValueError for non-generic message, instead of using ArgumentTypeError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 12:57:30 2018 From: report at bugs.python.org (paul j3) Date: Thu, 18 Oct 2018 16:57:30 +0000 Subject: [issue35005] argparse should accept json and yaml argument types In-Reply-To: <1539735338.04.0.788709270274.issue35005@psf.upfronthosting.co.za> Message-ID: <1539881850.35.0.788709270274.issue35005@psf.upfronthosting.co.za> paul j3 added the comment: Adding a new 'type' function or factor is certainly possible, and probably will be free of backward compatibility issues. But so far no other custom type has been added to argparse. https://bugs.python.org/issue23884 - rejects adding a DateTime class https://bugs.python.org/issue22884 - there are several outstanding issue dealing with the FileType class. That hasn't aged well, since file IO standards have changed over the years. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 13:07:51 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 18 Oct 2018 17:07:51 +0000 Subject: [issue35015] availability directive breaks po files In-Reply-To: <1539852628.85.0.788709270274.issue35015@psf.upfronthosting.co.za> Message-ID: <1539882471.36.0.788709270274.issue35015@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +vstinner priority: normal -> deferred blocker versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 13:13:38 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 18 Oct 2018 17:13:38 +0000 Subject: [issue35020] Add multisort recipe to sorting docs Message-ID: <1539882818.57.0.788709270274.issue35020@psf.upfronthosting.co.za> New submission from Karthikeyan Singaravelan : This issue handles the below : 1. Adding a link to sorting HOWTO from list.sort docs as per msg327901 2. Adding multisort recipe to sorting HOWTO with an example as per msg327925. I have raised a PR (GH-9931) for #1 but the issue35010 was closed and hence I will link to this issue. I would also suggest adding single pass sorting example multisort recipe : https://mail.python.org/pipermail/python-ideas/2016-October/043045.html single pass recipe : https://mail.python.org/pipermail/python-ideas/2016-October/043126.html Since English is not my first language feedback welcome on the wording. Thanks ---------- assignee: docs at python components: Documentation messages: 327988 nosy: docs at python, xtreak priority: normal severity: normal status: open title: Add multisort recipe to sorting docs type: enhancement versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 13:14:07 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 18 Oct 2018 17:14:07 +0000 Subject: [issue35020] Add multisort recipe to sorting docs In-Reply-To: <1539882818.57.0.788709270274.issue35020@psf.upfronthosting.co.za> Message-ID: <1539882847.2.0.788709270274.issue35020@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +9302 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 13:37:14 2018 From: report at bugs.python.org (Thomas Wouters) Date: Thu, 18 Oct 2018 17:37:14 +0000 Subject: [issue35021] Assertion failures in datetimemodule.c. Message-ID: <1539884234.35.0.788709270274.issue35021@psf.upfronthosting.co.za> New submission from Thomas Wouters : The fix for issue #31752 (changeset 5ef883b096895a84123760859f0f34ad37bf2277 for 2.7, as I ran into this while upgrading to 2.7.15) includes assertions that are easily triggered from user code: >>> import datetime, numpy >>> datetime.timedelta(seconds=numpy.int64(0)) python: .../Modules/datetimemodule.c:1859: accum: Assertion `_PyAnyInt_CheckExact(prod)' failed. Aborted (core dumped) The code asserts that the product of a known type and an unknown type is a known type, which is not a valid assumption. Pure-python reproducer (requires a build with assertions enabled, like a --with-pydebug build). >>> import datetime >>> class C(int): ... def __rmul__(self, other): ... return self ... >>> datetime.timedelta(seconds=C()) python: .../Modules/datetimemodule.c:1859: accum: Assertion `_PyAnyInt_CheckExact(prod)' failed. Aborted (core dumped) (It fails in a similar way in at least Python 3.7, and since the fix was backported I'm going to assume 3.6 as well.) Please do not use assertions for things that aren't guaranteed by the code making the assertions. These should either not be assertions, or the input types should be validated beforehand. I do not know why these assertions are being made in the first place. What do they guard against? ---------- assignee: serhiy.storchaka components: Interpreter Core keywords: 3.6regression, 3.7regression messages: 327989 nosy: gregory.p.smith, serhiy.storchaka, twouters priority: high severity: normal stage: needs patch status: open title: Assertion failures in datetimemodule.c. type: crash versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 13:37:34 2018 From: report at bugs.python.org (Thomas Wouters) Date: Thu, 18 Oct 2018 17:37:34 +0000 Subject: [issue31752] Assertion failure in timedelta() in case of bad __divmod__ In-Reply-To: <1507670968.8.0.213398074469.issue31752@psf.upfronthosting.co.za> Message-ID: <1539884254.53.0.788709270274.issue31752@psf.upfronthosting.co.za> Thomas Wouters added the comment: This patch includes assertions that are easily triggered from user code: https://bugs.python.org/issue35021 ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 13:49:42 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 18 Oct 2018 17:49:42 +0000 Subject: [issue35019] Minor Bug found in asyncio - Python 3.5.3 In-Reply-To: <1539880104.22.0.788709270274.issue35019@psf.upfronthosting.co.za> Message-ID: <1539884982.02.0.788709270274.issue35019@psf.upfronthosting.co.za> Andrew Svetlov added the comment: It could be a nice feature but I imagine about adding ipaddress objects support to all python APIs. It could be done in a similar way as pathlib integration (os.fspath() and family). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 13:54:13 2018 From: report at bugs.python.org (Damla Altun) Date: Thu, 18 Oct 2018 17:54:13 +0000 Subject: [issue35019] Minor Bug found in asyncio - Python 3.5.3 In-Reply-To: <1539880104.22.0.788709270274.issue35019@psf.upfronthosting.co.za> Message-ID: <1539885253.12.0.788709270274.issue35019@psf.upfronthosting.co.za> Damla Altun added the comment: Working on it. ---------- nosy: +Damla Altun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 13:56:21 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 18 Oct 2018 17:56:21 +0000 Subject: [issue28053] parameterize what serialization is used in multiprocessing In-Reply-To: <1473454734.41.0.810069156927.issue28053@psf.upfronthosting.co.za> Message-ID: <1539885381.54.0.788709270274.issue28053@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 14:01:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 18:01:06 +0000 Subject: [issue35021] Assertion failures in datetimemodule.c. In-Reply-To: <1539884234.35.0.788709270274.issue35021@psf.upfronthosting.co.za> Message-ID: <1539885666.9.0.788709270274.issue35021@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Mia culpa! I missed that the type of the right operand takes precedence when it is a subclass of the type of the left operand. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 14:12:20 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 18 Oct 2018 18:12:20 +0000 Subject: [issue27869] test failures under Bash on Windows / WSL In-Reply-To: <1472236837.41.0.811658562373.issue27869@psf.upfronthosting.co.za> Message-ID: <1539886340.26.0.788709270274.issue27869@psf.upfronthosting.co.za> Tal Einat added the comment: As a side-effect, test_ssl hanging is causing builds configured with --enable-optimizations to hang. (Tested with both 3.6.6 and 3.7.0 on Ubuntu 18.04 in WSL on Win 10 Pro 64-bit) ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 14:37:48 2018 From: report at bugs.python.org (Bob Ippolito) Date: Thu, 18 Oct 2018 18:37:48 +0000 Subject: [issue35005] argparse should accept json and yaml argument types In-Reply-To: <1539735338.04.0.788709270274.issue35005@psf.upfronthosting.co.za> Message-ID: <1539887868.12.0.788709270274.issue35005@psf.upfronthosting.co.za> Bob Ippolito added the comment: I don't think that this has anything in particular to do with the json module, at least it certainly shouldn't need any additional functionality from there. YAML parsing isn't available in the stdlib last I checked, so that is probably not really up for consideration for direct integration. In any case, I think the best approach would be to first do some research (StackOverflow, GitHub, etc.) to see how other folks are doing this in the wild, to see if there's a common pattern that should be made available in the stdlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 15:05:52 2018 From: report at bugs.python.org (Jonathan Gossage) Date: Thu, 18 Oct 2018 19:05:52 +0000 Subject: [issue35018] Sax parser provides no user access to lexical handlers In-Reply-To: <1539879741.38.0.788709270274.issue35018@psf.upfronthosting.co.za> Message-ID: <1539889552.0.0.788709270274.issue35018@psf.upfronthosting.co.za> Change by Jonathan Gossage : ---------- components: +XML _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 15:07:28 2018 From: report at bugs.python.org (Damla Altun) Date: Thu, 18 Oct 2018 19:07:28 +0000 Subject: [issue35019] Minor Bug found in asyncio - Python 3.5.3 In-Reply-To: <1539880104.22.0.788709270274.issue35019@psf.upfronthosting.co.za> Message-ID: <1539889648.02.0.788709270274.issue35019@psf.upfronthosting.co.za> Change by Damla Altun : ---------- keywords: +patch pull_requests: +9303 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 15:07:38 2018 From: report at bugs.python.org (Brett Cannon) Date: Thu, 18 Oct 2018 19:07:38 +0000 Subject: [issue35001] ImportFrom level cannot be optional In-Reply-To: <1539715196.88.0.788709270274.issue35001@psf.upfronthosting.co.za> Message-ID: <1539889658.28.0.788709270274.issue35001@psf.upfronthosting.co.za> Brett Cannon added the comment: There aren't any type hints in the 'ast' module in Python itself, so this is an issue with typeshed. Closing as "third party". ---------- nosy: +brett.cannon resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 15:17:01 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 18 Oct 2018 19:17:01 +0000 Subject: [issue33457] python-config ldflags, PEP 513 and explicit linking to libpython in python extensions In-Reply-To: <1525966955.19.0.682650639539.issue33457@psf.upfronthosting.co.za> Message-ID: <1539890221.42.0.788709270274.issue33457@psf.upfronthosting.co.za> Nathaniel Smith added the comment: Also, python-config is inconsistent with distutils. It should link to libpython only in the cases where distutils does. (IIRC it's supposed to depend on whether python was built with --enable-shared.) ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 15:28:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 19:28:38 +0000 Subject: [issue34936] tkinter.Spinbox.selection_element() raises TclError In-Reply-To: <1539014215.23.0.545547206417.issue34936@psf.upfronthosting.co.za> Message-ID: <1539890918.82.0.788709270274.issue34936@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 1deea5e53991b46351f6bb395b22365c9455ed88 by Serhiy Storchaka (Juliette Monsel) in branch 'master': bpo-34936: Fix TclError in tkinter.Spinbox.selection_element(). (GH-9760) https://github.com/python/cpython/commit/1deea5e53991b46351f6bb395b22365c9455ed88 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 15:28:49 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 18 Oct 2018 19:28:49 +0000 Subject: [issue35019] Minor Bug found in asyncio - Python 3.5.3 In-Reply-To: <1539880104.22.0.788709270274.issue35019@psf.upfronthosting.co.za> Message-ID: <1539890929.72.0.788709270274.issue35019@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I mean if we implement something like PathLike [1] but for IP addresses to socket module and teach all socket APIs to accept IPLike objects along with str -- no asyncio change is required. 1. https://docs.python.org/3/library/os.html#os.PathLike ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 15:35:31 2018 From: report at bugs.python.org (paul j3) Date: Thu, 18 Oct 2018 19:35:31 +0000 Subject: [issue35005] argparse should accept json and yaml argument types In-Reply-To: <1539735338.04.0.788709270274.issue35005@psf.upfronthosting.co.za> Message-ID: <1539891331.57.0.788709270274.issue35005@psf.upfronthosting.co.za> paul j3 added the comment: This kind of file read can be done just as easily after parsing. For example using the function in my previous post: In [127]: parser = argparse.ArgumentParser() In [128]: parser.add_argument('-d','--data'); In [129]: args = parser.parse_args(['-d','@foo.json']) In [130]: args Out[130]: Namespace(data='@foo.json') In [131]: args.data = readdata(args.data) In [132]: args Out[132]: Namespace(data={'foo': 12, 'bar': 'twelve'}) I've pointed out in various SO answers that using the 'type' parameter has just a few benefits. - If you have many arguments that require this conversion, using type is a little more streamlined. But it's not hard to iterate of a list of 'dest'. - Using type routes the errors through the standard argparse mechanism, including the display of usage and system exit. But the type function has to raise TypeError, ValueError, or ArgumentTypeError. But you can also use 'parser.error(...)' in the post parsing processing. Error handling is the make-or-break-it issue. What kinds of errors do we want to handle? What if the file name is bad or not accessible? What if the file is poorly formatted JSON? How do other APIs handle these errors? For example the function that I defined can raise a FileNotFoundError if the file isn't found, or a JSONDecodeError if the file is badly formed. JSONDecodeError is a subclass of ValueError, but IO errors are not. If such a type function is added to argparse, the unittest file, test_argparse.py will have to have a number of test cases. It will have to create a valid json test file, and possibly an invalid one. It will have test working cases, and various error cases. The amount of testing code is likely to be many times larger than the function code itself. And we can't overlook the documentation additions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 15:43:42 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 18 Oct 2018 19:43:42 +0000 Subject: [issue35015] availability directive breaks po files In-Reply-To: <1539852628.85.0.788709270274.issue35015@psf.upfronthosting.co.za> Message-ID: <1539891822.61.0.788709270274.issue35015@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I found this in the Sphinx doc. This works on the English-language build OK, so I'm not sure if it's the cause of the issue. http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#gotchas > No nested inline markup: Something like *see :func:`foo`* is not possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 16:04:02 2018 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 18 Oct 2018 20:04:02 +0000 Subject: [issue34475] functools.partial objects have no __qualname__ attribute In-Reply-To: <1535034359.11.0.56676864532.issue34475@psf.upfronthosting.co.za> Message-ID: <1539893042.03.0.788709270274.issue34475@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > It shouldn't be the __qualname__ of the wrapped function Yes, I agree with you. I was thinking it should be similar to what it would be for a function defined at the same location. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 16:26:06 2018 From: report at bugs.python.org (Juliette Monsel) Date: Thu, 18 Oct 2018 20:26:06 +0000 Subject: [issue34936] tkinter.Spinbox.selection_element() raises TclError In-Reply-To: <1539014215.23.0.545547206417.issue34936@psf.upfronthosting.co.za> Message-ID: <1539894366.43.0.788709270274.issue34936@psf.upfronthosting.co.za> Change by Juliette Monsel : ---------- pull_requests: +9304 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 16:53:35 2018 From: report at bugs.python.org (Michael Felt) Date: Thu, 18 Oct 2018 20:53:35 +0000 Subject: [issue34988] Rc2 candidates: "gcc" not found on AIX In-Reply-To: <1539718553.73.0.788709270274.issue34988@psf.upfronthosting.co.za> Message-ID: <4857c2d6-d3ab-69f0-1e9d-f024af2b137c@felt.demon.nl> Michael Felt added the comment: On 16/10/2018 21:35, Ned Deily wrote: > Ned Deily added the comment: > > I'm glad it works. Any object to closing this issue then? I have no objection. Should I do that? > > ---------- > resolution: -> not a bug > stage: -> resolved > status: open -> pending > > _______________________________________ > Python tracker > > _______________________________________ > ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 17:05:22 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 18 Oct 2018 21:05:22 +0000 Subject: [issue34988] Rc2 candidates: "gcc" not found on AIX In-Reply-To: <1539592473.09.0.788709270274.issue34988@psf.upfronthosting.co.za> Message-ID: <1539896722.54.0.788709270274.issue34988@psf.upfronthosting.co.za> Ned Deily added the comment: Done, thanks! ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 17:12:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 21:12:09 +0000 Subject: [issue35021] Assertion failures in datetimemodule.c. In-Reply-To: <1539884234.35.0.788709270274.issue35021@psf.upfronthosting.co.za> Message-ID: <1539897129.39.0.788709270274.issue35021@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +9305 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 17:14:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Oct 2018 21:14:09 +0000 Subject: [issue35015] availability directive breaks po files In-Reply-To: <1539852628.85.0.788709270274.issue35015@psf.upfronthosting.co.za> Message-ID: <1539897249.64.0.788709270274.issue35015@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, the english HTML rendering looks good to me: https://docs.python.org/dev/library/os.html#os.spawnvpe So only the PO files are broken, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 17:21:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Oct 2018 21:21:51 +0000 Subject: [issue34475] functools.partial objects have no __qualname__ attribute In-Reply-To: <1535034359.11.0.56676864532.issue34475@psf.upfronthosting.co.za> Message-ID: <1539897711.95.0.788709270274.issue34475@psf.upfronthosting.co.za> STINNER Victor added the comment: functools.partial objects have no __qualname__ attribute, but they don't have a __name__ attribute neither. $ python3 Python 3.6.6 (default, Jul 19 2018, 14:25:17) >>> import functools >>> func=int >>> p=functools.partial(func) >>> p.__name__ AttributeError: 'functools.partial' object has no attribute '__name__' >>> p.__qualname__ AttributeError: 'functools.partial' object has no attribute '__qualname__' >>> repr(p) "functools.partial()" If you want to "inherit" the name of the "wrapped function", you may use: functools.update_wrapper(). I'm not sure that it's correct to inherit the name by default. functools.partial() creates a new function, so if it has a name, for me, it should be different. I agree to close the issue, it's not a bug. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 17:24:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Oct 2018 21:24:00 +0000 Subject: [issue34475] functools.partial objects have no __qualname__ attribute In-Reply-To: <1535034359.11.0.56676864532.issue34475@psf.upfronthosting.co.za> Message-ID: <1539897840.77.0.788709270274.issue34475@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 17:28:20 2018 From: report at bugs.python.org (Matej Cepl) Date: Thu, 18 Oct 2018 21:28:20 +0000 Subject: [issue32174] nonASCII punctuation characters can not display in python363.chm. In-Reply-To: <1512013530.29.0.213398074469.issue32174@psf.upfronthosting.co.za> Message-ID: <1539898100.57.0.788709270274.issue32174@psf.upfronthosting.co.za> Matej Cepl added the comment: It seems to me that this adds escape4chm as unconditional dependency on all platforms. Which seems like a bad idea to me, I don't think users on Linux or Mac OS X are that keen on *.chm files. I think this change broke my build of python3-doc package on openSUSE (which built until now absolutely perfectly). I don't even know, where the escape4chm plugin comes from. ??? ---------- nosy: +mcepl Added file: https://bugs.python.org/file47881/python3-doc-3-7-rc2-log.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 17:29:12 2018 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 18 Oct 2018 21:29:12 +0000 Subject: [issue34475] functools.partial objects have no __qualname__ attribute In-Reply-To: <1535034359.11.0.56676864532.issue34475@psf.upfronthosting.co.za> Message-ID: <1539898152.81.0.788709270274.issue34475@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Sorry, I'm out of practice. I thought I closed this when I marked it rejected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 18:05:30 2018 From: report at bugs.python.org (Zachary Ware) Date: Thu, 18 Oct 2018 22:05:30 +0000 Subject: [issue32174] nonASCII punctuation characters can not display in python363.chm. In-Reply-To: <1512013530.29.0.213398074469.issue32174@psf.upfronthosting.co.za> Message-ID: <1539900330.39.0.788709270274.issue32174@psf.upfronthosting.co.za> Zachary Ware added the comment: What version of Python are you running Sphinx with? Your error is that `html.entities` does not exist, which makes it sound like Python 2; bump it to Python 3 and you'll be fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 18:20:26 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 18 Oct 2018 22:20:26 +0000 Subject: [issue28053] parameterize what serialization is used in multiprocessing In-Reply-To: <1473454734.41.0.810069156927.issue28053@psf.upfronthosting.co.za> Message-ID: <1539901226.75.0.788709270274.issue28053@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- pull_requests: +9306 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 20:05:47 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Oct 2018 00:05:47 +0000 Subject: [issue35016] \r to match add into address header with not-ascii character In-Reply-To: <1539855514.48.0.788709270274.issue35016@psf.upfronthosting.co.za> Message-ID: <1539907547.89.0.788709270274.issue35016@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the report and patch, but this is a duplicate of #34424. Your report prompted me to finally review the PR in that issue, though, so thanks twice :) ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 20:13:29 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Oct 2018 00:13:29 +0000 Subject: [issue26441] email.charset: to_splittable and from_splittable are not there anymore! In-Reply-To: <1456440480.97.0.346838980393.issue26441@psf.upfronthosting.co.za> Message-ID: <1539908009.41.0.788709270274.issue26441@psf.upfronthosting.co.za> R. David Murray added the comment: New changeset 5be00247ae0de2e24dd14bbe4d9ca159434a1710 by R. David Murray (Braden Groom) in branch 'master': bpo-26441: Remove documentation for deleted to_splittable and from_splittable methods (#9865) https://github.com/python/cpython/commit/5be00247ae0de2e24dd14bbe4d9ca159434a1710 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 20:14:38 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Oct 2018 00:14:38 +0000 Subject: [issue26441] email.charset: to_splittable and from_splittable are not there anymore! In-Reply-To: <1456440480.97.0.346838980393.issue26441@psf.upfronthosting.co.za> Message-ID: <1539908078.08.0.788709270274.issue26441@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Braden. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 20:21:52 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Oct 2018 00:21:52 +0000 Subject: [issue31522] _mboxMMDF.get_string() fails to pass param to get_bytes() In-Reply-To: <1505860469.5.0.965882587471.issue31522@psf.upfronthosting.co.za> Message-ID: <1539908512.11.0.788709270274.issue31522@psf.upfronthosting.co.za> R. David Murray added the comment: New changeset d16f012f842e5719ff9fb90e217efc0f795853f2 by R. David Murray (Cheryl Sabella) in branch 'master': bpo-31522: mailbox.get_string: pass `from_` parameter to `get_bytes` (#9857) https://github.com/python/cpython/commit/d16f012f842e5719ff9fb90e217efc0f795853f2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 20:29:51 2018 From: report at bugs.python.org (Maxime Belanger) Date: Fri, 19 Oct 2018 00:29:51 +0000 Subject: [issue35022] MagicMock should support `__fspath__` Message-ID: <1539908991.05.0.788709270274.issue35022@psf.upfronthosting.co.za> New submission from Maxime Belanger : We have plenty of tests calling into `os.path.*` functions, and as Python 3.6+ gets more stringent about checking for `os.PathLike` compliance, it would greatly simplify our lives for `MagicMock` to support `__fspath__`. ---------- components: Library (Lib) messages: 328014 nosy: Maxime Belanger priority: normal severity: normal status: open title: MagicMock should support `__fspath__` type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 21:01:22 2018 From: report at bugs.python.org (=?utf-8?q?Max_B=C3=A9langer?=) Date: Fri, 19 Oct 2018 01:01:22 +0000 Subject: [issue35022] MagicMock should support `__fspath__` In-Reply-To: <1539908991.05.0.788709270274.issue35022@psf.upfronthosting.co.za> Message-ID: <1539910882.97.0.788709270274.issue35022@psf.upfronthosting.co.za> Change by Max B?langer : ---------- keywords: +patch pull_requests: +9307 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 21:29:58 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 19 Oct 2018 01:29:58 +0000 Subject: [issue35015] availability directive breaks po files In-Reply-To: <1539852628.85.0.788709270274.issue35015@psf.upfronthosting.co.za> Message-ID: <1539912598.04.0.788709270274.issue35015@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: @Cheryl I think it's about nested inline markup. The func is wrapped inside a * and the markup is normal is not nested here. I tried a sample directive as below : ..availability: :func:`len` PO file Availability: len() Expected Availability: :func:`len` @Victor Yes, PO files are broken and markup is good. They have :func:`len` converted to len() like a method call in the output. Since markdown works fine I guess there is some configuration missing in the custom directive code to ensure translations work the same since there are directives like versionadded that have :func: that work fine in PO files. I tried debugging gettext.py in sphinx where catalog of messages are returned without markup as noted for Availablity directive and then written to the file. I don't know how to go little above the call stack to debug further since sphinx configuration looks very complicated. Thanks P.S. On mobile please ignore formatting errors if any ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 21:50:07 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 19 Oct 2018 01:50:07 +0000 Subject: [issue35022] MagicMock should support `__fspath__` In-Reply-To: <1539908991.05.0.788709270274.issue35022@psf.upfronthosting.co.za> Message-ID: <1539913807.16.0.788709270274.issue35022@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 21:58:12 2018 From: report at bugs.python.org (Sapan) Date: Fri, 19 Oct 2018 01:58:12 +0000 Subject: [issue35023] Missed a key when iterating over dictionary Message-ID: <1539914292.46.0.788709270274.issue35023@psf.upfronthosting.co.za> New submission from Sapan : The issue occurs in the second level of nested dictionary.Iterating over nested dictionary and editing the key by popping the old key and entering the new key. The next iteration, at the second level of nested dictionary, then skips the second key in dictionary and continues from the third key. In debug mode found that on editing the first key, the new memory allocated points to an address that lies between second and third keys memory address. Let me know if some other information is required. I am attaching the python file where I successfully reproduced the issue. ---------- files: Dictissue.py messages: 328016 nosy: Saps priority: normal severity: normal status: open title: Missed a key when iterating over dictionary type: resource usage versions: Python 3.7 Added file: https://bugs.python.org/file47882/Dictissue.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 22:41:36 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 19 Oct 2018 02:41:36 +0000 Subject: [issue35022] MagicMock should support `__fspath__` In-Reply-To: <1539908991.05.0.788709270274.issue35022@psf.upfronthosting.co.za> Message-ID: <1539916896.92.0.788709270274.issue35022@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 22:53:01 2018 From: report at bugs.python.org (Ammar Askar) Date: Fri, 19 Oct 2018 02:53:01 +0000 Subject: [issue35023] Missed a key when iterating over dictionary In-Reply-To: <1539914292.46.0.788709270274.issue35023@psf.upfronthosting.co.za> Message-ID: <1539917581.91.0.788709270274.issue35023@psf.upfronthosting.co.za> Ammar Askar added the comment: Modifying containers while iterating over them is generally not safe. In this case the iterator at the point you start the loop will contain all the items to iterate over, adding them mid-loop will not cause them to be iterated over. Take a look at the last section here for suggestions: https://docs.python.org/3/tutorial/datastructures.html#looping-techniques ---------- nosy: +ammar2 resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 23:01:12 2018 From: report at bugs.python.org (Ma Lin) Date: Fri, 19 Oct 2018 03:01:12 +0000 Subject: [issue32174] nonASCII punctuation characters can not display in python363.chm. In-Reply-To: <1512013530.29.0.213398074469.issue32174@psf.upfronthosting.co.za> Message-ID: <1539918072.01.0.788709270274.issue32174@psf.upfronthosting.co.za> Ma Lin added the comment: > It seems to me that this adds escape4chm as unconditional dependency on all platforms. `Doc/Makefile` also includes `htmlhelp` command, it generates .chm materials. BTW, the related navigation bar still has corrputed characters, see the attached file. This can't be fix via Sphinx extension. I'm writing a Sphinx patch, if they accept it, we can revert this commit, a new option will sovle this perfectly: htmlhelp_ascii_output = True ---------- Added file: https://bugs.python.org/file47883/not perfect yet.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 23:03:02 2018 From: report at bugs.python.org (Sapan) Date: Fri, 19 Oct 2018 03:03:02 +0000 Subject: [issue35023] Missed a key when iterating over dictionary In-Reply-To: <1539914292.46.0.788709270274.issue35023@psf.upfronthosting.co.za> Message-ID: <1539918182.61.0.788709270274.issue35023@psf.upfronthosting.co.za> Sapan added the comment: It makes sense that the it wont re-iterate, but this scenario is totally legit and should be handled in a better way. Iterating through items does not really help here because that will give me a tuple and they are immutable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 23:04:28 2018 From: report at bugs.python.org (Braden Groom) Date: Fri, 19 Oct 2018 03:04:28 +0000 Subject: [issue35005] argparse should accept json and yaml argument types In-Reply-To: <1539735338.04.0.788709270274.issue35005@psf.upfronthosting.co.za> Message-ID: <1539918268.64.0.788709270274.issue35005@psf.upfronthosting.co.za> Braden Groom added the comment: I agree with Paul. This is probably simple enough for applications to implement. It also doesn't make sense to add either of these if the precedent was set by rejecting DateTime previously. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 23:13:02 2018 From: report at bugs.python.org (Sapan) Date: Fri, 19 Oct 2018 03:13:02 +0000 Subject: [issue35023] Missed a key when iterating over dictionary In-Reply-To: <1539914292.46.0.788709270274.issue35023@psf.upfronthosting.co.za> Message-ID: <1539918782.9.0.788709270274.issue35023@psf.upfronthosting.co.za> Sapan added the comment: As for creating a new list all together will require quite a lot of work as this particular json is huge and many keys contain periods. Plus there are multiple jsons. I still believe there should be a better way to handle this. ---------- status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 23:14:07 2018 From: report at bugs.python.org (Tim Peters) Date: Fri, 19 Oct 2018 03:14:07 +0000 Subject: [issue35023] Missed a key when iterating over dictionary In-Reply-To: <1539914292.46.0.788709270274.issue35023@psf.upfronthosting.co.za> Message-ID: <1539918847.32.0.788709270274.issue35023@psf.upfronthosting.co.za> Tim Peters added the comment: This won't be changed. The effect on the iteration order of adding and/or removing keys from a dict while iterating over it has never been defined in Python, and never will be. The Python 3 docs for dict views say this clearly: """ Iterating views while adding or deleting entries in the dictionary may raise a RuntimeError or fail to iterate over all entries. """ You're experiencing the second symptom ("fail to iterate over all entries"). It's expected. If you can't do the time, don't do the crime ;-) ---------- nosy: +tim.peters status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 23:25:10 2018 From: report at bugs.python.org (Sapan) Date: Fri, 19 Oct 2018 03:25:10 +0000 Subject: [issue35023] Missed a key when iterating over dictionary In-Reply-To: <1539914292.46.0.788709270274.issue35023@psf.upfronthosting.co.za> Message-ID: <1539919510.45.0.788709270274.issue35023@psf.upfronthosting.co.za> Sapan added the comment: Fair enough. Would like to know the reason though, why is this run time error acceptable ? ---------- status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 23:25:44 2018 From: report at bugs.python.org (Sapan) Date: Fri, 19 Oct 2018 03:25:44 +0000 Subject: [issue35023] Missed a key when iterating over dictionary In-Reply-To: <1539914292.46.0.788709270274.issue35023@psf.upfronthosting.co.za> Message-ID: <1539919544.26.0.788709270274.issue35023@psf.upfronthosting.co.za> Sapan added the comment: Thanks for the response btw ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 23:31:26 2018 From: report at bugs.python.org (Ammar Askar) Date: Fri, 19 Oct 2018 03:31:26 +0000 Subject: [issue35023] Missed a key when iterating over dictionary In-Reply-To: <1539914292.46.0.788709270274.issue35023@psf.upfronthosting.co.za> Message-ID: <1539919886.94.0.788709270274.issue35023@psf.upfronthosting.co.za> Ammar Askar added the comment: Think about what it means to iterate over a hashmap. Let's say your pop() causes the dictionary to become smaller than the resizing threshold and now the indexes need to be rebuilt, how would this be handled gently by the iterator? This situation is not just something unique to python dictionaries, google around for "delete while iterating" and you'll find that most languages prohibit you from mutating containers while iterating over them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 23:36:49 2018 From: report at bugs.python.org (Tim Peters) Date: Fri, 19 Oct 2018 03:36:49 +0000 Subject: [issue35023] Missed a key when iterating over dictionary In-Reply-To: <1539914292.46.0.788709270274.issue35023@psf.upfronthosting.co.za> Message-ID: <1539920209.57.0.788709270274.issue35023@psf.upfronthosting.co.za> Tim Peters added the comment: Questions about Python should be asked, e.g., on the Python mailing list. The short course is that it's desired that iterating over dicts be as fast as possible, and nobody knows a way to make iteration robust in the face of mutations that wouldn't be significantly slower. The dict implementation is quite involved, and a single mutation _can_ cause major restructuring of the internal layout. As is, the dict implementation checks to see whether the dict _size_ has changed across iterations, and raises a RuntimeError if it has. That's cheap. When you both delete and add a key between iterations, the dict size doesn't change overall, so that runtime check doesn't trigger. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 23:50:47 2018 From: report at bugs.python.org (Sapan) Date: Fri, 19 Oct 2018 03:50:47 +0000 Subject: [issue35023] Missed a key when iterating over dictionary In-Reply-To: <1539914292.46.0.788709270274.issue35023@psf.upfronthosting.co.za> Message-ID: <1539921047.22.0.788709270274.issue35023@psf.upfronthosting.co.za> Sapan added the comment: Aha I did have that in mind while writing the code. I guess a warning could have helped. Can that be introduced ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 18 23:53:02 2018 From: report at bugs.python.org (Tim Peters) Date: Fri, 19 Oct 2018 03:53:02 +0000 Subject: [issue35023] Missed a key when iterating over dictionary In-Reply-To: <1539914292.46.0.788709270274.issue35023@psf.upfronthosting.co.za> Message-ID: <1539921182.78.0.788709270274.issue35023@psf.upfronthosting.co.za> Tim Peters added the comment: Not without more expense. Which is why it hasn't been done. But this is a wrong place to talk about it. If you want Python to change, go to the python-ideas mailing list? https://mail.python.org/mailman/listinfo/python-ideas ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 00:00:41 2018 From: report at bugs.python.org (Quentin Agren) Date: Fri, 19 Oct 2018 04:00:41 +0000 Subject: [issue35024] Incorrect logging in importlib when '.pyc' file creation fails Message-ID: <1539921641.62.0.788709270274.issue35024@psf.upfronthosting.co.za> New submission from Quentin Agren : Hi, This is the first issue I submit so please correct me if I do anything wrong. Description of the issue: imporlib logs 'wrote ' even when file creation fails with OSError (for lack of write persmission for example) Reproducing the bug in Python 3.6 on ubuntu 16.04: cd /home/quentin/tmp mkdir __pycache__ chmod -R -w __pycache__ echo '1 + 1' > spam.py python -vv -c'import spam' 2>&1 | grep '__pycache__/spam' Output: # could not create '/home/quentin/tmp/__pycache__/spam.cpython-36.pyc': PermissionError(13, 'Permission denied') # wrote '/home/quentin/tmp/__pycache__/spam.cpython-36.pyc' Reason: SourceFileLoader.set_data() silences OSError raised by _write_atomic (importlib/_bootstrap_external.py line 875) Then SourceLoader.get_code() does not see that something went awry and logs file creation (same file, line 789) If it is worth fixing I would be glad to contribute a patch, but would probably need a little guidance. ---------- components: Library (Lib) messages: 328029 nosy: qagren priority: normal severity: normal status: open title: Incorrect logging in importlib when '.pyc' file creation fails type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 01:29:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2018 05:29:50 +0000 Subject: [issue35024] Incorrect logging in importlib when '.pyc' file creation fails In-Reply-To: <1539921641.62.0.788709270274.issue35024@psf.upfronthosting.co.za> Message-ID: <1539926990.62.0.788709270274.issue35024@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +brett.cannon, eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 02:24:57 2018 From: report at bugs.python.org (Maxime Belanger) Date: Fri, 19 Oct 2018 06:24:57 +0000 Subject: [issue35025] Compiling `timemodule.c` can fail on macOS due to availability warnings Message-ID: <1539930297.83.0.788709270274.issue35025@psf.upfronthosting.co.za> New submission from Maxime Belanger : We build Python on macOS with `-Werror=unguarded-availability` and `-mmacosx-version-min=` to ensure `libpython` is binary-compatible with earlier versions of macOS. This can create problems when building some modules, including `timemodule.c`, which was recently altered to fix bpo-28081. The initial fix is inappropriate, because attempting to reference `CLOCK_REALTIME` et al when `HAVE_CLOCK_GETTIME` is unset (in our case, due to being too "new"), results in a compiler error: ``` ./Modules/timemodule.c:1368:29: error: '_CLOCK_REALTIME' is only available on macOS 10.12 or newer [-Werror,-Wunguarded-availability] PyModule_AddIntMacro(m, CLOCK_REALTIME); ^~~~~~~~~~~~~~ /usr/include/time.h:154:24: note: expanded from macro 'CLOCK_REALTIME' #define CLOCK_REALTIME _CLOCK_REALTIME ^~~~~~~~~~~~~~~ ./Include/modsupport.h:78:67: note: expanded from macro 'PyModule_AddIntMacro' #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c) ``` A more correct patch (I'm attaching ours) is to only add the macros to the module if at least one of the three functions is defined. This should continue to work for the author of the original issue as well as fix our problem. ---------- components: Extension Modules, macOS messages: 328030 nosy: Maxime Belanger, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Compiling `timemodule.c` can fail on macOS due to availability warnings type: compile error versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 02:36:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2018 06:36:08 +0000 Subject: [issue35025] Compiling `timemodule.c` can fail on macOS due to availability warnings In-Reply-To: <1539930297.83.0.788709270274.issue35025@psf.upfronthosting.co.za> Message-ID: <1539930968.17.0.788709270274.issue35025@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +benjamin.peterson, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 02:41:00 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Oct 2018 06:41:00 +0000 Subject: [issue35020] Add multisort recipe to sorting docs In-Reply-To: <1539882818.57.0.788709270274.issue35020@psf.upfronthosting.co.za> Message-ID: <1539931260.9.0.788709270274.issue35020@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 02:42:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2018 06:42:04 +0000 Subject: [issue35020] Add multisort recipe to sorting docs In-Reply-To: <1539882818.57.0.788709270274.issue35020@psf.upfronthosting.co.za> Message-ID: <1539931324.37.0.788709270274.issue35020@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 02:45:27 2018 From: report at bugs.python.org (=?utf-8?q?Max_B=C3=A9langer?=) Date: Fri, 19 Oct 2018 06:45:27 +0000 Subject: [issue35025] Compiling `timemodule.c` can fail on macOS due to availability warnings In-Reply-To: <1539930297.83.0.788709270274.issue35025@psf.upfronthosting.co.za> Message-ID: <1539931527.64.0.788709270274.issue35025@psf.upfronthosting.co.za> Change by Max B?langer : ---------- keywords: +patch pull_requests: +9308 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 02:46:29 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 19 Oct 2018 06:46:29 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1539931589.48.0.788709270274.issue27741@psf.upfronthosting.co.za> Tal Einat added the comment: I agree with Gus, such new wording would be great. Gus, would you like to make a PR? I'd split the comparison into a second paragraph, and avoid the word "better", instead using something like "but datetime.strptime() also retains both microseconds and timezone data." Note that such a change of the wording to "similar" rather than "equivalent" will also future-proof this wording from minor future changes to either function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 03:30:14 2018 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 19 Oct 2018 07:30:14 +0000 Subject: [issue35013] Add more type checks for children of xml.etree.ElementTree.Element In-Reply-To: <1539845781.97.0.788709270274.issue35013@psf.upfronthosting.co.za> Message-ID: <1539934214.78.0.788709270274.issue35013@psf.upfronthosting.co.za> Stefan Behnel added the comment: Well, if that's what it takes, then that's what it takes. I'm fine with the change. The (unaccelerated) ET doesn't strictly require it, but a) I can't really see a use case for non-Element classes in the tree, b) pretty much no-one uses plain Python ET anymore, and c) it's better to test the type on input than on usage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 05:13:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2018 09:13:08 +0000 Subject: [issue35013] Add more type checks for children of xml.etree.ElementTree.Element In-Reply-To: <1539845781.97.0.788709270274.issue35013@psf.upfronthosting.co.za> Message-ID: <1539940387.99.0.788709270274.issue35013@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f081fd83032be48aefdb1bbcc38ab5deb03785d5 by Serhiy Storchaka in branch 'master': bpo-35013: Add more type checks for children of Element. (GH-9944) https://github.com/python/cpython/commit/f081fd83032be48aefdb1bbcc38ab5deb03785d5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 05:14:10 2018 From: report at bugs.python.org (George Fischhof) Date: Fri, 19 Oct 2018 09:14:10 +0000 Subject: [issue35026] Winreg's documentation lacks mentioning required permission at some points Message-ID: <1539940450.92.0.788709270274.issue35026@psf.upfronthosting.co.za> New submission from George Fischhof : Winreg's documentation lacks mentioning required permission at some points Hi there, on page https://docs.python.org/3/library/winreg.html it is not mentioned in the description of the following functions: winreg.DeleteKey winreg.DeleteKeyEx winreg.DeleteValue that they require KEY_SET_VALUE when the registry key is opened. It is mentioned for example at: winreg.SetValue with the following text: The key identified by the key parameter must have been opened with KEY_SET_VALUE access. BR, George ---------- assignee: docs at python components: Documentation messages: 328034 nosy: docs at python, georgefischhof priority: normal severity: normal status: open title: Winreg's documentation lacks mentioning required permission at some points type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 05:34:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2018 09:34:28 +0000 Subject: [issue35013] Add more type checks for children of xml.etree.ElementTree.Element In-Reply-To: <1539845781.97.0.788709270274.issue35013@psf.upfronthosting.co.za> Message-ID: <1539941668.08.0.788709270274.issue35013@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If there wouldn't type checks in append(), extend() and insert(), I would consider to add the support of duck-typing in iterating and searching. But since non-Elements already are forbidden in the public API, it is better to forbid them everywhere and simplify internal code. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 06:53:06 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Oct 2018 10:53:06 +0000 Subject: [issue34866] CGI DOS vulnerability via long post list In-Reply-To: <1538429007.97.0.545547206417.issue34866@psf.upfronthosting.co.za> Message-ID: <1539946386.65.0.788709270274.issue34866@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 209144831b0a19715bda3bd72b14a3e6192d9cc1 by Miss Islington (bot) (matthewbelisle-wf) in branch 'master': bpo-34866: Adding max_num_fields to cgi.FieldStorage (GH-9660) https://github.com/python/cpython/commit/209144831b0a19715bda3bd72b14a3e6192d9cc1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 06:53:17 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Oct 2018 10:53:17 +0000 Subject: [issue34866] CGI DOS vulnerability via long post list In-Reply-To: <1538429007.97.0.545547206417.issue34866@psf.upfronthosting.co.za> Message-ID: <1539946397.04.0.788709270274.issue34866@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9309 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 06:53:24 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Oct 2018 10:53:24 +0000 Subject: [issue34866] CGI DOS vulnerability via long post list In-Reply-To: <1538429007.97.0.545547206417.issue34866@psf.upfronthosting.co.za> Message-ID: <1539946404.69.0.788709270274.issue34866@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9310 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 07:11:20 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Oct 2018 11:11:20 +0000 Subject: [issue34866] CGI DOS vulnerability via long post list In-Reply-To: <1538429007.97.0.545547206417.issue34866@psf.upfronthosting.co.za> Message-ID: <1539947480.02.0.788709270274.issue34866@psf.upfronthosting.co.za> miss-islington added the comment: New changeset a66f279a1381dd5c1c27232ccf9f210d575e1dcc by Miss Islington (bot) in branch '3.7': bpo-34866: Adding max_num_fields to cgi.FieldStorage (GH-9660) https://github.com/python/cpython/commit/a66f279a1381dd5c1c27232ccf9f210d575e1dcc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 07:17:01 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Oct 2018 11:17:01 +0000 Subject: [issue34866] CGI DOS vulnerability via long post list In-Reply-To: <1538429007.97.0.545547206417.issue34866@psf.upfronthosting.co.za> Message-ID: <1539947821.22.0.788709270274.issue34866@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 322a914965368ffd7e4f97ede50b351fdf48d870 by Miss Islington (bot) in branch '3.6': bpo-34866: Adding max_num_fields to cgi.FieldStorage (GH-9660) https://github.com/python/cpython/commit/322a914965368ffd7e4f97ede50b351fdf48d870 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 07:18:24 2018 From: report at bugs.python.org (Gus Goulart) Date: Fri, 19 Oct 2018 11:18:24 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1539947904.24.0.788709270274.issue27741@psf.upfronthosting.co.za> Gus Goulart added the comment: Thanks, Tal. I will open up a PR for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 07:28:13 2018 From: report at bugs.python.org (Ben Spiller) Date: Fri, 19 Oct 2018 11:28:13 +0000 Subject: [issue5166] ElementTree and minidom don't prevent creation of not well-formed XML In-Reply-To: <1233918825.25.0.360851750395.issue5166@psf.upfronthosting.co.za> Message-ID: <1539948493.31.0.788709270274.issue5166@psf.upfronthosting.co.za> Ben Spiller added the comment: To help anyone else struggling with this bug, based on https://lsimons.wordpress.com/2011/03/17/stripping-illegal-characters-out-of-xml-in-python/ the best workaround I've currently found is to define this: def escape_xml_illegal_chars(unicodeString, replaceWith=u'?'): return re.sub(u'[\x00-\x08\x0b\x0c\x0e-\x1F\uD800-\uDFFF\uFFFE\uFFFF]', replaceWith, unicodeString) and then copy+paste the following pattern into every bit of code that generates XML: myfile.write(escape_xml_illegal_chars(document.toxml(encoding='utf-8').decode('utf-8')).encode('utf-8')) It's obviously pretty grim (and unsafe) to expect every python developer to copy+paste this kind of thing into their own project to avoid buggy XML generation, so would be better to have the escape_xml_illegal_chars function in the python standard library (maybe alongside xml.sax.utils.escape - which notably does _not_ escape all the unicode characters that aren't valid XML), and built-in support for this as part of document.toxml. I guess we'd want it to be user-configurable for any users who are prepared to tolerate the possibility unparseable XML documents will be generated in return for improved performance for the common case where these characters are not present, not not having the capability at all just means most python applications that do XML generate with special-casing this have a bug. I suggest we definitely need some clear warnings about this in the doc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 07:34:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2018 11:34:58 +0000 Subject: [issue31752] Assertion failure in timedelta() in case of bad __divmod__ In-Reply-To: <1507670968.8.0.213398074469.issue31752@psf.upfronthosting.co.za> Message-ID: <1539948898.15.0.788709270274.issue31752@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9311 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 08:00:53 2018 From: report at bugs.python.org (Marius Gedminas) Date: Fri, 19 Oct 2018 12:00:53 +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: <1539950453.71.0.788709270274.issue29564@psf.upfronthosting.co.za> Marius Gedminas added the comment: @stinner: https://haypo.github.io/contrib-cpython-2016q1.html is now showing a 404 error. Has the site moved? Do you have a working URL? (I did find https://docs.python.org/3/whatsnew/3.6.html#warnings, which was very helpful.) ---------- nosy: +mgedmin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 09:07:50 2018 From: report at bugs.python.org (Julien Palard) Date: Fri, 19 Oct 2018 13:07:50 +0000 Subject: [issue35015] availability directive breaks po files In-Reply-To: <1539852628.85.0.788709270274.issue35015@psf.upfronthosting.co.za> Message-ID: <1539954470.43.0.788709270274.issue35015@psf.upfronthosting.co.za> Julien Palard added the comment: Cross-posting here in case it's a sphinx issue: https://github.com/sphinx-doc/sphinx/issues/5554 Tried to debug it a bit at lunch time but the docutils API is still opaque to my eyes :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 09:22:18 2018 From: report at bugs.python.org (YP) Date: Fri, 19 Oct 2018 13:22:18 +0000 Subject: [issue14894] distutils.LooseVersion fails to compare number and a word In-Reply-To: <1337805749.61.0.661955519892.issue14894@psf.upfronthosting.co.za> Message-ID: <1539955338.2.0.788709270274.issue14894@psf.upfronthosting.co.za> YP added the comment: Hi, Just wanted to know if there was anything new on this? When managing softwares version we often are not at all master of the naming convention used: we just have to deal with it. "LooseVersion" was very nice as it would take any string as input and do "the best" with it. Now that it's broken for some type of version string, it become quite useless. I overloaded the comparison part more or less using the Natalia patch idea (but done after the argument split). But shouldn't that be default? Thanks. ---------- nosy: +YP _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 10:42:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2018 14:42:13 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1539960133.92.0.788709270274.issue32912@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 6543912c90ffa579dc4c01e811f9609cf92197d3 by Serhiy Storchaka in branch 'master': bpo-32912: Replace a DeprecationWarning with a SyntaxWarning (GH-9652) https://github.com/python/cpython/commit/6543912c90ffa579dc4c01e811f9609cf92197d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 10:42:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2018 14:42:31 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1539960151.58.0.788709270274.issue32912@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 Oct 19 11:00:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2018 15:00:57 +0000 Subject: [issue34741] Get rid of tp_getattro and tp_setattro in pyexpat.xmlparser In-Reply-To: <1537367937.72.0.956365154283.issue34741@psf.upfronthosting.co.za> Message-ID: <1539961257.69.0.788709270274.issue34741@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 55f8249d65af3f1b83df81fa46f6fc6e452ed944 by Serhiy Storchaka in branch 'master': bpo-34741: Get rid of tp_getattro and tp_setattro in pyexpat.xmlparser. (GH-9422) https://github.com/python/cpython/commit/55f8249d65af3f1b83df81fa46f6fc6e452ed944 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 11:01:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2018 15:01:12 +0000 Subject: [issue34741] Get rid of tp_getattro and tp_setattro in pyexpat.xmlparser In-Reply-To: <1537367937.72.0.956365154283.issue34741@psf.upfronthosting.co.za> Message-ID: <1539961272.36.0.788709270274.issue34741@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 Oct 19 11:04:03 2018 From: report at bugs.python.org (Matej Cepl) Date: Fri, 19 Oct 2018 15:04:03 +0000 Subject: [issue32174] nonASCII punctuation characters can not display in python363.chm. In-Reply-To: <1512013530.29.0.213398074469.issue32174@psf.upfronthosting.co.za> Message-ID: <1539961443.01.0.788709270274.issue32174@psf.upfronthosting.co.za> Matej Cepl added the comment: Sorry, my mistake, it seems I was using python2 Sphinx even for building python3 documentation, which is a bad idea, I guess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 11:20:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2018 15:20:06 +0000 Subject: [issue34936] tkinter.Spinbox.selection_element() raises TclError In-Reply-To: <1539014215.23.0.545547206417.issue34936@psf.upfronthosting.co.za> Message-ID: <1539962406.76.0.788709270274.issue34936@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset bd9c2ce7acaef45f23c2659b854fc9925096d040 by Serhiy Storchaka (Juliette Monsel) in branch '3.7': bpo-34936: Fix TclError in tkinter.Spinbox.selection_element(). (GH-9760) (GH-9957) https://github.com/python/cpython/commit/bd9c2ce7acaef45f23c2659b854fc9925096d040 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 11:20:35 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Oct 2018 15:20:35 +0000 Subject: [issue34936] tkinter.Spinbox.selection_element() raises TclError In-Reply-To: <1539014215.23.0.545547206417.issue34936@psf.upfronthosting.co.za> Message-ID: <1539962435.47.0.788709270274.issue34936@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9312 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 11:41:11 2018 From: report at bugs.python.org (Tilman Krummeck) Date: Fri, 19 Oct 2018 15:41:11 +0000 Subject: [issue35027] distutils.core.setup does not raise TypeError when if classifiers, keywords and platforms fields are not specified as a list Message-ID: <1539963671.26.0.788709270274.issue35027@psf.upfronthosting.co.za> New submission from Tilman Krummeck : The python documentation states at this point: "Changed in version 3.7: setup now raises a TypeError if classifiers, keywords and platforms fields are not specified as a list." https://docs.python.org/3.7/distutils/setupscript.html#additional-meta-data I wrote a simple foo example that does show, that eigther the documentation is wrong or a bug exists in setup(). Here's what I get in my console: (venv) D:\Workspaces\pyCharm\dist_utils_test>setup.py sdist running sdist running check warning: sdist: manifest template 'MANIFEST.in' does not exist (using default file list) writing manifest file 'MANIFEST' creating foo-1.0 creating foo-1.0\foo making hard links in foo-1.0... hard linking README -> foo-1.0 hard linking setup.py -> foo-1.0 hard linking foo\__init__.py -> foo-1.0\foo hard linking foo\foo.py -> foo-1.0\foo creating dist Creating tar archive removing 'foo-1.0' (and everything under it) (venv) D:\Workspaces\pyCharm\dist_utils_test>pip install dist/foo-1.0.tar.gz Processing d:\workspaces\pycharm\dist_utils_test\dist\foo-1.0.tar.gz Building wheels for collected packages: foo Running setup.py bdist_wheel for foo ... done Stored in directory: C:\Users\Tilman Krummeck\AppData\Local\pip\Cache\wheels\c3\f0\b9\c1066a85814139442fec00ee29293f0f96f0c6e0d6c24ed149 Successfully built foo Installing collected packages: foo Successfully installed foo-1.0 I'm doing this on Python 3.7 (32bit) with pip 18.1 and setuptools 40.4.3. ---------- components: Distutils files: dist_utils_test.zip messages: 328048 nosy: TilmanKrummeck, dstufft, eric.araujo priority: normal severity: normal status: open title: distutils.core.setup does not raise TypeError when if classifiers, keywords and platforms fields are not specified as a list type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file47884/dist_utils_test.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 11:44:39 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Oct 2018 15:44:39 +0000 Subject: [issue34936] tkinter.Spinbox.selection_element() raises TclError In-Reply-To: <1539014215.23.0.545547206417.issue34936@psf.upfronthosting.co.za> Message-ID: <1539963879.35.0.788709270274.issue34936@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c04347fad936f40cc0bd844e44a71ba88b027b2d by Miss Islington (bot) in branch '3.6': bpo-34936: Fix TclError in tkinter.Spinbox.selection_element(). (GH-9760) (GH-9957) https://github.com/python/cpython/commit/c04347fad936f40cc0bd844e44a71ba88b027b2d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 11:51:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2018 15:51:01 +0000 Subject: [issue34936] tkinter.Spinbox.selection_element() raises TclError In-Reply-To: <1539014215.23.0.545547206417.issue34936@psf.upfronthosting.co.za> Message-ID: <1539964261.14.0.788709270274.issue34936@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9313 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 11:58:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 15:58:25 +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: <1539964705.57.0.788709270274.issue29564@psf.upfronthosting.co.za> STINNER Victor added the comment: > @stinner: https://haypo.github.io/contrib-cpython-2016q1.html is now showing a 404 error. Has the site moved? Do you have a working URL? Yes, it moved to: https://vstinner.github.io/contrib-cpython-2016q1.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 12:16:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 16:16:42 +0000 Subject: [issue34783] [3.7] segmentation-fault/core dump when try to run non-existing file specified on commandline In-Reply-To: <1537747248.54.0.956365154283.issue34783@psf.upfronthosting.co.za> Message-ID: <1539965802.28.0.788709270274.issue34783@psf.upfronthosting.co.za> STINNER Victor added the comment: The issue should be fixed now, I close it again. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 12:20:11 2018 From: report at bugs.python.org (Matthew Belisle) Date: Fri, 19 Oct 2018 16:20:11 +0000 Subject: [issue34866] CGI DOS vulnerability via long post list In-Reply-To: <1538429007.97.0.545547206417.issue34866@psf.upfronthosting.co.za> Message-ID: <1539966011.07.0.788709270274.issue34866@psf.upfronthosting.co.za> Change by Matthew Belisle : ---------- pull_requests: +9314 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 12:49:27 2018 From: report at bugs.python.org (DamlaAltun) Date: Fri, 19 Oct 2018 16:49:27 +0000 Subject: [issue35003] Provide an option to venv to put files in a bin/ directory on Windows In-Reply-To: <1539727932.79.0.788709270274.issue35003@psf.upfronthosting.co.za> Message-ID: <1539967767.93.0.788709270274.issue35003@psf.upfronthosting.co.za> DamlaAltun added the comment: Working on that. ---------- nosy: +DamlaAltun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 12:55:05 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Oct 2018 16:55:05 +0000 Subject: [issue33947] Dataclasses can raise RecursionError in __repr__ In-Reply-To: <1529758726.17.0.56676864532.issue33947@psf.upfronthosting.co.za> Message-ID: <1539968105.35.0.788709270274.issue33947@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9315 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 13:04:38 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 19 Oct 2018 17:04:38 +0000 Subject: [issue34725] Py_GetProgramFullPath() odd behaviour in Windows In-Reply-To: <1537291607.58.0.956365154283.issue34725@psf.upfronthosting.co.za> Message-ID: <1539968678.54.0.788709270274.issue34725@psf.upfronthosting.co.za> Steve Dower added the comment: I requested Victor review on my PR, but if anyone else is able to please feel free. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 13:28:35 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 19 Oct 2018 17:28:35 +0000 Subject: [issue33947] Dataclasses can raise RecursionError in __repr__ In-Reply-To: <1529758726.17.0.56676864532.issue33947@psf.upfronthosting.co.za> Message-ID: <1539970115.01.0.788709270274.issue33947@psf.upfronthosting.co.za> Eric V. Smith added the comment: New changeset b9182aa7dad8991fc8768ae494b45b5f7c316aca by Eric V. Smith (Miss Islington (bot)) in branch '3.7': bpo-33947: dataclasses no longer can raise RecursionError in repr (GF9916) (#9970) https://github.com/python/cpython/commit/b9182aa7dad8991fc8768ae494b45b5f7c316aca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 13:29:46 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 19 Oct 2018 17:29:46 +0000 Subject: [issue33947] Dataclasses can raise RecursionError in __repr__ In-Reply-To: <1529758726.17.0.56676864532.issue33947@psf.upfronthosting.co.za> Message-ID: <1539970186.17.0.788709270274.issue33947@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 13:34:57 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Oct 2018 17:34:57 +0000 Subject: [issue14894] distutils.LooseVersion fails to compare number and a word In-Reply-To: <1337805749.61.0.661955519892.issue14894@psf.upfronthosting.co.za> Message-ID: <1539970497.81.0.788709270274.issue14894@psf.upfronthosting.co.za> ?ric Araujo added the comment: I am inclined to reject the patch. LooseVersion is not meant to be a general utility for all modules; I know it?s used in the wild but projects should define their parsing/comparison function or make up a specific module for that. If the problem happens from distutils or pip when comparing real distributions that really define version='a' and version='1', then modern setuptools or flit or twine will warn about that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 13:43:07 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Oct 2018 17:43:07 +0000 Subject: [issue20216] Misleading docs for sha1, sha256, sha512, md5 modules In-Reply-To: <1389320490.58.0.128009418019.issue20216@psf.upfronthosting.co.za> Message-ID: <1539970987.08.0.788709270274.issue20216@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9316 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 13:54:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Oct 2018 17:54:10 +0000 Subject: [issue14894] distutils.LooseVersion fails to compare number and a word In-Reply-To: <1337805749.61.0.661955519892.issue14894@psf.upfronthosting.co.za> Message-ID: <1539971650.44.0.788709270274.issue14894@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If you want to make LooseVersion a tiny bit more robust, I suggest to borrow the algorithm from the platform module (see issue26544). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 14:27:12 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 19 Oct 2018 18:27:12 +0000 Subject: [issue34912] Update overflow checks in resize_buffer In-Reply-To: <1538803916.84.0.545547206417.issue34912@psf.upfronthosting.co.za> Message-ID: <1539973632.54.0.788709270274.issue34912@psf.upfronthosting.co.za> Gregory P. Smith added the comment: correct, i don't see an obvious problem in the existing code. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 14:36:56 2018 From: report at bugs.python.org (Matthew Belisle) Date: Fri, 19 Oct 2018 18:36:56 +0000 Subject: [issue35028] Off by one error in cgi.FieldStorage(max_num_fields) Message-ID: <1539974216.92.0.788709270274.issue35028@psf.upfronthosting.co.za> New submission from Matthew Belisle : The cgi.FieldStorage class added in https://github.com/python/cpython/pull/9660 has an off by one error in the logic for recursively nested objects. The problem is that sub_max_num_fields should be initialized outside of the while loop, not inside of it. Adding a unit test to cover this case. Note: This problem does not exist in the 2.7 backport in https://github.com/python/cpython/pull/9969. ---------- components: Library (Lib) messages: 328060 nosy: Matthew Belisle priority: normal severity: normal status: open title: Off by one error in cgi.FieldStorage(max_num_fields) type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 14:37:44 2018 From: report at bugs.python.org (Matthew Belisle) Date: Fri, 19 Oct 2018 18:37:44 +0000 Subject: [issue35028] Off by one error in cgi.FieldStorage(max_num_fields) In-Reply-To: <1539974216.92.0.788709270274.issue35028@psf.upfronthosting.co.za> Message-ID: <1539974264.29.0.788709270274.issue35028@psf.upfronthosting.co.za> Change by Matthew Belisle : ---------- keywords: +patch pull_requests: +9317 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 16:11:12 2018 From: report at bugs.python.org (Ammar Askar) Date: Fri, 19 Oct 2018 20:11:12 +0000 Subject: [issue34991] variable type list [] referential integrity data loss In-Reply-To: <1539606462.61.0.788709270274.issue34991@psf.upfronthosting.co.za> Message-ID: <1539979872.29.0.788709270274.issue34991@psf.upfronthosting.co.za> Ammar Askar added the comment: Echoing what Eric and Steven said: please create a more minimal example of what you think the problem is. I'm closing this ticket now since it seems like you found the issue? Feel free to re-open if you can come up with a better example or describe the problem. ---------- nosy: +ammar2 resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 16:36:48 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 19 Oct 2018 20:36:48 +0000 Subject: [issue35027] distutils.core.setup does not raise TypeError when if classifiers, keywords and platforms fields are not specified as a list In-Reply-To: <1539963671.26.0.788709270274.issue35027@psf.upfronthosting.co.za> Message-ID: <1539981408.03.0.788709270274.issue35027@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. It was made as a TypeError in https://bugs.python.org/issue19610#msg306853 in the commit to check for list explicitly [0] . Then since it broke a lot of packages as seen in the discussion and now it accepts string and list later at https://bugs.python.org/issue19610#msg307622 and commit [1] . I think Distribution doc was changed to reflect the change and setup doc had the old one indicating TypeError . So I guess it's a documentation fix that needs to be done. Using an integer for classifier gives me a warning and also eventually a TypeError on master and Python 3.7 . I am proposing this to be an easy doc fix. Would you like to raise a PR? The doc is at https://github.com/python/cpython/blob/master/Doc/distutils/setupscript.rst # Using classifier=1 in setup.py gives warning and then a TypeError. String is acceptable as per the original report ../cpython/python.exe setup.py sdist Warning: 'classifiers' should be a list, got type 'int' Traceback (most recent call last): File "setup.py", line 3, in setup(name='foo', File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/distutils/core.py", line 108, in setup _setup_distribution = dist = klass(attrs) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/distutils/dist.py", line 267, in __init__ getattr(self.metadata, "set_" + key)(val) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/distutils/dist.py", line 1215, in set_classifiers self.classifiers = _ensure_list(value, 'classifiers') File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/distutils/dist.py", line 40, in _ensure_list value = list(value) TypeError: 'int' object is not iterable [0] https://github.com/python/cpython/commit/dcaed6b2d954786eb5369ec2e8dfdeefe3cdc6ae#diff-d9afd486aff62306cb23cb8be2d4458eR1218 [1] https://github.com/python/cpython/commit/8837dd092fe5ad5184889104e8036811ed839f98#diff-d9afd486aff62306cb23cb8be2d4458eR30 Hope this helps! ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 17:01:04 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Oct 2018 21:01:04 +0000 Subject: [issue34991] variable type list [] referential integrity data loss In-Reply-To: <1539606462.61.0.788709270274.issue34991@psf.upfronthosting.co.za> Message-ID: <1539982864.34.0.788709270274.issue34991@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This appears to be an incomplete breadth-first search program. (Incomplete: the visited list, for instance, is initialized and appended, but never used.) checkvisit consists of multiple references to the path list. Each time path is appended, it is then cleared and repopulated (with the same sequence). Given this and the location of the print statement, the output function output looks correct. Each time checkvisit is printed, it prints the current value of path k times, where k increases each iteration. Alan, the problem appears to be that you misunderstand lists and lists of lists and especially lists containing the same list multiple times. Do some simpler experiments and if you are still puzzled, post on python-list, not here. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 17:14:34 2018 From: report at bugs.python.org (Nic Watson) Date: Fri, 19 Oct 2018 21:14:34 +0000 Subject: [issue30945] loop.create_server does not detect if the interface is IPv6 enabled In-Reply-To: <1500285874.65.0.183073718331.issue30945@psf.upfronthosting.co.za> Message-ID: <1539983674.48.0.788709270274.issue30945@psf.upfronthosting.co.za> Change by Nic Watson : ---------- nosy: +jnwatson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 17:15:57 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Oct 2018 21:15:57 +0000 Subject: [issue35019] Minor Bug found in asyncio - Python 3.5.3 In-Reply-To: <1539880104.22.0.788709270274.issue35019@psf.upfronthosting.co.za> Message-ID: <1539983757.54.0.788709270274.issue35019@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- type: behavior -> enhancement versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 17:17:09 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Oct 2018 21:17:09 +0000 Subject: [issue35019] Allow ipaddres.IPv4/v6Address in asyncio.create_server In-Reply-To: <1539880104.22.0.788709270274.issue35019@psf.upfronthosting.co.za> Message-ID: <1539983829.6.0.788709270274.issue35019@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- title: Minor Bug found in asyncio - Python 3.5.3 -> Allow ipaddres.IPv4/v6Address in asyncio.create_server _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 17:46:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 21:46:35 +0000 Subject: [issue33073] Add as_integer_ratio() to int() objects In-Reply-To: <1520976305.18.0.467229070634.issue33073@psf.upfronthosting.co.za> Message-ID: <1539985595.07.0.788709270274.issue33073@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b2e2025941f6a4fdb716bd141d31acf720353d21 by Victor Stinner (Serhiy Storchaka) in branch 'master': bpo-33073: Rework int.as_integer_ratio() implementation (GH-9303) https://github.com/python/cpython/commit/b2e2025941f6a4fdb716bd141d31acf720353d21 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 17:50:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 21:50:11 +0000 Subject: [issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self" In-Reply-To: <1448654213.28.0.807225788685.issue25750@psf.upfronthosting.co.za> Message-ID: <1539985811.03.0.788709270274.issue25750@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 5a30620e68ebb911eef4d583de3776d782148637 by Victor Stinner (jdemeyer) in branch 'master': bpo-25750: Add test on bad descriptor __get__() (GH-9084) https://github.com/python/cpython/commit/5a30620e68ebb911eef4d583de3776d782148637 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 18:32:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 22:32:08 +0000 Subject: [issue34070] Superfluous call to isatty in open() when buffering >= 0 In-Reply-To: <1531073573.35.0.56676864532.issue34070@psf.upfronthosting.co.za> Message-ID: <1539988328.95.0.788709270274.issue34070@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8deab9672554edaf58f91e238cc899463d53f6ea by Victor Stinner (David Herberth) in branch 'master': bpo-34070: open() only checks for isatty if buffering < 0 (GH-8187) https://github.com/python/cpython/commit/8deab9672554edaf58f91e238cc899463d53f6ea ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 18:34:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 22:34:22 +0000 Subject: [issue34070] Superfluous call to isatty in open() when buffering >= 0 In-Reply-To: <1531073573.35.0.56676864532.issue34070@psf.upfronthosting.co.za> Message-ID: <1539988462.06.0.788709270274.issue34070@psf.upfronthosting.co.za> STINNER Victor added the comment: David Herberth: Thanks for report the issue, I didn't noticed it previously even if I read strace output frequently! And thanks for the fix. > This generates an error (can be seen with strace): > ioctl(5, TCGETS, 0x7ffef1435b60) = -1 ENOTTY (Inappropriate ioctl for device) Honestly, I don't think that it's a major bug, so I suggest to not backport the change to 3.7 and older. I prefer to not change stable changes to avoid any risk of regression. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 18:48:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 22:48:50 +0000 Subject: [issue1621] Do not assume signed integer overflow behavior In-Reply-To: <1197593027.35.0.00314874350765.issue1621@psf.upfronthosting.co.za> Message-ID: <1539989330.16.0.788709270274.issue1621@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a9274f7b3f69519f0746c50f85a68abd926ebe7b by Victor Stinner (Miss Islington (bot)) in branch '3.6': bpo-1621: Avoid signed integer overflow in set_table_resize(). (GH-9059) (GH-9199) https://github.com/python/cpython/commit/a9274f7b3f69519f0746c50f85a68abd926ebe7b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 18:50:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 22:50:38 +0000 Subject: [issue1621] Do not assume signed integer overflow behavior In-Reply-To: <1197593027.35.0.00314874350765.issue1621@psf.upfronthosting.co.za> Message-ID: <1539989438.06.0.788709270274.issue1621@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 6665802549006eb50c1a68c3489ee3aaf81d0c8e by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-1621: Avoid signed integer overflow in set_table_resize() (GH-9059) (GH-9198) https://github.com/python/cpython/commit/6665802549006eb50c1a68c3489ee3aaf81d0c8e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 18:55:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 22:55:35 +0000 Subject: [issue1621] Do not assume signed integer overflow behavior In-Reply-To: <1197593027.35.0.00314874350765.issue1621@psf.upfronthosting.co.za> Message-ID: <1539989735.45.0.788709270274.issue1621@psf.upfronthosting.co.za> STINNER Victor added the comment: Thank you very much to the task force who worked on this issues which can be seen as boring and useless, but are very important nowadays with C compilers which are more and more agressive to optimize everything (I'm looking at you clang!). This bug is open for 11 years and dozens and dozens of undefined behaviours have been fixed in the meanwhile. This bug is a giant beast with many patches and many pull requests. I dislike such bug, it's very hard to follow them. I suggest to open new bugs for undefined behaviour on specific functions, rather than a very vague "let's open a single bug to track everything". It's now time to close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:03:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 23:03:27 +0000 Subject: [issue34536] Enum._missing_ doesn't raise TypeError when a non-Enum object is a returned In-Reply-To: <1535485064.24.0.56676864532.issue34536@psf.upfronthosting.co.za> Message-ID: <1539990207.93.0.788709270274.issue34536@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9319 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:06:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 23:06:18 +0000 Subject: [issue34536] Enum._missing_ doesn't raise TypeError when a non-Enum object is a returned In-Reply-To: <1535485064.24.0.56676864532.issue34536@psf.upfronthosting.co.za> Message-ID: <1539990378.36.0.788709270274.issue34536@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9320 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:07:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 23:07:51 +0000 Subject: [issue34536] Enum._missing_ doesn't raise TypeError when a non-Enum object is a returned In-Reply-To: <1535485064.24.0.56676864532.issue34536@psf.upfronthosting.co.za> Message-ID: <1539990471.97.0.788709270274.issue34536@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote PR 9978 to backport the fix to Python 3.7. Should the fix be backported to Python 3.6 as well? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:09:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 23:09:04 +0000 Subject: [issue34791] xml package does not obey sys.flags.ignore_environment In-Reply-To: <1537807650.53.0.956365154283.issue34791@psf.upfronthosting.co.za> Message-ID: <1539990544.9.0.788709270274.issue34791@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c119d5948f941d2f528dda3f099e196bd6383000 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-34791: xml package obeys ignore env flags (GH-9544) (GH-9545) https://github.com/python/cpython/commit/c119d5948f941d2f528dda3f099e196bd6383000 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:09:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 23:09:27 +0000 Subject: [issue34791] xml package does not obey sys.flags.ignore_environment In-Reply-To: <1537807650.53.0.956365154283.issue34791@psf.upfronthosting.co.za> Message-ID: <1539990567.36.0.788709270274.issue34791@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 5e808f92ea4eb238b17757526b99f97debf7dd57 by Victor Stinner (Miss Islington (bot)) in branch '3.6': bpo-34791: xml package obeys ignore env flags (GH-9544) (GH-9546) https://github.com/python/cpython/commit/5e808f92ea4eb238b17757526b99f97debf7dd57 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:09:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 23:09:39 +0000 Subject: [issue34791] xml package does not obey sys.flags.ignore_environment In-Reply-To: <1537807650.53.0.956365154283.issue34791@psf.upfronthosting.co.za> Message-ID: <1539990579.46.0.788709270274.issue34791@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2546ac8eeb56fc146adea9a03158440a9271714e by Victor Stinner (Miss Islington (bot)) in branch '2.7': bpo-34791: xml package obeys ignore env flags (GH-9544) (GH-9547) https://github.com/python/cpython/commit/2546ac8eeb56fc146adea9a03158440a9271714e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:13:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 23:13:06 +0000 Subject: [issue34791] xml package does not obey sys.flags.ignore_environment In-Reply-To: <1537807650.53.0.956365154283.issue34791@psf.upfronthosting.co.za> Message-ID: <1539990786.5.0.788709270274.issue34791@psf.upfronthosting.co.za> STINNER Victor added the comment: Christian: do you think that this issue is severe enough to justify to backport it to Python 3.4 and 3.5? I don't think so. Python 2.7, 3.6, 3.7 and master (future 3.8) already have been fixed, IMHO it's enough and this issue can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:14:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 23:14:47 +0000 Subject: [issue34824] _ssl.c: Possible null pointer dereference In-Reply-To: <1538068077.13.0.545547206417.issue34824@psf.upfronthosting.co.za> Message-ID: <1539990887.01.0.788709270274.issue34824@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 4ec9f64e07c8f397ad6699f8b99843846c219588 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-34824: Fix a possible NULL pointer dereference in _ssl.c (GH-9606) (GH-9743) https://github.com/python/cpython/commit/4ec9f64e07c8f397ad6699f8b99843846c219588 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:14:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 23:14:52 +0000 Subject: [issue34824] _ssl.c: Possible null pointer dereference In-Reply-To: <1538068077.13.0.545547206417.issue34824@psf.upfronthosting.co.za> Message-ID: <1539990892.82.0.788709270274.issue34824@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d92816de667169fbd54a3442705bc07286e8c69d by Victor Stinner (Miss Islington (bot)) in branch '3.6': bpo-34824: Fix a possible NULL pointer dereference in _ssl.c (GH-9606) (GH-9744) https://github.com/python/cpython/commit/d92816de667169fbd54a3442705bc07286e8c69d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:16:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 23:16:33 +0000 Subject: [issue34824] _ssl.c: Possible null pointer dereference In-Reply-To: <1538068077.13.0.545547206417.issue34824@psf.upfronthosting.co.za> Message-ID: <1539990993.31.0.788709270274.issue34824@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Zackery Spytz for the report and the fix! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:20:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 23:20:24 +0000 Subject: [issue20216] Misleading docs for sha1, sha256, sha512, md5 modules In-Reply-To: <1389320490.58.0.128009418019.issue20216@psf.upfronthosting.co.za> Message-ID: <1539991224.14.0.788709270274.issue20216@psf.upfronthosting.co.za> STINNER Victor added the comment: Strange, no bot noticed that a change has been merged into the master branch: bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873) https://github.com/python/cpython/commit/f192aeb95a139ede74d69e39c046c498ff288a37 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:21:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 23:21:02 +0000 Subject: [issue20216] Misleading docs for sha1, sha256, sha512, md5 modules In-Reply-To: <1389320490.58.0.128009418019.issue20216@psf.upfronthosting.co.za> Message-ID: <1539991261.99.0.788709270274.issue20216@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 23efe77acf0dce513d7b7cab5523c061bb006b60 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873) (GH-9971) https://github.com/python/cpython/commit/23efe77acf0dce513d7b7cab5523c061bb006b60 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:27:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 23:27:50 +0000 Subject: [issue33712] OrderedDict can set an exception in tp_clear In-Reply-To: <1527768528.87.0.682650639539.issue33712@psf.upfronthosting.co.za> Message-ID: <1539991670.01.0.788709270274.issue33712@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 6f17e51345d930ccb4db306acc12b7d1f6c5e690 by Victor Stinner (Serhiy Storchaka) in branch 'master': bpo-33712: OrderedDict only creates od_fast_nodes cache if needed (GH-7349) https://github.com/python/cpython/commit/6f17e51345d930ccb4db306acc12b7d1f6c5e690 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:31:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 23:31:20 +0000 Subject: [issue33726] Add short descriptions to PEP references in seealso In-Reply-To: <1527822205.22.0.682650639539.issue33726@psf.upfronthosting.co.za> Message-ID: <1539991880.91.0.788709270274.issue33726@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0f14fc1a7cb2ea0012d0a943e4460acdee2108d7 by Victor Stinner (Andr?s Delfino) in branch 'master': bpo-33726, doc: Add short descriptions to PEP references in seealso (GH-7294) https://github.com/python/cpython/commit/0f14fc1a7cb2ea0012d0a943e4460acdee2108d7 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:31:29 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Oct 2018 23:31:29 +0000 Subject: [issue33726] Add short descriptions to PEP references in seealso In-Reply-To: <1527822205.22.0.682650639539.issue33726@psf.upfronthosting.co.za> Message-ID: <1539991889.66.0.788709270274.issue33726@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9321 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:31:41 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Oct 2018 23:31:41 +0000 Subject: [issue33726] Add short descriptions to PEP references in seealso In-Reply-To: <1527822205.22.0.682650639539.issue33726@psf.upfronthosting.co.za> Message-ID: <1539991901.77.0.788709270274.issue33726@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9322 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:36:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 23:36:03 +0000 Subject: [issue33708] Doc: Asyncio's Event documentation typo. In-Reply-To: <1527756494.64.0.682650639539.issue33708@psf.upfronthosting.co.za> Message-ID: <1539992163.18.0.788709270274.issue33708@psf.upfronthosting.co.za> STINNER Victor added the comment: The asyncio documentation has been rewritten. It seems like the missing references issue is gone. ---------- nosy: +vstinner resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:40:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 23:40:50 +0000 Subject: [issue33594] add deprecation since 3.5 for a few methods of inspect. In-Reply-To: <1526938472.55.0.682650639539.issue33594@psf.upfronthosting.co.za> Message-ID: <1539992450.88.0.788709270274.issue33594@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset ded87d804e2a85b2a3ea9e7a11384b41fafdfa29 by Victor Stinner (Matthias Bussonnier) in branch 'master': bpo-33594: Add deprecation info in inspect.py module (GH-7036) https://github.com/python/cpython/commit/ded87d804e2a85b2a3ea9e7a11384b41fafdfa29 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:41:12 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Oct 2018 23:41:12 +0000 Subject: [issue33594] add deprecation since 3.5 for a few methods of inspect. In-Reply-To: <1526938472.55.0.682650639539.issue33594@psf.upfronthosting.co.za> Message-ID: <1539992472.63.0.788709270274.issue33594@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9323 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:41:19 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Oct 2018 23:41:19 +0000 Subject: [issue33594] add deprecation since 3.5 for a few methods of inspect. In-Reply-To: <1526938472.55.0.682650639539.issue33594@psf.upfronthosting.co.za> Message-ID: <1539992479.82.0.788709270274.issue33594@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9324 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:43:09 2018 From: report at bugs.python.org (Ethan Furman) Date: Fri, 19 Oct 2018 23:43:09 +0000 Subject: [issue34536] Enum._missing_ doesn't raise TypeError when a non-Enum object is a returned In-Reply-To: <1539990207.98.0.702299269573.issue34536@psf.upfronthosting.co.za> Message-ID: <597183d3-f945-53ed-ef83-26a98ce8627e@stoneleaf.us> Ethan Furman added the comment: Change by STINNER Victor: > pull_requests: +9319 Why does the above say 9319 when the PR is 9978? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:43:58 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Oct 2018 23:43:58 +0000 Subject: [issue33726] Add short descriptions to PEP references in seealso In-Reply-To: <1527822205.22.0.682650639539.issue33726@psf.upfronthosting.co.za> Message-ID: <1539992638.74.0.788709270274.issue33726@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2a6cf446802079a3ee57147de8273c84d63767e9 by Miss Islington (bot) in branch '3.7': bpo-33726, doc: Add short descriptions to PEP references in seealso (GH-7294) https://github.com/python/cpython/commit/2a6cf446802079a3ee57147de8273c84d63767e9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:44:34 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Oct 2018 23:44:34 +0000 Subject: [issue33726] Add short descriptions to PEP references in seealso In-Reply-To: <1527822205.22.0.682650639539.issue33726@psf.upfronthosting.co.za> Message-ID: <1539992674.76.0.788709270274.issue33726@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 70102ff18817dd3db79cf73a1028251bbf2106f2 by Miss Islington (bot) in branch '3.6': bpo-33726, doc: Add short descriptions to PEP references in seealso (GH-7294) https://github.com/python/cpython/commit/70102ff18817dd3db79cf73a1028251bbf2106f2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:49:33 2018 From: report at bugs.python.org (Ethan Furman) Date: Fri, 19 Oct 2018 23:49:33 +0000 Subject: [issue34536] Enum._missing_ doesn't raise TypeError when a non-Enum object is a returned In-Reply-To: <1535485064.24.0.56676864532.issue34536@psf.upfronthosting.co.za> Message-ID: <1539992973.85.0.788709270274.issue34536@psf.upfronthosting.co.za> Ethan Furman added the comment: New changeset 0f2fc8bee0b435ee2934751264196db30d16ed8a by Ethan Furman (Victor Stinner) in branch '3.7': bpo-34536: raise error for invalid _missing_ results (GH-9147) (GH-9978) https://github.com/python/cpython/commit/0f2fc8bee0b435ee2934751264196db30d16ed8a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:54:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Oct 2018 23:54:17 +0000 Subject: [issue34536] Enum._missing_ doesn't raise TypeError when a non-Enum object is a returned In-Reply-To: <1535485064.24.0.56676864532.issue34536@psf.upfronthosting.co.za> Message-ID: <1539993257.36.0.788709270274.issue34536@psf.upfronthosting.co.za> STINNER Victor added the comment: > Why does the above say 9319 when the PR is 9978? Roundup (the software running bugs.python.org) logs its own internal identifier for pull requests. Following https://bugs.python.org/pull_request9320 may help you to understand :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:57:23 2018 From: report at bugs.python.org (Ethan Furman) Date: Fri, 19 Oct 2018 23:57:23 +0000 Subject: [issue34536] Enum._missing_ doesn't raise TypeError when a non-Enum object is a returned In-Reply-To: <1535485064.24.0.56676864532.issue34536@psf.upfronthosting.co.za> Message-ID: <1539993443.23.0.788709270274.issue34536@psf.upfronthosting.co.za> Ethan Furman added the comment: New changeset 4acf6c9d4be77b968fa498569d7a1545e5e77344 by Ethan Furman (Victor Stinner) in branch 'master': bpo-34536: Cleanup test_enum imports (GH-9979) https://github.com/python/cpython/commit/4acf6c9d4be77b968fa498569d7a1545e5e77344 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 19:59:56 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Oct 2018 23:59:56 +0000 Subject: [issue33594] add deprecation since 3.5 for a few methods of inspect. In-Reply-To: <1526938472.55.0.682650639539.issue33594@psf.upfronthosting.co.za> Message-ID: <1539993596.49.0.788709270274.issue33594@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 932ebc1e0ef9b0d5cd17370f5183bad0257d36f9 by Miss Islington (bot) in branch '3.6': bpo-33594: Add deprecation info in inspect.py module (GH-7036) https://github.com/python/cpython/commit/932ebc1e0ef9b0d5cd17370f5183bad0257d36f9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:04:29 2018 From: report at bugs.python.org (Ben Darnell) Date: Sat, 20 Oct 2018 00:04:29 +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: <1539993869.68.0.788709270274.issue31122@psf.upfronthosting.co.za> Ben Darnell added the comment: We have an easy reproduction of this "[Errno 0] Error" on the server side in https://github.com/tornadoweb/tornado/issues/2504#issuecomment-426782158 It is triggered by a connection from `nc -z` (which I think is doing a TCP handshake and shutting down the connection cleanly, but I'm not sure. It might just send an RST instead of the clean shutdown). On macos, I get SSL_ERROR_EOF (as expected), but on linux it raises an OSError with errno 0. (Note that the script as posted has a small mistake in that it is using a client-side SSLContext on the server side. The same error is seen when that mistake is fixed) I'm going to add "errno 0" to the list of errors that Tornado should swallow silently here, so if you're trying to reproduce this in the future use Tornado 5.1.1. ---------- nosy: +Ben.Darnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:05:28 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Oct 2018 00:05:28 +0000 Subject: [issue33726] Add short descriptions to PEP references in seealso In-Reply-To: <1527822205.22.0.682650639539.issue33726@psf.upfronthosting.co.za> Message-ID: <1539993928.54.0.788709270274.issue33726@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Andr?s Delfino! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:05:57 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:05:57 +0000 Subject: [issue33594] add deprecation since 3.5 for a few methods of inspect. In-Reply-To: <1526938472.55.0.682650639539.issue33594@psf.upfronthosting.co.za> Message-ID: <1539993957.4.0.788709270274.issue33594@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c8348fb6d2ef1b5bb91d6eb5fbafdf42c4ae16ce by Miss Islington (bot) in branch '3.7': bpo-33594: Add deprecation info in inspect.py module (GH-7036) https://github.com/python/cpython/commit/c8348fb6d2ef1b5bb91d6eb5fbafdf42c4ae16ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:08:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Oct 2018 00:08:16 +0000 Subject: [issue33594] add deprecation since 3.5 for a few methods of inspect. In-Reply-To: <1526938472.55.0.682650639539.issue33594@psf.upfronthosting.co.za> Message-ID: <1539994096.25.0.788709270274.issue33594@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Matthias Bussonnier! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:22:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Oct 2018 00:22:36 +0000 Subject: [issue21332] subprocess bufsize=1 docs are misleading In-Reply-To: <1398209745.28.0.851161689347.issue21332@psf.upfronthosting.co.za> Message-ID: <1539994956.12.0.788709270274.issue21332@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a2670565d8f5c502388378aba1fe73023fd8c8d4 by Victor Stinner (Alexey Izbyshev) in branch 'master': bpo-32236: open() emits RuntimeWarning if buffering=1 for binary mode (GH-4842) https://github.com/python/cpython/commit/a2670565d8f5c502388378aba1fe73023fd8c8d4 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:22:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Oct 2018 00:22:36 +0000 Subject: [issue32236] open() shouldn't silently ignore buffering=1 in binary mode In-Reply-To: <1512604009.3.0.213398074469.issue32236@psf.upfronthosting.co.za> Message-ID: <1539994956.62.0.702299269573.issue32236@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a2670565d8f5c502388378aba1fe73023fd8c8d4 by Victor Stinner (Alexey Izbyshev) in branch 'master': bpo-32236: open() emits RuntimeWarning if buffering=1 for binary mode (GH-4842) https://github.com/python/cpython/commit/a2670565d8f5c502388378aba1fe73023fd8c8d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:22:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Oct 2018 00:22:36 +0000 Subject: [issue10344] codecs.open() buffering doc needs fix In-Reply-To: <1289084418.05.0.231852584468.issue10344@psf.upfronthosting.co.za> Message-ID: <1539994956.89.0.663665092547.issue10344@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a2670565d8f5c502388378aba1fe73023fd8c8d4 by Victor Stinner (Alexey Izbyshev) in branch 'master': bpo-32236: open() emits RuntimeWarning if buffering=1 for binary mode (GH-4842) https://github.com/python/cpython/commit/a2670565d8f5c502388378aba1fe73023fd8c8d4 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:24:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Oct 2018 00:24:36 +0000 Subject: [issue32236] open() shouldn't silently ignore buffering=1 in binary mode In-Reply-To: <1512604009.3.0.213398074469.issue32236@psf.upfronthosting.co.za> Message-ID: <1539995076.0.0.788709270274.issue32236@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't think that it would be a good idea to start emitting a new warning in a minor release like the future Python 3.7.2, so I suggest to not backport the change. I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:28:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Oct 2018 00:28:26 +0000 Subject: [issue32890] os: Some functions may report bogus errors on Windows In-Reply-To: <1519170856.46.0.467229070634.issue32890@psf.upfronthosting.co.za> Message-ID: <1539995306.64.0.788709270274.issue32890@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 834603112e6ca35944dd21105b01fca562dc3241 by Victor Stinner (Alexey Izbyshev) in branch 'master': bpo-32890, os: Use errno instead of GetLastError() in execve() and truncate() (GH-5784) https://github.com/python/cpython/commit/834603112e6ca35944dd21105b01fca562dc3241 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:28:37 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:28:37 +0000 Subject: [issue32890] os: Some functions may report bogus errors on Windows In-Reply-To: <1519170856.46.0.467229070634.issue32890@psf.upfronthosting.co.za> Message-ID: <1539995317.62.0.788709270274.issue32890@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9325 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:28:47 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:28:47 +0000 Subject: [issue32890] os: Some functions may report bogus errors on Windows In-Reply-To: <1519170856.46.0.467229070634.issue32890@psf.upfronthosting.co.za> Message-ID: <1539995327.32.0.788709270274.issue32890@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9326 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:33:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Oct 2018 00:33:52 +0000 Subject: [issue21196] Name mangling example in Python tutorial In-Reply-To: <1397133080.37.0.870141660622.issue21196@psf.upfronthosting.co.za> Message-ID: <1539995632.48.0.788709270274.issue21196@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 13ae4d44381a647aadd09b70b24833052659be41 by Victor Stinner (Berker Peksag) in branch 'master': bpo-21196: Clarify name mangling rules in tutorial (GH-5667) https://github.com/python/cpython/commit/13ae4d44381a647aadd09b70b24833052659be41 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:34:00 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:34:00 +0000 Subject: [issue21196] Name mangling example in Python tutorial In-Reply-To: <1397133080.37.0.870141660622.issue21196@psf.upfronthosting.co.za> Message-ID: <1539995640.72.0.788709270274.issue21196@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9327 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:34:09 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:34:09 +0000 Subject: [issue21196] Name mangling example in Python tutorial In-Reply-To: <1397133080.37.0.870141660622.issue21196@psf.upfronthosting.co.za> Message-ID: <1539995649.07.0.788709270274.issue21196@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9328 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:35:45 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:35:45 +0000 Subject: [issue21196] Name mangling example in Python tutorial In-Reply-To: <1397133080.37.0.870141660622.issue21196@psf.upfronthosting.co.za> Message-ID: <1539995745.83.0.788709270274.issue21196@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9329 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:38:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Oct 2018 00:38:00 +0000 Subject: [issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args In-Reply-To: <1518102419.01.0.467229070634.issue32798@psf.upfronthosting.co.za> Message-ID: <1539995880.4.0.788709270274.issue32798@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 027664a3d5ebad575aafe5fcc572e3b05f7f24e5 by Victor Stinner (Pablo Galindo) in branch 'master': bpo-32798: Add restriction on the offset parameter for mmap.flush in the docs (#5621) https://github.com/python/cpython/commit/027664a3d5ebad575aafe5fcc572e3b05f7f24e5 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:38:09 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:38:09 +0000 Subject: [issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args In-Reply-To: <1518102419.01.0.467229070634.issue32798@psf.upfronthosting.co.za> Message-ID: <1539995889.16.0.788709270274.issue32798@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9330 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:38:17 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:38:17 +0000 Subject: [issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args In-Reply-To: <1518102419.01.0.467229070634.issue32798@psf.upfronthosting.co.za> Message-ID: <1539995897.23.0.788709270274.issue32798@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9331 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:39:55 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:39:55 +0000 Subject: [issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args In-Reply-To: <1518102419.01.0.467229070634.issue32798@psf.upfronthosting.co.za> Message-ID: <1539995995.04.0.788709270274.issue32798@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9332 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:42:01 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:42:01 +0000 Subject: [issue21196] Name mangling example in Python tutorial In-Reply-To: <1397133080.37.0.870141660622.issue21196@psf.upfronthosting.co.za> Message-ID: <1539996121.84.0.788709270274.issue21196@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3e5bcd12f661bdf363c025b52a3d515829e64ed2 by Miss Islington (bot) in branch '3.7': bpo-21196: Clarify name mangling rules in tutorial (GH-5667) https://github.com/python/cpython/commit/3e5bcd12f661bdf363c025b52a3d515829e64ed2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:43:38 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Oct 2018 00:43:38 +0000 Subject: [issue34573] Simplify __reduce__() of set and dict iterators. In-Reply-To: <1536034432.71.0.56676864532.issue34573@psf.upfronthosting.co.za> Message-ID: <1539996218.24.0.788709270274.issue34573@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset 6395844e6adebc12c4eba1fb75c5e7c9c8b89f85 by Pablo Galindo (Sergey Fedoseev) in branch 'master': bpo-34573: Simplify __reduce__() of set and dict iterators. (GH-9050) https://github.com/python/cpython/commit/6395844e6adebc12c4eba1fb75c5e7c9c8b89f85 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:43:40 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:43:40 +0000 Subject: [issue21196] Name mangling example in Python tutorial In-Reply-To: <1397133080.37.0.870141660622.issue21196@psf.upfronthosting.co.za> Message-ID: <1539996220.64.0.788709270274.issue21196@psf.upfronthosting.co.za> miss-islington added the comment: New changeset efc09a9701543f7180fc7ea0b6c45cf198c29cb8 by Miss Islington (bot) in branch '3.6': bpo-21196: Clarify name mangling rules in tutorial (GH-5667) https://github.com/python/cpython/commit/efc09a9701543f7180fc7ea0b6c45cf198c29cb8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:44:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Oct 2018 00:44:56 +0000 Subject: [issue34573] Simplify __reduce__() of set and dict iterators. In-Reply-To: <1536034432.71.0.56676864532.issue34573@psf.upfronthosting.co.za> Message-ID: <1539996296.62.0.788709270274.issue34573@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Sergey Fedoseev! ---------- nosy: +vstinner resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:45:11 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:45:11 +0000 Subject: [issue21196] Name mangling example in Python tutorial In-Reply-To: <1397133080.37.0.870141660622.issue21196@psf.upfronthosting.co.za> Message-ID: <1539996311.07.0.788709270274.issue21196@psf.upfronthosting.co.za> miss-islington added the comment: New changeset b0f7fa1dda61ae7519deed816993ac5d55870958 by Miss Islington (bot) in branch '2.7': bpo-21196: Clarify name mangling rules in tutorial (GH-5667) https://github.com/python/cpython/commit/b0f7fa1dda61ae7519deed816993ac5d55870958 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:46:04 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Oct 2018 00:46:04 +0000 Subject: [issue34983] expose symtable.Symbol.is_nonlocal() In-Reply-To: <1539534296.44.0.788709270274.issue34983@psf.upfronthosting.co.za> Message-ID: <1539996364.38.0.788709270274.issue34983@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset d5b4f1b5a064c0d858352100fcddb91c363afa51 by Pablo Galindo in branch 'master': bpo-34983: Expose symtable.Symbol.is_nonlocal() in the symtable module (GH-9872) https://github.com/python/cpython/commit/d5b4f1b5a064c0d858352100fcddb91c363afa51 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:46:30 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:46:30 +0000 Subject: [issue32890] os: Some functions may report bogus errors on Windows In-Reply-To: <1519170856.46.0.467229070634.issue32890@psf.upfronthosting.co.za> Message-ID: <1539996390.21.0.788709270274.issue32890@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8f53dcdb246a3acb0e64b742c35b5f785bd19092 by Miss Islington (bot) in branch '3.7': bpo-32890, os: Use errno instead of GetLastError() in execve() and truncate() (GH-5784) https://github.com/python/cpython/commit/8f53dcdb246a3acb0e64b742c35b5f785bd19092 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:47:19 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:47:19 +0000 Subject: [issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args In-Reply-To: <1518102419.01.0.467229070634.issue32798@psf.upfronthosting.co.za> Message-ID: <1539996439.71.0.788709270274.issue32798@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 75ee130c39e73730535d94923fd8322ef616cb83 by Miss Islington (bot) in branch '3.6': bpo-32798: Add restriction on the offset parameter for mmap.flush in the docs (GH-5621) https://github.com/python/cpython/commit/75ee130c39e73730535d94923fd8322ef616cb83 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:48:09 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:48:09 +0000 Subject: [issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args In-Reply-To: <1518102419.01.0.467229070634.issue32798@psf.upfronthosting.co.za> Message-ID: <1539996489.43.0.788709270274.issue32798@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 557a68789b97bf281aa7b7e96f083982c01a5f7e by Miss Islington (bot) in branch '3.7': bpo-32798: Add restriction on the offset parameter for mmap.flush in the docs (GH-5621) https://github.com/python/cpython/commit/557a68789b97bf281aa7b7e96f083982c01a5f7e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:49:03 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:49:03 +0000 Subject: [issue32890] os: Some functions may report bogus errors on Windows In-Reply-To: <1519170856.46.0.467229070634.issue32890@psf.upfronthosting.co.za> Message-ID: <1539996543.92.0.788709270274.issue32890@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d9a2665fc4573c4d311a89750737ad4cc3310252 by Miss Islington (bot) in branch '3.6': bpo-32890, os: Use errno instead of GetLastError() in execve() and truncate() (GH-5784) https://github.com/python/cpython/commit/d9a2665fc4573c4d311a89750737ad4cc3310252 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:49:54 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:49:54 +0000 Subject: [issue32256] Make patchcheck.py work for out-of-tree builds In-Reply-To: <1512783358.62.0.213398074469.issue32256@psf.upfronthosting.co.za> Message-ID: <1539996594.41.0.788709270274.issue32256@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9333 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:49:42 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:49:42 +0000 Subject: [issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args In-Reply-To: <1518102419.01.0.467229070634.issue32798@psf.upfronthosting.co.za> Message-ID: <1539996582.96.0.788709270274.issue32798@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2bad7acdfebb87a6eef238a7acca636cfb648a02 by Miss Islington (bot) in branch '2.7': bpo-32798: Add restriction on the offset parameter for mmap.flush in the docs (GH-5621) https://github.com/python/cpython/commit/2bad7acdfebb87a6eef238a7acca636cfb648a02 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:49:46 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Oct 2018 00:49:46 +0000 Subject: [issue32256] Make patchcheck.py work for out-of-tree builds In-Reply-To: <1512783358.62.0.213398074469.issue32256@psf.upfronthosting.co.za> Message-ID: <1539996586.66.0.788709270274.issue32256@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset aa95bfb5fee366aa58c90b7e1c77fc7e183dbf3a by Victor Stinner (Alexey Izbyshev) in branch 'master': bpo-32256: Make patchcheck.py work for out-of-tree builds (GH-4760) https://github.com/python/cpython/commit/aa95bfb5fee366aa58c90b7e1c77fc7e183dbf3a ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:50:06 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 00:50:06 +0000 Subject: [issue32256] Make patchcheck.py work for out-of-tree builds In-Reply-To: <1512783358.62.0.213398074469.issue32256@psf.upfronthosting.co.za> Message-ID: <1539996606.22.0.788709270274.issue32256@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9334 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:52:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Oct 2018 00:52:12 +0000 Subject: [issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args In-Reply-To: <1518102419.01.0.467229070634.issue32798@psf.upfronthosting.co.za> Message-ID: <1539996732.52.0.788709270274.issue32798@psf.upfronthosting.co.za> STINNER Victor added the comment: The documentation has been clarified, thanks Pablo Galindo! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:53:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Oct 2018 00:53:09 +0000 Subject: [issue21196] Name mangling example in Python tutorial In-Reply-To: <1397133080.37.0.870141660622.issue21196@psf.upfronthosting.co.za> Message-ID: <1539996789.37.0.788709270274.issue21196@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Chandan Kumar and Berker Peksag. The documentation has been clarified. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 20:53:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Oct 2018 00:53:37 +0000 Subject: [issue32890] os: Some functions may report bogus errors on Windows In-Reply-To: <1519170856.46.0.467229070634.issue32890@psf.upfronthosting.co.za> Message-ID: <1539996817.57.0.788709270274.issue32890@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Alexey Izbyshev! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 21:05:21 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Oct 2018 01:05:21 +0000 Subject: [issue34983] expose symtable.Symbol.is_nonlocal() In-Reply-To: <1539534296.44.0.788709270274.issue34983@psf.upfronthosting.co.za> Message-ID: <1539997521.76.0.788709270274.issue34983@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 21:21:48 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 01:21:48 +0000 Subject: [issue32256] Make patchcheck.py work for out-of-tree builds In-Reply-To: <1512783358.62.0.213398074469.issue32256@psf.upfronthosting.co.za> Message-ID: <1539998508.61.0.788709270274.issue32256@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 1662bbf09fade0310d03736066e5c36611bb4b9b by Miss Islington (bot) in branch '3.7': bpo-32256: Make patchcheck.py work for out-of-tree builds (GH-4760) https://github.com/python/cpython/commit/1662bbf09fade0310d03736066e5c36611bb4b9b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 21:25:54 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 01:25:54 +0000 Subject: [issue32256] Make patchcheck.py work for out-of-tree builds In-Reply-To: <1512783358.62.0.213398074469.issue32256@psf.upfronthosting.co.za> Message-ID: <1539998754.84.0.788709270274.issue32256@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 42c52a9e45ed6ff2867403894bc030ed5780282d by Miss Islington (bot) in branch '3.6': bpo-32256: Make patchcheck.py work for out-of-tree builds (GH-4760) https://github.com/python/cpython/commit/42c52a9e45ed6ff2867403894bc030ed5780282d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 21:30:13 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Oct 2018 01:30:13 +0000 Subject: [issue35024] Incorrect logging in importlib when '.pyc' file creation fails In-Reply-To: <1539921641.62.0.788709270274.issue35024@psf.upfronthosting.co.za> Message-ID: <1539999013.05.0.788709270274.issue35024@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 21:33:21 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Oct 2018 01:33:21 +0000 Subject: [issue32256] Make patchcheck.py work for out-of-tree builds In-Reply-To: <1512783358.62.0.213398074469.issue32256@psf.upfronthosting.co.za> Message-ID: <1539999201.65.0.788709270274.issue32256@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Alexey Izbyshev! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 19 21:34:39 2018 From: report at bugs.python.org (Gus Goulart) Date: Sat, 20 Oct 2018 01:34:39 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1539999279.84.0.788709270274.issue27741@psf.upfronthosting.co.za> Change by Gus Goulart : ---------- keywords: +patch pull_requests: +9335 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 00:32:50 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Oct 2018 04:32:50 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1540009970.03.0.788709270274.issue34909@psf.upfronthosting.co.za> Change by Ned Deily : ---------- pull_requests: +9337 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 00:43:09 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 20 Oct 2018 04:43:09 +0000 Subject: [issue35026] Winreg's documentation lacks mentioning required permission at some points In-Reply-To: <1539940450.92.0.788709270274.issue35026@psf.upfronthosting.co.za> Message-ID: <1540010589.28.0.788709270274.issue35026@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. I am adding windows component since it's a windows specific doc issue. RegDeleteValueW > A handle to an open registry key. The key must have been opened with the KEY_SET_VALUE access right. For more information, see Registry Key Security and Access Rights. https://docs.microsoft.com/en-us/windows/desktop/api/winreg/nf-winreg-regdeletevaluew#parameters RegDeleteKeyExA https://docs.microsoft.com/en-us/windows/desktop/api/winreg/nf-winreg-regdeletekeyexa#parameters ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, xtreak, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 00:44:29 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Oct 2018 04:44:29 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1540010669.26.0.788709270274.issue34909@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 8c9fd9c91ba748df68a11e3bf216fa158314c9b5 by Ned Deily in branch 'master': bpo-34909: NEWS entry (GH-9995) https://github.com/python/cpython/commit/8c9fd9c91ba748df68a11e3bf216fa158314c9b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 01:20:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2018 05:20:46 +0000 Subject: [issue34574] OrderedDict iterators are exhausted during pickling In-Reply-To: <1536034779.39.0.56676864532.issue34574@psf.upfronthosting.co.za> Message-ID: <1540012846.57.0.788709270274.issue34574@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset a5259fb05d03f4871837c14fed704541a20896c0 by Serhiy Storchaka (Sergey Fedoseev) in branch 'master': bpo-34574: Prevent OrderedDict iterators from exhaustion during pickling. (GH-9051) https://github.com/python/cpython/commit/a5259fb05d03f4871837c14fed704541a20896c0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 01:21:00 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 05:21:00 +0000 Subject: [issue34574] OrderedDict iterators are exhausted during pickling In-Reply-To: <1536034779.39.0.56676864532.issue34574@psf.upfronthosting.co.za> Message-ID: <1540012860.31.0.788709270274.issue34574@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9338 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 01:21:11 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 05:21:11 +0000 Subject: [issue34574] OrderedDict iterators are exhausted during pickling In-Reply-To: <1536034779.39.0.56676864532.issue34574@psf.upfronthosting.co.za> Message-ID: <1540012871.77.0.788709270274.issue34574@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9339 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 01:36:26 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 20 Oct 2018 05:36:26 +0000 Subject: [issue35024] Incorrect logging in importlib when '.pyc' file creation fails In-Reply-To: <1539921641.62.0.788709270274.issue35024@psf.upfronthosting.co.za> Message-ID: <1540013786.2.0.788709270274.issue35024@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 01:43:00 2018 From: report at bugs.python.org (DamlaAltun) Date: Sat, 20 Oct 2018 05:43:00 +0000 Subject: [issue35003] Provide an option to venv to put files in a bin/ directory on Windows In-Reply-To: <1539727932.79.0.788709270274.issue35003@psf.upfronthosting.co.za> Message-ID: <1540014180.12.0.788709270274.issue35003@psf.upfronthosting.co.za> DamlaAltun added the comment: I couldn't find a way to prevent being in seperate forms. When i add custom bin, custom include and custom libpaths 4 files are creating. The normal `bin`, normal `include` and custom `cbin` and custom `cinc`. You can unassign me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 01:45:27 2018 From: report at bugs.python.org (Quentin Agren) Date: Sat, 20 Oct 2018 05:45:27 +0000 Subject: [issue35024] Incorrect logging in importlib when '.pyc' file creation fails In-Reply-To: <1539921641.62.0.788709270274.issue35024@psf.upfronthosting.co.za> Message-ID: <1540014327.62.0.788709270274.issue35024@psf.upfronthosting.co.za> Change by Quentin Agren : ---------- keywords: +patch pull_requests: +9340 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 01:54:13 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 05:54:13 +0000 Subject: [issue34574] OrderedDict iterators are exhausted during pickling In-Reply-To: <1536034779.39.0.56676864532.issue34574@psf.upfronthosting.co.za> Message-ID: <1540014853.05.0.788709270274.issue34574@psf.upfronthosting.co.za> miss-islington added the comment: New changeset dcd56f615e89d4920a0598a9c3d3301701f238a6 by Miss Islington (bot) in branch '3.7': bpo-34574: Prevent OrderedDict iterators from exhaustion during pickling. (GH-9051) https://github.com/python/cpython/commit/dcd56f615e89d4920a0598a9c3d3301701f238a6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 02:05:24 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 06:05:24 +0000 Subject: [issue34574] OrderedDict iterators are exhausted during pickling In-Reply-To: <1536034779.39.0.56676864532.issue34574@psf.upfronthosting.co.za> Message-ID: <1540015524.39.0.788709270274.issue34574@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 0d3dd9fe0d2565f09f70d8ea7341dfd88e6bd380 by Miss Islington (bot) in branch '3.6': bpo-34574: Prevent OrderedDict iterators from exhaustion during pickling. (GH-9051) https://github.com/python/cpython/commit/0d3dd9fe0d2565f09f70d8ea7341dfd88e6bd380 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 02:06:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2018 06:06:46 +0000 Subject: [issue34574] OrderedDict iterators are exhausted during pickling In-Reply-To: <1536034779.39.0.56676864532.issue34574@psf.upfronthosting.co.za> Message-ID: <1540015606.64.0.788709270274.issue34574@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank your Sergey for your report and fix. ---------- components: +Extension Modules 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 Sat Oct 20 02:30:57 2018 From: report at bugs.python.org (Tilman Krummeck) Date: Sat, 20 Oct 2018 06:30:57 +0000 Subject: [issue35027] distutils.core.setup does not raise TypeError when if classifiers, keywords and platforms fields are not specified as a list In-Reply-To: <1539963671.26.0.788709270274.issue35027@psf.upfronthosting.co.za> Message-ID: <1540017057.67.0.788709270274.issue35027@psf.upfronthosting.co.za> Tilman Krummeck added the comment: I guess it's now or never. Give me some time to check the developer's guide and I'll submit a doc fix for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 03:24:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2018 07:24:03 +0000 Subject: [issue35029] Convert SyntaxWarning exception raised at code generation time to a SyntaxError Message-ID: <1540020243.93.0.788709270274.issue35029@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : SyntaxError contains more useful information than SyntaxWarning, and SyntaxError is special cased in tracebacks for better reporting. When SyntaxWarning is raised as an exception, the error report doesn't contain information about the source. It is hard to find the source of a SyntaxWarning. Currently: $ ./python syntaxwarning.py syntaxwarning.py:1: SyntaxWarning: assertion is always true, perhaps remove parentheses? x = 1; assert (x, "msg") $ ./python -We syntaxwarning.py SyntaxWarning: assertion is always true, perhaps remove parentheses? $ ./python -m syntaxwarning /home/serhiy/py/cpython3.7/syntaxwarning.py:1: SyntaxWarning: assertion is always true, perhaps remove parentheses? x = 1; assert (x, "msg") $ ./python -We -m syntaxwarning Traceback (most recent call last): File "/home/serhiy/py/cpython3.7/Lib/runpy.py", line 183, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/home/serhiy/py/cpython3.7/Lib/runpy.py", line 153, in _get_module_details code = loader.get_code(mod_name) File "", line 860, in get_code File "", line 791, in source_to_code File "", line 219, in _call_with_frames_removed SyntaxWarning: assertion is always true, perhaps remove parentheses? The proposed PR replaces SyntaxWarning with a SyntaxError if the former was raised as an exception: $ ./python -We syntaxwarning.py File "syntaxwarning.py", line 1 x = 1; assert (x, "msg") ^ SyntaxError: assertion is always true, perhaps remove parentheses? $ ./python -We -m syntaxwarning Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/runpy.py", line 183, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/home/serhiy/py/cpython/Lib/runpy.py", line 153, in _get_module_details code = loader.get_code(mod_name) File "", line 909, in get_code File "", line 839, in source_to_code File "", line 219, in _call_with_frames_removed File "/home/serhiy/py/cpython/syntaxwarning.py", line 1 x = 1; assert (x, "msg") ^ SyntaxError: assertion is always true, perhaps remove parentheses? Similar replacement is already performed for warnings raised for unrecognized escape sequences at parsing time (see issue32912). ---------- components: Interpreter Core messages: 328130 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Convert SyntaxWarning exception raised at code generation time to a SyntaxError type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 03:29:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2018 07:29:14 +0000 Subject: [issue35029] Convert SyntaxWarning exception raised at code generation time to a SyntaxError In-Reply-To: <1540020243.93.0.788709270274.issue35029@psf.upfronthosting.co.za> Message-ID: <1540020554.09.0.788709270274.issue35029@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +9341 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 03:36:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2018 07:36:18 +0000 Subject: [issue33712] OrderedDict can set an exception in tp_clear In-Reply-To: <1527768528.87.0.682650639539.issue33712@psf.upfronthosting.co.za> Message-ID: <1540020978.01.0.788709270274.issue33712@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9342 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 03:52:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2018 07:52:13 +0000 Subject: [issue33237] Improve AttributeError message for partially initialized module In-Reply-To: <1523029412.67.0.682650639539.issue33237@psf.upfronthosting.co.za> Message-ID: <1540021933.73.0.788709270274.issue33237@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Example: $ cat foo.py import bar bar.baz $ cat bar.py import foo baz = 2 $ ./python foo.py Traceback (most recent call last): File "foo.py", line 1, in import bar File "/home/serhiy/py/cpython/bar.py", line 1, in import foo File "/home/serhiy/py/cpython/foo.py", line 2, in bar.baz AttributeError: module 'bar' has no attribute 'baz' Patched: $ ./python foo.py Traceback (most recent call last): File "foo.py", line 1, in import bar File "/home/serhiy/py/cpython/bar.py", line 1, in import foo File "/home/serhiy/py/cpython/foo.py", line 2, in bar.baz AttributeError: partially initialized module 'bar' has no attribute 'baz' (most likely due to a circular import) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 04:24:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2018 08:24:11 +0000 Subject: [issue33712] OrderedDict can set an exception in tp_clear In-Reply-To: <1527768528.87.0.682650639539.issue33712@psf.upfronthosting.co.za> Message-ID: <1540023851.56.0.788709270274.issue33712@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 861d34eee345956cbb0940fa676bfb7ff492999d by Serhiy Storchaka in branch '3.7': bpo-33712: OrderedDict only creates od_fast_nodes cache if needed (GH-7349). (GH-10000) https://github.com/python/cpython/commit/861d34eee345956cbb0940fa676bfb7ff492999d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 04:31:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2018 08:31:38 +0000 Subject: [issue33712] OrderedDict can set an exception in tp_clear In-Reply-To: <1527768528.87.0.682650639539.issue33712@psf.upfronthosting.co.za> Message-ID: <1540024298.44.0.788709270274.issue33712@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9343 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 04:37:02 2018 From: report at bugs.python.org (tzickel) Date: Sat, 20 Oct 2018 08:37:02 +0000 Subject: [issue35030] Python 2.7 OrderedDict leaks memory Message-ID: <1540024622.42.0.788709270274.issue35030@psf.upfronthosting.co.za> New submission from tzickel : https://github.com/requests/requests/issues/4553#issuecomment-431514753 It was fixed in Python 3 by using weakref, but not backported to Python 2. Also might be nice to somehow to that leak test in more places to detect such issues ? ---------- components: Library (Lib) messages: 328133 nosy: rhettinger, tzickel priority: normal severity: normal status: open title: Python 2.7 OrderedDict leaks memory versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 04:43:38 2018 From: report at bugs.python.org (Julien Palard) Date: Sat, 20 Oct 2018 08:43:38 +0000 Subject: [issue34839] doctest: Change example under warnings section In-Reply-To: <1538180284.16.0.545547206417.issue34839@psf.upfronthosting.co.za> Message-ID: <1540025018.29.0.788709270274.issue34839@psf.upfronthosting.co.za> Julien Palard added the comment: New changeset 0522fd81dc6e3482c2d4c8719f1f85ad5924eede by Julien Palard (St?phane Wirtel) in branch 'master': bpo-34839: Add a 'before 3.6' in the section 'warnings' of doctest (GH-9736) https://github.com/python/cpython/commit/0522fd81dc6e3482c2d4c8719f1f85ad5924eede ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 04:46:27 2018 From: report at bugs.python.org (Julien Palard) Date: Sat, 20 Oct 2018 08:46:27 +0000 Subject: [issue34839] doctest: Change example under warnings section In-Reply-To: <1538180284.16.0.545547206417.issue34839@psf.upfronthosting.co.za> Message-ID: <1540025187.76.0.788709270274.issue34839@psf.upfronthosting.co.za> Change by Julien Palard : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 04:47:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2018 08:47:11 +0000 Subject: [issue33712] OrderedDict can set an exception in tp_clear In-Reply-To: <1527768528.87.0.682650639539.issue33712@psf.upfronthosting.co.za> Message-ID: <1540025231.8.0.788709270274.issue33712@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f1b90e3922e9d218cf1f6c94ab98874c1752bdf3 by Serhiy Storchaka in branch '3.6': bpo-33712: OrderedDict only creates od_fast_nodes cache if needed (GH-7349). (GH-10001) https://github.com/python/cpython/commit/f1b90e3922e9d218cf1f6c94ab98874c1752bdf3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 05:10:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2018 09:10:11 +0000 Subject: [issue33712] OrderedDict can set an exception in tp_clear In-Reply-To: <1527768528.87.0.682650639539.issue33712@psf.upfronthosting.co.za> Message-ID: <1540026611.34.0.788709270274.issue33712@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 Oct 20 05:16:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2018 09:16:20 +0000 Subject: [issue35030] Python 2.7 OrderedDict leaks memory In-Reply-To: <1540024622.42.0.788709270274.issue35030@psf.upfronthosting.co.za> Message-ID: <1540026980.68.0.788709270274.issue35030@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> rhettinger nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 05:17:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2018 09:17:15 +0000 Subject: [issue35030] Python 2.7 OrderedDict creates circular references In-Reply-To: <1540024622.42.0.788709270274.issue35030@psf.upfronthosting.co.za> Message-ID: <1540027035.31.0.788709270274.issue35030@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- title: Python 2.7 OrderedDict leaks memory -> Python 2.7 OrderedDict creates circular references _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 06:19:46 2018 From: report at bugs.python.org (tzickel) Date: Sat, 20 Oct 2018 10:19:46 +0000 Subject: [issue35030] Python 2.7 OrderedDict creates circular references In-Reply-To: <1540024622.42.0.788709270274.issue35030@psf.upfronthosting.co.za> Message-ID: <1540030786.51.0.788709270274.issue35030@psf.upfronthosting.co.za> Change by tzickel : ---------- keywords: +patch pull_requests: +9344 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 09:38:08 2018 From: report at bugs.python.org (INADA Naoki) Date: Sat, 20 Oct 2018 13:38:08 +0000 Subject: [issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__ In-Reply-To: <1539668705.97.0.788709270274.issue34995@psf.upfronthosting.co.za> Message-ID: <1540042688.34.0.788709270274.issue34995@psf.upfronthosting.co.za> INADA Naoki added the comment: I agree with Serhiy. For static hinting, `@property` should be enough. I think tools like mypy should support this pattern: class MyABC(metaclass=ABCMeta): @property @abstractmethod def myprop(self): ... class MyConcrete(MyABC): @cached_property def myprop(self): return self._some_heavy_work() ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 10:02:23 2018 From: report at bugs.python.org (Dmitry Kazakov) Date: Sat, 20 Oct 2018 14:02:23 +0000 Subject: [issue31299] Add "ignore_modules" option to TracebackException.format() In-Reply-To: <1503992745.47.0.33675937395.issue31299@psf.upfronthosting.co.za> Message-ID: <1540044142.99.0.788709270274.issue31299@psf.upfronthosting.co.za> Dmitry Kazakov added the comment: I asked for some input on this issue in January (https://mail.python.org/pipermail/python-dev/2018-January/151590.html). Since then an important PR was merged (https://github.com/python/cpython/pull/4793), however it mutates the traceback object. Should there be a way to hide frames while keeping the original traceback object intact? If not, this issue should probably be closed. Otherwise I would appreciate a review of the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 10:06:47 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Oct 2018 14:06:47 +0000 Subject: [issue35031] test_asyncio test_start_tls_server_1 fails in Message-ID: <1540044407.71.0.788709270274.issue35031@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : https://buildbot.python.org/all/#/builders/168/builds/91 https://buildbot.python.org/all/#/builders/172/builds/41 https://buildbot.python.org/all/#/builders/173/builds/51 CURRENT-amd64% ./python -m test test_asyncio -m test_start_tls_server_1 Run tests sequentially 0:00:00 load avg: 3.36 [1/1] test_asyncio Stderr: /usr/home/pablo/cpython/Lib/test/test_asyncio/test_sslproto.py:497: DeprecationWarning: The loop argument is deprecated and scheduled for removal in Python 3.10. await asyncio.wait_for( /usr/home/pablo/cpython/Lib/asyncio/sslproto.py:321: ResourceWarning: unclosed transport warnings.warn(f"unclosed transport {self!r}", ResourceWarning, Unhandled error in exception handler context: {'message': 'Future exception was never retrieved', 'exception': ConnectionResetError(54, 'Connection reset by peer'), 'future': } Traceback (most recent call last): File "/usr/home/pablo/cpython/Lib/test/libregrtest/runtest.py", line 179, in runtest_inner test_runner() File "/usr/home/pablo/cpython/Lib/test/libregrtest/runtest.py", line 175, in test_runner support.run_unittest(tests) File "/usr/home/pablo/cpython/Lib/test/support/__init__.py", line 2001, in run_unittest _run_suite(suite) File "/usr/home/pablo/cpython/Lib/test/support/__init__.py", line 1920, in _run_suite raise TestFailed(err) test.support.TestFailed: Traceback (most recent call last): File "/usr/home/pablo/cpython/Lib/test/test_asyncio/test_sslproto.py", line 504, in test_start_tls_server_1 self.loop.run_until_complete(run_main()) File "/usr/home/pablo/cpython/Lib/asyncio/base_events.py", line 582, in run_until_complete return future.result() File "/usr/home/pablo/cpython/Lib/test/test_asyncio/test_sslproto.py", line 497, in run_main await asyncio.wait_for( File "/usr/home/pablo/cpython/Lib/asyncio/tasks.py", line 457, in wait_for raise exceptions.TimeoutError() asyncio.exceptions.TimeoutError Stderr: /usr/home/pablo/cpython/Lib/test/test_asyncio/test_sslproto.py:497: DeprecationWarning: The loop argument is deprecated and scheduled for removal in Python 3.10. await asyncio.wait_for( /usr/home/pablo/cpython/Lib/asyncio/sslproto.py:321: ResourceWarning: unclosed transport warnings.warn(f"unclosed transport {self!r}", ResourceWarning, During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/home/pablo/cpython/Lib/asyncio/base_events.py", line 1647, in call_exception_handler self._exception_handler(self, context) File "/usr/home/pablo/cpython/Lib/test/test_asyncio/functional.py", line 22, in loop_exception_handler self.loop.default_exception_handler(context) AttributeError: 'NoneType' object has no attribute 'default_exception_handler' /usr/home/pablo/cpython/Lib/test/support/__init__.py:1550: ResourceWarning: unclosed gc.collect() test test_asyncio failed -- Traceback (most recent call last): File "/usr/home/pablo/cpython/Lib/test/test_asyncio/test_sslproto.py", line 504, in test_start_tls_server_1 self.loop.run_until_complete(run_main()) File "/usr/home/pablo/cpython/Lib/asyncio/base_events.py", line 582, in run_until_complete return future.result() File "/usr/home/pablo/cpython/Lib/test/test_asyncio/test_sslproto.py", line 497, in run_main await asyncio.wait_for( File "/usr/home/pablo/cpython/Lib/asyncio/tasks.py", line 457, in wait_for raise exceptions.TimeoutError() asyncio.exceptions.TimeoutError Stderr: /usr/home/pablo/cpython/Lib/test/test_asyncio/test_sslproto.py:497: DeprecationWarning: The loop argument is deprecated and scheduled for removal in Python 3.10. await asyncio.wait_for( /usr/home/pablo/cpython/Lib/asyncio/sslproto.py:321: ResourceWarning: unclosed transport warnings.warn(f"unclosed transport {self!r}", ResourceWarning, test_asyncio failed in 1 min 749 ms == Tests result: FAILURE == 1 test failed: test_asyncio Total duration: 1 min 800 ms Tests result: FAILURE ---------- components: Tests, asyncio messages: 328138 nosy: asvetlov, pablogsal, yselivanov priority: normal severity: normal status: open title: test_asyncio test_start_tls_server_1 fails in type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 10:10:00 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Oct 2018 14:10:00 +0000 Subject: [issue31299] Add "ignore_modules" option to TracebackException.format() In-Reply-To: <1503992745.47.0.33675937395.issue31299@psf.upfronthosting.co.za> Message-ID: <1540044600.79.0.788709270274.issue31299@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : Removed file: https://bugs.python.org/file47284/traceback_filter.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 10:30:55 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 20 Oct 2018 14:30:55 +0000 Subject: [issue35032] Remove the videos from faq/Windows Message-ID: <1540045855.07.0.788709270274.issue35032@psf.upfronthosting.co.za> New submission from St?phane Wirtel : In the FAQ of Windows, there are two references to external videos for the configuration of a dev environment for Windows, but these videos are no longer available because the domain name no longer exists. ---------- assignee: docs at python components: Documentation, Windows messages: 328139 nosy: docs at python, matrixise, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Remove the videos from faq/Windows versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 10:32:24 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 20 Oct 2018 14:32:24 +0000 Subject: [issue35032] Remove the videos from faq/Windows In-Reply-To: <1540045855.07.0.788709270274.issue35032@psf.upfronthosting.co.za> Message-ID: <1540045944.41.0.788709270274.issue35032@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +9345 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 10:48:32 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Oct 2018 14:48:32 +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: <1540046912.78.0.788709270274.issue35031@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- title: test_asyncio test_start_tls_server_1 fails in -> test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 10:49:44 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 20 Oct 2018 14:49:44 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1540046984.24.0.788709270274.issue34909@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Ethan and Ned, I am not fluent with the code of the Enum, but maybe I could work on this issue and try to finish it. Ethan, I am really sorry for your wife, take care of her. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:00:54 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 20 Oct 2018 15:00:54 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540047654.64.0.788709270274.issue34576@psf.upfronthosting.co.za> Change by Senthil Kumaran : ---------- pull_requests: +9346 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:02:33 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 20 Oct 2018 15:02:33 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540047753.42.0.788709270274.issue34576@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed it here - https://github.com/python/cpython/pull/10005 And tested the rendering too https://screenshots.firefox.com/9Wlq9v1Y7M4DZBsG/localhost Upon review / approval, I will merge this. Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:02:41 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 20 Oct 2018 15:02:41 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540047761.9.0.788709270274.issue34576@psf.upfronthosting.co.za> Change by Senthil Kumaran : ---------- assignee: -> orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:05:33 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 20 Oct 2018 15:05:33 +0000 Subject: [issue35030] Python 2.7 OrderedDict creates circular references In-Reply-To: <1540024622.42.0.788709270274.issue35030@psf.upfronthosting.co.za> Message-ID: <1540047933.6.0.788709270274.issue35030@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. I have converted the numpy code as a python helper and I am not sure if such a helper exists in the current test suite. Attaching the file that might help as a simple reproducer. # On master no error ? cpython git:(master) ./python.exe ../backups/bpo35030.py # upstream/2.7 branch ? cpython git:(2bad7acdfe) ? ./python.exe ../backups/bpo35030.py Traceback (most recent call last): File "../backups/bpo35030.py", line 60, in del a File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/contextlib.py", line 24, in __exit__ self.gen.next() File "../backups/bpo35030.py", line 53, in assert_no_gc_cycles ) for o in objects_in_cycles AssertionError: Reference cycles were found: 1 objects were collected, of which 1 are shown below: list object with id=4475647608: [, , None] ---------- nosy: +xtreak Added file: https://bugs.python.org/file47885/bpo35030.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:07:32 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Oct 2018 15:07:32 +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: <1540048052.96.0.788709270274.issue35031@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Bisecting points to commit dbf102271fcc316f353c7e0a283811b661d128f2 as the dirst bad commit: dbf102271fcc316f353c7e0a283811b661d128f2 is the first bad commit commit dbf102271fcc316f353c7e0a283811b661d128f2 Author: Yury Selivanov Date: Mon May 28 14:31:28 2018 -0400 bpo-33654: Support BufferedProtocol in set_protocol() and start_tls() (GH-7130) In this commit: * Support BufferedProtocol in set_protocol() and start_tls() * Fix proactor to cancel readers reliably * Update tests to be compatible with OpenSSL 1.1.1 * Clarify BufferedProtocol docs * Bump TLS tests timeouts to 60 seconds; eliminate possible race from start_serving * Rewrite test_start_tls_server_1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:07:42 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Oct 2018 15:07:42 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1540048062.0.0.788709270274.issue34909@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks, St?phane, but I?ve already taken care of it. I?ll be closing the issue shortly. (And ditto on the best wishes, Ethan.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:17:55 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Oct 2018 15:17:55 +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: <1540048675.3.0.788709270274.issue35031@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: I think something is going on with the buildbot itself or the test has some race condition because that commit has been built before multiple times with no error. I am investigating in the buildbot itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:19:08 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 20 Oct 2018 15:19:08 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1540048748.91.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: I'm 99% sure that with issue34725 I'll be able to make "pip --user" the default when using this install, as well as making the commands globally available (i.e. "python[3[.8]]", "pip[3[.8]]", "idle[3[.8]]" will work everywhere). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:19:38 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 20 Oct 2018 15:19:38 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1540048778.08.0.788709270274.issue34977@psf.upfronthosting.co.za> Steve Dower added the comment: (And I'll deal with that 1% at the PyPA sprints next weekend. We are due for a new pip insertion anyway, so I guess that'll come for 3.7.2.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:24:30 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Oct 2018 15:24:30 +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: <1540049070.49.0.788709270274.issue35031@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Building and testing the parent of dbf102271fcc316f353c7e0a283811b661d128f2 always succeeds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:27:07 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 15:27:07 +0000 Subject: [issue35032] Remove the videos from faq/Windows In-Reply-To: <1540045855.07.0.788709270274.issue35032@psf.upfronthosting.co.za> Message-ID: <1540049227.43.0.788709270274.issue35032@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d262250d0732bdf36cb92091e37360cf8ff40f7c by Miss Islington (bot) (St?phane Wirtel) in branch 'master': bpo-35032: Remove inaccessible videos from faq/Windows (GH-10004) https://github.com/python/cpython/commit/d262250d0732bdf36cb92091e37360cf8ff40f7c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:27:18 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 15:27:18 +0000 Subject: [issue35032] Remove the videos from faq/Windows In-Reply-To: <1540045855.07.0.788709270274.issue35032@psf.upfronthosting.co.za> Message-ID: <1540049238.55.0.788709270274.issue35032@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9347 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:27:27 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 15:27:27 +0000 Subject: [issue35032] Remove the videos from faq/Windows In-Reply-To: <1540045855.07.0.788709270274.issue35032@psf.upfronthosting.co.za> Message-ID: <1540049247.65.0.788709270274.issue35032@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9348 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:27:36 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 15:27:36 +0000 Subject: [issue35032] Remove the videos from faq/Windows In-Reply-To: <1540045855.07.0.788709270274.issue35032@psf.upfronthosting.co.za> Message-ID: <1540049256.32.0.788709270274.issue35032@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9349 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:32:24 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 15:32:24 +0000 Subject: [issue35032] Remove the videos from faq/Windows In-Reply-To: <1540045855.07.0.788709270274.issue35032@psf.upfronthosting.co.za> Message-ID: <1540049544.91.0.788709270274.issue35032@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 76e8582fca17b89d2709ad7f4e1ad658ee839962 by Miss Islington (bot) in branch '3.6': bpo-35032: Remove inaccessible videos from faq/Windows (GH-10004) https://github.com/python/cpython/commit/76e8582fca17b89d2709ad7f4e1ad658ee839962 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:32:25 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 15:32:25 +0000 Subject: [issue35032] Remove the videos from faq/Windows In-Reply-To: <1540045855.07.0.788709270274.issue35032@psf.upfronthosting.co.za> Message-ID: <1540049545.21.0.788709270274.issue35032@psf.upfronthosting.co.za> miss-islington added the comment: New changeset b53edb12f7176c58960d5ebaf48e740bea72a500 by Miss Islington (bot) in branch '2.7': bpo-35032: Remove inaccessible videos from faq/Windows (GH-10004) https://github.com/python/cpython/commit/b53edb12f7176c58960d5ebaf48e740bea72a500 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:32:32 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Oct 2018 15:32:32 +0000 Subject: [issue35032] Remove the videos from faq/Windows In-Reply-To: <1540045855.07.0.788709270274.issue35032@psf.upfronthosting.co.za> Message-ID: <1540049552.2.0.788709270274.issue35032@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 34a5ed5c0abbe75af2b75ad8bd03b68fd7e2f596 by Miss Islington (bot) in branch '3.7': bpo-35032: Remove inaccessible videos from faq/Windows (GH-10004) https://github.com/python/cpython/commit/34a5ed5c0abbe75af2b75ad8bd03b68fd7e2f596 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:37:09 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 20 Oct 2018 15:37:09 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1540049829.28.0.788709270274.issue34909@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Ned, good news (I hope the best for the wife of Ethan) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:44:17 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 20 Oct 2018 15:44:17 +0000 Subject: [issue34562] cannot install versions 3.6.5+ on Windows In-Reply-To: <1535796351.86.0.56676864532.issue34562@psf.upfronthosting.co.za> Message-ID: <1540050257.64.0.788709270274.issue34562@psf.upfronthosting.co.za> Steve Dower added the comment: Make sure your system is fully up to date and you have rebooted before/after installing Python. That error means that system files are not installed correctly, which either means you are suffering corruption or you have pending installations waiting for a reboot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:55:51 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 20 Oct 2018 15:55:51 +0000 Subject: [issue34962] make doctest does not pass :/ In-Reply-To: <1539290032.19.0.788709270274.issue34962@psf.upfronthosting.co.za> Message-ID: <1540050951.37.0.788709270274.issue34962@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- pull_requests: +9350 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 11:58:40 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 20 Oct 2018 15:58:40 +0000 Subject: [issue35027] distutils.core.setup does not raise TypeError when if classifiers, keywords and platforms fields are not specified as a list In-Reply-To: <1539963671.26.0.788709270274.issue35027@psf.upfronthosting.co.za> Message-ID: <1540051120.93.0.788709270274.issue35027@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: No problem, since this is a doc fix you can directly fork and edit on GitHub web UI. This requires CLA to be signed but no NEWS entry so it can be done from web UI and you can take wording from the commit 8837dd092fe5ad5184889104e8036811ed839f98. I am just waiting for confirmation to make sure from my analysis is correct and this is a doc fix. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 12:13:57 2018 From: report at bugs.python.org (Mitar) Date: Sat, 20 Oct 2018 16:13:57 +0000 Subject: [issue21363] io.TextIOWrapper always closes wrapped files In-Reply-To: <1398603389.33.0.793055654008.issue21363@psf.upfronthosting.co.za> Message-ID: <1540052037.06.0.788709270274.issue21363@psf.upfronthosting.co.za> Mitar added the comment: I have a similar problem that text wrapper is closing the handle, and if I want to make a workaround, it also fails: buffer = io.Bytes() with io.TextIOWrapper(buffer, encoding='utf8') as text_buffer: write_content_to(text_buffer) text_buffer.flush() text_buffer.detach() Now this fails when context manager is trying to close the text_buffer with an error that it is already detached. If I do not detach it, then it closes buffer as well. ---------- nosy: +mitar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 12:20:48 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Oct 2018 16:20:48 +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: <1540052448.02.0.788709270274.issue35031@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: It seems that the problem is that the ServerProto of test_start_tls_server_1 never receives a call to eof_received(). Weirdly enough it seems that if the HELLO_MSG is large enough (1024 * 1024), then the test always succeed. If we deactivate tls in the test, the test succeeds with any message lenght. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 12:27:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2018 16:27:04 +0000 Subject: [issue34969] Add --fast, --best to the gzip CLI In-Reply-To: <1539409543.55.0.788709270274.issue34969@psf.upfronthosting.co.za> Message-ID: <1540052824.68.0.788709270274.issue34969@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm not sure those options are such useful. If you want to control more details, it is not hard to write a tiny Python script. Python is a programming language on the whole. But if I add options for controlling the compression level, I would add options -1 ... -9. I never used verbose forms --fast and --best. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 12:28:35 2018 From: report at bugs.python.org (Julien Palard) Date: Sat, 20 Oct 2018 16:28:35 +0000 Subject: [issue35033] Column or row spanning cells are not implemented. Message-ID: <1540052915.48.0.788709270274.issue35033@psf.upfronthosting.co.za> New submission from Julien Palard : Recent tables introduced in Doc/c-api/typeobj.rst are using columns spanning. But columns spanning is not implemented in the sphinx text builder, resulting in: $ cd Doc $ sphinx-build -b text -d build/doctrees -W -D latex_elements.papersize= -Ea -A daily=1 -A switchers=1 . build/text Running Sphinx v1.8.1 building [mo]: all of 0 po files building [text]: all source files updating environment: 475 added, 0 changed, 0 removed reading sources... [100%] whatsnew/index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 12%] c-api/typeobj Exception occurred: File "/home/mdk/.venvs/mdk/lib/python3.6/site-packages/sphinx/writers/text.py", line 623, in visit_entry raise NotImplementedError('Column or row spanning cells are ' NotImplementedError: Column or row spanning cells are not implemented. The full traceback has been saved in /tmp/sphinx-err-3q24uv89.log, if you want to report the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. A bug report can be filed in the tracker at . Thanks! we could either try to remove our column spannings (but they're usefull, first table, 2nd header line), either implement it sphinx-side. ---------- assignee: docs at python components: Documentation messages: 328159 nosy: docs at python, mdk priority: normal severity: normal status: open title: Column or row spanning cells are not implemented. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 12:40:32 2018 From: report at bugs.python.org (Julien Palard) Date: Sat, 20 Oct 2018 16:40:32 +0000 Subject: [issue35033] Column or row spanning cells are not implemented. In-Reply-To: <1540052915.48.0.788709270274.issue35033@psf.upfronthosting.co.za> Message-ID: <1540053632.61.0.788709270274.issue35033@psf.upfronthosting.co.za> Julien Palard added the comment: Oh and we're also using raw spanning, in the same place, as the table header is two raws height and almost all cells but the last spans on two raws. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 12:51:01 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Oct 2018 16:51:01 +0000 Subject: [issue34521] Multiple tests (test_socket, test_multiprocessing_*) fail due to incorrect recvmsg(2) buffer lengths, causing failures on FreeBSD CURRENT In-Reply-To: <1535389978.32.0.56676864532.issue34521@psf.upfronthosting.co.za> Message-ID: <1540054261.18.0.788709270274.issue34521@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset d404ffa8adf252d49731fbd09b740360577274c8 by Ned Deily (Miss Islington (bot)) in branch '3.6': bpo-34521: Add NEWS entry for changes in GH-9613 (GH-9850) https://github.com/python/cpython/commit/d404ffa8adf252d49731fbd09b740360577274c8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 12:51:01 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Oct 2018 16:51:01 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540054261.34.0.702299269573.issue34576@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 92fe93e48a852d22ba33c0fa12112ae664724202 by Ned Deily in branch '3.6': bpo-34576: Revert doc change until it can be properly fixed (GH-9720) https://github.com/python/cpython/commit/92fe93e48a852d22ba33c0fa12112ae664724202 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 12:57:05 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Oct 2018 16:57:05 +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: <1540054625.02.0.788709270274.issue35031@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Re-adding client_context.options |= ssl.OP_NO_TLSv1_3 makes the test pass again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 12:57:26 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Oct 2018 16:57:26 +0000 Subject: [issue34521] Multiple tests (test_socket, test_multiprocessing_*) fail due to incorrect recvmsg(2) buffer lengths, causing failures on FreeBSD CURRENT In-Reply-To: <1535389978.32.0.56676864532.issue34521@psf.upfronthosting.co.za> Message-ID: <1540054646.28.0.788709270274.issue34521@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset ce3b5a80cc6ee4f9aff7b673f457294d7e054349 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-34521: Add NEWS entry for changes in GH-9613 (GH-9850) https://github.com/python/cpython/commit/ce3b5a80cc6ee4f9aff7b673f457294d7e054349 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 12:57:26 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Oct 2018 16:57:26 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540054646.41.0.702299269573.issue34576@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 32fe7b0188bb73c84c0bde80643b6a3bfd03ba93 by Ned Deily in branch '3.7': bpo-34576: Revert doc change until it can be properly fixed (GH-9720) https://github.com/python/cpython/commit/32fe7b0188bb73c84c0bde80643b6a3bfd03ba93 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 12:57:26 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Oct 2018 16:57:26 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1540054646.56.0.663665092547.issue34909@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 03ca8b5f23e9fe122bb0ca80397a2481c10cd7c4 by Ned Deily in branch '3.7': bpo-34909: NEWS entry. https://github.com/python/cpython/commit/03ca8b5f23e9fe122bb0ca80397a2481c10cd7c4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 12:57:26 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Oct 2018 16:57:26 +0000 Subject: [issue34970] Protect tasks weak set manipulation in asyncio.all_tasks() In-Reply-To: <1539418304.75.0.788709270274.issue34970@psf.upfronthosting.co.za> Message-ID: <1540054646.69.0.023849094327.issue34970@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 60c663c0f76c790afbed4d673c3ce264dd226b8c by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-34970: Protect tasks weak set manipulation in asyncio.all_tasks() (GH-9837) (GH-9849) https://github.com/python/cpython/commit/60c663c0f76c790afbed4d673c3ce264dd226b8c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 13:00:42 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Oct 2018 17:00:42 +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: <1540054842.46.0.788709270274.issue35031@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +9351 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 13:07:37 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Oct 2018 17:07:37 +0000 Subject: [issue34970] Protect tasks weak set manipulation in asyncio.all_tasks() In-Reply-To: <1539418304.75.0.788709270274.issue34970@psf.upfronthosting.co.za> Message-ID: <1540055257.08.0.788709270274.issue34970@psf.upfronthosting.co.za> Ned Deily added the comment: Released in 3.7.1 ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 13:08:50 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Oct 2018 17:08:50 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1540055330.11.0.788709270274.issue34909@psf.upfronthosting.co.za> Ned Deily added the comment: NEWS entry added for 3.7.1 and master. Closing again. ---------- priority: deferred blocker -> stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 13:10:53 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Oct 2018 17:10:53 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540055453.97.0.788709270274.issue34576@psf.upfronthosting.co.za> Ned Deily added the comment: Sorry, Senthil, I reverted the original PRs for 3.7.1 and 3.6.7 so you may need to redo your new PR. ---------- priority: deferred blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 13:13:36 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Oct 2018 17:13:36 +0000 Subject: [issue34521] Multiple tests (test_socket, test_multiprocessing_*) fail due to incorrect recvmsg(2) buffer lengths, causing failures on FreeBSD CURRENT In-Reply-To: <1535389978.32.0.56676864532.issue34521@psf.upfronthosting.co.za> Message-ID: <1540055616.44.0.788709270274.issue34521@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks, Pablo, I cherry-picked the NEWS entries into 3.7.1 and 3.6.7. So I guess the only remaining question here is what to do about 2.7. I'll also leave that for you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 13:16:13 2018 From: report at bugs.python.org (Ethan Furman) Date: Sat, 20 Oct 2018 17:16:13 +0000 Subject: [issue34909] StrEnum subclasses cannot be created In-Reply-To: <1538770368.25.0.545547206417.issue34909@psf.upfronthosting.co.za> Message-ID: <1540055773.45.0.788709270274.issue34909@psf.upfronthosting.co.za> Ethan Furman added the comment: Thank you both. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 13:39:30 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 20 Oct 2018 17:39:30 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540057170.82.0.788709270274.issue34576@psf.upfronthosting.co.za> Senthil Kumaran added the comment: No problem, Ned. I will update it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 13:49:02 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 20 Oct 2018 17:49:02 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540057742.91.0.788709270274.issue34576@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Please approve this one - https://github.com/python/cpython/pull/10005 and I adopt the backports according the reverts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 14:32:11 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 20 Oct 2018 18:32:11 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540060331.68.0.788709270274.issue34576@psf.upfronthosting.co.za> Senthil Kumaran added the comment: New changeset eeab510bb7e51802c18b3770cbb23ae0ca91da6b by Senthil Kumaran in branch 'master': bpo-34576 - Fix the formatting for security considerations in http.server.rst (#10005) https://github.com/python/cpython/commit/eeab510bb7e51802c18b3770cbb23ae0ca91da6b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 14:40:47 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 20 Oct 2018 18:40:47 +0000 Subject: [issue35017] socketserver accept a last request after shutdown In-Reply-To: <1539863713.13.0.788709270274.issue35017@psf.upfronthosting.co.za> Message-ID: <1540060847.13.0.788709270274.issue35017@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 14:50:07 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 20 Oct 2018 18:50:07 +0000 Subject: [issue35033] Column or row spanning cells are not implemented. In-Reply-To: <1540052915.48.0.788709270274.issue35033@psf.upfronthosting.co.za> Message-ID: <1540061407.68.0.788709270274.issue35033@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 15:23:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2018 19:23:21 +0000 Subject: [issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self" In-Reply-To: <1448654213.28.0.807225788685.issue25750@psf.upfronthosting.co.za> Message-ID: <1540063401.38.0.788709270274.issue25750@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This change introduced a compiler warning. /home/serhiy/py/cpython/Modules/_testcapimodule.c:5042:17: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"bad_get", bad_get, METH_FASTCALL}, ^~~~~~~ /home/serhiy/py/cpython/Modules/_testcapimodule.c:5042:17: note: (near initialization for ?TestMethods[173].ml_meth?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 15:24:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Oct 2018 19:24:24 +0000 Subject: [issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self" In-Reply-To: <1448654213.28.0.807225788685.issue25750@psf.upfronthosting.co.za> Message-ID: <1540063464.6.0.788709270274.issue25750@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 16:27:56 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Oct 2018 20:27:56 +0000 Subject: [issue31500] IDLE: Tiny font on HiDPI display In-Reply-To: <1505674446.46.0.331613884884.issue31500@psf.upfronthosting.co.za> Message-ID: <1540067276.08.0.788709270274.issue31500@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 18c44cc0c13eed792e286ddc1d331951e723aeb9 by Terry Jan Reedy (Cheryl Sabella) in branch '2.7': [2.7] bpo-31500: IDLE: Scale default fonts on HiDPI displays. (GH-3639) (GH-6585) https://github.com/python/cpython/commit/18c44cc0c13eed792e286ddc1d331951e723aeb9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 16:42:50 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sat, 20 Oct 2018 20:42:50 +0000 Subject: [issue32256] Make patchcheck.py work for out-of-tree builds In-Reply-To: <1512783358.62.0.213398074469.issue32256@psf.upfronthosting.co.za> Message-ID: <1540068170.9.0.788709270274.issue32256@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: Thank you for testing and merging, Victor! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 17:08:57 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Oct 2018 21:08:57 +0000 Subject: [issue31500] IDLE: Tiny font on HiDPI display In-Reply-To: <1505674446.46.0.331613884884.issue31500@psf.upfronthosting.co.za> Message-ID: <1540069737.82.0.788709270274.issue31500@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +9352 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 17:23:58 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Oct 2018 21:23:58 +0000 Subject: [issue35030] Python 2.7 OrderedDict creates circular references In-Reply-To: <1540024622.42.0.788709270274.issue35030@psf.upfronthosting.co.za> Message-ID: <1540070638.46.0.788709270274.issue35030@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm unclear whether you're reporting a true leak (one that can't be cleaned-up by a call to gc.collect()) or just a garden variety circular reference that will eventually free, just not as quickly as it would with straight reference counting applied when there are no circular references. FWIW, there wasn't a backport because the latter case wasn't deemed to be bug. Circular references are allowed -- we just wait on GC to clean them up. Another consideration was that the weakref proxy alternative was much slower than the existing code (that mattered less in Python 3 where we have a C implementation of OrderedDict, giving more freedom for the pure python version to adopt a less performant but more memory friendly alternative). There is a little more history here as well. There used to be a __del__() method to accelerate the reclamation of memory but that was slow and it occasionally caused other problems such as the creation of an unreclaimable zombie object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 17:39:06 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Oct 2018 21:39:06 +0000 Subject: [issue35020] Add multisort recipe to sorting docs In-Reply-To: <1539882818.57.0.788709270274.issue35020@psf.upfronthosting.co.za> Message-ID: <1540071546.87.0.788709270274.issue35020@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset 890a4b92933be8e7c554222d99ef829c88fa8637 by Raymond Hettinger (Xtreak) in branch 'master': bpo-35020: Link to sorting examples from list.sort() (GH-9931) https://github.com/python/cpython/commit/890a4b92933be8e7c554222d99ef829c88fa8637 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 17:40:19 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Oct 2018 21:40:19 +0000 Subject: [issue35020] Add multisort recipe to sorting docs In-Reply-To: <1539882818.57.0.788709270274.issue35020@psf.upfronthosting.co.za> Message-ID: <1540071619.01.0.788709270274.issue35020@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 19:29:15 2018 From: report at bugs.python.org (=?utf-8?q?Vladimir_Filipovi=C4=87?=) Date: Sat, 20 Oct 2018 23:29:15 +0000 Subject: [issue35034] Add closing and iteration to threading.Queue Message-ID: <1540078155.51.0.788709270274.issue35034@psf.upfronthosting.co.za> New submission from Vladimir Filipovi? : Code using threading.Queue often needs to coordinate a "work is finished as far as far as I care" state between the producing and consuming side. When going from the producer to the consumer ("No more items after this, so don't bother waiting"), this is usually implemented with sentinel objects, which is at best needlessly verbose and at worst tricky to get right (as with multiple consumers, or communicating a non-trivial sentinel object). When going the other direction ("I'm not interested in consuming any more, so you can stop putting them on the queue"), or when a third component needs to notify both sides ("You two start wrapping up, but don't drop any in-flight items") there isn't even a clear usual solution. Adding a close() method to the Queue (with accompanying exception treatment etc.) would solve all of this in a very clean way. It would not change anything for code that doesn't want to use it. It would simplify a lot of everyday uses of Queue. Many simple producers could reduce their coordination code to a `with closing(queue)` idiom. A further __iter__() method would enable many simple consumers to safely cut all their coordination boilerplate down to just `for item in queue`. I've got a sample implementation ready for Queue and its children, and I'm about to submit it as a PR. I'd be happy to contribute an equivalent (within limits of its API promises) implementation for SimpleQueue, but I don't have it written, and I'm unsure if I should make a separate issue for that. ---------- components: Library (Lib) messages: 328181 nosy: hemflit priority: normal severity: normal status: open title: Add closing and iteration to threading.Queue type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 19:34:17 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Oct 2018 23:34:17 +0000 Subject: [issue31500] IDLE: Tiny font on HiDPI display In-Reply-To: <1505674446.46.0.331613884884.issue31500@psf.upfronthosting.co.za> Message-ID: <1540078456.99.0.788709270274.issue31500@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset f125d788ff71095390a9e190da6722eb00166cd4 by Terry Jan Reedy in branch '2.7': bpo-31500: Default fonts now are scaled on HiDPI displays. (#10015) https://github.com/python/cpython/commit/f125d788ff71095390a9e190da6722eb00166cd4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 19:35:31 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Oct 2018 23:35:31 +0000 Subject: [issue31500] IDLE: Tiny font on HiDPI display In-Reply-To: <1505674446.46.0.331613884884.issue31500@psf.upfronthosting.co.za> Message-ID: <1540078531.29.0.788709270274.issue31500@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 19:46:09 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 20 Oct 2018 23:46:09 +0000 Subject: [issue35020] Add multisort recipe to sorting docs In-Reply-To: <1539882818.57.0.788709270274.issue35020@psf.upfronthosting.co.za> Message-ID: <1540079169.65.0.788709270274.issue35020@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- pull_requests: +9353 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 20:05:57 2018 From: report at bugs.python.org (=?utf-8?q?Vladimir_Filipovi=C4=87?=) Date: Sun, 21 Oct 2018 00:05:57 +0000 Subject: [issue35034] Add closing and iteration to threading.Queue In-Reply-To: <1540078155.51.0.788709270274.issue35034@psf.upfronthosting.co.za> Message-ID: <1540080357.74.0.788709270274.issue35034@psf.upfronthosting.co.za> Change by Vladimir Filipovi? : ---------- keywords: +patch pull_requests: +9354 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 20:06:00 2018 From: report at bugs.python.org (=?utf-8?q?Vladimir_Filipovi=C4=87?=) Date: Sun, 21 Oct 2018 00:06:00 +0000 Subject: [issue35034] Add closing and iteration to threading.Queue In-Reply-To: <1540078155.51.0.788709270274.issue35034@psf.upfronthosting.co.za> Message-ID: <1540080360.82.0.788709270274.issue35034@psf.upfronthosting.co.za> Change by Vladimir Filipovi? : ---------- keywords: +patch, patch pull_requests: +9354, 9355 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 20:06:01 2018 From: report at bugs.python.org (=?utf-8?q?Vladimir_Filipovi=C4=87?=) Date: Sun, 21 Oct 2018 00:06:01 +0000 Subject: [issue35034] Add closing and iteration to threading.Queue In-Reply-To: <1540078155.51.0.788709270274.issue35034@psf.upfronthosting.co.za> Message-ID: <1540080361.04.0.788709270274.issue35034@psf.upfronthosting.co.za> Change by Vladimir Filipovi? : ---------- keywords: +patch, patch, patch pull_requests: +9354, 9355, 9357 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 20:06:01 2018 From: report at bugs.python.org (=?utf-8?q?Vladimir_Filipovi=C4=87?=) Date: Sun, 21 Oct 2018 00:06:01 +0000 Subject: [issue35034] Add closing and iteration to threading.Queue In-Reply-To: <1540078155.51.0.788709270274.issue35034@psf.upfronthosting.co.za> Message-ID: <1540080361.09.0.788709270274.issue35034@psf.upfronthosting.co.za> Change by Vladimir Filipovi? : ---------- keywords: +patch, patch, patch, patch pull_requests: +9354, 9355, 9356, 9357 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 20:08:00 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 21 Oct 2018 00:08:00 +0000 Subject: [issue35025] Compiling `timemodule.c` can fail on macOS due to availability warnings In-Reply-To: <1539930297.83.0.788709270274.issue35025@psf.upfronthosting.co.za> Message-ID: <1540080480.66.0.788709270274.issue35025@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 94451182ccd6729c11338926d8a3d11645e86626 by Benjamin Peterson (Max B?langer) in branch 'master': closes bpo-35025: Properly guard the `CLOCK_GETTIME` et al macros in timemodule.c. (GH-9961) https://github.com/python/cpython/commit/94451182ccd6729c11338926d8a3d11645e86626 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 20:08:30 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Oct 2018 00:08:30 +0000 Subject: [issue35025] Compiling `timemodule.c` can fail on macOS due to availability warnings In-Reply-To: <1539930297.83.0.788709270274.issue35025@psf.upfronthosting.co.za> Message-ID: <1540080510.81.0.788709270274.issue35025@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9359 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 20:08:44 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Oct 2018 00:08:44 +0000 Subject: [issue35025] Compiling `timemodule.c` can fail on macOS due to availability warnings In-Reply-To: <1539930297.83.0.788709270274.issue35025@psf.upfronthosting.co.za> Message-ID: <1540080524.54.0.788709270274.issue35025@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9360 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 20:30:59 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Oct 2018 00:30:59 +0000 Subject: [issue35025] Compiling `timemodule.c` can fail on macOS due to availability warnings In-Reply-To: <1539930297.83.0.788709270274.issue35025@psf.upfronthosting.co.za> Message-ID: <1540081859.37.0.788709270274.issue35025@psf.upfronthosting.co.za> miss-islington added the comment: New changeset beb83d013e0295c987087febf2be78b1da389b15 by Miss Islington (bot) in branch '3.6': closes bpo-35025: Properly guard the `CLOCK_GETTIME` et al macros in timemodule.c. (GH-9961) https://github.com/python/cpython/commit/beb83d013e0295c987087febf2be78b1da389b15 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 20:41:45 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Oct 2018 00:41:45 +0000 Subject: [issue35025] Compiling `timemodule.c` can fail on macOS due to availability warnings In-Reply-To: <1539930297.83.0.788709270274.issue35025@psf.upfronthosting.co.za> Message-ID: <1540082505.44.0.788709270274.issue35025@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 002aef3f66a9f8da635e20860622f2e539a0b611 by Miss Islington (bot) in branch '3.7': closes bpo-35025: Properly guard the `CLOCK_GETTIME` et al macros in timemodule.c. (GH-9961) https://github.com/python/cpython/commit/002aef3f66a9f8da635e20860622f2e539a0b611 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 21:07:26 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Oct 2018 01:07:26 +0000 Subject: [issue35034] Add closing and iteration to threading.Queue In-Reply-To: <1540078155.51.0.788709270274.issue35034@psf.upfronthosting.co.za> Message-ID: <1540084046.5.0.788709270274.issue35034@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Note we already have the task_done() / join() API to handle the common case of notification for when work is done. At one point, Guido opined that he didn't want the queue module to go any further into the world of task management (because it is beyond the scope of what the module is trying to do). Also, because this is a significant expansion of an otherwise simple API and because it would establish new idioms, it would need to be discussed on python-ideas before going forward. Also, to evaluate the proposal, it would be help to have examples of existing code that would be improved with the new API. Likewise, it would be helpful to survey other languages to see if they have anything like this and see whether their experiences were possible or negative. If the python-ideas discussion is fruitful, feel free to re-open this feature request. The existence of the PR will help make the discussion more concrete and give people a chance to try it out. ---------- assignee: -> rhettinger nosy: +pitrou, rhettinger, tim.peters resolution: -> later stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 20 21:08:41 2018 From: report at bugs.python.org (Anthony Sottile) Date: Sun, 21 Oct 2018 01:08:41 +0000 Subject: [issue16806] col_offset is -1 and lineno is wrong for multiline string expressions In-Reply-To: <1356739702.66.0.625233113719.issue16806@psf.upfronthosting.co.za> Message-ID: <1540084121.51.0.788709270274.issue16806@psf.upfronthosting.co.za> Change by Anthony Sottile : ---------- pull_requests: +9361 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 00:09:47 2018 From: report at bugs.python.org (Dan Snider) Date: Sun, 21 Oct 2018 04:09:47 +0000 Subject: [issue34396] Certain methods that heap allocated subtypes inherit suffer a 50-80% performance penalty In-Reply-To: <1534189001.92.0.56676864532.issue34396@psf.upfronthosting.co.za> Message-ID: <1540094987.94.0.788709270274.issue34396@psf.upfronthosting.co.za> Dan Snider added the comment: Well, I found another mystery. Calling tuple.__getitem__ directly, on an actual tuple instance, is 50-80% slower than calling list.__getitem__ even though in theory, they should be virtually identical with maybe tuple access being infinitesimally be faster. The only difference I found here between the two __getitem__s surprisingly is that tuple *doesn't* have __getitem__ in its method list, while list does. >>> [].__getitem__ >>> ().__getitem__ Since list is using the wrapper in tp_methods and tuple isn't, it *look* like METH_COEXIST *is* helping but since we know that in both the dict case and now the tuple/list case it is unnecessary, there's clearly a bug somewhere causing multiple arg tuple allocs and or arg parsing. Unfortunately, it takes me several hours to "catch up" from CALL_FUNCTION in ceval.c to something like call_method in typeobject.c and I don't have that kind of time at the moment but hopefully someone notices this again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 00:32:52 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Oct 2018 04:32:52 +0000 Subject: [issue34396] Certain methods that heap allocated subtypes inherit suffer a 50-80% performance penalty In-Reply-To: <1534189001.92.0.56676864532.issue34396@psf.upfronthosting.co.za> Message-ID: <1540096372.99.0.788709270274.issue34396@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- nosy: +rhettinger versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 01:07:49 2018 From: report at bugs.python.org (tzickel) Date: Sun, 21 Oct 2018 05:07:49 +0000 Subject: [issue35030] Python 2.7 OrderedDict creates circular references In-Reply-To: <1540024622.42.0.788709270274.issue35030@psf.upfronthosting.co.za> Message-ID: <1540098469.81.0.788709270274.issue35030@psf.upfronthosting.co.za> tzickel added the comment: You can see the testing code here: https://github.com/numpy/numpy/blob/eb40e161e2e593762da9c77858343e3720351ce7/n umpy/testing/_private/utils.py#L2199 it calls gc.collect in the end and only throws this error if it returns a non zero return value from it (after clearing the gc before calling the test code). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 01:14:48 2018 From: report at bugs.python.org (tzickel) Date: Sun, 21 Oct 2018 05:14:48 +0000 Subject: [issue35030] Python 2.7 OrderedDict creates circular references In-Reply-To: <1540024622.42.0.788709270274.issue35030@psf.upfronthosting.co.za> Message-ID: <1540098888.17.0.788709270274.issue35030@psf.upfronthosting.co.za> tzickel added the comment: I see, so basically this would be a problem only if the root object had a __del__ method and then the GC wouldn't reclaim it ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 02:17:19 2018 From: report at bugs.python.org (Zhiming Wang) Date: Sun, 21 Oct 2018 06:17:19 +0000 Subject: [issue35035] Documentation for email.utils is named email.util.rst Message-ID: <1540102639.17.0.788709270274.issue35035@psf.upfronthosting.co.za> New submission from Zhiming Wang : Documentation for PSL module email.utils is named email.util.rst. See . This seems to violate the principle of least surprise. (I have a command line tool to open documentation for any PSL module, and I found this name mismatch when I used that with email.utils.) It should be named email.utils.rst instead, unless there's a specific reason not to. ---------- assignee: docs at python components: Documentation messages: 328190 nosy: docs at python, zmwangx priority: normal severity: normal status: open title: Documentation for email.utils is named email.util.rst versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 02:25:02 2018 From: report at bugs.python.org (Zhiming Wang) Date: Sun, 21 Oct 2018 06:25:02 +0000 Subject: [issue35035] Documentation for email.utils is named email.util.rst In-Reply-To: <1540102639.17.0.788709270274.issue35035@psf.upfronthosting.co.za> Message-ID: <1540103102.51.0.788709270274.issue35035@psf.upfronthosting.co.za> Change by Zhiming Wang : ---------- keywords: +patch pull_requests: +9362 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 02:56:45 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 21 Oct 2018 06:56:45 +0000 Subject: [issue35036] logger failure in suspicious.py Message-ID: <1540105005.86.0.788709270274.issue35036@psf.upfronthosting.co.za> New submission from Karthikeyan Singaravelan : There were some recent changes made in ee171a26c11 to fix Sphinx related deprecation warnings. During the change self.info() was changed to self.logger.info() . Logger expects a positional argument that contains the message thus causing failure. I think empty string can be passed here. I changed it back to self.info() and ran `make suspicious` locally and it only printed deprecation warning. Looking the source the previous method had message default to '' thus self.info() was working. def info(self, message='', nonl=False): # type: (unicode, bool) > None """Emit an informational message. If *nonl* is true, don't emit a newline at the end (which implies that more info output will follow soon.) .. deprecated:: 1.6 Use :mod:`sphinx.util.logging` instead. """ warnings.warn('app.info() is now deprecated. Use sphinx.util.logging instead.', RemovedInSphinx20Warning) logger.info(message, nonl=nonl) Sample failure : https://travis-ci.org/python/cpython/jobs/444263040#L560 I am adding @pablogsal for thoughts on the fix. I will add a PR shortly. ---------- components: Build messages: 328191 nosy: pablogsal, xtreak priority: normal severity: normal status: open title: logger failure in suspicious.py type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 02:56:59 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 21 Oct 2018 06:56:59 +0000 Subject: [issue35036] logger failure in suspicious.py In-Reply-To: <1540105005.86.0.788709270274.issue35036@psf.upfronthosting.co.za> Message-ID: <1540105019.88.0.788709270274.issue35036@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- assignee: -> xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 03:03:11 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 21 Oct 2018 07:03:11 +0000 Subject: [issue35036] logger failure in suspicious.py In-Reply-To: <1540105005.86.0.788709270274.issue35036@psf.upfronthosting.co.za> Message-ID: <1540105391.88.0.788709270274.issue35036@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +9363 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 03:09:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2018 07:09:43 +0000 Subject: [issue35029] Convert SyntaxWarning exception raised at code generation time to a SyntaxError In-Reply-To: <1540020243.93.0.788709270274.issue35029@psf.upfronthosting.co.za> Message-ID: <1540105783.45.0.788709270274.issue35029@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d31e7730cd5d74efbd7320751dacd51d09cc415d by Serhiy Storchaka in branch 'master': bpo-35029: Replace the SyntaxWarning exception with a SyntaxError. (GH-9999) https://github.com/python/cpython/commit/d31e7730cd5d74efbd7320751dacd51d09cc415d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 03:10:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2018 07:10:28 +0000 Subject: [issue34936] tkinter.Spinbox.selection_element() raises TclError In-Reply-To: <1539014215.23.0.545547206417.issue34936@psf.upfronthosting.co.za> Message-ID: <1540105828.43.0.788709270274.issue34936@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 427b8c7f7dcdbff21de78b10d9ad05c825480618 by Serhiy Storchaka in branch '2.7': [2.7] bpo-34936: Fix TclError in tkinter.Spinbox.selection_element(). (GH-9760) (GH-9957) (GH-9968) https://github.com/python/cpython/commit/427b8c7f7dcdbff21de78b10d9ad05c825480618 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 03:10:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2018 07:10:47 +0000 Subject: [issue34936] tkinter.Spinbox.selection_element() raises TclError In-Reply-To: <1539014215.23.0.545547206417.issue34936@psf.upfronthosting.co.za> Message-ID: <1540105847.5.0.788709270274.issue34936@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 03:22:06 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 21 Oct 2018 07:22:06 +0000 Subject: [issue8525] Display exceptions' subclasses in help() In-Reply-To: <1272150602.3.0.323796636819.issue8525@psf.upfronthosting.co.za> Message-ID: <1540106526.6.0.788709270274.issue8525@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset a323cdcb33c8c856e5668acfb2c67ab5198672c4 by Nick Coghlan (Sanyam Khurana) in branch 'master': bpo-8525: help() on a type now shows builtin subclasses (GH-5066) https://github.com/python/cpython/commit/a323cdcb33c8c856e5668acfb2c67ab5198672c4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 03:27:06 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 21 Oct 2018 07:27:06 +0000 Subject: [issue8525] Display exceptions' subclasses in help() In-Reply-To: <1272150602.3.0.323796636819.issue8525@psf.upfronthosting.co.za> Message-ID: <1540106826.47.0.788709270274.issue8525@psf.upfronthosting.co.za> Nick Coghlan added the comment: I've merged the version that displays up to 4 builtin subclasses in a flat list when help() is called on a type. Thanks for the patch Sanyam, and for the comments and suggestions everyone else. While I'm closing out this feature request as implemented, if anyone's interested in pursuing the more sophisticated showtree/getclasstree approach that would better show position in the class hierarchy (both parents *and* children), feel free to file a new enhancement issue that refers back to this one. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 03:28:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2018 07:28:51 +0000 Subject: [issue35029] Convert SyntaxWarning exception raised at code generation time to a SyntaxError In-Reply-To: <1540020243.93.0.788709270274.issue35029@psf.upfronthosting.co.za> Message-ID: <1540106931.99.0.788709270274.issue35029@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 03:48:16 2018 From: report at bugs.python.org (Raz Manor) Date: Sun, 21 Oct 2018 07:48:16 +0000 Subject: [issue34996] Add name to process and thread pool In-Reply-To: <1539686443.16.0.788709270274.issue34996@psf.upfronthosting.co.za> Message-ID: <1540108096.96.0.788709270274.issue34996@psf.upfronthosting.co.za> Raz Manor added the comment: The default name of the threads does not allow differentiation between pool threads and other threads. This problem is more notable when you have several thread pools. Also, since there are some management threads to the pool, and one might want to know which is which. It was very helpful for me while debugging some memory issues in my project, this is where the idea came from. The names themselves were my idea, but I welcome any change to them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 03:52:32 2018 From: report at bugs.python.org (Caleb Hattingh) Date: Sun, 21 Oct 2018 07:52:32 +0000 Subject: [issue35036] logger failure in suspicious.py In-Reply-To: <1540105005.86.0.788709270274.issue35036@psf.upfronthosting.co.za> Message-ID: <1540108352.14.0.788709270274.issue35036@psf.upfronthosting.co.za> Change by Caleb Hattingh : ---------- nosy: +cjrh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 04:22:52 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 21 Oct 2018 08:22:52 +0000 Subject: [issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC Message-ID: <1540110172.83.0.788709270274.issue35037@psf.upfronthosting.co.za> New submission from Stefan Behnel : I see reports from Cython users on Windows-64 that extension modules that use "longintrepr.h" get miscompiled by MinGW. A failing setup looks as follows: Stock 64 bit CPython on Windows, e.g. Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] MinGW uses this compile time setup, i.e. 15 bit digits: PyLong_BASE 0x8000 PyLong_MASK 7FFF PyLong_SHIFT 15 sizeof(digit) 2 sizeof(sdigit) 2 Whereas CPython reports the following, indicating that it was in fact built with 30 bit digits: sys.getsize(1, 2**14, 2**15, 2**29, 2**30, 2**63, 2**64) (28, 28, 28, 28, 32, 36, 36) I'm not sure if this also applies to Py2.7, but I don't think the PyLong implementations differ in this regard. The compile time PyLong digit size is not remembered by the CPython installation and instead determined on the fly by the extension compiler. It seems that the MSVC build of the stock CPython packages differs from what MinGW decides here. This renders MinGW unusable for code that uses "longintrepr.h", which Cython does by default in order to accelerate its unpacking of PyLong values. Is there a reason why CPython cannot store its compile time value for the PYLONG_BITS_IN_DIGIT setting somewhere? ---------- components: Extension Modules, Windows messages: 328197 nosy: paul.moore, scoder, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC type: compile error versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 04:29:06 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 21 Oct 2018 08:29:06 +0000 Subject: [issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC In-Reply-To: <1540110172.83.0.788709270274.issue35037@psf.upfronthosting.co.za> Message-ID: <1540110546.54.0.788709270274.issue35037@psf.upfronthosting.co.za> Stefan Behnel added the comment: Some more information. CPython uses this code snippet to decide on the PyLong digit size: #ifndef PYLONG_BITS_IN_DIGIT #if SIZEOF_VOID_P >= 8 #define PYLONG_BITS_IN_DIGIT 30 #else #define PYLONG_BITS_IN_DIGIT 15 #endif #endif In MinGW, "SIZEOF_VOID_P" is 4, whereas "sizeof(void*)" resolves to 8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 04:36:03 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Oct 2018 08:36:03 +0000 Subject: [issue34996] Add name to process and thread pool In-Reply-To: <1539686443.16.0.788709270274.issue34996@psf.upfronthosting.co.za> Message-ID: <1540110963.46.0.788709270274.issue34996@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for posting this. I think this is a good idea, will take a look at the PR later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 05:05:30 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 21 Oct 2018 09:05:30 +0000 Subject: [issue31500] IDLE: Tiny font on HiDPI display In-Reply-To: <1505674446.46.0.331613884884.issue31500@psf.upfronthosting.co.za> Message-ID: <1540112730.89.0.788709270274.issue31500@psf.upfronthosting.co.za> Tal Einat added the comment: Just tested on a 13" Retina MacBook Pro (2560x1600), everything looks fine. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 05:23:10 2018 From: report at bugs.python.org (Caleb Hattingh) Date: Sun, 21 Oct 2018 09:23:10 +0000 Subject: [issue34831] Asyncio Tutorial In-Reply-To: <1538134577.09.0.545547206417.issue34831@psf.upfronthosting.co.za> Message-ID: <1540113790.48.0.788709270274.issue34831@psf.upfronthosting.co.za> Caleb Hattingh added the comment: I've added a few ideas for items in the "cookbook" page, which you'll see in the PR. If anyone has suggestions for more or better cookbook entries (recipes?), feel free to mention here or in the PR, I check both places. I expect to get more time to work on this next weekend, so it would be great to get ideas and reviews in during the week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 05:37:50 2018 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 21 Oct 2018 09:37:50 +0000 Subject: [issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC In-Reply-To: <1540110172.83.0.788709270274.issue35037@psf.upfronthosting.co.za> Message-ID: <1540114670.63.0.788709270274.issue35037@psf.upfronthosting.co.za> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 05:49:37 2018 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 21 Oct 2018 09:49:37 +0000 Subject: [issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC In-Reply-To: <1540110172.83.0.788709270274.issue35037@psf.upfronthosting.co.za> Message-ID: <1540115377.7.0.788709270274.issue35037@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Is there a reason why CPython cannot store its compile time value for the PYLONG_BITS_IN_DIGIT setting somewhere? There's PyLong_GetInfo [1], and at Python level, the corresponding sys.long_info (Python 2) / sys.int_info (Python 3). Does that help? [1] https://github.com/python/cpython/blob/b2e2025941f6a4fdb716bd141d31acf720353d21/Objects/longobject.c#L5578-L5595 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 05:50:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2018 09:50:22 +0000 Subject: [issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC In-Reply-To: <1540110172.83.0.788709270274.issue35037@psf.upfronthosting.co.za> Message-ID: <1540115422.74.0.788709270274.issue35037@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: At runtime this information is available as sys.int_info.bits_per_digit. > In MinGW, "SIZEOF_VOID_P" is 4, whereas "sizeof(void*)" resolves to 8. Looks like a misconfiguration. I suppose this will cause more issues than just wrong PYLONG_BITS_IN_DIGIT. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 07:31:55 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 21 Oct 2018 11:31:55 +0000 Subject: [issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC In-Reply-To: <1540110172.83.0.788709270274.issue35037@psf.upfronthosting.co.za> Message-ID: <1540121515.34.0.788709270274.issue35037@psf.upfronthosting.co.za> Stefan Behnel added the comment: > There's PyLong_GetInfo ... Thanks, I understand that this information can be found at runtime. However, in order to correctly compile C code against a given CPython runtime, there needs to be a guarantee that extension module builds use the same configuration as the CPython build. > Misconfiguration I searched some more, and it looks like this was already reported almost ten years ago in issue4709. The work-around there is to pass -DMS_WIN64, which apparently is not defined by MinGW but required by the CPython headers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 07:56:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2018 11:56:54 +0000 Subject: [issue34794] memory leak in TkApp:_createbytearray In-Reply-To: <1537824612.19.0.545547206417.issue34794@psf.upfronthosting.co.za> Message-ID: <1540123014.1.0.788709270274.issue34794@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a simpler reproducer. Actually the problem was not in _createbytearray(), but in converting the Python wrapper around Tcl_Obj into Tcl_Obj. _createbytearray() just exposed it. The leak exists in Python 3 too, but it is hard to reproduce it. ---------- versions: +Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file47886/leak_demo2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 07:57:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2018 11:57:08 +0000 Subject: [issue34794] memory leak in TkApp:_createbytearray In-Reply-To: <1537824612.19.0.545547206417.issue34794@psf.upfronthosting.co.za> Message-ID: <1540123028.78.0.788709270274.issue34794@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9364 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 08:05:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2018 12:05:09 +0000 Subject: [issue34794] Memory leak in Tkinter In-Reply-To: <1537824612.19.0.545547206417.issue34794@psf.upfronthosting.co.za> Message-ID: <1540123509.25.0.788709270274.issue34794@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- title: memory leak in TkApp:_createbytearray -> Memory leak in Tkinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 08:13:10 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 21 Oct 2018 12:13:10 +0000 Subject: [issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC In-Reply-To: <1540110172.83.0.788709270274.issue35037@psf.upfronthosting.co.za> Message-ID: <1540123990.93.0.788709270274.issue35037@psf.upfronthosting.co.za> Steve Dower added the comment: That variable should be inferred somewhere, either in PC/pyconfig.h or pyport.h. If there's a way to also infer it on 64-bit MinGW then we would consider a patch for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 08:25:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2018 12:25:15 +0000 Subject: [issue34973] Crash in bytes constructor with mutating list In-Reply-To: <1539437867.82.0.788709270274.issue34973@psf.upfronthosting.co.za> Message-ID: <1540124715.16.0.788709270274.issue34973@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Xiang and Alexandre. I'll merge PR 9841. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 08:25:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2018 12:25:59 +0000 Subject: [issue34973] Crash in bytes constructor with mutating list In-Reply-To: <1539437867.82.0.788709270274.issue34973@psf.upfronthosting.co.za> Message-ID: <1540124759.75.0.788709270274.issue34973@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 914f9a078f997e58cfcfabcbb30fafdd1f277bef by Serhiy Storchaka in branch 'master': bpo-34973: Fix crash in bytes constructor. (GH-9841) https://github.com/python/cpython/commit/914f9a078f997e58cfcfabcbb30fafdd1f277bef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 08:26:10 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Oct 2018 12:26:10 +0000 Subject: [issue34973] Crash in bytes constructor with mutating list In-Reply-To: <1539437867.82.0.788709270274.issue34973@psf.upfronthosting.co.za> Message-ID: <1540124770.56.0.788709270274.issue34973@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9365 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 08:26:20 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Oct 2018 12:26:20 +0000 Subject: [issue34973] Crash in bytes constructor with mutating list In-Reply-To: <1539437867.82.0.788709270274.issue34973@psf.upfronthosting.co.za> Message-ID: <1540124780.1.0.788709270274.issue34973@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9366 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 08:29:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2018 12:29:16 +0000 Subject: [issue34984] Improve error messages in bytes and bytearray constructors In-Reply-To: <1539536007.23.0.788709270274.issue34984@psf.upfronthosting.co.za> Message-ID: <1540124956.52.0.788709270274.issue34984@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 2c2044e789875ea736ec42e216fdbe61816fbe28 by Serhiy Storchaka in branch 'master': bpo-34984: Improve error messages for bytes and bytearray constructors. (GH-9874) https://github.com/python/cpython/commit/2c2044e789875ea736ec42e216fdbe61816fbe28 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 08:29:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2018 12:29:49 +0000 Subject: [issue34984] Improve error messages in bytes and bytearray constructors In-Reply-To: <1539536007.23.0.788709270274.issue34984@psf.upfronthosting.co.za> Message-ID: <1540124989.18.0.788709270274.issue34984@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 08:55:56 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Oct 2018 12:55:56 +0000 Subject: [issue34973] Crash in bytes constructor with mutating list In-Reply-To: <1539437867.82.0.788709270274.issue34973@psf.upfronthosting.co.za> Message-ID: <1540126556.28.0.788709270274.issue34973@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 7f34d550231e047c88a1817b58bda03a33817490 by Miss Islington (bot) in branch '3.7': bpo-34973: Fix crash in bytes constructor. (GH-9841) https://github.com/python/cpython/commit/7f34d550231e047c88a1817b58bda03a33817490 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 08:56:14 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Oct 2018 12:56:14 +0000 Subject: [issue34973] Crash in bytes constructor with mutating list In-Reply-To: <1539437867.82.0.788709270274.issue34973@psf.upfronthosting.co.za> Message-ID: <1540126574.3.0.788709270274.issue34973@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8bb037167cf3204a7d620ba11fbf43d2a9ec36e6 by Miss Islington (bot) in branch '3.6': bpo-34973: Fix crash in bytes constructor. (GH-9841) https://github.com/python/cpython/commit/8bb037167cf3204a7d620ba11fbf43d2a9ec36e6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 08:57:36 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 21 Oct 2018 12:57:36 +0000 Subject: [issue35036] logger failure in suspicious.py In-Reply-To: <1540105005.86.0.788709270274.issue35036@psf.upfronthosting.co.za> Message-ID: <1540126656.2.0.788709270274.issue35036@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset c3f52a59ce8406d9e59253ad4621e4749abdaeef by Pablo Galindo (Xtreak) in branch 'master': bpo-35036: Remove empty log line in the suspicious.py tool (GH-10024) https://github.com/python/cpython/commit/c3f52a59ce8406d9e59253ad4621e4749abdaeef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 08:58:34 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 21 Oct 2018 12:58:34 +0000 Subject: [issue35036] logger failure in suspicious.py In-Reply-To: <1540105005.86.0.788709270274.issue35036@psf.upfronthosting.co.za> Message-ID: <1540126714.7.0.788709270274.issue35036@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 08:58:51 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 21 Oct 2018 12:58:51 +0000 Subject: [issue35036] logger failure in suspicious.py In-Reply-To: <1540105005.86.0.788709270274.issue35036@psf.upfronthosting.co.za> Message-ID: <1540126731.98.0.788709270274.issue35036@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Thanks @xtreak for the catch and PR! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 09:10:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2018 13:10:09 +0000 Subject: [issue34973] Crash in bytes constructor with mutating list In-Reply-To: <1539437867.82.0.788709270274.issue34973@psf.upfronthosting.co.za> Message-ID: <1540127409.85.0.788709270274.issue34973@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 10:04:22 2018 From: report at bugs.python.org (Ned Batchelder) Date: Sun, 21 Oct 2018 14:04:22 +0000 Subject: [issue34876] Python3.8 changes how decorators are traced In-Reply-To: <1538521604.52.0.545547206417.issue34876@psf.upfronthosting.co.za> Message-ID: <1540130662.64.0.788709270274.issue34876@psf.upfronthosting.co.za> Ned Batchelder added the comment: Thanks, the fix looks good to me. I made a comparison of some decorator tracing to check it out: https://gist.github.com/nedbat/d603a34136299f0c0b8e442fccadeb7d TBH, the first time I tried it, something seemed wrong, but I can't see it now, so ?\_(?)_/? :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 10:51:43 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 21 Oct 2018 14:51:43 +0000 Subject: [issue29743] Closing transport during handshake process leaks open socket In-Reply-To: <1488841245.61.0.346906238419.issue29743@psf.upfronthosting.co.za> Message-ID: <1540133503.74.0.788709270274.issue29743@psf.upfronthosting.co.za> Change by Tal Einat : ---------- pull_requests: +9367 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 10:54:56 2018 From: report at bugs.python.org (Julien Palard) Date: Sun, 21 Oct 2018 14:54:56 +0000 Subject: [issue34081] Sphinx duplicate label warning in docs In-Reply-To: <1531211521.37.0.56676864532.issue34081@psf.upfronthosting.co.za> Message-ID: <1540133696.46.0.788709270274.issue34081@psf.upfronthosting.co.za> Julien Palard added the comment: New changeset 121eb1694cab14df857ba6abe9839654cada15cf by Julien Palard (Xtreak) in branch 'master': bpo-34081: Fix wrong example link that was linking to distutils (GH-8248) https://github.com/python/cpython/commit/121eb1694cab14df857ba6abe9839654cada15cf ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 10:55:20 2018 From: report at bugs.python.org (Julien Palard) Date: Sun, 21 Oct 2018 14:55:20 +0000 Subject: [issue34081] Sphinx duplicate label warning in docs In-Reply-To: <1531211521.37.0.56676864532.issue34081@psf.upfronthosting.co.za> Message-ID: <1540133720.12.0.788709270274.issue34081@psf.upfronthosting.co.za> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 10:56:40 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 21 Oct 2018 14:56:40 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute In-Reply-To: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> Message-ID: <1540133800.38.0.788709270274.issue29843@psf.upfronthosting.co.za> Tal Einat added the comment: Should this be back-ported to 3.7 and 3.6? 2.7? ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 11:02:02 2018 From: report at bugs.python.org (Adrien) Date: Sun, 21 Oct 2018 15:02:02 +0000 Subject: [issue35038] AttributeError: 'frame' object has no attribute 'f_restricted' Message-ID: <1540134122.28.0.788709270274.issue35038@psf.upfronthosting.co.za> New submission from Adrien : In the documentation (https://docs.python.org/3/library/inspect.html#types-and-members), the attribute `f_restricted` is listed as a member of `frame` objects. However, while trying to access it or even when calling `help()`, the object does not seem to have such attribute. Is it a issue with the documentation that has not been updated? I'm using Python 3.6.3 on Linux. ---------- assignee: docs at python components: Documentation messages: 328217 nosy: Delgan, docs at python priority: normal severity: normal status: open title: AttributeError: 'frame' object has no attribute 'f_restricted' type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 11:12:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2018 15:12:55 +0000 Subject: [issue35038] AttributeError: 'frame' object has no attribute 'f_restricted' In-Reply-To: <1540134122.28.0.788709270274.issue35038@psf.upfronthosting.co.za> Message-ID: <1540134775.36.0.788709270274.issue35038@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is an issue with the documentation. ---------- keywords: +easy nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 11:13:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Oct 2018 15:13:32 +0000 Subject: [issue35038] AttributeError: 'frame' object has no attribute 'f_restricted' In-Reply-To: <1540134122.28.0.788709270274.issue35038@psf.upfronthosting.co.za> Message-ID: <1540134812.71.0.788709270274.issue35038@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- stage: -> needs patch versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 11:20:41 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 21 Oct 2018 15:20:41 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute In-Reply-To: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> Message-ID: <1540135241.87.0.788709270274.issue29843@psf.upfronthosting.co.za> Change by Tal Einat : ---------- pull_requests: +9368 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 11:42:37 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 21 Oct 2018 15:42:37 +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: <1540136557.39.0.788709270274.issue34271@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +9369 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 12:02:24 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 21 Oct 2018 16:02:24 +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: <1540137744.84.0.788709270274.issue34271@psf.upfronthosting.co.za> Christian Heimes added the comment: Nathaniel, I created a PR with keylog and message callback patch. The message callback is really useful to investigate handshake and trace messages like close alert. I decided against making the key log feature a callback and rather make it a filename attribute. In almost all case users want to log to a file anz way. It's easier to implement and makes locking simpler, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 12:10:26 2018 From: report at bugs.python.org (Anthony Sottile) Date: Sun, 21 Oct 2018 16:10:26 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540138226.98.0.788709270274.issue33899@psf.upfronthosting.co.za> Anthony Sottile added the comment: This change in behaviour is breaking pycodestyle: https://github.com/PyCQA/pycodestyle/issues/786 Perhaps it shouldn't have been backported (especially all the way to python2.7?) ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 12:15:52 2018 From: report at bugs.python.org (Johannes Frank) Date: Sun, 21 Oct 2018 16:15:52 +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: <1540138552.38.0.788709270274.issue34271@psf.upfronthosting.co.za> Johannes Frank added the comment: Hello Christian, much appreciated. Thank you so much. Johannes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 14:05:38 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 21 Oct 2018 18:05:38 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540145138.07.0.788709270274.issue33899@psf.upfronthosting.co.za> Tal Einat added the comment: This was backported since it was considered a bug, but you are right that it broke backwards compatibility, and perhaps shouldn't have been backported. Still, with 3.6.6 and 3.7.1 now released, that ship has sailed. We could perhaps revert this on the 2.7 branch, but I feel that reverting this change only on 2.7 would just cause even more confusion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 14:19:33 2018 From: report at bugs.python.org (Tilman Krummeck) Date: Sun, 21 Oct 2018 18:19:33 +0000 Subject: [issue35027] distutils.core.setup does not raise TypeError when if classifiers, keywords and platforms fields are not specified as a list In-Reply-To: <1539963671.26.0.788709270274.issue35027@psf.upfronthosting.co.za> Message-ID: <1540145973.71.0.788709270274.issue35027@psf.upfronthosting.co.za> Change by Tilman Krummeck : ---------- keywords: +patch pull_requests: +9370 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 14:21:40 2018 From: report at bugs.python.org (Tilman Krummeck) Date: Sun, 21 Oct 2018 18:21:40 +0000 Subject: [issue35027] distutils.core.setup does not raise TypeError when if classifiers, keywords and platforms fields are not specified as a list In-Reply-To: <1539963671.26.0.788709270274.issue35027@psf.upfronthosting.co.za> Message-ID: <1540146100.28.0.788709270274.issue35027@psf.upfronthosting.co.za> Tilman Krummeck added the comment: I've submitted the PR just now: https://github.com/python/cpython/pull/10032. The CLA is signed but most probably not processed yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 14:33:39 2018 From: report at bugs.python.org (orlnub123) Date: Sun, 21 Oct 2018 18:33:39 +0000 Subject: [issue34282] Enum._convert shadows members named _convert In-Reply-To: <1532972199.25.0.56676864532.issue34282@psf.upfronthosting.co.za> Message-ID: <1540146819.86.0.788709270274.issue34282@psf.upfronthosting.co.za> Change by orlnub123 : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 16:52:39 2018 From: report at bugs.python.org (Srinivas Reddy Thatiparthy) Date: Sun, 21 Oct 2018 20:52:39 +0000 Subject: [issue35039] remove unused vars in Lib/turtledemo module Message-ID: <1540155159.14.0.788709270274.issue35039@psf.upfronthosting.co.za> Change by Srinivas Reddy Thatiparthy : ---------- components: Library (Lib) nosy: thatiparthy priority: normal severity: normal status: open title: remove unused vars in Lib/turtledemo module versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 16:56:17 2018 From: report at bugs.python.org (Srinivas Reddy Thatiparthy) Date: Sun, 21 Oct 2018 20:56:17 +0000 Subject: [issue35039] remove unused vars in Lib/turtledemo module Message-ID: <1540155377.16.0.788709270274.issue35039@psf.upfronthosting.co.za> Change by Srinivas Reddy Thatiparthy : ---------- keywords: +patch pull_requests: +9371 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 18:06:16 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 21 Oct 2018 22:06:16 +0000 Subject: =?utf-8?q?=5Bissue34963=5D_String_representation_for_types_created_with_t?= =?utf-8?q?yping=2ENewType=28=E2=80=A6=29_are_opaque_and_unappealing?= In-Reply-To: <1539313395.67.0.788709270274.issue34963@psf.upfronthosting.co.za> Message-ID: <1540159576.84.0.788709270274.issue34963@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: OK, so now we have two "competing" PRs. I think I like Serhiy's PR a bit more, since it is simpler. I would propose to look at benchmarks and then decide. Are there any other factors I am missing for choosing one or other approach? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 19:26:40 2018 From: report at bugs.python.org (Julien Palard) Date: Sun, 21 Oct 2018 23:26:40 +0000 Subject: [issue35033] Column or row spanning cells are not implemented. In-Reply-To: <1540052915.48.0.788709270274.issue35033@psf.upfronthosting.co.za> Message-ID: <1540164400.92.0.788709270274.issue35033@psf.upfronthosting.co.za> Julien Palard added the comment: Started implementing a POC sphinx-side so we may not have to "fix" our doc: https://github.com/JulienPalard/sphinx/tree/text-colspan-rowspan ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 19:42:03 2018 From: report at bugs.python.org (Anthony Sottile) Date: Sun, 21 Oct 2018 23:42:03 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540165323.95.0.788709270274.issue33899@psf.upfronthosting.co.za> Anthony Sottile added the comment: I'm surprised this was classified as a bug! Though that's subjective so I get that it's difficult to decide what is and what isn't ?\____(?)____/? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 20:45:22 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 22 Oct 2018 00:45:22 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540169122.51.0.788709270274.issue33899@psf.upfronthosting.co.za> Ned Deily added the comment: Apparently this change also affected IPython. Perhaps we should add an entry to the whatsnew documents for 3.7.1 and 3.7.6: https://docs.python.org/3/whatsnew/3.7.html#notable-changes-in-python-3-7-1 https://docs.python.org/3.6/whatsnew/3.6.html#notable-changes-in-python-3-6-7 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 21:39:51 2018 From: report at bugs.python.org (Liran Nuna) Date: Mon, 22 Oct 2018 01:39:51 +0000 Subject: [issue35040] functools.lru_cache does not work with coroutines Message-ID: <1540172391.19.0.788709270274.issue35040@psf.upfronthosting.co.za> New submission from Liran Nuna : lru_cache is a very useful method but it does not work well with coroutines since they can only be executed once. Take for example, the attached code (test-case.py) - It will throw a RuntimeError because you cannot reuse an already awaited coroutine. A solution would be to call `asyncio.ensure_future` on the result of the coroutine if detected. ---------- components: asyncio files: test-case.py messages: 328228 nosy: Liran Nuna, asvetlov, yselivanov priority: normal severity: normal status: open title: functools.lru_cache does not work with coroutines versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file47887/test-case.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 22:25:11 2018 From: report at bugs.python.org (william.ayd) Date: Mon, 22 Oct 2018 02:25:11 +0000 Subject: [issue35041] urllib.parse.quote safe Parameter Not Optional Message-ID: <1540175111.44.0.788709270274.issue35041@psf.upfronthosting.co.za> New submission from william.ayd : The safe parameter in urllib.parse.quote is documented as optional. However, the following will raise TypeError: 'NoneType' object is not iterable: urllib.parse.quote("/", safe=None) whereas explicitly providing an iterable will allow the function to succeed: urllib.parse.quote("/", safe=[]) ---------- messages: 328229 nosy: william.ayd priority: normal severity: normal status: open title: urllib.parse.quote safe Parameter Not Optional versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 22:37:11 2018 From: report at bugs.python.org (Ammar Askar) Date: Mon, 22 Oct 2018 02:37:11 +0000 Subject: [issue35041] urllib.parse.quote safe Parameter Not Optional In-Reply-To: <1540175111.44.0.788709270274.issue35041@psf.upfronthosting.co.za> Message-ID: <1540175831.09.0.788709270274.issue35041@psf.upfronthosting.co.za> Ammar Askar added the comment: The documentation also goes on to say that its default value is '/'. It is optional in the sense that the function can be called without providing it. It doesn't mean that `None` is somehow a valid type for it. Consider the open function for example: https://docs.python.org/3/library/functions.html#open The documentation says that, "mode is an optional string that specifies the mode in which the file is opened. It defaults to 'r' " This doesn't mean you can just go off and do `open("file.txt", None)` ---------- nosy: +ammar2 resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 22:57:35 2018 From: report at bugs.python.org (william.ayd) Date: Mon, 22 Oct 2018 02:57:35 +0000 Subject: [issue35041] urllib.parse.quote safe Parameter Not Optional In-Reply-To: <1540175111.44.0.788709270274.issue35041@psf.upfronthosting.co.za> Message-ID: <1540177055.76.0.788709270274.issue35041@psf.upfronthosting.co.za> william.ayd added the comment: Semantics aside is it still the intended behavior that these calls should work: urllib.parse.quote("/", safe='') AND urllib.parse.quote("/", safe=[]) But that this should raise? urllib.parse.quote("/", safe=None) IMO seems counterintuitive ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 22:59:48 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 22 Oct 2018 02:59:48 +0000 Subject: [issue35040] functools.lru_cache does not work with coroutines In-Reply-To: <1540172391.19.0.788709270274.issue35040@psf.upfronthosting.co.za> Message-ID: <1540177188.99.0.788709270274.issue35040@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 23:11:36 2018 From: report at bugs.python.org (Ammar Askar) Date: Mon, 22 Oct 2018 03:11:36 +0000 Subject: [issue35041] urllib.parse.quote safe Parameter Not Optional In-Reply-To: <1540175111.44.0.788709270274.issue35041@psf.upfronthosting.co.za> Message-ID: <1540177896.76.0.788709270274.issue35041@psf.upfronthosting.co.za> Ammar Askar added the comment: I would say so since the documentation says: safe parameter specifies additional ASCII characters None isn't really a set of ASCII characters but the empty string and empty list are. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 23:12:21 2018 From: report at bugs.python.org (Srinivas Reddy Thatiparthy) Date: Mon, 22 Oct 2018 03:12:21 +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: <1540177941.32.0.788709270274.issue19217@psf.upfronthosting.co.za> Change by Srinivas Reddy Thatiparthy : ---------- pull_requests: +9372 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 23:21:22 2018 From: report at bugs.python.org (Ammar Askar) Date: Mon, 22 Oct 2018 03:21:22 +0000 Subject: [issue35041] urllib.parse.quote safe Parameter Not Optional In-Reply-To: <1540175111.44.0.788709270274.issue35041@psf.upfronthosting.co.za> Message-ID: <1540178482.18.0.788709270274.issue35041@psf.upfronthosting.co.za> Ammar Askar added the comment: Does rewording that prior part to "safe parameter specifies an iterable of additional ASCII characters" make it less confusing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 23:28:40 2018 From: report at bugs.python.org (william.ayd) Date: Mon, 22 Oct 2018 03:28:40 +0000 Subject: [issue35041] urllib.parse.quote safe Parameter Not Optional In-Reply-To: <1540175111.44.0.788709270274.issue35041@psf.upfronthosting.co.za> Message-ID: <1540178920.86.0.788709270274.issue35041@psf.upfronthosting.co.za> william.ayd added the comment: Hmm well I still personally feel that the implementation is somewhat off mores than the documentation. Specifically I think it is confusing that it accepts an empty iterable but not one containing elements. This is fine: urllib.parse.quote("/", safe=[]) Though this isn't: urllib.parse.quote("/", safe=['/']) Even though the following two calls are fine (though with different return values as expected): urllib.parse.quote("/", safe='') urllib.parse.quote("/", safe='/') It might go against the spirit of duck typing but I find it very nuanced that empty iterables are allowed but if non-empty it must be a string. Would it not make more sense to raise if a non-String type is passed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 21 23:57:54 2018 From: report at bugs.python.org (Ammar Askar) Date: Mon, 22 Oct 2018 03:57:54 +0000 Subject: [issue35041] urllib.parse.quote safe Parameter Not Optional In-Reply-To: <1540175111.44.0.788709270274.issue35041@psf.upfronthosting.co.za> Message-ID: <1540180674.68.0.788709270274.issue35041@psf.upfronthosting.co.za> Ammar Askar added the comment: I agree that urllib.parse.quote("/", safe=['/']) should probably work. It looks like the reason it doesn't is because quote tries to normalize the safe iterable to ASCII characters only. As part of this it attempts to run `< 128` on each element of safe. As part of this it does '/' < 128 and fails. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 00:25:23 2018 From: report at bugs.python.org (william.ayd) Date: Mon, 22 Oct 2018 04:25:23 +0000 Subject: [issue35041] urllib.parse.quote safe Parameter Not Optional In-Reply-To: <1540175111.44.0.788709270274.issue35041@psf.upfronthosting.co.za> Message-ID: <1540182323.77.0.788709270274.issue35041@psf.upfronthosting.co.za> william.ayd added the comment: What if we instead just raised for anything that isn't a string or a byte? The docstring for quote suggests that it should only accept str or byte objects for safe, though it doesn't enforce that: https://github.com/python/cpython/blob/121eb1694cab14df857ba6abe9839654cada15cf/Lib/urllib/parse.py#L791 Seems like it would be easier to enforce that rather than trying to accept any arbitrary iterable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 02:33:07 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 22 Oct 2018 06:33:07 +0000 Subject: [issue35040] functools.lru_cache does not work with coroutines In-Reply-To: <1540172391.19.0.788709270274.issue35040@psf.upfronthosting.co.za> Message-ID: <1540189987.65.0.788709270274.issue35040@psf.upfronthosting.co.za> Andrew Svetlov added the comment: A coroutine detection is a relatively slow check. I don't think we need to do it in `functools.lru_cache`. There is a specialized asyncio compatible version: https://github.com/aio-libs/async_lru Please use it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 02:34:52 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 22 Oct 2018 06:34:52 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540190092.6.0.788709270274.issue33899@psf.upfronthosting.co.za> Tal Einat added the comment: I'm sorry to have caused this mess, it was bad judgement on my part. Adding mention in What's is a good idea, Ned, I'll do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 03:26:52 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 22 Oct 2018 07:26:52 +0000 Subject: [issue34996] Add name to process and thread pool In-Reply-To: <1539686443.16.0.788709270274.issue34996@psf.upfronthosting.co.za> Message-ID: <1540193212.91.0.788709270274.issue34996@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for clarifying the use case. I think it's a good idea with multiple thread pools and below outputs for the program with the PR is more easier to debug than the current code. # ../backups/bpo34720.py from multiprocessing.pool import ThreadPool def f(x): from threading import current_thread print(current_thread().name) return x*x if __name__ == '__main__': p1 = ThreadPool(5, name="process-1") p1.map_async(f, [1, 2, 3]) p1.close() p2 = ThreadPool(5, name="process-2") p2.map_async(f, [1, 2, 3]) p2.close() p1.join() p2.join() # With patch $ ./python.exe ../backups/bpo34720.py process-1-Worker-0 process-1-Worker-1 process-1-Worker-0 process-2-Worker-0 process-2-Worker-1 process-2-Worker-0 # Without patch and removing name parameter $ python3.7 ../backups/bpo34720.py Thread-1 Thread-1 Thread-1 Thread-9 Thread-9 Thread-9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 04:11:03 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 22 Oct 2018 08:11:03 +0000 Subject: [issue35042] Use the role :pep: for the PEP \d+ Message-ID: <1540195863.27.0.788709270274.issue35042@psf.upfronthosting.co.za> New submission from St?phane Wirtel : In the doc, we write PEP XYZ but there is a sphinx role for that, just replace PEP XYZ by :pep:`XYZ` and convert the :PEP: by :pep: ---------- assignee: docs at python components: Documentation messages: 328240 nosy: docs at python, matrixise priority: normal severity: normal status: open title: Use the role :pep: for the PEP \d+ versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 04:21:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Oct 2018 08:21:19 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540196479.33.0.788709270274.issue34576@psf.upfronthosting.co.za> STINNER Victor added the comment: "http.server is meant for demo purposes and does not implement the stringent security checks needed of a real HTTP server. We do not recommend using this module directly in production." I'm not sure about "demo" and "real" in this warning. I propose: "http.server is not recommended for production: it only implements basic security checks." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 05:21:54 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Cardona?=) Date: Mon, 22 Oct 2018 09:21:54 +0000 Subject: [issue34971] add support for tls/ssl sessions in asyncio In-Reply-To: <1539420460.92.0.788709270274.issue34971@psf.upfronthosting.co.za> Message-ID: <1540200114.1.0.788709270274.issue34971@psf.upfronthosting.co.za> R?mi Cardona added the comment: Hi Andrew, How should I proceed? What's the best avenue to get in touch with Yuri? Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 05:47:52 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 22 Oct 2018 09:47:52 +0000 Subject: [issue35042] Use the role :pep: for the PEP \d+ In-Reply-To: <1540195863.27.0.788709270274.issue35042@psf.upfronthosting.co.za> Message-ID: <1540201672.71.0.788709270274.issue35042@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +9374 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 06:06:35 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Oct 2018 10:06:35 +0000 Subject: [issue34971] add support for tls/ssl sessions in asyncio In-Reply-To: <1539420460.92.0.788709270274.issue34971@psf.upfronthosting.co.za> Message-ID: <1540202794.99.0.788709270274.issue34971@psf.upfronthosting.co.za> Christian Heimes added the comment: Don't use the existing session feature, yet. It only works for TLS 1.2 connections. TLS 1.3 behaves differently. There are multiple session tickets (usually two) and tickets are sent after handshake. Further more, Python lacks clear shutdown of a connection, which causes further problems with session handling. See https://www.openssl.org/docs/manmaster/man3/SSL_get_session.html ---------- nosy: +christian.heimes versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 06:52:03 2018 From: report at bugs.python.org (beautifuljose) Date: Mon, 22 Oct 2018 10:52:03 +0000 Subject: [issue28960] Small typo in Thread.join docs In-Reply-To: <1481636284.79.0.913462681395.issue28960@psf.upfronthosting.co.za> Message-ID: <1540205523.31.0.788709270274.issue28960@psf.upfronthosting.co.za> beautifuljose added the comment: I think both dash and comma should be removed Found a similar problem here: https://www.paperhelp.org/essay/buy-argumentative-essay.html ---------- nosy: +beautifuljose _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 07:38:00 2018 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Mon, 22 Oct 2018 11:38:00 +0000 Subject: [issue35042] Use the role :pep: for the PEP \d+ In-Reply-To: <1540195863.27.0.788709270274.issue35042@psf.upfronthosting.co.za> Message-ID: <1540208280.85.0.788709270274.issue35042@psf.upfronthosting.co.za> Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) added the comment: This gives us the hyperlink everywhere a PEP is referenced? ---------- nosy: +thatiparthy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 07:47:27 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 22 Oct 2018 11:47:27 +0000 Subject: [issue35042] Use the role :pep: for the PEP \d+ In-Reply-To: <1540195863.27.0.788709270274.issue35042@psf.upfronthosting.co.za> Message-ID: <1540208847.12.0.788709270274.issue35042@psf.upfronthosting.co.za> St?phane Wirtel added the comment: sure, it's the default behavior of this role, I have a PR with the fix, but Github has a big issue with the PRs :/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 07:49:59 2018 From: report at bugs.python.org (Vasantha Ganesh Kanniappan) Date: Mon, 22 Oct 2018 11:49:59 +0000 Subject: [issue35043] functools.reduce doesn't work properly with itertools.chain Message-ID: <1540208998.92.0.788709270274.issue35043@psf.upfronthosting.co.za> New submission from Vasantha Ganesh Kanniappan : I'm facing this issue in python 3.6.5 How to reproduce: my_list = [[1, 2], [3, 4]] a = reduce(itertools.chain, my_list) The output of `a' is [1, 2, 3, 4] as expected, but now my_list is [[1, 2, 3, 4], [3, 4]] ---------- components: Library (Lib) messages: 328248 nosy: Vasantha Ganesh Kanniappan priority: normal severity: normal status: open title: functools.reduce doesn't work properly with itertools.chain type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 08:07:50 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 22 Oct 2018 12:07:50 +0000 Subject: [issue35044] Use the :exc: role for the exceptions in the doc Message-ID: <1540210070.18.0.788709270274.issue35044@psf.upfronthosting.co.za> New submission from St?phane Wirtel : In the doc, there is some locations where we do not use the :exc: role for the exceptions, I try to fix that with this PR. ---------- assignee: docs at python components: Documentation messages: 328249 nosy: docs at python, matrixise priority: normal severity: normal status: open title: Use the :exc: role for the exceptions in the doc versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 08:13:57 2018 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Mon, 22 Oct 2018 12:13:57 +0000 Subject: [issue35039] remove unused vars in Lib/turtledemo module Message-ID: <1540210437.89.0.788709270274.issue35039@psf.upfronthosting.co.za> New submission from Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : This PR removes the variables which are no longer used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 08:47:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2018 12:47:52 +0000 Subject: [issue35042] Use the role :pep: for the PEP \d+ In-Reply-To: <1540195863.27.0.788709270274.issue35042@psf.upfronthosting.co.za> Message-ID: <1540212472.47.0.788709270274.issue35042@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is wrong with the current code? Why replace :PEP: with :pep:? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 08:54:19 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 22 Oct 2018 12:54:19 +0000 Subject: [issue35042] Use the role :pep: for the PEP \d+ In-Reply-To: <1540195863.27.0.788709270274.issue35042@psf.upfronthosting.co.za> Message-ID: <1540212859.66.0.788709270274.issue35042@psf.upfronthosting.co.za> St?phane Wirtel added the comment: in fact, in the doc of Sphinx, it's just :pep: and not :PEP: see http://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html?highlight=%3Apep%3A#role-pep in this case, I think it's better to use the "reference" and use pep in lowercase. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 09:33:06 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 22 Oct 2018 13:33:06 +0000 Subject: [issue35027] distutils.core.setup does not raise TypeError when if classifiers, keywords and platforms fields are not specified as a list In-Reply-To: <1539963671.26.0.788709270274.issue35027@psf.upfronthosting.co.za> Message-ID: <1540215186.91.0.788709270274.issue35027@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 09:42:21 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Oct 2018 13:42:21 +0000 Subject: [issue32890] os: Some functions may report bogus errors on Windows In-Reply-To: <1519170856.46.0.467229070634.issue32890@psf.upfronthosting.co.za> Message-ID: <1540215741.71.0.788709270274.issue32890@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- versions: +Python 2.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 10:06:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Oct 2018 14:06:48 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute In-Reply-To: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> Message-ID: <1540217208.2.0.788709270274.issue29843@psf.upfronthosting.co.za> STINNER Victor added the comment: > Should this be back-ported to 3.7 and 3.6? 2.7? IMHO it's a bad idea to introduce a *new* exception in stable version. I suggest to only modify the master branch. ---------- nosy: +vstinner versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 10:12:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2018 14:12:11 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute In-Reply-To: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> Message-ID: <1540217531.2.0.788709270274.issue29843@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This change is big enough now. I think it is better to not backport it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 10:30:27 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 22 Oct 2018 14:30:27 +0000 Subject: [issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1 Message-ID: <1540218627.92.0.788709270274.issue35045@psf.upfronthosting.co.za> New submission from Charalampos Stratakis : There is an Python test that checks the minimum TLS version - test_min_max_version (test.test_ssl.ContextTests). Fedora 29+ sets TLSv1 as explicit minimum version. Python's test suite assumes that the minimum protocol version is set to a magic marker. FAIL: test_min_max_version (test.test_ssl.ContextTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.7.0/Lib/test/test_ssl.py", line 1084, in test_min_max_version ctx.minimum_version, ssl.TLSVersion.MINIMUM_SUPPORTED AssertionError: != We currently workaround the problem by setting: export OPENSSL_CONF=/non-existing-file ---------- assignee: christian.heimes components: SSL messages: 328255 nosy: christian.heimes, cstratak priority: normal severity: normal status: open title: test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1 versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 10:46:14 2018 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Mon, 22 Oct 2018 14:46:14 +0000 Subject: [issue35042] Use the role :pep: for the PEP \d+ In-Reply-To: <1540195863.27.0.788709270274.issue35042@psf.upfronthosting.co.za> Message-ID: <1540219574.26.0.788709270274.issue35042@psf.upfronthosting.co.za> Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) added the comment: I am -0 on this. I want to hear a more compelling argument than wanting to leverage an existing feature. IMHO, when i am reading the documentation i never bothered to go into the PEP docs - most of the times. I explicitly visited a PEP when i want to understand the rationale of a feature. My 2 cents. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 10:50:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Oct 2018 14:50:44 +0000 Subject: [issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1 In-Reply-To: <1540218627.92.0.788709270274.issue35045@psf.upfronthosting.co.za> Message-ID: <1540219844.7.0.788709270274.issue35045@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 10:53:58 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 22 Oct 2018 14:53:58 +0000 Subject: [issue35042] Use the role :pep: for the PEP \d+ In-Reply-To: <1540195863.27.0.788709270274.issue35042@psf.upfronthosting.co.za> Message-ID: <1540220038.81.0.788709270274.issue35042@psf.upfronthosting.co.za> St?phane Wirtel added the comment: @thatiparthy When you start to contribute to Python, and you see there is a PEP in the doc. 1. What's a PEP? 2. Where can I find the PEP XYZ? 3. Am I on the right website for the PEP? if you don't know the concept of the PEPs, you will check with your favorite search engine because you are a developer. This is not the case for everybody. For a newcomer/beginner, read the right information just with a click, it's just the founding principles of the Web. create a link is not a real problem for a computer and for the end-user will be happy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 10:57:58 2018 From: report at bugs.python.org (Julien Palard) Date: Mon, 22 Oct 2018 14:57:58 +0000 Subject: [issue35042] Use the role :pep: for the PEP \d+ In-Reply-To: <1540195863.27.0.788709270274.issue35042@psf.upfronthosting.co.za> Message-ID: <1540220278.48.0.788709270274.issue35042@psf.upfronthosting.co.za> Julien Palard added the comment: When mentionning a PEP I see no reason not to point to it, and as it's easy to do with the pep role, I'm +1 on this. ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 11:02:15 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 22 Oct 2018 15:02:15 +0000 Subject: [issue34980] KillPython target doesn't detect 64-bit processes In-Reply-To: <1539501986.24.0.788709270274.issue34980@psf.upfronthosting.co.za> Message-ID: <1540220535.56.0.788709270274.issue34980@psf.upfronthosting.co.za> Jeremy Kloth added the comment: It seems my buildbot has a stuck process again. The "sticking" occurred in this case due to test_concurrent_futures being hung (for over 38hrs! which is a different issue) and a DSL link reset at the same time. So now, all builds on the master branch fail because the compile step fails due to process in use error. I've submitted a PR implementing Eryk Sun's idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 11:09:41 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 22 Oct 2018 15:09:41 +0000 Subject: [issue34980] KillPython target doesn't detect 64-bit processes In-Reply-To: <1539501986.24.0.788709270274.issue34980@psf.upfronthosting.co.za> Message-ID: <1540220981.67.0.788709270274.issue34980@psf.upfronthosting.co.za> Steve Dower added the comment: Sorry for missing the PR. One little tweak for consistency, but otherwise it looks fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 11:35:28 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 22 Oct 2018 15:35:28 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute In-Reply-To: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> Message-ID: <1540222528.7.0.788709270274.issue29843@psf.upfronthosting.co.za> Tal Einat added the comment: Thanks for all of your work on this Oren! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 11:53:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Oct 2018 15:53:39 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute In-Reply-To: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> Message-ID: <1540223619.24.0.788709270274.issue29843@psf.upfronthosting.co.za> STINNER Victor added the comment: ( https://github.com/python/cpython/pull/10029 has been merged, but GitHub webhooks are paused and so no notification has been sent to this bug yet. ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 11:55:36 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 22 Oct 2018 15:55:36 +0000 Subject: [issue34551] Redundant store can be removed from _PyFunction_FastCallDict In-Reply-To: <1535650041.35.0.56676864532.issue34551@psf.upfronthosting.co.za> Message-ID: <1540223736.65.0.788709270274.issue34551@psf.upfronthosting.co.za> Change by ?ukasz Langa : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 12:14:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Oct 2018 16:14:13 +0000 Subject: [issue34454] datetime: NULL dereference in fromisoformat() on PyUnicode_AsUTF8AndSize() failure In-Reply-To: <1534887509.78.0.56676864532.issue34454@psf.upfronthosting.co.za> Message-ID: <1540224853.94.0.788709270274.issue34454@psf.upfronthosting.co.za> STINNER Victor added the comment: I reopen the issue since there are still 2 open PRs: PR 8878 and PR 8959. ---------- nosy: +vstinner resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 12:21:35 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Mon, 22 Oct 2018 16:21:35 +0000 Subject: [issue35043] functools.reduce doesn't work properly with itertools.chain In-Reply-To: <1540208998.92.0.788709270274.issue35043@psf.upfronthosting.co.za> Message-ID: <1540225295.16.0.788709270274.issue35043@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Your example code doesn't behave the way you claim. my_list isn't changed, and `a` is a chain generator, not a list (without a further list wrapping). In any event, there is no reason to involve reduce here. chain already handles varargs what you're trying to do without involving reduce at all: a = list(itertools.chain(*my_list)) or if you prefer to avoid unnecessary unpacking: a = list(itertools.chain.from_iterable(*my_list)) Either way, a will be [1, 2, 3, 4], and my_list will be unchanged, with no wasteful use of reduce. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 13:29:14 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Mon, 22 Oct 2018 17:29:14 +0000 Subject: [issue32890] os: Some functions may report bogus errors on Windows In-Reply-To: <1519170856.46.0.467229070634.issue32890@psf.upfronthosting.co.za> Message-ID: <1540229354.3.0.788709270274.issue32890@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: Python 2.7 doesn't have the same issue. In os.execve(), posix_error() is used, but it is based on errno, which is correct. (A funny bit is that os.execve('', ['a'], {}) crashes in 2.7, probably because of some checks in CRT). And os.truncate() is not implemented in 2.7 at all. ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 13:33:08 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Oct 2018 17:33:08 +0000 Subject: [issue35043] functools.reduce doesn't work properly with itertools.chain In-Reply-To: <1540208998.92.0.788709270274.issue35043@psf.upfronthosting.co.za> Message-ID: <1540229588.05.0.788709270274.issue35043@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 13:34:00 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 22 Oct 2018 17:34:00 +0000 Subject: [issue35042] Use the role :pep: for the PEP \d+ In-Reply-To: <1540195863.27.0.788709270274.issue35042@psf.upfronthosting.co.za> Message-ID: <1540229640.14.0.788709270274.issue35042@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: If I am understanding this correctly the :pep: role is already present and only that PEP references that don't have this role are being updated now? ? cpython git:(master) rg ':pep:`\d+`' | grep 'rst' | grep -Ev 'NEWS|whatsnew' | wc 324 2686 27228 References that don't have the role are being updated along with :PEP: changed to :pep: in the PR? (Around 30 entries) ? cpython git:(master) rg 'PEP \d+' | grep 'rst' | grep -Ev 'NEWS|whatsnew' | wc 21 228 1891 ? cpython git:(master) rg ':PEP:`\d+`' | grep 'rst' | grep -Ev 'NEWS|whatsnew' | wc 6 51 517 I think older NEWS entries can be left behind like the PR changes whatsnew for Python 2.0, 2.1, 2.5 and they won't be back ported I personally feel little value in changing them though doc changes have been done on those files in 2016 and up to the reviewer. Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 14:09:26 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 22 Oct 2018 18:09:26 +0000 Subject: [issue33695] Have shutil.copytree(), copy() and copystat() use cached scandir() stat()s In-Reply-To: <1527682955.69.0.682650639539.issue33695@psf.upfronthosting.co.za> Message-ID: <1540231766.09.0.788709270274.issue33695@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: @Serhiy: I would like to proceed with this. Do you have further comments? Do you prefer to bring this up on python-dev for further discussion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 14:24:59 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 22 Oct 2018 18:24:59 +0000 Subject: [issue35004] Odd behavior when using datetime.timedelta under cProfile In-Reply-To: <1539729063.07.0.788709270274.issue35004@psf.upfronthosting.co.za> Message-ID: <1540232699.9.0.788709270274.issue35004@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks Anthony for the details. This was fixed in master and back ported to 3.7. The fix is also released with 3.7.1 [0] which I have verified locally. So I propose closing this issue since upgrading to the latest maintenance release fixes this. [0] https://www.python.org/downloads/release/python-371/ Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 14:36:18 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 22 Oct 2018 18:36:18 +0000 Subject: [issue35044] Use the :exc: role for the exceptions in the doc In-Reply-To: <1540210070.18.0.788709270274.issue35044@psf.upfronthosting.co.za> Message-ID: <1540233378.79.0.788709270274.issue35044@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +9375 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 14:51:21 2018 From: report at bugs.python.org (Josh Snyder) Date: Mon, 22 Oct 2018 18:51:21 +0000 Subject: [issue35046] logging.StreamHandler performs two syscalls when one would do Message-ID: <1540234281.84.0.788709270274.issue35046@psf.upfronthosting.co.za> New submission from Josh Snyder : logging.StreamHandler contains the following code: stream.write(msg) stream.write(self.terminator) stream.flush() When sys.stderr (or whatever other stream) is unbuffered, this results in two system calls and allows log records from different processes to concatenate on the same line in the output stream (followed by multiple newlines). This issue is new in Python 3.7, as stdout and stderr became "truly unbuffered" (cf. #30404). As a simple solution, I believe the following would fix the issue and also be backward compatible: stream.write(msg + self.terminator) stream.flush() ---------- messages: 328269 nosy: josnyder priority: normal severity: normal status: open title: logging.StreamHandler performs two syscalls when one would do type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 14:57:00 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 22 Oct 2018 18:57:00 +0000 Subject: [issue35046] logging.StreamHandler performs two syscalls when one would do In-Reply-To: <1540234281.84.0.788709270274.issue35046@psf.upfronthosting.co.za> Message-ID: <1540234620.53.0.788709270274.issue35046@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 15:22:07 2018 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 22 Oct 2018 19:22:07 +0000 Subject: [issue35004] Odd behavior when using datetime.timedelta under cProfile In-Reply-To: <1539729063.07.0.788709270274.issue35004@psf.upfronthosting.co.za> Message-ID: <1540236127.09.0.788709270274.issue35004@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 15:22:18 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 22 Oct 2018 19:22:18 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute In-Reply-To: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> Message-ID: <1540236138.57.0.788709270274.issue29843@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 2447773573e74819e163f8963ab107bc5db123e5 by Tal Einat in branch 'master': bpo-29843: raise AttributeError if given negative _length_ (GH-10029) https://github.com/python/cpython/commit/2447773573e74819e163f8963ab107bc5db123e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 15:26:54 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 22 Oct 2018 19:26:54 +0000 Subject: [issue34856] Make the repr of lambda contain signature and body expression. In-Reply-To: <1538331263.14.0.545547206417.issue34856@psf.upfronthosting.co.za> Message-ID: <1540236414.1.0.788709270274.issue34856@psf.upfronthosting.co.za> Terry J. Reedy added the comment: My understanding of the current code is that in the example above, f.__name__ would be "". 1. I believe this would make the representation < at 0x........> unless functions gain a custom __repr__ method that strips the brackets off the name when present. I don't really like the alternative of leaving the brackets off the name. 2. My proposal is to limit the length of the .__name__ attribute. This not only limits the repr but also the function name part of traceback lines. I consider the latter more important as I personally see function names in tracebacks far more often than in representations. Long function names wrapped to several lines would in my opinion negatively affect tracebacks. Large collections do not affect tracebacks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 15:37:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Oct 2018 19:37:26 +0000 Subject: [issue34454] datetime: NULL dereference in fromisoformat() on PyUnicode_AsUTF8AndSize() failure In-Reply-To: <1534887509.78.0.56676864532.issue34454@psf.upfronthosting.co.za> Message-ID: <1540237046.97.0.788709270274.issue34454@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3df85404d4bf420db3362eeae1345f2cad948a71 by Victor Stinner (Paul Ganssle) in branch 'master': bpo-34454: Clean up datetime.fromisoformat surrogate handling (GH-8959) https://github.com/python/cpython/commit/3df85404d4bf420db3362eeae1345f2cad948a71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 15:54:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2018 19:54:58 +0000 Subject: [issue35021] Assertion failures in datetimemodule.c. In-Reply-To: <1539884234.35.0.788709270274.issue35021@psf.upfronthosting.co.za> Message-ID: <1540238098.24.0.788709270274.issue35021@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9376 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 15:54:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2018 19:54:58 +0000 Subject: [issue31752] Assertion failure in timedelta() in case of bad __divmod__ In-Reply-To: <1507670968.8.0.213398074469.issue31752@psf.upfronthosting.co.za> Message-ID: <1540238098.34.0.663665092547.issue31752@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9377 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 16:09:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2018 20:09:05 +0000 Subject: [issue35021] Assertion failures in datetimemodule.c. In-Reply-To: <1539884234.35.0.788709270274.issue35021@psf.upfronthosting.co.za> Message-ID: <1540238945.34.0.788709270274.issue35021@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9378 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 16:09:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Oct 2018 20:09:05 +0000 Subject: [issue31752] Assertion failure in timedelta() in case of bad __divmod__ In-Reply-To: <1507670968.8.0.213398074469.issue31752@psf.upfronthosting.co.za> Message-ID: <1540238945.46.0.663665092547.issue31752@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9379 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 16:13:19 2018 From: report at bugs.python.org (Martin Panter) Date: Mon, 22 Oct 2018 20:13:19 +0000 Subject: [issue28960] Small typo in Thread.join docs In-Reply-To: <1481636284.79.0.913462681395.issue28960@psf.upfronthosting.co.za> Message-ID: <1540239199.21.0.788709270274.issue28960@psf.upfronthosting.co.za> Change by Martin Panter : ---------- Removed message: https://bugs.python.org/msg328245 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 16:45:42 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Oct 2018 20:45:42 +0000 Subject: [issue34454] datetime: NULL dereference in fromisoformat() on PyUnicode_AsUTF8AndSize() failure In-Reply-To: <1534887509.78.0.56676864532.issue34454@psf.upfronthosting.co.za> Message-ID: <1540241142.47.0.788709270274.issue34454@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9380 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 16:52:09 2018 From: report at bugs.python.org (Josh Snyder) Date: Mon, 22 Oct 2018 20:52:09 +0000 Subject: [issue35046] logging.StreamHandler performs two syscalls when one would do In-Reply-To: <1540234281.84.0.788709270274.issue35046@psf.upfronthosting.co.za> Message-ID: <1540241529.71.0.788709270274.issue35046@psf.upfronthosting.co.za> Change by Josh Snyder : ---------- keywords: +patch pull_requests: +9381 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 16:54:13 2018 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 22 Oct 2018 20:54:13 +0000 Subject: [issue35046] logging.StreamHandler performs two syscalls when one would do In-Reply-To: <1540234281.84.0.788709270274.issue35046@psf.upfronthosting.co.za> Message-ID: <1540241653.83.0.788709270274.issue35046@psf.upfronthosting.co.za> Change by Vinay Sajip : ---------- pull_requests: +9382 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 16:55:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Oct 2018 20:55:02 +0000 Subject: [issue34912] Update overflow checks in resize_buffer In-Reply-To: <1538803916.84.0.545547206417.issue34912@psf.upfronthosting.co.za> Message-ID: <1540241702.03.0.788709270274.issue34912@psf.upfronthosting.co.za> STINNER Victor added the comment: The current code LGTM. ---------- nosy: +vstinner resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 16:59:05 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Mon, 22 Oct 2018 20:59:05 +0000 Subject: [issue35039] remove unused vars in Lib/turtledemo module In-Reply-To: <1540210437.89.0.788709270274.issue35039@psf.upfronthosting.co.za> Message-ID: <1540241945.03.0.788709270274.issue35039@psf.upfronthosting.co.za> Change by Emmanuel Arias : ---------- pull_requests: +9383 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 17:38:04 2018 From: report at bugs.python.org (Brett Cannon) Date: Mon, 22 Oct 2018 21:38:04 +0000 Subject: [issue35040] [functools] provide an async-compatible version of functools.lru_cache In-Reply-To: <1540172391.19.0.788709270274.issue35040@psf.upfronthosting.co.za> Message-ID: <1540244284.41.0.788709270274.issue35040@psf.upfronthosting.co.za> Brett Cannon added the comment: Making this a feature request. ---------- nosy: +brett.cannon title: functools.lru_cache does not work with coroutines -> [functools] provide an async-compatible version of functools.lru_cache type: -> enhancement versions: -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 17:40:50 2018 From: report at bugs.python.org (Julien Palard) Date: Mon, 22 Oct 2018 21:40:50 +0000 Subject: [issue35033] Column or row spanning cells are not implemented. In-Reply-To: <1540052915.48.0.788709270274.issue35033@psf.upfronthosting.co.za> Message-ID: <1540244450.39.0.788709270274.issue35033@psf.upfronthosting.co.za> Julien Palard added the comment: POC is now a PR: https://github.com/sphinx-doc/sphinx/pull/5559 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 18:00:19 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 22 Oct 2018 22:00:19 +0000 Subject: [issue34901] Missing isolated (-I) flag in sys.flags table In-Reply-To: <1538718824.99.0.545547206417.issue34901@psf.upfronthosting.co.za> Message-ID: <1540245619.31.0.788709270274.issue34901@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset da7d7d0ccc2e7cab62080e146cab027f2aa6fd03 by Ned Deily (danishprakash) in branch '3.6': [3.6] bpo-34901: add -I flag to sys.flags (GH-9755) https://github.com/python/cpython/commit/da7d7d0ccc2e7cab62080e146cab027f2aa6fd03 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 18:01:57 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 22 Oct 2018 22:01:57 +0000 Subject: [issue34901] Missing isolated (-I) flag in sys.flags table In-Reply-To: <1538718824.99.0.545547206417.issue34901@psf.upfronthosting.co.za> Message-ID: <1540245717.17.0.788709270274.issue34901@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks, Danish and everyone else! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 22 18:35:20 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Oct 2018 22:35:20 +0000 Subject: [issue34454] datetime: NULL dereference in fromisoformat() on PyUnicode_AsUTF8AndSize() failure In-Reply-To: <1534887509.78.0.56676864532.issue34454@psf.upfronthosting.co.za> Message-ID: <1540247720.96.0.788709270274.issue34454@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 18450be94d74b5c7e05a08f4aaa4792749ecda18 by Miss Islington (bot) in branch '3.7': bpo-34454: Clean up datetime.fromisoformat surrogate handling (GH-8959) https://github.com/python/cpython/commit/18450be94d74b5c7e05a08f4aaa4792749ecda18 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 02:11:25 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 23 Oct 2018 06:11:25 +0000 Subject: [issue34748] Incorrect HTML link in functools.partial In-Reply-To: <1537442713.28.0.956365154283.issue34748@psf.upfronthosting.co.za> Message-ID: <1540275085.76.0.788709270274.issue34748@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 83a07652e0033f0d9994ae7634b91d6581c56b00 by Xiang Zhang (Andrei Petre) in branch 'master': bpo-34748: link to :ref:`partial-objects` in functools.partial doc. (GH-9809) https://github.com/python/cpython/commit/83a07652e0033f0d9994ae7634b91d6581c56b00 ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 02:11:39 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 06:11:39 +0000 Subject: [issue34748] Incorrect HTML link in functools.partial In-Reply-To: <1537442713.28.0.956365154283.issue34748@psf.upfronthosting.co.za> Message-ID: <1540275099.44.0.788709270274.issue34748@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9384 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 02:11:49 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 06:11:49 +0000 Subject: [issue34748] Incorrect HTML link in functools.partial In-Reply-To: <1537442713.28.0.956365154283.issue34748@psf.upfronthosting.co.za> Message-ID: <1540275109.02.0.788709270274.issue34748@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9385 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 02:16:47 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 06:16:47 +0000 Subject: [issue34748] Incorrect HTML link in functools.partial In-Reply-To: <1537442713.28.0.956365154283.issue34748@psf.upfronthosting.co.za> Message-ID: <1540275407.37.0.788709270274.issue34748@psf.upfronthosting.co.za> miss-islington added the comment: New changeset fc62c7223ed1ecd422e870cf7bfc23060444450a by Miss Islington (bot) in branch '3.7': bpo-34748: link to :ref:`partial-objects` in functools.partial doc. (GH-9809) https://github.com/python/cpython/commit/fc62c7223ed1ecd422e870cf7bfc23060444450a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 02:16:55 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 06:16:55 +0000 Subject: [issue34748] Incorrect HTML link in functools.partial In-Reply-To: <1537442713.28.0.956365154283.issue34748@psf.upfronthosting.co.za> Message-ID: <1540275415.09.0.788709270274.issue34748@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 42892a2a38bb97c41e7b1b154e2b5b6f13d27b57 by Miss Islington (bot) in branch '3.6': bpo-34748: link to :ref:`partial-objects` in functools.partial doc. (GH-9809) https://github.com/python/cpython/commit/42892a2a38bb97c41e7b1b154e2b5b6f13d27b57 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 02:17:44 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 23 Oct 2018 06:17:44 +0000 Subject: [issue34748] Incorrect HTML link in functools.partial In-Reply-To: <1537442713.28.0.956365154283.issue34748@psf.upfronthosting.co.za> Message-ID: <1540275464.62.0.788709270274.issue34748@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- pull_requests: +9386 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 02:36:12 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 23 Oct 2018 06:36:12 +0000 Subject: [issue34482] datetime: Tests for potential crashes due to non-UTF-8-encodable strings In-Reply-To: <1535046110.83.0.56676864532.issue34482@psf.upfronthosting.co.za> Message-ID: <1540276572.23.0.788709270274.issue34482@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 3b0047d8e982b10b34ab05fd207b7d513cc1188a by Tal Einat (Alexey Izbyshev) in branch 'master': bpo-34482: test datetime classes' handling of non-UTF-8-encodable strings (GH-8878) https://github.com/python/cpython/commit/3b0047d8e982b10b34ab05fd207b7d513cc1188a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 02:36:21 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 06:36:21 +0000 Subject: [issue34482] datetime: Tests for potential crashes due to non-UTF-8-encodable strings In-Reply-To: <1535046110.83.0.56676864532.issue34482@psf.upfronthosting.co.za> Message-ID: <1540276581.34.0.788709270274.issue34482@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9387 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 02:42:04 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 23 Oct 2018 06:42:04 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540276924.86.0.788709270274.issue33899@psf.upfronthosting.co.za> Tal Einat added the comment: Ned, should this also be added to the 2.7 What's New? Or perhaps reverted on the 2.7 branch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 02:43:14 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 23 Oct 2018 06:43:14 +0000 Subject: [issue34748] Incorrect HTML link in functools.partial In-Reply-To: <1537442713.28.0.956365154283.issue34748@psf.upfronthosting.co.za> Message-ID: <1540276994.12.0.788709270274.issue34748@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 56a4a3aa555b3abc756cf837eddac4c0bf545db7 by Xiang Zhang in branch '2.7': [2.7] bpo-34748: link to :ref:`partial-objects` in functools.partial doc. (GH-9809) https://github.com/python/cpython/commit/56a4a3aa555b3abc756cf837eddac4c0bf545db7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 02:47:18 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 23 Oct 2018 06:47:18 +0000 Subject: [issue34748] Incorrect HTML link in functools.partial In-Reply-To: <1537442713.28.0.956365154283.issue34748@psf.upfronthosting.co.za> Message-ID: <1540277238.97.0.788709270274.issue34748@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks all. :-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 02:48:42 2018 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 23 Oct 2018 06:48:42 +0000 Subject: [issue35046] logging.StreamHandler performs two syscalls when one would do In-Reply-To: <1540234281.84.0.788709270274.issue35046@psf.upfronthosting.co.za> Message-ID: <1540277322.66.0.788709270274.issue35046@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset b7d62050e7d5fc208ae7673613da4f1f2bc565c4 by Vinay Sajip (Josh Snyder) in branch 'master': bpo-35046: do only one system call per line (logging.StreamHandler) (GH-10042) https://github.com/python/cpython/commit/b7d62050e7d5fc208ae7673613da4f1f2bc565c4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 02:48:50 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 06:48:50 +0000 Subject: [issue35046] logging.StreamHandler performs two syscalls when one would do In-Reply-To: <1540234281.84.0.788709270274.issue35046@psf.upfronthosting.co.za> Message-ID: <1540277330.08.0.788709270274.issue35046@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9388 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 03:02:23 2018 From: report at bugs.python.org (Vasantha Ganesh Kanniappan) Date: Tue, 23 Oct 2018 07:02:23 +0000 Subject: [issue35043] functools.reduce doesn't work properly with itertools.chain In-Reply-To: <1540208998.92.0.788709270274.issue35043@psf.upfronthosting.co.za> Message-ID: <1540278143.01.0.788709270274.issue35043@psf.upfronthosting.co.za> Vasantha Ganesh Kanniappan added the comment: You are right. It works now. I'm sorry for wasting your time. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 03:04:27 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 07:04:27 +0000 Subject: [issue34482] datetime: Tests for potential crashes due to non-UTF-8-encodable strings In-Reply-To: <1535046110.83.0.56676864532.issue34482@psf.upfronthosting.co.za> Message-ID: <1540278267.98.0.788709270274.issue34482@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 313e5015d258778737bff766a8ccf997a0cc20c7 by Miss Islington (bot) in branch '3.7': bpo-34482: test datetime classes' handling of non-UTF-8-encodable strings (GH-8878) https://github.com/python/cpython/commit/313e5015d258778737bff766a8ccf997a0cc20c7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 03:06:16 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 23 Oct 2018 07:06:16 +0000 Subject: [issue34482] datetime: Tests for potential crashes due to non-UTF-8-encodable strings In-Reply-To: <1535046110.83.0.56676864532.issue34482@psf.upfronthosting.co.za> Message-ID: <1540278376.57.0.788709270274.issue34482@psf.upfronthosting.co.za> Tal Einat added the comment: Thanks for the PR, Alexey! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 03:06:56 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 23 Oct 2018 07:06:56 +0000 Subject: [issue34454] datetime: NULL dereference in fromisoformat() on PyUnicode_AsUTF8AndSize() failure In-Reply-To: <1534887509.78.0.56676864532.issue34454@psf.upfronthosting.co.za> Message-ID: <1540278416.55.0.788709270274.issue34454@psf.upfronthosting.co.za> Change by Tal Einat : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 03:11:33 2018 From: report at bugs.python.org (hongweipeng) Date: Tue, 23 Oct 2018 07:11:33 +0000 Subject: [issue31553] Extend json.tool to handle jsonlines (with a flag) In-Reply-To: <1506098466.58.0.224432895447.issue31553@psf.upfronthosting.co.za> Message-ID: <1540278693.22.0.788709270274.issue31553@psf.upfronthosting.co.za> Change by hongweipeng : ---------- pull_requests: +9389 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 03:23:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2018 07:23:41 +0000 Subject: [issue31553] Extend json.tool to handle jsonlines (with a flag) In-Reply-To: <1506098466.58.0.224432895447.issue31553@psf.upfronthosting.co.za> Message-ID: <1540279421.85.0.788709270274.issue31553@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The output is not a valid JSON format, and is not a valid JSON Lines format. What you are going to do with it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 04:14:42 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 08:14:42 +0000 Subject: [issue35028] Off by one error in cgi.FieldStorage(max_num_fields) In-Reply-To: <1539974216.92.0.788709270274.issue35028@psf.upfronthosting.co.za> Message-ID: <1540282482.94.0.788709270274.issue35028@psf.upfronthosting.co.za> miss-islington added the comment: New changeset b79b5c09493e98374e48fa122d82dab528fc6e72 by Miss Islington (bot) (matthewbelisle-wf) in branch 'master': bpo-35028: cgi: Fix max_num_fields off by one error (GH-9973) https://github.com/python/cpython/commit/b79b5c09493e98374e48fa122d82dab528fc6e72 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 04:14:47 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 08:14:47 +0000 Subject: [issue35028] Off by one error in cgi.FieldStorage(max_num_fields) In-Reply-To: <1539974216.92.0.788709270274.issue35028@psf.upfronthosting.co.za> Message-ID: <1540282487.01.0.788709270274.issue35028@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9390 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 04:14:56 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 08:14:56 +0000 Subject: [issue35028] Off by one error in cgi.FieldStorage(max_num_fields) In-Reply-To: <1539974216.92.0.788709270274.issue35028@psf.upfronthosting.co.za> Message-ID: <1540282496.3.0.788709270274.issue35028@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9391 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 04:35:36 2018 From: report at bugs.python.org (Petter S) Date: Tue, 23 Oct 2018 08:35:36 +0000 Subject: [issue35047] Better error messages un unittest.mock Message-ID: <1540283736.06.0.788709270274.issue35047@psf.upfronthosting.co.za> New submission from Petter S : When developing unit tests with `unittest.mock`, it is common to see error messages like this: AssertionError: Expected 'info' to not have been called. Called 3 times. It would be really helpful if those 3 calls were listed in the assertion error. I am happy to add this if people agree it is a good thing. ---------- components: Library (Lib) messages: 328292 nosy: Petter S priority: normal severity: normal status: open title: Better error messages un unittest.mock versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 05:06:11 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 23 Oct 2018 09:06:11 +0000 Subject: [issue31722] _io.IncrementalNewlineDecoder doesn't inherit codecs.IncrementalDecoder In-Reply-To: <1507386401.5.0.213398074469.issue31722@psf.upfronthosting.co.za> Message-ID: <1540285571.55.0.788709270274.issue31722@psf.upfronthosting.co.za> Xiang Zhang added the comment: Just find the same problem while investigating io. ---------- nosy: +xiang.zhang stage: patch review -> needs patch versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 05:19:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 09:19:02 +0000 Subject: [issue34454] datetime: NULL dereference in fromisoformat() on PyUnicode_AsUTF8AndSize() failure In-Reply-To: <1534887509.78.0.56676864532.issue34454@psf.upfronthosting.co.za> Message-ID: <1540286342.53.0.788709270274.issue34454@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Paul Ganssle for your fixes! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 06:07:13 2018 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 23 Oct 2018 10:07:13 +0000 Subject: [issue35046] logging.StreamHandler performs two syscalls when one would do In-Reply-To: <1540234281.84.0.788709270274.issue35046@psf.upfronthosting.co.za> Message-ID: <1540289233.34.0.788709270274.issue35046@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset d730719b094cb006711b1cd546927b863c173b31 by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-35046: do only one system call per line (logging.StreamHandler) (GH-10042) (GH-10050) https://github.com/python/cpython/commit/d730719b094cb006711b1cd546927b863c173b31 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 06:07:18 2018 From: report at bugs.python.org (Dan Snider) Date: Tue, 23 Oct 2018 10:07:18 +0000 Subject: [issue35048] Can't reassign __class__ despite the assigned class having identical slots Message-ID: <1540289238.37.0.788709270274.issue35048@psf.upfronthosting.co.za> New submission from Dan Snider : >>> class a(dict): __slots__ = '__dict__', 'x' >>> class b(dict): __slots__ = '__dict__', 'x' >>> self = a(); self.__class__ = b Traceback (most recent call last): File "", line 1, in self=a(); self.__class__ = b TypeError: __class__ assignment: 'b' object layout differs from 'a' This always occurs when __dict__ and/or __weakref__ are defined as slots, even when both classes have otherwise identical slots. This behavior appears to contradict what the docs say wrt to __class__ assignment, which is (in its entirety): "__class__ assignment works only if both classes have the same __slots__. " Not sure if this is just a case of ambiguous documentation and intentional behavior or not. Since two classes with identical slots will always have identical internal struct layouts, I can't see a reason for this error. ---------- messages: 328296 nosy: bup priority: normal severity: normal status: open title: Can't reassign __class__ despite the assigned class having identical slots versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 06:07:47 2018 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 23 Oct 2018 10:07:47 +0000 Subject: [issue35046] logging.StreamHandler performs two syscalls when one would do In-Reply-To: <1540234281.84.0.788709270274.issue35046@psf.upfronthosting.co.za> Message-ID: <1540289267.49.0.788709270274.issue35046@psf.upfronthosting.co.za> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 06:09:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 10:09:54 +0000 Subject: [issue34260] shutil.copy2 is not the same as cp -p In-Reply-To: <1532781781.14.0.56676864532.issue34260@psf.upfronthosting.co.za> Message-ID: <1540289394.57.0.788709270274.issue34260@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 4f399be0e70d8b5516b6213568b7665765bb3114 by Victor Stinner (Zsolt Cserna) in branch 'master': bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523) https://github.com/python/cpython/commit/4f399be0e70d8b5516b6213568b7665765bb3114 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 06:22:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 10:22:01 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1540290121.37.0.788709270274.issue33015@psf.upfronthosting.co.za> STINNER Victor added the comment: > gcc8.1 throws this warning irrespective of the cast since converting function pointers may result in undefined behaviour unless it is cast back to its original type. Do you have a reference explaining this issue? I dislike adding a memory allocation to call a function just to fix a compiler warning. From my point of view, at the end, the function pointer is just an integer. I don't understand how an additional memory allocation solves the issue. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 06:26:52 2018 From: report at bugs.python.org (Lene Preuss) Date: Tue, 23 Oct 2018 10:26:52 +0000 Subject: [issue35049] argparse.ArgumentParser fails on arguments with leading dash and comma Message-ID: <1540290412.14.0.788709270274.issue35049@psf.upfronthosting.co.za> New submission from Lene Preuss : Obligatory apologies if this has been reported before, I could not find it. It is similar to but different from https://bugs.python.org/issue9334. >>> from argparse import ArgumentParser >>> p = ArgumentParser() >>> p.add_argument('-d') _StoreAction(option_strings=['-d'], dest='d', nargs=None, const=None, default=None, type=None, choices=None, help=None, metavar=None) >>> p.parse_args(['-d', '12']) Namespace(d='12') >>> p.parse_args(['-d', '1,2']) Namespace(d='1,2') >>> p.parse_args(['-d', '-12']) Namespace(d='-12') >>> p.parse_args(['-d', '-1,2']) usage: [-h] [-d D] : error: argument -d: expected one argument As suggested in issue 9334, passing the argument with an equals sign works: >>> p.parse_args(['-d=-1,2']) Namespace(d='-1,2') But I don't think that this is the intended behavior. ---------- messages: 328299 nosy: lene priority: normal severity: normal status: open title: argparse.ArgumentParser fails on arguments with leading dash and comma type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 06:29:51 2018 From: report at bugs.python.org (Lene Preuss) Date: Tue, 23 Oct 2018 10:29:51 +0000 Subject: [issue35049] argparse.ArgumentParser fails on arguments with leading dash and comma In-Reply-To: <1540290412.14.0.788709270274.issue35049@psf.upfronthosting.co.za> Message-ID: <1540290591.72.0.788709270274.issue35049@psf.upfronthosting.co.za> Change by Lene Preuss : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 06:29:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 10:29:53 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1540290593.63.0.788709270274.issue33015@psf.upfronthosting.co.za> STINNER Victor added the comment: "Fix function cast warning in thread_pthread.h" Can you please paste the warning? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 06:46:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 10:46:48 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1540291608.59.0.788709270274.issue33015@psf.upfronthosting.co.za> STINNER Victor added the comment: func_cast.c: C program reproducing the issue. Using an additional (void*) cast, it's possible to workaround the cast warning. /* Test GCC 8.1 -Wcast-function-type for https://bugs.python.org/issue33015 * * Compiled on Linux with: * gcc x.c -o x -Wall -Wextra -lpthread * * Workaround the cast: * gcc x.c -o x -Wall -Wextra -lpthread -D UGLY_CAST */ /* No result value */ typedef void (*python_callback) (void *); /* Result type: "void*" (untyped pointer) */ typedef void* (*pthread_callback) (void *); int test_cast(python_callback func) { ... #ifdef UGLY_CAST pthread_callback func2 = (pthread_callback)(void *)func; #else pthread_callback func2 = (pthread_callback)func; #endif ... } ---------- Added file: https://bugs.python.org/file47888/func_cast.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 06:47:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 10:47:41 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1540291661.2.0.788709270274.issue33015@psf.upfronthosting.co.za> STINNER Victor added the comment: The GCC warning is: func_cast.c:34:30: warning: cast between incompatible function types from 'python_callback' {aka 'void (*)(void *)'} to 'void * (*)(void *)' [-Wcast-function-type] pthread_callback func2 = (pthread_callback)func; ^ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 06:54:47 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 10:54:47 +0000 Subject: [issue35028] Off by one error in cgi.FieldStorage(max_num_fields) In-Reply-To: <1539974216.92.0.788709270274.issue35028@psf.upfronthosting.co.za> Message-ID: <1540292087.71.0.788709270274.issue35028@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 58b614a327991f4baad4d2795a50027f75411450 by Miss Islington (bot) in branch '3.6': bpo-35028: cgi: Fix max_num_fields off by one error (GH-9973) https://github.com/python/cpython/commit/58b614a327991f4baad4d2795a50027f75411450 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 06:54:55 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 10:54:55 +0000 Subject: [issue35028] Off by one error in cgi.FieldStorage(max_num_fields) In-Reply-To: <1539974216.92.0.788709270274.issue35028@psf.upfronthosting.co.za> Message-ID: <1540292095.93.0.788709270274.issue35028@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 178bf58e798d3ef63f18b314056efbc3c33dd48b by Miss Islington (bot) in branch '3.7': bpo-35028: cgi: Fix max_num_fields off by one error (GH-9973) https://github.com/python/cpython/commit/178bf58e798d3ef63f18b314056efbc3c33dd48b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 07:31:19 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, 23 Oct 2018 11:31:19 +0000 Subject: [issue35048] Can't reassign __class__ despite the assigned class having identical slots In-Reply-To: <1540289238.37.0.788709270274.issue35048@psf.upfronthosting.co.za> Message-ID: <1540294279.53.0.788709270274.issue35048@psf.upfronthosting.co.za> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- nosy: +thatiparthy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 07:41:56 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Oct 2018 11:41:56 +0000 Subject: [issue34980] KillPython target doesn't detect 64-bit processes In-Reply-To: <1539501986.24.0.788709270274.issue34980@psf.upfronthosting.co.za> Message-ID: <1540294916.09.0.788709270274.issue34980@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset fa5329424f4206630c34f75629fa78738db647f0 by Steve Dower (Jeremy Kloth) in branch 'master': bpo-34980: P/Invoke QueryFullProcessImageName to get process names (GH-9901) https://github.com/python/cpython/commit/fa5329424f4206630c34f75629fa78738db647f0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 07:42:03 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 11:42:03 +0000 Subject: [issue34980] KillPython target doesn't detect 64-bit processes In-Reply-To: <1539501986.24.0.788709270274.issue34980@psf.upfronthosting.co.za> Message-ID: <1540294923.5.0.788709270274.issue34980@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9392 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 07:42:15 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 11:42:15 +0000 Subject: [issue34980] KillPython target doesn't detect 64-bit processes In-Reply-To: <1539501986.24.0.788709270274.issue34980@psf.upfronthosting.co.za> Message-ID: <1540294935.67.0.788709270274.issue34980@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9393 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 07:45:28 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 23 Oct 2018 11:45:28 +0000 Subject: [issue35047] Better error messages un unittest.mock In-Reply-To: <1540283736.06.0.788709270274.issue35047@psf.upfronthosting.co.za> Message-ID: <1540295128.39.0.788709270274.issue35047@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 07:55:15 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, 23 Oct 2018 11:55:15 +0000 Subject: [issue2142] difflib.unified_diff(...) produces invalid patches In-Reply-To: <1203365817.7.0.0998491412302.issue2142@psf.upfronthosting.co.za> Message-ID: <1540295715.33.0.788709270274.issue2142@psf.upfronthosting.co.za> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- nosy: +thatiparthy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 07:56:11 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, 23 Oct 2018 11:56:11 +0000 Subject: [issue29341] Missing accepting path-like object in docstrings of os module functions In-Reply-To: <1485064061.59.0.597221589705.issue29341@psf.upfronthosting.co.za> Message-ID: <1540295771.96.0.788709270274.issue29341@psf.upfronthosting.co.za> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- nosy: +thatiparthy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 07:59:05 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 23 Oct 2018 11:59:05 +0000 Subject: [issue35048] Can't reassign __class__ despite the assigned class having identical slots In-Reply-To: <1540289238.37.0.788709270274.issue35048@psf.upfronthosting.co.za> Message-ID: <1540295945.33.0.788709270274.issue35048@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 08:03:06 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 12:03:06 +0000 Subject: [issue34980] KillPython target doesn't detect 64-bit processes In-Reply-To: <1539501986.24.0.788709270274.issue34980@psf.upfronthosting.co.za> Message-ID: <1540296186.81.0.788709270274.issue34980@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 7a253dcd97fa669b8615476b287ef4dd0a935014 by Miss Islington (bot) in branch '3.7': bpo-34980: P/Invoke QueryFullProcessImageName to get process names (GH-9901) https://github.com/python/cpython/commit/7a253dcd97fa669b8615476b287ef4dd0a935014 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 08:07:39 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 12:07:39 +0000 Subject: [issue34980] KillPython target doesn't detect 64-bit processes In-Reply-To: <1539501986.24.0.788709270274.issue34980@psf.upfronthosting.co.za> Message-ID: <1540296459.88.0.788709270274.issue34980@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 69d0372fc9c5a600ecdfb7dd80f852b26c6ed087 by Miss Islington (bot) in branch '3.6': bpo-34980: P/Invoke QueryFullProcessImageName to get process names (GH-9901) https://github.com/python/cpython/commit/69d0372fc9c5a600ecdfb7dd80f852b26c6ed087 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 08:31:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 12:31:42 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1540297902.39.0.788709270274.issue33015@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9394 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 08:35:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 12:35:57 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1540298157.33.0.788709270274.issue33015@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote a different fix for the compiler warning using a temporary cast to "void*": PR 10057. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 08:40:42 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Oct 2018 12:40:42 +0000 Subject: [issue35030] Python 2.7 OrderedDict creates circular references In-Reply-To: <1540024622.42.0.788709270274.issue35030@psf.upfronthosting.co.za> Message-ID: <1540298442.87.0.788709270274.issue35030@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I see, so basically this would be a problem only if the root > object had a __del__ method and then the GC wouldn't reclaim it ? Yes. That's exactly it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 08:59:24 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 23 Oct 2018 12:59:24 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1540299564.26.0.788709270274.issue33015@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Right, so one PR is a real fix, the other PR is a workaround (avoids the warning without fixing the underlying problem). The underlying problem is: if a platform has incompatible ABIs for the two function types, casting one function type to another may produce bugs (memory corruptions, crashes, etc). We can however decide to consider those platforms unlikely, as the current code has been working for years or decades. It would be nice to have an opinion from C specialists. ---------- nosy: +gregory.p.smith, skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 09:00:21 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Oct 2018 13:00:21 +0000 Subject: [issue35050] Off-by-one bug in AF_ALG Message-ID: <1540299621.45.0.788709270274.issue35050@psf.upfronthosting.co.za> New submission from Christian Heimes : The error checking code for salg_name and salg_type have an off-by-one bug. It should check that both strings are NUL terminated strings. It's not a security bug, because the Linux kernel ensures that the last byte is a NULL byte. ---------- components: Extension Modules messages: 328311 nosy: christian.heimes priority: normal severity: normal status: open title: Off-by-one bug in AF_ALG type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 09:02:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 13:02: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: <1540299759.96.0.788709270274.issue35050@psf.upfronthosting.co.za> STINNER Victor added the comment: Christian and me created a bug report at the same time :-) My message: I found two interesting warnings on socketmodule.c in the Coverity report: Error: BUFFER_SIZE_WARNING (CWE-120): [#def12] Python-3.6.5/Modules/socketmodule.c:2069: buffer_size_warning: Calling strncpy with a maximum size argument of 14 bytes on destination array "sa->salg_type" of size 14 bytes might leave the destination string unterminated. # 2067| return 0; # 2068| } # 2069|-> strncpy((char *)sa->salg_type, type, sizeof(sa->salg_type)); # 2070| if (strlen(name) > sizeof(sa->salg_name)) { # 2071| PyErr_SetString(PyExc_ValueError, "AF_ALG name too long."); Error: BUFFER_SIZE_WARNING (CWE-120): [#def13] Python-3.6.5/Modules/socketmodule.c:2074: buffer_size_warning: Calling strncpy with a maximum size argument of 64 bytes on destination array "sa->salg_name" of size 64 bytes might leave the destination string unterminated. # 2072| return 0; # 2073| } # 2074|-> strncpy((char *)sa->salg_name, name, sizeof(sa->salg_name)); # 2075| # 2076| *len_ret = sizeof(*sa); It seems like the Linux kernel always write a terminating NUL byte for AF_ALG: https://elixir.bootlin.com/linux/latest/source/crypto/af_alg.c#L171 The Python code does not create buffer overflow, it's just that the Linux kernel will always reject names which are too long. Python should reject them as well. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 09:20:11 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Oct 2018 13:20:11 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1540300811.02.0.788709270274.issue33015@psf.upfronthosting.co.za> Steve Dower added the comment: Unfortunately, this isn't really a safe cast, as we're going from void to non-void return value. On x86 with current calling conventions, this is okay, since the return value is in a register that does not change or require cleanup by the caller. However, I wouldn't want to assume that all future calling conventions on other architectures would also permit this - returning a pointer value on the stack or in some way that requires cleanup is entirely possible, and is the sort of problem that would likely only be detectable by this warning or very careful memory measurements (or possibly a very confusing crash due to invalid stack modifications). It's also possible that returning an invalid pointer could cause a compiler to one day invoke its undefined behavior clause. Even though *we* don't use the return value, it still gets returned somewhere. I'm not thrilled about the memory allocation here either, but there isn't really much of an option in my opinion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 09:21:30 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Oct 2018 13:21:30 +0000 Subject: [issue35050] Off-by-one bug in AF_ALG In-Reply-To: <1540299621.45.0.788709270274.issue35050@psf.upfronthosting.co.za> Message-ID: <1540300890.87.0.788709270274.issue35050@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +9395 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 09:23:00 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Oct 2018 13:23:00 +0000 Subject: [issue34980] KillPython target doesn't detect 64-bit processes In-Reply-To: <1539501986.24.0.788709270274.issue34980@psf.upfronthosting.co.za> Message-ID: <1540300980.55.0.788709270274.issue34980@psf.upfronthosting.co.za> Steve Dower added the comment: Jeremy - feel free to close this when you're happy with the buildbot results. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 09:27:46 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Oct 2018 13:27:46 +0000 Subject: [issue35050] Off-by-one bug in AF_ALG In-Reply-To: <1540299621.45.0.788709270274.issue35050@psf.upfronthosting.co.za> Message-ID: <1540301266.91.0.788709270274.issue35050@psf.upfronthosting.co.za> Christian Heimes added the comment: > The Python code does not create buffer overflow, it's just that the Linux kernel will always reject names which are too long. The Kernel doesn't have a direct length restriction. It just ensures that type and name are NULL terminated. Other code inside the Kernel rejects unknown type and name values. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 09:39:04 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Tue, 23 Oct 2018 13:39:04 +0000 Subject: [issue35051] Fix pep8 on Lib/turtledemo module Message-ID: <1540301944.91.0.788709270274.issue35051@psf.upfronthosting.co.za> New submission from Emmanuel Arias : This issue is related to #35039 Fix pep8. See comments on https://github.com/python/cpython/pull/10044 ---------- components: Library (Lib) messages: 328316 nosy: eamanu, thatiparthy priority: normal severity: normal status: open title: Fix pep8 on Lib/turtledemo module versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 09:50:16 2018 From: report at bugs.python.org (Florian Kisser) Date: Tue, 23 Oct 2018 13:50:16 +0000 Subject: [issue11024] imaplib: Time2Internaldate() returns localized strings In-Reply-To: <1296135301.42.0.767818406183.issue11024@psf.upfronthosting.co.za> Message-ID: <1540302616.92.0.788709270274.issue11024@psf.upfronthosting.co.za> Florian Kisser added the comment: imaplib_Time2Internaldate_locale_fix.patch was never applied to Python 2.7. Regarding the comments I found no reason why, so this is still an issue, I guess. ---------- nosy: +Florian Kisser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 09:50:53 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Tue, 23 Oct 2018 13:50:53 +0000 Subject: [issue35051] Fix pep8 on Lib/turtledemo module In-Reply-To: <1540301944.91.0.788709270274.issue35051@psf.upfronthosting.co.za> Message-ID: <1540302653.0.0.788709270274.issue35051@psf.upfronthosting.co.za> Change by Emmanuel Arias : ---------- keywords: +patch pull_requests: +9396 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 10:14:58 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 23 Oct 2018 14:14:58 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540304098.26.0.788709270274.issue33899@psf.upfronthosting.co.za> Ned Deily added the comment: I don't have a strong opinion about 2.7 here. Ultimately, it's Benjamin's call. But it might make sense to revert for 2.7 since it hasn't been released yet. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 10:56:22 2018 From: report at bugs.python.org (Jan Hermann) Date: Tue, 23 Oct 2018 14:56:22 +0000 Subject: [issue34947] inspect.getclosurevars() does not get all globals In-Reply-To: <1539118680.94.0.545547206417.issue34947@psf.upfronthosting.co.za> Message-ID: <1540306582.07.0.788709270274.issue34947@psf.upfronthosting.co.za> Jan Hermann added the comment: Ok, that?s fair. But then the inspect module currently doesn?t provide tools to the user to construct the recursive identification without duplicating code already in stdlib. For that, one would need to refactor getclosurevars() to two parts: getcode() and getclosurevars_from_code(). Then one could do: clvars = ClosureVars({}, {}, {}, set()) codes = [getcode(func)] while codes: code = codes.pop() for const in code.co_consts: if iscode(const): codes.append(const) lclvars = getclosurevars_from_code(code) for v, lv in zip(clvars, lclvars): v.update(lv) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 11:02:08 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 23 Oct 2018 15:02:08 +0000 Subject: [issue34980] KillPython target doesn't detect 64-bit processes In-Reply-To: <1539501986.24.0.788709270274.issue34980@psf.upfronthosting.co.za> Message-ID: <1540306928.79.0.788709270274.issue34980@psf.upfronthosting.co.za> Jeremy Kloth added the comment: The changed succeeded in killing the actively stuck process, so I say its all good! Thanks for the merge. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 11:14:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 15:14:23 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1540307663.91.0.788709270274.issue9263@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9397 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 11:30:54 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 23 Oct 2018 15:30:54 +0000 Subject: [issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py Message-ID: <1540308654.33.0.788709270274.issue35052@psf.upfronthosting.co.za> New submission from Charalampos Stratakis : Analyzing some coverity scan results I stumbled upon this issue: Python-3.6.5/Lib/xml/dom/minidom.py:1914: original: "n._call_user_data_handler(operation, n, notation)" looks like the original copy. Python-3.6.5/Lib/xml/dom/minidom.py:1924: copy_paste_error: "n" in "e._call_user_data_handler(operation, n, entity)" looks like a copy-paste error. Python-3.6.5/Lib/xml/dom/minidom.py:1924: remediation: Should it say "e" instead? # 1922| clone.entities._seq.append(entity) # 1923| if hasattr(e, '_call_user_data_handler'): # 1924|-> e._call_user_data_handler(operation, n, entity) # 1925| else: # 1926| # Note the cloning of Document and DocumentType nodes is It seems that the warning is indeed a bug, and the code in question was basically merged into python from pyxml 16 years ago. ---------- components: Library (Lib) messages: 328321 nosy: cstratak priority: normal severity: normal status: open title: Coverity scan: copy/paste error in Lib/xml/dom/minidom.py versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 11:32:35 2018 From: report at bugs.python.org (Tim Graham) Date: Tue, 23 Oct 2018 15:32:35 +0000 Subject: [issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False In-Reply-To: <1501087649.97.0.982453892523.issue31047@psf.upfronthosting.co.za> Message-ID: <1540308755.87.0.788709270274.issue31047@psf.upfronthosting.co.za> Tim Graham added the comment: I think this caused a behavior change: Before (Python 3.6.6): >>> from os.path import abspath >>> abspath('/abc/') 'C:\\abc' After (Python 3.6.7): >>> abspath('/abc/') 'C:\\abc\\' This causes a test failure in Django's safe_join() function: https://github.com/django/django/blob/10d82c85aa5f8bd6adff0db49798dd368455cdcf/django/utils/_os.py#L24-L47 https://github.com/django/django/blob/10d82c85aa5f8bd6adff0db49798dd368455cdcf/tests/utils_tests/test_os_utils.py#L10 Traceback (most recent call last): File "C:\Jenkins\workspace\django-windows\database\sqlite3\label\windows\python\Python36\tests\utils_tests\test_os_utils.py", line 10, in test_base_path_ends_with_sep drive, path = os.path.splitdrive(safe_join("/abc/", "abc")) File "C:\Jenkins\workspace\django-windows\database\sqlite3\label\windows\python\Python36\django\utils\_os.py", line 46, in safe_join 'component ({})'.format(final_path, base_path)) django.core.exceptions.SuspiciousFileOperation: The joined path (C:\abc\abc) is located outside of the base path component (C:\abc\) ---------- nosy: +Tim.Graham _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 11:39:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 15:39:47 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1540309187.51.0.788709270274.issue9263@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 82af0b63b07aa8d92b50098e382b458143cfc677 by Victor Stinner in branch 'master': bpo-9263: _PyObject_Dump() detects freed memory (GH-10061) https://github.com/python/cpython/commit/82af0b63b07aa8d92b50098e382b458143cfc677 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 11:52:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 15:52:09 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1540309929.97.0.788709270274.issue9263@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9398 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 11:59:30 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 23 Oct 2018 15:59:30 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540310370.98.0.788709270274.issue33899@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Please revert in 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 12:34:30 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Tue, 23 Oct 2018 16:34:30 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1540312470.0.0.788709270274.issue33015@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: Such casts will also trigger a CFI violation if somebody tries to build Python (and the libc, in this case) with a signature-based CFI [1, 2]. It checks that the compile-time callee signature matches the signature of the actually called function in runtime. [1] https://clang.llvm.org/docs/ControlFlowIntegrity.html [2] https://android-developers.googleblog.com/2018/10/control-flow-integrity-in-android-kernel.html ---------- nosy: +izbyshev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 12:42:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 16:42:14 +0000 Subject: [issue35053] Enhance tracemalloc to trace properly free lists Message-ID: <1540312934.43.0.788709270274.issue35053@psf.upfronthosting.co.za> New submission from STINNER Victor : CPython uses many "free lists": list of "deallocated" objects which are kept alive to optimize allocation of new objects. For example, the builtin list type has a free list. Problem: tracemalloc only traces the memory allocation when the object is created, but it doesn't update the traceback when the "free object" is reused to create "a new object". Attached PR modifies _Py_NewReference() to update the Python traceback in the tracemalloc trace. ---------- components: Library (Lib) messages: 328326 nosy: vstinner priority: normal severity: normal status: open title: Enhance tracemalloc to trace properly free lists versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 13:01:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 17:01:12 +0000 Subject: [issue35053] Enhance tracemalloc to trace properly free lists In-Reply-To: <1540312934.43.0.788709270274.issue35053@psf.upfronthosting.co.za> Message-ID: <1540314072.02.0.788709270274.issue35053@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +9399 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 13:07:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 17:07:48 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1540314468.48.0.788709270274.issue9263@psf.upfronthosting.co.za> STINNER Victor added the comment: 00170-gc-assertions.patch is used in the Fedora package of Python. I converted the patch to a pull request: PR 10062. My PR only uses the new assertion macro once. I plan to write more changes to use the new assertion macros in more places, once the first PR is merged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 13:43:20 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Oct 2018 17:43:20 +0000 Subject: [issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False In-Reply-To: <1501087649.97.0.982453892523.issue31047@psf.upfronthosting.co.za> Message-ID: <1540316600.41.0.788709270274.issue31047@psf.upfronthosting.co.za> Steve Dower added the comment: Agreed, it no longer matches os.normpath()'s declared behavior by not trimming the end separator. It's obviously too late for the current release (I'd hope Django is one of the projects running tests against RC's, but I guess not :( ), but I think we can fix it for the next updates on all versions. Patches welcome. ---------- assignee: steve.dower -> resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 13:45:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2018 17:45:03 +0000 Subject: [issue35054] Add more index entries for symbols Message-ID: <1540316703.62.0.788709270274.issue35054@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The proposed PR adds index entries for all operators, syntax elements and keywords. It also adds index entries for symbols in related minilanguages: * escape sequences in string literals * metacharacters and escape sequences in regular expressions * symbols in printf-style formatting, string formatting, f-strings and template strings * special symbols for OS (pathnames and interpolation) * special symbols in doctests * and others Also fixed several errors in formatting. ---------- assignee: docs at python components: Documentation messages: 328329 nosy: docs at python, eric.araujo, ezio.melotti, georg.brandl, serhiy.storchaka, willingc priority: normal severity: normal status: open title: Add more index entries for symbols type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 13:46:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2018 17:46:24 +0000 Subject: [issue35054] Add more index entries for symbols In-Reply-To: <1540316703.62.0.788709270274.issue35054@psf.upfronthosting.co.za> Message-ID: <1540316784.62.0.788709270274.issue35054@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +9400 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 13:47:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2018 17:47:35 +0000 Subject: [issue35053] Enhance tracemalloc to trace properly free lists In-Reply-To: <1540312934.43.0.788709270274.issue35053@psf.upfronthosting.co.za> Message-ID: <1540316855.35.0.788709270274.issue35053@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 13:47:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2018 17:47:48 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1540316868.95.0.788709270274.issue9263@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:06:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2018 19:06:06 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1540321566.59.0.788709270274.issue33015@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:09:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2018 19:09:43 +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: <1540321783.07.0.788709270274.issue35052@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Agree, this looks like a bug. Do you mind to create a PR Charalampos? ---------- components: +XML keywords: +easy nosy: +serhiy.storchaka stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:13:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2018 19:13:49 +0000 Subject: [issue35051] Fix pep8 on Lib/turtledemo module In-Reply-To: <1540301944.91.0.788709270274.issue35051@psf.upfronthosting.co.za> Message-ID: <1540322029.78.0.788709270274.issue35051@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: We don't usually do formatting changes like this. We try to make a new code conforming PEP 8, but do not rewrite old code. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:14:45 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 23 Oct 2018 19:14:45 +0000 Subject: [issue35055] Error when we try to download the epub archive Message-ID: <1540322085.68.0.788709270274.issue35055@psf.upfronthosting.co.za> New submission from St?phane Wirtel : On this page https://docs.python.org/3/download.html, there is a link for the epub archive but we can not download it because there is 404 Not Found. https://docs.python.org/3/archives/python-3.7.1-docs.epub ---------- messages: 328332 nosy: matrixise, mdk, ned.deily priority: normal severity: normal status: open title: Error when we try to download the epub archive versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:15:55 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 23 Oct 2018 19:15:55 +0000 Subject: [issue35055] Error when we try to download the epub archive In-Reply-To: <1540322085.68.0.788709270274.issue35055@psf.upfronthosting.co.za> Message-ID: <1540322155.81.0.788709270274.issue35055@psf.upfronthosting.co.za> St?phane Wirtel added the comment: same issue with 3.6 ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:16:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2018 19:16:37 +0000 Subject: [issue35047] Better error messages in unittest.mock In-Reply-To: <1540283736.06.0.788709270274.issue35047@psf.upfronthosting.co.za> Message-ID: <1540322197.28.0.788709270274.issue35047@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- title: Better error messages un unittest.mock -> Better error messages in unittest.mock _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:23:25 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 23 Oct 2018 19:23:25 +0000 Subject: [issue35055] Error when we try to download the epub archive In-Reply-To: <1540322085.68.0.788709270274.issue35055@psf.upfronthosting.co.za> Message-ID: <1540322605.96.0.788709270274.issue35055@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report. This problem is being tracked here: https://github.com/python/pythondotorg/issues/1350 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:27:40 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 23 Oct 2018 19:27:40 +0000 Subject: [issue35055] Error when we try to download the epub archive In-Reply-To: <1540322085.68.0.788709270274.issue35055@psf.upfronthosting.co.za> Message-ID: <1540322860.3.0.788709270274.issue35055@psf.upfronthosting.co.za> Julien Palard added the comment: Looks like the python-docs-theme we're using in production may not be up-to-date, I'm bumping it on docsbuild-scripts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:32:23 2018 From: report at bugs.python.org (Zsolt Cserna) Date: Tue, 23 Oct 2018 19:32:23 +0000 Subject: [issue34260] shutil.copy2 is not the same as cp -p In-Reply-To: <1532781781.14.0.56676864532.issue34260@psf.upfronthosting.co.za> Message-ID: <1540323143.83.0.788709270274.issue34260@psf.upfronthosting.co.za> Change by Zsolt Cserna : ---------- pull_requests: +9401 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:36:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2018 19:36:59 +0000 Subject: [issue35056] Test leaks of memory not managed by Python allocator Message-ID: <1540323419.75.0.788709270274.issue35056@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Would be nice to add a possibility to test memory leaks if memory is allocated not by Python allocators, but inside external libraries. This would allow to catch leaks on the bridge between Python and external libraries. See for example issue34794. ---------- components: Tests messages: 328336 nosy: serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Test leaks of memory not managed by Python allocator type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:38:53 2018 From: report at bugs.python.org (Luna Chen) Date: Tue, 23 Oct 2018 19:38:53 +0000 Subject: [issue29341] Missing accepting path-like object in docstrings of os module functions In-Reply-To: <1485064061.59.0.597221589705.issue29341@psf.upfronthosting.co.za> Message-ID: <1540323533.98.0.788709270274.issue29341@psf.upfronthosting.co.za> Luna Chen added the comment: Farhaan Bukhsh: you said you wanted to work on this but that was over a month ago, so I presume you've directed your attention elsewhere, and I'd like to give this a try. ---------- nosy: +BNMetrics -thatiparthy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:40:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2018 19:40:58 +0000 Subject: [issue34794] Memory leak in Tkinter In-Reply-To: <1537824612.19.0.545547206417.issue34794@psf.upfronthosting.co.za> Message-ID: <1540323658.65.0.788709270274.issue34794@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset df13df41a25765d8a39a77220691698498e758d4 by Serhiy Storchaka in branch 'master': bpo-34794: Fix a leak in Tkinter. (GH-10025) https://github.com/python/cpython/commit/df13df41a25765d8a39a77220691698498e758d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:41:10 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 19:41:10 +0000 Subject: [issue34794] Memory leak in Tkinter In-Reply-To: <1537824612.19.0.545547206417.issue34794@psf.upfronthosting.co.za> Message-ID: <1540323670.85.0.788709270274.issue34794@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9402 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:41:18 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 19:41:18 +0000 Subject: [issue34794] Memory leak in Tkinter In-Reply-To: <1537824612.19.0.545547206417.issue34794@psf.upfronthosting.co.za> Message-ID: <1540323678.93.0.788709270274.issue34794@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9403 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:46:28 2018 From: report at bugs.python.org (Zsolt Cserna) Date: Tue, 23 Oct 2018 19:46:28 +0000 Subject: [issue34260] shutil.copy2 is not the same as cp -p In-Reply-To: <1532781781.14.0.56676864532.issue34260@psf.upfronthosting.co.za> Message-ID: <1540323988.34.0.788709270274.issue34260@psf.upfronthosting.co.za> Change by Zsolt Cserna : ---------- pull_requests: +9404 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:55:42 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 23 Oct 2018 19:55:42 +0000 Subject: [issue35055] Error when we try to download the epub archive In-Reply-To: <1540322085.68.0.788709270274.issue35055@psf.upfronthosting.co.za> Message-ID: <1540324542.06.0.788709270274.issue35055@psf.upfronthosting.co.za> Julien Palard added the comment: Bumped python-docs-theme it in production, it should help, next build in 4 hours. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 15:58:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2018 19:58:28 +0000 Subject: [issue30863] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() In-Reply-To: <1499327601.89.0.422030261957.issue30863@psf.upfronthosting.co.za> Message-ID: <1540324708.69.0.788709270274.issue30863@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c46db9232f1a6e0e3c33053549d03d4335db9dca by Serhiy Storchaka in branch 'master': bpo-30863: Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString(). (GH-2599) https://github.com/python/cpython/commit/c46db9232f1a6e0e3c33053549d03d4335db9dca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 16:03:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Oct 2018 20:03:17 +0000 Subject: [issue30863] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() In-Reply-To: <1499327601.89.0.422030261957.issue30863@psf.upfronthosting.co.za> Message-ID: <1540324997.27.0.788709270274.issue30863@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 16:18:39 2018 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 23 Oct 2018 20:18:39 +0000 Subject: [issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC In-Reply-To: <1540110172.83.0.788709270274.issue35037@psf.upfronthosting.co.za> Message-ID: <1540325919.75.0.788709270274.issue35037@psf.upfronthosting.co.za> Stefan Behnel added the comment: The relevant macro seems to be "__MINGW64__". I have neither a Windows environment nor MinGW-64 for testing, but the logic should be the same as for the "_WIN64" macro, i.e. #if defined(_WIN64) || defined(__MINGW64__) #define MS_WIN64 #endif And then there's probably also something to do to record the compiler version in the long CPython version string, etc. I also can't say if MinGW-64 sets the "MS_WIN32" macro. Having "MS_WIN64" without "MS_WIN32" might be unexpected for some code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 16:25:57 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Oct 2018 20:25:57 +0000 Subject: [issue34794] Memory leak in Tkinter In-Reply-To: <1537824612.19.0.545547206417.issue34794@psf.upfronthosting.co.za> Message-ID: <1540326357.31.0.788709270274.issue34794@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2c549250d8fd6755e3338a771d250e34c78bdb50 by Miss Islington (bot) in branch '3.6': bpo-34794: Fix a leak in Tkinter. (GH-10025) https://github.com/python/cpython/commit/2c549250d8fd6755e3338a771d250e34c78bdb50 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 16:48:07 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Tue, 23 Oct 2018 20:48:07 +0000 Subject: [issue35051] Fix pep8 on Lib/turtledemo module In-Reply-To: <1540301944.91.0.788709270274.issue35051@psf.upfronthosting.co.za> Message-ID: <1540327687.45.0.788709270274.issue35051@psf.upfronthosting.co.za> Emmanuel Arias added the comment: So, do you recommend me close the pr? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 16:53:06 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Tue, 23 Oct 2018 20:53:06 +0000 Subject: [issue35047] Better error messages in unittest.mock In-Reply-To: <1540283736.06.0.788709270274.issue35047@psf.upfronthosting.co.za> Message-ID: <1540327986.4.0.788709270274.issue35047@psf.upfronthosting.co.za> Emmanuel Arias added the comment: It seems to be a good idea. If you attach a sample, it would be great. ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 17:06:22 2018 From: report at bugs.python.org (Mayank Asthana) Date: Tue, 23 Oct 2018 21:06:22 +0000 Subject: [issue24209] Allow IPv6 bind in http.server In-Reply-To: <1431784485.93.0.0140060801451.issue24209@psf.upfronthosting.co.za> Message-ID: <1540328782.3.0.788709270274.issue24209@psf.upfronthosting.co.za> Change by Mayank Asthana : ---------- nosy: +masthana _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 17:08:59 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 23 Oct 2018 21:08:59 +0000 Subject: [issue35055] Error when we try to download the epub archive In-Reply-To: <1540322085.68.0.788709270274.issue35055@psf.upfronthosting.co.za> Message-ID: <1540328939.15.0.788709270274.issue35055@psf.upfronthosting.co.za> St?phane Wirtel added the comment: @ned maybe we could close this issue ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 17:42:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 21:42:48 +0000 Subject: [issue35056] Test leaks of memory not managed by Python allocator In-Reply-To: <1540323419.75.0.788709270274.issue35056@psf.upfronthosting.co.za> Message-ID: <1540330968.42.0.788709270274.issue35056@psf.upfronthosting.co.za> STINNER Victor added the comment: You can try to use Valgrind for that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 17:46:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 21:46:43 +0000 Subject: [issue34794] Memory leak in Tkinter In-Reply-To: <1537824612.19.0.545547206417.issue34794@psf.upfronthosting.co.za> Message-ID: <1540331203.59.0.788709270274.issue34794@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset f7cefb427cbc50d89a4f19f7f334a4f5421cefd3 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-34794: Fix a leak in Tkinter. (GH-10025) (GH-10069) https://github.com/python/cpython/commit/f7cefb427cbc50d89a4f19f7f334a4f5421cefd3 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 17:57:06 2018 From: report at bugs.python.org (Zsolt Cserna) Date: Tue, 23 Oct 2018 21:57:06 +0000 Subject: [issue34260] shutil.copy2 is not the same as cp -p In-Reply-To: <1532781781.14.0.56676864532.issue34260@psf.upfronthosting.co.za> Message-ID: <1540331826.22.0.788709270274.issue34260@psf.upfronthosting.co.za> Change by Zsolt Cserna : ---------- pull_requests: +9405 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 17:58:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 21:58:00 +0000 Subject: [issue34260] shutil.copy2 is not the same as cp -p In-Reply-To: <1532781781.14.0.56676864532.issue34260@psf.upfronthosting.co.za> Message-ID: <1540331880.9.0.788709270274.issue34260@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 861f61b5a93d178e913ad3c760d529ee3155e66d by Victor Stinner (Zsolt Cserna) in branch '3.7': [3.7] bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523) (GH-10065) https://github.com/python/cpython/commit/861f61b5a93d178e913ad3c760d529ee3155e66d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 17:58:15 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Oct 2018 21:58:15 +0000 Subject: [issue34260] shutil.copy2 is not the same as cp -p In-Reply-To: <1532781781.14.0.56676864532.issue34260@psf.upfronthosting.co.za> Message-ID: <1540331895.08.0.788709270274.issue34260@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 797cfbd69e3484ecf25f5acf75b06691e3fc97fa by Victor Stinner (Zsolt Cserna) in branch '3.6': [3.6] bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523) (GH-10068) https://github.com/python/cpython/commit/797cfbd69e3484ecf25f5acf75b06691e3fc97fa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 21:42:55 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 24 Oct 2018 01:42:55 +0000 Subject: [issue35043] functools.reduce doesn't work properly with itertools.chain In-Reply-To: <1540208998.92.0.788709270274.issue35043@psf.upfronthosting.co.za> Message-ID: <1540345375.85.0.788709270274.issue35043@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Blech. Copy'n'paste error in last post: a = list(itertools.chain.from_iterable(*my_list)) should be: a = list(itertools.chain.from_iterable(my_list)) (Note removal of *, which is the whole point of from_iterable) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 23 22:05:32 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 24 Oct 2018 02:05:32 +0000 Subject: [issue35053] Enhance tracemalloc to trace properly free lists In-Reply-To: <1540312934.43.0.788709270274.issue35053@psf.upfronthosting.co.za> Message-ID: <1540346732.43.0.788709270274.issue35053@psf.upfronthosting.co.za> INADA Naoki added the comment: Is performance overhead negligible? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 00:18:31 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 24 Oct 2018 04:18:31 +0000 Subject: [issue35051] Fix pep8 on Lib/turtledemo module In-Reply-To: <1540301944.91.0.788709270274.issue35051@psf.upfronthosting.co.za> Message-ID: <1540354711.23.0.788709270274.issue35051@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > So, do you recommend me close the pr? Yes, please. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 02:05:04 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 24 Oct 2018 06:05:04 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540361104.18.0.788709270274.issue33899@psf.upfronthosting.co.za> Change by Tal Einat : ---------- pull_requests: +9406 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 02:33:29 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 24 Oct 2018 06:33:29 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540362809.2.0.788709270274.issue33899@psf.upfronthosting.co.za> Tal Einat added the comment: See PR GH-10072 for reverting in 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 02:50:53 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 24 Oct 2018 06:50:53 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540363853.48.0.788709270274.issue33899@psf.upfronthosting.co.za> Gregory P. Smith added the comment: FYI, An example of other fallout from this change - patsy broke and needed this fix: https://github.com/pydata/patsy/commit/4f53bbaf58c0bf1a9bed73fc67c7c6d0aa7f4e20#diff-53c70e68c6dfd4fe9b08427792cb2bd6 ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 02:56:59 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 24 Oct 2018 06:56:59 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540364219.07.0.788709270274.issue33899@psf.upfronthosting.co.za> Change by Tal Einat : ---------- pull_requests: +9407 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 02:57:35 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 24 Oct 2018 06:57:35 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540364255.27.0.788709270274.issue33899@psf.upfronthosting.co.za> Tal Einat added the comment: See PR GH-10073 adding mention in "What's New". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 03:17:51 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 24 Oct 2018 07:17:51 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540365471.23.0.788709270274.issue33899@psf.upfronthosting.co.za> Gregory P. Smith added the comment: some pylint fallout appears to be addressed in https://github.com/PyCQA/pylint/commit/2698cbe56b44df7974de1c3374db8700296c6fad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 03:20:14 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 24 Oct 2018 07:20:14 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540365614.16.0.788709270274.issue33899@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset dfba1f67e7f1381ceb7cec8fbcfa37337620a9b0 by Gregory P. Smith (Tal Einat) in branch 'master': bpo-33899: Mention tokenize behavior change in What's New (GH-10073) https://github.com/python/cpython/commit/dfba1f67e7f1381ceb7cec8fbcfa37337620a9b0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 03:24:56 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 24 Oct 2018 07:24:56 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540365896.11.0.788709270274.issue33899@psf.upfronthosting.co.za> Change by Tal Einat : ---------- pull_requests: +9408 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 03:27:36 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 24 Oct 2018 07:27:36 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540366056.66.0.788709270274.issue33899@psf.upfronthosting.co.za> Change by Tal Einat : ---------- pull_requests: +9409 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 03:32:42 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Oct 2018 07:32:42 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540366362.36.0.788709270274.issue33899@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 9a0476283393f9988d0946491052d7724a7f9d21 by Miss Islington (bot) (Tal Einat) in branch '3.6': [3.6] bpo-33899: Mention tokenize behavior change in What's New (GH-10073) (GH-10075) https://github.com/python/cpython/commit/9a0476283393f9988d0946491052d7724a7f9d21 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 03:33:04 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Oct 2018 07:33:04 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540366384.08.0.788709270274.issue33899@psf.upfronthosting.co.za> miss-islington added the comment: New changeset b4c9874f5c7f64e1d41cbc588e515b8851bbb90c by Miss Islington (bot) (Tal Einat) in branch '3.7': [3.7] bpo-33899: Mention tokenize behavior change in What's New (GH-10073) (GH-10074) https://github.com/python/cpython/commit/b4c9874f5c7f64e1d41cbc588e515b8851bbb90c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 03:40:28 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 24 Oct 2018 07:40:28 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540366828.72.0.788709270274.issue33899@psf.upfronthosting.co.za> Tal Einat added the comment: Thanks for helping with the fallout from this, Gregory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 07:16:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 11:16:35 +0000 Subject: [issue35053] Enhance tracemalloc to trace properly free lists In-Reply-To: <1540312934.43.0.788709270274.issue35053@psf.upfronthosting.co.za> Message-ID: <1540379795.09.0.788709270274.issue35053@psf.upfronthosting.co.za> STINNER Victor added the comment: > Is performance overhead negligible? Thank you for asking the most important question :-) I ran this microbenchmark: make distclean ./configure --enable-lto make ./python -m venv env env/bin/python -m pip install perf sudo env/bin/python -m perf system tune env/bin/python -m perf timeit -o FILE.json -v '[]' My first attempt: $ env/bin/python -m perf compare_to ref.json patch.json Mean +- std dev: [ref] 20.6 ns +- 0.1 ns -> [patch] 22.4 ns +- 0.1 ns: 1.09x slower (+9%) The addition of the _PyTraceMalloc_NewReference() call which does nothing (check tracing flag, return) adds 1.7 ns: it's not negligible on such micro-benchmark, and I would prefer to avoid it whenever possible since _Py_NewReference() is the root of the free list optimization. New attempt: expose tracemalloc_config and add _Py_unlikely() macro (instruct the compiler that tracing is false most of the time): Mean +- std dev: [ref] 20.6 ns +- 0.1 ns -> [unlikely] 20.4 ns +- 0.3 ns: 1.01x faster (-1%) Good! The overhead is now negligible! But... is the hardcore low-level _Py_unlikely() optimization really needed?... $ env/bin/python -m perf compare_to ref.json if_tracing.json Benchmark hidden because not significant (1): timeit => no, the macro is useless, so I removed it! New benchmark to double-check on my laptop. git checkout master make clean; make rm -rf env; ./python -m venv env; env/bin/python -m pip install perf sudo env/bin/python -m perf system tune env/bin/python -m perf timeit -o ref.json -v '[]' --rigorous git checkout tracemalloc_newref make clean; make rm -rf env; ./python -m venv env; env/bin/python -m pip install perf env/bin/python -m perf timeit -o patch.json -v '[]' --rigorous $ env/bin/python -m perf compare_to ref.json patch.json Mean +- std dev: [ref] 20.8 ns +- 0.7 ns -> [patch] 20.5 ns +- 0.3 ns: 1.01x faster (-1%) The std dev is a little bit high. I didn't use CPU isolation and Hexchat + Firefox was running in the background, *but* it seems like the mean is very close, and so that my PR has no significant overhead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 07:54:53 2018 From: report at bugs.python.org (Michael Thies) Date: Wed, 24 Oct 2018 11:54:53 +0000 Subject: [issue35057] Email header refolding adds additional \r in nested parse trees Message-ID: <1540382093.01.0.788709270274.issue35057@psf.upfronthosting.co.za> New submission from Michael Thies : Email header refolding in email._header_value_parser adds additional carriage return symbols to the end of nested parse trees, when used with an EmailPolicy with linesep='\r\n'. This leads to broken email headers when composing an email with a "To:" or "CC:" header having a comma-separated list of recipients with some of them containing non-ASCII characters in their DisplayName. The bug seems to be caused by the following line (in Python 3.7): `encoded_part = part.fold(policy=policy)[:-1] # strip nl` (email/_header_value_parser.py, line 2629) This line calls part.fold() / _refold_parse_tree() recursively and tries to remove the trailing newline, which is added by the recursive call of _refold_parse_tree(). Unfortunately, it fails to do so, if the length of the policy's line separator sequence does not equal 1. Thus, this line should be corrected to something like `encoded_part = part.fold(policy=policy)[:-len(policy.linesep)] # strip nl` ---------- components: email messages: 328362 nosy: barry, michael.thies, r.david.murray priority: normal severity: normal status: open title: Email header refolding adds additional \r in nested parse trees type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 08:09:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 12:09:09 +0000 Subject: [issue35053] Enhance tracemalloc to trace properly free lists In-Reply-To: <1540312934.43.0.788709270274.issue35053@psf.upfronthosting.co.za> Message-ID: <1540382949.98.0.788709270274.issue35053@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 3.8 uses many free lists: https://pythondev.readthedocs.io/cpython_impl_optim.html#free-lists Attached dict_wrong_traceback.py shows the bug on the dictionary of an object: $ ./python ~/dict_wrong_traceback.py File "/home/vstinner/dict_wrong_traceback.py", line 13 p = Point() # first object (dead!) File "/home/vstinner/dict_wrong_traceback.py", line 8 self.x = 1 tracemalloc shows the traceback of the first object... which has been destroyed! With the fix: $ ./python ~/dict_wrong_traceback.py File "/home/vstinner/dict_wrong_traceback.py", line 16 p = Point() # second object (alive) File "/home/vstinner/dict_wrong_traceback.py", line 8 self.x = 1 It's much better: it doesn't show dead objects anymore :-) ---------- Added file: https://bugs.python.org/file47889/dict_wrong_traceback.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 08:19:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 12:19:05 +0000 Subject: [issue35053] Enhance tracemalloc to trace properly free lists In-Reply-To: <1540312934.43.0.788709270274.issue35053@psf.upfronthosting.co.za> Message-ID: <1540383545.33.0.788709270274.issue35053@psf.upfronthosting.co.za> STINNER Victor added the comment: A little bit of history. I opened a bug 2 years ago but I closed it (lack of interest): https://github.com/vstinner/pytracemalloc/issues/2 I rewrote tracemalloc between version 0.9 and 1.0. In tracemalloc 0.9, there was an API to track free lists. Here is the code to handle "alloc" and "free" of an object inside a freelist: https://github.com/vstinner/pytracemalloc/blob/a2b2616fc73cd5ce0ea45d1b68a490e0fc52ccc8/_tracemalloc.c#L291-L337 My PR 10063 has a more correct and efficient implementation: * It keeps the trace alive when the object moves into the free list to report the real memory usage of Python: the free lists consumes memory * It writes directly into the hash table entry rather than remove/add frequently the trace, it should be more efficient ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 08:44:51 2018 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 24 Oct 2018 12:44:51 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1540385091.84.0.788709270274.issue32797@psf.upfronthosting.co.za> Petr Viktorin added the comment: New changeset 057f4078b044325dae4af55c4c64b684edaca315 by Petr Viktorin (jdemeyer) in branch 'master': bpo-32797: improve documentation of linecache.getline (GH-9540) https://github.com/python/cpython/commit/057f4078b044325dae4af55c4c64b684edaca315 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 10:15:09 2018 From: report at bugs.python.org (Alex Bach) Date: Wed, 24 Oct 2018 14:15:09 +0000 Subject: [issue35058] Unable to Install Python on Windows Message-ID: <1540390509.38.0.788709270274.issue35058@psf.upfronthosting.co.za> New submission from Alex Bach : So I had to learn Python this semester and eventually I followed an online tutorial to install python on Windows 7 (64 bit). But during the installation, I got the error: 0x80070643: Failed to Install MSI Package: What's wrong with the installation? I even tried the x84 bit setup as well. ---------- components: Windows messages: 328366 nosy: alexbach, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Unable to Install Python on Windows type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 10:31:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 14:31:56 +0000 Subject: [issue35059] Convert PyObject_INIT() and _Py_NewReference() to inlined functions Message-ID: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> New submission from STINNER Victor : CPython has been created in 1990. In 1990, it made sense to use C macros. But nowadays, inlined functions can be used instead: "Python versions greater than or equal to 3.6 use C89 with several select C99 features: (...) static inline functions" https://www.python.org/dev/peps/pep-0007/#c-dialect I propose to convert 4 macros to inlined functions: * PyObject_INIT(), PyObject_INIT_VAR() * _Py_NewReference(), _Py_ForgetReference() Advantages: * Functions use regular C syntax * No more corner cases ("traps") of macros * Function arguments have a type Drawbacks: * Require a specific type can introduce compiler warnings if the caller doesn't pass the proper type (PyObject* or PyVarObject*). _Py_NewReference() and _Py_ForgetReference() seem to be properly used, but not PyObject_INIT() and PyObject_INIT_VAR(). The two attached PRs implements these changes. ---------- components: Interpreter Core messages: 328367 nosy: vstinner priority: normal severity: normal status: open title: Convert PyObject_INIT() and _Py_NewReference() to inlined functions versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 10:33:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 14:33:02 +0000 Subject: [issue35059] Convert PyObject_INIT() and _Py_NewReference() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540391582.66.0.788709270274.issue35059@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +9410 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 10:38:39 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 24 Oct 2018 14:38:39 +0000 Subject: [issue35058] Unable to Install Python on Windows In-Reply-To: <1540390509.38.0.788709270274.issue35058@psf.upfronthosting.co.za> Message-ID: <1540391919.36.0.788709270274.issue35058@psf.upfronthosting.co.za> Steve Dower added the comment: In your %TEMP% directory there will be some log files starting with "Python". Could you find and attach them to this bug so we can take a look? Also, could you provide the link to the download you used? Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 10:39:02 2018 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 24 Oct 2018 14:39:02 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540391942.28.0.788709270274.issue33899@psf.upfronthosting.co.za> Change by Dong-hee Na : ---------- pull_requests: +9411 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 10:40:50 2018 From: report at bugs.python.org (Johannes Frank) Date: Wed, 24 Oct 2018 14:40:50 +0000 Subject: [issue17305] IDNA2008 encoding is missing In-Reply-To: <1361928766.42.0.728949411958.issue17305@psf.upfronthosting.co.za> Message-ID: <1540392050.52.0.788709270274.issue17305@psf.upfronthosting.co.za> Change by Johannes Frank : ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 10:44:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 14:44:36 +0000 Subject: [issue35059] Convert PyObject_INIT() and _Py_NewReference() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540392276.31.0.788709270274.issue35059@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9412 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 10:53:02 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 24 Oct 2018 14:53:02 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540392782.68.0.788709270274.issue33899@psf.upfronthosting.co.za> Terry J. Reedy added the comment: #33766 was about documenting the C tokenizer change, some years ago, that made end-of-file EOF and end-of-string EOS generate the NEWLINE token required to properly terminate statements. "The end of input also serves as an implicit terminator for the final physical line." Although the tokenizer module intentionally does not exactly mirror the C tokenizer (it adds COMMENT tokens), it plausibly seems like a bug that it was not changed along with the C tokenizer, as it has since been tokenizing valid code as grammatically invalid. But I agree that this fix is too disruptive for 2.7. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 11:00:14 2018 From: report at bugs.python.org (Alex Bach) Date: Wed, 24 Oct 2018 15:00:14 +0000 Subject: [issue35058] Unable to Install Python on Windows In-Reply-To: <1540390509.38.0.788709270274.issue35058@psf.upfronthosting.co.za> Message-ID: <1540393214.85.0.788709270274.issue35058@psf.upfronthosting.co.za> Alex Bach added the comment: Hi, I downloaded through this link. https://www.python.org/ftp/python/3.7.1/python-3.7.1.exe Also, I couldn't find any file related to Python in the Temp Folder but I've still attached the screenshot in case it helps. ---------- Added file: https://bugs.python.org/file47890/thread.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 11:36:53 2018 From: report at bugs.python.org (Edward Pratt) Date: Wed, 24 Oct 2018 15:36:53 +0000 Subject: [issue35060] subprocess output seems to depend on size of terminal screen Message-ID: <1540395413.56.0.788709270274.issue35060@psf.upfronthosting.co.za> New submission from Edward Pratt : I am looking for a string inside of a process, and it seems that the output of the check_output command depends on the screen size of the terminal I run the code in. Here I ran the code with a normal screen resolution: >>> result = subprocess.check_output(['ps', 'aux']).decode('ascii', errors='ignore') >>> 'app-id' in result False Then I zoom out to the point where I can barely read the text on the screen, and this is the output I get: >>> result = subprocess.check_output(['ps', 'aux']).decode('ascii', errors='ignore') >>> 'app-id' in result True ---------- components: Demos and Tools messages: 328371 nosy: epsolos priority: normal severity: normal status: open title: subprocess output seems to depend on size of terminal screen type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 11:44:09 2018 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 24 Oct 2018 15:44:09 +0000 Subject: [issue35056] Test leaks of memory not managed by Python allocator In-Reply-To: <1540323419.75.0.788709270274.issue35056@psf.upfronthosting.co.za> Message-ID: <1540395849.78.0.788709270274.issue35056@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 11:50:20 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 24 Oct 2018 15:50:20 +0000 Subject: [issue35058] Unable to Install Python on Windows In-Reply-To: <1540390509.38.0.788709270274.issue35058@psf.upfronthosting.co.za> Message-ID: <1540396220.81.0.788709270274.issue35058@psf.upfronthosting.co.za> Steve Dower added the comment: That's unfortunate that you can't find the log files. Without them, there's nothing we can do to help. Can you try running the installer again? On the last (error) page there should be a link to the main log file. ---------- versions: +Python 3.7 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 11:57:48 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 24 Oct 2018 15:57:48 +0000 Subject: [issue35060] subprocess output seems to depend on size of terminal screen In-Reply-To: <1540395413.56.0.788709270274.issue35060@psf.upfronthosting.co.za> Message-ID: <1540396668.48.0.788709270274.issue35060@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Very strange, I tried with 3.8a and I did not get this issue. Normally we use a pipe for stdin and stdout when we use check_output, so in this case, there is no relation with the size of the terminal. this is just a stream. second point, you explain that you use python 3.5, could you try with 3.6 or 3.7 because 3.5 is in security mode and we won't work on this issue. Thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 12:01:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 16:01:32 +0000 Subject: [issue35059] Convert PyObject_INIT() and _Py_NewReference() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540396892.44.0.788709270274.issue35059@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9413 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 12:02:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 16:02:27 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540396947.18.0.788709270274.issue35059@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: Convert PyObject_INIT() and _Py_NewReference() to inlined functions -> Convert Py_INCREF() and PyObject_INIT() to inlined functions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 12:11:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 16:11:05 +0000 Subject: [issue35053] Enhance tracemalloc to trace properly free lists In-Reply-To: <1540312934.43.0.788709270274.issue35053@psf.upfronthosting.co.za> Message-ID: <1540397465.68.0.788709270274.issue35053@psf.upfronthosting.co.za> STINNER Victor added the comment: Even if Python 3.6 and 3.7 are impacted by the bug, I propose to only fix Python 3.8 since the change modifies a _Py_NewReference() function which is critical for performance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 12:11:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 16:11:56 +0000 Subject: [issue35053] Enhance tracemalloc to trace properly free lists In-Reply-To: <1540312934.43.0.788709270274.issue35053@psf.upfronthosting.co.za> Message-ID: <1540397516.84.0.788709270274.issue35053@psf.upfronthosting.co.za> STINNER Victor added the comment: While writing PR 10063, I was unhappy with _Py_NewReference() macro, and so I wrote bpo-35059 to convert it to a static inline function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 12:12:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 16:12:34 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540397554.21.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: Context: I was unhappy with _Py_NewReference() macro implementation when I had to modify it to fix a bug, bpo-35053. That's why I would like to convert it to a static inline function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 12:31:13 2018 From: report at bugs.python.org (Marcus) Date: Wed, 24 Oct 2018 16:31:13 +0000 Subject: [issue34895] Mark optional stdlib modules in documentation In-Reply-To: <1538670818.19.0.545547206417.issue34895@psf.upfronthosting.co.za> Message-ID: <1540398673.4.0.788709270274.issue34895@psf.upfronthosting.co.za> Marcus added the comment: My concern is that certain missing build-time dependencies do not stop the build but trigger an easy to miss message at the end of the build stage (only). Also the end user doesn't get to see this. At the same time these modules are sort of expected to be part of a complete Python distribution. Two issues I see with this: 1. By omission, the distributor might inadvertently create an incomplete distribution. 2. The enduser, running a script (possibly created elsewhere) receives a standard ?ModuleNotFoundError? and is left in the dark about its origin as the documentation seems to confirm that the affected module ought to be available. $ grep -F missing.append setup.py missing.append('spwd') missing.append('readline') missing.append('_ssl') missing.append('_hashlib') missing.append('_sqlite3') missing.append('_dbm') missing.append('_gdbm') missing.append('nis') missing.append('_curses') missing.append('_curses_panel') missing.append('zlib') missing.append('zlib') missing.append('zlib') missing.append('_bz2') missing.append('_lzma') missing.append('_elementtree') missing.append('ossaudiodev') missing.append('_tkinter') missing.append('_uuid') All modules in the above list are potentially affected, although some (ossaudiodev, nis) might be considered platform specific. Arguably availablility some of these modules could be perhaps turned into build-time requirements with opt-out mechanics. In any case a hint to the end user debugging such issues would be rather helpful and a big timesaver (see initial report). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 12:41:40 2018 From: report at bugs.python.org (Petter S) Date: Wed, 24 Oct 2018 16:41:40 +0000 Subject: [issue35047] Better error messages in unittest.mock In-Reply-To: <1540283736.06.0.788709270274.issue35047@psf.upfronthosting.co.za> Message-ID: <1540399300.96.0.788709270274.issue35047@psf.upfronthosting.co.za> Petter S added the comment: Sure, consider the following code: from unittest import mock m = mock.Mock() m(1, 3) m("Test", data=[42]) When I call m.assert_not_called() I get the following error message: AssertionError: Expected 'mock' to not have been called. Called 2 times. This is what I would like to improve. On the other hand, if I call m.assert_has_calls(mock.call(3)) I get the following error: AssertionError: Calls not found. Expected: ['', (3,), {}] Actual: [call(1, 3), call('Test', data=[42])] This is great and may serve as a template for what I want to introduce. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 12:43:47 2018 From: report at bugs.python.org (Petter S) Date: Wed, 24 Oct 2018 16:43:47 +0000 Subject: [issue35047] Better error messages in unittest.mock In-Reply-To: <1540283736.06.0.788709270274.issue35047@psf.upfronthosting.co.za> Message-ID: <1540399427.81.0.788709270274.issue35047@psf.upfronthosting.co.za> Petter S added the comment: (The example above should have been "m.assert_has_calls([mock.call(3)])" but it does not affect my point.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 13:05:43 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Oct 2018 17:05:43 +0000 Subject: [issue35057] Email header refolding adds additional \r in nested parse trees In-Reply-To: <1540382093.01.0.788709270274.issue35057@psf.upfronthosting.co.za> Message-ID: <1540400743.3.0.788709270274.issue35057@psf.upfronthosting.co.za> R. David Murray added the comment: Thank you for the report. This is a duplicate of #34424, which has a PR. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 13:07:59 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Oct 2018 17:07:59 +0000 Subject: [issue34424] Unicode names break email header In-Reply-To: <1534546922.5.0.56676864532.issue34424@psf.upfronthosting.co.za> Message-ID: <1540400879.59.0.788709270274.issue34424@psf.upfronthosting.co.za> R. David Murray added the comment: I've requested some small changes on the PR. If Jens doesn't respond in another week or so someone else could pick it up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 13:10:07 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Oct 2018 17:10:07 +0000 Subject: [issue34424] Unicode names break email header In-Reply-To: <1534546922.5.0.56676864532.issue34424@psf.upfronthosting.co.za> Message-ID: <1540401007.56.0.788709270274.issue34424@psf.upfronthosting.co.za> R. David Murray added the comment: Michael, if you could check if Jens patch fixes your problem I would appreciate it. ---------- nosy: +michael.thies _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 13:32:27 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 24 Oct 2018 17:32:27 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540402347.77.0.788709270274.issue33899@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset a1f45ec73f0486b187633e7ebc0a4f559d29d7d9 by Benjamin Peterson (Tal Einat) in branch '2.7': bpo-33899: Revert tokenize module adding an implicit final NEWLINE (GH-10072) https://github.com/python/cpython/commit/a1f45ec73f0486b187633e7ebc0a4f559d29d7d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 13:40:45 2018 From: report at bugs.python.org (Eryk Sun) Date: Wed, 24 Oct 2018 17:40:45 +0000 Subject: [issue35060] subprocess output seems to depend on size of terminal screen In-Reply-To: <1540395413.56.0.788709270274.issue35060@psf.upfronthosting.co.za> Message-ID: <1540402845.64.0.788709270274.issue35060@psf.upfronthosting.co.za> Eryk Sun added the comment: This is due to the ps command itself. You'd have the same problem when piping to grep or redirecting output to a file. I don't know how it determines terminal size. I tried overriding stdin, stdout and stderr to pipes and calling setsid() in the forked child process to detach from the controlling terminal, but it still detected the terminal size. Anyway, the "ww" option of ps overrides this behavior. ---------- nosy: +eryksun resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 14:17:11 2018 From: report at bugs.python.org (Brett Cannon) Date: Wed, 24 Oct 2018 18:17:11 +0000 Subject: [issue35051] Fix pep8 on Lib/turtledemo module In-Reply-To: <1540301944.91.0.788709270274.issue35051@psf.upfronthosting.co.za> Message-ID: <1540405031.98.0.788709270274.issue35051@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 14:46:00 2018 From: report at bugs.python.org (Edward Pratt) Date: Wed, 24 Oct 2018 18:46:00 +0000 Subject: [issue35060] subprocess output seems to depend on size of terminal screen In-Reply-To: <1540402845.64.0.788709270274.issue35060@psf.upfronthosting.co.za> Message-ID: <5E22568C-C678-4073-93EA-DE82A2EB059F@gmail.com> Edward Pratt added the comment: I don?t think that is true. I tried grepping for what I need in a very small terminal and still got the correct result. > On Oct 24, 2018, at 1:40 PM, Eryk Sun wrote: > > > Eryk Sun added the comment: > > This is due to the ps command itself. You'd have the same problem when piping to grep or redirecting output to a file. I don't know how it determines terminal size. I tried overriding stdin, stdout and stderr to pipes and calling setsid() in the forked child process to detach from the controlling terminal, but it still detected the terminal size. Anyway, the "ww" option of ps overrides this behavior. > > ---------- > nosy: +eryksun > resolution: -> third party > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 15:16:58 2018 From: report at bugs.python.org (Emmanuel Arias) Date: Wed, 24 Oct 2018 19:16:58 +0000 Subject: [issue35047] Better error messages in unittest.mock In-Reply-To: <1540283736.06.0.788709270274.issue35047@psf.upfronthosting.co.za> Message-ID: <1540408618.98.0.788709270274.issue35047@psf.upfronthosting.co.za> Emmanuel Arias added the comment: I think that is a good change. Maybe you can apply the change on 3.6, 3.7 and 3.8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 15:42:52 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 24 Oct 2018 19:42:52 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1540410172.62.0.788709270274.issue33012@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- nosy: +gregory.p.smith versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 15:48:07 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 24 Oct 2018 19:48:07 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1540410487.18.0.788709270274.issue33015@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I left comments on the github PRs with reasons why, but PR 6008 seems correct. PR 10057 would leave us with undefined behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 15:52:11 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 24 Oct 2018 19:52:11 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1540410731.02.0.788709270274.issue33015@psf.upfronthosting.co.za> Gregory P. Smith added the comment: This is presumably also present in 3.6 and 2.7 so I've tagged those on the issue, but for this kind of change i'd leave it up to release managers to see if they want to backport something of this nature that late in those release cycles. Observable side effect: It adds a small memory allocation & free around every thread creation and an additional small C stack frame. I do not expect that to be observable performance wise given CPython threading not being a high performer thanks to the GIL anyways. ---------- versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 15:54:02 2018 From: report at bugs.python.org (paul j3) Date: Wed, 24 Oct 2018 19:54:02 +0000 Subject: [issue35049] argparse.ArgumentParser fails on arguments with leading dash and comma In-Reply-To: <1540290412.14.0.788709270274.issue35049@psf.upfronthosting.co.za> Message-ID: <1540410842.09.0.788709270274.issue35049@psf.upfronthosting.co.za> paul j3 added the comment: I think it's the same issue. A dash argument that is not clearly a number is interpreted as an optional's flag. With few exceptions, the parser does not examine the contents of the string It tests the initial character, it tests for space, it tests for numbers (I'm not sure scientific notation is accepted). That's about it. Argparse has a minimum of constrains on what is a valid flag string. For example, the following is ok: parser.add_argument('-1,2') # appearing the namespace as: Namespace(**{'1,2': None}) ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 15:54:37 2018 From: report at bugs.python.org (paul j3) Date: Wed, 24 Oct 2018 19:54:37 +0000 Subject: [issue35049] argparse.ArgumentParser fails on arguments with leading dash and comma In-Reply-To: <1540290412.14.0.788709270274.issue35049@psf.upfronthosting.co.za> Message-ID: <1540410877.29.0.788709270274.issue35049@psf.upfronthosting.co.za> Change by paul j3 : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 16:05:10 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 24 Oct 2018 20:05:10 +0000 Subject: [issue23460] Decimals do not obey ':g' exponential notation formatting rules In-Reply-To: <1423847721.13.0.666007782647.issue23460@psf.upfronthosting.co.za> Message-ID: <1540411510.91.0.788709270274.issue23460@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- nosy: +sir-sigurd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 16:29:03 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 24 Oct 2018 20:29:03 +0000 Subject: [issue35060] subprocess output seems to depend on size of terminal screen In-Reply-To: <1540395413.56.0.788709270274.issue35060@psf.upfronthosting.co.za> Message-ID: <1540412943.21.0.788709270274.issue35060@psf.upfronthosting.co.za> St?phane Wirtel added the comment: just one question, did you use this command in the REPL? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 16:34:27 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 24 Oct 2018 20:34:27 +0000 Subject: [issue35060] subprocess output seems to depend on size of terminal screen In-Reply-To: <1540395413.56.0.788709270274.issue35060@psf.upfronthosting.co.za> Message-ID: <1540413267.35.0.788709270274.issue35060@psf.upfronthosting.co.za> St?phane Wirtel added the comment: My script: #!/usr/bin/env python import pathlib import subprocess output = subprocess.check_output(['ps', 'aux']) pathlib.Path('/tmp/ps_aux.txt').write_bytes(output) When I execute the following script in the REPL, I get your issue but for me, it's normal because the REPL is running in a terminal with a limited size. And when I execute the same script like as a simple python script, I don't have your issue. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 16:38:09 2018 From: report at bugs.python.org (Edward Pratt) Date: Wed, 24 Oct 2018 20:38:09 +0000 Subject: [issue35060] subprocess output seems to depend on size of terminal screen In-Reply-To: <1540413267.35.0.788709270274.issue35060@psf.upfronthosting.co.za> Message-ID: <6166A6FD-2656-4BEC-88E7-8BAF3B994A8D@gmail.com> Edward Pratt added the comment: You are correct. It works as expected outside of the REPL. > On Oct 24, 2018, at 4:34 PM, St?phane Wirtel wrote: > > > St?phane Wirtel added the comment: > > My script: > > #!/usr/bin/env python > import pathlib > import subprocess > > output = subprocess.check_output(['ps', 'aux']) > pathlib.Path('/tmp/ps_aux.txt').write_bytes(output) > > > When I execute the following script in the REPL, I get your issue but for me, it's normal because the REPL is running in a terminal with a limited size. > > And when I execute the same script like as a simple python script, I don't have your issue. > > ---------- > status: closed -> open > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 17:09:04 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 24 Oct 2018 21:09:04 +0000 Subject: [issue35060] subprocess output seems to depend on size of terminal screen In-Reply-To: <1540395413.56.0.788709270274.issue35060@psf.upfronthosting.co.za> Message-ID: <1540415344.85.0.788709270274.issue35060@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Here is the doc from ps with man. > man ps If ps cannot determine display width, as when output is redirected (piped) into a file or another command, the output width is undefined (it may be 80, unlimited, determined by the TERM variable, and so on). The COLUMNS environment variable or --cols option may be used to exactly determine the width in this case. The w or -w option may be also be used to adjust width. -w Wide output. Use this option twice for unlimited width. So for my part, in my terminal, the COLUMNS envvar is different in function of the size of my window, from 86 to 131 etc... so, I think we can definitively close this issue. Thank you, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 17:09:19 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 24 Oct 2018 21:09:19 +0000 Subject: [issue35060] subprocess output seems to depend on size of terminal screen In-Reply-To: <1540395413.56.0.788709270274.issue35060@psf.upfronthosting.co.za> Message-ID: <1540415359.09.0.788709270274.issue35060@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 17:22:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 21:22:35 +0000 Subject: [issue34260] shutil.copy2 is not the same as cp -p In-Reply-To: <1532781781.14.0.56676864532.issue34260@psf.upfronthosting.co.za> Message-ID: <1540416155.55.0.788709270274.issue34260@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 4a59c9699ca8688359c460f98127a12e2db6e63b by Victor Stinner (Zsolt Cserna) in branch '2.7': [2.7] bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523) (GH-10071) https://github.com/python/cpython/commit/4a59c9699ca8688359c460f98127a12e2db6e63b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 17:23:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 21:23:19 +0000 Subject: [issue34260] shutil.copy2 is not the same as cp -p In-Reply-To: <1532781781.14.0.56676864532.issue34260@psf.upfronthosting.co.za> Message-ID: <1540416199.6.0.788709270274.issue34260@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Zsolt Cserna for the report and for the documentation enhancements! The doc is now way better. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 17:32:07 2018 From: report at bugs.python.org (Daniel Pope) Date: Wed, 24 Oct 2018 21:32:07 +0000 Subject: [issue34272] Reorganize C API tests In-Reply-To: <1532868961.04.0.56676864532.issue34272@psf.upfronthosting.co.za> Message-ID: <1540416727.29.0.788709270274.issue34272@psf.upfronthosting.co.za> Change by Daniel Pope : ---------- pull_requests: +9414 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 17:40:28 2018 From: report at bugs.python.org (Tim Graham) Date: Wed, 24 Oct 2018 21:40:28 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540417228.03.0.788709270274.issue33899@psf.upfronthosting.co.za> Change by Tim Graham : ---------- pull_requests: +9415 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 18:23:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 22:23:52 +0000 Subject: [issue31553] Extend json.tool to handle jsonlines (with a flag) In-Reply-To: <1506098466.58.0.224432895447.issue31553@psf.upfronthosting.co.za> Message-ID: <1540419832.19.0.788709270274.issue31553@psf.upfronthosting.co.za> STINNER Victor added the comment: > The output is not a valid JSON format, and is not a valid JSON Lines format. What you are going to do with it? It looks useful to me to read a nicely indented JSON in the terminal (without specifying an output file). It's more readable that compact JSON on a single line. But should we add an option to write the output on a single line? It would be the opposite of the tool description: "A simple command line interface for json module to validate and *pretty-print* JSON objects." ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 18:45:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 22:45:27 +0000 Subject: [issue35039] remove unused vars in Lib/turtledemo module In-Reply-To: <1540210437.89.0.788709270274.issue35039@psf.upfronthosting.co.za> Message-ID: <1540421127.21.0.788709270274.issue35039@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 Oct 24 18:45:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 22:45:45 +0000 Subject: [issue35039] remove unused vars in Lib/turtledemo module In-Reply-To: <1540210437.89.0.788709270274.issue35039@psf.upfronthosting.co.za> Message-ID: <1540421145.79.0.788709270274.issue35039@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks ?????????? ?????? ????????? for your fix ;-) ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 18:47:40 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 22:47:40 +0000 Subject: [issue14117] Turtledemo: exception and minor glitches. In-Reply-To: <1330120365.77.0.428280648922.issue14117@psf.upfronthosting.co.za> Message-ID: <1540421260.92.0.788709270274.issue14117@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-35039 which removed now useless clock() calls from Lib/turtledemo/penrose.py. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 18:50:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 22:50:29 +0000 Subject: [issue35027] distutils.core.setup does not raise TypeError when if classifiers, keywords and platforms fields are not specified as a list In-Reply-To: <1539963671.26.0.788709270274.issue35027@psf.upfronthosting.co.za> Message-ID: <1540421429.67.0.788709270274.issue35027@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e80e77a484983ffb527ef22d336ff9500589dce3 by Victor Stinner (TilmanK) in branch 'master': bpo-35027, distutils doc: Correct note on setup.py change in Python 3.7 (GH-10032) https://github.com/python/cpython/commit/e80e77a484983ffb527ef22d336ff9500589dce3 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 18:50:40 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Oct 2018 22:50:40 +0000 Subject: [issue35027] distutils.core.setup does not raise TypeError when if classifiers, keywords and platforms fields are not specified as a list In-Reply-To: <1539963671.26.0.788709270274.issue35027@psf.upfronthosting.co.za> Message-ID: <1540421440.56.0.788709270274.issue35027@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9416 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 18:59:22 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Oct 2018 22:59:22 +0000 Subject: [issue35027] distutils.core.setup does not raise TypeError when if classifiers, keywords and platforms fields are not specified as a list In-Reply-To: <1539963671.26.0.788709270274.issue35027@psf.upfronthosting.co.za> Message-ID: <1540421962.54.0.788709270274.issue35027@psf.upfronthosting.co.za> miss-islington added the comment: New changeset f2679afda06d1eeaf34852e49bbcf4fb39736d19 by Miss Islington (bot) in branch '3.7': bpo-35027, distutils doc: Correct note on setup.py change in Python 3.7 (GH-10032) https://github.com/python/cpython/commit/f2679afda06d1eeaf34852e49bbcf4fb39736d19 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 19:05:21 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 23:05:21 +0000 Subject: [issue35030] Python 2.7 OrderedDict creates circular references In-Reply-To: <1540024622.42.0.788709270274.issue35030@psf.upfronthosting.co.za> Message-ID: <1540422321.62.0.788709270274.issue35030@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +eric.snow, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 19:15:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 23:15:56 +0000 Subject: [issue34866] CGI DOS vulnerability via long post list In-Reply-To: <1538429007.97.0.545547206417.issue34866@psf.upfronthosting.co.za> Message-ID: <1540422956.66.0.788709270274.issue34866@psf.upfronthosting.co.za> STINNER Victor added the comment: > https://github.com/python/cpython/commit/209144831b0a19715bda3bd72b14a3e6192d9cc1 This commit adds a new max_num_fields=None parameter to FieldStorage, parse_qs() and parse_qsl(): you must update the documentation in Doc/library/ as well. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 19:17:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 23:17:57 +0000 Subject: [issue34866] CGI DOS vulnerability via long post list In-Reply-To: <1538429007.97.0.545547206417.issue34866@psf.upfronthosting.co.za> Message-ID: <1540423077.07.0.788709270274.issue34866@psf.upfronthosting.co.za> STINNER Victor added the comment: For 3.7 an 3.6 changes, you have to specify the minor Python version (3.7.x and 3.6.x) in which the change has been introduce. Same comment for Python 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 19:34:50 2018 From: report at bugs.python.org (Aaron Hall) Date: Wed, 24 Oct 2018 23:34:50 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540424090.72.0.788709270274.issue35059@psf.upfronthosting.co.za> Change by Aaron Hall : ---------- nosy: +Aaron Hall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 19:54:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Oct 2018 23:54:25 +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: <1540425265.86.0.788709270274.issue28015@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 5ad36f9b21a3aa3b2265b1b43d73522cc3322df2 by Victor Stinner (serge-sans-paille) in branch 'master': bpo-28015: Support LTO build with clang (GH-9908) https://github.com/python/cpython/commit/5ad36f9b21a3aa3b2265b1b43d73522cc3322df2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 20:00:29 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Oct 2018 00:00:29 +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: <1540425629.33.0.788709270274.issue28015@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9417 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 20:00:33 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Oct 2018 00:00:33 +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: <1540425633.1.0.788709270274.issue28015@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9417, 9418 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 20:05:15 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 25 Oct 2018 00:05:15 +0000 Subject: [issue35030] Python 2.7 OrderedDict creates circular references In-Reply-To: <1540024622.42.0.788709270274.issue35030@psf.upfronthosting.co.za> Message-ID: <1540425915.4.0.788709270274.issue35030@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 20:06:09 2018 From: report at bugs.python.org (Maxime Belanger) Date: Thu, 25 Oct 2018 00:06:09 +0000 Subject: [issue32285] In `unicodedata`, it should be possible to check a unistr's normal form without necessarily copying it In-Reply-To: <1513041370.04.0.213398074469.issue32285@psf.upfronthosting.co.za> Message-ID: <1540425969.01.0.788709270274.issue32285@psf.upfronthosting.co.za> Change by Maxime Belanger : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 20:28:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 00:28:36 +0000 Subject: [issue35030] Python 2.7 OrderedDict creates circular references In-Reply-To: <1540024622.42.0.788709270274.issue35030@psf.upfronthosting.co.za> Message-ID: <1540427316.16.0.788709270274.issue35030@psf.upfronthosting.co.za> STINNER Victor added the comment: rhettinger: "status: open -> closed" I guess that https://github.com/python/cpython/pull/10002 should be closed as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 20:32:09 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Oct 2018 00:32:09 +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: <1540427529.39.0.788709270274.issue28015@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 69a3f153a92fd8c86080e8da477ee50df18fc0d1 by Miss Islington (bot) in branch '3.7': bpo-28015: Support LTO build with clang (GH-9908) https://github.com/python/cpython/commit/69a3f153a92fd8c86080e8da477ee50df18fc0d1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 20:59:53 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Oct 2018 00:59:53 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540429193.59.0.788709270274.issue33899@psf.upfronthosting.co.za> Change by Ned Deily : ---------- pull_requests: -9415 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 21:00:21 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Oct 2018 01:00:21 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540429221.03.0.788709270274.issue33899@psf.upfronthosting.co.za> Change by Ned Deily : ---------- pull_requests: -9411 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 24 22:04:30 2018 From: report at bugs.python.org (Yongkwan Kim) Date: Thu, 25 Oct 2018 02:04:30 +0000 Subject: [issue35061] Specify libffi.so soname for ctypes Message-ID: <1540433070.81.0.788709270274.issue35061@psf.upfronthosting.co.za> New submission from Yongkwan Kim : As python 3.7 excludes libffi from it's package, my build on centos6 doesn't work on centos7. Error message is following. ImportError: libffi.so.5: cannot open shared object file: No such file or directory centos7 have libffi.so.6 instead of libffi.so.5 as does centos6. I hope to specify libffi version with libffi.so. I figured out that any configure option can fix this through seeing setup.py . Thanks in advance. ---------- messages: 328406 nosy: tturbs priority: normal severity: normal status: open title: Specify libffi.so soname for ctypes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 00:03:41 2018 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 25 Oct 2018 04:03:41 +0000 Subject: [issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field Message-ID: <1540440221.28.0.788709270274.issue35062@psf.upfronthosting.co.za> New submission from Xiang Zhang : io.IncrementalNewlineDecoder gets a *translate* bitwise struct field, but it could be assigned arbitrary int value. This leads to inconsistent behaviour, evens are evaluated to False and odds to True. >>> io.IncrementalNewlineDecoder(encodings.utf_8.IncrementalDecoder(), 4).decode(b"abcd\r\n") u'abcd\r\n' >>> io.IncrementalNewlineDecoder(encodings.utf_8.IncrementalDecoder(), 5).decode(b"abcd\r\n") u'abcd\n' ---------- components: IO messages: 328407 nosy: xiang.zhang priority: normal severity: normal stage: needs patch status: open title: io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field type: behavior versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 00:26:44 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 25 Oct 2018 04:26:44 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540441604.03.0.788709270274.issue35059@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Does this slow down debug builds at all? It probably will not end will if Py_INCREF is ever not inlined. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 00:30:02 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 25 Oct 2018 04:30:02 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1540441802.96.0.788709270274.issue33015@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Shall we introduce a new thread-starting API that takes a function with the "correct" pthread signature? It seems like Windows already allocates. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 01:06:25 2018 From: report at bugs.python.org (Michael Airey) Date: Thu, 25 Oct 2018 05:06:25 +0000 Subject: [issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS In-Reply-To: <1520335093.04.0.467229070634.issue33012@psf.upfronthosting.co.za> Message-ID: <1540443985.94.0.788709270274.issue33012@psf.upfronthosting.co.za> Michael Airey added the comment: Try this - https://github.com/siddhesh/cpython/tree/func-cast ---------- nosy: +resmord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 01:14:51 2018 From: report at bugs.python.org (Michael Airey) Date: Thu, 25 Oct 2018 05:14: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: <1540444491.34.0.788709270274.issue35050@psf.upfronthosting.co.za> Michael Airey added the comment: The error checking code for salg_name and salg_type have an off-by-one bug. Must check that both strings are NUL terminated strings. ---------- nosy: +resmord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 01:25:32 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 25 Oct 2018 05:25:32 +0000 Subject: [issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field In-Reply-To: <1540440221.28.0.788709270274.issue35062@psf.upfronthosting.co.za> Message-ID: <1540445132.77.0.788709270274.issue35062@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 01:28:08 2018 From: report at bugs.python.org (Michael Airey) Date: Thu, 25 Oct 2018 05:28:08 +0000 Subject: [issue35058] Unable to Install Python on Windows In-Reply-To: <1540390509.38.0.788709270274.issue35058@psf.upfronthosting.co.za> Message-ID: <1540445288.02.0.788709270274.issue35058@psf.upfronthosting.co.za> Michael Airey added the comment: Did you try to use SubInACL tool by Microsoft? Perhaps, it can fix your issue. Here, I'm adding references for the same i.e. download link & guide (Method #13) to use it: 1. https://www.microsoft.com/en-in/download/details.aspx?id=23510 2. https://validedge.com/0x80070643/ ---------- nosy: +resmord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 02:00:23 2018 From: report at bugs.python.org (Alex Bach) Date: Thu, 25 Oct 2018 06:00:23 +0000 Subject: [issue35058] Unable to Install Python on Windows In-Reply-To: <1540390509.38.0.788709270274.issue35058@psf.upfronthosting.co.za> Message-ID: <1540447223.51.0.788709270274.issue35058@psf.upfronthosting.co.za> Alex Bach added the comment: Hi Michael, Thanks for reaching out. Let me try these links. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 02:52:09 2018 From: report at bugs.python.org (Zsolt Cserna) Date: Thu, 25 Oct 2018 06:52:09 +0000 Subject: [issue34260] shutil.copy2 is not the same as cp -p In-Reply-To: <1532781781.14.0.56676864532.issue34260@psf.upfronthosting.co.za> Message-ID: <1540450329.8.0.788709270274.issue34260@psf.upfronthosting.co.za> Zsolt Cserna added the comment: Thanks for your help! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 03:03:07 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Oct 2018 07:03:07 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1540450987.64.0.788709270274.issue33015@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Shall we introduce a new thread-starting API that takes a function with the "correct" pthread signature? Do we need it? I don't think saving a single memory allocation is worth the bother. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 03:09:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 07:09:01 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540451341.08.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: I tested PR 10079 using gdb on Fedora 28 with GCC 8.1.1 to check if Py_INCREF/Py_DECREF functions are inlined. I understand that "static inline void Py_INCREF()" is *not* inline by gcc -O0, but it *is* inlined using gcc -Og which is the *default* optimization level of ./configure --with-debug. To develop on Python, I force -O0, because the compilation time matters more than runtime performance for me :-) Compilation on my laptop using MAKEFLAGS=-j9: * -O0: 21s * -0g: 36s (1.7x slower) ... But Py_INCREF/DECREF are always inlined, even with -O0, when using __attribute__((always_inline))! I will work on a change to use that. == gcc -O0 == (gdb) disassemble Py_IncRef Dump of assembler code for function Py_IncRef: ... 0x000000000047276a <+20>: cmpq $0x0,-0x8(%rbp) 0x000000000047276f <+25>: je 0x47277d 0x0000000000472771 <+27>: mov -0x8(%rbp),%rax 0x0000000000472775 <+31>: mov %rax,%rdi 0x0000000000472778 <+34>: callq 0x472523 <_Py_INCREF> 0x000000000047277d <+39>: nop 0x000000000047277e <+40>: leaveq 0x000000000047277f <+41>: retq (gdb) disassemble Py_DecRef Dump of assembler code for function Py_DecRef: ... 0x0000000000472794 <+20>: cmpq $0x0,-0x8(%rbp) 0x0000000000472799 <+25>: je 0x4727b1 0x000000000047279b <+27>: mov -0x8(%rbp),%rax 0x000000000047279f <+31>: mov %rax,%rdx 0x00000000004727a2 <+34>: mov $0xe1,%esi 0x00000000004727a7 <+39>: mov $0x65c550,%edi 0x00000000004727ac <+44>: callq 0x472554 <_Py_DECREF> 0x00000000004727b1 <+49>: nop 0x00000000004727b2 <+50>: leaveq 0x00000000004727b3 <+51>: retq == gcc -Og == (gdb) disassemble Py_IncRef Dump of assembler code for function Py_IncRef: 0x0000000000462de2 <+0>: test %rdi,%rdi 0x0000000000462de5 <+3>: je 0x462dfb 0x0000000000462de7 <+5>: addq $0x1,0x4bfc09(%rip) # 0x9229f8 <_Py_RefTotal> 0x0000000000462def <+13>: mov 0x10(%rdi),%rax 0x0000000000462df3 <+17>: add $0x1,%rax 0x0000000000462df7 <+21>: mov %rax,0x10(%rdi) 0x0000000000462dfb <+25>: retq (gdb) disassemble Py_DecRef Dump of assembler code for function Py_DecRef: 0x0000000000463b2e <+0>: test %rdi,%rdi 0x0000000000463b31 <+3>: je 0x463b6f 0x0000000000463b33 <+5>: sub $0x8,%rsp 0x0000000000463b37 <+9>: subq $0x1,0x4beeb9(%rip) # 0x9229f8 <_Py_RefTotal> 0x0000000000463b3f <+17>: mov 0x10(%rdi),%rax 0x0000000000463b43 <+21>: sub $0x1,%rax 0x0000000000463b47 <+25>: mov %rax,0x10(%rdi) 0x0000000000463b4b <+29>: je 0x463b68 0x0000000000463b4d <+31>: js 0x463b54 0x0000000000463b4f <+33>: add $0x8,%rsp 0x0000000000463b53 <+37>: retq 0x0000000000463b54 <+38>: mov %rdi,%rdx 0x0000000000463b57 <+41>: mov $0xe1,%esi 0x0000000000463b5c <+46>: mov $0x5e1120,%edi 0x0000000000463b61 <+51>: callq 0x462da4 <_Py_NegativeRefcount> 0x0000000000463b66 <+56>: jmp 0x463b4f 0x0000000000463b68 <+58>: callq 0x463b0c <_Py_Dealloc> 0x0000000000463b6d <+63>: jmp 0x463b4f 0x0000000000463b6f <+65>: retq ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 03:18:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 07:18:24 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1540451904.32.0.788709270274.issue33015@psf.upfronthosting.co.za> STINNER Victor added the comment: "Shall we introduce a new thread-starting API that takes a function with the "correct" pthread signature?" Extract of my PR: "Python uses pthread_detach() and doesn't use pthread_join(), the thread return value is ignored." Python doesn't give access to the return value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 03:20:10 2018 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Thu, 25 Oct 2018 07:20:10 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540452010.52.0.788709270274.issue35059@psf.upfronthosting.co.za> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- nosy: +thatiparthy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 03:34:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 07:34:03 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540452843.15.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: I modified PR 10079 to add a Py_STATIC_INLINE(TYPE) macro: * Use __attribute__((always_inline)) with GCC and clang * Use __forceinline with MSVC Tests on Linux, example: "./configure --with-pydebug CC=clang CFLAGS="-O0" && make clean && make platform" * Linux, gcc -O0: inlined * Linux, clang -O0: inlined Test done on Fedora 28 with GCC 8.1.1 and clang 6.0.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 04:02:27 2018 From: report at bugs.python.org (Petter S) Date: Thu, 25 Oct 2018 08:02:27 +0000 Subject: [issue34547] Wsgiref server does not handle closed connections gracefully In-Reply-To: <1535624235.67.0.56676864532.issue34547@psf.upfronthosting.co.za> Message-ID: <1540454547.59.0.788709270274.issue34547@psf.upfronthosting.co.za> Change by Petter S : ---------- pull_requests: +9419 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 04:03:31 2018 From: report at bugs.python.org (Petter S) Date: Thu, 25 Oct 2018 08:03:31 +0000 Subject: [issue35047] Better error messages in unittest.mock In-Reply-To: <1540283736.06.0.788709270274.issue35047@psf.upfronthosting.co.za> Message-ID: <1540454611.94.0.788709270274.issue35047@psf.upfronthosting.co.za> Change by Petter S : ---------- keywords: +patch pull_requests: +9420 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 04:12:04 2018 From: report at bugs.python.org (Petter S) Date: Thu, 25 Oct 2018 08:12:04 +0000 Subject: [issue34547] Wsgiref server does not handle closed connections gracefully In-Reply-To: <1535624235.67.0.56676864532.issue34547@psf.upfronthosting.co.za> Message-ID: <1540455124.73.0.788709270274.issue34547@psf.upfronthosting.co.za> Change by Petter S : ---------- pull_requests: -9419 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 04:51:44 2018 From: report at bugs.python.org (Antony Lee) Date: Thu, 25 Oct 2018 08:51:44 +0000 Subject: [issue35063] Checking for abstractmethod implementation fails to consider MRO for builtins Message-ID: <1540457504.91.0.788709270274.issue35063@psf.upfronthosting.co.za> New submission from Antony Lee : When checking whether a class implements all abstractmethods (to know whether the class can be instantiated), one should only consider methods that come *before* the abstractmethod in the MRO -- methods that come after cannot be said to override the abstractmethod. Indeed, this is currently the case: from abc import ABC, abstractmethod class NeedsFoo(ABC): foo = abstractmethod(lambda self: None) class HasFoo(ABC): foo = lambda self: None class FooImplFirst(HasFoo, NeedsFoo): pass class FooImplSecond(NeedsFoo, HasFoo): pass FooImplFirst() try: FooImplSecond() except TypeError: pass else: raise Exception("Expected error") Here FooImplFirst correctly overrides the foo method (using the HasFoo mixin first), so can be instantiated; FooImplSecond doesn't (by the MRO, FooImplSecond().foo would resolve to the abstract implementation), and we get a TypeError on instantiation. However, this is not the case when considering builtins: from abc import ABC, abstractmethod class NeedsKeys(ABC): keys = abstractmethod(lambda self: None) HasKeys = dict # dict has a keys method. class KeysImplFirst(HasKeys, NeedsKeys): pass class KeysImplSecond(NeedsKeys, HasKeys): pass KeysImplFirst() try: KeysImplSecond() except TypeError: pass else: raise Exception("Expected error") This example differs from the first only by having dict be the mixin that provides the keys method. However, running this example shows that KeysImplSecond() will incorrectly succeed: the ABC machinery does not realize that the keys method has not been overridden. (Alternatively, one could say that "providing the method later in the MRO" is also sufficient; I think that goes against the expectations about ABCs but at least consistency between the non-builtin and builtin cases would be better.) ---------- components: Library (Lib) messages: 328419 nosy: Antony.Lee priority: normal severity: normal status: open title: Checking for abstractmethod implementation fails to consider MRO for builtins versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 05:11:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 09:11:10 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540458670.32.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: On Windows, a Debug build doesn't inline Py_INCREF/DECREF even if it uses __forceinline. I looked at the Py_IncRef() and Py_DecRef() assembly in Visual Studio using a breakpoint. Using /Ob1, Py_INCREF/DECREF are inlined as expected. I set this option in the pythoncore project. Do you think that I should modify the 38 other projects of the pcbuild solution to enable /Ob1 in debug build? Documentations. Inline Functions (C++): https://docs.microsoft.com/en-us/cpp/cpp/inline-functions-cpp?view=vs-2017 -Od: disable optimization ("d" stands for Debug) https://msdn.microsoft.com/en-us/library/aafb762y.aspx /Ob (Inline Function Expansion): https://msdn.microsoft.com/en-us/library/47238hez.aspx ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 05:34:21 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 09:34:21 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540460061.31.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, I confirm that Py_XINCREF() is properly inlined in Py_IncRef() with the latest version of my PR 10079. I tested: * gcc -O0 * clang -O0 * MSVC: x64 build in Debug mode ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 06:13:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 10:13:55 +0000 Subject: [issue35064] COUNT_ALLOCS build export inc_count() and dec_count() functions which don't have a "Py_" prefix Message-ID: <1540462435.94.0.788709270274.issue35064@psf.upfronthosting.co.za> New submission from STINNER Victor : Extract of Include/object.c: #ifdef COUNT_ALLOCS PyAPI_FUNC(void) inc_count(PyTypeObject *); PyAPI_FUNC(void) dec_count(PyTypeObject *); The "make smelly" fails with 10 symbols: --- $ ./configure --with-pydebug CFLAGS="-D COUNT_ALLOCS -O0" $ make smelly (...) ./python Tools/scripts/smelly.py + nm -p libpython3.8dm.a Ignored symbol types: b, d, r, t Smelly symbol: dec_count (type: T) Smelly symbol: dump_counts (type: T) Smelly symbol: fast_tuple_allocs (type: C) Smelly symbol: get_counts (type: T) Smelly symbol: inc_count (type: T) Smelly symbol: null_strings (type: C) Smelly symbol: one_strings (type: C) Smelly symbol: quick_int_allocs (type: C) Smelly symbol: quick_neg_int_allocs (type: C) Smelly symbol: tuple_zero_allocs (type: C) ERROR: Found 10 smelly symbols! --- These functions should be made private (declared with "static") or get a "Py_" prefix. ---------- components: Interpreter Core messages: 328422 nosy: vstinner priority: normal severity: normal status: open versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 06:25:33 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2018 10:25:33 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540463133.17.0.788709270274.issue35059@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is it guarantied that static inline functions will be inlined and will be not called as external functions from the Python library? The latter would break binary compatibility of extensions compiled with newer Python headers with older binary Python libraries. ---------- nosy: +mark.dickinson, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 06:37:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 10:37:34 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540463854.58.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: > Is it guarantied that static inline functions will be inlined and will be not called as external functions from the Python library? The latter would break binary compatibility of extensions compiled with newer Python headers with older binary Python libraries. First, I'm not sure that the "stable ABI" really works in practice, there are many issues: https://pythoncapi.readthedocs.io/ Converting the macro to a static inline function is a minor step in the direction of a more stable API and ABI. To come back to your question: depending on the compiler and compiler options, Py_INCREF/DECREF() can generate a *function call*. I tuned Py_STATIC_INLINE() to always inline Py_INCREF/DECREF() for GCC, clang and MSVC which are the major compilers used by Python on Windows, Linux, macOS and FreeBSD. "static inline" is still something new to me. Maybe someone will come with a compiler with which it doesn't work as expected. IMHO we have to go through these issues, and it's only be testing for real that we will see these issues. I mean, we *have to* get ride of these ugly macros used in Python header files. They are causing subtle bugs and are hard to maintain. See my first message for advantages of static inline functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 06:46:11 2018 From: report at bugs.python.org (Michael Thies) Date: Thu, 25 Oct 2018 10:46:11 +0000 Subject: [issue34424] Unicode names break email header In-Reply-To: <1534546922.5.0.56676864532.issue34424@psf.upfronthosting.co.za> Message-ID: <1540464371.79.0.788709270274.issue34424@psf.upfronthosting.co.za> Michael Thies added the comment: Thanks for pointing me to this issue. :) > Michael, if you could check if Jens patch fixes your problem I would appreciate it. Jens PR does exactly, what I proposed in #35057, so it fixes my problem, indeed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 07:02:19 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 25 Oct 2018 11:02:19 +0000 Subject: [issue35063] Checking for abstractmethod implementation fails to consider MRO for builtins In-Reply-To: <1540457504.91.0.788709270274.issue35063@psf.upfronthosting.co.za> Message-ID: <1540465339.09.0.788709270274.issue35063@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 07:29:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 11:29:29 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540466969.92.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: > Is it guarantied that static inline functions will be inlined and will be not called as external functions from the Python library? The latter would break binary compatibility of extensions compiled with newer Python headers with older binary Python libraries. Ok, I made more checks. In short, PR 10079 has no impact on the ABI compatibility. I modified Py_STATIC_INLINE() to remove __attribute__((always_inline)). In this case, the ./python binary contains multiple "instances" (what's the correct name for that?) of the "_Py_INCREF" inline function: --- vstinner at apu$ readelf -sW ./python | c++filt -t |grep -E '(INC|DEC)REF' 42: 000000000041f908 49 FUNC LOCAL DEFAULT 13 _Py_INCREF 43: 000000000041f939 121 FUNC LOCAL DEFAULT 13 _Py_DECREF 109: 00000000004234cb 49 FUNC LOCAL DEFAULT 13 _Py_INCREF ... 5639: a486d 49 FUNC LOCAL DEFAULT 13 _Py_INCREF 5786: a7abc 49 FUNC LOCAL DEFAULT 13 _Py_INCREF 5801: a7f0f 49 FUNC LOCAL DEFAULT 13 _Py_INCREF ... 8126: 00000000006011c5 49 FUNC LOCAL DEFAULT 13 _Py_INCREF 8127: 00000000006011f6 121 FUNC LOCAL DEFAULT 13 _Py_DECREF 8140: 0000000000601971 49 FUNC LOCAL DEFAULT 13 _Py_INCREF 8141: 00000000006019a2 121 FUNC LOCAL DEFAULT 13 _Py_DECREF ... --- These functions are *LOCAL*, I understand that they are not exported. I also checked the _struct module: vstinner at apu$ readelf -sW build/lib.linux-x86_64-3.8-pydebug/_struct.cpython-38dm-x86_64-linux-gnu.so | c++filt -t |grep -E '(INC|DEC)REF' 40: 0000000000002e99 55 FUNC LOCAL DEFAULT 11 _Py_INCREF 41: 0000000000002ed0 127 FUNC LOCAL DEFAULT 11 _Py_DECREF Again, these functions are "LOCAL", not imported nor exported. I undertand that _struct.so doesn't depend on libpython for INCREF/DECREF: it contains its own "implementation". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 07:30:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 11:30:08 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540467008.76.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: Interesting article on inline/static inline and symbols: https://gist.github.com/htfy96/50308afc11678d2e3766a36aa60d5f75 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 07:31:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 11:31:20 +0000 Subject: [issue35053] Enhance tracemalloc to trace properly free lists In-Reply-To: <1540312934.43.0.788709270274.issue35053@psf.upfronthosting.co.za> Message-ID: <1540467080.37.0.788709270274.issue35053@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 9e00e80e213ebc37eff89ce72102c1f928ebc133 by Victor Stinner in branch 'master': bpo-35053: Enhance tracemalloc to trace free lists (GH-10063) https://github.com/python/cpython/commit/9e00e80e213ebc37eff89ce72102c1f928ebc133 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 07:59:19 2018 From: report at bugs.python.org (Yongkwan Kim) Date: Thu, 25 Oct 2018 11:59:19 +0000 Subject: [issue35061] Specify libffi.so soname for ctypes In-Reply-To: <1540433070.81.0.788709270274.issue35061@psf.upfronthosting.co.za> Message-ID: <1540468759.74.0.788709270274.issue35061@psf.upfronthosting.co.za> Change by Yongkwan Kim : ---------- components: +Build type: -> compile error versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 08:07:02 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 25 Oct 2018 12:07:02 +0000 Subject: [issue34187] Issues with lazy fd support in _WindowsConsoleIO fileno() and close() In-Reply-To: <1532250349.34.0.56676864532.issue34187@psf.upfronthosting.co.za> Message-ID: <1540469222.1.0.788709270274.issue34187@psf.upfronthosting.co.za> Change by Tal Einat : ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 08:17:05 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 25 Oct 2018 12:17:05 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540469825.6.0.788709270274.issue34160@psf.upfronthosting.co.za> Tal Einat added the comment: This doesn't strike me as a bug, or even clearly being a potential improvement. If this about round-trip parsing/serializing not preserving order, that would be significant. As it is, if this is only intended as a debugging tool, why change it? Is there a concrete reason to change this and break backwards compatibility? If not I suggest we close this as "won't fix". ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 08:32:26 2018 From: report at bugs.python.org (Vincent Michel) Date: Thu, 25 Oct 2018 12:32:26 +0000 Subject: [issue35065] Reading received data from a closed TCP stream using `StreamReader.read` might hang forever Message-ID: <1540470746.12.0.788709270274.issue35065@psf.upfronthosting.co.za> New submission from Vincent Michel : I'm not sure whether it is intended or not, but I noticed a change in the behavior of `StreamReader` between version 3.7 and 3.8. Basically, reading some received data from a closed TCP stream using `StreamReader.read` might hang forever, under certain conditions. I'm not sure what those conditions are but I managed to reproduce the issue consistently with the following workflow: - server writes some data - client reads a part of the data - client closes the writer - server closes the writer - client tries to read the remaining data The test attached implements the behavior. It fails on 3.8 but passes on 3.7 ---------- components: asyncio files: stuck_on_py38.py messages: 328430 nosy: asvetlov, vxgmichel, yselivanov priority: normal severity: normal status: open title: Reading received data from a closed TCP stream using `StreamReader.read` might hang forever versions: Python 3.8 Added file: https://bugs.python.org/file47891/stuck_on_py38.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 09:05:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 13:05:58 +0000 Subject: [issue35053] Enhance tracemalloc to trace properly free lists In-Reply-To: <1540312934.43.0.788709270274.issue35053@psf.upfronthosting.co.za> Message-ID: <1540472758.32.0.788709270274.issue35053@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9422 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 09:20:35 2018 From: report at bugs.python.org (Shivank Gautam) Date: Thu, 25 Oct 2018 13:20:35 +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: <1540473635.08.0.788709270274.issue35052@psf.upfronthosting.co.za> Shivank Gautam added the comment: Hey, I am starting my journey with the contribution to CPython. and this is i think i can do these changes. if Charalampos is not there to work on it. i would like to try this. ---------- nosy: +shivank98 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 09:26:49 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 25 Oct 2018 13:26:49 +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: <1540474009.38.0.788709270274.issue35052@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Hello Shivank. I had a PR ready locally which I was about to push, so you posted just at the right time :) Feel free to work on this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 09:35:51 2018 From: report at bugs.python.org (Tim Graham) Date: Thu, 25 Oct 2018 13:35:51 +0000 Subject: [issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False In-Reply-To: <1501087649.97.0.982453892523.issue31047@psf.upfronthosting.co.za> Message-ID: <1540474551.12.0.788709270274.issue31047@psf.upfronthosting.co.za> Change by Tim Graham : ---------- pull_requests: +9423 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 09:35:51 2018 From: report at bugs.python.org (Tim Graham) Date: Thu, 25 Oct 2018 13:35:51 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540474551.31.0.663665092547.issue33899@psf.upfronthosting.co.za> Change by Tim Graham : ---------- pull_requests: +9424 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 09:47:50 2018 From: report at bugs.python.org (Shivank Gautam) Date: Thu, 25 Oct 2018 13:47: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: <1540475270.5.0.788709270274.issue35052@psf.upfronthosting.co.za> Shivank Gautam added the comment: Thanks, Charalampos :) I would be thankful if you or Serhiy can help me a little bit. so do I need to just do the following work? 1924--> n._call_user_data_handler(operation, n, entity) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 09:49:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 13:49:43 +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: <1540475383.36.0.788709270274.issue35052@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 09:51:01 2018 From: report at bugs.python.org (Shivank Gautam) Date: Thu, 25 Oct 2018 13:51: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: <1540475461.96.0.788709270274.issue35052@psf.upfronthosting.co.za> Shivank Gautam added the comment: *1924--> n._call_user_data_handler(operation, n, notation) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 09:51:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2018 13:51:53 +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: <1540475513.54.0.788709270274.issue35052@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You need also to write a test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 09:54:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 13:54:25 +0000 Subject: [issue35053] Enhance tracemalloc to trace properly free lists In-Reply-To: <1540312934.43.0.788709270274.issue35053@psf.upfronthosting.co.za> Message-ID: <1540475665.91.0.788709270274.issue35053@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 6279c1c5003cd94b5e04e568ce3df7c4e8f1eaa3 by Victor Stinner in branch 'master': bpo-35053: Add Include/tracemalloc.h (GH-10091) https://github.com/python/cpython/commit/6279c1c5003cd94b5e04e568ce3df7c4e8f1eaa3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 10:01:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Oct 2018 14:01:07 +0000 Subject: [issue32321] functools.reduce has a redundant guard or needs a pure Python fallback In-Reply-To: <1513257994.59.0.213398074469.issue32321@psf.upfronthosting.co.za> Message-ID: <1540476067.32.0.788709270274.issue32321@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 10:02:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 14:02:17 +0000 Subject: [issue32321] functools.reduce has a redundant guard or needs a pure Python fallback In-Reply-To: <1513257994.59.0.213398074469.issue32321@psf.upfronthosting.co.za> Message-ID: <1540476137.74.0.788709270274.issue32321@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e25d5fc18e6c4b0062cd71b2eb1fd2d5eb5e2d3d by Victor Stinner (madman-bob) in branch 'master': bpo-32321: Add pure Python fallback for functools.reduce (GH-8548) https://github.com/python/cpython/commit/e25d5fc18e6c4b0062cd71b2eb1fd2d5eb5e2d3d ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 10:02:36 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Oct 2018 14:02:36 +0000 Subject: [issue32321] functools.reduce has a redundant guard or needs a pure Python fallback In-Reply-To: <1513257994.59.0.213398074469.issue32321@psf.upfronthosting.co.za> Message-ID: <1540476156.36.0.788709270274.issue32321@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9425 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 10:10:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 14:10:34 +0000 Subject: [issue32321] functools.reduce has a redundant guard or needs a pure Python fallback In-Reply-To: <1513257994.59.0.213398074469.issue32321@psf.upfronthosting.co.za> Message-ID: <1540476634.48.0.788709270274.issue32321@psf.upfronthosting.co.za> STINNER Victor added the comment: I just merged PR 8548. See the PR to the discussion. IMHO it's a nice enhancement to have a pure Python implementation: https://github.com/python/cpython/pull/8548#issuecomment-433063178 (and the PR has been approved by 2 other core devs ;-)) But I'm against adding it to Python 3.7 as well, I rejected the backport: PR 10092. I proposed the author to write another PR to refactor test_functools.py, but I don't think that it's worth it to keep this issue open just for that: https://github.com/python/cpython/pull/8548#issuecomment-433065931 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 10:10:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 14:10:52 +0000 Subject: [issue32321] Add pure Python fallback for functools.reduce In-Reply-To: <1513257994.59.0.213398074469.issue32321@psf.upfronthosting.co.za> Message-ID: <1540476652.97.0.788709270274.issue32321@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: functools.reduce has a redundant guard or needs a pure Python fallback -> Add pure Python fallback for functools.reduce _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 10:15:13 2018 From: report at bugs.python.org (Shivank Gautam) Date: Thu, 25 Oct 2018 14:15: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: <1540476913.4.0.788709270274.issue35052@psf.upfronthosting.co.za> Shivank Gautam added the comment: Oh, I see, so I believe that's where my learning of CPython is going to start. can anyone help me in completing this? what I understood till now is in minidom.py we need to change line 1924. else it, we need to create a test. I want to help in what should a test include and do we need to create a new function for it in test_minidom.py? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 10:16:10 2018 From: report at bugs.python.org (Shivank Gautam) Date: Thu, 25 Oct 2018 14:16:10 +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: <1540476970.03.0.788709270274.issue35052@psf.upfronthosting.co.za> Shivank Gautam added the comment: >I want to help in *need help in ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 10:16:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 14:16:18 +0000 Subject: [issue35053] Enhance tracemalloc to trace properly free lists In-Reply-To: <1540312934.43.0.788709270274.issue35053@psf.upfronthosting.co.za> Message-ID: <1540476978.93.0.788709270274.issue35053@psf.upfronthosting.co.za> STINNER Victor added the comment: This change modifies _Py_NewReference() which is a very important function and it impacts Python performance. I prefer to keep the bug in Python 3.6 and 3.7 to not risk to introduce a regression. The bug exists since Python 3.4 and I'm the first one to spot it. It's not like there is huge pressure to backport the fix. Thanks again INADA-san for the review! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 10:19:55 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 25 Oct 2018 14:19:55 +0000 Subject: [issue35065] Reading received data from a closed TCP stream using `StreamReader.read` might hang forever In-Reply-To: <1540470746.12.0.788709270274.issue35065@psf.upfronthosting.co.za> Message-ID: <1540477195.7.0.788709270274.issue35065@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Hi Vincent! No, the hang is not intended behavior. Thanks for the report. I'll assign the issue to myself to don't miss the bug; but if you have a patch with a fix -- please don't hesitate to make a Pull Request for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 10:33:30 2018 From: report at bugs.python.org (Michael Saah) Date: Thu, 25 Oct 2018 14:33:30 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() Message-ID: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> New submission from Michael Saah : A call to time.strftime('%') returns '%' A similar call to datetime.utcfromtimestamp(int(time.time()).strftime('%') raises ValueError: strftime format ends with raw % Similar inputs like '%D %' behave similarly. I might take a crack at fixing this, but first I wanted to see what the official guidance is. Seems to me like similar error handling behavior between the functions would be desirable. ---------- components: Library (Lib) messages: 328443 nosy: mjsaah priority: normal severity: normal status: open title: Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 10:47:45 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 25 Oct 2018 14:47:45 +0000 Subject: [issue34765] Update install-sh In-Reply-To: <1537544827.56.0.956365154283.issue34765@psf.upfronthosting.co.za> Message-ID: <1540478865.12.0.788709270274.issue34765@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Adding to this, the reason I initially caught up with that, was due to a coverity scan. More explicitly: Error: SHELLCHECK_WARNING: [#def1] /usr/lib64/python3.6/config-3.6dm-x86_64-linux-gnu/install-sh:63:1: warning: transform_arg appears unused. Verify it or export it. [SC2034] # 61| # 62| transformbasename="" # 63|-> transform_arg="" # 64| instcmd="$mvprog" # 65| chmodcmd="$chmodprog 0755" Error: SHELLCHECK_WARNING: [#def2] /usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu/install-sh:63:1: warning: transform_arg appears unused. Verify it or export it. [SC2034] # 61| # 62| transformbasename="" # 63|-> transform_arg="" # 64| instcmd="$mvprog" # 65| chmodcmd="$chmodprog 0755" So the transform_arg is unused, but I'm not well versed with autotools so I don't know the implications of that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 10:48:41 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 25 Oct 2018 14:48:41 +0000 Subject: [issue34765] Update install-sh In-Reply-To: <1537544827.56.0.956365154283.issue34765@psf.upfronthosting.co.za> Message-ID: <1540478921.55.0.788709270274.issue34765@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Generic reference on the issue: https://github.com/koalaman/shellcheck/wiki/SC2034 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 11:01:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 15:01:16 +0000 Subject: [issue32321] Add pure Python fallback for functools.reduce In-Reply-To: <1513257994.59.0.213398074469.issue32321@psf.upfronthosting.co.za> Message-ID: <1540479676.83.0.788709270274.issue32321@psf.upfronthosting.co.za> STINNER Victor added the comment: > However, the documentation says nothing about reduce being optional, and it is unconditionally included in the module __all__. Oh, about this specific issue: maybe test___all__ should be fixed to test functools.py with _functools blocked? As done by test_functools.py? But this is a wider change and I'm not sure that it's doable :-( (especially in a generic way!) The PEP 399 requires the same API for the C and the Python implementations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 11:05:15 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 25 Oct 2018 15:05:15 +0000 Subject: [issue34765] Update install-sh In-Reply-To: <1537544827.56.0.956365154283.issue34765@psf.upfronthosting.co.za> Message-ID: <1540479915.93.0.788709270274.issue34765@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Alright the static scanner warns in the case of a typo being made where the variable is actually used, but since the variable is indeed not used, that doesn't not make it a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 11:13:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 15:13:11 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540480391.13.0.788709270274.issue35059@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9426 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 11:18:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 15:18:52 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540480732.49.0.788709270274.issue35059@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9427 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 11:26:43 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 25 Oct 2018 15:26:43 +0000 Subject: [issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False In-Reply-To: <1501087649.97.0.982453892523.issue31047@psf.upfronthosting.co.za> Message-ID: <1540481203.81.0.788709270274.issue31047@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset d03b7757811ae51277f8ed399a9a0fd78dfd3425 by Steve Dower (Tim Graham) in branch 'master': bpo-31047: Fix ntpath.abspath to trim ending separator (GH-10082) https://github.com/python/cpython/commit/d03b7757811ae51277f8ed399a9a0fd78dfd3425 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 11:28:18 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 25 Oct 2018 15:28:18 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1540481298.75.0.788709270274.issue35066@psf.upfronthosting.co.za> St?phane Wirtel added the comment: for me, yep normally we should provide the same behavior. now, if you want, you can submit a PR but before your PR, you have to sign the CLA. thanks ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 11:28:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 15:28:22 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540481302.07.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 18618e652c56e61a134e596b315a13c7cb997a89 by Victor Stinner in branch 'master': bpo-35059: Add Py_STATIC_INLINE() macro (GH-10093) https://github.com/python/cpython/commit/18618e652c56e61a134e596b315a13c7cb997a89 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 11:28:59 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 25 Oct 2018 15:28:59 +0000 Subject: [issue35067] Use vswhere instead of _distutils_findvs Message-ID: <1540481339.78.0.788709270274.issue35067@psf.upfronthosting.co.za> New submission from Steve Dower : We have much simpler needs for distutils that don't require the more complex build/dependencies we currently have. We should remove the extra native module and just shell out to vswhere.exe, which is always included in the VS installer in a known location. ---------- assignee: steve.dower components: Distutils, Windows messages: 328451 nosy: dstufft, eric.araujo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Use vswhere instead of _distutils_findvs type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 11:30:50 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 25 Oct 2018 15:30:50 +0000 Subject: [issue35067] Use vswhere instead of _distutils_findvs In-Reply-To: <1540481339.78.0.788709270274.issue35067@psf.upfronthosting.co.za> Message-ID: <1540481450.18.0.788709270274.issue35067@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: +patch pull_requests: +9428 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 11:31:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 15:31:17 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1540481477.21.0.788709270274.issue9263@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 626bff856840f471e98ec627043f780c111a063d by Victor Stinner in branch 'master': bpo-9263: Dump Python object on GC assertion failure (GH-10062) https://github.com/python/cpython/commit/626bff856840f471e98ec627043f780c111a063d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 11:33:35 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 25 Oct 2018 15:33:35 +0000 Subject: [issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False In-Reply-To: <1501087649.97.0.982453892523.issue31047@psf.upfronthosting.co.za> Message-ID: <1540481615.08.0.788709270274.issue31047@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +9429 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 11:36:58 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 25 Oct 2018 15:36:58 +0000 Subject: [issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False In-Reply-To: <1501087649.97.0.982453892523.issue31047@psf.upfronthosting.co.za> Message-ID: <1540481818.13.0.788709270274.issue31047@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +9430 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 11:46:39 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 25 Oct 2018 15:46:39 +0000 Subject: [issue35038] AttributeError: 'frame' object has no attribute 'f_restricted' In-Reply-To: <1540134122.28.0.788709270274.issue35038@psf.upfronthosting.co.za> Message-ID: <1540482399.22.0.788709270274.issue35038@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +9431 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 11:47:05 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 25 Oct 2018 15:47:05 +0000 Subject: [issue35038] AttributeError: 'frame' object has no attribute 'f_restricted' In-Reply-To: <1540134122.28.0.788709270274.issue35038@psf.upfronthosting.co.za> Message-ID: <1540482425.2.0.788709270274.issue35038@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I have proposed a PR. ---------- keywords: -patch nosy: +matrixise stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 11:50:20 2018 From: report at bugs.python.org (Michael DePalatis) Date: Thu, 25 Oct 2018 15:50:20 +0000 Subject: [issue33533] Provide an async-generator version of as_completed In-Reply-To: <1526453333.0.0.682650639539.issue33533@psf.upfronthosting.co.za> Message-ID: <1540482620.9.0.788709270274.issue33533@psf.upfronthosting.co.za> Michael DePalatis added the comment: Is there any progress on this? I was thinking the exact same thing regarding the backwards-compatible approach and would like to work on it if no one else is. ---------- nosy: +mivade _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 11:57:03 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 25 Oct 2018 15:57:03 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540483023.69.0.788709270274.issue33899@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: -9424 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 12:58:45 2018 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 25 Oct 2018 16:58:45 +0000 Subject: [issue35068] [2.7] Possible crashes due to incorrect error handling in pyexpat.c Message-ID: <1540486725.8.0.788709270274.issue35068@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- components: Extension Modules nosy: ZackerySpytz priority: normal severity: normal status: open title: [2.7] Possible crashes due to incorrect error handling in pyexpat.c type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 13:00:26 2018 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 25 Oct 2018 17:00:26 +0000 Subject: [issue35068] [2.7] Possible crashes due to incorrect error handling in pyexpat.c Message-ID: <1540486826.7.0.788709270274.issue35068@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +9432 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 13:00:51 2018 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 25 Oct 2018 17:00:51 +0000 Subject: [issue35068] [2.7] Possible crashes due to incorrect error handling in pyexpat.c Message-ID: <1540486851.06.0.788709270274.issue35068@psf.upfronthosting.co.za> New submission from Zackery Spytz : The attached PR fixes several error handling bugs in pyexpat.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 13:10:00 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 25 Oct 2018 17:10:00 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540487400.44.0.788709270274.issue34160@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Consider this as a feature request. It is perfectly reasonable for a user to want to generate specific XML output and to want to control the order that the attributes are listed. It is perfectly reasonable for the API to preserve the order that the user specified rather than change it into some other order that they either don't expect or can't control. Starting in Python 3.6, the language guarantees that the order of keyword arguments is preserved. Knowing that, it will be natural for users to start viewing as buggy APIs that discard that order when everything else in the eco-system respects the ordering. When I teach ElementTree in Python courses, students notice this behavior and ask why the order was swapped. My only answer is that we didn't used to have a way to control it, so the input order was ignored (i.e. a reason that no longer makes sense). ---------- type: behavior -> enhancement versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 13:11:43 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 25 Oct 2018 17:11:43 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1540487503.52.0.788709270274.issue35066@psf.upfronthosting.co.za> Eric V. Smith added the comment: I think it would be a good idea to make this more consistent. We should run through a multi-release deprecation cycle, since it might break existing, working code. And we could only start that in 3.8. ---------- nosy: +eric.smith versions: +Python 3.8 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 13:21:53 2018 From: report at bugs.python.org (Michael Saah) Date: Thu, 25 Oct 2018 17:21:53 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540487503.52.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: Michael Saah added the comment: Ok, seems reasonable. What branch would I submit a PR against? On Thu, Oct 25, 2018 at 1:11 PM Eric V. Smith wrote: > > Eric V. Smith added the comment: > > I think it would be a good idea to make this more consistent. We should > run through a multi-release deprecation cycle, since it might break > existing, working code. And we could only start that in 3.8. > > ---------- > nosy: +eric.smith > versions: +Python 3.8 -Python 3.5, Python 3.6, Python 3.7 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 13:22:41 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 25 Oct 2018 17:22:41 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1540488161.86.0.788709270274.issue35066@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I am not sure time.strftime("%") should raise an error. There is an explicit test case and it's mentioned as platform dependent in the comment to raise a ValueError or succeed. So I don't know if it should be changed despite the inconsistency and there is any reason behind this. The error regarding datetime module comes from SVN version and I couldn't get to know the original reason behind it and why the same was not carried over to time module. I agree with Eric that raising a DeprecationWarning for this and then removing it in later versions if we are going forward with this since we are making a platform dependent error as an expected error across platforms. In the below test case "%" doesn't raise ValueError on my Mac OS and Ubuntu machine. https://github.com/python/cpython/blob/9e95eb0d609cee23e6c9915c0bef243585b8c14b/Lib/test/test_time.py#L240 def test_strftime_format_check(self): # Test that strftime does not crash on invalid format strings # that may trigger a buffer overread. When not triggered, # strftime may succeed or raise ValueError depending on # the platform. for x in [ '', 'A', '%A', '%AA' ]: for y in range(0x0, 0x10): for z in [ '%', 'A%', 'AA%', '%A%', 'A%A%', '%#' ]: try: time.strftime(x * y + z) except ValueError: pass I am adding @belopolsky who might have thoughts on the change. Thanks for the report. ---------- nosy: +belopolsky, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 13:26:20 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 25 Oct 2018 17:26:20 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1540488380.76.0.788709270274.issue35066@psf.upfronthosting.co.za> Eric V. Smith added the comment: Hmm, if there's a test for this, then that does complicate the decision. Is this behavior documented anywhere? If so, then we shouldn't change it. If we do decide to go forward with a change, it should be in the master branch, which will become 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 13:27:19 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 25 Oct 2018 17:27:19 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1540488439.08.0.788709270274.issue35066@psf.upfronthosting.co.za> Eric V. Smith added the comment: After a little more thinking: maybe we should just document this behavior, make it official, and not change it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 13:28:57 2018 From: report at bugs.python.org (Michael Saah) Date: Thu, 25 Oct 2018 17:28:57 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540488161.86.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: Michael Saah added the comment: >From a pure usability standpoint I'd prefer for datetime to match the time behavior you're demonstrating, that is to not fail on a dangling %. Of course I defer to the dev team on this, but I want to make clear where I'm coming from. On Thu, Oct 25, 2018 at 1:22 PM Karthikeyan Singaravelan < report at bugs.python.org> wrote: > > Karthikeyan Singaravelan added the comment: > > I am not sure time.strftime("%") should raise an error. There is an > explicit test case and it's mentioned as platform dependent in the comment > to raise a ValueError or succeed. So I don't know if it should be changed > despite the inconsistency and there is any reason behind this. > > The error regarding datetime module comes from SVN version and I couldn't > get to know the original reason behind it and why the same was not carried > over to time module. > > I agree with Eric that raising a DeprecationWarning for this and then > removing it in later versions if we are going forward with this since we > are making a platform dependent error as an expected error across platforms. > > In the below test case "%" doesn't raise ValueError on my Mac OS and > Ubuntu machine. > > > https://github.com/python/cpython/blob/9e95eb0d609cee23e6c9915c0bef243585b8c14b/Lib/test/test_time.py#L240 > > def test_strftime_format_check(self): > # Test that strftime does not crash on invalid format strings > # that may trigger a buffer overread. When not triggered, > # strftime may succeed or raise ValueError depending on > # the platform. > for x in [ '', 'A', '%A', '%AA' ]: > for y in range(0x0, 0x10): > for z in [ '%', 'A%', 'AA%', '%A%', 'A%A%', '%#' ]: > try: > time.strftime(x * y + z) > except ValueError: > pass > > > I am adding @belopolsky who might have thoughts on the change. > > Thanks for the report. > > ---------- > nosy: +belopolsky, xtreak > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 13:41:27 2018 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Thu, 25 Oct 2018 17:41:27 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1540489287.33.0.788709270274.issue35066@psf.upfronthosting.co.za> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- nosy: +thatiparthy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 13:46:28 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 25 Oct 2018 17:46:28 +0000 Subject: [issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False In-Reply-To: <1501087649.97.0.982453892523.issue31047@psf.upfronthosting.co.za> Message-ID: <1540489588.8.0.788709270274.issue31047@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset a7ffb663953bc84452af1e5f4089359d54e226b5 by Steve Dower in branch '3.7': [3.7] bpo-31047: Fix ntpath.abspath to trim ending separator (GH-10082) https://github.com/python/cpython/commit/a7ffb663953bc84452af1e5f4089359d54e226b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 13:46:38 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 25 Oct 2018 17:46:38 +0000 Subject: [issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False In-Reply-To: <1501087649.97.0.982453892523.issue31047@psf.upfronthosting.co.za> Message-ID: <1540489598.55.0.788709270274.issue31047@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 4aa1fda7069642c21c1ee570c4ba44442a657e5e by Steve Dower in branch '3.6': bpo-31047: Fix ntpath.abspath to trim ending separator (GH-10082) https://github.com/python/cpython/commit/4aa1fda7069642c21c1ee570c4ba44442a657e5e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 13:47:07 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 25 Oct 2018 17:47:07 +0000 Subject: [issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False In-Reply-To: <1501087649.97.0.982453892523.issue31047@psf.upfronthosting.co.za> Message-ID: <1540489627.72.0.788709270274.issue31047@psf.upfronthosting.co.za> Steve Dower added the comment: Thanks, Tim! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 14:29:57 2018 From: report at bugs.python.org (Braden Groom) Date: Thu, 25 Oct 2018 18:29:57 +0000 Subject: [issue34145] uuid3 and uuid5 hard to use portably between Python 2 and 3 In-Reply-To: <1531903567.77.0.56676864532.issue34145@psf.upfronthosting.co.za> Message-ID: <1540492197.07.0.788709270274.issue34145@psf.upfronthosting.co.za> Change by Braden Groom : ---------- keywords: +patch pull_requests: +9433 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 14:35:15 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 25 Oct 2018 18:35:15 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1540492515.32.0.788709270274.issue35066@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Michael: I understand the inconsistency but since there is a test that says ValueError is platform dependent then making it as an intentional error there might be breakage. I am not against changing this but if it's done then it should be done with DeprecationWarning for 3.8 and then later removed on other versions. Some more information : Further, I looked into timemodule.c in CPython that says that it supports some common formats and "Other codes may be available on your platform. See documentation for the C library strftime function." . I looked into freebsd strftime there is an explicit comment if conversion char is undefined then the behavior is also undefined and to just print it out. Related issue that has the patch to an external implementation that refers to the same comment : https://bugs.python.org/issue3173 Meanwhile datetime strftime uses wrap_strftime that defines the custom error message when format ends with raw % and does some more error reporting. # datetime strftime error : https://github.com/python/cpython/blob/9e95eb0d609cee23e6c9915c0bef243585b8c14b/Modules/_datetimemodule.c#L1518 # Freebsd https://github.com/freebsd/freebsd/blob/277918494930ec3fb0c7fdbd4d35060a3bc6d181/lib/libc/stdtime/strftime.c#L572 # Same comment on Apple's source : https://opensource.apple.com/source/Libc/Libc-166/string.subproj/strftime.c case '%': /* * X311J/88-090 (4.12.3.5): if conversion char is * undefined, behavior is undefined. Print out the * character itself as printf(3) also does. */ default: break; Initially I thought this is the relevant code that is printing the '%' but looking at the loop itself if the first character is "%" followed by '\0' indicating that it's just '%' then it breaks out of the loop and just returns '%' which I hope is happening on my system. I don't think the above case of printing out the character itself in the comment i.e. "%" is done here. The above are based on my limited knowledge of C though so feel free to correct me if I am wrong on the above or took it out of context. So maybe this can be documented that for time.strftime the behavior is undefined when the conversion char is undefined and is based on the underlying operating system internals. Also a note that time.strftime with just '%' is system dependent meanwhile datetime.strftime '%' produces a ValueError. I think the same is noted in the test that this platform dependent depending on the implementation of strftime like in Windows. So if we are going to make '%' as an error from Python like datetime.strftime in time.strftime too then lies the breakage since Python behaves different from the underlying OS strftime implementation it uses for time module. Hope it helps and maybe someone else with a better understanding of C has a better explanation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 14:37:06 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 25 Oct 2018 18:37:06 +0000 Subject: [issue34145] uuid3 and uuid5 hard to use portably between Python 2 and 3 In-Reply-To: <1531903567.77.0.56676864532.issue34145@psf.upfronthosting.co.za> Message-ID: <1540492626.43.0.788709270274.issue34145@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 15:09:35 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 25 Oct 2018 19:09:35 +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: <1540494575.35.0.788709270274.issue35052@psf.upfronthosting.co.za> Tal Einat added the comment: The test code should fail with the current, unfixed code, due to the bug described here. You will need to: 1. figure out which conditions will trigger the wrong behavior 2. set up a scenario where you can detect whether the behavior is correct 3. code this as a new test method in test_minidom.py 4. make the fix and ensure that the new test passes, as well as all other tests After you've done this, you'll have something ready to be a PR. It will likely still require some work, e.g. cleaning up the code, adding/improving comments, conforming to our code style guidelines, and adding a NEWS entry. However, since this will be one of your first PRs, I suggest first just posting your test and fix as a PR. Note that creating a PR will also trigger the test suite to be automatically run on several platforms; after ~15 minutes take a look at the results, and if there are any failures you should address them ASAP. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 15:12:52 2018 From: report at bugs.python.org (Braden Groom) Date: Thu, 25 Oct 2018 19:12:52 +0000 Subject: [issue33710] Deprecate gettext.lgettext() In-Reply-To: <1527764456.73.0.682650639539.issue33710@psf.upfronthosting.co.za> Message-ID: <1540494772.44.0.788709270274.issue33710@psf.upfronthosting.co.za> Change by Braden Groom : ---------- nosy: +bradengroom _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 15:14:24 2018 From: report at bugs.python.org (Braden Groom) Date: Thu, 25 Oct 2018 19:14:24 +0000 Subject: [issue33710] Deprecate gettext.lgettext() In-Reply-To: <1527764456.73.0.682650639539.issue33710@psf.upfronthosting.co.za> Message-ID: <1540494864.26.0.788709270274.issue33710@psf.upfronthosting.co.za> Braden Groom added the comment: What's the process for deprecating functions? Do we just start by adding a note in the docs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 15:25:01 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 25 Oct 2018 19:25:01 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540495501.23.0.788709270274.issue34160@psf.upfronthosting.co.za> Tal Einat added the comment: Thanks for the clarification, Raymond. I've spent a few minutes searching for uses of dump(), and have only come up with uses for debugging or printing helpful info in command line tools. So, it seems that changing this as suggested wouldn't break much existing code, since I couldn't easily find even one such example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 15:28:51 2018 From: report at bugs.python.org (James Hewitt) Date: Thu, 25 Oct 2018 19:28:51 +0000 Subject: [issue35069] Unexecuted import in function causes UnboundLocalError Message-ID: <1540495731.24.0.788709270274.issue35069@psf.upfronthosting.co.za> New submission from James Hewitt : Having 'import logging.config' in an if statement in a function causes a namespace issue, despite the fact that the import is not reached. Example code: --- #!/usr/bin/env python3 # Test weird import bug import logging config = {} config['log'] = {} config['log']['log_type'] = 'file' config['log']['log_file'] = './log' config['log']['config'] = { 'version' : 1 } def do_config_logging(): if config['log']['log_type'] == 'from_config': import logging.config logging.config.dictConfig(config['log']['config']) elif config['log']['log_type'] == 'file': logging.basicConfig(filename=config['log']['log_file']) logging.info("start logging") if __name__ == "__main__": do_config_logging() --- This results in: Traceback (most recent call last): File "./bug.py", line 25, in do_config_logging() File "./bug.py", line 20, in do_config_logging logging.basicConfig(filename=config['log']['log_file']) UnboundLocalError: local variable 'logging' referenced before assignment Notes: This was run on Ubuntu Linux 18.04 Intel 64-bit, Python version 3.6.6 The problem does not occur if the branch is actually taken, and it does not occur if the 'if' statement is not in a function. It also does not occur if 'logging.config' is imported as some other name, eg. 'configlogging'. virtualenv is installed (via the distribution package) but not in use in the test case. ---------- components: Library (Lib) messages: 328470 nosy: jhewitt priority: normal severity: normal status: open title: Unexecuted import in function causes UnboundLocalError type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 15:30:24 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 25 Oct 2018 19:30:24 +0000 Subject: [issue35069] Unexecuted import in function causes UnboundLocalError In-Reply-To: <1540495731.24.0.788709270274.issue35069@psf.upfronthosting.co.za> Message-ID: <60C83277-724E-4D46-99CA-A299C3713AD6@wirtel.be> St?phane Wirtel added the comment: Could you share a pastebin? Thank you > Le 25 oct. 2018 ? 21:28, James Hewitt a ?crit : > > > New submission from James Hewitt : > > Having 'import logging.config' in an if statement in a function causes a namespace issue, despite the fact that the import is not reached. > > Example code: > > --- > #!/usr/bin/env python3 > > # Test weird import bug > > import logging > > > config = {} > config['log'] = {} > config['log']['log_type'] = 'file' > config['log']['log_file'] = './log' > config['log']['config'] = { 'version' : 1 } > > > def do_config_logging(): > if config['log']['log_type'] == 'from_config': > import logging.config > logging.config.dictConfig(config['log']['config']) > elif config['log']['log_type'] == 'file': > logging.basicConfig(filename=config['log']['log_file']) > logging.info("start logging") > > > if __name__ == "__main__": > do_config_logging() > > --- > > > This results in: > > Traceback (most recent call last): > File "./bug.py", line 25, in > do_config_logging() > File "./bug.py", line 20, in do_config_logging > logging.basicConfig(filename=config['log']['log_file']) > UnboundLocalError: local variable 'logging' referenced before assignment > > > Notes: > > This was run on Ubuntu Linux 18.04 Intel 64-bit, Python version 3.6.6 > > The problem does not occur if the branch is actually taken, and it does not occur if the 'if' statement is not in a function. It also does not occur if 'logging.config' is imported as some other name, eg. 'configlogging'. > > virtualenv is installed (via the distribution package) but not in use in the test case. > > ---------- > components: Library (Lib) > messages: 328470 > nosy: jhewitt > priority: normal > severity: normal > status: open > title: Unexecuted import in function causes UnboundLocalError > type: behavior > versions: Python 3.6 > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > New-bugs-announce mailing list > New-bugs-announce at python.org > https://mail.python.org/mailman/listinfo/new-bugs-announce ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 15:36:17 2018 From: report at bugs.python.org (James Hewitt) Date: Thu, 25 Oct 2018 19:36:17 +0000 Subject: [issue35069] Unexecuted import in function causes UnboundLocalError In-Reply-To: <60C83277-724E-4D46-99CA-A299C3713AD6@wirtel.be> Message-ID: <97f9f76e-d023-6a33-01a7-1f01bdde0a0a@caurinus.com> James Hewitt added the comment: Sure, it's at https://pastebin.com/L1RMPD7K -James On 10/25/2018 12:30 PM, St?phane Wirtel wrote: > > St?phane Wirtel added the comment: > > Could you share a pastebin? Thank you > >> Le 25 oct. 2018 ? 21:28, James Hewitt a ?crit : >> >> >> New submission from James Hewitt : >> >> Having 'import logging.config' in an if statement in a function causes a namespace issue, despite the fact that the import is not reached. >> >> Example code: >> >> --- >> #!/usr/bin/env python3 >> >> # Test weird import bug >> >> import logging >> >> >> config = {} >> config['log'] = {} >> config['log']['log_type'] = 'file' >> config['log']['log_file'] = './log' >> config['log']['config'] = { 'version' : 1 } >> >> >> def do_config_logging(): >> if config['log']['log_type'] == 'from_config': >> import logging.config >> logging.config.dictConfig(config['log']['config']) >> elif config['log']['log_type'] == 'file': >> logging.basicConfig(filename=config['log']['log_file']) >> logging.info("start logging") >> >> >> if __name__ == "__main__": >> do_config_logging() >> >> --- >> >> >> This results in: >> >> Traceback (most recent call last): >> File "./bug.py", line 25, in >> do_config_logging() >> File "./bug.py", line 20, in do_config_logging >> logging.basicConfig(filename=config['log']['log_file']) >> UnboundLocalError: local variable 'logging' referenced before assignment >> >> >> Notes: >> >> This was run on Ubuntu Linux 18.04 Intel 64-bit, Python version 3.6.6 >> >> The problem does not occur if the branch is actually taken, and it does not occur if the 'if' statement is not in a function. It also does not occur if 'logging.config' is imported as some other name, eg. 'configlogging'. >> >> virtualenv is installed (via the distribution package) but not in use in the test case. >> >> ---------- >> components: Library (Lib) >> messages: 328470 >> nosy: jhewitt >> priority: normal >> severity: normal >> status: open >> title: Unexecuted import in function causes UnboundLocalError >> type: behavior >> versions: Python 3.6 >> >> _______________________________________ >> Python tracker >> >> _______________________________________ >> _______________________________________________ >> New-bugs-announce mailing list >> New-bugs-announce at python.org >> https://mail.python.org/mailman/listinfo/new-bugs-announce > > ---------- > nosy: +matrixise > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 15:51:19 2018 From: report at bugs.python.org (Luna Chen) Date: Thu, 25 Oct 2018 19:51:19 +0000 Subject: [issue29341] Missing accepting path-like object in docstrings of os module functions In-Reply-To: <1485064061.59.0.597221589705.issue29341@psf.upfronthosting.co.za> Message-ID: <1540497079.33.0.788709270274.issue29341@psf.upfronthosting.co.za> Change by Luna Chen : ---------- keywords: +patch pull_requests: +9434 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 15:52:02 2018 From: report at bugs.python.org (Michael Saah) Date: Thu, 25 Oct 2018 19:52:02 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540492515.32.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: Michael Saah added the comment: Did a little digging. Seems that there are two versions of the datetime module, a C version (looks like an accelerator module) and a Py version. Both define a wrap_strftime function that replace %z, %Z and %f format codes before handing off to the timemodule.c code, where the actual strftime function is called (aliased as format_time). Here's the strange thing. The C datetime module raises a ValueError on a dangling %, while the Python version does not. The C code can be seen here: https://github.com/python/cpython/blob/3df85404d4bf420db3362eeae1345f2cad948a71/Modules/_datetimemodule.c#L1517-L1520 and the python version is here https://github.com/python/cpython/blob/9e95eb0d609cee23e6c9915c0bef243585b8c14b/Lib/datetime.py#L196 So to summarize, it seems unnecessary to throw an error on a dangling % in a higher-order module (_datetimemodule.c) when the lower-order module (timemodule.c) doesn't do the check, and that lower-order module readily accepts external input. This seems to be further corroborated by the fact that the equivalent python version of the high-order module (datetime.py) does not do the check either. Let me know if I'm off base here, or if this is a fair assessment. On Thu, Oct 25, 2018 at 2:35 PM Karthikeyan Singaravelan < report at bugs.python.org> wrote: > > Karthikeyan Singaravelan added the comment: > > Michael: I understand the inconsistency but since there is a test that > says ValueError is platform dependent then making it as an intentional > error there might be breakage. I am not against changing this but if it's > done then it should be done with DeprecationWarning for 3.8 and then later > removed on other versions. > > Some more information : > > Further, I looked into timemodule.c in CPython that says that it supports > some common formats and "Other codes may be available on your platform. > See documentation for the C library strftime function." . I looked into > freebsd strftime there is an explicit comment if conversion char is > undefined then the behavior is also undefined and to just print it out. > Related issue that has the patch to an external implementation that refers > to the same comment : https://bugs.python.org/issue3173 > > Meanwhile datetime strftime uses wrap_strftime that defines the custom > error message when format ends with raw % and does some more error > reporting. > > # datetime strftime error : > https://github.com/python/cpython/blob/9e95eb0d609cee23e6c9915c0bef243585b8c14b/Modules/_datetimemodule.c#L1518 > > # Freebsd > https://github.com/freebsd/freebsd/blob/277918494930ec3fb0c7fdbd4d35060a3bc6d181/lib/libc/stdtime/strftime.c#L572 > # Same comment on Apple's source : > https://opensource.apple.com/source/Libc/Libc-166/string.subproj/strftime.c > > > case '%': > /* > * X311J/88-090 (4.12.3.5): if conversion char is > * undefined, behavior is undefined. Print out the > * character itself as printf(3) also does. > */ > default: > break; > > Initially I thought this is the relevant code that is printing the '%' but > looking at the loop itself if the first character is "%" followed by '\0' > indicating that it's just '%' then it breaks out of the loop and just > returns '%' which I hope is happening on my system. I don't think the above > case of printing out the character itself in the comment i.e. "%" is done > here. > > The above are based on my limited knowledge of C though so feel free to > correct me if I am wrong on the above or took it out of context. So maybe > this can be documented that for time.strftime the behavior is undefined > when the conversion char is undefined and is based on the underlying > operating system internals. Also a note that time.strftime with just '%' is > system dependent meanwhile datetime.strftime '%' produces a ValueError. I > think the same is noted in the test that this platform dependent depending > on the implementation of strftime like in Windows. So if we are going to > make '%' as an error from Python like datetime.strftime in time.strftime > too then lies the breakage since Python behaves different from the > underlying OS strftime implementation it uses for time module. > > Hope it helps and maybe someone else with a better understanding of C has > a better explanation. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 15:52:09 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 25 Oct 2018 19:52:09 +0000 Subject: [issue35070] test_posix Message-ID: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> New submission from Barry A. Warsaw : It looks like macOS 10.14 Mojave has changed the return value for getgroups(). On 10.13 it returns the set of GIDs give by `id -G` but afaict on 10.14 it returns only the primary GID. $ python3 -c "import os; print(os.getgroups())" [101] $ id -G 101 503 701 501 12 62 80 502 33 98 100 204 250 395 398 This breaks test_posix.py. ---------- components: Library (Lib), macOS messages: 328474 nosy: barry, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: test_posix versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 15:52:22 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 25 Oct 2018 19:52:22 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540497142.49.0.788709270274.issue35070@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- title: test_posix -> test_posix fails on macOS 10.14 Mojave _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 15:58:31 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 25 Oct 2018 19:58:31 +0000 Subject: [issue35069] Unexecuted import in function causes UnboundLocalError In-Reply-To: <1540495731.24.0.788709270274.issue35069@psf.upfronthosting.co.za> Message-ID: <1540497511.96.0.788709270274.issue35069@psf.upfronthosting.co.za> Steven D'Aprano added the comment: This is expected behaviour: import is a form of assignment. "import logging", like "logging = 1", tells the compiler to treat logging as a local variable (unless you declare logging as global). As the exception says, you are trying to access the logging local variable before it has been assigned to. You can (and should!) give a SHORT and SIMPLE demonstration, without any excess and irrelevant code: py> def demo(): ... if False: ... import logging ... logging ... py> demo() Traceback (most recent call last): File "", line 1, in File "", line 4, in demo UnboundLocalError: local variable 'logging' referenced before assignment So this is expected behaviour. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 16:00:24 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Oct 2018 20:00:24 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540497624.1.0.788709270274.issue35070@psf.upfronthosting.co.za> Ned Deily added the comment: Hmm, I'm not seeing that behavior with either a freshly-built top of master 3.8 or with the python.org 3.7.1. $ ./python -c "import os;print(os.getgroups())" [20, 12, 61, 79, 80, 81, 98, 33, 100, 204, 250, 395, 398, 399] $ id -G 20 12 61 79 80 81 98 33 100 204 250 395 398 399 nad at harj:~/Projects/PyDev/active/dev/3x/source$ ./python -m test -w test_posix Run tests sequentially 0:00:00 load avg: 1.64 [1/1] test_posix == Tests result: SUCCESS == 1 test OK. Total duration: 13 sec 938 ms Tests result: SUCCESS $ ./python Python 3.8.0a0 (heads/master:9e95eb0d60, Oct 25 2018, 15:55:56) [Clang 10.0.0 (clang-1000.11.45.2)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> ^D ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 16:02:25 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Oct 2018 20:02:25 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540497745.25.0.788709270274.issue35070@psf.upfronthosting.co.za> Ned Deily added the comment: $ sw_vers ProductName: Mac OS X ProductVersion: 10.14 BuildVersion: 18A391 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 16:02:26 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 25 Oct 2018 20:02:26 +0000 Subject: [issue35069] Unexecuted import in function causes UnboundLocalError In-Reply-To: <1540495731.24.0.788709270274.issue35069@psf.upfronthosting.co.za> Message-ID: <1540497746.29.0.788709270274.issue35069@psf.upfronthosting.co.za> Steven D'Aprano added the comment: St?phane, I'm curious why you asked for a pastebin when James already provided the code right here in the tracker? (Your email even included a copy of that code.) Why split the information into another website? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 16:03:08 2018 From: report at bugs.python.org (Shivank Gautam) Date: Thu, 25 Oct 2018 20:03: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: <1540497788.43.0.788709270274.issue35052@psf.upfronthosting.co.za> Shivank Gautam added the comment: now when I am running test_minidom.py for both 1,2 1: e._call_user_data_handler(operation, n, entity) 2: n._call_user_data_handler(operation, n, notation) I am receiving the same following result. FAIL: testRemoveAttributeNode (__main__.MinidomTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_minidom.py", line 328, in testRemoveAttributeNode self.assertIs(node, child.removeAttributeNode(node)) AssertionError: is not None ---------------------------------------------------------------------- Ran 120 tests in 0.048s FAILED (failures=1) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 16:13:53 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 25 Oct 2018 20:13:53 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497745.25.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: Barry A. Warsaw added the comment: Seems to fail for me with every version of Python 3 on Mojave. In master, it?s test_getgroups(). > Ned Deily added the comment: > > $ sw_vers > ProductName: Mac OS X > ProductVersion: 10.14 > BuildVersion: 18A391 Mine is exactly the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 16:14:47 2018 From: report at bugs.python.org (James Hewitt) Date: Thu, 25 Oct 2018 20:14:47 +0000 Subject: [issue35069] Unexecuted import in function causes UnboundLocalError In-Reply-To: <1540497511.96.0.788709270274.issue35069@psf.upfronthosting.co.za> Message-ID: <4c5edf3e-8c01-15c0-b094-0d192345b5a0@caurinus.com> James Hewitt added the comment: I don't quite follow... the 'import logging.config' statement should never be executed, and if it is commented out the program works fine as written. It's as if the mere presence of the statement in the code causes 'logging' to be shadowed inside the function. -James On 10/25/2018 12:58 PM, Steven D'Aprano wrote: > > Steven D'Aprano added the comment: > > This is expected behaviour: import is a form of assignment. > > "import logging", like "logging = 1", tells the compiler to treat logging as a local variable (unless you declare logging as global). As the exception says, you are trying to access the logging local variable before it has been assigned to. > > You can (and should!) give a SHORT and SIMPLE demonstration, without any excess and irrelevant code: > > py> def demo(): > ... if False: > ... import logging > ... logging > ... > py> demo() > Traceback (most recent call last): > File "", line 1, in > File "", line 4, in demo > UnboundLocalError: local variable 'logging' referenced before assignment > > So this is expected behaviour. > > ---------- > nosy: +steven.daprano > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 16:17:34 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Oct 2018 20:17:34 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540498654.29.0.788709270274.issue35070@psf.upfronthosting.co.za> Ned Deily added the comment: OK. When you asy "every version of Python 3", are those all versions you've built yourself? If so, what ./configure arguments do you use? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 16:17:53 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 25 Oct 2018 20:17:53 +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: <1540498673.56.0.788709270274.issue35052@psf.upfronthosting.co.za> Tal Einat added the comment: Shivank, your last comment is unclear. Are you asking a question or just reporting some progress? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 16:20:14 2018 From: report at bugs.python.org (Yhojann Aguilera) Date: Thu, 25 Oct 2018 20:20:14 +0000 Subject: [issue35071] Canot send real string from c api to module (corrupted string) Message-ID: <1540498814.71.0.788709270274.issue35071@psf.upfronthosting.co.za> New submission from Yhojann Aguilera : The functios like as PyUnicode_FromString use a printf format in char array argument. Example: PyUnicode_FromString("a%22b"); in module interprete the %22 as 22 blank spaces. A double quote in module add a backslash. Poc: Y try send a string from c++ to python string using: PyObject* pyString = PyUnicode_FromString("/abc/def.html/a%22.php?abc=&def=%22;%00s%01"); .... PyObject* pyArgs = Py_BuildValue("(z)", pyString); ... PyObject_CallObject(pFunc, pyArgs); But in script the string is bad: function(data): print(data) The result is: /abc/def.html/a bogus %pp?abc=&def= %;(null)% ---------- components: Library (Lib) messages: 328484 nosy: Yhojann Aguilera priority: normal severity: normal status: open title: Canot send real string from c api to module (corrupted string) type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 16:27:12 2018 From: report at bugs.python.org (Shivank Gautam) Date: Thu, 25 Oct 2018 20:27:12 +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: <1540499232.21.0.788709270274.issue35052@psf.upfronthosting.co.za> Shivank Gautam added the comment: Oh Sorry, it was like was more like a question. running test_minidom.py is giving an error for both (1 and 2), i am not sure even if "testRemoveAttributeNode (__main__.MinidomTest)" is related to _clone_node or not. should i first try solve for this error? or maybe i haven't understood what type of test function i need to write. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 16:27:50 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 25 Oct 2018 20:27:50 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540498654.29.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: Barry A. Warsaw added the comment: On Oct 25, 2018, at 13:17, Ned Deily wrote: > > OK. When you asy "every version of Python 3", are those all versions you've built yourself? If so, what ./configure arguments do you use? Yes, built myself from source (both .tar.gz and git tag). I don?t use any configure arguments, just ./configure && make && make test ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 16:32:45 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 25 Oct 2018 20:32:45 +0000 Subject: [issue35069] Unexecuted import in function causes UnboundLocalError In-Reply-To: <4c5edf3e-8c01-15c0-b094-0d192345b5a0@caurinus.com> Message-ID: <20181025203226.GN3817@ando.pearwood.info> Steven D'Aprano added the comment: Yes, that's exactly right. That's how local variables work in Python: x = 999 # global x def demo(): if False: x = 1 x # local x has no value does the same thing. This is standard, documented behaviour, regardless of which kind of assignment statement you use. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 16:47:07 2018 From: report at bugs.python.org (Antony Lee) Date: Thu, 25 Oct 2018 20:47:07 +0000 Subject: [issue33944] Deprecate and remove pth files In-Reply-To: <1529688140.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <1540500427.88.0.788709270274.issue33944@psf.upfronthosting.co.za> Antony Lee added the comment: There are a number of packages that can "self-import" into any Python process depending on the presence of an environment variable, by installing a pth file that contains something like `import os; __import__("thepkg") if os.environ.get("THEENVVAR") else None`. Examples include colorization of logging output (https://coloredlogs.readthedocs.io/en/latest/api.html#environment-variables) or installation of a trace function (https://pypi.org/project/hunter/#environment-variable-activation). If the pth mechanism goes away, a preload system should definitely be present to provide a replacement; it should again support multiple packages each installing their own hook. ---------- nosy: +Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 16:48:04 2018 From: report at bugs.python.org (James Hewitt) Date: Thu, 25 Oct 2018 20:48:04 +0000 Subject: [issue35069] Unexecuted import in function causes UnboundLocalError In-Reply-To: <20181025203226.GN3817@ando.pearwood.info> Message-ID: <67307bb5-1b3e-c6dc-7688-2d7634c1ec69@caurinus.com> James Hewitt added the comment: So just the fact that somewhere in the function a name is referenced, even if that code isn't actually executed, is enough to change the local namespace. I think I knew that, but didn't know that's what it meant :) I guess the moral is, pay attention to scope when importing submodules dynamically. Thanks for looking at this, sorry it wasn't a bit more interesting :) -James On 10/25/2018 01:32 PM, Steven D'Aprano wrote: > > Steven D'Aprano added the comment: > > Yes, that's exactly right. That's how local variables work in Python: > > x = 999 # global x > def demo(): > if False: > x = 1 > x # local x has no value > > does the same thing. This is standard, documented behaviour, regardless > of which kind of assignment statement you use. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 16:52:47 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Oct 2018 20:52:47 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540500767.13.0.788709270274.issue35070@psf.upfronthosting.co.za> Ned Deily added the comment: I've also tried building on a vanilla-ish 10.8 VM, both without and with installing the /usr/include headers, and I still don't see the failure you're seeing. If you look at Modules/posixmodule.c, you'll see there's a fair amount of Apple-specifc or -caused hackery to deal with past and current getgroups() anomalies. Perhaps you could step through it on your system and see if it's obvious what's happening. Also, looking back through previous issues with getgroups, in Issue29562 Ronald noted: "Note that the result of getgroups(2) is fixed on login, while "id -G" reflects the current state of the user database on macOS. Could this explain this failure? That is, have you tried logging out and in again before running the test suite?" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 17:04:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 21:04:37 +0000 Subject: [issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__ In-Reply-To: <1539668705.97.0.788709270274.issue34995@psf.upfronthosting.co.za> Message-ID: <1540501477.47.0.788709270274.issue34995@psf.upfronthosting.co.za> STINNER Victor added the comment: Exmaple 1: --- import abc import functools class AbstractExpensiveCalculator(abc.ABC): @abc.abstractmethod @functools.cached_property def calculate(self): pass AbstractExpensiveCalculator() --- Exmaple 2: --- import abc import functools class AbstractExpensiveCalculator(abc.ABC): @functools.cached_property @abc.abstractmethod def calculate(self): pass AbstractExpensiveCalculator() --- Current behavior: Example 1 raises an exception as expected, Example 2 instanciate the object: no exception is raised. PR 9904 looks like a reasonable change to me. > The cached_property decorator is not inherited by overriding properties. I don't think that combining the cached_property and the @abstractmethod decorators should be supported. Well, maybe we can hack something to make Example 2 fail as well, but I like the idea of using @functools.cached_property in an abstract class as "documentation". To announce that the property will be cached, even if technically it will not be cached. It's more to use the code as documentation than to execute any code. PR 9904 is just 4 lines of code to make the code "works as expected". ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 17:06:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 21:06:16 +0000 Subject: [issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__ In-Reply-To: <1539668705.97.0.788709270274.issue34995@psf.upfronthosting.co.za> Message-ID: <1540501576.2.0.788709270274.issue34995@psf.upfronthosting.co.za> STINNER Victor added the comment: Context: @functools.cached_property has been added by bpo-21145. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 17:06:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 21:06:57 +0000 Subject: [issue21145] Add the @cached_property decorator In-Reply-To: <1396520932.53.0.707047361064.issue21145@psf.upfronthosting.co.za> Message-ID: <1540501617.83.0.788709270274.issue21145@psf.upfronthosting.co.za> STINNER Victor added the comment: FYI there is discussion in bpo-34995 about the usage of @cached_property with abstract methods. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 17:13:50 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Oct 2018 21:13:50 +0000 Subject: [issue35038] AttributeError: 'frame' object has no attribute 'f_restricted' In-Reply-To: <1540134122.28.0.788709270274.issue35038@psf.upfronthosting.co.za> Message-ID: <1540502030.48.0.788709270274.issue35038@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 1770d1c5121ed6c64d7072875738f97e07eede8a by Miss Islington (bot) (St?phane Wirtel) in branch 'master': bpo-35038: AttributeError: 'frame' object has no attribute 'f_restricted'. (GH-10098) https://github.com/python/cpython/commit/1770d1c5121ed6c64d7072875738f97e07eede8a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 17:13:59 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Oct 2018 21:13:59 +0000 Subject: [issue35038] AttributeError: 'frame' object has no attribute 'f_restricted' In-Reply-To: <1540134122.28.0.788709270274.issue35038@psf.upfronthosting.co.za> Message-ID: <1540502039.65.0.788709270274.issue35038@psf.upfronthosting.co.za> Change by miss-islington : ---------- keywords: +patch pull_requests: +9435 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 17:14:08 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Oct 2018 21:14:08 +0000 Subject: [issue35038] AttributeError: 'frame' object has no attribute 'f_restricted' In-Reply-To: <1540134122.28.0.788709270274.issue35038@psf.upfronthosting.co.za> Message-ID: <1540502048.54.0.788709270274.issue35038@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9436 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 17:16:17 2018 From: report at bugs.python.org (Petter S) Date: Thu, 25 Oct 2018 21:16:17 +0000 Subject: [issue34547] Wsgiref server does not handle closed connections gracefully In-Reply-To: <1535624235.67.0.56676864532.issue34547@psf.upfronthosting.co.za> Message-ID: <1540502177.11.0.788709270274.issue34547@psf.upfronthosting.co.za> Change by Petter S : ---------- pull_requests: +9437, 9438 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 17:16:17 2018 From: report at bugs.python.org (Petter S) Date: Thu, 25 Oct 2018 21:16:17 +0000 Subject: [issue34547] Wsgiref server does not handle closed connections gracefully In-Reply-To: <1535624235.67.0.56676864532.issue34547@psf.upfronthosting.co.za> Message-ID: <1540502177.04.0.788709270274.issue34547@psf.upfronthosting.co.za> Change by Petter S : ---------- pull_requests: +9437 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 17:19:35 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Oct 2018 21:19:35 +0000 Subject: [issue35038] AttributeError: 'frame' object has no attribute 'f_restricted' In-Reply-To: <1540134122.28.0.788709270274.issue35038@psf.upfronthosting.co.za> Message-ID: <1540502375.4.0.788709270274.issue35038@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c64c4056c1fce0a18e5810fc6352712612a64010 by Miss Islington (bot) in branch '3.7': bpo-35038: AttributeError: 'frame' object has no attribute 'f_restricted'. (GH-10098) https://github.com/python/cpython/commit/c64c4056c1fce0a18e5810fc6352712612a64010 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 17:22:04 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Oct 2018 21:22:04 +0000 Subject: [issue35038] AttributeError: 'frame' object has no attribute 'f_restricted' In-Reply-To: <1540134122.28.0.788709270274.issue35038@psf.upfronthosting.co.za> Message-ID: <1540502524.65.0.788709270274.issue35038@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3b87151879adb795c3c0372832c87da84ee93974 by Miss Islington (bot) in branch '3.6': bpo-35038: AttributeError: 'frame' object has no attribute 'f_restricted'. (GH-10098) https://github.com/python/cpython/commit/3b87151879adb795c3c0372832c87da84ee93974 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 17:33:17 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Oct 2018 21:33:17 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540503197.09.0.788709270274.issue35070@psf.upfronthosting.co.za> Ned Deily added the comment: "on a vanilla-ish 10.8 VM" ?? I meant 10.14, of course. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 17:42:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 21:42:59 +0000 Subject: [issue35053] Enhance tracemalloc to trace properly free lists In-Reply-To: <1540312934.43.0.788709270274.issue35053@psf.upfronthosting.co.za> Message-ID: <1540503779.33.0.788709270274.issue35053@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9439 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 17:49:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 21:49:03 +0000 Subject: [issue35022] MagicMock should support `__fspath__` In-Reply-To: <1539908991.05.0.788709270274.issue35022@psf.upfronthosting.co.za> Message-ID: <1540504143.68.0.788709270274.issue35022@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 6c83d9f4a72905d968418bef670bb3091d2744db by Victor Stinner (Max B?langer) in branch 'master': bpo-35022: unittest.mock.MagicMock now also supports __fspath__ (GH-9960) https://github.com/python/cpython/commit/6c83d9f4a72905d968418bef670bb3091d2744db ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 17:51:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 21:51:31 +0000 Subject: [issue35022] MagicMock should support `__fspath__` In-Reply-To: <1539908991.05.0.788709270274.issue35022@psf.upfronthosting.co.za> Message-ID: <1540504291.3.0.788709270274.issue35022@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Maxime Belanger for your contribution! Thanks Mario Corchero for the review. Oh, you added Python 3.7 to this issue, but sadly we don't add new features to minor Python versions (like Python 3.7.2) :-( Otherwise, it would mean that depending on the minor version, you may or may get the feature... You will have to workaround MagicMock limitation until Python 3.8 is released. ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 18:02:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 22:02:02 +0000 Subject: [issue35053] Enhance tracemalloc to trace properly free lists In-Reply-To: <1540312934.43.0.788709270274.issue35053@psf.upfronthosting.co.za> Message-ID: <1540504922.2.0.788709270274.issue35053@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c89a93271447ec65e83a1dc7605e62dbf272cafd by Victor Stinner in branch 'master': bpo-35053: Define _PyTraceMalloc_NewReference in object.h (GH-10107) https://github.com/python/cpython/commit/c89a93271447ec65e83a1dc7605e62dbf272cafd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 18:03:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 22:03:41 +0000 Subject: [issue35053] Enhance tracemalloc to trace properly free lists In-Reply-To: <1540312934.43.0.788709270274.issue35053@psf.upfronthosting.co.za> Message-ID: <1540505021.3.0.788709270274.issue35053@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh :-( I didn't expect that I would have to declare PyTraceMalloc_NewReference() in object.h even if Py_LIMITED_API is defined... Python currently leaks too much things even if Py_LIMITED_API is defined. It's time to break the C API! :-) https://pythoncapi.readthedocs.io/ (just kidding, or not) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 18:22:30 2018 From: report at bugs.python.org (Carl Meyer) Date: Thu, 25 Oct 2018 22:22:30 +0000 Subject: [issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__ In-Reply-To: <1539668705.97.0.788709270274.issue34995@psf.upfronthosting.co.za> Message-ID: <1540506150.66.0.788709270274.issue34995@psf.upfronthosting.co.za> Carl Meyer added the comment: FWIW, it seems to me (author of `cached_property` patch) that while just using `@property` on the abstract method plus a comment is a reasonable and functional workaround that sacrifices only a small documentation value, there's no reason why `@cached_property` shouldn't propagate this flag in the same way `@property` does. It seems reasonable to me to consider this behavior discrepancy a bug; I'd have fixed it if made aware of it while developing `cached_property`. ---------- nosy: +carljm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 18:33:15 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 22:33:15 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1540506795.05.0.788709270274.issue9263@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9440 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 18:34:27 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 25 Oct 2018 22:34:27 +0000 Subject: [issue35038] AttributeError: 'frame' object has no attribute 'f_restricted' In-Reply-To: <1540134122.28.0.788709270274.issue35038@psf.upfronthosting.co.za> Message-ID: <1540506867.57.0.788709270274.issue35038@psf.upfronthosting.co.za> St?phane Wirtel added the comment: all the PRs have been merged, we can close this issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 18:50:55 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Oct 2018 22:50:55 +0000 Subject: [issue35055] Error when we try to download the epub archive In-Reply-To: <1540322085.68.0.788709270274.issue35055@psf.upfronthosting.co.za> Message-ID: <1540507855.49.0.788709270274.issue35055@psf.upfronthosting.co.za> Ned Deily added the comment: @St?phane, please leave this open for now until we have a better resolution. We'll make sure it gets closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 18:51:28 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 25 Oct 2018 22:51:28 +0000 Subject: [issue35055] Error when we try to download the epub archive In-Reply-To: <1540322085.68.0.788709270274.issue35055@psf.upfronthosting.co.za> Message-ID: <1540507888.56.0.788709270274.issue35055@psf.upfronthosting.co.za> St?phane Wirtel added the comment: thanks ned ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 18:55:21 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 25 Oct 2018 22:55:21 +0000 Subject: [issue35069] Unexecuted import in function causes UnboundLocalError In-Reply-To: <1540495731.24.0.788709270274.issue35069@psf.upfronthosting.co.za> Message-ID: <1540508121.81.0.788709270274.issue35069@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Steven, Sure, I am going to explain, I was at the social event of PyCon Germany without my laptop and the code was not really clear on my smartphone. I wanted to know if there was an indentation issue. It's also the reason for my big reply with the initial email because I have replied on my phone. But after that, you have replied. I am really sorry for the inconvenience. Thank you ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 18:55:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 22:55:30 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1540508130.73.0.788709270274.issue9263@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9441 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 19:14:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 23:14:49 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1540509289.53.0.788709270274.issue9263@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9442 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 19:33:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 23:33:18 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1540510398.84.0.788709270274.issue9263@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9443 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 19:40:28 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 23:40:28 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1540510828.0.0.788709270274.issue9263@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9444 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 19:47:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Oct 2018 23:47:37 +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: <1540511257.4.0.788709270274.issue35031@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 20:09:21 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 26 Oct 2018 00:09:21 +0000 Subject: [issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field In-Reply-To: <1540440221.28.0.788709270274.issue35062@psf.upfronthosting.co.za> Message-ID: <1540512561.26.0.788709270274.issue35062@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 20:12:40 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 00:12:40 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1540512760.24.0.788709270274.issue9263@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3ec9af75f6825a32f369ee182a388c365db241b6 by Victor Stinner in branch 'master': bpo-9263: _Py_NegativeRefcount() use _PyObject_AssertFailed() (GH-10109) https://github.com/python/cpython/commit/3ec9af75f6825a32f369ee182a388c365db241b6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 20:23:17 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 26 Oct 2018 00:23:17 +0000 Subject: [issue35007] Minor change to weakref docs In-Reply-To: <1539755313.9.0.788709270274.issue35007@psf.upfronthosting.co.za> Message-ID: <1540513397.07.0.788709270274.issue35007@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 20:48:10 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 26 Oct 2018 00:48:10 +0000 Subject: [issue35064] COUNT_ALLOCS build export inc_count() and dec_count() functions which don't have a "Py_" prefix In-Reply-To: <1540462435.94.0.788709270274.issue35064@psf.upfronthosting.co.za> Message-ID: <1540514890.55.0.788709270274.issue35064@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 20:51:09 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 26 Oct 2018 00:51:09 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540515069.36.0.788709270274.issue34576@psf.upfronthosting.co.za> Change by Senthil Kumaran : ---------- pull_requests: +9445 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 20:55:10 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 26 Oct 2018 00:55:10 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540515310.61.0.788709270274.issue34576@psf.upfronthosting.co.za> Change by Senthil Kumaran : ---------- pull_requests: +9446 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 20:55:13 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 26 Oct 2018 00:55:13 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540515313.24.0.788709270274.issue34576@psf.upfronthosting.co.za> Change by Senthil Kumaran : ---------- pull_requests: +9446, 9447 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 21:02:01 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 26 Oct 2018 01:02:01 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540515721.38.0.788709270274.issue34576@psf.upfronthosting.co.za> Change by Senthil Kumaran : ---------- pull_requests: +9448 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 21:09:34 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 26 Oct 2018 01:09:34 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540516174.31.0.788709270274.issue34576@psf.upfronthosting.co.za> Change by Senthil Kumaran : ---------- pull_requests: +9449 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 21:10:44 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 26 Oct 2018 01:10:44 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540516244.35.0.788709270274.issue34576@psf.upfronthosting.co.za> Senthil Kumaran added the comment: This should be it - https://github.com/python/cpython/pull/10116 https://github.com/python/cpython/pull/10114 https://github.com/python/cpython/pull/10113 https://github.com/python/cpython/pull/10115 Lets merge these simple PRs and close this issue. ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 25 22:41:32 2018 From: report at bugs.python.org (Braden Groom) Date: Fri, 26 Oct 2018 02:41:32 +0000 Subject: [issue1154351] add get_current_dir_name() to os module Message-ID: <1540521692.27.0.788709270274.issue1154351@psf.upfronthosting.co.za> Change by Braden Groom : ---------- pull_requests: +9450 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 00:36:16 2018 From: report at bugs.python.org (Samuel Warfield) Date: Fri, 26 Oct 2018 04:36:16 +0000 Subject: [issue35072] re.sub does not play nice with chr(92) Message-ID: <1540528576.04.0.788709270274.issue35072@psf.upfronthosting.co.za> New submission from Samuel Warfield : Bug with regex substitutions. When calling the re.sub() method directly char(92), the double backslash charecter as the replacement, throws an exception. Whereas compiling a regex object then calling its own .sub() method works completely fine. I did a quick look through the bug tracker search for similar issues and none were reported. # Breaks re.sub(r'\\\\', chr(92), stringy_thingy) vs # Works parser = re.compile(r'\\\\') parser.sub(chr(92), stringy_thingy) # Where stringy_thingy is a string that is being substituted ---------- components: Regular Expressions messages: 328509 nosy: Samuel Warfield, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: re.sub does not play nice with chr(92) versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 00:55:03 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 26 Oct 2018 04:55:03 +0000 Subject: [issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__ In-Reply-To: <1539668705.97.0.788709270274.issue34995@psf.upfronthosting.co.za> Message-ID: <1540529703.67.0.788709270274.issue34995@psf.upfronthosting.co.za> INADA Naoki added the comment: > I like the idea of using @functools.cached_property in an abstract class as "documentation". To announce that the property will be cached, even if technically it will not be cached. It's more to use the code as documentation than to execute any code. When thinking about "code as documentation", we should think not only Python iterpreter, but also IDE, static analystics tools. If we support abstractmethod + cached_property, it means we encourage to all IDEs & tools to support it. Otherwise, code completion or static analytics will be broken. I think "this property is likely (but not must be) cached" hint is not worth enough to add such complexity to all IDEs / static analytics tools. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 01:01:14 2018 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Oct 2018 05:01:14 +0000 Subject: [issue35072] re.sub does not play nice with chr(92) In-Reply-To: <1540528576.04.0.788709270274.issue35072@psf.upfronthosting.co.za> Message-ID: <1540530074.86.0.788709270274.issue35072@psf.upfronthosting.co.za> Ezio Melotti added the comment: I'm assuming you want to replace double backslashes with single backslashes in stringy_thing, so I defined stringy_thingy and tried both your snippets but they are both failing: >>> stringy_thingy = r'foo\\bar\\baz' >>> print(stringy_thingy) # stringy_thingy contains double backslashes foo\\bar\\baz >>> re.sub(r'\\\\', chr(92), stringy_thingy) # fails Traceback (most recent call last): ... File "/usr/lib/python3.6/sre_parse.py", line 245, in __next self.string, len(self.string) - 1) from None sre_constants.error: bad escape (end of pattern) at position 0 >>> >>> parser = re.compile(r'\\\\') >>> parser.sub(chr(92), stringy_thingy) # also fails Traceback (most recent call last): ... File "/usr/lib/python3.6/sre_parse.py", line 245, in __next self.string, len(self.string) - 1) from None sre_constants.error: bad escape (end of pattern) at position 0 Replacing chr(92) with r'\\' works for both: >>> print(re.sub(r'\\\\', r'\\', stringy_thingy)) foo\bar\baz >>> print(parser.sub(r'\\', stringy_thingy)) foo\bar\baz The docs[0] says: "repl can be a string or a function; if it is a string, any backslash escapes in it are processed." So passing chr(92) (or '\\', which is equivalent) result in the above error ("bad escape (end of pattern)") because it's seen as an incomplete escape sequence. Passing r'\\' seems to work as intended. ISTM there is no bug and re.sub works as documented. Can you provide a stringy_thingy for which the first of your snippet fails but the second succeeds? [0]: https://docs.python.org/3/library/re.html#re.sub ---------- resolution: -> not a bug stage: -> test needed status: open -> pending type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 01:31:45 2018 From: report at bugs.python.org (Quentin Agren) Date: Fri, 26 Oct 2018 05:31:45 +0000 Subject: [issue35073] 'from app import __init__' behaves differently with native import and importlib Message-ID: <1540531905.09.0.788709270274.issue35073@psf.upfronthosting.co.za> New submission from Quentin Agren : I'm running Python 3.6 on Ubuntu 16.04 I don't know if this should qualify as a bug, but I noticed the following behavior difference in the (contrived?) scenario of directly importing '__init__' from a package: ## Setup ## mkdir app echo 'print(f"Executing app/__init__.py as {__name__}")' > app/__init__.py ## Native: executes __init__ *once* ## python -c 'from app import __init__' # Output: # Executing app/__init__.py as app ## Importlib: executes __init__ *twice* ## python -c "import importlib; importlib.import_module('.__init__', 'app')" # Output: # Executing app/__init__.py as app # Executing app/__init__.py as app.__init__ Note in addition that absolute import (either with importlib or native) executes '__init__' twice. ---------- components: Library (Lib) messages: 328512 nosy: qagren priority: normal severity: normal status: open title: 'from app import __init__' behaves differently with native import and importlib type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 01:58:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 05:58:47 +0000 Subject: [issue35073] 'from app import __init__' behaves differently with native import and importlib In-Reply-To: <1540531905.09.0.788709270274.issue35073@psf.upfronthosting.co.za> Message-ID: <1540533527.49.0.788709270274.issue35073@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: `from app import __init__` is equivalent to `importlib.import_module('app').__init__`. `importlib.import_module('.__init__', 'app')` is equivalent to `import app.__init__`. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 02:00:42 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 26 Oct 2018 06:00:42 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540533642.85.0.788709270274.issue35059@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Why do we need this Py_STATIC_INLINE macro? If you want to have one for enabling always inline, that's fine with me, since it's compiler-specific. But the current Py_STATIC_INLINE macro seems to conflate linkage with always-inline behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 02:00:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 06:00:55 +0000 Subject: [issue35054] Add more index entries for symbols In-Reply-To: <1540316703.62.0.788709270274.issue35054@psf.upfronthosting.co.za> Message-ID: <1540533655.13.0.788709270274.issue35054@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ddb961d2abe5d5fde76d85b21a77e4e91e0043ad by Serhiy Storchaka in branch 'master': bpo-35054: Add more index entries for symbols. (GH-10064) https://github.com/python/cpython/commit/ddb961d2abe5d5fde76d85b21a77e4e91e0043ad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 02:35:23 2018 From: report at bugs.python.org (Petter S) Date: Fri, 26 Oct 2018 06:35:23 +0000 Subject: [issue34547] Wsgiref server does not handle closed connections gracefully In-Reply-To: <1535624235.67.0.56676864532.issue34547@psf.upfronthosting.co.za> Message-ID: <1540535723.0.0.788709270274.issue34547@psf.upfronthosting.co.za> Change by Petter S : ---------- pull_requests: -9437 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 02:35:31 2018 From: report at bugs.python.org (Petter S) Date: Fri, 26 Oct 2018 06:35:31 +0000 Subject: [issue34547] Wsgiref server does not handle closed connections gracefully In-Reply-To: <1535624235.67.0.56676864532.issue34547@psf.upfronthosting.co.za> Message-ID: <1540535731.87.0.788709270274.issue34547@psf.upfronthosting.co.za> Change by Petter S : ---------- pull_requests: -9438 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 02:57:55 2018 From: report at bugs.python.org (Leo Li) Date: Fri, 26 Oct 2018 06:57:55 +0000 Subject: [issue35074] source install [3.7.1] on debian jessie Message-ID: <1540537075.17.0.788709270274.issue35074@psf.upfronthosting.co.za> New submission from Leo Li : Hi Team, I met the issue consistently on 3.7 and 3.7.1. The configure is well, but when the make will output error messges: step1: [ok] sudo ./configure --prefix=/opt/python3.71 --enable-optimizations step2: make [fail] if test $? -ne 0 ; then \ echo "generate-posix-vars failed" ; \ rm -f ./pybuilddir.txt ; \ exit 1 ; \ fi Could not import runpy module Traceback (most recent call last): File "/opt/Python-3.7.1/Lib/runpy.py", line 15, in import importlib.util File "/opt/Python-3.7.1/Lib/importlib/util.py", line 14, in from contextlib import contextmanager File "/opt/Python-3.7.1/Lib/contextlib.py", line 4, in import _collections_abc SystemError: returned NULL without setting an error generate-posix-vars failed Makefile:595: recipe for target 'pybuilddir.txt' failed make[1]: *** [pybuilddir.txt] Error 1 make[1]: Leaving directory '/opt/Python-3.7.1' Makefile:523: recipe for target 'profile-opt' failed make: *** [profile-opt] Error 2 (venv36) myhost ? Python-3.7.1 gcc --version gcc (Debian 4.9.2-10+deb8u1) 4.9.2 Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. (venv36) myhost ? Python-3.7.1 uname -a Linux docker 3.16.0-6-amd64 #1 SMP Debian 3.16.57-2 (2018-07-14) x86_64 GNU/Linux Any questions pls mail me. ---------- messages: 328516 nosy: foxleoly priority: normal severity: normal status: open title: source install [3.7.1] on debian jessie type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 03:03:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 07:03:43 +0000 Subject: [issue35054] Add more index entries for symbols In-Reply-To: <1540316703.62.0.788709270274.issue35054@psf.upfronthosting.co.za> Message-ID: <1540537423.12.0.788709270274.issue35054@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9451 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 03:03:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 07:03:51 +0000 Subject: [issue35054] Add more index entries for symbols In-Reply-To: <1540316703.62.0.788709270274.issue35054@psf.upfronthosting.co.za> Message-ID: <1540537431.68.0.788709270274.issue35054@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9452 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 03:35:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 07:35:38 +0000 Subject: [issue1154351] add get_current_dir_name() to os module Message-ID: <1540539338.39.0.788709270274.issue1154351@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 3.8 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 03:40:43 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 26 Oct 2018 07:40:43 +0000 Subject: [issue35075] Doc: pprint example uses dead URL Message-ID: <1540539643.28.0.788709270274.issue35075@psf.upfronthosting.co.za> New submission from INADA Naoki : https://mail.python.org/pipermail/docs/2018-October/037913.html Dead URL: http://pypi.org/project/Twisted/json Valid URL: https://pypi.org/pypi/Twisted/json But JSON returned by the valid URL seems too long for the example. Is there a better sample JSON we can use in the example? ---------- assignee: docs at python components: Documentation messages: 328517 nosy: docs at python, inada.naoki priority: normal severity: normal status: open title: Doc: pprint example uses dead URL versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 03:47:18 2018 From: report at bugs.python.org (Quentin Agren) Date: Fri, 26 Oct 2018 07:47:18 +0000 Subject: [issue35073] 'from app import __init__' behaves differently with native import and importlib In-Reply-To: <1540531905.09.0.788709270274.issue35073@psf.upfronthosting.co.za> Message-ID: <1540540038.76.0.788709270274.issue35073@psf.upfronthosting.co.za> Quentin Agren added the comment: Sorry for the misunderstanding, and thanks for clarifying! So essentially what I am getting by `from app import __init__` is the `__init__` method of the module object bound to the name `app`. However if I have a submodule `app/myapp.py`, `from app import myapp` will import it and bind it to the name `myapp`, whereas `importlib.import_module('app').myapp` raises AttributeError, so I guess the two forms not totally equivalent... Anyways, I'll investigate deeper before creating an issue henceforth :) ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 03:51:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 07:51:30 +0000 Subject: [issue1154351] add get_current_dir_name() to os module Message-ID: <1540540290.2.0.788709270274.issue1154351@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 03:52:27 2018 From: report at bugs.python.org (Julien Palard) Date: Fri, 26 Oct 2018 07:52:27 +0000 Subject: [issue35007] Minor change to weakref docs In-Reply-To: <1539755313.9.0.788709270274.issue35007@psf.upfronthosting.co.za> Message-ID: <1540540347.73.0.788709270274.issue35007@psf.upfronthosting.co.za> Julien Palard added the comment: In the other end that's true that's an iterable, and that's what's count. So if we want to change the implementation in the future, we still can, as long as we still return an iterable, it won't break asumptions. So I'll keep the "iterable" word in the documentation, and it looks OK to me that the docstring tells more about the implementation than the interface, so I'll leave it as is too. Relying on what you read in the current implementation is relying on an implementation detail that may change in the future, this weakens your code, please just consider it's an iterable? Anyway the key set of the WeakKeyDictionary can change at any time, according to the actions you're doing while iterating over the keys, so better write solid code here, and be prepred for the worse, don't rely on implementation details. ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 04:09:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 08:09:22 +0000 Subject: [issue35056] Test leaks of memory not managed by Python allocator In-Reply-To: <1540323419.75.0.788709270274.issue35056@psf.upfronthosting.co.za> Message-ID: <1540541362.7.0.788709270274.issue35056@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Can it be used on buildbots and in CI tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 04:14:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 08:14:40 +0000 Subject: [issue21967] Interpreter crash upon accessing frame.f_restricted of a frame from a dead thread In-Reply-To: <1405182669.73.0.676876650483.issue21967@psf.upfronthosting.co.za> Message-ID: <1540541680.11.0.788709270274.issue21967@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report Anselm. Seems this bug is fixed in issue22851. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> 2.7 core crashes with generator.gi_frame.f_restricted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 04:17:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 08:17:37 +0000 Subject: [issue35073] 'from app import __init__' behaves differently with native import and importlib In-Reply-To: <1540531905.09.0.788709270274.issue35073@psf.upfronthosting.co.za> Message-ID: <1540541857.03.0.788709270274.issue35073@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The difference is that attribute "__init__" existed. If you set the "myapp" global in the "app" module, the file "app/myapp.py" will be not imported. ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 04:18:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 08:18:55 +0000 Subject: [issue35054] Add more index entries for symbols In-Reply-To: <1540316703.62.0.788709270274.issue35054@psf.upfronthosting.co.za> Message-ID: <1540541935.8.0.788709270274.issue35054@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 9a75b8470a2e0de5406edcabba140f023c99c6a9 by Serhiy Storchaka in branch '3.7': [3.7] bpo-35054: Add more index entries for symbols. (GH-10064). (GH-10120) https://github.com/python/cpython/commit/9a75b8470a2e0de5406edcabba140f023c99c6a9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 04:19:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 08:19:01 +0000 Subject: [issue35054] Add more index entries for symbols In-Reply-To: <1540316703.62.0.788709270274.issue35054@psf.upfronthosting.co.za> Message-ID: <1540541941.66.0.788709270274.issue35054@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset e825b4e1a9bbe1d4c561f4cbbe6857653ef13a15 by Serhiy Storchaka in branch '3.6': [3.6] bpo-35054: Add more index entries for symbols. (GH-10064). (GH-10119) https://github.com/python/cpython/commit/e825b4e1a9bbe1d4c561f4cbbe6857653ef13a15 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 04:27:14 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 26 Oct 2018 08:27:14 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540542434.85.0.788709270274.issue34576@psf.upfronthosting.co.za> Senthil Kumaran added the comment: New changeset 971089fc2a09e4bcb872efac52c1b014af16fff9 by Senthil Kumaran in branch '2.7': [2.7] bpo-34576 : Backport eeab510 2.7 (#10115) https://github.com/python/cpython/commit/971089fc2a09e4bcb872efac52c1b014af16fff9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 04:30:30 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 26 Oct 2018 08:30:30 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540542630.31.0.788709270274.issue35070@psf.upfronthosting.co.za> Ronald Oussoren added the comment: FWIW I don't see the problem either, VM running 10.14.1 (beta) with Python 3.7.0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 04:57:34 2018 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Fri, 26 Oct 2018 08:57:34 +0000 Subject: [issue33533] Provide an async-generator version of as_completed In-Reply-To: <1526453333.0.0.682650639539.issue33533@psf.upfronthosting.co.za> Message-ID: <1540544254.05.0.788709270274.issue33533@psf.upfronthosting.co.za> Hrvoje Nik?i? added the comment: I didn't start working on the PR, so please go ahead if you're interested. One small suggestion: If you're implementing this, please note that the proof-of-concept implementation shown in the description is not very efficient because each call to `wait` has to iterate over all the futures (which can be potentially large in number) to set up and tear down the done callbacks on each one. A more efficient implementation would set up the callbacks only once - see https://stackoverflow.com/a/51403277/1600898 for an example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 05:47:56 2018 From: report at bugs.python.org (Vincent Michel) Date: Fri, 26 Oct 2018 09:47:56 +0000 Subject: [issue35065] Reading received data from a closed TCP stream using `StreamReader.read` might hang forever In-Reply-To: <1540470746.12.0.788709270274.issue35065@psf.upfronthosting.co.za> Message-ID: <1540547276.97.0.788709270274.issue35065@psf.upfronthosting.co.za> Vincent Michel added the comment: Hi Andrew! I reverted the commit associated with the following PR, and the hanging issue disappeared: https://github.com/python/cpython/pull/9201 I'll look into it. ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 06:18:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 10:18:19 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540549099.64.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: Benjamin: > Why do we need this Py_STATIC_INLINE macro? If you want to have one for enabling always inline, that's fine with me, since it's compiler-specific. For about the name, there is already Py_LOCAL_INLINE which also uses "static inline", but has a very different usage: "Py_LOCAL can be used instead of static to get the fastest possible calling convention for functions that are local to a given module." So I chise "Py_STATIC_INLINE" name, it describes the basic implementation ("static inline TYPE"). Py_STATIC_INLINE() is designed to replace a preprocessor macro with a function, when you care that the code is "always inlined". (Maybe the name is not perfect ;-)) Honestly, I'm not sure that it really matters that the function is "always" inlined. The main issue is that "static" requires to duplicate the function in each file which uses the macro, when the function cannot/is not inlined. Previously, you asked me: > Does this slow down debug builds at all? It probably will not end will if Py_INCREF is ever not inlined. That's why I wrote Py_STATIC_INLINE() to "force" inlining and PR 10094 to enable inlining for Debug build on MSVC. > But the current Py_STATIC_INLINE macro seems to conflate linkage with always-inline behavior. I'm not sure that I get it. Do you talk about "static" inside the macro? bpo-33407 modifies Py_DEPRECATED() to support Visual Stuido, but it requires to modify how the macro is used: it now must be used at the start, rather than at the end: https://github.com/python/cpython/pull/8980/files I chose to put "static" and "inline" in the same macro. We already have many other similar macros like PyAPI_FUNC(TYPE) and Py_LOCAL(TYPE). I would like to have a common way to "declare a function behaving as a macro". Please see also the discussion on the PR itself, Neil discuss what's the best way to declare an inline function: https://github.com/python/cpython/pull/10079#issuecomment-433230587 By the way, was it you who required "static inline" support in PEP 7? :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 06:18:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 10:18:55 +0000 Subject: [issue35056] Test leaks of memory not managed by Python allocator In-Reply-To: <1540323419.75.0.788709270274.issue35056@psf.upfronthosting.co.za> Message-ID: <1540549135.5.0.788709270274.issue35056@psf.upfronthosting.co.za> STINNER Victor added the comment: > Can it be used on buildbots and in CI tests? These kind of tool produces a lot of false alarms :-( They are also hard to use. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 06:19:35 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 26 Oct 2018 10:19:35 +0000 Subject: [issue35075] Doc: pprint example uses dead URL In-Reply-To: <1540539643.28.0.788709270274.issue35075@psf.upfronthosting.co.za> Message-ID: <1540549175.12.0.788709270274.issue35075@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 06:20:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 10:20:41 +0000 Subject: [issue35056] Test leaks of memory not managed by Python allocator In-Reply-To: <1540323419.75.0.788709270274.issue35056@psf.upfronthosting.co.za> Message-ID: <1540549241.25.0.788709270274.issue35056@psf.upfronthosting.co.za> STINNER Victor added the comment: Before seeing how to automate it, first someone should try to detect the bpo-34794 memory leak manually ;-) By the way, when I implemented the PEP 445, I tried to configure OpenSSL to use Python memory allocators (to benefit of tracemalloc), but the OpenSSL API for that didn't work at all: bpo-18227. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 06:27:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 10:27:03 +0000 Subject: [issue35056] Test leaks of memory not managed by Python allocator In-Reply-To: <1540323419.75.0.788709270274.issue35056@psf.upfronthosting.co.za> Message-ID: <1540549623.14.0.788709270274.issue35056@psf.upfronthosting.co.za> STINNER Victor added the comment: About automation, regrtest -R checks memory leaks using sys.getallocatedblocks(). But this function only tracks PyMem_Malloc() and PyObject_Malloc() (which is now technically the same memory allocator, since Python 3.6: https://docs.python.org/dev/c-api/memory.html#default-memory-allocators ) I tried to track PyMem_RawMalloc() using regrtest but... the raw memory allocator is not really "deterministic", it's hard to get reliable behavior. See: bpo-26850. Tracking memory leaks is an hard topic :-) I'm happy that I finally fixed tracemalloc to track properly objects in free lists: bpo-35053! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 06:38:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 10:38:06 +0000 Subject: [issue35054] Add more index entries for symbols In-Reply-To: <1540316703.62.0.788709270274.issue35054@psf.upfronthosting.co.za> Message-ID: <1540550286.87.0.788709270274.issue35054@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9453 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 06:39:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 10:39:25 +0000 Subject: [issue35056] Test leaks of memory not managed by Python allocator In-Reply-To: <1540323419.75.0.788709270274.issue35056@psf.upfronthosting.co.za> Message-ID: <1540550365.32.0.788709270274.issue35056@psf.upfronthosting.co.za> STINNER Victor added the comment: It seems like the easiest thing to do thta would directly benefit (to tracemalloc users) is to continue the implementation of bpo-18227: * _sqlite: call sqlite3_config(SQLITE_CONFIG_MALLOC, pMem) to use PyMem_RawMalloc() * _ssl: try again CRYPTO_set_mem_functions() Python modules already using Python memory allocators: * zlib: "zst.zalloc = PyZlib_Malloc" which calls PyMem_RawMalloc * _decimal: mpd_mallocfunc = PyMem_Malloc * _lzma: "self->alloc.alloc = PyLzma_Malloc" which calls PyMem_RawMalloc * pyexpat: XML_ParserCreate_MM(encoding, &ExpatMemoryHandler,...) with ExpatMemoryHandler = {PyObject_Malloc, PyObject_Realloc, PyObject_Free} * _bz2: "bzalloc = BZ2_Malloc" which calls PyMem_RawMalloc() Using Python memory allocators gives access to Python builtin "memory debugger", even in release mode using PYTHONMALLOC=debug or -X dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 06:41:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 10:41:37 +0000 Subject: [issue35054] Add more index entries for symbols In-Reply-To: <1540316703.62.0.788709270274.issue35054@psf.upfronthosting.co.za> Message-ID: <1540550497.1.0.788709270274.issue35054@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 10121 adds names for single-character symbols (e.g. "* (asterisk)"). It also adds more indices for symbols in fnmatch, glob, struct, argparse, sqlite3, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 06:52:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 10:52:17 +0000 Subject: [issue35044] Use the :exc: role for the exceptions in the doc In-Reply-To: <1540210070.18.0.788709270274.issue35044@psf.upfronthosting.co.za> Message-ID: <1540551137.33.0.788709270274.issue35044@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e483f02423917dc4dfd25f46e5b9e6fce304777d by Victor Stinner (St?phane Wirtel) in branch 'master': bpo-35044, doc: Use the :exc: role for the exceptions (GH-10037) https://github.com/python/cpython/commit/e483f02423917dc4dfd25f46e5b9e6fce304777d ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 06:52:27 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Oct 2018 10:52:27 +0000 Subject: [issue35044] Use the :exc: role for the exceptions in the doc In-Reply-To: <1540210070.18.0.788709270274.issue35044@psf.upfronthosting.co.za> Message-ID: <1540551147.98.0.788709270274.issue35044@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9454 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 06:56:32 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Oct 2018 10:56:32 +0000 Subject: [issue35044] Use the :exc: role for the exceptions in the doc In-Reply-To: <1540210070.18.0.788709270274.issue35044@psf.upfronthosting.co.za> Message-ID: <1540551392.72.0.788709270274.issue35044@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ec10b70ea66e738ccb5c28f75a9c5d2b1c197de7 by Miss Islington (bot) in branch '3.7': bpo-35044, doc: Use the :exc: role for the exceptions (GH-10037) https://github.com/python/cpython/commit/ec10b70ea66e738ccb5c28f75a9c5d2b1c197de7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 07:01:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 11:01:02 +0000 Subject: [issue35071] Canot send real string from c api to module (corrupted string) In-Reply-To: <1540498814.71.0.788709270274.issue35071@psf.upfronthosting.co.za> Message-ID: <1540551662.84.0.788709270274.issue35071@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PyUnicode_FromString() doesn't interpret %. Did you use PyUnicode_FromFormat()? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 07:09:03 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 26 Oct 2018 11:09:03 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540552143.04.0.788709270274.issue33899@psf.upfronthosting.co.za> Change by Tal Einat : ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 07:19:19 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 26 Oct 2018 11:19:19 +0000 Subject: [issue34890] Support functools.partial in inspect.is*function() checks In-Reply-To: <1538638196.31.0.545547206417.issue34890@psf.upfronthosting.co.za> Message-ID: <1540552759.9.0.788709270274.issue34890@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset 7cd25434164882c2093ea41ccfc7b95a05cd5cbd by Pablo Galindo in branch 'master': bpo-34890: Make iscoroutinefunction, isgeneratorfunction and isasyncgenfunction work with functools.partial (GH-9903) https://github.com/python/cpython/commit/7cd25434164882c2093ea41ccfc7b95a05cd5cbd ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 07:23:04 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 26 Oct 2018 11:23:04 +0000 Subject: [issue34890] Support functools.partial in inspect.is*function() checks In-Reply-To: <1538638196.31.0.545547206417.issue34890@psf.upfronthosting.co.za> Message-ID: <1540552984.93.0.788709270274.issue34890@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 07:24:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 11:24:54 +0000 Subject: [issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self" In-Reply-To: <1448654213.28.0.807225788685.issue25750@psf.upfronthosting.co.za> Message-ID: <1540553094.86.0.788709270274.issue25750@psf.upfronthosting.co.za> STINNER Victor added the comment: Comment on the commit: https://github.com/python/cpython/commit/5a30620e68ebb911eef4d583de3776d782148637#commitcomment-31057082 "bad_get should be explicitly cast to PyCFunction here, or else the compiler will balk; see https://bugs.python.org/msg328176 " ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 07:30:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 11:30:08 +0000 Subject: [issue35044] Use the :exc: role for the exceptions in the doc In-Reply-To: <1540210070.18.0.788709270274.issue35044@psf.upfronthosting.co.za> Message-ID: <1540553408.5.0.788709270274.issue35044@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 07:50:39 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 26 Oct 2018 11:50:39 +0000 Subject: [issue35074] source install [3.7.1] on debian jessie In-Reply-To: <1540537075.17.0.788709270274.issue35074@psf.upfronthosting.co.za> Message-ID: <1540554639.26.0.788709270274.issue35074@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. Is this related using older version of GCC? Searching the bug tracker tells me a related issue (https://bugs.python.org/issue34112) where --enable-optimizations caused build error on 3.7.0 for older compiler toolchain like GCC 4 with a very similar traceback. * Can you please upgrading GCC and try? * Does the build also fails without --enable-optimizations flag with your current version of GCC? ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 07:56:33 2018 From: report at bugs.python.org (jean-michel) Date: Fri, 26 Oct 2018 11:56:33 +0000 Subject: [issue35076] FAIL: test_min_max_version (test.test_ssl.ContextTests) with libressl-2.8.2 Message-ID: <1540554977.97.0.788709270274.issue35076@psf.upfronthosting.co.za> New submission from jean-michel : Hi. Python-3.7.1 with LibreSSL-2.8.2 and patches from https://github.com/python/cpython/pull/8055 and https://github.com/python/cpython/pull/8050 Compilation failed because of test_ssl failed. A detailed list of all the patches that I use for my python-3.7.1 compilation with LibreSSL-2.8.2: https://github.com/python/cpython/commit/4254483b21ec534ea942afa4ccd39dcb9bce3794 https://github.com/python/cpython/commit/8352fd3bbeef09cc14af61a0b88a8fcefd2279e3 https://github.com/python/cpython/commit/77d24d830fa4976998ac41b253d06654fae3ed5b https://github.com/python/cpython/commit/2a0961153b15b032bae03f46297e56555e4612ba https://github.com/python/cpython/commit/f415a39463e8bffb338f39d846c3141f3635271c https://github.com/python/cpython/commit/abc1b0aefd79ad8b412d4e74900dd43cdea46f97 https://github.com/python/cpython/commit/3a421ebdefaedb8522cf5ebe86d16a683a580607 https://github.com/python/cpython/commit/d98c1603a1c9583eddab92b30b091a583229fb3f FAIL: test_min_max_version (test.test_ssl.ContextTests) Traceback (most recent call last): File "/tmp/makepkg/python/src/Python-3.7.1/Lib/test/test_ssl.py", line 1163, in test_min_max_version ctx.maximum_version, ssl.TLSVersion.MAXIMUM_SUPPORTED AssertionError: != ---------- assignee: christian.heimes components: SSL files: python-3.7.1-2-libressl-2.8.2-1-WithPatches.txt messages: 328541 nosy: christian.heimes, jean-michel priority: normal severity: normal status: open title: FAIL: test_min_max_version (test.test_ssl.ContextTests) with libressl-2.8.2 type: compile error versions: Python 3.7 Added file: https://bugs.python.org/file47892/python-3.7.1-2-libressl-2.8.2-1-WithPatches.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 08:35:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 12:35:08 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540557308.94.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b4435e20a92af474f117b78b98ddc6f515363af5 by Victor Stinner in branch 'master': bpo-35059: Convert PyObject_INIT() to function (GH-10077) https://github.com/python/cpython/commit/b4435e20a92af474f117b78b98ddc6f515363af5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 08:47:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 12:47:49 +0000 Subject: [issue33710] Deprecate gettext.lgettext() In-Reply-To: <1527764456.73.0.682650639539.issue33710@psf.upfronthosting.co.za> Message-ID: <1540558069.33.0.788709270274.issue33710@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 09:10:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 13:10:36 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540559436.06.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a05bef4f5be1bcd0df63ec0eb88b64fdde593a86 by Victor Stinner in branch 'master': bpo-35059, PCbuild: Expand inline funcs in Debug (GH-10094) https://github.com/python/cpython/commit/a05bef4f5be1bcd0df63ec0eb88b64fdde593a86 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 09:12:06 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 26 Oct 2018 13:12:06 +0000 Subject: [issue34789] Make xml.sax.make_parser accept iterables In-Reply-To: <1537805047.54.0.956365154283.issue34789@psf.upfronthosting.co.za> Message-ID: <1540559526.88.0.788709270274.issue34789@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 1487b651caa62647f8f8c9e8432e475e3566130c by Tal Einat (Andr?s Delfino) in branch '3.7': [3.7] bpo-34789: xml.sax.make_parser expects a list not just any sequence (GH-9542) https://github.com/python/cpython/commit/1487b651caa62647f8f8c9e8432e475e3566130c ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 09:12:26 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Oct 2018 13:12:26 +0000 Subject: [issue34789] Make xml.sax.make_parser accept iterables In-Reply-To: <1537805047.54.0.956365154283.issue34789@psf.upfronthosting.co.za> Message-ID: <1540559546.84.0.788709270274.issue34789@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9455 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 09:12:38 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Oct 2018 13:12:38 +0000 Subject: [issue34789] Make xml.sax.make_parser accept iterables In-Reply-To: <1537805047.54.0.956365154283.issue34789@psf.upfronthosting.co.za> Message-ID: <1540559558.4.0.788709270274.issue34789@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9456 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 09:27:22 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Oct 2018 13:27:22 +0000 Subject: [issue34789] Make xml.sax.make_parser accept iterables In-Reply-To: <1537805047.54.0.956365154283.issue34789@psf.upfronthosting.co.za> Message-ID: <1540560442.19.0.788709270274.issue34789@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 38d7620baab96c702243cfa193377a38888ec10f by Miss Islington (bot) in branch '3.6': [3.7] bpo-34789: xml.sax.make_parser expects a list not just any sequence (GH-9542) https://github.com/python/cpython/commit/38d7620baab96c702243cfa193377a38888ec10f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 09:29:47 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Oct 2018 13:29:47 +0000 Subject: [issue34789] Make xml.sax.make_parser accept iterables In-Reply-To: <1537805047.54.0.956365154283.issue34789@psf.upfronthosting.co.za> Message-ID: <1540560587.64.0.788709270274.issue34789@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 9dcb517f8ebba16a46ec2a6a97bb3e4a97daeae9 by Miss Islington (bot) in branch '2.7': [3.7] bpo-34789: xml.sax.make_parser expects a list not just any sequence (GH-9542) https://github.com/python/cpython/commit/9dcb517f8ebba16a46ec2a6a97bb3e4a97daeae9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 09:29:50 2018 From: report at bugs.python.org (Vincent Michel) Date: Fri, 26 Oct 2018 13:29:50 +0000 Subject: [issue35065] Reading received data from a closed TCP stream using `StreamReader.read` might hang forever In-Reply-To: <1540470746.12.0.788709270274.issue35065@psf.upfronthosting.co.za> Message-ID: <1540560590.22.0.788709270274.issue35065@psf.upfronthosting.co.za> Vincent Michel added the comment: I found the culprit: https://github.com/python/cpython/blob/a05bef4f5be1bcd0df63ec0eb88b64fdde593a86/Lib/asyncio/streams.py#L350 The call to `_untrack_reader` is performed too soon. Closing the transport causes `protocol.connection_lost()` to be "called soon" but by the time it is actually executed, the stream reader has been "untracked". Since the protocol doesn't know the stream reader anymore, it has not way to feed it the EOF. The fix attached removes the `_untrack_reader` call and definition altogether. I don't really see the point of this method since one has to wait for `connection_lost` to be executed before untracking the reader, but `connection_lost` already gets rid of the reader reference. With this fix, calling `writer.close` then awaiting `writer.wait_closed` (or awaiting `writer.aclose`) should: - close the transport - schedule `protocol.connection_lost` - wait for the protocol to be closed - run `protocol.connection_lost` - feed the EOF to the reader - set the protocol as closed - get rid of the reader reference in the protocol - return (making aclose causal and safe) - the reader can then be safely garbage collected But maybe I'm missing something about `_untrack_reader`? ---------- keywords: +patch Added file: https://bugs.python.org/file47893/patch-bpo-35065.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 09:46:21 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 13:46:21 +0000 Subject: [issue35017] socketserver accept a last request after shutdown In-Reply-To: <1539863713.13.0.788709270274.issue35017@psf.upfronthosting.co.za> Message-ID: <1540561581.17.0.788709270274.issue35017@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 10cb3760e8631a27f5db1e51b05494e29306c671 by Victor Stinner (Denis Ledoux) in branch 'master': bpo-35017, socketserver: don't accept request after shutdown (GH-9952) https://github.com/python/cpython/commit/10cb3760e8631a27f5db1e51b05494e29306c671 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 09:46:34 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Oct 2018 13:46:34 +0000 Subject: [issue35017] socketserver accept a last request after shutdown In-Reply-To: <1539863713.13.0.788709270274.issue35017@psf.upfronthosting.co.za> Message-ID: <1540561594.55.0.788709270274.issue35017@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9457 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 09:46:45 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Oct 2018 13:46:45 +0000 Subject: [issue35017] socketserver accept a last request after shutdown In-Reply-To: <1539863713.13.0.788709270274.issue35017@psf.upfronthosting.co.za> Message-ID: <1540561605.86.0.788709270274.issue35017@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9458 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 09:52:14 2018 From: report at bugs.python.org (Alex Bach) Date: Fri, 26 Oct 2018 13:52:14 +0000 Subject: [issue35058] Unable to Install Python on Windows In-Reply-To: <1540390509.38.0.788709270274.issue35058@psf.upfronthosting.co.za> Message-ID: <1540561934.59.0.788709270274.issue35058@psf.upfronthosting.co.za> Alex Bach added the comment: Hi Sorry for replying so late, I couldn't find the right method to use on this website. Also Steve, if I download some old version of python, would it support the latest functions that I need to learn this semester. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 09:53:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 13:53:00 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540561980.0.0.788709270274.issue35059@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9459 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 10:06:44 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Oct 2018 14:06:44 +0000 Subject: [issue35017] socketserver accept a last request after shutdown In-Reply-To: <1539863713.13.0.788709270274.issue35017@psf.upfronthosting.co.za> Message-ID: <1540562804.03.0.788709270274.issue35017@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 908082451382b8b3ba09ebba638db660edbf5d8e by Miss Islington (bot) in branch '3.7': bpo-35017, socketserver: don't accept request after shutdown (GH-9952) https://github.com/python/cpython/commit/908082451382b8b3ba09ebba638db660edbf5d8e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 10:10:45 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Oct 2018 14:10:45 +0000 Subject: [issue35017] socketserver accept a last request after shutdown In-Reply-To: <1539863713.13.0.788709270274.issue35017@psf.upfronthosting.co.za> Message-ID: <1540563045.91.0.788709270274.issue35017@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8b1f52b5a93403acd7d112cd1c1bc716b31a418a by Miss Islington (bot) in branch '3.6': bpo-35017, socketserver: don't accept request after shutdown (GH-9952) https://github.com/python/cpython/commit/8b1f52b5a93403acd7d112cd1c1bc716b31a418a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 10:15:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 14:15:58 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540563358.79.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: > bpo-35059, PCbuild: Expand inline funcs in Debug (GH-10094) > https://github.com/python/cpython/commit/a05bef4f5be1bcd0df63ec0eb88b64fdde593a86 Too bad: this change broke the compilation on AMD64 Windows7 SP1 3.x, AMD64 Windows8 3.x and AMD64 Windows10 3.x: https://github.com/python/cpython/pull/10094#issuecomment-433405364 I don't understand why: it works well on my Windows 10 VM with my up to date Visual Studio Community 2017 (version 15.8.8). The compilation also worked on AppVeyor. For me, the only explanation is that buildbots use older compiler versions. Note: I checked that _decimal is compiled on my VM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 10:36:11 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 26 Oct 2018 14:36:11 +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: <1540564571.03.0.788709270274.issue34897@psf.upfronthosting.co.za> Tal Einat added the comment: I'm not sure that the resolution currently suggested, changing compiler.set_executables(), is the right way to go. This change to distutils is a break of backwards compatibility. Though it is a minor change, it could still break existing code. Fixing test.support seems just as good to me in terms of code design, and better in that it is only used internally for our tests. (BTW, instead of `elif cmd is None or (not cmd):`, you can just use `elif not cmd:`.) ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 10:37:17 2018 From: report at bugs.python.org (Christian Tismer) Date: Fri, 26 Oct 2018 14:37:17 +0000 Subject: [issue26979] The danger of PyType_FromSpec() In-Reply-To: <1462731878.82.0.9073654009.issue26979@psf.upfronthosting.co.za> Message-ID: <1540564637.28.0.788709270274.issue26979@psf.upfronthosting.co.za> Christian Tismer added the comment: The default of PyType_FromSpec for tp_dealloc is wrong! ------------------------------------------------------- After a long struggle with crashes and leaks, the situation was finally clarified: When a type is converted from a static type to a heaptype via PyType_FromSpec, and the tp_dealloc field is NULL, then subtype_dealloc is inserted. This is not correct. The reasoning in the code is that a heaptype has subtype_dealloc. But before the conversion, the type was static, and for static types the function object_dealloc was inserted. In the given type, the only change is to become a heaptype. The by default inserted object_dealloc should not be changed, since the existing code was written with object_dealloc in mind and not the consequences of replacing it with subtype_dealloc. Before this solution, I used a dummy function to prevend subpype_dealloc being inserted, but that caused leaks. It was hard to understand that the default for a static type is object_dealloc. After that, it was easy to fix that: The now correctly working workaround is to explicitly insert an object_dealloc function whenever the default for tp_dealloc is NULL. Again, in order to use this fix, it is necessary to break the Limited API, because in order to write an object_dealloc function (it is not public) you need access to type objects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 10:41:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 14:41:51 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540564911.01.0.788709270274.issue35059@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9460 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 10:42:39 2018 From: report at bugs.python.org (Denis Ledoux) Date: Fri, 26 Oct 2018 14:42:39 +0000 Subject: [issue35017] socketserver accept a last request after shutdown In-Reply-To: <1539863713.13.0.788709270274.issue35017@psf.upfronthosting.co.za> Message-ID: <1540564959.8.0.788709270274.issue35017@psf.upfronthosting.co.za> Change by Denis Ledoux : ---------- pull_requests: +9461 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 10:57:02 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 26 Oct 2018 14:57:02 +0000 Subject: [issue34789] Make xml.sax.make_parser accept iterables In-Reply-To: <1537805047.54.0.956365154283.issue34789@psf.upfronthosting.co.za> Message-ID: <1540565822.87.0.788709270274.issue34789@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset a6dc531063efe3a8d47ff4639729060c72a3688c by Tal Einat (Andr?s Delfino) in branch 'master': bpo-34789: make xml.sax.make_parser accept iterables of all types (GH-9576) https://github.com/python/cpython/commit/a6dc531063efe3a8d47ff4639729060c72a3688c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 10:57:58 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 26 Oct 2018 14:57:58 +0000 Subject: [issue34789] Make xml.sax.make_parser accept iterables In-Reply-To: <1537805047.54.0.956365154283.issue34789@psf.upfronthosting.co.za> Message-ID: <1540565878.39.0.788709270274.issue34789@psf.upfronthosting.co.za> Tal Einat added the comment: Thanks for reporting the issue and making the PRs, Andr?s! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 11:07:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 15:07:01 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540566421.75.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3b1cba3701fd1321a9bdafa9e683f891369f0cfd by Victor Stinner in branch 'master': bpo-35059, libmpdec: Add missing EXTINLINE in mpdecimal.h (GH-10128) https://github.com/python/cpython/commit/3b1cba3701fd1321a9bdafa9e683f891369f0cfd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 11:15:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 15:15:26 +0000 Subject: [issue35017] socketserver accept a last request after shutdown In-Reply-To: <1539863713.13.0.788709270274.issue35017@psf.upfronthosting.co.za> Message-ID: <1540566926.38.0.788709270274.issue35017@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 6f97a50c86737458c6bed9970c8dc31a465eff22 by Victor Stinner (Denis Ledoux) in branch '2.7': bpo-35017, socketserver: don't accept request after shutdown (GH-9952) (GH-10129) https://github.com/python/cpython/commit/6f97a50c86737458c6bed9970c8dc31a465eff22 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 11:15:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 15:15:59 +0000 Subject: [issue35017] socketserver accept a last request after shutdown In-Reply-To: <1539863713.13.0.788709270274.issue35017@psf.upfronthosting.co.za> Message-ID: <1540566959.32.0.788709270274.issue35017@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Denis Ledoux for your bug report and your fix! It's nice to see this bug fixed in all branches ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 11:16:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 15:16:41 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1540567001.28.0.788709270274.issue9263@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 24702044afb1d4ad7568bf6aa7450b14dc44a38f by Victor Stinner in branch 'master': bpo-9263: Use _PyObject_ASSERT() in object.c (GH-10110) https://github.com/python/cpython/commit/24702044afb1d4ad7568bf6aa7450b14dc44a38f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 11:19:12 2018 From: report at bugs.python.org (Matthew Barnett) Date: Fri, 26 Oct 2018 15:19:12 +0000 Subject: [issue35072] re.sub does not play nice with chr(92) In-Reply-To: <1540528576.04.0.788709270274.issue35072@psf.upfronthosting.co.za> Message-ID: <1540567152.51.0.788709270274.issue35072@psf.upfronthosting.co.za> Matthew Barnett added the comment: @Ezio: the value of stringy_thingy is irrelevant because it never gets that far; it fails when it tries to parse the replacement, which occurs before attempting any matching. I can't reproduce the difference either. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 11:22:04 2018 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Fri, 26 Oct 2018 15:22:04 +0000 Subject: [issue32173] linecache.py add lazycache to __all__ and use dict.clear to clear the cache In-Reply-To: <1512157614.6.0.213398074469.issue32173@psf.upfronthosting.co.za> Message-ID: <1540567324.1.0.788709270274.issue32173@psf.upfronthosting.co.za> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- pull_requests: +9462 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 11:33:58 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Fri, 26 Oct 2018 15:33:58 +0000 Subject: [issue33944] Deprecate and remove pth files In-Reply-To: <1529688140.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <1540568038.46.0.788709270274.issue33944@psf.upfronthosting.co.za> Change by Ivan Pozdeev : ---------- keywords: +patch pull_requests: +9463 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 11:35:00 2018 From: report at bugs.python.org (Denis Ledoux) Date: Fri, 26 Oct 2018 15:35:00 +0000 Subject: [issue35017] socketserver accept a last request after shutdown In-Reply-To: <1539863713.13.0.788709270274.issue35017@psf.upfronthosting.co.za> Message-ID: <1540568100.61.0.788709270274.issue35017@psf.upfronthosting.co.za> Denis Ledoux added the comment: The pleasure is all mine. Thanks to you and the other contributors involved. For my first contribution to Python, I am glad everything went smoothly :). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 11:42:45 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 26 Oct 2018 15:42:45 +0000 Subject: [issue35027] distutils.core.setup does not raise TypeError when if classifiers, keywords and platforms fields are not specified as a list In-Reply-To: <1539963671.26.0.788709270274.issue35027@psf.upfronthosting.co.za> Message-ID: <1540568564.99.0.788709270274.issue35027@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Since the two PRs are merged as part of triaging I am closing this as fixed. Feel free to reopen this if needed. Thanks Tilman for the PR :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 11:48:53 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Fri, 26 Oct 2018 15:48:53 +0000 Subject: [issue33944] Deprecate and remove pth files In-Reply-To: <1529688140.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <1540568933.63.0.788709270274.issue33944@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: The primary motivation behind the suggestion seems to be the fact that the feature is abused. However, the documentation has no info whatsoever on what is the intended use -- thus what constitutes abuse. Without that, the accusations are kind of baseless -- how can we blame package authors for having to figure it out for themselves? I've made a PR with the corresponding note. Since the discussion has revealed a number of valid use cases for the feature for which there are no adequate alternatives currently, I hope it will diminish the discontent and be grounds to incite package authors to remove unnecessary logic from there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 11:52:43 2018 From: report at bugs.python.org (coyot linden) Date: Fri, 26 Oct 2018 15:52:43 +0000 Subject: [issue35077] Make TypeError message less ambiguous Message-ID: <1540569163.5.0.788709270274.issue35077@psf.upfronthosting.co.za> New submission from coyot linden : The TypeError message: TypeError: string indices must be integers is ambiguously written. While some may understand the intent, others will read it as confusingly saying that strings must be integers since dicts among other things do have string indices. Suggest changing the message to: TypeError: indices of strings must be integers ---------- messages: 328565 nosy: coyot priority: normal severity: normal status: open title: Make TypeError message less ambiguous type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 12:00:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 16:00:20 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1540569620.15.0.788709270274.issue9263@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a4b2bc70f69d93d8252861b455052c051b7167ae by Victor Stinner in branch 'master': bpo-9263: Use _PyObject_ASSERT() in gcmodule.c (GH-10112) https://github.com/python/cpython/commit/a4b2bc70f69d93d8252861b455052c051b7167ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 12:08:11 2018 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Fri, 26 Oct 2018 16:08:11 +0000 Subject: [issue35077] Make TypeError message less ambiguous In-Reply-To: <1540569163.5.0.788709270274.issue35077@psf.upfronthosting.co.za> Message-ID: <1540570091.76.0.788709270274.issue35077@psf.upfronthosting.co.za> Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) added the comment: +1. In my early days of python programming i was confused of this message. ---------- nosy: +thatiparthy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 12:12:24 2018 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Fri, 26 Oct 2018 16:12:24 +0000 Subject: [issue35077] Make TypeError message less ambiguous In-Reply-To: <1540569163.5.0.788709270274.issue35077@psf.upfronthosting.co.za> Message-ID: <1540570344.89.0.788709270274.issue35077@psf.upfronthosting.co.za> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- keywords: +patch pull_requests: +9464 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 12:39:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 16:39:22 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1540571962.71.0.788709270274.issue9263@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0862505a0377c12e8004b2eb8de0555f26ce9530 by Victor Stinner in branch 'master': bpo-9263: Use _PyObject_ASSERT() in typeobject.c (GH-10111) https://github.com/python/cpython/commit/0862505a0377c12e8004b2eb8de0555f26ce9530 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 12:47:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 16:47:23 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1540572443.22.0.788709270274.issue9263@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 50fe3f8913c503e63f4cfb8ddcf8641ef7ad0722 by Victor Stinner in branch 'master': bpo-9263: _PyXXX_CheckConsistency() use _PyObject_ASSERT() (GH-10108) https://github.com/python/cpython/commit/50fe3f8913c503e63f4cfb8ddcf8641ef7ad0722 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 12:48:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 16:48:57 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540572537.0.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: > Too bad: this change broke the compilation on AMD64 Windows7 SP1 3.x, AMD64 Windows8 3.x and AMD64 Windows10 3.x: (...) I checked buildbots: my PR 10128 fixed all Windows buildbots, good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 12:57:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 16:57:40 +0000 Subject: [issue32173] linecache.py add lazycache to __all__ and use dict.clear to clear the cache In-Reply-To: <1512157614.6.0.213398074469.issue32173@psf.upfronthosting.co.za> Message-ID: <1540573060.23.0.788709270274.issue32173@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since all proposed PRs just change formatting, I suggest to close this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 13:00:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 17:00:12 +0000 Subject: [issue35077] Make TypeError message less ambiguous In-Reply-To: <1540569163.5.0.788709270274.issue35077@psf.upfronthosting.co.za> Message-ID: <1540573212.76.0.788709270274.issue35077@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 13:04:43 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Oct 2018 17:04:43 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540573483.8.0.788709270274.issue35059@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9465 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 13:04:52 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Oct 2018 17:04:52 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540573492.84.0.788709270274.issue35059@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9466 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 13:11:44 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 26 Oct 2018 17:11:44 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540573904.62.0.788709270274.issue34576@psf.upfronthosting.co.za> Senthil Kumaran added the comment: New changeset bb1876acd815a05744cea4a7d4098231ef499e52 by Senthil Kumaran in branch '3.7': [3.7] bpo-34576 : Backport eeab510 (#10114) https://github.com/python/cpython/commit/bb1876acd815a05744cea4a7d4098231ef499e52 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 13:12:35 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 26 Oct 2018 17:12:35 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540573955.1.0.788709270274.issue34576@psf.upfronthosting.co.za> Senthil Kumaran added the comment: New changeset 8be1c043a6d10d375f7a73c681cb2d7ec2f2d361 by Senthil Kumaran in branch '3.6': [3.6] - bpo-34576 : Backport eeab510 3.6 (GH-10113) https://github.com/python/cpython/commit/8be1c043a6d10d375f7a73c681cb2d7ec2f2d361 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 13:13:01 2018 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 26 Oct 2018 17:13:01 +0000 Subject: [issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security In-Reply-To: <1536053943.84.0.56676864532.issue34576@psf.upfronthosting.co.za> Message-ID: <1540573981.89.0.788709270274.issue34576@psf.upfronthosting.co.za> Senthil Kumaran added the comment: This is resolved. Thank you, all. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 13:13:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Oct 2018 17:13:51 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1540574031.22.0.788709270274.issue9263@psf.upfronthosting.co.za> STINNER Victor added the comment: I pushed the change and even more, so I consider that the issue can now be closed... 8 years later! Thank you very much Dave Malcolm for this nice idea, and for its implementation. Thanks Bohuslav "Slavek" Kabrda for the rebase in 2013, and thanks to my colleagues who rebased the patch frequently since 2013 in the Fedora package! Maybe some people (like me?) want to use _PyObject_ASSERT() in more places, but I consider that we don't need to leave this issue open just for that. I took the 00170-gc-assertions.patch rebased on Python 3.7.1 by my colleagues for the Fedora package, and I rebased it on master. I modified more functions in object.c and typeobject.c to use _PyObject_ASSERT(). I tried to not replace all assert(), but only when it's revelant. I added code to detect if the object memory has been freed to avoid derefering 0xdbdbdbdbdbdbdbdb pointers which is very likely to cause a segmantation fault. It should reduce the risk of crash when dumping the faulty object. Dave Malcolm: > - Only tested on gcc-4.4.3 so far; the __STRING(expr) and __PRETTY_FUNCTION__ look non-portable. I used Py_STRINGIFY() and __func__ in the final patch. __func__ is part of the C99 standard which is now required since Python 3.6: see PEP 7. Dave Malcolm: > - no test case; I thought about using ctypes to extract PyObject_IncRef from the implementation, but this is likely to lead to brittle test cases. Alternatively, is xxmodule to be used for this kind of thing? I reworked the unit test to not use ctypes, but write the crashing code in C instead. Antoine Pitrou: > How about turning these asserts into Py_FatalError()s and then enabling Victor's faulthandler extension? Done. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 13:26:04 2018 From: report at bugs.python.org (Dave Malcolm) Date: Fri, 26 Oct 2018 17:26:04 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1540574764.8.0.788709270274.issue9263@psf.upfronthosting.co.za> Dave Malcolm added the comment: Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 13:26:56 2018 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Fri, 26 Oct 2018 17:26:56 +0000 Subject: [issue35078] Allow customization of css class name of a month in calendar module Message-ID: <1540574816.58.0.788709270274.issue35078@psf.upfronthosting.co.za> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- components: Library (Lib) nosy: thatiparthy priority: normal severity: normal status: open title: Allow customization of css class name of a month in calendar module versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 13:28:31 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Oct 2018 17:28:31 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540574911.5.0.788709270274.issue35059@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 95cfb818eaffba41333d4bc93253f4e0c6237ca8 by Miss Islington (bot) in branch '3.7': bpo-35059, libmpdec: Add missing EXTINLINE in mpdecimal.h (GH-10128) https://github.com/python/cpython/commit/95cfb818eaffba41333d4bc93253f4e0c6237ca8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 13:30:34 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Oct 2018 17:30:34 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540575034.93.0.788709270274.issue35059@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 7eac88afd2e39d05a0ed3bc8c0787a2e755a6072 by Miss Islington (bot) in branch '3.6': bpo-35059, libmpdec: Add missing EXTINLINE in mpdecimal.h (GH-10128) https://github.com/python/cpython/commit/7eac88afd2e39d05a0ed3bc8c0787a2e755a6072 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 13:30:44 2018 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Fri, 26 Oct 2018 17:30:44 +0000 Subject: [issue35078] Allow customization of css class name of a month in calendar module Message-ID: <1540575044.7.0.788709270274.issue35078@psf.upfronthosting.co.za> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- keywords: +patch pull_requests: +9467 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 13:33:08 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 26 Oct 2018 17:33:08 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540575188.29.0.788709270274.issue35070@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: We're wondering if it could be a weird interaction with Active Directory. This is my work laptop, so it's all integrated with LDAP and whatnot. I don't have Mojave on my personal laptop yet (maybe this weekend). I'm guessing that whatever corporate integration is going on is messing with getgroups(2). Brett said he vaguely remembers something similar, but I don't remember seeing this problem on High Sierra on the same laptop. I'm beta testing Mojave internally, so maybe this is just a weirdism I should report to our IT. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 13:34:56 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 26 Oct 2018 17:34:56 +0000 Subject: [issue35077] Make TypeError message less ambiguous In-Reply-To: <1540569163.5.0.788709270274.issue35077@psf.upfronthosting.co.za> Message-ID: <1540575296.87.0.788709270274.issue35077@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. Error message changes are generally done on master and not back ported. I am removing 3.5 which is security fixes only mode and adding 3.8 . There are other errors of similar format but indicate the wrong type in the error message like list indices. $ ./python.exe Python 3.8.0a0 (heads/bpo31177-dirty:19986202a8, Oct 26 2018, 22:19:23) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> [1]['1'] Traceback (most recent call last): File "", line 1, in TypeError: list indices must be integers or slices, not str I think we should also assert the error message in test_slice (Lib/test/string_tests.py) if there is a change. Thanks Serhiy, I was about to add Raymond too who might have thoughts on the wording :) ---------- nosy: +xtreak versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 14:07:19 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 26 Oct 2018 18:07:19 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540577239.79.0.788709270274.issue35070@psf.upfronthosting.co.za> Ned Deily added the comment: It very well could have something to do with Active Directory support. Here's a little getgroups test I used a while back for a previous getgroups issue. You should see something similar in the output depending on the number of groups in your id. If it fails, we can eliminate Python from the equation. #include #include #include int main(){ gid_t grouplist[32]; int n; int gidsetsize; for(gidsetsize = 0; gidsetsize < 22; ++gidsetsize) { n = getgroups(gidsetsize, grouplist); printf("calling grouplist with gidsetsize = %i, returns %i\n", gidsetsize, n); } exit(0); } calling grouplist with gidsetsize = 0, returns 14 calling grouplist with gidsetsize = 1, returns -1 calling grouplist with gidsetsize = 2, returns -1 calling grouplist with gidsetsize = 3, returns -1 calling grouplist with gidsetsize = 4, returns -1 calling grouplist with gidsetsize = 5, returns -1 calling grouplist with gidsetsize = 6, returns -1 calling grouplist with gidsetsize = 7, returns -1 calling grouplist with gidsetsize = 8, returns -1 calling grouplist with gidsetsize = 9, returns -1 calling grouplist with gidsetsize = 10, returns -1 calling grouplist with gidsetsize = 11, returns -1 calling grouplist with gidsetsize = 12, returns -1 calling grouplist with gidsetsize = 13, returns -1 calling grouplist with gidsetsize = 14, returns 14 calling grouplist with gidsetsize = 15, returns 14 calling grouplist with gidsetsize = 16, returns 14 calling grouplist with gidsetsize = 17, returns 14 calling grouplist with gidsetsize = 18, returns 14 calling grouplist with gidsetsize = 19, returns 14 calling grouplist with gidsetsize = 20, returns 14 calling grouplist with gidsetsize = 21, returns 14 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 14:07:26 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 26 Oct 2018 18:07:26 +0000 Subject: [issue35078] Allow customization of css class name of a month in calendar module Message-ID: <1540577246.68.0.788709270274.issue35078@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 14:11:32 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 26 Oct 2018 18:11:32 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540577492.44.0.788709270274.issue35070@psf.upfronthosting.co.za> Ned Deily added the comment: Also, I'm assuming you've tried rebooting your system? :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 14:16:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 18:16:23 +0000 Subject: [issue33710] Deprecate gettext.lgettext() In-Reply-To: <1527764456.73.0.682650639539.issue33710@psf.upfronthosting.co.za> Message-ID: <1540577783.15.0.788709270274.issue33710@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +9468 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 14:21:23 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Oct 2018 18:21:23 +0000 Subject: [issue18114] Update PyImport_ImportFrozenModuleObject() to set __package__ In-Reply-To: <1370056399.99.0.692031308648.issue18114@psf.upfronthosting.co.za> Message-ID: <1540578083.13.0.788709270274.issue18114@psf.upfronthosting.co.za> Brett Cannon added the comment: I'm not sure if it's still relevant. :) Feel free to look at the code and come back here with a recommendation as to whether this is still necessary or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 14:24:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 18:24:06 +0000 Subject: [issue33710] Deprecate gettext.lgettext() In-Reply-To: <1527764456.73.0.682650639539.issue33710@psf.upfronthosting.co.za> Message-ID: <1540578246.77.0.788709270274.issue33710@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It includes three parts: * Add the code that emits a DeprecationWarning when corresponding functions and arguments are used. It is important to specify the correct stacklevel argument. * Add tests and/or modify existing test for catching or silencing a DeprecationWarning. * Document this change: in the module documentation, in the What's New document, and add a news entry. PR 10139 implements all this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 14:27:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 18:27:49 +0000 Subject: [issue33710] Deprecate gettext.lgettext() In-Reply-To: <1527764456.73.0.682650639539.issue33710@psf.upfronthosting.co.za> Message-ID: <1540578469.22.0.788709270274.issue33710@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sometime we starts with deprecating just in the documentation, if it is hard to add deprecation in the code or adding it will break a lot of working code. But this is not the case. lgettext() was inherently broken in Python 3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 14:36:19 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Oct 2018 18:36:19 +0000 Subject: [issue35035] Documentation for email.utils is named email.util.rst In-Reply-To: <1540102639.17.0.788709270274.issue35035@psf.upfronthosting.co.za> Message-ID: <1540578979.06.0.788709270274.issue35035@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 14:36:36 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Oct 2018 18:36:36 +0000 Subject: [issue35024] Incorrect logging in importlib when '.pyc' file creation fails In-Reply-To: <1539921641.62.0.788709270274.issue35024@psf.upfronthosting.co.za> Message-ID: <1540578996.29.0.788709270274.issue35024@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 9e14e49f13ef1a726f31efe6689285463332db6e by Miss Islington (bot) (Quentin Agren) in branch 'master': bpo-35024: Remove redundant and possibly incorrect verbose message after writing '.pyc' (GH-9998) https://github.com/python/cpython/commit/9e14e49f13ef1a726f31efe6689285463332db6e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 14:36:56 2018 From: report at bugs.python.org (coyot linden) Date: Fri, 26 Oct 2018 18:36:56 +0000 Subject: [issue35077] Make TypeError message less ambiguous In-Reply-To: <1540569163.5.0.788709270274.issue35077@psf.upfronthosting.co.za> Message-ID: <1540579016.46.0.788709270274.issue35077@psf.upfronthosting.co.za> coyot linden added the comment: You're welcome. I filed against 3.5 because that's what I have in our env at the moment and I couldn't test and thus assert the issue in later versions. Happy to see the problem addressed more generally. The abstraction of the problem is the ambiguity in English between nouns used as adjectives and their groupings: (noun phrase) versus (noun as adjective)(noun). Using "X of Y" rather than (XY) or (X)(Y) resolves the ambiguity. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 14:38:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Oct 2018 18:38:48 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540579128.97.0.788709270274.issue34160@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is an easy issue and I left it for beginning contributors. The PR should include the following changes: * Add an optional sort_attrs parameter (True by default) in the write() method. * Make the dump() function passing sort_attrs=False to write(). * Add tests for write() (with sort_attrs=False and sort_attrs=True) and dump() and/or modify existing tests. * Document change (in the module docs, in What's New, news entry). ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 14:38:50 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 26 Oct 2018 18:38:50 +0000 Subject: [issue33710] Deprecate gettext.lgettext() In-Reply-To: <1527764456.73.0.682650639539.issue33710@psf.upfronthosting.co.za> Message-ID: <1540579130.59.0.788709270274.issue33710@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: The deprecation notice is added to the docs and deprecation warnings are raised during usage of the functions. As per the PR some of them are deprecated with 3.8 (master) and will be removed by 3.10. But this depends on the discussion over the deprecation cycle. There were cases in the past where issues were raised in bpo for undeprecation (issue27172) after being deprecated for several versions. There are also cases where the functions that had to be removed were postponed for removal to a later version instead of the one initially shown in warnings. # Python 3.7 no warnings $ 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. >>> from gettext import NullTranslations >>> NullTranslations().lgettext("test") b'test' # PR branch (pr_10139) ./python.exe Python 3.8.0a0 (heads/master:4e3a53bcee, Oct 26 2018, 23:44:23) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from gettext import NullTranslations >>> NullTranslations().lgettext("test") :1: DeprecationWarning: lgettext() is deprecated, use gettext() instead b'test' Hope it helps ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 14:51:21 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Oct 2018 18:51:21 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1540579881.38.0.788709270274.issue35066@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Michael Saah, when you reply by email, *please* delete the quoted post you are replying to (except possibly for a relevant line or two.). The quotation duplicates what is already on the web page and makes it harder to scroll through posts on the web page. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 14:55:22 2018 From: report at bugs.python.org (Michael Saah) Date: Fri, 26 Oct 2018 18:55:22 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540579881.38.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: Michael Saah added the comment: Appologies, will do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 14:57:58 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Oct 2018 18:57:58 +0000 Subject: [issue35076] FAIL: test_min_max_version (test.test_ssl.ContextTests) with libressl-2.8.2 In-Reply-To: <1540554977.97.0.788709270274.issue35076@psf.upfronthosting.co.za> Message-ID: <1540580278.36.0.788709270274.issue35076@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 14:59:39 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Oct 2018 18:59:39 +0000 Subject: [issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1 In-Reply-To: <1540218627.92.0.788709270274.issue35045@psf.upfronthosting.co.za> Message-ID: <1540580379.8.0.788709270274.issue35045@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I closed #35076 as a duplicate of this. The distribution was not specified. The version is 3.7.1 plus additional patches. A build log is attached. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 15:00:06 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Oct 2018 19:00:06 +0000 Subject: [issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1 In-Reply-To: <1540218627.92.0.788709270274.issue35045@psf.upfronthosting.co.za> Message-ID: <1540580406.97.0.788709270274.issue35045@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +jean-michel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 15:00:41 2018 From: report at bugs.python.org (Springem Springsbee) Date: Fri, 26 Oct 2018 19:00:41 +0000 Subject: [issue35079] difflib.SequenceMatcher.get_matching_blocks omits common strings Message-ID: <1540580441.56.0.788709270274.issue35079@psf.upfronthosting.co.za> New submission from Springem Springsbee : Hello, I'm using difflib's SequenceMatcher to locate common substrings. It seems like the matcher is missing a common substrings. I'm guessing this is a rather low-level issue in difflib. The autojunk parameter has no effect for obvious reasons. Alternate pairwise comparisons between the following 3 strings omit the 2-character match 'AC' GATTACA TAGACCA ATACA The following Github gist captures the issue, which I'll repeat here for redundancy https://gist.github.com/MatthewRalston/b0ab6ac1dbe322cb12063310ccdbb786 >import difflib >string1 = "TAGACCA" >string2 = "ATACA" >s = difflib.SequenceMatcher(None, string1, string2) >blox = s.get_matching_blocks() >print(blox) [Match(a=0, b=1, size=2), Match(a=5, b=3, size=2), Match(a=7, b=5, size=0)] # Missing Match(a=3, b=2, size=2) >print([string1[x.a:x.a+x.size] for x in blox if x.size > 1]) ['TA', 'CA'] # Missing the substring 'CA' ---------- components: Library (Lib) messages: 328593 nosy: Springem Springsbee, terry.reedy priority: normal severity: normal status: open title: difflib.SequenceMatcher.get_matching_blocks omits common strings 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 Fri Oct 26 15:07:56 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 26 Oct 2018 19:07:56 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1540580876.27.0.788709270274.issue35066@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the details. The C implementation should be same as Python implementation which in this case differs as per your analysis if I am understanding it right and IIRC there is a PEP (PEP 399 I think) to enforce that C and Python implementation should behave the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 15:19:13 2018 From: report at bugs.python.org (Tim Peters) Date: Fri, 26 Oct 2018 19:19:13 +0000 Subject: [issue35079] difflib.SequenceMatcher.get_matching_blocks omits common strings In-Reply-To: <1540580441.56.0.788709270274.issue35079@psf.upfronthosting.co.za> Message-ID: <1540581552.99.0.788709270274.issue35079@psf.upfronthosting.co.za> Tim Peters added the comment: Sorry, I find this too hard to follow. At the end: > ['TA', 'CA'] # Missing the substring 'CA' the comment claims it's missing 'CA', while the output plainly shows it's _not_ missing 'CA'. If your complaint is that's missing 'AC', yes, it is. It's not intended to find _overlapping_ matches at all (read the docs). The longest matching blocks in TAGACCA ATACA are in fact TA, CA, and AC, but after the leftmost-longest TA is matched first, AC no longer exists _to_ match in the second string. Only CA does. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 15:20:41 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Oct 2018 19:20:41 +0000 Subject: [issue35077] Make TypeError message less ambiguous In-Reply-To: <1540569163.5.0.788709270274.issue35077@psf.upfronthosting.co.za> Message-ID: <1540581641.82.0.788709270274.issue35077@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I have a mixed opinion of this. On the one hand, 'string index', taken out of context, *is* ambiguous. (In the context of the TypeError message, it took me a minute to see the string-index interpretation.) On the other hand, dicts do not have indices. They have keys. So only the 'index of string' interpretation makes sense. Is there anything in the docs that suggests that a mapping subscript can be called an 'index' in addition to 'key'? It would be nicer if this TypeError message also included 'not x', but there may be an issue that the type x info is lost. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 15:22:00 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 26 Oct 2018 19:22:00 +0000 Subject: [issue35079] difflib.SequenceMatcher.get_matching_blocks omits common strings In-Reply-To: <1540580441.56.0.788709270274.issue35079@psf.upfronthosting.co.za> Message-ID: <1540581720.14.0.788709270274.issue35079@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 15:45:35 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Oct 2018 19:45:35 +0000 Subject: [issue35077] Make TypeError message less ambiguous In-Reply-To: <1540569163.5.0.788709270274.issue35077@psf.upfronthosting.co.za> Message-ID: <1540583135.31.0.788709270274.issue35077@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I checked a bit. All the 'index' entries in the index are about sequences. However, https://docs.python.org/3/reference/datamodel.html has this abstract (non-Python) description: "Mappings These represent finite sets of objects indexed by arbitrary index sets. The subscript notation a[k] selects the item indexed by k from the mapping a; ... Dictionaries These represent finite sets of objects indexed by nearly arbitrary values." I personally would prefer 'keyed' or 'subscripted' and 'key'to prevent confusion. The entry then switches to the usual Python term 'key'. "The only types of values not acceptable as keys ... a key?s hash value ... used for keys ..." https://docs.python.org/3/library/stdtypes.html#mapping-types-dict uses 'index' once as a verb, otherwise uses 'key'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 16:09:53 2018 From: report at bugs.python.org (coyot linden) Date: Fri, 26 Oct 2018 20:09:53 +0000 Subject: [issue35077] Make TypeError message less ambiguous In-Reply-To: <1540569163.5.0.788709270274.issue35077@psf.upfronthosting.co.za> Message-ID: <1540584593.77.0.788709270274.issue35077@psf.upfronthosting.co.za> coyot linden added the comment: The problem I have with "So only the 'index of string' interpretation makes sense." is that by the time a developer has that understanding, they won't get this error. So it's fine and logical to say from the behind-the-scenes view that only sequences talk about indices, but that's not helpful to the confused developer who gets this message. The point of error messages should be to clearly indicate the problem and solution, not rely on the developer having a global understanding of error messages. So, rather than defend the current practice, I ask if there are arguments against "X of Y". Is there some context in which that is confusing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 16:13:56 2018 From: report at bugs.python.org (tzickel) Date: Fri, 26 Oct 2018 20:13:56 +0000 Subject: [issue35030] Python 2.7 OrderedDict creates circular references In-Reply-To: <1540024622.42.0.788709270274.issue35030@psf.upfronthosting.co.za> Message-ID: <1540584836.15.0.788709270274.issue35030@psf.upfronthosting.co.za> tzickel added the comment: Is this commit interesting ? It has less lines, more simple and makes no cycles to collect, and it seems in my limited benchmark faster than the current implementation. https://github.com/tzickel/cpython/commit/7e8b70b67cd1b817182be4dd2285bd136e6b156d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 16:17:42 2018 From: report at bugs.python.org (tzickel) Date: Fri, 26 Oct 2018 20:17:42 +0000 Subject: [issue35030] Python 2.7 OrderedDict creates circular references In-Reply-To: <1540024622.42.0.788709270274.issue35030@psf.upfronthosting.co.za> Message-ID: <1540585062.58.0.788709270274.issue35030@psf.upfronthosting.co.za> tzickel added the comment: Sorry ignore it. Closed the PR as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 16:24:38 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 26 Oct 2018 20:24:38 +0000 Subject: [issue35035] Documentation for email.utils is named email.util.rst In-Reply-To: <1540102639.17.0.788709270274.issue35035@psf.upfronthosting.co.za> Message-ID: <1540585478.12.0.788709270274.issue35035@psf.upfronthosting.co.za> R. David Murray added the comment: Sure, this is fine with me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 16:25:26 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Oct 2018 20:25:26 +0000 Subject: [issue35079] difflib.SequenceMatcher.get_matching_blocks omits common strings In-Reply-To: <1540580441.56.0.788709270274.issue35079@psf.upfronthosting.co.za> Message-ID: <1540585526.46.0.788709270274.issue35079@psf.upfronthosting.co.za> Terry J. Reedy added the comment: We can assume that "substring 'CA'" was meant to be "substring 'AC'", but as explained, missing 'AC' is not a bug. (Tim wrote the module.) I read the doc, and 'non-overlapping' is implied in the SequenceMatcher entry at the top of the file. "The idea is to find the longest contiguous matching subsequence that contains no ?junk? elements; ... The same idea is then applied recursively to the pieces of the sequences to the left and to the right of the matching subsequence." However, a user of SequenceMatcher could easily miss that, and its implication, as Springem did. For clarity, I think we should add 'non-overlapping to the first line of the .get_matching_blocks entry, which is in the middle of the page. "Return list of triples describing non-overlapping matching subsequences." I also think "i+n != i' or j+n != j'" should be changed to "i+n < i' or j+n < j'" as '>' would mean overlapping. So != must mean <. I will prepare a doc PR later. ---------- assignee: -> terry.reedy components: +Documentation stage: -> needs patch versions: +Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 16:35:05 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 26 Oct 2018 20:35:05 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540586105.51.0.788709270274.issue35070@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Yes, I've rebooted :) I've modified your C program a little and here's the code and output. #include #include #include int main() { gid_t grouplist[32]; int n; int gidsetsize; for (gidsetsize = 0; gidsetsize < 22; ++gidsetsize) { n = getgroups(gidsetsize, grouplist); printf("calling grouplist with gidsetsize = %i, returns %i: ", gidsetsize, n); for (int j = 0; j < n; j++) { printf("%i ", grouplist[j]); } printf("\n"); } exit(0); } calling grouplist with gidsetsize = 0, returns 15: -483891656 32766 -483891672 32766 -483891728 32766 427353334 1 -483891696 32766 0 0 0 0 -483891672 calling grouplist with gidsetsize = 1, returns -1: calling grouplist with gidsetsize = 2, returns -1: calling grouplist with gidsetsize = 3, returns -1: calling grouplist with gidsetsize = 4, returns -1: calling grouplist with gidsetsize = 5, returns -1: calling grouplist with gidsetsize = 6, returns -1: calling grouplist with gidsetsize = 7, returns -1: calling grouplist with gidsetsize = 8, returns -1: calling grouplist with gidsetsize = 9, returns -1: calling grouplist with gidsetsize = 10, returns -1: calling grouplist with gidsetsize = 11, returns -1: calling grouplist with gidsetsize = 12, returns -1: calling grouplist with gidsetsize = 13, returns -1: calling grouplist with gidsetsize = 14, returns -1: calling grouplist with gidsetsize = 15, returns 15: 101 503 701 501 12 62 80 502 33 98 100 204 250 395 398 calling grouplist with gidsetsize = 16, returns 15: 101 503 701 501 12 62 80 502 33 98 100 204 250 395 398 calling grouplist with gidsetsize = 17, returns 15: 101 503 701 501 12 62 80 502 33 98 100 204 250 395 398 calling grouplist with gidsetsize = 18, returns 15: 101 503 701 501 12 62 80 502 33 98 100 204 250 395 398 calling grouplist with gidsetsize = 19, returns 15: 101 503 701 501 12 62 80 502 33 98 100 204 250 395 398 calling grouplist with gidsetsize = 20, returns 15: 101 503 701 501 12 62 80 502 33 98 100 204 250 395 398 calling grouplist with gidsetsize = 21, returns 15: 101 503 701 501 12 62 80 502 33 98 100 204 250 395 398 % id -G 101 503 701 501 12 62 80 502 33 98 100 204 250 395 398 I've also made a small change to test_posix.py: diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index 86c04b9f32..5074b45fc0 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -1047,8 +1047,9 @@ class PosixTester(unittest.TestCase): # groups, ignoring order, duplicates, and the effective gid. # #10822/#26944 - It is implementation defined whether # posix.getgroups() includes the effective gid. - symdiff = idg_groups.symmetric_difference(posix.getgroups()) - self.assertTrue(not symdiff or symdiff == {posix.getegid()}) + groups = posix.getgroups() + symdiff = idg_groups.symmetric_difference(groups) + self.assertTrue(not symdiff or symdiff == {posix.getegid()}, (idg_groups, groups, symdiff)) # tests for the posix *at functions follow But when I run ./python.exe -m test test.test_posix here's what I get: Run tests sequentially 0:00:00 load avg: 1.62 [1/1] test.test_posix test test.test_posix failed -- Traceback (most recent call last): File "/Users/bwarsaw/projects/python/cpython/Lib/test/test_posix.py", line 1052, in test_getgroups self.assertTrue(not symdiff or symdiff == {posix.getegid()}, (idg_groups, groups, symdiff)) AssertionError: False is not true : ({33, 98, 100, 101, 395, 12, 204, 398, 80, 501, 502, 503, 250, 701, 62}, [101], {33, 98, 100, 395, 12, 204, 398, 80, 501, 502, 503, 250, 701, 62}) So it seems like getgroups(2) is doing the right thing, but not Python. Weird. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 16:37:34 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Oct 2018 20:37:34 +0000 Subject: [issue35077] Make TypeError message less ambiguous In-Reply-To: <1540569163.5.0.788709270274.issue35077@psf.upfronthosting.co.za> Message-ID: <1540586254.25.0.788709270274.issue35077@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Aside from the effort of making a change correct and consistent across our code, error message changes often breaks user code and tests that depend on the current wording. So there must be sufficient benefit to overcome the cost. (The user breakage cost is why we nearly always wait for the next version to make such changes.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 17:01:52 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 26 Oct 2018 21:01:52 +0000 Subject: [issue35042] Use the role :pep: for the PEP \d+ In-Reply-To: <1540195863.27.0.788709270274.issue35042@psf.upfronthosting.co.za> Message-ID: <1540587712.53.0.788709270274.issue35042@psf.upfronthosting.co.za> ?ric Araujo added the comment: Docutils itself parses `RFC nnnn` and `PEP nnn` to replace with links. In some parts of the docs with many references, some devs (I think Raymond Hettinger for example) use tricks like `PEP\ nnn` to avoid getting twenty links in a row. So I don?t see what the replacement of `PEP nnn` with `:pep:`nnn`` adds. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 17:08:46 2018 From: report at bugs.python.org (Tim Peters) Date: Fri, 26 Oct 2018 21:08:46 +0000 Subject: [issue35079] difflib.SequenceMatcher.get_matching_blocks omits common strings In-Reply-To: <1540580441.56.0.788709270274.issue35079@psf.upfronthosting.co.za> Message-ID: <1540588126.84.0.788709270274.issue35079@psf.upfronthosting.co.za> Tim Peters added the comment: I don't object to spelling it out more, and your (Terry's) suggestions are fine. On the other hand, this module has been around for a loooong time now, and this is the first instance I've seen of someone surprised that it doesn't produce overlapping matches - it's obvious from "The same idea is then applied recursively to the pieces of the sequences to the left and to the right of the matching subsequence" that a matching subsequence is wholly eliminated from further consideration. At some point of ever-more tedious elaboration, the docs risk missing the forest for the trees. I don't think _these_ docs are quite there yet - although the docs for `find_longest_match()` are. Speaking of which, that method _could_ be used to find overlapping matches, one at a time, by passing appropriate slice indices. Which can be horridly inefficient; e.g., find all overlapping matches between 'A' * 100 and 'A' * 150 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 17:36:13 2018 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 26 Oct 2018 21:36:13 +0000 Subject: [issue29341] Missing accepting path-like object in docstrings of os module functions In-Reply-To: <1485064061.59.0.597221589705.issue29341@psf.upfronthosting.co.za> Message-ID: <1540589773.96.0.788709270274.issue29341@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 17:44:19 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 26 Oct 2018 21:44:19 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540590259.78.0.788709270274.issue35070@psf.upfronthosting.co.za> Ned Deily added the comment: Yeah. Can you check the header file paths that are being used in your compiler invocation, e.g something like: cc -v -c ... And, while you are at it, the library search path of the test executable: otool -L ./... And anything suspicious in /usr/local/include or /usr/local/lib ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 17:45:40 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 26 Oct 2018 21:45:40 +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: <1540590340.05.0.788709270274.issue35052@psf.upfronthosting.co.za> Tal Einat added the comment: Shivank, there is currently technically no "error to solve", since we have no test that causes this erroneous behavior and catches it. We've only found what appears to be a bug by looking at the code, but we need to *verify* that it is indeed a bug. Also, this means that we have a piece of code that our test suite is missing; this is the real reason I insist that this needs a test. You should trace what uses the affected code and which scenarios could lead to this bug causing unexpected behavior. In this case, the code is in `_clone_node()`, which helpfully has the following comment in its doc-string: "Called by Node.cloneNode and Document.importNode". Work up from there, understand what this could affect, and think of a scenario where this code wouldn't work as expected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 17:46:53 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 26 Oct 2018 21:46:53 +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: <1540590413.92.0.788709270274.issue35052@psf.upfronthosting.co.za> Tal Einat added the comment: Looking at the code in Lib/xml/dom/minidom.py, this exact typo is also found in DocumentType.cloneNode(). That should be tested and fixed too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 17:47:12 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 26 Oct 2018 21:47:12 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540590432.65.0.788709270274.issue35070@psf.upfronthosting.co.za> Ned Deily added the comment: Er, and perhaps the compile and link calls from when Python builds posixmodule.c ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 17:49:27 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 26 Oct 2018 21:49:27 +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: <1540590567.33.0.788709270274.issue35052@psf.upfronthosting.co.za> Tal Einat added the comment: Shivank, I recommend taking a look at some of the existing tests for this module, found in Lib/test/test_minidom.py. See how they are built and how various functionality is tested. This should give you a good idea of what a test for this bug would look like. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 17:52:36 2018 From: report at bugs.python.org (Shivank Gautam) Date: Fri, 26 Oct 2018 21:52:36 +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: <1540590756.16.0.788709270274.issue35052@psf.upfronthosting.co.za> Shivank Gautam added the comment: I See, I need to find out for what test case `_clone_node()` will show unexpected behaviour, which will verify that it is a bug and we also need a test code to in test_minidom.py just to verify the behaviour. am I going in right direction Tai? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 17:58:09 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 26 Oct 2018 21:58:09 +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: <1540591089.54.0.788709270274.issue35052@psf.upfronthosting.co.za> Tal Einat added the comment: Shivank, indeed it seems you're now in the right direction. A bit of clarification: * The test shouldn't test _clone_node() directly, since that is an internal function. Rather, the test code should be as near as possible to what a user of the minidom module would reasonably write. * Since this bug appears in two places, you'll likely need different tests for each of them. You should likely start with just one, and once you've successfully written a test for it and fixed it, move on to the other. (In the end, make each test+fix a separate commit in the PR.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 18:58:35 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Oct 2018 22:58:35 +0000 Subject: [issue35042] Use the role :pep: for the PEP \d+ In-Reply-To: <1540195863.27.0.788709270274.issue35042@psf.upfronthosting.co.za> Message-ID: <1540594715.8.0.788709270274.issue35042@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 12e696b4f071ffe0d585b7f0d0d8020fd328bfdd by Brett Cannon (St?phane Wirtel) in branch 'master': bpo-35042: Use the :pep: role where a PEP is specified (#10036) https://github.com/python/cpython/commit/12e696b4f071ffe0d585b7f0d0d8020fd328bfdd ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 19:35:56 2018 From: report at bugs.python.org (Maxime Belanger) Date: Fri, 26 Oct 2018 23:35:56 +0000 Subject: [issue35080] The tests for the `dis` module can be too rigid when changing opcodes Message-ID: <1540596956.61.0.788709270274.issue35080@psf.upfronthosting.co.za> New submission from Maxime Belanger : For various reasons, one may want to change the `Lib/opcode.py` module. In doing so, this has caused us to frequently rewrite `test_dis.py`. It would be great if those tests used `dis.opmap` rather than hard-coded/magic numbers, as this would allow easier changes. ---------- messages: 328615 nosy: Maxime Belanger priority: normal severity: normal status: open title: The tests for the `dis` module can be too rigid when changing opcodes type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 19:38:51 2018 From: report at bugs.python.org (=?utf-8?q?Max_B=C3=A9langer?=) Date: Fri, 26 Oct 2018 23:38:51 +0000 Subject: [issue35080] The tests for the `dis` module can be too rigid when changing opcodes In-Reply-To: <1540596956.61.0.788709270274.issue35080@psf.upfronthosting.co.za> Message-ID: <1540597131.92.0.788709270274.issue35080@psf.upfronthosting.co.za> Change by Max B?langer : ---------- keywords: +patch pull_requests: +9469 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 19:41:49 2018 From: report at bugs.python.org (Maxime Belanger) Date: Fri, 26 Oct 2018 23:41:49 +0000 Subject: [issue35080] The tests for the `dis` module can be too rigid when changing opcodes In-Reply-To: <1540596956.61.0.788709270274.issue35080@psf.upfronthosting.co.za> Message-ID: <1540597309.68.0.788709270274.issue35080@psf.upfronthosting.co.za> Change by Maxime Belanger : ---------- components: +Library (Lib), Tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 19:43:52 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 26 Oct 2018 23:43:52 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540597432.81.0.788709270274.issue35070@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: % gcc -v gg.c Apple LLVM version 10.0.0 (clang-1000.11.45.2) Target: x86_64-apple-darwin18.0.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.14.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name gg.c -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fno-strict-return -masm-verbose -munwind-tables -target-cpu penryn -dwarf-column-info -debugger-tuning=lldb -target-linker-version 409.12 -v -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0 -fdebug-compilation-dir /Users/bwarsaw/projects/python -ferror-limit 19 -fmessage-length 131 -stack-protector 1 -fblocks -fencode-extended-block-signature -fobjc-runtime=macosx-10.14.0 -fmax-type-align=16 -fdiagnostics-show-option -o /var/folders/06/yd7czfp11bx1vx4p5dl10v4w000slb/T/gg-a38469.o -x c gg.c clang -cc1 version 10.0.0 (clang-1000.11.45.2) default target x86_64-apple-darwin18.0.0 #include "..." search starts here: #include <...> search starts here: /usr/local/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include /usr/include /System/Library/Frameworks (framework directory) /Library/Frameworks (framework directory) End of search list. "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -no_deduplicate -dynamic -arch x86_64 -macosx_version_min 10.14.0 -o a.out /var/folders/06/yd7czfp11bx1vx4p5dl10v4w000slb/T/gg-a38469.o -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/lib/darwin/libclang_rt.osx.a % otool -L a.out a.out: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5) So I guess it's interesting that it's searching /usr/local/include, which has some Homebrew headers in it: % ls /usr/local/include ImageMagick-7@ gdcache.h@ libltdl@ pg_config_manual.h@ sqlda-native.h@ adns.h@ gdfontg.h@ libpng16@ pg_config_os.h@ sqlda.h@ aspell.h@ gdfontl.h@ libpq@ pgtypes.h@ tiff.h@ assuan.h@ gdfontmb.h@ libpq-events.h@ pgtypes_date.h@ tiffconf.h@ ecpg_config.h@ gdfonts.h@ libpq-fe.h@ pgtypes_error.h@ tiffio.h@ ecpg_informix.h@ gdfontt.h@ libssh2.h@ pgtypes_interval.h@ tiffio.hxx@ ecpgerrno.h@ gdfx.h@ libssh2_publickey.h@ pgtypes_numeric.h@ tiffvers.h@ ecpglib.h@ gdpp.h@ libssh2_sftp.h@ pgtypes_timestamp.h@ unicase.h@ ecpgtype.h@ gmp.h@ libtasn1.h@ png.h@ uniconv.h@ entities.h@ gmpxx.h@ libusb-1.0@ pngconf.h@ unictype.h@ evdns.h@ gnutls@ ltdl.h@ pnglibconf.h@ unigbrk.h@ event.h@ gpg-error.h@ lzma@ popt.h@ unilbrk.h@ event2@ gpgrt.h@ lzma.h@ postgres_ext.h@ uniname.h@ evhttp.h@ graphviz@ mysql@ pspell@ uninorm.h@ evrpc.h@ idn2.h@ nettle@ python3.6m/ unistdio.h@ evutil.h@ informix@ newt.h@ python3.7m/ unistr.h@ fontconfig@ internal@ npth.h@ python3.8m/ unistring@ freetype2@ jconfig.h@ nspr@ readtags.h@ unitypes.h@ gcrypt.h@ jerror.h@ openjpeg-2.3@ server@ uniwbrk.h@ gd.h@ jmorecfg.h@ p11-kit-1@ slang.h@ uniwidth.h@ gd_color_map.h@ jpeglib.h@ pcre2.h@ slcurses.h@ webp@ gd_errors.h@ ksba.h@ pcre2posix.h@ sql3types.h@ gd_io.h@ lcms2.h@ pg_config.h@ sqlca.h@ gdbm.h@ lcms2_plugin.h@ pg_config_ext.h@ sqlda-compat.h@ All those symlinks point into ../Cellar/ It doesn't look much different than what happens on 10.13. I'll try to see what the paths are when I build Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 20:04:46 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 27 Oct 2018 00:04:46 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540598686.33.0.788709270274.issue35070@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -v -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -I. -I./Include -DPy_BUILD_CORE -c ./Modules/posixmodule.c -o Modules/posixmodule.o Apple LLVM version 10.0.0 (clang-1000.11.45.2) Target: x86_64-apple-darwin18.0.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.14.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name posixmodule.c -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fno-strict-return -masm-verbose -munwind-tables -target-cpu penryn -dwarf-column-info -debug-info-kind=standalone -dwarf-version=4 -debugger-tuning=lldb -target-linker-version 409.12 -v -coverage-notes-file /Users/bwarsaw/projects/python/cpython/Modules/posixmodule.gcno -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0 -D NDEBUG -I . -I ./Include -D Py_BUILD_CORE -O3 -Wno-unused-result -Wsign-compare -Wunreachable-code -Wall -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -std=c99 -fdebug-compilation-dir /Users/bwarsaw/projects/python/cpython -ferror-limit 19 -fmessage-length 131 -fwrapv -stack-protector 1 -fblocks -fencode-extended-block-signature -fobjc-runtime=macosx-10.14.0 -fmax-type-align=16 -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o Modules/posixmodule.o -x c ./Modules/posixmodule.c clang -cc1 version 10.0.0 (clang-1000.11.45.2) default target x86_64-apple-darwin18.0.0 #include "..." search starts here: #include <...> search starts here: . ./Include /usr/local/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include /usr/include /System/Library/Frameworks (framework directory) /Library/Frameworks (framework directory) End of search list. ./Modules/posixmodule.c:1254:9: warning: code will never be executed [-Wunreachable-code] PyErr_SetFromErrno(PyExc_OSError); ^~~~~~~~~~~~~~~~~~ 1 warning generated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 20:36:11 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 27 Oct 2018 00:36:11 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540600571.67.0.788709270274.issue35070@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I really have no idea what's going on. I've looked at posixmodule.c and tried to reproduce as best I can in a standalone C program. In both cases getgroups(0, NULL) returns 15. In the standalone version, when I then call getgroups(15, grouplist), I again get 15 returned and grouplist is properly filled. But in posixmodule.c case, I get 1 back group that second call. I honestly can't see any difference or why this could be happening. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 20:42:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Oct 2018 00:42:24 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ Message-ID: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> New submission from STINNER Victor : Currently, #include "pymem.h" may include Include/pymem.h or Include/internal/pymem.h depending where is the C file (.c) and if Include/internal/ is in the header search path or not. I propose to: * Rename Include/internal/ to Include/pycore/ * In this subdirectory, rename xxx.h to pycore_xxx.h to avoid any risk of confusion * Automatically include pycore_xxx.h in xxx.h if Py_BUILD_CORE is defined: this should avoid the need of explicit #include "internal/xxx.h" in C files For example, Include/internal/pystate.h becomes Include/pycore/pycore_pystate.h. Attached PR implements this idea. I chose to rename "internal" subdirectory to "pycore" to prepare the addition of other subdirectories. See: * https://pythoncapi.readthedocs.io/split_include.html * https://pythoncapi.readthedocs.io/ Next steps: * Move all code surrounded by #ifdef Py_BUILD_CORE from Include/*.h into Include/pycore/*.h: see the second commit of my PR for an example * Move core surrounded by #ifndef Py_LIMITED_API from Include/*.h into Include/limited/ (example of filename: Include/limited/limited_object.h) This change should be backward compatible since Include/internal/ must not be used outside CPython core. If someone does that, well, be ready for breakage :-) It's not supported. ---------- components: Interpreter Core messages: 328619 nosy: vstinner priority: normal severity: normal status: open title: Rename Include/internals/ to Include/pycore/ versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 20:44:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Oct 2018 00:44:01 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1540601041.18.0.788709270274.issue35081@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +9470 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 20:50:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Oct 2018 00:50:05 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1540601405.81.0.788709270274.issue35081@psf.upfronthosting.co.za> STINNER Victor added the comment: I decided to work on this issue while trying to convert the _PyObject_GC_TRACK() macro into a "static inline" function. Currently, the macro uses _PyGC_generation0 which is defined earlier by "extern PyGC_Head *_PyGC_generation0;". Problem: _PyGC_generation0 no longer exists... Include/internal/mem.h now defines: "#define _PyGC_generation0 _PyRuntime.gc.generation0". Include/internal/mem.h includes Include/objimpl.h, but Include/objimpl.h requires Include/internal/mem.h. The include order matters here, many header files are inter-dependent, and have two header files with the same name in Include/ and Include/internal/ causes issues depending where the #include is done... My PR renames mem.h to pycore_objimpl.h and include pycore_objimpl.h at "the right place" in objimpl.h. Since objimpl.h controls where pycore_objimpl.h is imported, it's simpler to handle inter-dependencies simpler. Some inter-dependencies issues are hidden by the fact the C macros don't really require functions, macros and variables in the right order. They "just work". But converting C macros to proper "static inline" functions expose many issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 20:50:08 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 27 Oct 2018 00:50:08 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540601408.11.0.788709270274.issue35070@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Yep, stepping through Python with lldb, that's what's happening. I know one of my coworkers has been able to reproduce it. I'll chime in next once I upgrade my personal machine and can try it there, since I know it isn't on AD. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 20:50:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Oct 2018 00:50:36 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540601436.71.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-35081: "Rename Include/internals/ to Include/pycore/" which is linked to this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 20:50:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Oct 2018 00:50:52 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1540601452.06.0.788709270274.issue35081@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-35059 which converts C macros to static inline functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 20:58:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Oct 2018 00:58:29 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540601909.74.0.788709270274.issue35070@psf.upfronthosting.co.za> STINNER Victor added the comment: It seems like people have fun with getgroups() on macOS: * bpo-7900 * bpo-16661 * bpo-17557 * bpo-29562 Maybe we should simply skip test_getgroups() and test_getgrouplist() on macOS with a comment listing all these BPO issues. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 21:25:17 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 27 Oct 2018 01:25:17 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540603517.02.0.788709270274.issue35070@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Wonderful ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 22:52:48 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 27 Oct 2018 02:52:48 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540608768.2.0.788709270274.issue35070@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: issue33223 also reports failure of test_posix under 10.13.4 and seems to be related. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 22:56:22 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Oct 2018 02:56:22 +0000 Subject: [issue35079] difflib.SequenceMatcher.get_matching_blocks omits common strings In-Reply-To: <1540580441.56.0.788709270274.issue35079@psf.upfronthosting.co.za> Message-ID: <1540608982.19.0.788709270274.issue35079@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +9471 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 23:00:58 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Oct 2018 03:00:58 +0000 Subject: [issue35079] difflib.SequenceMatcher.get_matching_blocks omits common strings In-Reply-To: <1540580441.56.0.788709270274.issue35079@psf.upfronthosting.co.za> Message-ID: <1540609258.88.0.788709270274.issue35079@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Tim, I share your concern about bloating docs, but think this one word worthwhile. I suspect that people are conditioned to accept 'non-overlapping' because that is ofter (usually?) the default for linear searches and regex matching. ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 23:03:14 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Oct 2018 03:03:14 +0000 Subject: [issue35079] difflib.SequenceMatcher.get_matching_blocks omits common strings In-Reply-To: <1540580441.56.0.788709270274.issue35079@psf.upfronthosting.co.za> Message-ID: <1540609394.32.0.788709270274.issue35079@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset d9bff4e81b8ca36fe6c4e90c0b9cf02bc020e713 by Terry Jan Reedy in branch 'master': bpo-35079: Revise difflib.SequenceManager.get_matching_blocks doc (GH-10144) https://github.com/python/cpython/commit/d9bff4e81b8ca36fe6c4e90c0b9cf02bc020e713 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 23:03:39 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Oct 2018 03:03:39 +0000 Subject: [issue35079] difflib.SequenceMatcher.get_matching_blocks omits common strings In-Reply-To: <1540580441.56.0.788709270274.issue35079@psf.upfronthosting.co.za> Message-ID: <1540609419.18.0.788709270274.issue35079@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9472 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 23:03:52 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Oct 2018 03:03:52 +0000 Subject: [issue35079] difflib.SequenceMatcher.get_matching_blocks omits common strings In-Reply-To: <1540580441.56.0.788709270274.issue35079@psf.upfronthosting.co.za> Message-ID: <1540609432.47.0.788709270274.issue35079@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9473 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 23:04:04 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Oct 2018 03:04:04 +0000 Subject: [issue35079] difflib.SequenceMatcher.get_matching_blocks omits common strings In-Reply-To: <1540580441.56.0.788709270274.issue35079@psf.upfronthosting.co.za> Message-ID: <1540609444.59.0.788709270274.issue35079@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9474 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 23:07:46 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Oct 2018 03:07:46 +0000 Subject: [issue35079] difflib.SequenceMatcher.get_matching_blocks omits common strings In-Reply-To: <1540580441.56.0.788709270274.issue35079@psf.upfronthosting.co.za> Message-ID: <1540609666.83.0.788709270274.issue35079@psf.upfronthosting.co.za> miss-islington added the comment: New changeset cb920c1442bf3b0899fee51915b4bf6614f2c1d7 by Miss Islington (bot) in branch '3.7': bpo-35079: Revise difflib.SequenceManager.get_matching_blocks doc (GH-10144) https://github.com/python/cpython/commit/cb920c1442bf3b0899fee51915b4bf6614f2c1d7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 23:09:00 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Oct 2018 03:09:00 +0000 Subject: [issue35079] difflib.SequenceMatcher.get_matching_blocks omits common strings In-Reply-To: <1540580441.56.0.788709270274.issue35079@psf.upfronthosting.co.za> Message-ID: <1540609740.56.0.788709270274.issue35079@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 5282125650a70811f0d64ab231e2a6c8ac20c96b by Miss Islington (bot) in branch '3.6': bpo-35079: Revise difflib.SequenceManager.get_matching_blocks doc (GH-10144) https://github.com/python/cpython/commit/5282125650a70811f0d64ab231e2a6c8ac20c96b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 23:09:14 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Oct 2018 03:09:14 +0000 Subject: [issue35079] difflib.SequenceMatcher.get_matching_blocks omits common strings In-Reply-To: <1540580441.56.0.788709270274.issue35079@psf.upfronthosting.co.za> Message-ID: <1540609754.52.0.788709270274.issue35079@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e389de8e3e897fa5ba4f71b0f711355fb7158049 by Miss Islington (bot) in branch '2.7': bpo-35079: Revise difflib.SequenceManager.get_matching_blocks doc (GH-10144) https://github.com/python/cpython/commit/e389de8e3e897fa5ba4f71b0f711355fb7158049 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 23:09:43 2018 From: report at bugs.python.org (Diego Rojas) Date: Sat, 27 Oct 2018 03:09:43 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540609783.34.0.788709270274.issue34160@psf.upfronthosting.co.za> Diego Rojas added the comment: I'm working on this issue, but I have some questions: 1. If dump() function is only for debugging purpose, and since from dump() is where we will pass the sort_attrs keyword in False in order to conserve the order, I don't see how from dump() we can handle the order of the keyword arguments. The sorted occurs in line 926 (https://github.com/python/cpython/blob/master/Lib/xml/etree/ElementTree.py#L926) and 982(https://github.com/python/cpython/blob/master/Lib/xml/etree/ElementTree.py#L982) when xml or html are serialized. Or could we pass the sort_attrs to the functions _serialize_html/_serialize_xml and there handle this? 2. Just a comment, maybe sort_attrs is not ambiguous? For a user would be clear that sort_attrs will order the arguments in lexical order or maybe he/she could be confused and take it as that will respect the order of the keywords passed? ---------- nosy: +dfrojas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 23:16:47 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Oct 2018 03:16:47 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540610207.08.0.788709270274.issue34160@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Though it is compatible with earlier versions, I don't see any reason to keep sorting at all, especially as a default. The reasonable default is that whatever order the user specifies is what the tool does. The backwards compatible argument is specious. The ordering was never guaranteed. The only reason that we had sorting was to make the XML generation deterministic, and that is something we would still have. I vote against the permanent API expansion with an unhelpful default. The sorting is no longer necessary or desirable. Appropriately, we never guaranteed it, leaving us the implementation flexibility to make exactly this change. AFAICT, no XML user has ever expressed an interest in having attributes appear in alphabetical order -- for that matter, I can't recall any HTML user having expressed this preference (instead, they prefer to put class and id tags ahead of other tags for example). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 23:21:12 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Oct 2018 03:21:12 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540610472.4.0.788709270274.issue34160@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Diego, it would be premature to write an implementation until we've agreed on an API. I object to the Serhiy's proposal, and if no one agrees to my proposal to preserve the user's specific actions, then it would be better to do nothing at all, leaving the current API (deterministic, but with no particular order being guaranteed). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 26 23:23:10 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Oct 2018 03:23:10 +0000 Subject: [issue35079] difflib.SequenceMatcher.get_matching_blocks omits common strings In-Reply-To: <1540580441.56.0.788709270274.issue35079@psf.upfronthosting.co.za> Message-ID: <1540610590.97.0.788709270274.issue35079@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 00:18:58 2018 From: report at bugs.python.org (Braden Groom) Date: Sat, 27 Oct 2018 04:18:58 +0000 Subject: [issue33710] Deprecate gettext.lgettext() In-Reply-To: <1527764456.73.0.682650639539.issue33710@psf.upfronthosting.co.za> Message-ID: <1540613938.01.0.788709270274.issue33710@psf.upfronthosting.co.za> Braden Groom added the comment: Thanks! I'll check out the linked PR. I've seen a few deprecation issues that I couldn't pick up just because I wasn't clear on the deprecation process. Is this documented anywhere in the development guides? I wasn't able to find it if it exists. Is there any interest in adding a section for this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 01:00:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Oct 2018 05:00:45 +0000 Subject: [issue33710] Deprecate gettext.lgettext() In-Reply-To: <1527764456.73.0.682650639539.issue33710@psf.upfronthosting.co.za> Message-ID: <1540616445.18.0.788709270274.issue33710@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset fec35c99aa749bb90cb29349bed6b3393907c4c1 by Serhiy Storchaka in branch 'master': bpo-33710: Deprecate l*gettext() and related functions in the gettext module. (GH-10139) https://github.com/python/cpython/commit/fec35c99aa749bb90cb29349bed6b3393907c4c1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 01:12:01 2018 From: report at bugs.python.org (Leo Li) Date: Sat, 27 Oct 2018 05:12:01 +0000 Subject: [issue35074] source install [3.7.1] on debian jessie In-Reply-To: <1540537075.17.0.788709270274.issue35074@psf.upfronthosting.co.za> Message-ID: <1540617121.52.0.788709270274.issue35074@psf.upfronthosting.co.za> Leo Li added the comment: I've tested 2 way to solve this: 1. disable --enable-optimizations option. the software can be compile and install successful. 2. upgrade gcc version to 8.2.0. docker ? bin gcc --version gcc (Debian 8.2.0-8) 8.2.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 01:12:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Oct 2018 05:12:23 +0000 Subject: [issue35080] The tests for the `dis` module can be too rigid when changing opcodes In-Reply-To: <1540596956.61.0.788709270274.issue35080@psf.upfronthosting.co.za> Message-ID: <1540617143.13.0.788709270274.issue35080@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually this change decreases flexibility of tests. Expected output is generated. See the comment above it. When you change the bytecode, you need just uncomment these lines, run tests, copy the output, and comment out them back. The output contains numerical values of opcodes. It is rarely they are changed without changing the meaning of opcodes. It is more common to add new opcodes and replace old opcodes with other opcodes with different semantic. This leads to changing opcode arguments and offsets, adding and removing lines. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 01:22:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Oct 2018 05:22:19 +0000 Subject: [issue33710] Deprecate gettext.lgettext() In-Reply-To: <1527764456.73.0.682650639539.issue33710@psf.upfronthosting.co.za> Message-ID: <1540617739.25.0.788709270274.issue33710@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See PEP 4. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 01:25:58 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 27 Oct 2018 05:25:58 +0000 Subject: [issue35074] source install [3.7.1] on debian jessie In-Reply-To: <1540537075.17.0.788709270274.issue35074@psf.upfronthosting.co.za> Message-ID: <1540617958.33.0.788709270274.issue35074@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks, I guess then it's the same as issue34112 with --enable-optimizations being incompatible with older compiler toolchains like GCC 4 in this case. Feel free to close this if it resolves the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 01:27:14 2018 From: report at bugs.python.org (Maxime Belanger) Date: Sat, 27 Oct 2018 05:27:14 +0000 Subject: [issue35080] The tests for the `dis` module can be too rigid when changing opcodes In-Reply-To: <1540596956.61.0.788709270274.issue35080@psf.upfronthosting.co.za> Message-ID: <1540618034.65.0.788709270274.issue35080@psf.upfronthosting.co.za> Maxime Belanger added the comment: Ah, quite right; apologies for the not-so-useful PR! ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 01:31:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Oct 2018 05:31:15 +0000 Subject: [issue10536] Enhancements to gettext docs In-Reply-To: <1290730924.88.0.289473332428.issue10536@psf.upfronthosting.co.za> Message-ID: <1540618275.29.0.788709270274.issue10536@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: ?ric, do you mind to create a PR? But please avoid unnecessary formatting changes like adding a second space between sequences. While I prefer such style, these changes doesn't affect the result output and distract attention from significant changes. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 01:35:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Oct 2018 05:35:04 +0000 Subject: [issue2504] Add gettext.pgettext() and variants support In-Reply-To: <1206756624.13.0.664664048525.issue2504@psf.upfronthosting.co.za> Message-ID: <1540618504.8.0.788709270274.issue2504@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: l*gettext() functions have been just deprecated in issue33710. Please update the PR and remove new l*gettext() functions. ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 01:38:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Oct 2018 05:38:00 +0000 Subject: [issue31544] gettext.Catalog title is not flagged as a class In-Reply-To: <1506007626.15.0.9927755066.issue31544@psf.upfronthosting.co.za> Message-ID: <1540618680.29.0.788709270274.issue31544@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 Sat Oct 27 01:45:25 2018 From: report at bugs.python.org (Braden Groom) Date: Sat, 27 Oct 2018 05:45:25 +0000 Subject: [issue33710] Deprecate gettext.lgettext() In-Reply-To: <1527764456.73.0.682650639539.issue33710@psf.upfronthosting.co.za> Message-ID: <1540619125.33.0.788709270274.issue33710@psf.upfronthosting.co.za> Braden Groom added the comment: Ah. Thank you ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 02:13:45 2018 From: report at bugs.python.org (Leo Li) Date: Sat, 27 Oct 2018 06:13:45 +0000 Subject: [issue35074] source install [3.7.1] on debian jessie In-Reply-To: <1540537075.17.0.788709270274.issue35074@psf.upfronthosting.co.za> Message-ID: <1540620825.5.0.788709270274.issue35074@psf.upfronthosting.co.za> Leo Li added the comment: Sure! Yes, Pls close it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 02:16:50 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Sat, 27 Oct 2018 06:16:50 +0000 Subject: [issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__ In-Reply-To: <1539668705.97.0.788709270274.issue34995@psf.upfronthosting.co.za> Message-ID: <1540621010.73.0.788709270274.issue34995@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- nosy: +sir-sigurd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 02:16:56 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 27 Oct 2018 06:16:56 +0000 Subject: [issue35074] source install [3.7.1] on debian jessie In-Reply-To: <1540537075.17.0.788709270274.issue35074@psf.upfronthosting.co.za> Message-ID: <1540621016.74.0.788709270274.issue35074@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Sure, I am closing it with duplicate as resolution adding the related ticket issue34112 as superseder. Thanks for the report! ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> 3.7.0 build error with --enable-optimizations _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 02:51:16 2018 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Sat, 27 Oct 2018 06:51:16 +0000 Subject: [issue35078] Refactor code in calendar.py module Message-ID: <1540623076.15.0.788709270274.issue35078@psf.upfronthosting.co.za> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- title: Allow customization of css class name of a month in calendar module -> Refactor code in calendar.py module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 03:39:37 2018 From: report at bugs.python.org (Petter S) Date: Sat, 27 Oct 2018 07:39:37 +0000 Subject: [issue34547] Wsgiref server does not handle closed connections gracefully In-Reply-To: <1535624235.67.0.56676864532.issue34547@psf.upfronthosting.co.za> Message-ID: <1540625977.72.0.788709270274.issue34547@psf.upfronthosting.co.za> Change by Petter S : ---------- pull_requests: +9475 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 06:45:10 2018 From: report at bugs.python.org (Mario Corchero) Date: Sat, 27 Oct 2018 10:45:10 +0000 Subject: [issue35082] Mock.__dir__ lists deleted attributes Message-ID: <1540637110.3.0.788709270274.issue35082@psf.upfronthosting.co.za> New submission from Mario Corchero : Calling dir on unittest.mock.Mock will return deleted attributes. This is a result of the way del is implemented in Mock, which just sets a sentinel in the child mocks, so an AttributeError is raised if the attribute is later accessed. We can just check for such sentinel in the __dir__ method and not return those. ---------- components: Library (Lib) messages: 328647 nosy: mariocj89 priority: low severity: normal status: open title: Mock.__dir__ lists deleted attributes type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 06:50:57 2018 From: report at bugs.python.org (Mario Corchero) Date: Sat, 27 Oct 2018 10:50:57 +0000 Subject: [issue35082] Mock.__dir__ lists deleted attributes In-Reply-To: <1540637110.3.0.788709270274.issue35082@psf.upfronthosting.co.za> Message-ID: <1540637457.69.0.788709270274.issue35082@psf.upfronthosting.co.za> Change by Mario Corchero : ---------- keywords: +patch pull_requests: +9476 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 08:28:18 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 27 Oct 2018 12:28:18 +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: <1540643298.26.0.788709270274.issue34279@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +9477 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 09:46:09 2018 From: report at bugs.python.org (Ned Batchelder) Date: Sat, 27 Oct 2018 13:46:09 +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: <1540647969.96.0.788709270274.issue34624@psf.upfronthosting.co.za> Ned Batchelder added the comment: Another option is to make clear in the docs that the command line does not accept regular expressions, but only literal module names, and raise an error if a non-importable name (for example with asterisks in it) is specified. And while we are here: the docs show "error:::mymodule[.*]" which doesn't even make sense as a regex! ---------- nosy: +nedbat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 09:52:14 2018 From: report at bugs.python.org (Mario Corchero) Date: Sat, 27 Oct 2018 13:52:14 +0000 Subject: [issue33236] MagicMock().__iter__.return_value is different from MagicMock().__iter__() In-Reply-To: <1523015407.46.0.682650639539.issue33236@psf.upfronthosting.co.za> Message-ID: <1540648334.82.0.788709270274.issue33236@psf.upfronthosting.co.za> Mario Corchero added the comment: iter is initialized by using side_effects, not return_value. The statement "According to the documentation .return_value should be identical to the object returned when calling the mock" works only when it return_value has been used to define the behaviour of the mock. Example: ``` >>> m = MagicMock(side_effect=lambda: 1) >>> m() 1 >>> m.return_value >>> m() is m.return_value False ``` ---------- nosy: +mariocj89 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 10:10:48 2018 From: report at bugs.python.org (=?utf-8?b?VGhvbWFzIEdsw6TDn2xl?=) Date: Sat, 27 Oct 2018 14:10:48 +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: <1540649448.69.0.788709270274.issue34624@psf.upfronthosting.co.za> Thomas Gl??le added the comment: Hi, thanks for the consideration! Is there any reason to introduce different behaviour than with filterwarnings here? This increases the number of things to remember - and except for the dot regex syntax doesn't interfere with module names, so there is no big drawback here either. More importantly, my main use case for filterwarnings would be to select/ignore warnings based on module *or package* name. With the current interpretation as exact module name, you have to list all submodules in advance, which is quite inhibiting. I have fixed the `[.*]` bogus example in the PR. Best, Thomas ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 10:16:19 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 27 Oct 2018 14:16:19 +0000 Subject: [issue35064] COUNT_ALLOCS build export inc_count() and dec_count() functions which don't have a "Py_" prefix In-Reply-To: <1540462435.94.0.788709270274.issue35064@psf.upfronthosting.co.za> Message-ID: <1540649779.1.0.788709270274.issue35064@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +9478 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 10:44:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Oct 2018 14:44:34 +0000 Subject: [issue35082] Mock.__dir__ lists deleted attributes In-Reply-To: <1540637110.3.0.788709270274.issue35082@psf.upfronthosting.co.za> Message-ID: <1540651474.77.0.788709270274.issue35082@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 10:46:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Oct 2018 14:46:57 +0000 Subject: [issue35047] Better error messages in unittest.mock In-Reply-To: <1540283736.06.0.788709270274.issue35047@psf.upfronthosting.co.za> Message-ID: <1540651617.25.0.788709270274.issue35047@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 11:04:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Oct 2018 15:04:58 +0000 Subject: [issue35078] Refactor code in calendar.py module Message-ID: <1540652698.56.0.788709270274.issue35078@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : We don't usually do pure refactoring changes. ---------- nosy: +serhiy.storchaka resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 11:41:28 2018 From: report at bugs.python.org (Michael Foord) Date: Sat, 27 Oct 2018 15:41:28 +0000 Subject: [issue33236] MagicMock().__iter__.return_value is different from MagicMock().__iter__() In-Reply-To: <1523015407.46.0.682650639539.issue33236@psf.upfronthosting.co.za> Message-ID: <1540654888.06.0.788709270274.issue33236@psf.upfronthosting.co.za> Michael Foord added the comment: This isn't a bug. This is the intended behaviour, otherwise MagicMock objects would error out on iteration. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 12:29:07 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 27 Oct 2018 16:29:07 +0000 Subject: [issue35078] Refactor code in calendar.py module In-Reply-To: <1540652698.56.0.788709270274.issue35078@psf.upfronthosting.co.za> Message-ID: <1540657747.21.0.788709270274.issue35078@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Serhiy, this adds a change where month's name CSS class is now customizable in LocaleHTMLCalendar. It's currently hard-coded as "month" though HTMLCalendar is customizable. I suggested method reuse since LocaleHTMLCalendar from HTMLCalendar that would fix this instead of duplicating the code. I think this can be reopened. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 12:32:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Oct 2018 16:32:49 +0000 Subject: [issue35078] Refactor code in calendar.py module In-Reply-To: <1540652698.56.0.788709270274.issue35078@psf.upfronthosting.co.za> Message-ID: <1540657969.58.0.788709270274.issue35078@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, I was fooled by misleading titles and news entry. Please change them. ---------- resolution: rejected -> stage: resolved -> patch review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 12:43:34 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 27 Oct 2018 16:43:34 +0000 Subject: [issue35078] Allow customization of CSS class name of a month in calendar module In-Reply-To: <1540652698.56.0.788709270274.issue35078@psf.upfronthosting.co.za> Message-ID: <1540658614.89.0.788709270274.issue35078@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: No problem, I have left a PR comment [0] to add the actual enhancement in the NEWS entry so that it's visible. The original issue title was "Allow customization of css class name of a month in calendar module" and @thatiparthy changed the issue title and PR to "Refactor code in calendar.py module" maybe due to my solution causing little confusion. @thatiparthy I am changing the issue title to "Allow customization of CSS class name of a month in calendar module" [0] https://github.com/python/cpython/pull/10137#pullrequestreview-169047050 Thanks ---------- title: Refactor code in calendar.py module -> Allow customization of CSS class name of a month in calendar module type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 12:58:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Oct 2018 16:58:59 +0000 Subject: [issue35078] Allow customization of CSS class name of a month in calendar module In-Reply-To: <1540652698.56.0.788709270274.issue35078@psf.upfronthosting.co.za> Message-ID: <1540659539.27.0.788709270274.issue35078@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 13:50:45 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 27 Oct 2018 17:50:45 +0000 Subject: [issue34510] add HTTPConnection.settimeout() Message-ID: <1540662645.84.0.788709270274.issue34510@psf.upfronthosting.co.za> New submission from Karthikeyan Singaravelan : I think this is useful since it also sets conn.timeout so that both conn.sock.gettimeout() and conn.timeout return same value with this helper and don't cause confusion like using conn.socket.settimeout() that updates socket but not conn.timeout. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 14:12:49 2018 From: report at bugs.python.org (Tal Einat) Date: Sat, 27 Oct 2018 18:12:49 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540663969.81.0.788709270274.issue34160@psf.upfronthosting.co.za> Tal Einat added the comment: There is also a middle ground: Keep .write() as it is *and* have .dump() preserve the order in which the parameters were supplied in the constructor. They could both use a common *internal* method with a flag to select the desired ordering. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 16:14:41 2018 From: report at bugs.python.org (Joy Diamond) Date: Sat, 27 Oct 2018 20:14:41 +0000 Subject: [issue35083] Fix documentation for __instancecheck__ Message-ID: <1540671281.62.0.788709270274.issue35083@psf.upfronthosting.co.za> New submission from Joy Diamond : This is a request to fix the documentation for __instancecheck__. Please add the following: """ (Note that any object `x` is always considered to be an instance of `type(x)`, and this cannot be overridden.) """ Consider the following program: class M(type): def __instancecheck__(m, t): print('instancecheck(%s, %s)' % (m, t)) return False # LIE! Test = M('Test', ((object,)), {}) something = Test() print('Does *NOT* call __instancecheck__:') print('isinstance(something, Test): %s' % isinstance(something, Test)) print() print('Does call __instancecheck__:') print('isinstance(0, Test): %s' % isinstance(0, Test)) Under python 2, python 3, and pypy, in all cases, the first examples does *NOT* call __instancecheck__. You can see the optimization here: https://github.com/python/cpython/blob/master/Objects/abstract.c#L2397-L2405 Which reads: int PyObject_IsInstance(PyObject *inst, PyObject *cls) { _Py_IDENTIFIER(__instancecheck__); PyObject *checker; /* Quick test for an exact match */ if (Py_TYPE(inst) == (PyTypeObject *)cls) return 1; I'm fine with the optimization -- I am not suggesting to get rid of it. I just want the documentation to match the actual implementation. The following documentation needs to be fixed: https://docs.python.org/2/reference/datamodel.html https://docs.python.org/3/reference/datamodel.html https://www.python.org/dev/peps/pep-3119/ It took me half an hour to figure out why my version of __instancecheck__ was not working, as I tried to test it using the super simple code above ... One of the best things about python is how accurate and consistent the documentation is. This request is to keep these high standards. ---------- assignee: docs at python components: Documentation messages: 328658 nosy: docs at python, joydiamond priority: normal severity: normal status: open title: Fix documentation for __instancecheck__ type: enhancement versions: Python 2.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 16:26:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Oct 2018 20:26:35 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540671995.48.0.788709270274.issue34160@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Okay, lets just remove sorting. The method for creating XML file in the minidom module also sorts attributes. It should be changed as well. XMLGenerator in xml.sax.saxutils doesn't sort attributes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 16:48:37 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 27 Oct 2018 20:48:37 +0000 Subject: [issue35067] Use vswhere instead of _distutils_findvs In-Reply-To: <1540481339.78.0.788709270274.issue35067@psf.upfronthosting.co.za> Message-ID: <1540673317.63.0.788709270274.issue35067@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 53125a53f483db0af76249b6af6efcdc200eb421 by Steve Dower in branch 'master': bpo-35067: Remove _distutils_findvs and use vswhere.exe instead. (GH-10095) https://github.com/python/cpython/commit/53125a53f483db0af76249b6af6efcdc200eb421 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 16:49:01 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Oct 2018 20:49:01 +0000 Subject: [issue35067] Use vswhere instead of _distutils_findvs In-Reply-To: <1540481339.78.0.788709270274.issue35067@psf.upfronthosting.co.za> Message-ID: <1540673341.95.0.788709270274.issue35067@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9479 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 17:06:23 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Oct 2018 21:06:23 +0000 Subject: [issue35067] Use vswhere instead of _distutils_findvs In-Reply-To: <1540481339.78.0.788709270274.issue35067@psf.upfronthosting.co.za> Message-ID: <1540674383.83.0.788709270274.issue35067@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e2cf819539c836b670bf2ea4dd3c72ee39e084f1 by Miss Islington (bot) in branch '3.7': bpo-35067: Remove _distutils_findvs and use vswhere.exe instead. (GH-10095) https://github.com/python/cpython/commit/e2cf819539c836b670bf2ea4dd3c72ee39e084f1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 17:44:20 2018 From: report at bugs.python.org (Anthony Sottile) Date: Sat, 27 Oct 2018 21:44:20 +0000 Subject: [issue33944] Deprecate and remove pth files In-Reply-To: <1529688140.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <1540676660.26.0.788709270274.issue33944@psf.upfronthosting.co.za> Change by Anthony Sottile : ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 17:57:18 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Oct 2018 21:57:18 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1540677438.91.0.788709270274.issue33257@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Serhiy, if you now think that we should try to fix _tkinter to actually support non-thread tcl builds, please review the two PRs on this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 17:58:12 2018 From: report at bugs.python.org (Lion Kimbro) Date: Sat, 27 Oct 2018 21:58:12 +0000 Subject: [issue6717] Some problem with recursion handling In-Reply-To: <1250518561.04.0.421053701967.issue6717@psf.upfronthosting.co.za> Message-ID: <1540677492.06.0.788709270274.issue6717@psf.upfronthosting.co.za> Lion Kimbro added the comment: I confirm that dragbug.py (2009-08-17!) is failing for me, almost ten years later. I'm using Python 3.6.1/win32 on Windows 10. This is really disappointing, because I have students who I'm teaching Python to via turtle, and I like to show them Python working. I have found a workaround which -- if this bug won't be fixed -- I propose mentioning in the documentation. The work-around is something like this: g = {"X": 0, "Y": 0} def goto_later(x, y): g["X"] = x; g["Y"] = y def ontick(): goto(g["X"], g["Y"]) ontimer(ontick, 10) ondrag(goto_later) ontimer(ontick, 10) That way, there is no opening for recursion within the handler for the ondrag event. ---------- nosy: +LionKimbro versions: +Python 3.6 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 18:05:23 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 27 Oct 2018 22:05:23 +0000 Subject: [issue35067] Use vswhere instead of _distutils_findvs In-Reply-To: <1540481339.78.0.788709270274.issue35067@psf.upfronthosting.co.za> Message-ID: <1540677923.52.0.788709270274.issue35067@psf.upfronthosting.co.za> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 19:10:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Oct 2018 23:10:44 +0000 Subject: [issue33257] Race conditions in Tkinter with non-threaded Tcl In-Reply-To: <1523378469.47.0.682650639539.issue33257@psf.upfronthosting.co.za> Message-ID: <1540681844.26.0.788709270274.issue33257@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +9480 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 19:49:55 2018 From: report at bugs.python.org (TestUser) Date: Sat, 27 Oct 2018 23:49:55 +0000 Subject: [issue35084] binascii.Error: Incorrect padding Message-ID: <1540684195.55.0.788709270274.issue35084@psf.upfronthosting.co.za> New submission from TestUser : The below "test.code1" is not base64 encoded. Though, it is a good file. t:~$ python3 -m base64 -d test.code1 Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/lib/python3.6/base64.py", line 602, in main() File "/usr/lib/python3.6/base64.py", line 586, in main func(f, sys.stdout.buffer) File "/usr/lib/python3.6/base64.py", line 512, in decode s = binascii.a2b_base64(line) binascii.Error: Incorrect padding ---------- components: Library (Lib) messages: 328664 nosy: Tester priority: normal severity: normal status: open title: binascii.Error: Incorrect padding type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 20:06:43 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Oct 2018 00:06:43 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1540685203.04.0.788709270274.issue34751@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset aeb1be5868623c9cd9cf6d7de3015a43fb005815 by Raymond Hettinger (jdemeyer) in branch 'master': bpo-34751: improved hash function for tuples (GH-9471) https://github.com/python/cpython/commit/aeb1be5868623c9cd9cf6d7de3015a43fb005815 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 20:06:56 2018 From: report at bugs.python.org (TestUser) Date: Sun, 28 Oct 2018 00:06:56 +0000 Subject: [issue35085] FileNotFoundError: [Errno 2] No such file or directory: Message-ID: <1540685216.33.0.788709270274.issue35085@psf.upfronthosting.co.za> New submission from TestUser : Seems the base64 module has issues with bad file(s). This does not seems to generate a Crash Report. t:~$ python3 -m base64 -d "12s345a2" Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/lib/python3.6/base64.py", line 602, in main() File "/usr/lib/python3.6/base64.py", line 585, in main with open(args[0], 'rb') as f: FileNotFoundError: [Errno 2] No such file or directory: '12s345a2' test at TestNut:~$ python3 -m base64 -d /test.txt Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/lib/python3.6/base64.py", line 602, in main() File "/usr/lib/python3.6/base64.py", line 585, in main with open(args[0], 'rb') as f: FileNotFoundError: [Errno 2] No such file or directory: '/test.txt' ---------- components: Library (Lib) messages: 328666 nosy: Tester priority: normal severity: normal status: open title: FileNotFoundError: [Errno 2] No such file or directory: versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 20:07:08 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Oct 2018 00:07:08 +0000 Subject: [issue34751] Hash collisions for tuples In-Reply-To: <1537450047.43.0.956365154283.issue34751@psf.upfronthosting.co.za> Message-ID: <1540685228.37.0.788709270274.issue34751@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 20:15:35 2018 From: report at bugs.python.org (Braden Groom) Date: Sun, 28 Oct 2018 00:15:35 +0000 Subject: [issue14856] argparse: creating an already defined subparsers does not raises an exception In-Reply-To: <1337430471.4.0.633032333136.issue14856@psf.upfronthosting.co.za> Message-ID: <1540685735.59.0.788709270274.issue14856@psf.upfronthosting.co.za> Change by Braden Groom : ---------- pull_requests: +9481 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 20:15:39 2018 From: report at bugs.python.org (Braden Groom) Date: Sun, 28 Oct 2018 00:15:39 +0000 Subject: [issue14856] argparse: creating an already defined subparsers does not raises an exception In-Reply-To: <1337430471.4.0.633032333136.issue14856@psf.upfronthosting.co.za> Message-ID: <1540685739.34.0.788709270274.issue14856@psf.upfronthosting.co.za> Change by Braden Groom : ---------- pull_requests: +9481, 9482 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 20:15:43 2018 From: report at bugs.python.org (Braden Groom) Date: Sun, 28 Oct 2018 00:15:43 +0000 Subject: [issue14856] argparse: creating an already defined subparsers does not raises an exception In-Reply-To: <1337430471.4.0.633032333136.issue14856@psf.upfronthosting.co.za> Message-ID: <1540685743.46.0.788709270274.issue14856@psf.upfronthosting.co.za> Change by Braden Groom : ---------- pull_requests: +9481, 9482, 9483 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 20:18:00 2018 From: report at bugs.python.org (Braden Groom) Date: Sun, 28 Oct 2018 00:18:00 +0000 Subject: [issue14856] argparse: creating an already defined subparsers does not raises an exception In-Reply-To: <1337430471.4.0.633032333136.issue14856@psf.upfronthosting.co.za> Message-ID: <1540685880.14.0.788709270274.issue14856@psf.upfronthosting.co.za> Braden Groom added the comment: https://github.com/python/cpython/pull/10159 ---------- nosy: +bradengroom _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 20:39:32 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 28 Oct 2018 00:39:32 +0000 Subject: [issue35085] FileNotFoundError: [Errno 2] No such file or directory: In-Reply-To: <1540685216.33.0.788709270274.issue35085@psf.upfronthosting.co.za> Message-ID: <1540687172.62.0.788709270274.issue35085@psf.upfronthosting.co.za> Steven D'Aprano added the comment: What do you mean, a crash report? You get a traceback telling you the problem: the file is missing. What behaviour did you expect if you try to decode a non-existent file? Perhaps you meant to write: python3 -m base64 -t "12s345a2" I don't think this is a bug, I think it is working correctly. If you cannot explain why it is a bug, we'll close this bug report. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 21:04:56 2018 From: report at bugs.python.org (Daniel Lovell) Date: Sun, 28 Oct 2018 01:04:56 +0000 Subject: [issue35086] tkinter docs: errors in A Simple Hello World Program Message-ID: <1540688696.85.0.788709270274.issue35086@psf.upfronthosting.co.za> New submission from Daniel Lovell : In the documentation for tkinter, "A Simple Hello World Program" Application class does not hold onto the master Tk() instance as a class attribute. This is a good practice, and newcomers to tkinter would likely have trouble closing the window without this since root will almost never be in the global namespace. The original example: """"" import tkinter as tk class Application(tk.Frame): def __init__(self, master=None): super().__init__(master) self.pack() self.create_widgets() def create_widgets(self): self.hi_there = tk.Button(self) self.hi_there["text"] = "Hello World\n(click me)" self.hi_there["command"] = self.say_hi self.hi_there.pack(side="top") self.quit = tk.Button(self, text="QUIT", fg="red", command=root.destroy) self.quit.pack(side="bottom") def say_hi(self): print("hi there, everyone!") root = tk.Tk() app = Application(master=root) app.mainloop() """" The proposed fix: """" import tkinter as tk class Application(tk.Frame): def __init__(self, master=None): super().__init__(master) self.master = master self.pack() self.create_widgets() def create_widgets(self): self.hi_there = tk.Button(self) self.hi_there["text"] = "Hello World\n(click me)" self.hi_there["command"] = self.say_hi self.hi_there.pack(side="top") self.quit = tk.Button(self, text="QUIT", fg="red", command=self.master.destroy) self.quit.pack(side="bottom") def say_hi(self): print("hi there, everyone!") def main(): root = tk.Tk() app = Application(master=root) app.mainloop() if __name__ == "__main__": main() """" ---------- components: Tkinter files: tkinter_hello_world_issue.png messages: 328669 nosy: NuclearLemon priority: normal severity: normal status: open title: tkinter docs: errors in A Simple Hello World Program type: enhancement versions: Python 3.7, Python 3.8 Added file: https://bugs.python.org/file47894/tkinter_hello_world_issue.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 21:15:16 2018 From: report at bugs.python.org (Daniel Lovell) Date: Sun, 28 Oct 2018 01:15:16 +0000 Subject: [issue35086] tkinter docs: errors in A Simple Hello World Program In-Reply-To: <1540688696.85.0.788709270274.issue35086@psf.upfronthosting.co.za> Message-ID: <1540689316.89.0.788709270274.issue35086@psf.upfronthosting.co.za> Change by Daniel Lovell : ---------- keywords: +patch pull_requests: +9484 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 27 23:16:45 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 03:16:45 +0000 Subject: [issue35087] IDLE: update idlelib help files for current doc build Message-ID: <1540696605.72.0.788709270274.issue35087@psf.upfronthosting.co.za> New submission from Terry J. Reedy : https://docs.python.org/3.6/library/idle.html starts with '25.5 IDLE'. https://docs.python.org/3.7/library/idle.html starts with 'IDLE'. The chapter and sections numbers are gone. The current idlelib/help.html was copied (and stripped) from a Doc/build/library/idle.html built from the current Doc/library/idle.rst with Sphinx 1.7.4. It was merged 2018 June 10. See #33610. Headers have chapter-section numbers. (The chapter number is detected on the first line and removed from all headers before display.) When I changed idle.rst on a branch of master and rebuilt the docs with 1.7.4, there were over 100 warnings about an unknown doctest directive 'skipif'. When I upgraded to Sphinx 1.8.1, the warnings disappeared, and so did the chapter-section numbers. So it appears that the 3.7+ docs are meant to be built, and 3.7+ online docs are being built, with the newer Sphinx. I am not sure of whether the loss of numbers is intentional and permanent, but for the present, I will use the 1.8 versions of idle.html and the derived help.html. idlelib/help.html is currently the same for all of 3.6 to 3.8, so one diff can be merged and back-ported. help.py is also the same for all 3 versions. But the loss of numbers breaks it. The upcoming patch will also fix this (but not immediately delete the code that handles numbers. For the moment, I will replace the numbers in the Table of Contents with indents. ---------- assignee: terry.reedy components: IDLE messages: 328670 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: update idlelib help files for current doc build type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 00:18:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 04:18:44 +0000 Subject: [issue35087] IDLE: update idlelib help files for current doc build In-Reply-To: <1540696605.72.0.788709270274.issue35087@psf.upfronthosting.co.za> Message-ID: <1540700324.08.0.788709270274.issue35087@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +9485 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 00:29:10 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Oct 2018 04:29:10 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540700950.31.0.788709270274.issue34160@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +9486 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 00:48:58 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 04:48:58 +0000 Subject: [issue35088] Update idlelib.help.copy_string docstring Message-ID: <1540702138.58.0.788709270274.issue35088@psf.upfronthosting.co.za> New submission from Terry J. Reedy : The current docstring still refers to hg and forward merging. ---------- assignee: terry.reedy components: IDLE messages: 328671 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: Update idlelib.help.copy_string docstring type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 01:09:19 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 05:09:19 +0000 Subject: [issue35088] Update idlelib.help.copy_string docstring In-Reply-To: <1540702138.58.0.788709270274.issue35088@psf.upfronthosting.co.za> Message-ID: <1540703359.72.0.788709270274.issue35088@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +9487 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 01:21:40 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 05:21:40 +0000 Subject: [issue35087] IDLE: update idlelib help files for current doc build In-Reply-To: <1540696605.72.0.788709270274.issue35087@psf.upfronthosting.co.za> Message-ID: <1540704100.64.0.788709270274.issue35087@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset db40cb50eb823b8ef9040b1c9bf31a7475d94d39 by Terry Jan Reedy in branch 'master': bpo-35087: Update idlelib help files for the current doc build. (GH-10162) https://github.com/python/cpython/commit/db40cb50eb823b8ef9040b1c9bf31a7475d94d39 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 01:21:53 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 05:21:53 +0000 Subject: [issue35087] IDLE: update idlelib help files for current doc build In-Reply-To: <1540696605.72.0.788709270274.issue35087@psf.upfronthosting.co.za> Message-ID: <1540704113.09.0.788709270274.issue35087@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9488 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 01:22:06 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 05:22:06 +0000 Subject: [issue35087] IDLE: update idlelib help files for current doc build In-Reply-To: <1540696605.72.0.788709270274.issue35087@psf.upfronthosting.co.za> Message-ID: <1540704126.93.0.788709270274.issue35087@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9489 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 01:29:04 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 05:29:04 +0000 Subject: [issue35088] Update idlelib.help.copy_string docstring In-Reply-To: <1540702138.58.0.788709270274.issue35088@psf.upfronthosting.co.za> Message-ID: <1540704544.65.0.788709270274.issue35088@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 2b555fc1f07bee8b066a6d7da727e516f37e8e34 by Terry Jan Reedy in branch 'master': bpo-35088: Update idlelib.help.copy_string docstring (#10164) https://github.com/python/cpython/commit/2b555fc1f07bee8b066a6d7da727e516f37e8e34 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 01:29:14 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 05:29:14 +0000 Subject: [issue35088] Update idlelib.help.copy_string docstring In-Reply-To: <1540702138.58.0.788709270274.issue35088@psf.upfronthosting.co.za> Message-ID: <1540704554.12.0.788709270274.issue35088@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9490 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 01:29:21 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 05:29:21 +0000 Subject: [issue35088] Update idlelib.help.copy_string docstring In-Reply-To: <1540702138.58.0.788709270274.issue35088@psf.upfronthosting.co.za> Message-ID: <1540704561.61.0.788709270274.issue35088@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9491 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 01:35:03 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 28 Oct 2018 05:35:03 +0000 Subject: [issue35084] binascii.Error: Incorrect padding In-Reply-To: <1540684195.55.0.788709270274.issue35084@psf.upfronthosting.co.za> Message-ID: <1540704903.45.0.788709270274.issue35084@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. Can you please attach the file test.code1? Your original report says "test.code1" is not base64 encoded and -d takes a file that is base64 encoded and decodes it. Can you please be more descriptive about what you are expecting? ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 01:40:05 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 05:40:05 +0000 Subject: [issue35087] IDLE: update idlelib help files for current doc build In-Reply-To: <1540696605.72.0.788709270274.issue35087@psf.upfronthosting.co.za> Message-ID: <1540705205.24.0.788709270274.issue35087@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2d3b7a99635b10873fdd6da01dcb7cfb33837633 by Miss Islington (bot) in branch '3.7': bpo-35087: Update idlelib help files for the current doc build. (GH-10162) https://github.com/python/cpython/commit/2d3b7a99635b10873fdd6da01dcb7cfb33837633 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 01:42:52 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 05:42:52 +0000 Subject: [issue35087] IDLE: update idlelib help files for current doc build In-Reply-To: <1540696605.72.0.788709270274.issue35087@psf.upfronthosting.co.za> Message-ID: <1540705372.87.0.788709270274.issue35087@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 09953141b9eb4c42fdf366d084f4f328ddbc0dc8 by Miss Islington (bot) in branch '3.6': bpo-35087: Update idlelib help files for the current doc build. (GH-10162) https://github.com/python/cpython/commit/09953141b9eb4c42fdf366d084f4f328ddbc0dc8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 01:48:50 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 28 Oct 2018 05:48:50 +0000 Subject: [issue35085] FileNotFoundError: [Errno 2] No such file or directory: In-Reply-To: <1540685216.33.0.788709270274.issue35085@psf.upfronthosting.co.za> Message-ID: <1540705730.91.0.788709270274.issue35085@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I can see one another related report issue35084. As @steven.daprano said this is an expected traceback and it's working correctly. -d expects a valid base64 encoded file and supplying a non-existent file or file with invalid encoding is supposed to throw a traceback. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 01:52:12 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 05:52:12 +0000 Subject: [issue35088] Update idlelib.help.copy_string docstring In-Reply-To: <1540702138.58.0.788709270274.issue35088@psf.upfronthosting.co.za> Message-ID: <1540705932.73.0.788709270274.issue35088@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 593af34e643220f40880e5dd0a8092a9ece70747 by Miss Islington (bot) in branch '3.7': bpo-35088: Update idlelib.help.copy_string docstring (GH-10164) https://github.com/python/cpython/commit/593af34e643220f40880e5dd0a8092a9ece70747 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 02:01:29 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 06:01:29 +0000 Subject: [issue35088] Update idlelib.help.copy_string docstring In-Reply-To: <1540702138.58.0.788709270274.issue35088@psf.upfronthosting.co.za> Message-ID: <1540706489.58.0.788709270274.issue35088@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 0e6329db493d4bef6aa35ae613c3c6a8453066a5 by Miss Islington (bot) in branch '3.6': bpo-35088: Update idlelib.help.copy_string docstring (GH-10164) https://github.com/python/cpython/commit/0e6329db493d4bef6aa35ae613c3c6a8453066a5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 02:02:41 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 28 Oct 2018 06:02:41 +0000 Subject: [issue35086] tkinter docs: errors in A Simple Hello World Program In-Reply-To: <1540688696.85.0.788709270274.issue35086@psf.upfronthosting.co.za> Message-ID: <1540706561.14.0.788709270274.issue35086@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. So the current example in the docs works fine since root is in global namespace. But this seems to be a sensible change to use self.master which references root instead of relying on root to be global though I don't know we should restructure the example to use main(). I am adding Serhiy for review. ---------- nosy: +serhiy.storchaka, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 03:02:45 2018 From: report at bugs.python.org (Daniel Lovell) Date: Sun, 28 Oct 2018 07:02:45 +0000 Subject: [issue35086] tkinter docs: errors in A Simple Hello World Program In-Reply-To: <1540688696.85.0.788709270274.issue35086@psf.upfronthosting.co.za> Message-ID: <1540710165.6.0.788709270274.issue35086@psf.upfronthosting.co.za> Daniel Lovell added the comment: Thanks for the reply xtreak. I agree that changing the example to include main() isn't necessary - I unintentionally included that from my example of the case where the current version isn't functional. In the PR I submitted on Github (https://github.com/python/cpython/pull/10160), the proposed change is simply adding the master Tk instance to self.master then using that to close the window in the Quit button callback. Sorry for the confusion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 03:35:12 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 07:35:12 +0000 Subject: [issue35087] IDLE: update idlelib help files for current doc build In-Reply-To: <1540696605.72.0.788709270274.issue35087@psf.upfronthosting.co.za> Message-ID: <1540712112.95.0.788709270274.issue35087@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 Sun Oct 28 03:35:36 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 07:35:36 +0000 Subject: [issue35088] Update idlelib.help.copy_string docstring In-Reply-To: <1540702138.58.0.788709270274.issue35088@psf.upfronthosting.co.za> Message-ID: <1540712136.5.0.788709270274.issue35088@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 Sun Oct 28 03:46:04 2018 From: report at bugs.python.org (Julien Palard) Date: Sun, 28 Oct 2018 07:46:04 +0000 Subject: [issue35042] Use the role :pep: for the PEP \d+ In-Reply-To: <1540195863.27.0.788709270274.issue35042@psf.upfronthosting.co.za> Message-ID: <1540712764.85.0.788709270274.issue35042@psf.upfronthosting.co.za> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 03:49:01 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 07:49:01 +0000 Subject: [issue1529353] Squeezer - squeeze large output in IDLE's shell Message-ID: <1540712941.5.0.788709270274.issue1529353@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +9493 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 05:55:54 2018 From: report at bugs.python.org (Anthony Sottile) Date: Sun, 28 Oct 2018 09:55:54 +0000 Subject: [issue34364] problem with traceback for syntax error in f-string In-Reply-To: <31c748a7-5e57-009a-08e5-c18171489bc0@gmail.com> Message-ID: <1540720554.49.0.788709270274.issue34364@psf.upfronthosting.co.za> Change by Anthony Sottile : ---------- keywords: +patch pull_requests: +9494 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 07:40:23 2018 From: report at bugs.python.org (Sebastian Rittau) Date: Sun, 28 Oct 2018 11:40:23 +0000 Subject: [issue35089] Remove typing.io and typing.re from documentation Message-ID: <1540726823.63.0.788709270274.issue35089@psf.upfronthosting.co.za> New submission from Sebastian Rittau : Per the discussion in https://github.com/python/typing/issues/589 and https://github.com/python/typeshed/issues/1652, IO, BinaryIO, TextIO, Pattern, and Match should be imported directly from typing, not from typing.io and typing.re. The documentation needs to be adjusted accordingly. ---------- assignee: docs at python components: Documentation messages: 328683 nosy: docs at python, srittau priority: normal severity: normal status: open title: Remove typing.io and typing.re from documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 07:41:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2018 11:41:35 +0000 Subject: [issue35054] Add more index entries for symbols In-Reply-To: <1540316703.62.0.788709270274.issue35054@psf.upfronthosting.co.za> Message-ID: <1540726895.21.0.788709270274.issue35054@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 913876d824d969f8c7431e8a9d4610a9a11a786e by Serhiy Storchaka in branch 'master': bpo-35054: Add yet more index entries for symbols. (GH-10121) https://github.com/python/cpython/commit/913876d824d969f8c7431e8a9d4610a9a11a786e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 07:41:39 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 11:41:39 +0000 Subject: [issue35054] Add more index entries for symbols In-Reply-To: <1540316703.62.0.788709270274.issue35054@psf.upfronthosting.co.za> Message-ID: <1540726899.29.0.788709270274.issue35054@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9495 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 07:43:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2018 11:43:07 +0000 Subject: [issue32892] Remove specific constant AST types in favor of ast.Constant In-Reply-To: <1519204597.27.0.467229070634.issue32892@psf.upfronthosting.co.za> Message-ID: <1540726987.38.0.788709270274.issue32892@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 6015cc50bc38b9e920ce4986ee10658eaa14f561 by Serhiy Storchaka in branch 'master': bpo-32892: Support subclasses of base types in isinstance checks for AST constants. (GH-9934) https://github.com/python/cpython/commit/6015cc50bc38b9e920ce4986ee10658eaa14f561 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 08:04:36 2018 From: report at bugs.python.org (Sebastian Rittau) Date: Sun, 28 Oct 2018 12:04:36 +0000 Subject: [issue35089] Remove typing.io and typing.re from documentation In-Reply-To: <1540726823.63.0.788709270274.issue35089@psf.upfronthosting.co.za> Message-ID: <1540728276.95.0.788709270274.issue35089@psf.upfronthosting.co.za> Change by Sebastian Rittau : ---------- keywords: +patch pull_requests: +9496 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 08:13:54 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 28 Oct 2018 12:13:54 +0000 Subject: [issue35090] bz2: Potential division by zero in BZ2_Malloc() Message-ID: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> New submission from Alexey Izbyshev : BZ2_Malloc() checks for size < 0 at https://github.com/python/cpython/blob/6015cc50bc38b9e920ce4986ee10658eaa14f561/Modules/_bz2module.c#L278 , but doesn't check for size == 0 before dividing by it: if (items < 0 || size < 0) return NULL; if ((size_t)items > (size_t)PY_SSIZE_T_MAX / (size_t)size) return NULL; Reported by Svace static analyzer. ---------- components: Extension Modules messages: 328686 nosy: berker.peksag, izbyshev, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: bz2: Potential division by zero in BZ2_Malloc() type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 08:16:57 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 28 Oct 2018 12:16:57 +0000 Subject: [issue35090] bz2: Potential division by zero in BZ2_Malloc() In-Reply-To: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> Message-ID: <1540729017.95.0.788709270274.issue35090@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- keywords: +patch pull_requests: +9497 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 08:57:35 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 28 Oct 2018 12:57:35 +0000 Subject: [issue35083] Fix documentation for __instancecheck__ In-Reply-To: <1540671281.62.0.788709270274.issue35083@psf.upfronthosting.co.za> Message-ID: <1540731455.14.0.788709270274.issue35083@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: python-ideas thread for the issue : https://mail.python.org/pipermail/python-ideas/2018-October/054335.html ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 09:40:23 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 28 Oct 2018 13:40:23 +0000 Subject: [issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow Message-ID: <1540734023.23.0.788709270274.issue35091@psf.upfronthosting.co.za> New submission from Alexey Izbyshev : gallop_left() and gallop_right() functions explicitly rely on overflowing behavior of Py_ssize_t (https://github.com/python/cpython/blob/6015cc50bc38b9e920ce4986ee10658eaa14f561/Objects/listobject.c#L1361): ofs = (ofs << 1) + 1; if (ofs <= 0) /* int overflow */ ofs = maxofs; Signed integer overflow is undefined in C, and the above is guaranteed to work only if compiler-specific workarounds are applied, such as GCC's -fwrapv (that is what CPython does). Without such workarounds the compiler would be free to remove the if statement. ---------- components: Interpreter Core messages: 328688 nosy: berker.peksag, izbyshev, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: Objects/listobject.c: gallop functions rely on signed integer overflow type: behavior versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 09:42:48 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 28 Oct 2018 13:42:48 +0000 Subject: [issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow In-Reply-To: <1540734023.23.0.788709270274.issue35091@psf.upfronthosting.co.za> Message-ID: <1540734168.08.0.788709270274.issue35091@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- keywords: +patch pull_requests: +9498 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 10:47:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2018 14:47:32 +0000 Subject: [issue35089] Remove typing.io and typing.re from documentation In-Reply-To: <1540726823.63.0.788709270274.issue35089@psf.upfronthosting.co.za> Message-ID: <1540738052.49.0.788709270274.issue35089@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +gvanrossum, levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 11:02:21 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Oct 2018 15:02:21 +0000 Subject: [issue35064] COUNT_ALLOCS build export inc_count() and dec_count() functions which don't have a "Py_" prefix In-Reply-To: <1540462435.94.0.788709270274.issue35064@psf.upfronthosting.co.za> Message-ID: <1540738941.6.0.788709270274.issue35064@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset 49c75a8086c3df9add0779d2479b8f09b95cdf3b by Pablo Galindo in branch 'master': bpo-35064 prefix smelly symbols that appear with COUNT_ALLOCS with _Py_ (GH-10152) https://github.com/python/cpython/commit/49c75a8086c3df9add0779d2479b8f09b95cdf3b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 11:02:41 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Oct 2018 15:02:41 +0000 Subject: [issue35064] COUNT_ALLOCS build export inc_count() and dec_count() functions which don't have a "Py_" prefix In-Reply-To: <1540462435.94.0.788709270274.issue35064@psf.upfronthosting.co.za> Message-ID: <1540738961.5.0.788709270274.issue35064@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 11:08:18 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Oct 2018 15:08:18 +0000 Subject: [issue35092] test_socket fails in MacOS High Sierra when running with -Werror Message-ID: <1540739298.61.0.788709270274.issue35092@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : .... ====================================================================== ERROR: testCmsgTruncLen0Plus1 (test.test_socket.RecvmsgIntoSCMRightsStreamTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/pgalindo3/github/cpython/Lib/test/test_socket.py", line 3387, in testCmsgTruncLen0Plus1 self.checkTruncatedArray(ancbuf=socket.CMSG_LEN(0) + 1, maxdata=1) File "/Users/pgalindo3/github/cpython/Lib/test/test_socket.py", line 3362, in checkTruncatedArray len(MSG), ancbuf) File "/Users/pgalindo3/github/cpython/Lib/test/test_socket.py", line 2436, in doRecvmsg result = sock.recvmsg_into([buf], *args) RuntimeWarning: received malformed or improperly-truncated ancillary data ====================================================================== ERROR: testCmsgTruncLen1 (test.test_socket.RecvmsgIntoSCMRightsStreamTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/pgalindo3/github/cpython/Lib/test/test_socket.py", line 3394, in testCmsgTruncLen1 maxdata=SIZEOF_INT) File "/Users/pgalindo3/github/cpython/Lib/test/test_socket.py", line 3362, in checkTruncatedArray len(MSG), ancbuf) File "/Users/pgalindo3/github/cpython/Lib/test/test_socket.py", line 2436, in doRecvmsg result = sock.recvmsg_into([buf], *args) RuntimeWarning: received malformed or improperly-truncated ancillary data ====================================================================== ERROR: testCmsgTruncLen2Minus1 (test.test_socket.RecvmsgIntoSCMRightsStreamTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/pgalindo3/github/cpython/Lib/test/test_socket.py", line 3401, in testCmsgTruncLen2Minus1 maxdata=(2 * SIZEOF_INT) - 1) File "/Users/pgalindo3/github/cpython/Lib/test/test_socket.py", line 3362, in checkTruncatedArray len(MSG), ancbuf) File "/Users/pgalindo3/github/cpython/Lib/test/test_socket.py", line 2436, in doRecvmsg result = sock.recvmsg_into([buf], *args) RuntimeWarning: received malformed or improperly-truncated ancillary data ---------------------------------------------------------------------- Ran 555 tests in 24.708s FAILED (errors=8, skipped=142) test test_socket failed test_socket failed 1 test failed: test_socket Total duration: 25 sec Tests result: FAILURE ---------- components: macOS messages: 328690 nosy: ned.deily, pablogsal, ronaldoussoren priority: normal severity: normal status: open title: test_socket fails in MacOS High Sierra when running with -Werror versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 11:08:41 2018 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 28 Oct 2018 15:08:41 +0000 Subject: [issue32892] Remove specific constant AST types in favor of ast.Constant In-Reply-To: <1519204597.27.0.467229070634.issue32892@psf.upfronthosting.co.za> Message-ID: <1540739321.46.0.788709270274.issue32892@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 11:16:34 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 28 Oct 2018 15:16:34 +0000 Subject: [issue35092] test_socket fails in MacOS High Sierra when running with -Werror In-Reply-To: <1540739298.61.0.788709270274.issue35092@psf.upfronthosting.co.za> Message-ID: <1540739794.66.0.788709270274.issue35092@psf.upfronthosting.co.za> Ned Deily added the comment: This is a longstanding minor issue as described in Issue23828. A twist here is that running with -Werror causes a test failure where normally there is just a warning. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_socket testCmsgTruncLen0 gets "received malformed or improperly-truncated ancillary data" warning under OS X _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 11:17:33 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 28 Oct 2018 15:17:33 +0000 Subject: [issue23828] test_socket testCmsgTruncLen0 gets "received malformed or improperly-truncated ancillary data" warning under OS X In-Reply-To: <1427820936.86.0.258398348531.issue23828@psf.upfronthosting.co.za> Message-ID: <1540739853.71.0.788709270274.issue23828@psf.upfronthosting.co.za> Ned Deily added the comment: Duplicate Issue35092 notes that running the tests with -Werror turns these warnings into test failures. ---------- components: +macOS nosy: +ronaldoussoren versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 11:31:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 15:31:18 +0000 Subject: [issue35090] bz2: Potential division by zero in BZ2_Malloc() In-Reply-To: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> Message-ID: <1540740678.34.0.788709270274.issue35090@psf.upfronthosting.co.za> STINNER Victor added the comment: Check other wrappers to memory allocators: * zlib: "zst.zalloc = PyZlib_Malloc" which calls PyMem_RawMalloc * _lzma: "self->alloc.alloc = PyLzma_Malloc" which calls PyMem_RawMalloc * _bz2: "bzalloc = BZ2_Malloc" which calls PyMem_RawMalloc() https://bugs.python.org/issue35056#msg328533 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 11:32:55 2018 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 28 Oct 2018 15:32:55 +0000 Subject: [issue34672] '%Z' strftime specifier never works with musl In-Reply-To: <1536897689.03.0.956365154283.issue34672@psf.upfronthosting.co.za> Message-ID: <1540740775.62.0.788709270274.issue34672@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- pull_requests: +9499 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 11:45:04 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Oct 2018 15:45:04 +0000 Subject: [issue35092] test_socket fails in MacOS High Sierra when running with -Werror In-Reply-To: <1540739298.61.0.788709270274.issue35092@psf.upfronthosting.co.za> Message-ID: <1540741504.79.0.788709270274.issue35092@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Thank you very much for the quick response, @Ned! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 11:46:07 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Oct 2018 15:46:07 +0000 Subject: [issue23828] test_socket testCmsgTruncLen0 gets "received malformed or improperly-truncated ancillary data" warning under OS X In-Reply-To: <1427820936.86.0.258398348531.issue23828@psf.upfronthosting.co.za> Message-ID: <1540741567.76.0.788709270274.issue23828@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 11:58:46 2018 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 28 Oct 2018 15:58:46 +0000 Subject: [issue34672] '%Z' strftime specifier never works with musl In-Reply-To: <1536897689.03.0.956365154283.issue34672@psf.upfronthosting.co.za> Message-ID: <1540742326.26.0.788709270274.issue34672@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 163eca34c48f1b25e1504e37f4656773fd0fdc78 by Xiang Zhang in branch 'master': bpo-34672: fix a compiler warning in timemodule.c (GH-10176) https://github.com/python/cpython/commit/163eca34c48f1b25e1504e37f4656773fd0fdc78 ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:03:33 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 28 Oct 2018 16:03:33 +0000 Subject: [issue35089] Remove typing.io and typing.re from documentation In-Reply-To: <1540726823.63.0.788709270274.issue35089@psf.upfronthosting.co.za> Message-ID: <1540742613.36.0.788709270274.issue35089@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: New changeset c8a8d6b347d5a6899feb7c810d28f22f3cb151b8 by Ivan Levkivskyi (Sebastian Rittau) in branch 'master': bpo-35089: Don't mention typing.io and typing.re (GH-10173) https://github.com/python/cpython/commit/c8a8d6b347d5a6899feb7c810d28f22f3cb151b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:03:45 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 16:03:45 +0000 Subject: [issue35089] Remove typing.io and typing.re from documentation In-Reply-To: <1540726823.63.0.788709270274.issue35089@psf.upfronthosting.co.za> Message-ID: <1540742625.79.0.788709270274.issue35089@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9500 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:03:57 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 16:03:57 +0000 Subject: [issue35089] Remove typing.io and typing.re from documentation In-Reply-To: <1540726823.63.0.788709270274.issue35089@psf.upfronthosting.co.za> Message-ID: <1540742637.52.0.788709270274.issue35089@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9501 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:04:59 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 28 Oct 2018 16:04:59 +0000 Subject: [issue35090] bz2: Potential division by zero in BZ2_Malloc() In-Reply-To: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> Message-ID: <1540742699.9.0.788709270274.issue35090@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: May be we should add a new function (_PyMem_RawMallocItems?) that does the same checks as PyMem_RawCalloc, but doesn't zero-initialize memory? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:07:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 16:07:47 +0000 Subject: [issue35090] bz2: Potential division by zero in BZ2_Malloc() In-Reply-To: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> Message-ID: <1540742867.31.0.788709270274.issue35090@psf.upfronthosting.co.za> STINNER Victor added the comment: > May be we should add a new function (_PyMem_RawMallocItems?) that does the same checks as PyMem_RawCalloc, but doesn't zero-initialize memory? Please don't add new functions to the Python memory allocators. We already have too many of them :-( https://docs.python.org/dev/c-api/memory.html PyZlib_Malloc, PyLzma_Malloc and BZ2_Malloc exists because they use different types: 2 unsigned int (zlib), 2 size_t (lzma), 2 int (bz2). PyMem_RawMalloc() expects a single size_t. IMHO it's fine to have a function of 5 lines of code in each module, since each module uses a different C type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:13:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2018 16:13:09 +0000 Subject: =?utf-8?q?=5Bissue34963=5D_String_representation_for_types_created_with_t?= =?utf-8?q?yping=2ENewType=28=E2=80=A6=29_are_opaque_and_unappealing?= In-Reply-To: <1539313395.67.0.788709270274.issue34963@psf.upfronthosting.co.za> Message-ID: <1540743189.83.0.788709270274.issue34963@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 9951 is simpler, but it makes invoking NewType() slower, because retrieving the module from the caller frame is slow in comparison with other operations. $ ./python -m timeit -s "import typing" -- "UserId = typing.NewType('UserId', int)" PR 9808: 1000000 loops, best of 5: 316 nsec per loop PR 9951: 500000 loops, best of 5: 634 nsec per loop PR 9951 without setting __module__ and stripping components before dot in __name__: 1000000 loops, best of 5: 316 nsec per loop In contrary, calling the resulting type is slower with PR 9808: $ ./python -m timeit -s "import typing" -s "UserId = typing.NewType('UserId', int)" -- "UserId(5)" PR 9808: 2000000 loops, best of 5: 105 nsec per loop PR 9951: 5000000 loops, best of 5: 74.1 nsec per loop What other operations should be supported? Should the NewType() result be pickleable? Currently it is not, in contrary to other typing types. If it should be pickleable, should it be pickled by name (resulting in restoring the same instance on unpickling, but failing if it is not accessible by name) or by its arguments (resulting in creating a new instance when unpickled)? Should it support comparison and what values should be treated as equal? If make NewType a class, I would make the repr looking like a call: >>> import typing >>> UserId = typing.NewType('UserId', int) >>> UserId NewType('UserId', ) >>> UserNames = typing.NewType('UserNames', typing.List[int]) >>> UserNames NewType('UserNames', typing.List[int]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:16:40 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 16:16:40 +0000 Subject: [issue35089] Remove typing.io and typing.re from documentation In-Reply-To: <1540726823.63.0.788709270274.issue35089@psf.upfronthosting.co.za> Message-ID: <1540743400.4.0.788709270274.issue35089@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c516dc6e57341f24d2494514c650f4a240c1c95f by Miss Islington (bot) in branch '3.7': bpo-35089: Don't mention typing.io and typing.re (GH-10173) https://github.com/python/cpython/commit/c516dc6e57341f24d2494514c650f4a240c1c95f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:17:11 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 16:17:11 +0000 Subject: [issue35089] Remove typing.io and typing.re from documentation In-Reply-To: <1540726823.63.0.788709270274.issue35089@psf.upfronthosting.co.za> Message-ID: <1540743431.01.0.788709270274.issue35089@psf.upfronthosting.co.za> miss-islington added the comment: New changeset a36f04cedbbbe776deb478114c1bc0e4a6fe9380 by Miss Islington (bot) in branch '3.6': bpo-35089: Don't mention typing.io and typing.re (GH-10173) https://github.com/python/cpython/commit/a36f04cedbbbe776deb478114c1bc0e4a6fe9380 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:24:23 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 28 Oct 2018 16:24:23 +0000 Subject: [issue35090] Potential division by zero and integer overflow in allocator wrappers In-Reply-To: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> Message-ID: <1540743863.56.0.788709270274.issue35090@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- title: bz2: Potential division by zero in BZ2_Malloc() -> Potential division by zero and integer overflow in allocator wrappers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:43:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2018 16:43:35 +0000 Subject: [issue35054] Add more index entries for symbols In-Reply-To: <1540316703.62.0.788709270274.issue35054@psf.upfronthosting.co.za> Message-ID: <1540745015.87.0.788709270274.issue35054@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset fdf48b6b88f44a3ae6dc3e5eaea40c226c7df6c7 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-35054: Add yet more index entries for symbols. (GH-10121) (GH-10171) https://github.com/python/cpython/commit/fdf48b6b88f44a3ae6dc3e5eaea40c226c7df6c7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:44:48 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 16:44:48 +0000 Subject: [issue1529353] Squeezer - squeeze large output in IDLE's shell Message-ID: <1540745088.81.0.788709270274.issue1529353@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 68d6dc0770288075504635a8e42696070823fd69 by Terry Jan Reedy in branch 'master': bpo-1529353: Explain Shell text squeezing in the IDLE doc. (#10169) https://github.com/python/cpython/commit/68d6dc0770288075504635a8e42696070823fd69 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:45:00 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 16:45:00 +0000 Subject: [issue1529353] Squeezer - squeeze large output in IDLE's shell Message-ID: <1540745100.28.0.788709270274.issue1529353@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9502 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:45:15 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 16:45:15 +0000 Subject: [issue1529353] Squeezer - squeeze large output in IDLE's shell Message-ID: <1540745115.42.0.788709270274.issue1529353@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9503 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:45:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 16:45:54 +0000 Subject: [issue35090] Potential division by zero and integer overflow in allocator wrappers In-Reply-To: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> Message-ID: <1540745154.3.0.788709270274.issue35090@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3d4fabb2a424cb04ae446ebe4428090c386f45a5 by Victor Stinner (Alexey Izbyshev) in branch 'master': bpo-35090: Fix potential division by zero in allocator wrappers (GH-10174) https://github.com/python/cpython/commit/3d4fabb2a424cb04ae446ebe4428090c386f45a5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:47:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 16:47:05 +0000 Subject: [issue35090] Potential division by zero and integer overflow in allocator wrappers In-Reply-To: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> Message-ID: <1540745225.24.0.788709270274.issue35090@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't want to backport this change. IMHO these wrappers are never called with 0. Otherwise, I'm sure that someone would report the crash... But I applied the change anyway, just to avoid future reports of static analyzers :-) And the cast doesn't hurt :-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:50:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2018 16:50:30 +0000 Subject: [issue34794] Memory leak in Tkinter In-Reply-To: <1537824612.19.0.545547206417.issue34794@psf.upfronthosting.co.za> Message-ID: <1540745430.63.0.788709270274.issue34794@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9504 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:50:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2018 16:50:41 +0000 Subject: [issue35054] Add more index entries for symbols In-Reply-To: <1540316703.62.0.788709270274.issue35054@psf.upfronthosting.co.za> Message-ID: <1540745441.6.0.788709270274.issue35054@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9505 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:51:23 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 28 Oct 2018 16:51:23 +0000 Subject: [issue35090] Potential division by zero and integer overflow in allocator wrappers In-Reply-To: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> Message-ID: <1540745483.04.0.788709270274.issue35090@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: Thanks, Victor. Regarding backporting, what about integer overflow? Do you think it's guaranteed that the multiple of items and size always fits in 32-bit types, in case of BZ2_Malloc and PyZlib_Malloc? ---------- resolution: fixed -> status: closed -> open versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:51:55 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 28 Oct 2018 16:51:55 +0000 Subject: =?utf-8?q?=5Bissue34963=5D_String_representation_for_types_created_with_t?= =?utf-8?q?yping=2ENewType=28=E2=80=A6=29_are_opaque_and_unappealing?= In-Reply-To: <1539313395.67.0.788709270274.issue34963@psf.upfronthosting.co.za> Message-ID: <1540745515.8.0.788709270274.issue34963@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Serhiy, thanks for benchmarks and good suggestions! > If make NewType a class, I would make the repr looking like a call This is a nice idea, it indeed looks better. We can probably also use `_type_repr()` helper for the argument (for consistency). > Should the NewType() result be pickleable? This is not required by PEP 484, but I could imagine this may be useful. > If it should be pickleable, should it be pickled by name (resulting in restoring the same instance on unpickling, but failing if it is not accessible by name) or by its arguments (resulting in creating a new instance when unpickled)? Logically, they should behave like class objects, so if we are going to make them pickleable, they should be pickled by full name. > Should it support comparison and what values should be treated as equal? Again, since they should behave like class objects, I think we don't need any dedicated `__eq__`, they should be just compared by identity. >From performance point of view, both PRs look good. Maybe we can even combine both, so that we have both fine-tuned repr and pickleability. I understand this means we will get slower benchmarks for both creation and instantiation, but I think it is still OK, since it is still much faster than creating a new class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:51:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2018 16:51:58 +0000 Subject: [issue35054] Add more index entries for symbols In-Reply-To: <1540316703.62.0.788709270274.issue35054@psf.upfronthosting.co.za> Message-ID: <1540745518.6.0.788709270274.issue35054@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:53:04 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 28 Oct 2018 16:53:04 +0000 Subject: [issue35090] Potential division by zero and integer overflow in allocator wrappers In-Reply-To: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> Message-ID: <1540745584.68.0.788709270274.issue35090@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: Sorry for changing the status, it's browser caching again. ---------- resolution: -> fixed status: open -> closed versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:57:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2018 16:57:43 +0000 Subject: [issue20216] Misleading docs for sha1, sha256, sha512, md5 modules In-Reply-To: <1389320490.58.0.128009418019.issue20216@psf.upfronthosting.co.za> Message-ID: <1540745863.71.0.788709270274.issue20216@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9506 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 12:57:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 16:57:56 +0000 Subject: [issue35090] Potential division by zero and integer overflow in allocator wrappers In-Reply-To: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> Message-ID: <1540745876.1.0.788709270274.issue35090@psf.upfronthosting.co.za> STINNER Victor added the comment: > Regarding backporting, what about integer overflow? Do you think it's guaranteed that the multiple of items and size always fits in 32-bit types, in case of BZ2_Malloc and PyZlib_Malloc? I don't know. Serhiy: What do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 13:03:23 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 17:03:23 +0000 Subject: [issue1529353] Squeezer - squeeze large output in IDLE's shell Message-ID: <1540746203.21.0.788709270274.issue1529353@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8dccb00c197e7b4f6ce65950a9ed6802fa217094 by Miss Islington (bot) in branch '3.7': bpo-1529353: Explain Shell text squeezing in the IDLE doc. (GH-10169) https://github.com/python/cpython/commit/8dccb00c197e7b4f6ce65950a9ed6802fa217094 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 13:08:26 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 17:08:26 +0000 Subject: [issue1529353] Squeezer - squeeze large output in IDLE's shell Message-ID: <1540746506.35.0.788709270274.issue1529353@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 69ab28d2a616ae0234b6e412a979400523b2a6d9 by Miss Islington (bot) in branch '3.6': bpo-1529353: Explain Shell text squeezing in the IDLE doc. (GH-10169) https://github.com/python/cpython/commit/69ab28d2a616ae0234b6e412a979400523b2a6d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 13:09:29 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 28 Oct 2018 17:09:29 +0000 Subject: [issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow In-Reply-To: <1540734023.23.0.788709270274.issue35091@psf.upfronthosting.co.za> Message-ID: <1540746569.33.0.788709270274.issue35091@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- pull_requests: +9507 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 13:10:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 17:10:06 +0000 Subject: [issue29174] 'NoneType' object is not callable in subprocess.py In-Reply-To: <1483688938.47.0.507597836624.issue29174@psf.upfronthosting.co.za> Message-ID: <1540746606.31.0.788709270274.issue29174@psf.upfronthosting.co.za> STINNER Victor added the comment: This bug is now fixed if I understood correctly. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 13:20:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2018 17:20:34 +0000 Subject: [issue20216] Misleading docs for sha1, sha256, sha512, md5 modules In-Reply-To: <1389320490.58.0.128009418019.issue20216@psf.upfronthosting.co.za> Message-ID: <1540747234.42.0.788709270274.issue20216@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f29bded3d3b0de63b45819eec292f5007c0cd3cf by Serhiy Storchaka in branch '3.6': [3.6] bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873). (GH-10183) https://github.com/python/cpython/commit/f29bded3d3b0de63b45819eec292f5007c0cd3cf ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 13:35:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2018 17:35:36 +0000 Subject: [issue35054] Add more index entries for symbols In-Reply-To: <1540316703.62.0.788709270274.issue35054@psf.upfronthosting.co.za> Message-ID: <1540748136.85.0.788709270274.issue35054@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 5b2e1cfde28cce7f4b9275ec1b3757c561eef94e by Serhiy Storchaka in branch '3.6': [3.6] bpo-35054: Add yet more index entries for symbols. (GH-10121). (GH-10182) https://github.com/python/cpython/commit/5b2e1cfde28cce7f4b9275ec1b3757c561eef94e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 13:36:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2018 17:36:06 +0000 Subject: [issue34794] Memory leak in Tkinter In-Reply-To: <1537824612.19.0.545547206417.issue34794@psf.upfronthosting.co.za> Message-ID: <1540748166.74.0.788709270274.issue34794@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset aaea2802da0a074c695ab86911d8bcc0b2dd5ec5 by Serhiy Storchaka in branch '2.7': [2.7] bpo-34794: Fix a leak in Tkinter. (GH-10025) (GH-10181) https://github.com/python/cpython/commit/aaea2802da0a074c695ab86911d8bcc0b2dd5ec5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 13:38:41 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 28 Oct 2018 17:38:41 +0000 Subject: [issue35089] Remove typing.io and typing.re from documentation In-Reply-To: <1540726823.63.0.788709270274.issue35089@psf.upfronthosting.co.za> Message-ID: <1540748321.16.0.788709270274.issue35089@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 Oct 28 13:46:48 2018 From: report at bugs.python.org (Anthony Sottile) Date: Sun, 28 Oct 2018 17:46:48 +0000 Subject: [issue1154351] add get_current_dir_name() to os module Message-ID: <1540748808.03.0.788709270274.issue1154351@psf.upfronthosting.co.za> Anthony Sottile added the comment: Does this actually make sense for the `os` module? `PWD` is a variable set by your interactive shell and doesn't really make sense outside that context. I expect this function to be too easily confused with `os.getcwd()` and a source of bugs when the latter is desired ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 13:53:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 17:53:12 +0000 Subject: [issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self" In-Reply-To: <1448654213.28.0.807225788685.issue25750@psf.upfronthosting.co.za> Message-ID: <1540749192.91.0.788709270274.issue25750@psf.upfronthosting.co.za> STINNER Victor added the comment: The cast warning is not specific to this issue, it's a more general issue that will be address in bpo-33012. I close again the bug. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 13:55:27 2018 From: report at bugs.python.org (Michael Felt) Date: Sun, 28 Oct 2018 17:55:27 +0000 Subject: [issue28009] core logic of uuid.getnode() is broken for AIX - all versions In-Reply-To: <1473290315.48.0.840701308825.issue28009@psf.upfronthosting.co.za> Message-ID: <1540749327.92.0.788709270274.issue28009@psf.upfronthosting.co.za> Michael Felt added the comment: re; the current status of PR8672 - which I shall probably close as it no longer merges. @taleinat re: the need for lambda As _find_mac_netstat() is only called once the need for the last two arguments may be unnecessary. My reason for including them was to keep _find_mac_netstat comparable to _find_mac. 1) I am reluctant to make changes to historical code, however, in this case it was needed as _find_mac has, imho, a requirement for input that differs from AIX netstat. * On linux (debian, centos) I do not find a MAC address for netstat * On linux, where, e.g., ifconfig does return a value - the lambda i: i?1 is vital as the value follows the keyword on the same line. For AIX lambda I: i is needed because only the first line (header) has keywords, the remaining lines give the values. Linux: ifconfig (keyword "ether") root at x074:~# ifconfig eth0: flags=4163 mtu 1500 inet 192.168.129.74 netmask 255.255.255.0 broadcast 192.168.129.255 inet6 fe80::f8d1:81ff:fe12:b104 prefixlen 64 scopeid 0x20 inet6 2001:981:56fd:1:f8d1:81ff:fe12:b104 prefixlen 64 scopeid 0x0 ether fa:d1:81:12:b1:04 txqueuelen 1000 (Ethernet) RX packets 1605776 bytes 177990366 (169.7 MiB) RX errors 0 dropped 1027921 overruns 0 frame 0 TX packets 25045 bytes 1567902 (1.4 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 20 So, when the keyword is found, as each word on the line is examined "i+1" gives the value For AIX (in anycase), the keyword is Address - the output is: michael at x071:[/data/prj/python/git/python3-3.8]netstat -ia Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll en0 1500 link#2 fa.d1.8c.f7.62.4 2348009992 0 946551098 0 0 01:00:5e:00:00:01 en0 1500 192.168.129 x071 2348009992 0 946551098 0 0 224.0.0.1 en0 1500 192.168.90 x071 2348009992 0 946551098 0 0 224.0.0.1 en1 1500 link#3 fa.d1.8c.f7.62.5 64346336 0 89935059 0 0 01:00:5e:00:00:01 en1 1500 192.168.2 mail.aixtools.xx 64346336 0 89935059 0 0 224.0.0.1 Note - the value with colons - as many (all?) other systems - this seems to be a constant, and a value on a line all by itself - so the old code could never ever find it, even if it could have parsed it. The actual MAC address is on a line with several entries - matching the values given by the "header" line - so lambda i: i is needed to examine the later lines to find a suitably formatted value. So, should I write _find_mac_netstat for AIX only (and maybe set "skipIf" Linux). There are many assumptions in this code. I do not feel qualified to change things I cannot test - so, as much as possible I follow the tried and true. I hope this clarifies my intent well enough that you can make a decision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 13:57:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 17:57:24 +0000 Subject: [issue28009] core logic of uuid.getnode() is broken for AIX - all versions In-Reply-To: <1473290315.48.0.840701308825.issue28009@psf.upfronthosting.co.za> Message-ID: <1540749444.46.0.788709270274.issue28009@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 14:03:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 18:03:06 +0000 Subject: [issue1154351] add get_current_dir_name() to os module Message-ID: <1540749786.24.0.788709270274.issue1154351@psf.upfronthosting.co.za> STINNER Victor added the comment: The glibc has a get_current_dir_name() function which returns the same value that getcwd(), the difference is that get_current_dir_name() allocates memory. If someone wants to add a function using PWD env var, a different function name should be found. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 14:17:54 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Oct 2018 18:17:54 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540750674.91.0.788709270274.issue34160@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Diego, I've taken care of the ElementTree case. Would you like to make a PR for the other occurrences (minidom, html, etc)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 14:18:26 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Oct 2018 18:18:26 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540750706.95.0.788709270274.issue34160@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset e3685fd5fdd8808acda81bfc12fb9702d4b59a60 by Raymond Hettinger in branch 'master': bpo-34160: Preserve user specified order of Element attributes (GH-10163) https://github.com/python/cpython/commit/e3685fd5fdd8808acda81bfc12fb9702d4b59a60 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 14:23:31 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 28 Oct 2018 18:23:31 +0000 Subject: [issue34931] os.path.splitext with more dots In-Reply-To: <1539000361.1.0.545547206417.issue34931@psf.upfronthosting.co.za> Message-ID: <1540751011.63.0.788709270274.issue34931@psf.upfronthosting.co.za> Lysandros Nikolaou added the comment: IMHO this is not a bug. Every file starting with a dot is hidden by default, so this is somewhat correct behaviour. Since it is documented correctly I don't this something needs to change here. Yet again, could someone more experienced offer their opinion as well? ---------- nosy: +lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 14:28:24 2018 From: report at bugs.python.org (Marc Adam Anderson) Date: Sun, 28 Oct 2018 18:28:24 +0000 Subject: [issue1154351] add get_current_dir_name() to os module Message-ID: <1540751304.63.0.788709270274.issue1154351@psf.upfronthosting.co.za> Change by Marc Adam Anderson : ---------- nosy: -marcadam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 14:28:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 18:28:37 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540751317.74.0.788709270274.issue34160@psf.upfronthosting.co.za> STINNER Victor added the comment: Nice enhancement! I was always annoyed by XML libraries in PHP and Python which don't respect the "insertion order". ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 14:40:46 2018 From: report at bugs.python.org (Romain Geissler) Date: Sun, 28 Oct 2018 18:40:46 +0000 Subject: [issue13501] Make libedit support more generic; port readline / libedit to FreeBSD In-Reply-To: <1322579942.3.0.601983912656.issue13501@psf.upfronthosting.co.za> Message-ID: <1540752046.75.0.788709270274.issue13501@psf.upfronthosting.co.za> Romain Geissler added the comment: Hi, Yes this bug report is still valid. I just tried compiling Python 3.7.1 on linux with libedit installed (https://thrysoee.dk/editline/) but not libreadline, and indeed the configure script fails to detect I have it installed and falls back on the python readline emulation. Note: I am using Linux, not Mac OS. Cheers, Romain ---------- nosy: +RomainGeissler1A _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 14:42:09 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 18:42:09 +0000 Subject: [issue35093] IDLE: document the help document viewer Message-ID: <1540752129.6.0.788709270274.issue35093@psf.upfronthosting.co.za> New submission from Terry J. Reedy : Implement issue 33396 item 6: document the IDLE Doc viewer. ---------- assignee: docs at python components: Documentation, IDLE messages: 328725 nosy: docs at python, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: document the help document viewer type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 14:42:46 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 18:42:46 +0000 Subject: [issue35093] IDLE: document the help document viewer In-Reply-To: <1540752129.6.0.788709270274.issue35093@psf.upfronthosting.co.za> Message-ID: <1540752166.01.0.788709270274.issue35093@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- assignee: docs at python -> terry.reedy components: -Documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 14:42:48 2018 From: report at bugs.python.org (Mark Harfouche) Date: Sun, 28 Oct 2018 18:42:48 +0000 Subject: [issue13501] Make libedit support more generic; port readline / libedit to FreeBSD In-Reply-To: <1540752046.75.0.788709270274.issue13501@psf.upfronthosting.co.za> Message-ID: Mark Harfouche added the comment: My workaround has been to use neither readline nor libedit. On Sun, Oct 28, 2018 at 2:40 PM Romain Geissler wrote: > > Romain Geissler added the comment: > > Hi, > > Yes this bug report is still valid. I just tried compiling Python 3.7.1 on > linux with libedit installed (https://thrysoee.dk/editline/) but not > libreadline, and indeed the configure script fails to detect I have it > installed and falls back on the python readline emulation. > > Note: I am using Linux, not Mac OS. > > Cheers, > Romain > > ---------- > nosy: +RomainGeissler1A > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 14:50:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2018 18:50:16 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540752616.11.0.788709270274.issue34160@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9508 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 14:50:52 2018 From: report at bugs.python.org (Romain Geissler) Date: Sun, 28 Oct 2018 18:50:52 +0000 Subject: [issue14956] custom PYTHONPATH may break apps embedding Python In-Reply-To: <1338321412.45.0.331737203349.issue14956@psf.upfronthosting.co.za> Message-ID: <1540752652.48.0.788709270274.issue14956@psf.upfronthosting.co.za> Romain Geissler added the comment: Hi, Just updating this 6 year old bug report. The last comment says it's not possible to ignore environment when using the C-API. I don't know back then, but today it is possible. I have just built gdb 8.2 against python 3.7.1, and patched gdb with this simple patch, which apparently works: --- gdb/python/python.c +++ gdb/python/python.c @@ -1726,6 +1726,9 @@ #endif #endif + // Force using the toolchain python without being troubled by $PYTHONHOME or $PYTHONPATH. + Py_IgnoreEnvironmentFlag = 1; + Py_Initialize (); PyEval_InitThreads (); Cheers, Romain ---------- nosy: +RomainGeissler1A _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 14:56:24 2018 From: report at bugs.python.org (Joannah Nanjekye) Date: Sun, 28 Oct 2018 18:56:24 +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: <1540752984.56.0.788709270274.issue22021@psf.upfronthosting.co.za> Change by Joannah Nanjekye : ---------- pull_requests: +9509 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 15:00:35 2018 From: report at bugs.python.org (Paul Crowley) Date: Sun, 28 Oct 2018 19:00:35 +0000 Subject: [issue35094] Improved algorithms for random.sample Message-ID: <1540753235.51.0.788709270274.issue35094@psf.upfronthosting.co.za> New submission from Paul Crowley : random.sample currently uses either a Fisher-Yates shuffle, or rejection sampling, to achieve sampling without replacement. I propose using reservoir sampling or "cardchoose"; these are similar performance or sometimes faster, and don't need to allocate anything except the list used for the results. ---------- components: Library (Lib) messages: 328728 nosy: ciphergoth priority: normal severity: normal status: open title: Improved algorithms for random.sample type: resource usage versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 15:05:24 2018 From: report at bugs.python.org (Paul Crowley) Date: Sun, 28 Oct 2018 19:05:24 +0000 Subject: [issue35094] Improved algorithms for random.sample In-Reply-To: <1540753235.51.0.788709270274.issue35094@psf.upfronthosting.co.za> Message-ID: <1540753524.8.0.788709270274.issue35094@psf.upfronthosting.co.za> Change by Paul Crowley : ---------- keywords: +patch pull_requests: +9510 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 15:07:55 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Oct 2018 19:07:55 +0000 Subject: [issue35094] Improved algorithms for random.sample In-Reply-To: <1540753235.51.0.788709270274.issue35094@psf.upfronthosting.co.za> Message-ID: <1540753675.33.0.788709270274.issue35094@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +mark.dickinson, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 15:14:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2018 19:14:46 +0000 Subject: [issue34794] Memory leak in Tkinter In-Reply-To: <1537824612.19.0.545547206417.issue34794@psf.upfronthosting.co.za> Message-ID: <1540754086.63.0.788709270274.issue34794@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 15:17:21 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Oct 2018 19:17:21 +0000 Subject: [issue35095] Implement pathlib.Path.append_bytes and pathlib.Path.append_text Message-ID: <1540754241.69.0.788709270274.issue35095@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : Right now we have: Path.read_bytes Path.read_text Path.write_bytes Path.write_text as opening the file, appending something and closing the file is also a very typical operation to do it would be nice to have: Path.append_bytes Path.append_text ---------- components: Library (Lib) messages: 328730 nosy: pablogsal priority: normal severity: normal status: open title: Implement pathlib.Path.append_bytes and pathlib.Path.append_text versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 15:18:12 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Oct 2018 19:18:12 +0000 Subject: [issue35095] Implement pathlib.Path.append_bytes and pathlib.Path.append_text In-Reply-To: <1540754241.69.0.788709270274.issue35095@psf.upfronthosting.co.za> Message-ID: <1540754292.07.0.788709270274.issue35095@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +9512 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 15:43:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Oct 2018 19:43:39 +0000 Subject: [issue35090] Potential division by zero and integer overflow in allocator wrappers In-Reply-To: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> Message-ID: <1540755819.08.0.788709270274.issue35090@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think it is worth to backport. Perhaps it is possible even to create a reproducer for integer overflow, but I afraid it will be too slow for using in tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 15:49:27 2018 From: report at bugs.python.org (TestUser) Date: Sun, 28 Oct 2018 19:49:27 +0000 Subject: [issue35084] binascii.Error: Incorrect padding In-Reply-To: <1540704903.45.0.788709270274.issue35084@psf.upfronthosting.co.za> Message-ID: TestUser added the comment: The file contained the following code: 0x11a3ff119c\xe3\x50\x89\xe2\x53\x89\xe1\xb0\x0b\xcd\x80#%^ciuqrfiqrYWJjMTIzIT8kKiYoKSctPUB- abc123! On Sun, Oct 28, 2018 at 1:35 AM Karthikeyan Singaravelan < report at bugs.python.org> wrote: > > Karthikeyan Singaravelan added the comment: > > Thanks for the report. Can you please attach the file test.code1? Your > original report says "test.code1" is not base64 encoded and -d takes a file > that is base64 encoded and decodes it. Can you please be more descriptive > about what you are expecting? > > ---------- > nosy: +xtreak > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 15:54:05 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Oct 2018 19:54:05 +0000 Subject: [issue35094] Improved algorithms for random.sample In-Reply-To: <1540753235.51.0.788709270274.issue35094@psf.upfronthosting.co.za> Message-ID: <1540756445.24.0.788709270274.issue35094@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, this has been discussed and rejected multiple times. Reservoir sampling makes far too many calls to the underlying random number generator. ---------- assignee: -> rhettinger resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 15:56:11 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Oct 2018 19:56:11 +0000 Subject: [issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow In-Reply-To: <1540734023.23.0.788709270274.issue35091@psf.upfronthosting.co.za> Message-ID: <1540756571.82.0.788709270274.issue35091@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: -> tim.peters nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 15:58:33 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 19:58:33 +0000 Subject: [issue35093] IDLE: document the help document viewer In-Reply-To: <1540752129.6.0.788709270274.issue35093@psf.upfronthosting.co.za> Message-ID: <1540756713.82.0.788709270274.issue35093@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +9513 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:03:10 2018 From: report at bugs.python.org (TestUser) Date: Sun, 28 Oct 2018 20:03:10 +0000 Subject: [issue35085] FileNotFoundError: [Errno 2] No such file or directory: In-Reply-To: <1540705730.91.0.788709270274.issue35085@psf.upfronthosting.co.za> Message-ID: TestUser added the comment: How can that be CLI useful. Lucky I guess as this does not generate a Crash Report. OK. Bad/Missing File would have been my preferred. Then again? Thanks On Sun, Oct 28, 2018 at 1:48 AM Karthikeyan Singaravelan < report at bugs.python.org> wrote: > > Karthikeyan Singaravelan added the comment: > > I can see one another related report issue35084. As @steven.daprano said > this is an expected traceback and it's working correctly. -d expects a > valid base64 encoded file and supplying a non-existent file or file with > invalid encoding is supposed to throw a traceback. > > ---------- > nosy: +xtreak > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:08:11 2018 From: report at bugs.python.org (TestUser) Date: Sun, 28 Oct 2018 20:08:11 +0000 Subject: [issue35084] binascii.Error: Incorrect padding In-Reply-To: Message-ID: TestUser added the comment: FYI: This error generates an Ubuntu Crash Report. Every time I use it on the CLI. I wonder how many of these are generated? On Sun, Oct 28, 2018 at 3:49 PM TestUser wrote: > > TestUser added the comment: > > The file contained the following code: > > 0x11a3ff119c\xe3\x50\x89\xe2\x53\x89\xe1\xb0\x0b\xcd\x80#%^ciuqrfiqrYWJjMTIzIT8kKiYoKSctPUB- > abc123! > > On Sun, Oct 28, 2018 at 1:35 AM Karthikeyan Singaravelan < > report at bugs.python.org> wrote: > > > > > Karthikeyan Singaravelan added the comment: > > > > Thanks for the report. Can you please attach the file test.code1? Your > > original report says "test.code1" is not base64 encoded and -d takes a > file > > that is base64 encoded and decodes it. Can you please be more descriptive > > about what you are expecting? > > > > ---------- > > nosy: +xtreak > > > > _______________________________________ > > Python tracker > > > > _______________________________________ > > > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:09:12 2018 From: report at bugs.python.org (Paul Crowley) Date: Sun, 28 Oct 2018 20:09:12 +0000 Subject: [issue35094] Improved algorithms for random.sample In-Reply-To: <1540753235.51.0.788709270274.issue35094@psf.upfronthosting.co.za> Message-ID: <1540757352.59.0.788709270274.issue35094@psf.upfronthosting.co.za> Paul Crowley added the comment: I would be very grateful for your help finding those dicussions! I've tried this search: https://www.google.com/search?q=python+%22Reservoir+sampling%22+rhettinger and found this discussion: https://mail.python.org/pipermail/python-ideas/2016-April/039708.html but if I've missed any I'm keen to know. In my pull request reservoir sampling is only used if 2k>=n, so it makes at most twice as many random requests as any other algorithm. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:12:29 2018 From: report at bugs.python.org (Romain Geissler) Date: Sun, 28 Oct 2018 20:12:29 +0000 Subject: [issue13501] Make libedit support more generic; port readline / libedit to FreeBSD In-Reply-To: <1322579942.3.0.601983912656.issue13501@psf.upfronthosting.co.za> Message-ID: <1540757549.09.0.788709270274.issue13501@psf.upfronthosting.co.za> Romain Geissler added the comment: Yes in my case the build works, but then I have a resulting python interpreter with limited readline functionality. That's why I have some interest in having this patch rebased and included into trunk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:16:30 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Oct 2018 20:16:30 +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: <1540757790.01.0.788709270274.issue33234@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset 372d705d958964289d762953d0a61622755f5386 by Pablo Galindo in branch 'master': bpo-33234 Improve list() pre-sizing for inputs with known lengths (GH-9846) https://github.com/python/cpython/commit/372d705d958964289d762953d0a61622755f5386 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:27:51 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 20:27:51 +0000 Subject: [issue33396] IDLE: Improve and document help doc viewer In-Reply-To: <1525147664.58.0.682650639539.issue33396@psf.upfronthosting.co.za> Message-ID: <1540758471.06.0.788709270274.issue33396@psf.upfronthosting.co.za> Terry J. Reedy added the comment: #35063 implements item 6, (initially) doc the help viewer. When we improve the help viewer, we should revise the doc at the same time. ---------- dependencies: +Checking for abstractmethod implementation fails to consider MRO for builtins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:28:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 20:28:39 +0000 Subject: [issue35090] Potential division by zero and integer overflow in allocator wrappers In-Reply-To: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> Message-ID: <1540758519.37.0.788709270274.issue35090@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:28:55 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 20:28:55 +0000 Subject: [issue35090] Potential division by zero and integer overflow in allocator wrappers In-Reply-To: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> Message-ID: <1540758535.92.0.788709270274.issue35090@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9514 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:29:03 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 20:29:03 +0000 Subject: [issue35090] Potential division by zero and integer overflow in allocator wrappers In-Reply-To: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> Message-ID: <1540758543.68.0.788709270274.issue35090@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9515 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:30:13 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 20:30:13 +0000 Subject: [issue35093] IDLE: document the help document viewer In-Reply-To: <1540752129.6.0.788709270274.issue35093@psf.upfronthosting.co.za> Message-ID: <1540758613.63.0.788709270274.issue35093@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9516 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:30:49 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 20:30:49 +0000 Subject: [issue35093] IDLE: document the help document viewer In-Reply-To: <1540752129.6.0.788709270274.issue35093@psf.upfronthosting.co.za> Message-ID: <1540758649.22.0.788709270274.issue35093@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9517 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:31:15 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 20:31:15 +0000 Subject: [issue35090] Potential division by zero and integer overflow in allocator wrappers In-Reply-To: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> Message-ID: <1540758675.76.0.788709270274.issue35090@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy: "I think it is worth to backport." Ok. I asked the bot to create 3.6 and 3.7 backports, and I just approved them. I checked: Python 2.7 is not affected. ---------- versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:32:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 20:32:24 +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: <1540758744.8.0.788709270274.issue33234@psf.upfronthosting.co.za> STINNER Victor added the comment: > bpo-33234 Improve list() pre-sizing for inputs with known lengths (GH-9846) Oh. Can you please document the optimization in the following doc as well? https://docs.python.org/dev/whatsnew/3.8.html#optimizations ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:32:48 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 20:32:48 +0000 Subject: [issue33396] IDLE: Improve and document help doc viewer In-Reply-To: <1525147664.58.0.682650639539.issue33396@psf.upfronthosting.co.za> Message-ID: <1540758768.39.0.788709270274.issue33396@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- Removed message: https://bugs.python.org/msg328739 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:33:29 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 20:33:29 +0000 Subject: [issue33396] IDLE: Improve and document help doc viewer In-Reply-To: <1525147664.58.0.682650639539.issue33396@psf.upfronthosting.co.za> Message-ID: <1540758809.06.0.788709270274.issue33396@psf.upfronthosting.co.za> Terry J. Reedy added the comment: #35093 implements item 6, (initially) doc the help viewer. When we improve the help viewer, we should revise the doc at the same time. (I unlinked comment with wrong issue number.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:33:56 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 20:33:56 +0000 Subject: [issue33396] IDLE: Improve and document help doc viewer In-Reply-To: <1525147664.58.0.682650639539.issue33396@psf.upfronthosting.co.za> Message-ID: <1540758836.15.0.788709270274.issue33396@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- dependencies: +IDLE: document the help document viewer -Checking for abstractmethod implementation fails to consider MRO for builtins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:37:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 20:37:14 +0000 Subject: [issue35047] Better error messages in unittest.mock In-Reply-To: <1540283736.06.0.788709270274.issue35047@psf.upfronthosting.co.za> Message-ID: <1540759034.15.0.788709270274.issue35047@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 47d94241a383e2b8a2c40e81d12d40d5947fb170 by Victor Stinner (Petter Strandmark) in branch 'master': bpo-35047, unittest.mock: Better error messages on assert_called_xxx failures (GH-10090) https://github.com/python/cpython/commit/47d94241a383e2b8a2c40e81d12d40d5947fb170 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:40:29 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 20:40:29 +0000 Subject: [issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1 In-Reply-To: <1540218627.92.0.788709270274.issue35045@psf.upfronthosting.co.za> Message-ID: <1540759229.96.0.788709270274.issue35045@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The OP for #35076 emailed me that the distribution is obarun, based on ArchLinux. with LibreSSL not officialy supported, but for the moment a personal work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:42:15 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 20:42:15 +0000 Subject: [issue35047] Better error messages in unittest.mock In-Reply-To: <1540283736.06.0.788709270274.issue35047@psf.upfronthosting.co.za> Message-ID: <1540759335.43.0.788709270274.issue35047@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Petter Strandmark! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:44:38 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 20:44:38 +0000 Subject: [issue35093] IDLE: document the help document viewer In-Reply-To: <1540752129.6.0.788709270274.issue35093@psf.upfronthosting.co.za> Message-ID: <1540759478.49.0.788709270274.issue35093@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 Sun Oct 28 16:45:53 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 28 Oct 2018 20:45:53 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540549099.64.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540759549.1169894.1557528128.58115C4F@webmail.messagingengine.com> Benjamin Peterson added the comment: On Fri, Oct 26, 2018, at 03:18, STINNER Victor wrote: > > STINNER Victor added the comment: > > Benjamin: > > Why do we need this Py_STATIC_INLINE macro? If you want to have one for enabling always inline, that's fine with me, since it's compiler-specific. > > For about the name, there is already Py_LOCAL_INLINE which also uses > "static inline", but has a very different usage: "Py_LOCAL can be used > instead of static to get the fastest possible calling convention for > functions that are local to a given module." So I chise > "Py_STATIC_INLINE" name, it describes the basic implementation ("static > inline TYPE"). I would like to see Py_LOCAL_INLINE removed, too, fwiw. > > Py_STATIC_INLINE() is designed to replace a preprocessor macro with a > function, when you care that the code is "always inlined". (Maybe the > name is not perfect ;-)) "always inline" is different from "static inline". So, it's not appropriate to make a macro named the latter that has the former former. > > Honestly, I'm not sure that it really matters that the function is > "always" inlined. The main issue is that "static" requires to duplicate > the function in each file which uses the macro, when the function > cannot/is not inlined. > > > Previously, you asked me: > > > Does this slow down debug builds at all? It probably will not end will if Py_INCREF is ever not inlined. > > That's why I wrote Py_STATIC_INLINE() to "force" inlining and PR 10094 > to enable inlining for Debug build on MSVC. > > > > But the current Py_STATIC_INLINE macro seems to conflate linkage with always-inline behavior. > > I'm not sure that I get it. Do you talk about "static" inside the macro? > bpo-33407 modifies Py_DEPRECATED() to support Visual Stuido, but it > requires to modify how the macro is used: it now must be used at the > start, rather than at the end: > https://github.com/python/cpython/pull/8980/files > > I chose to put "static" and "inline" in the same macro. We already have > many other similar macros like PyAPI_FUNC(TYPE) and Py_LOCAL(TYPE). I > would like to have a common way to "declare a function behaving as a > macro". We don't want functions that behave like macros... otherwise, we would be writing macros. If we want a function to always be inlined, we should explicitly request that from the compiler. > > > Please see also the discussion on the PR itself, Neil discuss what's the > best way to declare an inline function: > https://github.com/python/cpython/pull/10079#issuecomment-433230587 > > By the way, was it you who required "static inline" support in PEP 7? :-) Yes, which is why we shouldn't need a macro to write it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:47:02 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 20:47:02 +0000 Subject: [issue35090] Potential division by zero and integer overflow in allocator wrappers In-Reply-To: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> Message-ID: <1540759622.47.0.788709270274.issue35090@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 1d7d165e3c3f07518e6b5bfb57f1fd460cd4bbf2 by Miss Islington (bot) in branch '3.7': bpo-35090: Fix potential division by zero in allocator wrappers (GH-10174) https://github.com/python/cpython/commit/1d7d165e3c3f07518e6b5bfb57f1fd460cd4bbf2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:48:53 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Oct 2018 20:48:53 +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: <1540759733.21.0.788709270274.issue33234@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- pull_requests: +9518 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:49:56 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Oct 2018 20:49:56 +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: <1540759796.38.0.788709270274.issue33234@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: >Oh. Can you please document the optimization in the following doc as well? Sure! Opened https://github.com/python/cpython/pull/10200 to address that. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:58:33 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Oct 2018 20:58:33 +0000 Subject: [issue35094] Improved algorithms for random.sample In-Reply-To: <1540753235.51.0.788709270274.issue35094@psf.upfronthosting.co.za> Message-ID: <1540760313.21.0.788709270274.issue35094@psf.upfronthosting.co.za> Raymond Hettinger added the comment: For the common case, where k is small and n is large, reservoir sampling makes n calls rather the current k plus a few reselections -- the only cost is a temporary k-sized set using superfast int hashing. This technique works even for a very large values of n, such as sample(range(1_000_000_000), k=10_000). For the case where k is a large percentage of n, the size of the set becomes noticeable and reselections would become more common (placing a higher load on the underlying RNG and eating its entropy, keep in mind that the underlying RNG can be SystemRandom for example). So, we switch algorithms to a partial shuffle, which has no reselections and uses a temporary list of references to the sampled objects. The places the absolute minimum burden on the underlying RNG and makes the minimum number of data swaps (neither of those virtues can be claimed by reservoir sampling). The only advantage of the reservoir approach is not requiring auxiliary storage. Keep in mind, the temporary list only holds references to the sampled data, so tends to be small relative to that data. It is no more disadvantageous than typical applications of list comprehensions which make new lists while looping over some other iterable. In any case, the algorithms prefer to optimize for fewest calls the the random number generator rather than aspiring to zero auxiliary storage. The randbelow() calls are not superfast, so we don't want to use many of them. Likewise, calls to SystemRandom() eat available entropy, so we don't want to use many of them either. Also, the Random class is designed to be subclassed to allow uses of other RNGs which are likely to have a smaller period that the MersenneTwister so we don't want many calls to them either (it eats their limited state space just like shuffle() exceeds the capabilities of MT with an input size as small as 2081). Lastly, I have a vaguely held concern that reservoir sampling uses the RNG in a way that would magnify any weaknesses in that RNG (by virtues to making more calls and by virtue of using selections in the full range from n-k to n), so we would get lower quality shuffles. FWIW, all of these things were considered when shuffle() was designed, it wasn't like other methods weren't considered. The design we have now was deemed to be the best fit for most of our users, most of time (we've never gotten a complaint about the temporary storage being a problem for any user, ever). I would however expect complaints about an increased number of calls to the user's rngs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 16:59:17 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Oct 2018 20:59:17 +0000 Subject: [issue35090] Potential division by zero and integer overflow in allocator wrappers In-Reply-To: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> Message-ID: <1540760357.71.0.788709270274.issue35090@psf.upfronthosting.co.za> miss-islington added the comment: New changeset fd0a3bce6e917b5853c809a309c1513acc176f56 by Miss Islington (bot) in branch '3.6': bpo-35090: Fix potential division by zero in allocator wrappers (GH-10174) https://github.com/python/cpython/commit/fd0a3bce6e917b5853c809a309c1513acc176f56 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 17:00:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 21:00:22 +0000 Subject: [issue35090] Potential division by zero and integer overflow in allocator wrappers In-Reply-To: <1540728834.21.0.788709270274.issue35090@psf.upfronthosting.co.za> Message-ID: <1540760422.46.0.788709270274.issue35090@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, now we should be good :-) I close again the issue. Note: Serhiy Stochaka considers that no NEWS entry is needed and I concur with him. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 17:01:04 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 28 Oct 2018 21:01:04 +0000 Subject: [issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1 In-Reply-To: <1540218627.92.0.788709270274.issue35045@psf.upfronthosting.co.za> Message-ID: <1540760464.72.0.788709270274.issue35045@psf.upfronthosting.co.za> Christian Heimes added the comment: By the way LibreSSL isn't offically supported by Python, either. It just happens to work most of the time. I regard LibreSSL as not supported, because no core developer or regular contributor has shown any interest to work on LibreSSL support. OpenSSL is used on almost all platforms (most Linux distros, Windows, macOS, FreeBSD) any way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 17:07:43 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Oct 2018 21:07:43 +0000 Subject: [issue35094] Improved algorithms for random.sample In-Reply-To: <1540753235.51.0.788709270274.issue35094@psf.upfronthosting.co.za> Message-ID: <1540760863.25.0.788709270274.issue35094@psf.upfronthosting.co.za> Raymond Hettinger added the comment: One other thought. We don't guarantee that sample() will always produce the same sequences, so that does give us some freedom; however, we have a strong aversion to doing so unless there is a compelling advantage. It will almost certainly cause some disruption for users if their samples stop being reproducible from a given seed. There is some value to the implementation remaining stable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 17:13:04 2018 From: report at bugs.python.org (Tim Peters) Date: Sun, 28 Oct 2018 21:13:04 +0000 Subject: [issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow In-Reply-To: <1540734023.23.0.788709270274.issue35091@psf.upfronthosting.co.za> Message-ID: <1540761184.25.0.788709270274.issue35091@psf.upfronthosting.co.za> Tim Peters added the comment: This doesn't actually matter - the code can never trigger. It would be fine to replace it with an assert to that effect (see below for a specific suggestion). The reason: The indices in this code are into vectors of PyObject*. These vectors can't contain more than floor(PY_SSIZE_T_MAX / sizeof(PyObject*)) pointers (see listobject.c & Python's heap allocation routines). So the largest legit index this code can ever see is 1 less than that. Since pointers are at least 4 bytes on all machines Python runs on, that implies (with room to spare) that assert(ofs <= (PY_SSIZE_T_MAX - 1) / 2); can't fail. Which in turn implies that, mathematically, 2*ofs + 1 <= PY_SSIZE_T_MAX So if (ofs <= 0) /* int overflow */ can't happen, regardless of how the platform C treats signed overflow (signed overflow can't happen to begin with). The existing `while (ofs < maxofs)` check already ensures that `ofs` is a legit index, and _any_ legit index into a PyObject* vector can be doubled and incremented without overflowing Py_ssize_t. In fact, that would remain so even if listobject.c allowed its PyObject* vectors to contain twice as many pointers as they actually can contain now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 17:17:47 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Oct 2018 21:17:47 +0000 Subject: [issue35075] Doc: pprint example uses dead URL In-Reply-To: <1540539643.28.0.788709270274.issue35075@psf.upfronthosting.co.za> Message-ID: <1540761467.06.0.788709270274.issue35075@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +9519 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 17:27:25 2018 From: report at bugs.python.org (Braden Groom) Date: Sun, 28 Oct 2018 21:27:25 +0000 Subject: [issue1154351] add get_current_dir_name() to os module Message-ID: <1540762045.16.0.788709270274.issue1154351@psf.upfronthosting.co.za> Braden Groom added the comment: Victor, FWIW I don't need this functionality and your suggestion on the PR seems reasonable to me. I only picked up this issue as a way to become familiar with contributing to the project. I'm okay with closing both the PR and the ticket. ---------- nosy: +bradengroom _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 17:32:55 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 28 Oct 2018 21:32:55 +0000 Subject: [issue35075] Doc: pprint example uses dead URL In-Reply-To: <1540539643.28.0.788709270274.issue35075@psf.upfronthosting.co.za> Message-ID: <1540762375.47.0.788709270274.issue35075@psf.upfronthosting.co.za> Lysandros Nikolaou added the comment: Also this throws a TypeError, because http_info.get_content_charset() returns None with the new link. I think, this should be fixed as well. ---------- nosy: +lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 17:38:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 21:38:58 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540762738.48.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: > I would like to see Py_LOCAL_INLINE removed, too, fwiw. Oh. Why? Do you want to directly use "static" and "static inline"? I guess that Py_LOCAL and Py_LOCAL_INLINE have been added to use __fastcall with MSVC. ... __fastcall is mostly interesting in x86 (32-bit), but x86-64 calling convention is "fast" by default no? __fastcall pass the first two arguments in registers, but x86-64 already pass the first four arguments in registers... Do you mean that __fastcall is no longer revelant? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 17:41:36 2018 From: report at bugs.python.org (Braden Groom) Date: Sun, 28 Oct 2018 21:41:36 +0000 Subject: [issue35084] binascii.Error: Incorrect padding In-Reply-To: <1540684195.55.0.788709270274.issue35084@psf.upfronthosting.co.za> Message-ID: <1540762896.94.0.788709270274.issue35084@psf.upfronthosting.co.za> Braden Groom added the comment: The file contents that you've provided aren't valid base64. I think the traceback that you've received is a reasonable one. ---------- nosy: +bradengroom _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 17:42:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 21:42:41 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540762961.76.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: >> Py_STATIC_INLINE() is designed to replace a preprocessor macro with a >> function, when you care that the code is "always inlined". (Maybe the >> name is not perfect ;-)) > > "always inline" is different from "static inline". So, it's not appropriate to make a macro named the latter that has the former former. Oh ok. So if we decide to keep it, it should be renamed to Py_STATIC_ALMOST_ALWAYS_INLINE() or something like that :-) > We don't want functions that behave like macros... otherwise, we would be writing macros. If we want a function to always be inlined, we should explicitly request that from the compiler. Oh. It seems like I misunderstood you. I understood that you required to have zero impact on performance on debug build. *I* want to use functions because it's the regular C language: regular scope rules, no preprocessor magic, the compiler detects errors if the function is misused, etc. But I'm not sure about the drawbacks of converting a macro to a function. I don't want to be the only one responsible to regressions :-) If you support the change, we can drop "__attribute__((always_inline))" and use "regular" "static inline" functions :-) >> By the way, was it you who required "static inline" support in PEP 7? :-) > > Yes, which is why we shouldn't need a macro to write it. Ok ok. I updated my PR 10079 to simply use "static inline". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 17:44:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Oct 2018 21:44:32 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540763072.75.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: If my PR 10079 is merged without Py_STATIC_INLINE(), I will remove the macro. I'm not sure if we need an "always inline" macro or not. Note: I'm in favor of moving closer to the C language and not abusing __attribute__(...) :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 17:49:24 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 28 Oct 2018 21:49:24 +0000 Subject: [issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow In-Reply-To: <1540734023.23.0.788709270274.issue35091@psf.upfronthosting.co.za> Message-ID: <1540763364.57.0.788709270274.issue35091@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- pull_requests: +9520 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 17:50:11 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 28 Oct 2018 21:50:11 +0000 Subject: [issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow In-Reply-To: <1540734023.23.0.788709270274.issue35091@psf.upfronthosting.co.za> Message-ID: <1540763411.97.0.788709270274.issue35091@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: > This doesn't actually matter - the code can never trigger. Yes, I considered this, and wondered why assert wasn't used in the first place, but the explicit check with a comment suggested that possibility of overflow was deemed real. I've submitted a third PR that simply removes the checks and adds asserts instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 18:03:22 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Oct 2018 22:03:22 +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: <1540764202.49.0.788709270274.issue33234@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset c61e229d2a4c54ffb4153e1f0f48126ba33c9cbf by Pablo Galindo in branch 'master': bpo-33234: Add exact allocation optimization to lists in What's New (GH-10200) https://github.com/python/cpython/commit/c61e229d2a4c54ffb4153e1f0f48126ba33c9cbf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 18:03:37 2018 From: report at bugs.python.org (Diego Rojas) Date: Sun, 28 Oct 2018 22:03:37 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540764217.75.0.788709270274.issue34160@psf.upfronthosting.co.za> Diego Rojas added the comment: Raymond, sure. I could do the rest, I'll start tomorrow Monday. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 18:13:42 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 28 Oct 2018 22:13:42 +0000 Subject: [issue32804] urllib.retrieve documentation doesn't mention context parameter In-Reply-To: <1518140001.56.0.467229070634.issue32804@psf.upfronthosting.co.za> Message-ID: <1540764822.13.0.788709270274.issue32804@psf.upfronthosting.co.za> Change by Lysandros Nikolaou : ---------- keywords: +patch pull_requests: +9521 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 18:15:38 2018 From: report at bugs.python.org (Paul Crowley) Date: Sun, 28 Oct 2018 22:15:38 +0000 Subject: [issue35094] Improved algorithms for random.sample In-Reply-To: <1540753235.51.0.788709270274.issue35094@psf.upfronthosting.co.za> Message-ID: <1540764938.53.0.788709270274.issue35094@psf.upfronthosting.co.za> Paul Crowley added the comment: Thank you for a very comprehensive and helpful answer! Yep, reservoir sampling makes n calls not k calls, and so should only be used when k is a large fraction of n; in my patch it's k/n >= 1/2. Because modern CPRNGs are so fast, I had been assuming that overall runtime, rather than calls to the RNG; I'll have to bear that in mind here, though in general "use a secure seed to whatever secure RNG is fastest" is the right strategy. I don't think hedging against the quality of the RNG is the right thing to do here. I don't mean to suggest you didn't think about this problem hard! It's just that I've been obsessing about this problem for the last few weeks for some reason (see my repo) so I thought I might be able to help. Thanks again for you reply! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 18:21:09 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 28 Oct 2018 22:21:09 +0000 Subject: [issue35085] FileNotFoundError: [Errno 2] No such file or directory: In-Reply-To: <1540685216.33.0.788709270274.issue35085@psf.upfronthosting.co.za> Message-ID: <1540765269.68.0.788709270274.issue35085@psf.upfronthosting.co.za> Change by Steven D'Aprano : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 18:24:21 2018 From: report at bugs.python.org (TestUser) Date: Sun, 28 Oct 2018 22:24:21 +0000 Subject: [issue35084] binascii.Error: Incorrect padding In-Reply-To: <1540762896.94.0.788709270274.issue35084@psf.upfronthosting.co.za> Message-ID: TestUser added the comment: Thanks. The Python Foundation asked for users to report bugs. I've done so. I'm looking at putting this in an article and Tweets on the bug process: generating bugs, reporting, and resolution. If I go forward I would like a thought or two from you on this bug process. Thanks On Sun, Oct 28, 2018, 5:41 PM Braden Groom wrote: > > Braden Groom added the comment: > > The file contents that you've provided aren't valid base64. I think the > traceback that you've received is a reasonable one. > > ---------- > nosy: +bradengroom > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 18:24:59 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 28 Oct 2018 22:24:59 +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: <1540765499.51.0.788709270274.issue30410@psf.upfronthosting.co.za> Lysandros Nikolaou added the comment: Shall I create a PR for this? ---------- nosy: +lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 18:56:11 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Oct 2018 22:56:11 +0000 Subject: [issue34945] regression with ./python -m test and pdb In-Reply-To: <1539094779.54.0.545547206417.issue34945@psf.upfronthosting.co.za> Message-ID: <1540767371.4.0.788709270274.issue34945@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +9522 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 19:01:11 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 28 Oct 2018 23:01:11 +0000 Subject: [issue21263] test_gdb failures on os x 10.9.2 In-Reply-To: <1397674257.45.0.239061101467.issue21263@psf.upfronthosting.co.za> Message-ID: <1540767671.4.0.788709270274.issue21263@psf.upfronthosting.co.za> Lysandros Nikolaou added the comment: I am trying to create a PR for this and was thinking of somehow updating test.support, in order for someone to be able to find out what compiler was used to build python. Would that make sense? Also, in case this is indeed something we'd like in test.support, what would be the correct sysconfig variables to read, in order to find that out? ---------- nosy: +lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 19:02:48 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Oct 2018 23:02:48 +0000 Subject: [issue25219] Update doc for Idle command line options. In-Reply-To: <1442990084.65.0.133912466016.issue25219@psf.upfronthosting.co.za> Message-ID: <1540767768.85.0.788709270274.issue25219@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I should have said what mismatch there might be. It appears that further editing of idle.rst depends on checking whether there are errors in pyshell.usage_msg, which should be fixed first. ---------- versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 19:19:55 2018 From: report at bugs.python.org (Braden Groom) Date: Sun, 28 Oct 2018 23:19:55 +0000 Subject: [issue16516] argparse types (and actions) must be hashable In-Reply-To: <1353468507.9.0.0965555550975.issue16516@psf.upfronthosting.co.za> Message-ID: <1540768795.19.0.788709270274.issue16516@psf.upfronthosting.co.za> Change by Braden Groom : ---------- pull_requests: +9523 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 19:49:09 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 28 Oct 2018 23:49:09 +0000 Subject: [issue35096] Change _PY_VERSION to derive from sys.version_info in sysconfig Message-ID: <1540770549.89.0.788709270274.issue35096@psf.upfronthosting.co.za> New submission from Lysandros Nikolaou : In sysconfig.py there is a comment starting with FIXME that states that _PY_VERSION should get its value from sys.version_info instead of sys.version, because it is an implementation detail. Should this be changed? If so, I would like to create a PR. ---------- messages: 328769 nosy: lys.nikolaou priority: normal severity: normal status: open title: Change _PY_VERSION to derive from sys.version_info in sysconfig versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 19:57:18 2018 From: report at bugs.python.org (Mark Harfouche) Date: Sun, 28 Oct 2018 23:57:18 +0000 Subject: [issue13501] Make libedit support more generic; port readline / libedit to FreeBSD In-Reply-To: <1540757549.09.0.788709270274.issue13501@psf.upfronthosting.co.za> Message-ID: Mark Harfouche added the comment: Right, but when do you actually use the bare python interpreter? I'm always on ipython or something that uses that as the backend. On Sun, Oct 28, 2018 at 4:12 PM Romain Geissler wrote: > > Romain Geissler added the comment: > > Yes in my case the build works, but then I have a resulting python > interpreter with limited readline functionality. That's why I have some > interest in having this patch rebased and included into trunk. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 19:59:40 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Oct 2018 23:59:40 +0000 Subject: [issue35096] Change _PY_VERSION to derive from sys.version_info in sysconfig In-Reply-To: <1540770549.89.0.788709270274.issue35096@psf.upfronthosting.co.za> Message-ID: <1540771180.59.0.788709270274.issue35096@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 20:02:38 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Oct 2018 00:02:38 +0000 Subject: [issue35097] IDLE add doc subsection for editor windows Message-ID: <1540771358.38.0.788709270274.issue35097@psf.upfronthosting.co.za> New submission from Terry J. Reedy : Briefly explain opening a file, running code, and the title and status bars. ---------- assignee: terry.reedy components: IDLE messages: 328771 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE add doc subsection for editor windows type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 20:13:44 2018 From: report at bugs.python.org (Tim Peters) Date: Mon, 29 Oct 2018 00:13:44 +0000 Subject: [issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow In-Reply-To: <1540734023.23.0.788709270274.issue35091@psf.upfronthosting.co.za> Message-ID: <1540772024.52.0.788709270274.issue35091@psf.upfronthosting.co.za> Tim Peters added the comment: I left the code in because it was harmless (a 100%-predictable branch), and it was easier to show that overflow was _considered_ than to explain in full why it was impossible. In the context of CPython. For example, the Java port of this code couldn't rely on the far-removed-from-this-code details of Python's C heap management (the largest Java signed integer is a legit Java array index), and signed integer overflow _is_ wholly defined in Java. Which happens to be the same way it worked under virtually all C compilers at the time the code was written. The idea that C compilers should be as aggressive as Fortran compilers instead of just supplying a portable assembly language is a modern conceit ;-) The code is useless, but it's not "a bug", so I'm removing Python 2 from the list of targets. ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 20:16:25 2018 From: report at bugs.python.org (Joy Diamond) Date: Mon, 29 Oct 2018 00:16:25 +0000 Subject: [issue35098] Deleting __new__ does not restore previous behavior Message-ID: <1540772185.07.0.788709270274.issue35098@psf.upfronthosting.co.za> New submission from Joy Diamond : Related: https://bugs.python.org/issue5322 Consider the following program: class Color(object): __slots__ = (('name',)) def __init__(self, name): self.name = name green = Color('green') # Works assert green.name == 'green' Color.__new__ = 0 del Color.__new__ red = Color('red') # Fails in Python 3; works in Python 2 & pypy assert red.name == 'red' This works in Python 2, pypy, but fails in Python 3 as follows: Traceback (most recent call last): File "x.py", line 13, in red = Color('red') # Fails in Python 3; works in Python 2 & pypy TypeError: object() takes no parameters ---------- messages: 328773 nosy: joydiamond priority: normal severity: normal status: open title: Deleting __new__ does not restore previous behavior versions: Python 3.5, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 20:20:49 2018 From: report at bugs.python.org (Braden Groom) Date: Mon, 29 Oct 2018 00:20:49 +0000 Subject: [issue17514] Add the license to argparse.py In-Reply-To: <1363911732.52.0.330096157772.issue17514@psf.upfronthosting.co.za> Message-ID: <1540772449.44.0.788709270274.issue17514@psf.upfronthosting.co.za> Braden Groom added the comment: It seems like this can be closed unless we want to remove the current header in argparse.py. ---------- nosy: +bradengroom _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 20:23:42 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Oct 2018 00:23:42 +0000 Subject: [issue35097] IDLE add doc subsection for editor windows In-Reply-To: <1540771358.38.0.788709270274.issue35097@psf.upfronthosting.co.za> Message-ID: <1540772622.53.0.788709270274.issue35097@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +9524 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 20:29:24 2018 From: report at bugs.python.org (Michael Hoffman) Date: Mon, 29 Oct 2018 00:29:24 +0000 Subject: [issue1154351] add get_current_dir_name() to os module In-Reply-To: <1540762045.16.0.788709270274.issue1154351@psf.upfronthosting.co.za> Message-ID: <1564-1540772960-49936@sneakemail.com> Michael Hoffman added the comment: glibc `getcwd()` and `get_current_dir_name()` are not the same. glibc `get_current_dir_name()` does, in fact, check the `PWD` environment variable. https://www.gnu.org/software/libc/manual/html_node/Working-Directory.html The get_current_dir_name function is basically equivalent to getcwd (NULL, 0), except the value of the PWD environment variable is first examined, and if it does in fact correspond to the current directory, that value is returned. This is a subtle difference which is visible if the path described by the value in PWD is using one or more symbolic links, in which case the value returned by getcwd would resolve the symbolic links and therefore yield a different result. On Sun, Oct 28, 2018 at 5:27 PM Braden Groom report-at-bugs.python.org |Python/Example Allow| <16snny1crx82vlt at sneakemail.com> wrote: > > Braden Groom added the comment: > > Victor, FWIW I don't need this functionality and your suggestion on the PR > seems reasonable to me. I only picked up this issue as a way to become > familiar with contributing to the project. I'm okay with closing both the > PR and the ticket. > > ---------- > nosy: +bradengroom > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 20:42:22 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Oct 2018 00:42:22 +0000 Subject: [issue35097] IDLE add doc subsection for editor windows In-Reply-To: <1540771358.38.0.788709270274.issue35097@psf.upfronthosting.co.za> Message-ID: <1540773742.06.0.788709270274.issue35097@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset ea9c8bd44365ae8b0accc5286c7b52862528c0ec by Terry Jan Reedy in branch 'master': bpo-35097: Add IDLE doc subsection explaining editor windows. (#10206) https://github.com/python/cpython/commit/ea9c8bd44365ae8b0accc5286c7b52862528c0ec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 20:42:39 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Oct 2018 00:42:39 +0000 Subject: [issue35097] IDLE add doc subsection for editor windows In-Reply-To: <1540771358.38.0.788709270274.issue35097@psf.upfronthosting.co.za> Message-ID: <1540773759.56.0.788709270274.issue35097@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9525 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 20:42:40 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 29 Oct 2018 00:42:40 +0000 Subject: [issue35084] binascii.Error: Incorrect padding In-Reply-To: <1540684195.55.0.788709270274.issue35084@psf.upfronthosting.co.za> Message-ID: <1540773760.94.0.788709270274.issue35084@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Can you please add your definition of a crash? Crash in bug report context is used in C language context like causing a segfault, buffer overflow etc. Proper Exceptions are not considered as a crash and this is an exception raised since the contents are invalid. If it crashes as I mentioned above can you please add the crash log? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 20:42:50 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 29 Oct 2018 00:42:50 +0000 Subject: [issue35096] Change _PY_VERSION to derive from sys.version_info in sysconfig In-Reply-To: <1540770549.89.0.788709270274.issue35096@psf.upfronthosting.co.za> Message-ID: <1540773770.93.0.788709270274.issue35096@psf.upfronthosting.co.za> Ned Deily added the comment: This has come up before, see Issue25985 and Issue24916 (still open). Let's call this a duplicate of the latter and continue any discussion there. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> In sysconfig, don't rely on sys.version format _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 20:42:55 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Oct 2018 00:42:55 +0000 Subject: [issue35097] IDLE add doc subsection for editor windows In-Reply-To: <1540771358.38.0.788709270274.issue35097@psf.upfronthosting.co.za> Message-ID: <1540773775.99.0.788709270274.issue35097@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9526 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 20:47:17 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 29 Oct 2018 00:47:17 +0000 Subject: [issue24916] In sysconfig, don't rely on sys.version format In-Reply-To: <1440265954.47.0.288307978254.issue24916@psf.upfronthosting.co.za> Message-ID: <1540774037.18.0.788709270274.issue24916@psf.upfronthosting.co.za> Ned Deily added the comment: Noted in passing: while Lib/distutils/sysconfig.py has not implemented "py_version", I see now that Lib/distutils/command/install.py does have something very similar to Lib/sysconfig.py so whatever (if anything) is changed in one should also be changed in the other. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 20:56:33 2018 From: report at bugs.python.org (Braden Groom) Date: Mon, 29 Oct 2018 00:56:33 +0000 Subject: [issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1540774593.8.0.788709270274.issue19376@psf.upfronthosting.co.za> Braden Groom added the comment: > In other words, the documentation looks sufficient to me as-is, and adding special wording for this would only make it longer than it should be. I agree with Victor here. It seems like this can be closed. There haven't been any comments from other people hitting this issue for 5 years. ---------- nosy: +bradengroom _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 21:29:58 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 29 Oct 2018 01:29:58 +0000 Subject: [issue35098] Deleting __new__ does not restore previous behavior In-Reply-To: <1540772185.07.0.788709270274.issue35098@psf.upfronthosting.co.za> Message-ID: <1540776598.29.0.788709270274.issue35098@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I think the real WTF here is that you can write to arbitrary dunder attributes even if they aren't listed in __slots__. py> Color.__NOBODY_expects_the_Spanish_Inquisition__ = "What?" py> Color.__NOBODY_expects_the_Spanish_Inquisition__ 'What?' I think that assigning to Color.__new__ should have failed in the first place. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 21:43:26 2018 From: report at bugs.python.org (Joy Diamond) Date: Mon, 29 Oct 2018 01:43:26 +0000 Subject: [issue35098] Deleting __new__ does not restore previous behavior In-Reply-To: <1540772185.07.0.788709270274.issue35098@psf.upfronthosting.co.za> Message-ID: <1540777406.8.0.788709270274.issue35098@psf.upfronthosting.co.za> Joy Diamond added the comment: Its quite valid to assign to __new__ to replace the behavior of how an instance is created. (Obviously you would not really assign `0` to it; my example was just to show the `del Color.__new__` fails - so what was assigned was not relevant). Here is a more realistic assignment to __new__ -- this one shows we are "caching" the instance "green" -- so it is reused: class Color(object): __slots__ = (('name',)) def __init__(self, name): self.name = name green = Color('green') # Works assert green.name == 'green' @staticmethod def Color__new__cache_green(m, name): if name == 'green': return green return object.__new__(m, name) Color.__new__ = Color__new__cache_green green_2 = Color('green') assert green_2 == green blue = Color('blue') assert blue.name == 'blue' del Color.__new__ red = Color('red') # Fails in Python 3; works in Python 2 & pypy assert red.name == 'red' Finally as for `Color.__x__` assignment, this has nothing to do with `__slots__` as it is assigning to `Color`, not to an instance of `Color`. `green.__x__ = 0` properly fails since there is no `__x__` slot: AttributeError: 'Color' object has no attribute '__x__' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 21:51:39 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Oct 2018 01:51:39 +0000 Subject: [issue35097] IDLE add doc subsection for editor windows In-Reply-To: <1540771358.38.0.788709270274.issue35097@psf.upfronthosting.co.za> Message-ID: <1540777899.81.0.788709270274.issue35097@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 1a3f18e2c58367157d904f5c077ccf5a3e076f7d by Miss Islington (bot) in branch '3.7': bpo-35097: Add IDLE doc subsection explaining editor windows. (GH-10206) https://github.com/python/cpython/commit/1a3f18e2c58367157d904f5c077ccf5a3e076f7d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 21:51:51 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Oct 2018 01:51:51 +0000 Subject: [issue35097] IDLE add doc subsection for editor windows In-Reply-To: <1540771358.38.0.788709270274.issue35097@psf.upfronthosting.co.za> Message-ID: <1540777911.18.0.788709270274.issue35097@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 9bdadc163f306ddb4659c6732ea24401957488db by Miss Islington (bot) in branch '3.6': bpo-35097: Add IDLE doc subsection explaining editor windows. (GH-10206) https://github.com/python/cpython/commit/9bdadc163f306ddb4659c6732ea24401957488db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 22:00:14 2018 From: report at bugs.python.org (Narito Takizawa) Date: Mon, 29 Oct 2018 02:00:14 +0000 Subject: [issue34198] Additional encoding options to tkinter.filedialog Message-ID: <1540778414.14.0.788709270274.issue34198@psf.upfronthosting.co.za> Change by Narito Takizawa : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 22:00:41 2018 From: report at bugs.python.org (Narito Takizawa) Date: Mon, 29 Oct 2018 02:00:41 +0000 Subject: [issue34198] Additional encoding options to tkinter.filedialog Message-ID: <1540778441.37.0.788709270274.issue34198@psf.upfronthosting.co.za> Change by Narito Takizawa : ---------- pull_requests: -7955 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 23:25:13 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Oct 2018 03:25:13 +0000 Subject: [issue35099] IDLE: say more about Shell - console differences Message-ID: <1540783513.03.0.788709270274.issue35099@psf.upfronthosting.co.za> New submission from Terry J. Reedy : Differences added in initial PR: * threading.activeCount()`` returns 2 instead of 1; * run user code in separate process; * user-created subprocesses do not inherit sys.stdxxx objects; must run IDLE from console for such to have i/o connection; * Shell ignores anything after first statement in pasted code. Dependencies Issue #23220 added the "IDLE-console differences" subsection to IDLE doc. Discussing 'Shell not a terminal' left for another patch. Issue 33000 is about finite versus infinite buffer. Or should any of these be in new Shell subsection? ---------- assignee: terry.reedy components: IDLE messages: 328785 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: say more about Shell - console differences type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 23:26:37 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Oct 2018 03:26:37 +0000 Subject: [issue35099] IDLE: say more about IDLE - console differences In-Reply-To: <1540783513.03.0.788709270274.issue35099@psf.upfronthosting.co.za> Message-ID: <1540783597.89.0.788709270274.issue35099@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- title: IDLE: say more about Shell - console differences -> IDLE: say more about IDLE - console differences _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 23:55:54 2018 From: report at bugs.python.org (Henry Zhu) Date: Mon, 29 Oct 2018 03:55:54 +0000 Subject: [issue35100] urllib.parse.unquote_to_bytes: needs "escape plus" option Message-ID: <1540785354.09.0.788709270274.issue35100@psf.upfronthosting.co.za> New submission from Henry Zhu : `urllib.parse.unquote_to_bytes` should have an "escape plus" option, just like `urllib.parse.unquote_plus` does. It's very necessary in some cases: ``` # Say I have a url string: 'a+%2b%c0'. # In Python2, I can parse it into b'a +\xc0' with urllib.unquote_plus. # Note that the first "+" was escaped into space, and the second "+" was decoded from "%2b". # But in Python3, this just can't be done, either with urllib.parse.unquote, urllib.par.unquote_plus or urllib.parse.unquote_to_bytes. # This is the example: >>> from urllib import parse >>> s = 'a+%2b%c0' >>> parse.unquote(s) 'a++?' >>> parse.unquote_plus(s) 'a +?' >>> parse.unquote_to_bytes(s) b'a++\xc0' ``` PS: the character "?" should be "?", but it can't be shown in command line. The result of `urllib.parse.unquote_to_bytes` is almost what I want, except that it doesn't escape the first "+" into space. ---------- components: Library (Lib) messages: 328786 nosy: Henry Zhu priority: normal severity: normal status: open title: urllib.parse.unquote_to_bytes: needs "escape plus" option type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 28 23:57:48 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 29 Oct 2018 03:57:48 +0000 Subject: [issue35099] IDLE: say more about IDLE - console differences In-Reply-To: <1540783513.03.0.788709270274.issue35099@psf.upfronthosting.co.za> Message-ID: <1540785468.76.0.788709270274.issue35099@psf.upfronthosting.co.za> Ned Deily added the comment: Just a comment on usage, for what it's worth: I don't know how common the term "console" is on modern Windows systems, but I think the term has a very different meaning on Unix and macOS. In those environments, if used at all, a "console" *might* refer to a window that provides access to admin functions. A normal (non-admin) user would not use or even be familiar with the term "console" in this context. A more familiar term would be a "terminal window" or "shell window" or some such. But I'm not sure I even understand totally what is meant by "console" here; it's just sounds foreign :) ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 00:17:50 2018 From: report at bugs.python.org (orlnub123) Date: Mon, 29 Oct 2018 04:17:50 +0000 Subject: [issue35101] inspect.findsource breaks on class frame objects Message-ID: <1540786670.85.0.788709270274.issue35101@psf.upfronthosting.co.za> New submission from orlnub123 : If you pass a frame object belonging to a class into findsource, it'll incorrectly give you the starting line number of the first function above it or 0 if no functions are defined. Here's some code to reproduce the issue: import inspect def test_func(): ... # This should not get printed class Test: frame = inspect.currentframe() print(inspect.getsource(Test.frame)) # Depends on findsource This unexpectedly prints the source of test_func instead of the class right below it. ---------- components: Library (Lib) messages: 328788 nosy: orlnub123 priority: normal severity: normal status: open title: inspect.findsource breaks on class frame objects type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 00:20:11 2018 From: report at bugs.python.org (orlnub123) Date: Mon, 29 Oct 2018 04:20:11 +0000 Subject: [issue35101] inspect.findsource breaks on class frame objects In-Reply-To: <1540786670.85.0.788709270274.issue35101@psf.upfronthosting.co.za> Message-ID: <1540786811.18.0.788709270274.issue35101@psf.upfronthosting.co.za> Change by orlnub123 : ---------- keywords: +patch pull_requests: +9527 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 01:06:26 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Oct 2018 05:06:26 +0000 Subject: [issue35099] Improve the IDLE - console differences doc In-Reply-To: <1540783513.03.0.788709270274.issue35099@psf.upfronthosting.co.za> Message-ID: <1540789586.47.0.788709270274.issue35099@psf.upfronthosting.co.za> Terry J. Reedy added the comment: By 'console' I mean the text-interface window that Python normally runs in, whether in batch or interactive mode, whether started directly from an icon or menu or file listing or indirectly by entering 'python' in a shell program running in the console. (On Windows, there is only the one text UI program.) On Windows, 'console' is the proper term (as Eryk Sun has taken pains to point out). "Command Prompt' (cmd.exe)*, 'PowerShell' (???.exe) and Python (python.exe, when run directly without using either command-line program) all use the same console as their UI. In all cases, the app interacts with users through a console window just as IDLE interacts with users through tk windows. *Naive Windows users sometimes call a console window a Command Prompt window or every a Dos Prompt window, even when Python is running in such a window without cmd.exe. In all cases, clicking the icon in the upper left corner displays the console menu. Selecting 'Properties' displays the console properties dialog. Selecting the 'Options' tab displays an option to use the 'legacy console' rather than the 'new console'. I appreciate being informed that the naked term does not work for other systems. Would it be sufficient to define 'console' as the text interface window that Python normally runs in, which might instead be caller a terminal, terminal window, or shell window? I would rather not have to use 'console or terminal' everywhere. 'IDLE - console differences' is about differences in execution result and output display* when running Python code through IDLE (using tk) instead of Python in its standard running-in-a-console mode. Do you have a better idea of how to reduce this to a few words? How about 'IDLE - console Python differences', with an explanation of 'console Python'? ('terminal Python' reminds me of dead parrots ;-) (Since I opened this issue, I realized that the pasting difference is a code preparation difference that belongs elsewhere.) ---------- dependencies: +Documents input/output effects of how IDLE runs user code, IDLE Doc: Text consumes unlimited RAM, consoles likely not nosy: -ned.deily title: IDLE: say more about IDLE - console differences -> Improve the IDLE - console differences doc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 01:21:50 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 29 Oct 2018 05:21:50 +0000 Subject: [issue35099] Improve the IDLE - console differences doc In-Reply-To: <1540783513.03.0.788709270274.issue35099@psf.upfronthosting.co.za> Message-ID: <1540790510.02.0.788709270274.issue35099@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the explanation. That's what I thought you meant but it's good to make sure. I'm not sure what the best solution is and others might have a different opinion. It might be good to solicit some feedback from a wider audience of users who do not have Windows experience. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 01:45:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Oct 2018 05:45:44 +0000 Subject: [issue35099] Improve the IDLE - console differences doc In-Reply-To: <1540783513.03.0.788709270274.issue35099@psf.upfronthosting.co.za> Message-ID: <1540791944.36.0.788709270274.issue35099@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I thought of 'IDLE versus standard Python', or 'default Python', but the contrast is not correct, as IDLE uses the same Python. The intended contrast is between the result of different methods of running Python code with a particular Python binary. 'How IDLE modifies execution results' is correct, but I don't especially like it. I can ask for other opinions on idledev and python-list. In the meanwhile, I have a patch nearly ready, and want to move on to the dependency issues that will edit the same section. So while waiting for opinions, I want to merge a version of what I have, but leave this open pending a final decision on the title and terminology. ---------- nosy: -ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 01:57:15 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Oct 2018 05:57:15 +0000 Subject: [issue35099] Improve the IDLE - console differences doc In-Reply-To: <1540783513.03.0.788709270274.issue35099@psf.upfronthosting.co.za> Message-ID: <1540792635.7.0.788709270274.issue35099@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 02:05:24 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 29 Oct 2018 06:05:24 +0000 Subject: [issue35098] Deleting __new__ does not restore previous behavior In-Reply-To: <1540777406.8.0.788709270274.issue35098@psf.upfronthosting.co.za> Message-ID: <20181029060518.GX3817@ando.pearwood.info> Steven D'Aprano added the comment: > Its quite valid to assign to __new__ to replace the behavior of how an instance is created. Of course it is, and I never argued otherwise. > Finally as for `Color.__x__` assignment, this has nothing to do with > `__slots__` as it is assigning to `Color`, not to an instance of > `Color`. Of course, sorry for the noise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 02:54:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Oct 2018 06:54:40 +0000 Subject: [issue25205] setattr accepts invalid identifiers In-Reply-To: <1442861960.51.0.201067879836.issue25205@psf.upfronthosting.co.za> Message-ID: <1540796080.84.0.788709270274.issue25205@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> not a bug stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 03:24:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Oct 2018 07:24:03 +0000 Subject: [issue35068] [2.7] Possible crashes due to incorrect error handling in pyexpat.c In-Reply-To: <1540486851.06.0.788709270274.issue35068@psf.upfronthosting.co.za> Message-ID: <1540797843.83.0.788709270274.issue35068@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d61f586df79a754776f448e5b23015abb71f4fd1 by Serhiy Storchaka (Zackery Spytz) in branch '2.7': [2.7] bpo-35068: Fix possible crashes in pyexpat.c. (GH-10099) https://github.com/python/cpython/commit/d61f586df79a754776f448e5b23015abb71f4fd1 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 03:24:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Oct 2018 07:24:16 +0000 Subject: [issue35068] [2.7] Possible crashes due to incorrect error handling in pyexpat.c In-Reply-To: <1540486851.06.0.788709270274.issue35068@psf.upfronthosting.co.za> Message-ID: <1540797856.87.0.788709270274.issue35068@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 Oct 29 04:21:02 2018 From: report at bugs.python.org (jimmy) Date: Mon, 29 Oct 2018 08:21:02 +0000 Subject: [issue35102] Struct pack() Message-ID: <1540801262.05.0.788709270274.issue35102@psf.upfronthosting.co.za> New submission from jimmy : The result of variable "a" should be b'30\x11\x00\x00' not b'0\x11\x00\x00' . >>> import struct >>> a = struct.pack(">> print(a) b'0\x11\x00\x00' >>> ---------- messages: 328794 nosy: jimmy priority: normal severity: normal status: open title: Struct pack() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 04:26:28 2018 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Oct 2018 08:26:28 +0000 Subject: [issue35102] Struct pack() In-Reply-To: <1540801262.05.0.788709270274.issue35102@psf.upfronthosting.co.za> Message-ID: <1540801588.28.0.788709270274.issue35102@psf.upfronthosting.co.za> Mark Dickinson added the comment: The result is correct. Note that the first character is "0", which is chr(48). >>> '0' == '\x30' True >>> '0\x11\x00\x00' == '\x30\x11\x00\x00' True ---------- nosy: +mark.dickinson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 04:59:54 2018 From: report at bugs.python.org (=?utf-8?b?VG9tw6HFoSBIZXJhbg==?=) Date: Mon, 29 Oct 2018 08:59:54 +0000 Subject: [issue35103] format_exception() doesn't work with PyErr_Fetch Message-ID: <1540803594.22.0.788709270274.issue35103@psf.upfronthosting.co.za> New submission from Tom?? Heran : When embedding Python into a C/C++ based programs, one of the ways to access the formatted traceback is/was to get the type, value and tb by calling the C API PyErr_Fetch() and then call native Python traceback.format_exception() function to get a list of strings representing the tracback. This worked fine in 2.7. Doing the same in 3.5 doesn't work because: 1. PyErr_Fetch()'s middle output argument 'value' is not an instance of Exception (or a subclass), but rather (what seems to me) a __str__ or __repr__ (i.e. the type is str) of said raised exception. An aside - this seems to be the case both in 2.7 and 3.5, but differs (in both 2.7 and 3.5, I believe) from what sys.exc_info() returns, as there the middle output 'value' is of an Exception (or a subclass) type. 2. In the overhauled traceback module in 3.x, functions like format_exception() now use an internal class TracebackException which expects the exc_value (which it gets from format_exception()'s value argument) to be an instance of Exception (or a subclass), thus feeding traceback.format_exception() whatever I got from PyErr_Fetch() ends up throwing another exception. As a temporary workaround, I can use traceback.format_tb() which luckily doesn't use the TracebackException class and works fine in 3.5. ---------- messages: 328796 nosy: tomasheran priority: normal severity: normal status: open title: format_exception() doesn't work with PyErr_Fetch versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 05:11:30 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 29 Oct 2018 09:11:30 +0000 Subject: [issue35101] inspect.findsource breaks on class frame objects In-Reply-To: <1540786670.85.0.788709270274.issue35101@psf.upfronthosting.co.za> Message-ID: <1540804290.11.0.788709270274.issue35101@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 05:16:26 2018 From: report at bugs.python.org (Julien Palard) Date: Mon, 29 Oct 2018 09:16:26 +0000 Subject: [issue35007] Minor change to weakref docs In-Reply-To: <1539755313.9.0.788709270274.issue35007@psf.upfronthosting.co.za> Message-ID: <1540804586.34.0.788709270274.issue35007@psf.upfronthosting.co.za> Change by Julien Palard : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 05:21:08 2018 From: report at bugs.python.org (Vincent Michel) Date: Mon, 29 Oct 2018 09:21:08 +0000 Subject: [issue35065] Reading received data from a closed TCP stream using `StreamReader.read` might hang forever In-Reply-To: <1540470746.12.0.788709270274.issue35065@psf.upfronthosting.co.za> Message-ID: <1540804868.71.0.788709270274.issue35065@psf.upfronthosting.co.za> Change by Vincent Michel : ---------- pull_requests: +9528 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 06:16:46 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 29 Oct 2018 10:16:46 +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: <1540808206.22.0.788709270274.issue34864@psf.upfronthosting.co.za> Tal Einat added the comment: The search and replace dialogs are also broken by "Prefer tabs when opening documents" being active: they as separate tabs rather than a dialog window. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 06:34:17 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 29 Oct 2018 10:34:17 +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: <1540809257.8.0.788709270274.issue30410@psf.upfronthosting.co.za> Steve Dower added the comment: Please do! ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 06:44:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 10:44:45 +0000 Subject: [issue34969] Add --fast, --best to the gzip CLI In-Reply-To: <1539409543.55.0.788709270274.issue34969@psf.upfronthosting.co.za> Message-ID: <1540809885.58.0.788709270274.issue34969@psf.upfronthosting.co.za> STINNER Victor added the comment: > But if I add options for controlling the compression level, I would add options -1 ... -9. I never used verbose forms --fast and --best. If we add options, I would prefer to only add --fast and --best which are easy to understand. I really have no idea of the difference between -3 and -4 for example. In practice, I don't think that anyone uses these -N options on the common line. To be honest, I never passed any option to gzip: I always use "gzip file" to get "file.gz". I don't really care of it's file. I just hope that it's smaller :-) But I'm not against add --best and --fast. By the way, on Linux, gzip default compression level is 6 whereas Python uses 9 by default. I agree to make Python more consistent with Unix tools. In that case, again, it makes sense to add an option to get again --best (level 9). ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 06:57:47 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 29 Oct 2018 10:57:47 +0000 Subject: [issue35101] inspect.findsource breaks on class frame objects In-Reply-To: <1540786670.85.0.788709270274.issue35101@psf.upfronthosting.co.za> Message-ID: <1540810667.08.0.788709270274.issue35101@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Seems there is a related open issue with a similar regex based solution proposed for another class definition related issue : https://bugs.python.org/issue22355#msg226538 . I think it's worth converting the example code reported in issue22355 as unit test cases. Since this issue already has a PR with tests then we can proceed further on this. Thanks for the report! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 07:25:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Oct 2018 11:25:58 +0000 Subject: [issue34969] Add --fast, --best to the gzip CLI In-Reply-To: <1539409543.55.0.788709270274.issue34969@psf.upfronthosting.co.za> Message-ID: <1540812358.6.0.788709270274.issue34969@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If we add this options to the gzip CLI, I would suggest to add them to bzip2 and lzma CLI in the same PR. And maybe open separate issues for the zipfile and tarfile CLI, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 07:30:06 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 29 Oct 2018 11:30:06 +0000 Subject: [issue35104] IDLE: On macOS, Command-M minimizes & opens "Open Module..." Message-ID: <1540812606.17.0.788709270274.issue35104@psf.upfronthosting.co.za> New submission from Tal Einat : On macOS, Command-M simultaneously minimizes the window and opens the "Open Module..." dialog. This happens with a very confusing sequence of visual effects (see attached animated gif). This doesn't happen when activating either of the menu items; only when using the keyboard shortcut. Tested with current master (3.8.0a0, 53835e92d3). ---------- assignee: terry.reedy components: IDLE files: command-M.gif messages: 328802 nosy: taleinat, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: On macOS, Command-M minimizes & opens "Open Module..." type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file47895/command-M.gif _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 07:32:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 11:32:27 +0000 Subject: [issue34969] Add --fast, --best to the gzip CLI In-Reply-To: <1539409543.55.0.788709270274.issue34969@psf.upfronthosting.co.za> Message-ID: <1540812747.51.0.788709270274.issue34969@psf.upfronthosting.co.za> STINNER Victor added the comment: man lzma: --fast --best These are somewhat misleading aliases for -0 and -9, respec? tively. These are provided only for backwards compatibility with LZMA Utils. Avoid using these options. man bzip2: -1 (or --fast) to -9 (or --best) Set the block size to 100 k, 200 k .. 900 k when compressing. Has no effect when decompressing. See MEMORY MANAGEMENT below. The --fast and --best aliases are primarily for GNU gzip compat? ibility. In particular, --fast doesn't make things signifi? cantly faster. And --best merely selects the default behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 07:38:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 11:38:35 +0000 Subject: [issue1154351] add get_current_dir_name() to os module Message-ID: <1540813115.84.0.788709270274.issue1154351@psf.upfronthosting.co.za> STINNER Victor added the comment: man get_current_dir_name(): get_current_dir_name() will malloc(3) an array big enough to hold the absolute pathname of the current working directory. If the environment variable PWD is set, and its value is correct, then that value will be returned. The caller should free(3) the returned buffer. Oh sorry, I missed that part. In this case, we should expose os.get_current_dir_name() using this function. But it's a glibc extension: Feature Test Macro Requirements for glibc (see feature_test_macros(7)): get_current_dir_name(): _GNU_SOURCE I'm not sure about adding shutil.get_current_dir_name() which would use os.get_current_dir_name(), or reimplement it in pure Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 07:43:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 11:43:42 +0000 Subject: [issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1540813422.32.0.788709270274.issue19376@psf.upfronthosting.co.za> STINNER Victor added the comment: Paul Ganssle: Do you want to work on a PR? Or should we close the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 07:48:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 11:48:54 +0000 Subject: [issue13501] Make libedit support more generic; port readline / libedit to FreeBSD In-Reply-To: <1322579942.3.0.601983912656.issue13501@psf.upfronthosting.co.za> Message-ID: <1540813734.87.0.788709270274.issue13501@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 07:49:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 11:49:56 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1540813796.4.0.788709270274.issue27741@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c0799ec973530ad2492bb1d6c7287ffc428f0348 by Victor Stinner (Gus Goulart) in branch 'master': bpo-27741: Better wording for datetime.strptime() (GH-9994) https://github.com/python/cpython/commit/c0799ec973530ad2492bb1d6c7287ffc428f0348 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 07:50:32 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Oct 2018 11:50:32 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1540813832.83.0.788709270274.issue27741@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9529 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 07:50:42 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Oct 2018 11:50:42 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1540813842.68.0.788709270274.issue27741@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9530 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 07:50:57 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Oct 2018 11:50:57 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1540813857.69.0.788709270274.issue27741@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9531 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 07:52:56 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 29 Oct 2018 11:52:56 +0000 Subject: [issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1540813976.04.0.788709270274.issue19376@psf.upfronthosting.co.za> Tal Einat added the comment: This is a great, easy, doc-only issue for a new contributor to handle. ---------- keywords: +easy nosy: +taleinat versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 07:54:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Oct 2018 11:54:46 +0000 Subject: [issue1154351] add get_current_dir_name() to os module Message-ID: <1540814086.97.0.788709270274.issue1154351@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: We provide Python implementations for fnmatch, glob, realpath even if there are corresponding libc functions. This makes them available even on platforms that doesn't have native implementations in libc, avoids C limitations, and allow to add new options. I think it is not wrong to provide a Python implementation for get_current_dir_name(). My concerns are that while it can be useful for people that search for get_current_dir_name() in Python, it can be confused for other people. * getcwd() and get_current_dir_name() are very similar, but have very different names. In what cases the one or other is preferable? * On Windows getcwd() returns a path without resolved symbolic links, the same as get_current_dir_name(). Shouldn't we provide an option for getting current working directory with resolved symbolic links on all platforms? This will give us three options: resolved symlinks, unresolved symlinks, and platform-depended default. * get_current_dir_name() works as desired only when current working directory was not changed since the start of the program. Any call of chdir() will make it an alias to getcwd(). * For some libc functions we add options to existing functions rather of duplicating the number of names in the os module. For example the dir_fd option instead of *at() functions. Wouldn't be better to add a buulean parameter (with platform-depending default) to getcwd()? * What about pathlib? Does it need corresponding feature? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 07:54:57 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Oct 2018 11:54:57 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1540814097.26.0.788709270274.issue27741@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 0a53a067dc4eb86ecf94c50582b3e22359c601a9 by Miss Islington (bot) in branch '3.6': bpo-27741: Better wording for datetime.strptime() (GH-9994) https://github.com/python/cpython/commit/0a53a067dc4eb86ecf94c50582b3e22359c601a9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 07:55:07 2018 From: report at bugs.python.org (Jan Novak) Date: Mon, 29 Oct 2018 11:55:07 +0000 Subject: [issue34931] os.path.splitext with more dots In-Reply-To: <1539000361.1.0.545547206417.issue34931@psf.upfronthosting.co.za> Message-ID: <1540814107.54.0.788709270274.issue34931@psf.upfronthosting.co.za> Jan Novak added the comment: Yes, dot behaviour is well documented. But splitext() is a function to split name and extension, not take care about hidden files. Hidden files starting with dot is Unix like system feature. https://en.wikipedia.org/wiki/Hidden_file_and_hidden_directory Hidden files could have also extension. Try for example create/rename .somename.jpg file in Ubuntu. It is normal image with .jpg extension. You could open it etc. You can't use standard python splitext() function to detect extension. I know that change this standard python function is probably imposible due to backward compatibility. Bud extend it with new parameter could be possible. The change in 2007 was unfortunate/incomplete. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 07:55:10 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Oct 2018 11:55:10 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1540814110.63.0.788709270274.issue27741@psf.upfronthosting.co.za> miss-islington added the comment: New changeset a02bc719ebc496bc527e9e46de2f2e83f68bfd77 by Miss Islington (bot) in branch '3.7': bpo-27741: Better wording for datetime.strptime() (GH-9994) https://github.com/python/cpython/commit/a02bc719ebc496bc527e9e46de2f2e83f68bfd77 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 07:55:17 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Oct 2018 11:55:17 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1540814117.76.0.788709270274.issue27741@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 4ec427b005036dab0a380de20f31774394ca4dd6 by Miss Islington (bot) in branch '2.7': bpo-27741: Better wording for datetime.strptime() (GH-9994) https://github.com/python/cpython/commit/4ec427b005036dab0a380de20f31774394ca4dd6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 08:13:16 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 29 Oct 2018 12:13:16 +0000 Subject: [issue33826] enable discovery of class source code in IPython interactively defined classes In-Reply-To: <1528697796.87.0.592728768989.issue33826@psf.upfronthosting.co.za> Message-ID: <1540815196.05.0.788709270274.issue33826@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: This seems to be a duplicate of issue12920. issue24491 was also a related issue closed as a duplicate of issue12920. So I propose closing this to continue the discussion in issue12920. Feel free to add in if I am missing something. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 08:16:46 2018 From: report at bugs.python.org (Michael Hoffman) Date: Mon, 29 Oct 2018 12:16:46 +0000 Subject: [issue1154351] add get_current_dir_name() to os module Message-ID: <1540815406.81.0.788709270274.issue1154351@psf.upfronthosting.co.za> Michael Hoffman added the comment: > * For some libc functions we add options to existing functions rather of duplicating the number of names in the os module. For example the dir_fd option instead of *at() functions. Wouldn't be better to add a buulean parameter (with platform-depending default) to getcwd()? I agree, adding an option to `getcwd()` would probably be a better approach and reduce some of the other potential confusion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 08:24:27 2018 From: report at bugs.python.org (Thomas Viehmann) Date: Mon, 29 Oct 2018 12:24:27 +0000 Subject: [issue33826] enable discovery of class source code in IPython interactively defined classes In-Reply-To: <1528697796.87.0.592728768989.issue33826@psf.upfronthosting.co.za> Message-ID: <1540815867.02.0.788709270274.issue33826@psf.upfronthosting.co.za> Thomas Viehmann added the comment: Yeah, it's a shame no-one looked at the patch that seems to fix the underlying cause and now it's just a duplicate of a bug to improve error messages. On the up side, closing this bug will stop me from getting reminders about it. ---------- resolution: -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 08:24:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 12:24:51 +0000 Subject: [issue35105] Document that CPython accepts "invalid" identifiers Message-ID: <1540815891.13.0.788709270274.issue35105@psf.upfronthosting.co.za> New submission from STINNER Victor : The Python 3 language has a strict definition for an identifier: https://docs.python.org/dev/reference/lexical_analysis.html#identifiers ... but in practice, it's possible to create "invalid" identifiers using setattr(). Example with PyPy: $ pypy Python 2.7.13 (0e7ea4fe15e82d5124e805e2e4a37cae1a402d4b, Apr 12 2018, 14:50:12) >>>> class A: pass >>>> >>>> a=A() >>>> setattr(a, "1", 2) >>>> getattr(a, "1") 2 >>>> vars(a) {'1': 2} >>>> a.__dict__ {'1': 2} >>>> a.1 File "", line 1 a.1 ^ SyntaxError: invalid syntax The exact definition of "identifiers" is a common question. Recent examples: * bpo-25205 * [Python-Dev] Arbitrary non-identifier string keys when using **kwargs https://mail.python.org/pipermail/python-dev/2018-October/155435.html It would be nice to document the answer. Maybe in the Langage Specification, maybe in the setattr() documentation, maybe in a FAQ, maybe everywhere? ---------- assignee: docs at python components: Documentation messages: 328816 nosy: docs at python, serhiy.storchaka, steven.daprano, vstinner priority: normal severity: normal status: open title: Document that CPython accepts "invalid" identifiers versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 08:25:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 12:25:09 +0000 Subject: [issue25205] setattr accepts invalid identifiers In-Reply-To: <1442861960.51.0.201067879836.issue25205@psf.upfronthosting.co.za> Message-ID: <1540815909.9.0.788709270274.issue25205@psf.upfronthosting.co.za> STINNER Victor added the comment: I created bpo-35105 to propose to document the behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 08:25:22 2018 From: report at bugs.python.org (Thomas Viehmann) Date: Mon, 29 Oct 2018 12:25:22 +0000 Subject: [issue33826] enable discovery of class source code in IPython interactively defined classes In-Reply-To: <1528697796.87.0.592728768989.issue33826@psf.upfronthosting.co.za> Message-ID: <1540815922.62.0.788709270274.issue33826@psf.upfronthosting.co.za> Change by Thomas Viehmann : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 08:26:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 12:26:08 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1540815968.51.0.788709270274.issue27741@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Nicholas Colclasure for the bug report and Gus Goulart for the fix. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 08:28:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 12:28:30 +0000 Subject: [issue1154351] add get_current_dir_name() to os module Message-ID: <1540816110.97.0.788709270274.issue1154351@psf.upfronthosting.co.za> STINNER Victor added the comment: os.stat() has a following_symlinks parameter because there is lstat(). There is no lgetcwd(), only getcwd(). I dislike the parameter choice. Use os.path.realpath() is you want to resolve symbolic links. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 08:31:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Oct 2018 12:31:32 +0000 Subject: [issue34931] os.path.splitext with more dots In-Reply-To: <1539000361.1.0.545547206417.issue34931@psf.upfronthosting.co.za> Message-ID: <1540816292.68.0.788709270274.issue34931@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Related issues: issue536120, issue1115886, issue1462106, issue1681842, issue19191. Python-Dev discussions: https://mail.python.org/pipermail/python-dev/2007-March/071557.html https://mail.python.org/pipermail/python-dev/2007-March/071935.html ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 08:34:16 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 29 Oct 2018 12:34:16 +0000 Subject: [issue35105] Document that CPython accepts "invalid" identifiers In-Reply-To: <1540815891.13.0.788709270274.issue35105@psf.upfronthosting.co.za> Message-ID: <1540816456.4.0.788709270274.issue35105@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 08:35:05 2018 From: report at bugs.python.org (Michael Hoffman) Date: Mon, 29 Oct 2018 12:35:05 +0000 Subject: [issue1154351] add get_current_dir_name() to os module Message-ID: <1540816505.15.0.788709270274.issue1154351@psf.upfronthosting.co.za> Michael Hoffman added the comment: `getcwd()` in many ways serves the purpose that a `lget_current_dir_name()` might. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 08:42:47 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Mon, 29 Oct 2018 12:42:47 +0000 Subject: [issue33826] enable discovery of class source code in IPython interactively defined classes In-Reply-To: <1528697796.87.0.592728768989.issue33826@psf.upfronthosting.co.za> Message-ID: <1540816967.24.0.788709270274.issue33826@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: @Thomas Viehmann , as it's currently formulated, this is a duplicate because it strives to allow getting class source from past interactive input -- which, as I explained, is already possible without the patch and seems to be inappropriate for vanilla console anyway. Your patch is rather a new class feature that provides a more robust link to its source, wherever it's located. If you reformulate your ticket to propose that instead, it will no longer be a duplicate. I'm not sure if the UI allows that, it may be better to create a new ticket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 08:43:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 12:43:20 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540817000.57.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2aaf0c12041bcaadd7f2cc5a54450eefd7a6ff12 by Victor Stinner in branch 'master': bpo-35059: Convert Py_INCREF() to static inline function (GH-10079) https://github.com/python/cpython/commit/2aaf0c12041bcaadd7f2cc5a54450eefd7a6ff12 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 08:49:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 12:49:52 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540817392.55.0.788709270274.issue35059@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9532 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 08:51:35 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Mon, 29 Oct 2018 12:51:35 +0000 Subject: [issue33826] enable discovery of class source code in IPython interactively defined classes In-Reply-To: <1528697796.87.0.592728768989.issue33826@psf.upfronthosting.co.za> Message-ID: <1540817495.54.0.788709270274.issue33826@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: > which, as I explained, is already possible without the patch Sorry, I myself explained in https://bugs.python.org/msg319692 that it's not possible. The rest still stands though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 09:18:28 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 29 Oct 2018 13:18:28 +0000 Subject: [issue34969] Add --fast, --best to the gzip CLI In-Reply-To: <1539409543.55.0.788709270274.issue34969@psf.upfronthosting.co.za> Message-ID: <1540819108.89.0.788709270274.issue34969@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi @Serhiy I would like to add them on lzma, bz2, zipfile and tarfile. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 09:20:19 2018 From: report at bugs.python.org (Thomas Viehmann) Date: Mon, 29 Oct 2018 13:20:19 +0000 Subject: [issue33826] enable discovery of class source code in IPython interactively defined classes In-Reply-To: <1528697796.87.0.592728768989.issue33826@psf.upfronthosting.co.za> Message-ID: <1540819219.27.0.788709270274.issue33826@psf.upfronthosting.co.za> Change by Thomas Viehmann : ---------- nosy: -t-vi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 09:39:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 13:39:33 +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: <1540820373.79.0.788709270274.issue28015@psf.upfronthosting.co.za> STINNER Victor added the comment: The issue has been fixed in Python 3.7 and master. If someone is volunteer to backport it to older version, please go ahead :-) But according to serge-sans-paille, it's non trivial and I'm not sure that it's worth it. Sorry, usually we focus on the master branch for "new features". https://github.com/python/cpython/pull/9908#issuecomment-433896161 So I close the issue. Thanks serge-sans-paille for this nice enhancement! ---------- versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 09:39:40 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 13:39:40 +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: <1540820380.12.0.788709270274.issue28015@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 Oct 29 09:39:56 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 29 Oct 2018 13:39:56 +0000 Subject: [issue34945] regression with ./python -m test and pdb In-Reply-To: <1539094779.54.0.545547206417.issue34945@psf.upfronthosting.co.za> Message-ID: <1540820396.37.0.788709270274.issue34945@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Pablo, I have tested your PR and I get the prompt of pdb only if I use -v on the command line. For the print() function, I understand but for the pdb.set_trace() function, normally we should have the prompt even we don't specify the --verbose flat. Do you confirm? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 09:45:57 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Oct 2018 13:45:57 +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: <1540820757.34.0.788709270274.issue34864@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As part of revising the IDLE Docs, I want to add a section for running on MacOS (issue in preparation, section title undecided). I already planned on mentioning this setting. It seems it should be dis-recommended, at least at present. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 09:49:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 13:49:32 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540820972.37.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 542497aa9f71c664768c3d5b7398c03679d3a7e1 by Victor Stinner in branch 'master': bpo-35059: Remove Py_STATIC_INLINE() macro (GH-10216) https://github.com/python/cpython/commit/542497aa9f71c664768c3d5b7398c03679d3a7e1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 09:49:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 13:49:55 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540820995.87.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: > bpo-35059: Remove Py_STATIC_INLINE() macro (GH-10216) Here you have Benjamin, it's gone :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 10:06:45 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 29 Oct 2018 14:06:45 +0000 Subject: [issue33826] enable discovery of class source code in IPython interactively defined classes In-Reply-To: <1528697796.87.0.592728768989.issue33826@psf.upfronthosting.co.za> Message-ID: <1540822005.56.0.788709270274.issue33826@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Sorry about that I thought to redirect the discussion to the linked issue since it had a lot of people who might provide a better discussion about it. Feel free to reopen this if needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 10:18:09 2018 From: report at bugs.python.org (bbayles) Date: Mon, 29 Oct 2018 14:18:09 +0000 Subject: [issue28806] Improve the netrc library In-Reply-To: <1480158810.39.0.736994382472.issue28806@psf.upfronthosting.co.za> Message-ID: <1540822689.67.0.788709270274.issue28806@psf.upfronthosting.co.za> Change by bbayles : ---------- pull_requests: +9533 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 10:18:40 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Oct 2018 14:18:40 +0000 Subject: [issue35104] IDLE: On macOS, Command-M minimizes & opens "Open Module..." In-Reply-To: <1540812606.17.0.788709270274.issue35104@psf.upfronthosting.co.za> Message-ID: <1540822720.89.0.788709270274.issue35104@psf.upfronthosting.co.za> Terry J. Reedy added the comment: What I see in the .gif is that Open Module is open on top of Shell (not minimized, traffic lights gray) and that clicking Cancel closes Open Module and temporarily minimizes Shell, before it pops back up with traffic lights. It is hard to imagine that how one opens Open Module changes its close behavior. With 3.7.1rc1, with unreleased tk patches, Command-M immediately after opening IDLE (Shell) closes IDLE. A window pops up offering to send a report to Apple, or to re-open. 'Re-open' does not work. After opening another window, I see Shell minimize and pop back with the traffic lights gray. Both Cancel and Escape have the effect in the gif. Clicking OK with a valid module name does the same and opens the module. In summary, using Command-M either crashes IDLE or causes the change in traffic lights to be accompanied by minimizing and restoring. Kevin, another weird tkinter/tk Mac behavior. ---------- nosy: +ned.deily, wordtech _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 10:31:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 14:31:44 +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: <1540823504.17.0.788709270274.issue35031@psf.upfronthosting.co.za> STINNER Victor added the comment: Any progress on this issue? It's still failing: https://buildbot.python.org/all/#/builders/168/builds/143 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 10:38:22 2018 From: report at bugs.python.org (coyot linden) Date: Mon, 29 Oct 2018 14:38:22 +0000 Subject: [issue35077] Make TypeError message less ambiguous In-Reply-To: <1540569163.5.0.788709270274.issue35077@psf.upfronthosting.co.za> Message-ID: <1540823902.89.0.788709270274.issue35077@psf.upfronthosting.co.za> coyot linden added the comment: Sure, this can wait to the next release. I don't see it as groundshatteringly ;) urgent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 10:39:31 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Oct 2018 14:39:31 +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: <1540823971.42.0.788709270274.issue35031@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Someone needs to review PR10011 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 11:02:29 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Mon, 29 Oct 2018 15:02:29 +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: <1540825349.37.0.788709270274.issue12920@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: See https://bugs.python.org/issue33826?@ok_message=msg%20328824%20created%0Aissue%2033826%20message_count%2C%20messages%20edited%20ok&@template=item#msg319692 how IPython stores source from interactive input and why it's not appropriate for vanilla REPL IMO. ---------- nosy: +Ivan.Pozdeev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 11:19:03 2018 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 29 Oct 2018 15:19:03 +0000 Subject: [issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field In-Reply-To: <1540440221.28.0.788709270274.issue35062@psf.upfronthosting.co.za> Message-ID: <1540826343.15.0.788709270274.issue35062@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- keywords: +patch pull_requests: +9534 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 11:28:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 15:28:51 +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: <1540826931.18.0.788709270274.issue35031@psf.upfronthosting.co.za> STINNER Victor added the comment: note: Roundup sent me comments as email notifications in the backward order, that's funny to see Pablo's answer before my question :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 11:41:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 15:41:07 +0000 Subject: [issue33015] Fix function cast warning in thread_pthread.h In-Reply-To: <1520362573.83.0.467229070634.issue33015@psf.upfronthosting.co.za> Message-ID: <1540827667.92.0.788709270274.issue33015@psf.upfronthosting.co.za> STINNER Victor added the comment: I closed my PR 10057: "Control Flow Integrity killed my PR :-) https://bugs.python.org/issue33015#msg328325 " ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 11:47:02 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Oct 2018 15:47:02 +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: <1540828022.22.0.788709270274.issue35031@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: > note: Roundup sent me comments as email notifications in the backward order, that's funny to see Pablo's answer before my question :-) Maybe I just answered faster than the speed of light ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 11:51:34 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 29 Oct 2018 15:51:34 +0000 Subject: [issue35104] IDLE: On macOS, Command-M minimizes & opens "Open Module..." In-Reply-To: <1540812606.17.0.788709270274.issue35104@psf.upfronthosting.co.za> Message-ID: <1540828294.51.0.788709270274.issue35104@psf.upfronthosting.co.za> Ned Deily added the comment: AFAICT, the problem here is that there is a duplicate command accelerator assignment: IDLE assigns CMD-M to its Open Module command (https://github.com/python/cpython/blob/master/Lib/idlelib/config-keys.def#L205) but either Tk or the underlying macOS services it uses already use CMD-M to mean "minimize the front window to the Dock" (https://support.apple.com/en-us/HT201236). You can see in the IDLE menu bar where CMD-M shows up in the Window menu stack (with Minimize) but not in the the File stack (where Open Module is). Since CMD-M has a commonly used system-wide meaning, it would probably be best to change IDLE's Open Module to use something else. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 11:56:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Oct 2018 15:56:27 +0000 Subject: [issue28806] Improve the netrc library In-Reply-To: <1480158810.39.0.736994382472.issue28806@psf.upfronthosting.co.za> Message-ID: <1540828587.68.0.788709270274.issue28806@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -9533 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 12:31:26 2018 From: report at bugs.python.org (Diego Rojas) Date: Mon, 29 Oct 2018 16:31:26 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540830686.36.0.788709270274.issue34160@psf.upfronthosting.co.za> Change by Diego Rojas : ---------- pull_requests: +9535 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 12:49:09 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 29 Oct 2018 16:49:09 +0000 Subject: [issue34672] '%Z' strftime specifier never works with musl In-Reply-To: <1536897689.03.0.956365154283.issue34672@psf.upfronthosting.co.za> Message-ID: <1540831749.06.0.788709270274.issue34672@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: It looks like this issue has been fixed by GH-9288. Can this be closed? Should we backport? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 13:13:09 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 29 Oct 2018 17:13:09 +0000 Subject: [issue22377] %Z in strptime doesn't match EST and others In-Reply-To: <1410301455.57.0.912701656833.issue22377@psf.upfronthosting.co.za> Message-ID: <1540833189.81.0.788709270274.issue22377@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I think strptime should only accept %Z when it comes together with %z and not do any validation. This is close to the current behavior. %Z by itself is useless because even when it is accepted, the value is discarded: >>> print(datetime.strptime('UTC', '%Z')) 1900-01-01 00:00:00 You have to use %z to get an aware datetime instance: >>> print(datetime.strptime('UTC+0000', '%Z%z')) 1900-01-01 00:00:00+00:00 The validation is already fairly lax: >>> print(datetime.strptime('UTC+1234', '%Z%z')) 1900-01-01 00:00:00+12:34 I don't think this issue has anything to do with the availability of zoneinfo database. Timezone abbreviations are often ambiguous and should only serve as a human-readable supplement to the UTC offset and cannot by itself be used as a TZ specification. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 13:24:03 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 29 Oct 2018 17:24:03 +0000 Subject: [issue33940] datetime.strptime have no directive to convert date values with Era and Time Zone name In-Reply-To: <1529672249.4.0.56676864532.issue33940@psf.upfronthosting.co.za> Message-ID: <1540833843.59.0.788709270274.issue33940@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Since the Python datetime only supports dates within 0001-01-01 through 9999-12-31 range, it is not clear how we can meaningfully support the AD/BC era designation. Looking at man strftime page on my Mac, I see that they use every upper an lower case letter as a valid format specifier, but they still not have a letter code for AD/BC. In the "BUGS" section they humorousely complain that "There is no conversion specification for the phase of the moon" which makes me think that the moon phase designations are higher on some people agenda than the era designations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 13:24:32 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 29 Oct 2018 17:24:32 +0000 Subject: [issue33940] datetime.strptime have no directive to convert date values with Era and Time Zone name In-Reply-To: <1529672249.4.0.56676864532.issue33940@psf.upfronthosting.co.za> Message-ID: <1540833872.14.0.788709270274.issue33940@psf.upfronthosting.co.za> Change by Alexander Belopolsky : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 13:24:53 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 29 Oct 2018 17:24:53 +0000 Subject: [issue33940] datetime.strptime have no directive to convert date values with Era and Time Zone name In-Reply-To: <1529672249.4.0.56676864532.issue33940@psf.upfronthosting.co.za> Message-ID: <1540833893.3.0.788709270274.issue33940@psf.upfronthosting.co.za> Change by Alexander Belopolsky : ---------- superseder: -> %Z in strptime doesn't match EST and others _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 13:25:52 2018 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Oct 2018 17:25:52 +0000 Subject: [issue28655] Tests altered the execution environment in isolated mode In-Reply-To: <1478767618.32.0.527967950395.issue28655@psf.upfronthosting.co.za> Message-ID: <1540833952.27.0.788709270274.issue28655@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +9536 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 13:30:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Oct 2018 17:30:28 +0000 Subject: [issue33331] Clean modules in the reversed order In-Reply-To: <1524393498.13.0.682650639539.issue33331@psf.upfronthosting.co.za> Message-ID: <1540834228.17.0.788709270274.issue33331@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c93c58b5d560cfe44d9884ff02c9b18e06333360 by Serhiy Storchaka in branch 'master': bpo-33331: Clean modules in the reversed order in PyImport_Cleanup(). (GH-6565) https://github.com/python/cpython/commit/c93c58b5d560cfe44d9884ff02c9b18e06333360 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 13:31:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Oct 2018 17:31:10 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540834270.57.0.788709270274.issue34160@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3b05ad7be09af1d4510eb698b0a70d36387f296e by Serhiy Storchaka in branch 'master': bpo-34160: Preserve user specified order of Element attributes in html. (GH-10190) https://github.com/python/cpython/commit/3b05ad7be09af1d4510eb698b0a70d36387f296e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 13:36:41 2018 From: report at bugs.python.org (Diego Rojas) Date: Mon, 29 Oct 2018 17:36:41 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540834601.8.0.788709270274.issue34160@psf.upfronthosting.co.za> Diego Rojas added the comment: Serhiy Storchaka, Raymond. I already made the 10219 PR. Preserves order in html Element attributes and minidom. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 13:48:27 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 29 Oct 2018 17:48:27 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1540835307.64.0.788709270274.issue35070@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I've now updated my personal machine to Mojave and cannot reproduce the failure. I'm going to chalk this one up to some weird corporate active directory or whatnot weirdness. I'd still love to know why the code in Python works differently that the standalone C version, but I don't plan on spending much time on this issue unless new data comes in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 14:14:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Oct 2018 18:14:30 +0000 Subject: [issue33331] Clean modules in the reversed order In-Reply-To: <1524393498.13.0.682650639539.issue33331@psf.upfronthosting.co.za> Message-ID: <1540836870.08.0.788709270274.issue33331@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 14:20:27 2018 From: report at bugs.python.org (Joy Diamond) Date: Mon, 29 Oct 2018 18:20:27 +0000 Subject: [issue35106] Add documentation for `type.__subclasses__` to docs.python.org Message-ID: <1540837227.59.0.788709270274.issue35106@psf.upfronthosting.co.za> New submission from Joy Diamond : Add documentation for `type.__subclasses__` to docs.python.org Python ideas discussion: https://mail.python.org/pipermail/python-ideas/2018-October/054361.html ---------- assignee: docs at python components: Documentation messages: 328848 nosy: docs at python, joydiamond priority: normal severity: normal status: open title: Add documentation for `type.__subclasses__` to docs.python.org versions: Python 2.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 14:21:14 2018 From: report at bugs.python.org (Robert Xiao) Date: Mon, 29 Oct 2018 18:21:14 +0000 Subject: [issue33074] dbm corrupts index on macOS (_dbm module) In-Reply-To: <1521009252.74.0.467229070634.issue33074@psf.upfronthosting.co.za> Message-ID: <1540837274.83.0.788709270274.issue33074@psf.upfronthosting.co.za> Robert Xiao added the comment: I just started a new project, thoughtlessly decided to use `shelve` to store data, and lost it all again thanks to this bug. To reiterate: Although `gdbm` might fix this issue, it's not installed by default. But the issue is with `dbm`: Python is allowing me to insert elements into the database which exceed internal limits, causing the database to become silently corrupt upon retrieval. This is an unacceptable situation - a very normal, non-complex use of the standard library is causing data loss without any indication that the loss is occurring. At the very least there should be a warning or error that the data inserted exceeds dbm's limits, and in an ideal world dbm would not fall over from inserting a few KB of data in a single row (but I understand that's a third party problem at that point). Can't we just ship a dbm that is backed with a more robust engine, like a SQLite key-value table? ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 14:24:20 2018 From: report at bugs.python.org (Joy Diamond) Date: Mon, 29 Oct 2018 18:24:20 +0000 Subject: [issue35106] Add documentation for `type.__subclasses__` to docs.python.org In-Reply-To: <1540837227.59.0.788709270274.issue35106@psf.upfronthosting.co.za> Message-ID: <1540837460.02.0.788709270274.issue35106@psf.upfronthosting.co.za> Joy Diamond added the comment: Documented here: https://docs.python.org/3/library/stdtypes.html#class.__subclasses__ (Though does not appear in google searches) ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 14:32:11 2018 From: report at bugs.python.org (Michael Felt) Date: Mon, 29 Oct 2018 18:32:11 +0000 Subject: [issue34897] distutils test errors when CXX is not set In-Reply-To: <1540564571.03.0.788709270274.issue34897@psf.upfronthosting.co.za> Message-ID: Michael Felt added the comment: > On 10/26/2018 5:36 PM, Tal Einat wrote: > Tal Einat added the comment: > > I'm not sure that the resolution currently suggested, changing compiler.set_executables(), is the right way to go. > > This change to distutils is a break of backwards compatibility. Though it is a minor change, it could still break existing code. > > Fixing test.support seems just as good to me in terms of code design, and better in that it is only used internally for our tests. > > (BTW, instead of `elif cmd is None or (not cmd):`, you can just use `elif not cmd:`.) Thx. One of the python bits I need to embrace. Although - during my testing I saw that the null string "" was not being accepted as None, but was accepted as "not cmd". My reading error was taking None to mean a value was not initialized while it seems to be None is a 'value' that is assigned, while ?not xxx' can be either - never assigned or a null-length string. This is the "ambiguity", at least for myself, that I feel I tracked down. It is "unfortunate" if this breaks backward compatibility - IF the backward compatibility has been based on an ambiguity. Or I again, miss a fine-point of Python coding. Won?'t be the last time I expect. Comments requested. > > ---------- > nosy: +taleinat > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 14:33:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Oct 2018 18:33:35 +0000 Subject: [issue34966] Pydoc: better support of method aliases In-Reply-To: <1539359411.67.0.788709270274.issue34966@psf.upfronthosting.co.za> Message-ID: <1540838015.32.0.788709270274.issue34966@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 14:36:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Oct 2018 18:36:31 +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: <1540838191.11.0.788709270274.issue34850@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Gregory, do you still have objections against adding these warnings? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 15:04:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 19:04:23 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540839863.85.0.788709270274.issue35059@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9537 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 15:13:59 2018 From: report at bugs.python.org (Michael Felt) Date: Mon, 29 Oct 2018 19:13:59 +0000 Subject: [issue34765] Update install-sh In-Reply-To: <1537544827.56.0.956365154283.issue34765@psf.upfronthosting.co.za> Message-ID: <1540840439.76.0.788709270274.issue34765@psf.upfronthosting.co.za> Michael Felt added the comment: This is closed, however, since this was merged the AIX buildbots have failed. This is because the file mode bits lack the -x root at x066:[/data/prj/python/git/cpython-master]find . -name install-sh -ls 148833829 16 -rw-r--r-- 1 root felt 15368 Oct 29 17:34 ./install-sh Can this be fixed as part of this issue, or do I need to open a new one? Currently both AIX build-bots fail in the build phase with: renaming build/scripts-3.8/pydoc3 to build/scripts-3.8/pydoc3.8 renaming build/scripts-3.8/idle3 to build/scripts-3.8/idle3.8 renaming build/scripts-3.8/2to3 to build/scripts-3.8/2to3-3.8 ./install-sh -c -m 644 ./Tools/gdb/libpython.py python-gdb.py ./install-sh: not found ---------- nosy: +Michael.Felt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 15:27:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 19:27:18 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540841238.68.0.788709270274.issue35059@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9538 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 15:30:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 19:30:22 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1540841422.48.0.788709270274.issue35081@psf.upfronthosting.co.za> STINNER Victor added the comment: Discussion on python-dev: https://mail.python.org/pipermail/python-dev/2018-October/155587.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 15:30:34 2018 From: report at bugs.python.org (Benoit Pierre) Date: Mon, 29 Oct 2018 19:30:34 +0000 Subject: [issue32696] Fix pickling exceptions with multiple arguments In-Reply-To: <1517156155.35.0.467229070634.issue32696@psf.upfronthosting.co.za> Message-ID: <1540841434.58.0.788709270274.issue32696@psf.upfronthosting.co.za> Change by Benoit Pierre : ---------- nosy: +benoit-pierre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 15:30:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 19:30:44 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540841444.9.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: TODO: Convert _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() macros to static inline functions, but there are inter-dependencies issues: see bpo-35081 and https://mail.python.org/pipermail/python-dev/2018-October/155592.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 15:36:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 19:36:19 +0000 Subject: [issue34765] Update install-sh In-Reply-To: <1537544827.56.0.956365154283.issue34765@psf.upfronthosting.co.za> Message-ID: <1540841779.33.0.788709270274.issue34765@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 15:37:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 19:37:01 +0000 Subject: [issue34765] Update install-sh In-Reply-To: <1537544827.56.0.956365154283.issue34765@psf.upfronthosting.co.za> Message-ID: <1540841821.9.0.788709270274.issue34765@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9539 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 15:37:40 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Oct 2018 19:37:40 +0000 Subject: [issue23220] IDLE: Document how Shell displays user code output In-Reply-To: <1420937687.17.0.885670059147.issue23220@psf.upfronthosting.co.za> Message-ID: <1540841860.93.0.788709270274.issue23220@psf.upfronthosting.co.za> Terry J. Reedy added the comment: While editing 'IDLE-console differences' (added in the patch above) for #35099, I decided that it should be renamed (to, say, 'Executing user code') and limited to the effect of executing user code in IDLE's execution process instead of a standard python process. Except for a intentional change to make developing tkinter code easier, such effects are unintended and possibly bad for developers using IDLE. This issue is about one aspect of how IDLE's Shell, in the GUI process, displays strings and bytes sent from the execution process via sys.stdout and sys.stderr. My previous revision of the title was wrong and my previous patch not directly relevant. I will make a new patch to add a new section ('Displaying user code output'?) describing various aspects of how Shell displays std text output, starting with this one. Most of the differences from various consoles and terminal are intentional and considered to be net positives. While the handling of control characters is inherited from tk, Serhiy and I have claimed on other issues that displaying one glyph per character has advantages for development as well as disadvantages. (Being about to display all but only the BMP subset of unicode is also inherited from tcl/tk.) One of my unposted ideas is to add an option to the run menu to run edited code in the system console/terminal, detached from IDLE, the same as if the file were run from a command line or directory listing. This would bypass both IDLE's execution and display effects. ---------- title: Documents input/output effects of how IDLE runs user code -> IDLE: Document how Shell displays user code output versions: +Python 3.6, Python 3.7, Python 3.8 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 15:51:24 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Oct 2018 19:51:24 +0000 Subject: [issue35095] Implement pathlib.Path.append_bytes and pathlib.Path.append_text In-Reply-To: <1540754241.69.0.788709270274.issue35095@psf.upfronthosting.co.za> Message-ID: <1540842684.43.0.788709270274.issue35095@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 15:52:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 19:52:45 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540842765.03.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 541497e6197268517b0d492856027774c43e0949 by Victor Stinner in branch 'master': bpo-35059: Convert Py_XINCREF() to static inline function (GH-10224) https://github.com/python/cpython/commit/541497e6197268517b0d492856027774c43e0949 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 15:53:16 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Oct 2018 19:53:16 +0000 Subject: [issue35095] Implement pathlib.Path.append_bytes and pathlib.Path.append_text In-Reply-To: <1540754241.69.0.788709270274.issue35095@psf.upfronthosting.co.za> Message-ID: <1540842796.16.0.788709270274.issue35095@psf.upfronthosting.co.za> Antoine Pitrou added the comment: First, it is quite uncommon to open a file in append mode. Second, when you open in append mode, often you will gradually append (such as for a logfile), so a single method call isn't effective. So I think this does not solve an important use case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 15:58:17 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Oct 2018 19:58:17 +0000 Subject: [issue35095] Implement pathlib.Path.append_bytes and pathlib.Path.append_text In-Reply-To: <1540754241.69.0.788709270274.issue35095@psf.upfronthosting.co.za> Message-ID: <1540843097.15.0.788709270274.issue35095@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Thanks @pitrou for the feedback! As you think this will not be that useful, I will close the issue and the proposal PR. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 15:59:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 19:59:01 +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: <1540843141.7.0.788709270274.issue22021@psf.upfronthosting.co.za> STINNER Victor added the comment: FYI. Joannah Nanjekye converted Issue22021.patch into a PR: PR 10191. Serhiy Storchaka closed the PR: "The current behavior looks correct to me. It is consistent with the behavior of the tar command. This change breaks tests and I think it will break user code. Read the discussion on bpo-22021." https://github.com/python/cpython/pull/10191#issuecomment-434040367 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 16:03:30 2018 From: report at bugs.python.org (TestUser) Date: Mon, 29 Oct 2018 20:03:30 +0000 Subject: [issue35084] binascii.Error: Incorrect padding In-Reply-To: <1540773760.94.0.788709270274.issue35084@psf.upfronthosting.co.za> Message-ID: TestUser added the comment: In the new version of Ubuntu this generates a system crash report. Normally I delete them. Give me a day or to to get you one. Funny, since it is the crash reports use of base64 encoding that led me to the Python base64 module. On Sun, Oct 28, 2018 at 8:42 PM Karthikeyan Singaravelan < report at bugs.python.org> wrote: > > Karthikeyan Singaravelan added the comment: > > Can you please add your definition of a crash? Crash in bug report context > is used in C language context like causing a segfault, buffer overflow etc. > Proper Exceptions are not considered as a crash and this is an exception > raised since the contents are invalid. If it crashes as I mentioned above > can you please add the crash log? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 16:04:28 2018 From: report at bugs.python.org (Michael Felt) Date: Mon, 29 Oct 2018 20:04:28 +0000 Subject: [issue34765] Update install-sh In-Reply-To: <1537544827.56.0.956365154283.issue34765@psf.upfronthosting.co.za> Message-ID: <1540843468.09.0.788709270274.issue34765@psf.upfronthosting.co.za> Michael Felt added the comment: FYI: On my manual build server I have coreutils "install" installed, and it seems install-sh is not called in that case (which is why I never saw with manual builds) FYI: There is also an issue (I hope side-effect) that pyexpat is not building while install-sh is not executing. I see the new PR - thx for the quick response! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 16:09:43 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Oct 2018 20:09:43 +0000 Subject: [issue34945] regression with ./python -m test and pdb In-Reply-To: <1539094779.54.0.545547206417.issue34945@psf.upfronthosting.co.za> Message-ID: <1540843783.76.0.788709270274.issue34945@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset 02277482ea765335e497ecd9661d4bde9b5ddc67 by Pablo Galindo in branch 'master': bpo-34945: Buffer output in test suite only when creating junit file (GH-10204) https://github.com/python/cpython/commit/02277482ea765335e497ecd9661d4bde9b5ddc67 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 16:10:11 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Oct 2018 20:10:11 +0000 Subject: [issue34945] regression with ./python -m test and pdb In-Reply-To: <1539094779.54.0.545547206417.issue34945@psf.upfronthosting.co.za> Message-ID: <1540843811.33.0.788709270274.issue34945@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: This should be fixed (it works now with and without -v). :) ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 16:11:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Oct 2018 20:11:23 +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: <1540843883.31.0.788709270274.issue22021@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a documentation issue. ---------- stage: patch review -> needs patch versions: +Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 16:18:10 2018 From: report at bugs.python.org (tzickel) Date: Mon, 29 Oct 2018 20:18:10 +0000 Subject: [issue3243] Support iterable bodies in httplib In-Reply-To: <1214848938.76.0.928668674728.issue3243@psf.upfronthosting.co.za> Message-ID: <1540844290.11.0.788709270274.issue3243@psf.upfronthosting.co.za> Change by tzickel : ---------- pull_requests: +9540 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 16:32:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 20:32:25 +0000 Subject: [issue28655] Tests altered the execution environment in isolated mode In-Reply-To: <1478767618.32.0.527967950395.issue28655@psf.upfronthosting.co.za> Message-ID: <1540845145.9.0.788709270274.issue28655@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 4687bc993a275eaeb27a8b2068b128ce1f464818 by Victor Stinner (Maite Gim?nez) in branch '3.6': bpo-28655: Fix test bdb for isolate mode (GH-10220) https://github.com/python/cpython/commit/4687bc993a275eaeb27a8b2068b128ce1f464818 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 16:43:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 20:43:12 +0000 Subject: [issue34765] Update install-sh In-Reply-To: <1537544827.56.0.956365154283.issue34765@psf.upfronthosting.co.za> Message-ID: <1540845792.18.0.788709270274.issue34765@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset ed271b2350486b1fa031fa70e1e99d0d9b2b2133 by Victor Stinner in branch 'master': bpo-34765: install-sh is executable (GH-10225) https://github.com/python/cpython/commit/ed271b2350486b1fa031fa70e1e99d0d9b2b2133 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 16:43:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 20:43:37 +0000 Subject: [issue34765] Update install-sh In-Reply-To: <1537544827.56.0.956365154283.issue34765@psf.upfronthosting.co.za> Message-ID: <1540845817.89.0.788709270274.issue34765@psf.upfronthosting.co.za> STINNER Victor added the comment: I made install-sh executable again. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 16:44:40 2018 From: report at bugs.python.org (ppperry) Date: Mon, 29 Oct 2018 20:44:40 +0000 Subject: [issue35098] Deleting __new__ does not restore previous behavior In-Reply-To: <1540772185.07.0.788709270274.issue35098@psf.upfronthosting.co.za> Message-ID: <1540845880.31.0.788709270274.issue35098@psf.upfronthosting.co.za> ppperry added the comment: This is a duplicate of issue25731 ---------- nosy: +ppperry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 16:44:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Oct 2018 20:44:58 +0000 Subject: [issue34945] regression with ./python -m test and pdb In-Reply-To: <1539094779.54.0.545547206417.issue34945@psf.upfronthosting.co.za> Message-ID: <1540845898.67.0.788709270274.issue34945@psf.upfronthosting.co.za> STINNER Victor added the comment: At least Python 3.6 and 3.7 branches are affected as well, so I reopen the issue. ---------- status: closed -> open versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 16:46:39 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Oct 2018 20:46:39 +0000 Subject: [issue34945] regression with ./python -m test and pdb In-Reply-To: <1539094779.54.0.545547206417.issue34945@psf.upfronthosting.co.za> Message-ID: <1540845999.74.0.788709270274.issue34945@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9541 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 16:46:48 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Oct 2018 20:46:48 +0000 Subject: [issue34945] regression with ./python -m test and pdb In-Reply-To: <1539094779.54.0.545547206417.issue34945@psf.upfronthosting.co.za> Message-ID: <1540846008.46.0.788709270274.issue34945@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9542 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 16:47:46 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Oct 2018 20:47:46 +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: <1540846066.91.0.788709270274.issue35031@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset f6a47f3e316cede2a07a1f74a509f6d80ab8fef0 by Pablo Galindo in branch 'master': bpo-35031: Fix test_start_tls_server_1 on FreeBSD buildbots (GH-10011) https://github.com/python/cpython/commit/f6a47f3e316cede2a07a1f74a509f6d80ab8fef0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 16:58:27 2018 From: report at bugs.python.org (Eryk Sun) Date: Mon, 29 Oct 2018 20:58:27 +0000 Subject: [issue1154351] add get_current_dir_name() to os module Message-ID: <1540846707.34.0.788709270274.issue1154351@psf.upfronthosting.co.za> Eryk Sun added the comment: > Windows getcwd() returns a path without resolved symbolic links This provides consistency. If the working directory were resolved, then accessing "../file.ext" after chdir("C:/Temp/link") could be inconsistent with accessing "C:/Temp/link/../file.ext". This is a consequence of the way DOS paths are translated to native NT paths, which is implemented strictly as a string operation. Since "." and ".." are regular names in NT and not necessarily reserved (e.g. FAT32 allows creating a file named ".."), resolving a path POSIX style would require resolving it up to each ".." component. This would entail potentially making many system calls just to normalize a path before even getting to the intended operation. > Use os.path.realpath() is you want to resolve symbolic links In Windows, os.path.realpath is an alias for os.path.abspath, so it doesn't resolve links. Use os.path._getfinalpathname to resolve a file-system path. This returns a \\?\ local-device path, which I'd encourage retaining rather than automatically converting to a regular DOS path. The resulting path may be too long for a regular DOS path (if long paths aren't supported), or the final component of the path may conflict with DOS quirks such as reserved device names (e.g. "nul.txt") and ignoring trailing dots and spaces. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 17:05:38 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Oct 2018 21:05:38 +0000 Subject: [issue34945] regression with ./python -m test and pdb In-Reply-To: <1539094779.54.0.545547206417.issue34945@psf.upfronthosting.co.za> Message-ID: <1540847138.74.0.788709270274.issue34945@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 58f7bf3a892031616a6b06ef4b8d36e2ebec172b by Miss Islington (bot) in branch '3.7': bpo-34945: Buffer output in test suite only when creating junit file (GH-10204) https://github.com/python/cpython/commit/58f7bf3a892031616a6b06ef4b8d36e2ebec172b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 17:07:54 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Oct 2018 21:07:54 +0000 Subject: [issue34945] regression with ./python -m test and pdb In-Reply-To: <1539094779.54.0.545547206417.issue34945@psf.upfronthosting.co.za> Message-ID: <1540847274.26.0.788709270274.issue34945@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 7b689c68ab3236455f7d58954435d029e2bb2c8a by Miss Islington (bot) in branch '3.6': bpo-34945: Buffer output in test suite only when creating junit file (GH-10204) https://github.com/python/cpython/commit/7b689c68ab3236455f7d58954435d029e2bb2c8a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 17:09:33 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Oct 2018 21:09:33 +0000 Subject: [issue34945] regression with ./python -m test and pdb In-Reply-To: <1539094779.54.0.545547206417.issue34945@psf.upfronthosting.co.za> Message-ID: <1540847373.05.0.788709270274.issue34945@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: 3.6 and 3.7 are backported! ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 18:26:38 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 29 Oct 2018 22:26:38 +0000 Subject: [issue35107] untokenize() fails on tokenize output when a newline is missing Message-ID: <1540851998.41.0.788709270274.issue35107@psf.upfronthosting.co.za> New submission from Gregory P. Smith : The behavior change introduced in 3.6.7 and 3.7.1 via https://bugs.python.org/issue33899 has further consequences: ```python >>> tokenize.untokenize(tokenize.generate_tokens(io.StringIO('#').readline)) Traceback (most recent call last): File "", line 1, in File ".../cpython/cpython-upstream/Lib/tokenize.py", line 332, in untokenize out = ut.untokenize(iterable) File ".../cpython/cpython-upstream/Lib/tokenize.py", line 266, in untokenize self.add_whitespace(start) File ".../cpython/cpython-upstream/Lib/tokenize.py", line 227, in add_whitespace raise ValueError("start ({},{}) precedes previous end ({},{})" ValueError: start (1,1) precedes previous end (2,0) ``` The same goes for using the documented tokenize API (`generate_tokens` is not documented): ``` tokenize.untokenize(tokenize.tokenize(io.BytesIO(b'#').readline)) ... ValueError: start (1,1) precedes previous end (2,0) ``` `untokenize()` is no longer able to work on output of `generate_tokens()` if the input to generate_tokens() did not end in a newline. Today's workaround: Always append a newline if one is missing to the line that the readline callable passed to tokenize or generate_tokens returns. Very annoying to implement. ---------- messages: 328876 nosy: ammar2, gregory.p.smith, meador.inge, taleinat, terry.reedy priority: normal severity: normal status: open title: untokenize() fails on tokenize output when a newline is missing versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 18:27:02 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 29 Oct 2018 22:27:02 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1540852022.67.0.788709270274.issue33899@psf.upfronthosting.co.za> Gregory P. Smith added the comment: https://bugs.python.org/issue35107 filed to track further fallout from this API change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 18:49:32 2018 From: report at bugs.python.org (Ammar Askar) Date: Mon, 29 Oct 2018 22:49:32 +0000 Subject: [issue35107] untokenize() fails on tokenize output when a newline is missing In-Reply-To: <1540851998.41.0.788709270274.issue35107@psf.upfronthosting.co.za> Message-ID: <1540853372.24.0.788709270274.issue35107@psf.upfronthosting.co.za> Ammar Askar added the comment: Looks like this is caused by this line here: https://github.com/python/cpython/blob/b83d917fafd87e4130f9c7d5209ad2debc7219cd/Lib/tokenize.py#L551-L558 which adds a newline token implicitly after comments. Since the input didn't terminate with a '\n', the code to add a newline at the end of input kicks in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 19:16:58 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Oct 2018 23:16:58 +0000 Subject: [issue35107] untokenize() fails on tokenize output when a newline is missing In-Reply-To: <1540851998.41.0.788709270274.issue35107@psf.upfronthosting.co.za> Message-ID: <1540855018.59.0.788709270274.issue35107@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 19:21:18 2018 From: report at bugs.python.org (Ammar Askar) Date: Mon, 29 Oct 2018 23:21:18 +0000 Subject: [issue35107] untokenize() fails on tokenize output when a newline is missing In-Reply-To: <1540851998.41.0.788709270274.issue35107@psf.upfronthosting.co.za> Message-ID: <1540855278.84.0.788709270274.issue35107@psf.upfronthosting.co.za> Ammar Askar added the comment: fwiw I think there's more at play here than the newline change. This is the behavior I get on 3.6.5 (before the newline change is applied). # works as expected but check out this input: >>> t.untokenize(tokenize.generate_tokens(io.StringIO('#').readline)) '#' >>> t.untokenize(tokenize.generate_tokens(io.StringIO('x=1').readline)) Traceback (most recent call last): File "", line 1, in File "D:\Python365\lib\tokenize.py", line 272, in untokenize self.add_whitespace(start) File "D:\Python365\lib\tokenize.py", line 234, in add_whitespace .format(row, col, self.prev_row, self.prev_col)) ValueError: start (1,0) precedes previous end (2,0) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 20:39:32 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 30 Oct 2018 00:39:32 +0000 Subject: [issue35107] untokenize() fails on tokenize output when a newline is missing In-Reply-To: <1540851998.41.0.788709270274.issue35107@psf.upfronthosting.co.za> Message-ID: <1540859972.8.0.788709270274.issue35107@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Interesting! I have a 3.6.2 sitting around and cannot reproduce that "x=1" behavior. I don't know what the behavior _should_ be. It just feels natural that untokenize should be able to round trip anything tokenize or generate_tokens emits without raising an exception. I'm filing this as the "#" case came up within some existing code we had that happened to effectively test that particular round trip. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 20:51:53 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 30 Oct 2018 00:51:53 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1540860713.97.0.788709270274.issue34160@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for doing the additional work to finish this up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 29 20:56:47 2018 From: report at bugs.python.org (Ammar Askar) Date: Tue, 30 Oct 2018 00:56:47 +0000 Subject: [issue35107] untokenize() fails on tokenize output when a newline is missing In-Reply-To: <1540851998.41.0.788709270274.issue35107@psf.upfronthosting.co.za> Message-ID: <1540861007.74.0.788709270274.issue35107@psf.upfronthosting.co.za> Ammar Askar added the comment: Actually nevermind, disregard that, I was just testing it wrong. I think the simplest fix here is to add '#' to the list of characters here so we don't double insert newlines for comments: https://github.com/python/cpython/blob/b83d917fafd87e4130f9c7d5209ad2debc7219cd/Lib/tokenize.py#L659 And a test for round tripping a file ending with a comment but no newline will allow that particular branch to be tested. I'll make a PR this week if no one else gets to it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 02:00:07 2018 From: report at bugs.python.org (Michael Felt) Date: Tue, 30 Oct 2018 06:00:07 +0000 Subject: [issue34765] Update install-sh In-Reply-To: <1537544827.56.0.956365154283.issue34765@psf.upfronthosting.co.za> Message-ID: <1540879207.61.0.788709270274.issue34765@psf.upfronthosting.co.za> Michael Felt added the comment: The AIX build-bots thank you. Back to "failed-test" status. 1721 ... failed test (failure) 1720 ... failed compile (failure) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 02:32:57 2018 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 30 Oct 2018 06:32:57 +0000 Subject: [issue20397] distutils --record option does not validate existence of byte-compiled files In-Reply-To: <1390746014.88.0.900467086198.issue20397@psf.upfronthosting.co.za> Message-ID: <1540881177.22.0.788709270274.issue20397@psf.upfronthosting.co.za> Change by Kubilay Kocak : ---------- versions: +Python 3.7, Python 3.8 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 02:45:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 06:45:57 +0000 Subject: [issue35107] untokenize() fails on tokenize output when a newline is missing In-Reply-To: <1540851998.41.0.788709270274.issue35107@psf.upfronthosting.co.za> Message-ID: <1540881957.75.0.788709270274.issue35107@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I am surprised, that removing the newline character adds a token: >>> pprint.pprint(list(tokenize.generate_tokens(io.StringIO('#\n').readline))) [TokenInfo(type=55 (COMMENT), string='#', start=(1, 0), end=(1, 1), line='#\n'), TokenInfo(type=56 (NL), string='\n', start=(1, 1), end=(1, 2), line='#\n'), TokenInfo(type=0 (ENDMARKER), string='', start=(2, 0), end=(2, 0), line='')] >>> pprint.pprint(list(tokenize.generate_tokens(io.StringIO('#').readline))) [TokenInfo(type=55 (COMMENT), string='#', start=(1, 0), end=(1, 1), line='#'), TokenInfo(type=56 (NL), string='', start=(1, 1), end=(1, 1), line='#'), TokenInfo(type=4 (NEWLINE), string='', start=(1, 1), end=(1, 2), line=''), TokenInfo(type=0 (ENDMARKER), string='', start=(2, 0), end=(2, 0), line='')] ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 04:20:35 2018 From: report at bugs.python.org (Roman Inflianskas) Date: Tue, 30 Oct 2018 08:20:35 +0000 Subject: [issue35108] inspect.getmembers passes exceptions from object's properties through Message-ID: <1540887635.53.0.788709270274.issue35108@psf.upfronthosting.co.za> New submission from Roman Inflianskas : I use inspect.getmembers for getting members of splinter.webdriver.BaseWebDriver. The problem is that it has a property status_code raises NotImplementedError: https://github.com/cobrateam/splinter/blob/master/splinter/driver/webdriver/__init__.py#L191. This exception passes through try block in https://github.com/python/cpython/blob/master/Lib/inspect.py#L343 because it doesn't contain: except Exception: pass section. In the result, instead of members of the object, I get an exception. I think there are two possible expected behaviors: 1. Just ignore the exceptions and return members without the members, that raise exceptions. 2. Instead of members, return tuple like: ... try: ... except Exception as e: RAISES_EXCEPTION = object() value = (RAISES_EXCEPTION, e) ... ---------- components: Library (Lib) messages: 328885 nosy: rominf priority: normal severity: normal status: open title: inspect.getmembers passes exceptions from object's properties through type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 04:34:25 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Oct 2018 08:34:25 +0000 Subject: [issue35109] Doctest in CI uses python binary built from master causing DeprecationWarnings Message-ID: <1540888465.31.0.788709270274.issue35109@psf.upfronthosting.co.za> New submission from Karthikeyan Singaravelan : Currently we run doctest in CI and we use the environment variable PYTHON to get the path of python binary to be used for virtualenv creation. We set PYTHON=../python in .travis.yml at [0] before running tests thus this causes the CI to use development version of the binary. Some of the modules used for doctest have incompatible changes related to importing from collections. The DeprecationWarning related code will be removed in 3.8 thus it will cause the doctest to fail while using the modules in CI. Since I have enabled -W in issue34081 they are visible now. I propose using stable version of Python like python 3.7 so that when we remove collections import related code in master the doctest doesn't fail on Travis. There are respective PRs for this warnings in the repo but using stable version will fix this. We don't need to test the modules against the master branch of Python for doctest which is currently doing. Sample warning : https://travis-ci.org/python/cpython/jobs/448195459#L2603 > /home/travis/build/python/cpython/Doc/venv/lib/python3.8/site-packages/babel/localedata.py:17: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working > from collections import MutableMapping On local machine the .travis.yml is not executed thus it uses PYTHON=python3 in Doc/Makefile and thus this not a problem locally building the docs that uses a stable version of Python. Adding @mdk for feedback on this. [0] https://github.com/python/cpython/blob/master/.travis.yml#L164 ---------- assignee: docs at python components: Build, Documentation messages: 328886 nosy: docs at python, mdk, xtreak priority: normal severity: normal status: open title: Doctest in CI uses python binary built from master causing DeprecationWarnings versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 04:43:36 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Oct 2018 08:43:36 +0000 Subject: [issue27200] make doctest in CPython has failures In-Reply-To: <1464988408.0.0.840317371896.issue27200@psf.upfronthosting.co.za> Message-ID: <1540889016.92.0.788709270274.issue27200@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Sorry to bump this but to add some more context doctest related issues were fixed in issue34962 and is now enforced in CI. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 05:01:32 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 30 Oct 2018 09:01:32 +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: <1540890092.73.0.788709270274.issue34864@psf.upfronthosting.co.za> Tal Einat added the comment: I agree that mentioning that IDLE won't work 100% with that setting on is a good idea. I also agree that at this point it's not worth the effort to do anything more than that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 05:02:04 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 30 Oct 2018 09:02:04 +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: <1540890124.06.0.788709270274.issue34864@psf.upfronthosting.co.za> Change by Tal Einat : ---------- versions: +Python 2.7, Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 05:02:23 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 30 Oct 2018 09:02:23 +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: <1540890143.58.0.788709270274.issue34864@psf.upfronthosting.co.za> Change by Tal Einat : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 05:40:33 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 09:40:33 +0000 Subject: [issue35110] Fix more spaces around hyphens and dashes Message-ID: <1540892433.13.0.788709270274.issue35110@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The following PR fixes several common errors in reStructuredText formatting. * When the line is broken after or before a hyphen or dash, a space will be inserted after or before a hyphen or dash in the rendered text. This is not always appropriate. It is a common error when use old blurb (was blurb with the fix released?), but can be introduced also manually. * Backslash followed by a space is used as a separator after a mark up, which doesn't insert a space. But when the line was broken on this space, this is not always work. Fixed also other similar errors. ---------- assignee: docs at python components: Documentation messages: 328889 nosy: docs at python, mdk, serhiy.storchaka priority: normal severity: normal status: open title: Fix more spaces around hyphens and dashes versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 05:44:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 09:44:01 +0000 Subject: [issue35110] Fix more spaces around hyphens and dashes In-Reply-To: <1540892433.13.0.788709270274.issue35110@psf.upfronthosting.co.za> Message-ID: <1540892641.09.0.788709270274.issue35110@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +9543 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 05:47:22 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Oct 2018 09:47:22 +0000 Subject: [issue35108] inspect.getmembers passes exceptions from object's properties through In-Reply-To: <1540887635.53.0.788709270274.issue35108@psf.upfronthosting.co.za> Message-ID: <1540892842.34.0.788709270274.issue35108@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. A simple reproducible in Python without splinter code. I think it happens for instances of the class where the attribute is a property raising exception and executing inspect.getmembers(Foo) works fine. # bpo35108.py import inspect class Foo(): @property def bar(self): raise NotImplementedError print(inspect.getmembers(Foo())) $. /python.exe ../backups/bpo35108.py Traceback (most recent call last): File "../backups/bpo35108.py", line 9, in print(inspect.getmembers(Foo())) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/inspect.py", line 344, in getmembers value = getattr(object, key) File "../backups/bpo35108.py", line 7, in bar raise NotImplementedError NotImplementedError ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 06:11:54 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Oct 2018 10:11:54 +0000 Subject: [issue35108] inspect.getmembers passes exceptions from object's properties through In-Reply-To: <1540887635.53.0.788709270274.issue35108@psf.upfronthosting.co.za> Message-ID: <1540894314.71.0.788709270274.issue35108@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Sorry I misread your title stating it's about object getattr for a property has to execute the underlying code it seems as explained in https://stackoverflow.com/a/30143990/2610955 . I don't know if there is a way through which an attribute access in case of property can be verified without executing it. In case of catching the exception and returning the attributes that don't raise exception since it depends on the runtime execution of the property where the exception might occur at one point in time and doesn't occur in another point of time causing confusion during debugging. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 07:02:36 2018 From: report at bugs.python.org (Dave Shawley) Date: Tue, 30 Oct 2018 11:02:36 +0000 Subject: [issue32972] unittest.TestCase coroutine support In-Reply-To: <1519843317.02.0.467229070634.issue32972@psf.upfronthosting.co.za> Message-ID: <1540897356.31.0.788709270274.issue32972@psf.upfronthosting.co.za> Dave Shawley added the comment: Hi all, I took a slightly different direction for adding async/await support to the unittest library. I summarized the approach that I took in a message to python-ideas (https://mail.python.org/pipermail/python-ideas/2018-October/054331.html) and a branch is available for preview in my fork of cpython (https://github.com/dave-shawley/cpython/pull/1). My question is whether I should reboot this bpo with my PR or create a new one since the implementation is different than what was already discussed? ---------- nosy: +dave-shawley _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 07:13:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 11:13:55 +0000 Subject: [issue35110] Fix more spaces around hyphens and dashes In-Reply-To: <1540892433.13.0.788709270274.issue35110@psf.upfronthosting.co.za> Message-ID: <1540898035.37.0.788709270274.issue35110@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Previous fixes for similar issues: PR 7002, PR 7579. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 07:16:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 11:16:07 +0000 Subject: [issue34876] Python3.8 changes how decorators are traced In-Reply-To: <1538521604.52.0.545547206417.issue34876@psf.upfronthosting.co.za> Message-ID: <1540898167.0.0.788709270274.issue34876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 95b6acf951fa7f503a3cc5ce7d969d7bcf2f95c9 by Serhiy Storchaka in branch 'master': bpo-34876: Change the lineno of the AST for decorated function and class. (GH-9731) https://github.com/python/cpython/commit/95b6acf951fa7f503a3cc5ce7d969d7bcf2f95c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 07:16:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 11:16:43 +0000 Subject: [issue34876] Python3.8 changes how decorators are traced In-Reply-To: <1538521604.52.0.545547206417.issue34876@psf.upfronthosting.co.za> Message-ID: <1540898203.26.0.788709270274.issue34876@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 Oct 30 07:19:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 11:19:53 +0000 Subject: [issue33237] Improve AttributeError message for partially initialized module In-Reply-To: <1523029412.67.0.682650639539.issue33237@psf.upfronthosting.co.za> Message-ID: <1540898393.91.0.788709270274.issue33237@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3e429dcc242e48fa4cbb1a91cf7c416c37b97b4e by Serhiy Storchaka in branch 'master': bpo-33237: Improve AttributeError message for partially initialized module. (GH-6398) https://github.com/python/cpython/commit/3e429dcc242e48fa4cbb1a91cf7c416c37b97b4e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 07:21:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 11:21:29 +0000 Subject: [issue33237] Improve AttributeError message for partially initialized module In-Reply-To: <1523029412.67.0.682650639539.issue33237@psf.upfronthosting.co.za> Message-ID: <1540898489.16.0.788709270274.issue33237@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 Oct 30 07:22:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 11:22:46 +0000 Subject: [issue31680] Expose curses library name and version on Python level In-Reply-To: <1507059542.78.0.213398074469.issue31680@psf.upfronthosting.co.za> Message-ID: <1540898566.62.0.788709270274.issue31680@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b232df9197a19e78d0e2a751e56e0e62547354ec by Serhiy Storchaka in branch 'master': bpo-31680: Add curses.ncurses_version. (GH-4217) https://github.com/python/cpython/commit/b232df9197a19e78d0e2a751e56e0e62547354ec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 07:23:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 11:23:08 +0000 Subject: [issue31680] Expose curses library name and version on Python level In-Reply-To: <1507059542.78.0.213398074469.issue31680@psf.upfronthosting.co.za> Message-ID: <1540898588.71.0.788709270274.issue31680@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 07:23:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 11:23:21 +0000 Subject: [issue31680] Expose curses library name and version on Python level In-Reply-To: <1507059542.78.0.213398074469.issue31680@psf.upfronthosting.co.za> Message-ID: <1540898601.72.0.788709270274.issue31680@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -7410 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 07:24:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 11:24:41 +0000 Subject: [issue34523] Choose the filesystem encoding before Python initialization (add _PyCoreConfig.filesystem_encoding) In-Reply-To: <1535413443.13.0.56676864532.issue34523@psf.upfronthosting.co.za> Message-ID: <1540898681.16.0.788709270274.issue34523@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9544 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 07:24:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 11:24:41 +0000 Subject: [issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions In-Reply-To: <1534251432.68.0.56676864532.issue34403@psf.upfronthosting.co.za> Message-ID: <1540898681.25.0.663665092547.issue34403@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9545 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 07:33:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 11:33:57 +0000 Subject: [issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions In-Reply-To: <1534251432.68.0.56676864532.issue34403@psf.upfronthosting.co.za> Message-ID: <1540899237.59.0.788709270274.issue34403@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9546 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 07:43:02 2018 From: report at bugs.python.org (andrew c) Date: Tue, 30 Oct 2018 11:43:02 +0000 Subject: [issue35111] Make Custom Object Classes JSON Serializable Message-ID: <1540899782.53.0.788709270274.issue35111@psf.upfronthosting.co.za> New submission from andrew c : When creating a custom class that doesn't inherit from the accepted classes, there is no way to serialize it using json.dumps or json.dump. I propose that __fromjson__ and __tojson__ that when present will be used by the Python's default encoder. This issue is widely documented on stackoverflow as a deficiency. You basically have a couple of options to solve this: 1. Implement a custom json.JSONEncoder/json.JSONDecoder 2. Implement a method like to/from json 3. Monkey patch the json library 4. Use a 3rd party library These are not very good options. If you can serialize an object using pickle, why not have the ability to serialize objects using json? Thank you ---------- messages: 328897 nosy: andrewchap priority: normal severity: normal status: open title: Make Custom Object Classes JSON Serializable 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 Tue Oct 30 07:46:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 11:46:47 +0000 Subject: [issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self" In-Reply-To: <1448654213.28.0.807225788685.issue25750@psf.upfronthosting.co.za> Message-ID: <1540900007.81.0.788709270274.issue25750@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: bpo-33012 is about more strong warnings in gcc 8. This issue introduced a warning in gcc 7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 07:50:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 11:50:11 +0000 Subject: [issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self" In-Reply-To: <1448654213.28.0.807225788685.issue25750@psf.upfronthosting.co.za> Message-ID: <1540900211.33.0.788709270274.issue25750@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is it necessary to use METH_FASTCALL? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 07:58:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 11:58:13 +0000 Subject: [issue34523] Choose the filesystem encoding before Python initialization (add _PyCoreConfig.filesystem_encoding) In-Reply-To: <1535413443.13.0.56676864532.issue34523@psf.upfronthosting.co.za> Message-ID: <1540900693.19.0.788709270274.issue34523@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 905f1ace5f7424e314ca7bed997868a2a3044839 by Victor Stinner in branch 'master': bpo-34523: Fix config_init_fs_encoding() for ASCII (GH-10232) https://github.com/python/cpython/commit/905f1ace5f7424e314ca7bed997868a2a3044839 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 07:58:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 11:58:13 +0000 Subject: [issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions In-Reply-To: <1534251432.68.0.56676864532.issue34403@psf.upfronthosting.co.za> Message-ID: <1540900693.3.0.702299269573.issue34403@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 905f1ace5f7424e314ca7bed997868a2a3044839 by Victor Stinner in branch 'master': bpo-34523: Fix config_init_fs_encoding() for ASCII (GH-10232) https://github.com/python/cpython/commit/905f1ace5f7424e314ca7bed997868a2a3044839 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 07:59:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 11:59:09 +0000 Subject: [issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions In-Reply-To: <1534251432.68.0.56676864532.issue34403@psf.upfronthosting.co.za> Message-ID: <1540900749.74.0.788709270274.issue34403@psf.upfronthosting.co.za> STINNER Victor added the comment: Michael Osipov: Oops, my commit b2457efc78b74a1d6d1b77d11a939e886b8a4e2c broke the filesystem encoding on HP-UX. It should be fixed by my commit 905f1ace5f7424e314ca7bed997868a2a3044839. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 07:59:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 11:59:23 +0000 Subject: [issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions In-Reply-To: <1534251432.68.0.56676864532.issue34403@psf.upfronthosting.co.za> Message-ID: <1540900763.57.0.788709270274.issue34403@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 21220bbe65108f5a763ead24a6b572f80d84c9e2 by Victor Stinner in branch '3.7': bpo-34403: Fix initfsencoding() for ASCII (GH-10233) https://github.com/python/cpython/commit/21220bbe65108f5a763ead24a6b572f80d84c9e2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 08:02:15 2018 From: report at bugs.python.org (nubirstein) Date: Tue, 30 Oct 2018 12:02:15 +0000 Subject: [issue35112] SpooledTemporaryFile and seekable() method Message-ID: <1540900935.98.0.788709270274.issue35112@psf.upfronthosting.co.za> New submission from nubirstein : Although seekable() method is implemented in the IOBase (which means it is callable in BytesIO and StringIO), SpooledTemporaryFile class from lib/tempfile.py still does not implement it. ---------- components: Library (Lib) messages: 328904 nosy: nubirstein priority: normal severity: normal status: open title: SpooledTemporaryFile and seekable() method type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 08:09:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 12:09:37 +0000 Subject: [issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions In-Reply-To: <1534251432.68.0.56676864532.issue34403@psf.upfronthosting.co.za> Message-ID: <1540901377.06.0.788709270274.issue34403@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9547 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 08:10:37 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Oct 2018 12:10:37 +0000 Subject: [issue35112] SpooledTemporaryFile and seekable() method In-Reply-To: <1540900935.98.0.788709270274.issue35112@psf.upfronthosting.co.za> Message-ID: <1540901437.16.0.788709270274.issue35112@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report. Search gives me a related issue with PR to implement IOBase for SpooledTemporaryFile : issue26175 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 08:11:49 2018 From: report at bugs.python.org (Shivank Gautam) Date: Tue, 30 Oct 2018 12:11:49 +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: <1540901509.72.0.788709270274.issue35052@psf.upfronthosting.co.za> Shivank Gautam added the comment: I just want to update that i was not able to work more in last two days as i was busy in some personal work. now i am on it and will update something soon. Sorry for delay :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 08:13:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 12:13:30 +0000 Subject: [issue32030] PEP 432: Rewrite Py_Main() In-Reply-To: <1510709424.02.0.213398074469.issue32030@psf.upfronthosting.co.za> Message-ID: <1540901610.34.0.788709270274.issue32030@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9548 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 08:14:39 2018 From: report at bugs.python.org (Felipe Rodrigues) Date: Tue, 30 Oct 2018 12:14:39 +0000 Subject: [issue25416] Add encoding aliases from the (HTML5) Encoding Standard In-Reply-To: <1444932787.73.0.313042926579.issue25416@psf.upfronthosting.co.za> Message-ID: <1540901679.84.0.788709270274.issue25416@psf.upfronthosting.co.za> Change by Felipe Rodrigues : ---------- keywords: +patch pull_requests: +9549 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 08:14:39 2018 From: report at bugs.python.org (Felipe Rodrigues) Date: Tue, 30 Oct 2018 12:14:39 +0000 Subject: [issue18624] Add alias for iso-8859-8-i which is the same as iso-8859-8 In-Reply-To: <1375398269.06.0.0330535739148.issue18624@psf.upfronthosting.co.za> Message-ID: <1540901679.92.0.663665092547.issue18624@psf.upfronthosting.co.za> Change by Felipe Rodrigues : ---------- pull_requests: +9550 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 08:18:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 12:18:30 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1540901910.46.0.788709270274.issue35081@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9551 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 08:21:55 2018 From: report at bugs.python.org (Felipe Rodrigues) Date: Tue, 30 Oct 2018 12:21:55 +0000 Subject: [issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1540902115.5.0.788709270274.issue19376@psf.upfronthosting.co.za> Felipe Rodrigues added the comment: What about adding some more information in the exception message in addition to the docs? I mean, if we're raising an issue because someone inserted Feb 29, we add a note about leap year in the exception message ---------- nosy: +fbidu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 08:22:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 12:22:33 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1540902153.53.0.788709270274.issue35081@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9552 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 08:25:10 2018 From: report at bugs.python.org (nubirstein) Date: Tue, 30 Oct 2018 12:25:10 +0000 Subject: [issue26175] Fully implement IOBase abstract on SpooledTemporaryFile In-Reply-To: <1453413274.25.0.536987988375.issue26175@psf.upfronthosting.co.za> Message-ID: <1540902310.59.0.788709270274.issue26175@psf.upfronthosting.co.za> nubirstein added the comment: Should I have been added my request there? Anyway I do suffer from lack of 'seekable()' implementation there ---------- nosy: +nubirstein _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 08:32:57 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Oct 2018 12:32:57 +0000 Subject: [issue35113] inspect.getsource returns incorrect source for classes when class definition is part of multiline strings Message-ID: <1540902777.26.0.788709270274.issue35113@psf.upfronthosting.co.za> New submission from Karthikeyan Singaravelan : inspect.getsource uses inspect.findsource that uses a regex to check for class declaration and starts matching against the regex from the start of the program. When there is a match it checks for the first character to be 'c' to return the line number from which getblock is used to get the class definition. If there are multiple matches and there is no line with 'c' as the first character in the line then they are sorted based on the number of whitespaces preceding class keyword. This poses the following problem : 1. When a class definition like string occurs as part of a multiline string before the actual definition then this causes the function to return the multiline string instead of actual definition. This occurs both while using the multiline string also as comment and also using them in variable definition in other places. 2. When the class is defined inside another class and there is a similar multiline string inside another class which is indented along the same indentation level of the class then they are sorted by whitespace where they are equal and then followed by line number. Since the class definition occurs after the multiline string it causes the multiline string to be taken up as the source of the class. This was last changed in 89f507fe8c4 (Dec 2006) which is also a merge commit. I searched for issues and relevant test cases but I couldn't find any in the test suite or issue tracker regarding the same. Hence I am filing a new issue. # backups/bpo35101.py import inspect class Bar: a = """ class MultilineStringVariable: ... """ class MultilineStringVariable: def foo(self): pass ''' class MultilineStringComment: pass ''' class MultilineStringComment: def foo(self): pass class NestedClass: a = ''' class Spam: ... ''' class Nested: class Spam: pass print(inspect.getsource(MultilineStringVariable)) print(inspect.getsource(MultilineStringComment)) print(inspect.getsource(Nested.Spam)) # Incorrect results $ ./python.exe ../backups/bpo35101.py class MultilineStringVariable: ... class MultilineStringComment: pass class Spam: ... ---------- components: Library (Lib) messages: 328909 nosy: xtreak priority: normal severity: normal status: open title: inspect.getsource returns incorrect source for classes when class definition is part of multiline strings type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 08:40:27 2018 From: report at bugs.python.org (nubirstein) Date: Tue, 30 Oct 2018 12:40:27 +0000 Subject: [issue35112] SpooledTemporaryFile and seekable() method In-Reply-To: <1540900935.98.0.788709270274.issue35112@psf.upfronthosting.co.za> Message-ID: <1540903227.33.0.788709270274.issue35112@psf.upfronthosting.co.za> nubirstein added the comment: Should I have been added my request there? Anyway I do suffer from lack of 'seekable()' implementation there. I'll go there and make a request ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 08:41:27 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 30 Oct 2018 12:41:27 +0000 Subject: [issue35098] Deleting __new__ does not restore previous behavior In-Reply-To: <1540772185.07.0.788709270274.issue35098@psf.upfronthosting.co.za> Message-ID: <1540903287.43.0.788709270274.issue35098@psf.upfronthosting.co.za> Change by Josh Rosenberg : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Assigning and deleting __new__ attr on the class does not allow to create instances of this class _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 08:43:59 2018 From: report at bugs.python.org (nubirstein) Date: Tue, 30 Oct 2018 12:43:59 +0000 Subject: [issue26175] Fully implement IOBase abstract on SpooledTemporaryFile In-Reply-To: <1453413274.25.0.536987988375.issue26175@psf.upfronthosting.co.za> Message-ID: <1540903439.38.0.788709270274.issue26175@psf.upfronthosting.co.za> nubirstein added the comment: My last comment meant to land somewhere else, but nonetheless it is related to this topic, so: SpooledTemporaryFile class from lib/tempfile.py still does not implement seekable() method. It could be like this (just two lines of code and my Flask.Request tests with sending files started again to work on 3.7: def seekable(self): return self._file.seekable() Is it possible to add this method? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 08:46:27 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Oct 2018 12:46:27 +0000 Subject: [issue35112] SpooledTemporaryFile and seekable() method In-Reply-To: <1540900935.98.0.788709270274.issue35112@psf.upfronthosting.co.za> Message-ID: <1540903587.71.0.788709270274.issue35112@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: The related issue already implements seekable and other methods for IOBase. As I can see from the open PR there are PR comments with respect to tests and docs that need to be acted upon as per reviewer's comments. With respect to this issue I propose closing this as a duplicate with issue26175 as superseder to continue your discussion there where it might be useful. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 08:49:48 2018 From: report at bugs.python.org (nubirstein) Date: Tue, 30 Oct 2018 12:49:48 +0000 Subject: [issue35112] SpooledTemporaryFile and seekable() method In-Reply-To: <1540900935.98.0.788709270274.issue35112@psf.upfronthosting.co.za> Message-ID: <1540903788.87.0.788709270274.issue35112@psf.upfronthosting.co.za> nubirstein added the comment: According to Karthikeyan request I'am moving this discussion to the right place, i.e. https://bugs.python.org/issue26175 I hope to get some help there. Thx Karthikeyan for such a short response time. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 08:54:02 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Oct 2018 12:54:02 +0000 Subject: [issue35112] SpooledTemporaryFile and seekable() method In-Reply-To: <1540900935.98.0.788709270274.issue35112@psf.upfronthosting.co.za> Message-ID: <1540904042.16.0.788709270274.issue35112@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: @nubirstein You're welcome :) As noted in https://bugs.python.org/issue26175#msg328911 the PR has the implementation of seekable at https://github.com/python/cpython/pull/3249/files#diff-34b2145d7fe189e893ec7934afe9829cR761 . You can help with the PR reviews if any and hopefully it gets merged. Adding 26175 as superseder. ---------- superseder: -> Fully implement IOBase abstract on SpooledTemporaryFile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 09:28:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 13:28:00 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1540906080.34.0.788709270274.issue35081@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9553 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 09:31:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 13:31:48 +0000 Subject: [issue32030] PEP 432: Rewrite Py_Main() In-Reply-To: <1510709424.02.0.213398074469.issue32030@psf.upfronthosting.co.za> Message-ID: <1540906307.99.0.788709270274.issue32030@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e1b29950bf751381538e3c8ea6a3e0a98d01dbfb by Victor Stinner in branch 'master': bpo-32030: Make _PySys_AddXOptionWithError() private (GH-10236) https://github.com/python/cpython/commit/e1b29950bf751381538e3c8ea6a3e0a98d01dbfb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 09:32:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 13:32:11 +0000 Subject: [issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions In-Reply-To: <1534251432.68.0.56676864532.issue34403@psf.upfronthosting.co.za> Message-ID: <1540906331.83.0.788709270274.issue34403@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 7d35f79012db89ce9a152a77ac6809eb9c34a35d by Victor Stinner in branch '3.7': bpo-34403: Always implement _Py_GetForceASCII() (GH-10235) https://github.com/python/cpython/commit/7d35f79012db89ce9a152a77ac6809eb9c34a35d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 09:40:17 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 30 Oct 2018 13:40:17 +0000 Subject: [issue35114] ssl.RAND_status docs describe it as returning True/False; actually returns 1/0 Message-ID: <1540906817.06.0.788709270274.issue35114@psf.upfronthosting.co.za> New submission from Josh Rosenberg : The ssl.RAND_status online docs say (with code format on True/False): "Return True if the SSL pseudo-random number generator has been seeded with ?enough? randomness, and False otherwise." This is incorrect; the function actually returns 1 or 0 (and the docstring agrees). Fix can be one of: 1. Update docs to be less specific about the return type (use true/false, not True/False) 2. Update docs to match docstring (which specifically says 1/0, not True/False) 3. Update implementation and docstring to actually return True/False (replacing PyLong_FromLong with PyBool_FromLong and changing docstring to use True/False to match online docs) #3 involves a small amount of code churn, but it also means we're not needlessly replicating a C API's use of int return values when the function is logically bool (there is no error status for the C API AFAICT, so it's not like returning int gains us anything on flexibility). bool would be mathematically equivalent to the original 1/0 return value in the rare cases someone uses it mathematically. ---------- assignee: docs at python components: Documentation, SSL messages: 328917 nosy: docs at python, josh.r priority: low severity: normal status: open title: ssl.RAND_status docs describe it as returning True/False; actually returns 1/0 type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 09:45:32 2018 From: report at bugs.python.org (Petter S) Date: Tue, 30 Oct 2018 13:45:32 +0000 Subject: [issue32972] unittest.TestCase coroutine support In-Reply-To: <1519843317.02.0.467229070634.issue32972@psf.upfronthosting.co.za> Message-ID: <1540907132.69.0.788709270274.issue32972@psf.upfronthosting.co.za> Petter S added the comment: As far as I am concerned, the discussion can continue in this issue. I still think a reasonable first step is to add a run hook to the regular TestCase class, like in PR 6051. But building consensus is a bit tricky. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 09:48:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 13:48:29 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1540907309.64.0.788709270274.issue35059@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3c09dca4b5de9fe8c8756251d02f49cf093b88c1 by Victor Stinner in branch 'master': bpo-35059: Convert _Py_Dealloc() to static inline function (GH-10223) https://github.com/python/cpython/commit/3c09dca4b5de9fe8c8756251d02f49cf093b88c1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 10:03:47 2018 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 30 Oct 2018 14:03:47 +0000 Subject: [issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1540908227.56.0.788709270274.issue19376@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 10:13:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 14:13:25 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1540908805.09.0.788709270274.issue35081@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 9204fb8623896cc5f68ae350784ee25e8a7b2184 by Victor Stinner in branch 'master': bpo-35081: Cleanup pystate.c and pystate.h (GH-10240) https://github.com/python/cpython/commit/9204fb8623896cc5f68ae350784ee25e8a7b2184 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 10:14:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 14:14:31 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1540908871.74.0.788709270274.issue35081@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 31368a4f0e531c19affe2a1becd25fc316bc7501 by Victor Stinner in branch 'master': bpo-35081: Move Include/pyatomic.c to Include/internal/ (GH-10239) https://github.com/python/cpython/commit/31368a4f0e531c19affe2a1becd25fc316bc7501 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 10:15:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 14:15:14 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1540908914.43.0.788709270274.issue35081@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy Storchaka asked: "Would not be better to move files with the content fully surrounded by #ifdef Py_BUILD_CORE out of the Include/ directory?" See his comment and my answer in the PR 10239: https://github.com/python/cpython/pull/10239#issuecomment-434289361 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 10:31:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 14:31:17 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1540909877.13.0.788709270274.issue35081@psf.upfronthosting.co.za> STINNER Victor added the comment: My changes move Py_BUILD_CORE to Include/internal/. I'm not sure of the effect on the backward compatibility. Since Python 3.7, many "Py_BUILD_CORE" functions rely on Include/internal/, like PyThreadState_GET() which uses _PyRuntime.gilstate.tstate_current. On my Fedora 28, the python3-devel package doesn't proide Include/internal/ headers, only Include/*.h in /usr/include/python3.7m/. It seems like Include/internal/ is not usable by 3rd party modules on Fedora at least. I understand that even if a 3rd party C extension used the Py_BUILD_CORE API, Python 3.7 already broke these extensions. I don't want C extensions to use Py_BUILD_CORE: Py_BUILD_CORE API is really designed to only be used inside Python. If this API is used outside Python, we cannot modify the API anymore since it would break extensions. But I want to make sure that we can break this API for different reasons. In Python 3.7, pyatomic.h is included by Python.h. In Python 3.7.0, pyatomic.h content wasn't surrounded by Py_BUILD_CORE and this header file caused multiple compilation issues: see bpo-23644 and bpo-25150. The content is now restricted to Py_BUILD_CORE since Python 3.7.1. It allows us to more easily change the implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 10:39:46 2018 From: report at bugs.python.org (Michael Osipov) Date: Tue, 30 Oct 2018 14:39:46 +0000 Subject: [issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions In-Reply-To: <1534251432.68.0.56676864532.issue34403@psf.upfronthosting.co.za> Message-ID: <1540910386.56.0.788709270274.issue34403@psf.upfronthosting.co.za> Michael Osipov <1983-01-06 at gmx.net> added the comment: Victor, looks good to me: 0:00:26 [ 23/419/3] test_utf8_mode passed. I don't know wether it is related, but test_unicode crash dumps here: 0:00:22 [ 16/419/2] test_unicode crashed (Exit code -11) Fatal Python error: Segmentation fault Current thread 0x00000001 (most recent call first): File "/var/osipovmi/cpython/Lib/test/test_unicode.py", line 2465 in PyUnicode_FromFormat File "/var/osipovmi/cpython/Lib/test/test_unicode.py", line 2468 in check_format File "/var/osipovmi/cpython/Lib/test/test_unicode.py", line 2472 in test_from_format File "/var/osipovmi/cpython/Lib/unittest/case.py", line 610 in run File "/var/osipovmi/cpython/Lib/unittest/case.py", line 658 in __call__ File "/var/osipovmi/cpython/Lib/unittest/suite.py", line 122 in run File "/var/osipovmi/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/var/osipovmi/cpython/Lib/unittest/suite.py", line 122 in run File "/var/osipovmi/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/var/osipovmi/cpython/Lib/unittest/suite.py", line 122 in run File "/var/osipovmi/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/var/osipovmi/cpython/Lib/test/support/testresult.py", line 162 in run File "/var/osipovmi/cpython/Lib/test/support/__init__.py", line 1928 in _run_suite File "/var/osipovmi/cpython/Lib/test/support/__init__.py", line 2022 in run_unittest File "/var/osipovmi/cpython/Lib/test/libregrtest/runtest.py", line 175 in test_runner File "/var/osipovmi/cpython/Lib/test/libregrtest/runtest.py", line 179 in runtest_inner File "/var/osipovmi/cpython/Lib/test/libregrtest/runtest.py", line 134 in runtest File "/var/osipovmi/cpython/Lib/test/libregrtest/runtest_mp.py", line 68 in run_tests_worker File "/var/osipovmi/cpython/Lib/test/libregrtest/main.py", line 587 in _main File "/var/osipovmi/cpython/Lib/test/libregrtest/main.py", line 571 in main File "/var/osipovmi/cpython/Lib/test/libregrtest/main.py", line 627 in main File "/var/osipovmi/cpython/Lib/test/regrtest.py", line 46 in _main File "/var/osipovmi/cpython/Lib/test/regrtest.py", line 50 in File "/var/osipovmi/cpython/Lib/runpy.py", line 85 in _run_code File "/var/osipovmi/cpython/Lib/runpy.py", line 192 in _run_module_as_main Is that related to your PEP? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 10:39:55 2018 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 30 Oct 2018 14:39:55 +0000 Subject: [issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1540910395.64.0.788709270274.issue19376@psf.upfronthosting.co.za> Paul Ganssle added the comment: @Victor: You mean a PR to fix the *issue* or a PR to add this to the docs? The current behavior is pretty counter-intuitive, particularly because it also fails because of the (relatively) little-known fact that 1900 happens to not be a leap year because it is evenly divisible by 100 but not by 400. I think it's pretty simple for end-users to work around this: def strptime_smarter(dtstr, fmt): try: return datetime.strptime(dtstr, fmt) except ValueError: tt = time.strptime(dtstr, fmt) if tt[0:3] == (1900, 2, 29): return datetime(1904, *tt[1:6]) raise But this is largely a problem that arises because we don't have any concept of a "partial datetime", see this dateutil issue: https://github.com/dateutil/dateutil/issues/449 What users want when they do `datetime.strptime("Feb 29", "%b %d")` is something like `(None, 2, 29)`, but we're both specifying an arbitrary default year *and* enforcing that the final date be legal. I think the best solution would be to change the default year to 2000 for *all* dates, but for historical reasons that is just not feasible. :( Another option is that we could allow specifying a "default date" from which missing values would be drawn. We have done this in dateutil.parser.parse: https://dateutil.readthedocs.io/en/stable/parser.html#dateutil.parser.parse The biggest problem in dateutil is that the default value for "default date" is the *current date*, which causes many problems with reproducibility. For `datetime.strptime`, the default value would be `datetime(1900, 1, 1)`, which has none of those same problems. Still, adding such a parameter to `datetime.strptime` seems like a lot of effort to go through to just to make it *easier* for people to work around this bug in `strptime`, particularly since in this case you can *kinda* do the same thing with: strptime('1904 ' + dtstr, '%Y %b %d') Long-winded carping on about datetime issues aside, I think my final vote is for leaving the behavior as-is and documenting it. Looking at the documentation, the only documentation I see for what happens when you don't have %Y, %m or %d is: For time objects, the format codes for year, month, and day should not be used, as time objects have no such values. If they?re used anyway, 1900 is substituted for the year, and 1 for the month and day. This only makes sense in the context of `strftime`. I think for starters we should document the behavior of strptime when no year, month or day are specified. As part of that documentation, we can add a footnote about Feb 29th. I can make a PR for this, but as Tal mentions, I think this is a good issue for a first-time contributor, so I'd like to give someone else an opportunity to take a crack at this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 10:56:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 14:56:12 +0000 Subject: [issue35086] tkinter docs: errors in A Simple Hello World Program In-Reply-To: <1540688696.85.0.788709270274.issue35086@psf.upfronthosting.co.za> Message-ID: <1540911372.61.0.788709270274.issue35086@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset a80af770870937271865b5e2b05a2cfe40b024b6 by Serhiy Storchaka (Daniel Lovell) in branch 'master': bpo-35086: Fix tkinter example "A Simple Hello World Program". (GH-10160) https://github.com/python/cpython/commit/a80af770870937271865b5e2b05a2cfe40b024b6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 10:56:39 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Oct 2018 14:56:39 +0000 Subject: [issue35086] tkinter docs: errors in A Simple Hello World Program In-Reply-To: <1540688696.85.0.788709270274.issue35086@psf.upfronthosting.co.za> Message-ID: <1540911399.32.0.788709270274.issue35086@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9554 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 10:56:49 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Oct 2018 14:56:49 +0000 Subject: [issue35086] tkinter docs: errors in A Simple Hello World Program In-Reply-To: <1540688696.85.0.788709270274.issue35086@psf.upfronthosting.co.za> Message-ID: <1540911409.06.0.788709270274.issue35086@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9555 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 10:59:51 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Oct 2018 14:59:51 +0000 Subject: [issue35107] untokenize() fails on tokenize output when a newline is missing In-Reply-To: <1540851998.41.0.788709270274.issue35107@psf.upfronthosting.co.za> Message-ID: <1540911591.25.0.788709270274.issue35107@psf.upfronthosting.co.za> Terry J. Reedy added the comment: It seems to me a bug that if '\n' is not present, tokenize adds both NL and NEWLINE tokens, instead of just one of them. Moreover, both tuples of the double correction look wrong. If '\n' is present, TokenInfo(type=56 (NL), string='\n', start=(1, 1), end=(1, 2), line='#\n') looks correct. If NL represents a real character, the length 0 string='' in the generated TokenInfo(type=56 (NL), string='', start=(1, 1), end=(1, 1), line='#'), seems wrong. I suspect that the idea was to mis-represent NL to avoid '\n' being added by untokenize. In TokenInfo(type=4 (NEWLINE), string='', start=(1, 1), end=(1, 2), line='') string='' is mismatched by length = 2-1 = 1. I am inclined to think that the following would be the correct added token, which should untokenize correctly TokenInfo(type=4 (NEWLINE), string='', start=(1, 1), end=(1, 1), line='') ast.dump(ast.parse(s)) returns 'Module(body=[])' for both versions of 's', so no help there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 11:04:23 2018 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 30 Oct 2018 15:04:23 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1540911863.79.0.788709270274.issue35066@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 11:11:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Oct 2018 15:11:44 +0000 Subject: [issue27200] make doctest in CPython has failures In-Reply-To: <1464988408.0.0.840317371896.issue27200@psf.upfronthosting.co.za> Message-ID: <1540912304.21.0.788709270274.issue27200@psf.upfronthosting.co.za> Terry J. Reedy added the comment: At the moment, the dependent issues are closed and there is just one open PR on this issue. Julian, I am nosying you here because you merged #34962, which is properly a dependency of this. ---------- dependencies: +make doctest does not pass :/ nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 11:12:16 2018 From: report at bugs.python.org (fcurella) Date: Tue, 30 Oct 2018 15:12:16 +0000 Subject: [issue35115] UUID objects can't be casted by `hex()` Message-ID: <1540912336.8.0.788709270274.issue35115@psf.upfronthosting.co.za> New submission from fcurella : Casting a UUID to an `int` or to a string works as expected: ``` import uuid value = uuid.UUID() str(value) int(value) ``` but casting to an `hex()` raises an exception: ``` import uuid value = uuid.UUID() # uuid instances already have the correct value stored in the `.hex` attribute value.hex # this raises `TypeError: 'UUID' object cannot be interpreted as an integer` hex(value) # this behaves correctly hex(value.int) ``` Adding support for `hex()` should be simple enough as adding the following to the UUID class in https://github.com/python/cpython/blob/54752533b2ed1c898ffe5ec2e795c6910ee46a39/Lib/uuid.py#L69: ``` def __index__(self): return self.int ``` ---------- components: Library (Lib) messages: 328929 nosy: fcurella priority: normal severity: normal status: open title: UUID objects can't be casted by `hex()` type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 11:20:51 2018 From: report at bugs.python.org (abhishek) Date: Tue, 30 Oct 2018 15:20:51 +0000 Subject: [issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1540912851.34.0.788709270274.issue19376@psf.upfronthosting.co.za> Change by abhishek : ---------- keywords: +patch pull_requests: +9556 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 11:22:20 2018 From: report at bugs.python.org (fcurella) Date: Tue, 30 Oct 2018 15:22:20 +0000 Subject: [issue35115] UUID objects can't be casted by `hex()` In-Reply-To: <1540912336.8.0.788709270274.issue35115@psf.upfronthosting.co.za> Message-ID: <1540912940.59.0.788709270274.issue35115@psf.upfronthosting.co.za> Change by fcurella : ---------- keywords: +patch pull_requests: +9557 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 11:34:58 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Oct 2018 15:34:58 +0000 Subject: [issue35086] tkinter docs: errors in A Simple Hello World Program In-Reply-To: <1540688696.85.0.788709270274.issue35086@psf.upfronthosting.co.za> Message-ID: <1540913698.14.0.788709270274.issue35086@psf.upfronthosting.co.za> miss-islington added the comment: New changeset f51ef51db686938486bff453e791a3093a1df108 by Miss Islington (bot) in branch '3.7': bpo-35086: Fix tkinter example "A Simple Hello World Program". (GH-10160) https://github.com/python/cpython/commit/f51ef51db686938486bff453e791a3093a1df108 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 11:35:05 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Oct 2018 15:35:05 +0000 Subject: [issue35086] tkinter docs: errors in A Simple Hello World Program In-Reply-To: <1540688696.85.0.788709270274.issue35086@psf.upfronthosting.co.za> Message-ID: <1540913705.73.0.788709270274.issue35086@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c843a47007293d8361d0bfd45bfd7169afaa601c by Miss Islington (bot) in branch '3.6': bpo-35086: Fix tkinter example "A Simple Hello World Program". (GH-10160) https://github.com/python/cpython/commit/c843a47007293d8361d0bfd45bfd7169afaa601c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 11:38:56 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 30 Oct 2018 15:38:56 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1540913936.19.0.788709270274.issue35066@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 11:40:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 15:40:19 +0000 Subject: [issue35086] tkinter docs: errors in A Simple Hello World Program In-Reply-To: <1540688696.85.0.788709270274.issue35086@psf.upfronthosting.co.za> Message-ID: <1540914019.04.0.788709270274.issue35086@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 11:43:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 15:43:10 +0000 Subject: [issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions In-Reply-To: <1534251432.68.0.56676864532.issue34403@psf.upfronthosting.co.za> Message-ID: <1540914190.32.0.788709270274.issue34403@psf.upfronthosting.co.za> STINNER Victor added the comment: > 0:00:22 [ 16/419/2] test_unicode crashed (Exit code -11) Please open a new issue to track this bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 11:46:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 15:46:09 +0000 Subject: [issue35115] UUID objects can't be casted by `hex()` In-Reply-To: <1540912336.8.0.788709270274.issue35115@psf.upfronthosting.co.za> Message-ID: <1540914369.59.0.788709270274.issue35115@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 11:48:40 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 30 Oct 2018 15:48:40 +0000 Subject: [issue35115] UUID objects can't be casted by `hex()` In-Reply-To: <1540912336.8.0.788709270274.issue35115@psf.upfronthosting.co.za> Message-ID: <1540914520.13.0.788709270274.issue35115@psf.upfronthosting.co.za> Ronald Oussoren added the comment: IMHO implementing "__index__" for UUID would not the correct solution. That method is meant be used by integer-like objects. One of the side effects of implementing "__index__" is that indexing lists with UUID instances would start to work, which is IMHO not correct. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 11:55:13 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 30 Oct 2018 15:55:13 +0000 Subject: [issue34977] Release Windows Store app containing Python In-Reply-To: <1539470627.18.0.788709270274.issue34977@psf.upfronthosting.co.za> Message-ID: <1540914913.98.0.788709270274.issue34977@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: +patch pull_requests: +9559 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 11:59:23 2018 From: report at bugs.python.org (Ryan Petrello) Date: Tue, 30 Oct 2018 15:59:23 +0000 Subject: [issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid -> process mapping. In-Reply-To: <1432750979.18.0.523128349285.issue24303@psf.upfronthosting.co.za> Message-ID: <1540915163.04.0.788709270274.issue24303@psf.upfronthosting.co.za> Ryan Petrello added the comment: Any chance this patch was every applied to Python3? It looks to me like 3.6 has the old code: https://github.com/python/cpython/blob/3.6/Modules/_multiprocessing/semaphore.c#L448 ---------- nosy: +ryan.petrello _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 12:09:22 2018 From: report at bugs.python.org (fcurella) Date: Tue, 30 Oct 2018 16:09:22 +0000 Subject: [issue35115] UUID objects can't be casted by `hex()` In-Reply-To: <1540912336.8.0.788709270274.issue35115@psf.upfronthosting.co.za> Message-ID: <1540915762.13.0.788709270274.issue35115@psf.upfronthosting.co.za> fcurella added the comment: I must admit I was surprised to find out that `hex()` uses `__index__` (which is supposed to return an integer) and not something like a `__hex__` method returning the hex. Maybe we should change the behaviour of `hex()` instead? (in a backward-compatible way, of course) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 12:58:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 16:58:30 +0000 Subject: [issue35115] UUID objects can't be casted by `hex()` In-Reply-To: <1540912336.8.0.788709270274.issue35115@psf.upfronthosting.co.za> Message-ID: <1540918710.09.0.788709270274.issue35115@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: hex() used the __hex__() special method in Python 2. This was changed in Python 3 for purpose. https://docs.python.org/3/whatsnew/3.0.html#operators-and-special-methods ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 14:25:39 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, 30 Oct 2018 18:25:39 +0000 Subject: [issue35115] UUID objects can't be casted by `hex()` In-Reply-To: <1540912336.8.0.788709270274.issue35115@psf.upfronthosting.co.za> Message-ID: <1540923939.43.0.788709270274.issue35115@psf.upfronthosting.co.za> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- nosy: +thatiparthy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 14:48:53 2018 From: report at bugs.python.org (Matthew Belisle) Date: Tue, 30 Oct 2018 18:48:53 +0000 Subject: [issue35116] Doc/library entries for cgi.FieldStorage max_num_fields Message-ID: <1540925333.22.0.788709270274.issue35116@psf.upfronthosting.co.za> New submission from Matthew Belisle : vstinner pointed out that cgi.FieldStorage max_num_fields needs documentation added to Doc/library. https://bugs.python.org/issue34866#msg328401 ---------- assignee: docs at python components: Documentation messages: 328937 nosy: Matthew Belisle, docs at python priority: normal severity: normal status: open title: Doc/library entries for cgi.FieldStorage max_num_fields type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 14:49:52 2018 From: report at bugs.python.org (Matthew Belisle) Date: Tue, 30 Oct 2018 18:49:52 +0000 Subject: [issue35116] Doc/library entries for cgi.FieldStorage max_num_fields In-Reply-To: <1540925333.22.0.788709270274.issue35116@psf.upfronthosting.co.za> Message-ID: <1540925392.06.0.788709270274.issue35116@psf.upfronthosting.co.za> Change by Matthew Belisle : ---------- keywords: +patch pull_requests: +9560 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 14:50:32 2018 From: report at bugs.python.org (tzickel) Date: Tue, 30 Oct 2018 18:50:32 +0000 Subject: [issue35117] set.discard should return True or False based on if element existed. Message-ID: <1540925432.63.0.788709270274.issue35117@psf.upfronthosting.co.za> New submission from tzickel : Sometimes you want to do something based on if the item existed before removal, so instead of checking if it exists, then removing and doing something, if would be nice to make the function return True or False based on if the element existed. ---------- components: Interpreter Core messages: 328938 nosy: tzickel priority: normal severity: normal status: open title: set.discard should return True or False based on if element existed. type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 14:57:12 2018 From: report at bugs.python.org (Matthew Belisle) Date: Tue, 30 Oct 2018 18:57:12 +0000 Subject: [issue35116] Doc/library entries for cgi.FieldStorage max_num_fields In-Reply-To: <1540925333.22.0.788709270274.issue35116@psf.upfronthosting.co.za> Message-ID: <1540925832.18.0.788709270274.issue35116@psf.upfronthosting.co.za> Change by Matthew Belisle : ---------- pull_requests: +9561 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 15:01:43 2018 From: report at bugs.python.org (Matthew Belisle) Date: Tue, 30 Oct 2018 19:01:43 +0000 Subject: [issue35116] Doc/library entries for cgi.FieldStorage max_num_fields In-Reply-To: <1540925333.22.0.788709270274.issue35116@psf.upfronthosting.co.za> Message-ID: <1540926103.97.0.788709270274.issue35116@psf.upfronthosting.co.za> Change by Matthew Belisle : ---------- pull_requests: +9562 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 15:31:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 19:31:58 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1540927918.23.0.788709270274.issue35081@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9563 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 15:46:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 19:46:34 +0000 Subject: [issue35117] set.discard should return True or False based on if element existed. In-Reply-To: <1540925432.63.0.788709270274.issue35117@psf.upfronthosting.co.za> Message-ID: <1540928794.7.0.788709270274.issue35117@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: try: s.remove(x) except KeyError: # did not exist else: # existed But catching exception in Python is expensive. ---------- nosy: +rhettinger, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 15:47:09 2018 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Oct 2018 19:47:09 +0000 Subject: [issue35115] UUID objects can't be casted by `hex()` In-Reply-To: <1540912336.8.0.788709270274.issue35115@psf.upfronthosting.co.za> Message-ID: <1540928829.68.0.788709270274.issue35115@psf.upfronthosting.co.za> Mark Dickinson added the comment: Agreed that UUID should not implement `__index__`. I wouldn't expect to be able to use a UUID as a list index, for example. This is marked as "behavior", but I have a hard time seeing this as a bug. It's not even a usability bug, given how easy it is to get the hex value of a UUID with `.hex`. Maybe the UUID class should grow a `__format__` implementation that respects the `x` format specifier? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 15:55:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Oct 2018 19:55:22 +0000 Subject: [issue35115] UUID objects can't be casted by `hex()` In-Reply-To: <1540912336.8.0.788709270274.issue35115@psf.upfronthosting.co.za> Message-ID: <1540929322.79.0.788709270274.issue35115@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Note that str() for UUIDs already returns the hexadecimal representation, just with minuses. I don't see large usability difference between 'uuid={:x}'.format(u) and 'uuid={.hex}'.format(u). And in many case 'uuid={}'.format(u) is appropriate as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 15:59:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 19:59:10 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1540929550.78.0.788709270274.issue35081@psf.upfronthosting.co.za> STINNER Victor added the comment: Include/internal/pystate.h uses #include "pystate.h" to include Include/pystate.h, but it tries to include itself (Include/internal/pystate.h) which does nothing because of "#ifndef Py_INTERNAL_PYSTATE_H #define Py_INTERNAL_PYSTATE_H ... #endif". Remove the #ifndef #define to see the bug: diff --git a/Include/internal/pystate.h b/Include/internal/pystate.h index 38845d32ec..2ef023a9a5 100644 --- a/Include/internal/pystate.h +++ b/Include/internal/pystate.h @@ -1,5 +1,3 @@ -#ifndef Py_INTERNAL_PYSTATE_H -#define Py_INTERNAL_PYSTATE_H #ifdef __cplusplus extern "C" { #endif @@ -222,4 +220,3 @@ PyAPI_FUNC(void) _PyInterpreterState_DeleteExceptMain(void); #ifdef __cplusplus } #endif -#endif /* !Py_INTERNAL_PYSTATE_H */ Compilation fails with: In file included from ./Include/internal/pystate.h:5, from ./Include/internal/pystate.h:5, from ./Include/internal/pystate.h:5, from ./Include/internal/pystate.h:5, from ./Include/internal/pystate.h:5, from ./Include/internal/pystate.h:5, from ./Include/internal/pystate.h:5, ... ./Include/internal/pystate.h:5:21: error: #include nested too deeply #include "pystate.h" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 16:00:05 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 30 Oct 2018 20:00:05 +0000 Subject: [issue27200] make doctest in CPython has failures In-Reply-To: <1464988408.0.0.840317371896.issue27200@psf.upfronthosting.co.za> Message-ID: <1540929605.08.0.788709270274.issue27200@psf.upfronthosting.co.za> Julien Palard added the comment: Closing PR and issue as already fixed and now enforced by CI. Thanks again Marco for those already-merged fixes, it helped a lot ending the work at the last PyCon Fr sprints. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 16:21:37 2018 From: report at bugs.python.org (Mike Frysinger) Date: Tue, 30 Oct 2018 20:21:37 +0000 Subject: [issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid -> process mapping. In-Reply-To: <1432750979.18.0.523128349285.issue24303@psf.upfronthosting.co.za> Message-ID: <1540930897.16.0.788709270274.issue24303@psf.upfronthosting.co.za> Mike Frysinger added the comment: it does seem like the patch was never applied to any python 3 branch :/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 16:30:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 20:30:24 +0000 Subject: [issue35116] Doc/library entries for cgi.FieldStorage max_num_fields In-Reply-To: <1540925333.22.0.788709270274.issue35116@psf.upfronthosting.co.za> Message-ID: <1540931424.88.0.788709270274.issue35116@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 68f323715e6627c550d1e8ffed7e36f1bb4aa42b by Victor Stinner (matthewbelisle-wf) in branch 'master': bpo-35116, urllib.parse: Document the new max_num_fields parameter (GH-10247) https://github.com/python/cpython/commit/68f323715e6627c550d1e8ffed7e36f1bb4aa42b ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 16:47:43 2018 From: report at bugs.python.org (tzickel) Date: Tue, 30 Oct 2018 20:47:43 +0000 Subject: [issue3243] Support iterable bodies in httplib In-Reply-To: <1214848938.76.0.928668674728.issue3243@psf.upfronthosting.co.za> Message-ID: <1540932463.16.0.788709270274.issue3243@psf.upfronthosting.co.za> tzickel added the comment: This patch was opened for 2.7 but never applied there ? https://github.com/python/cpython/pull/10226 This causes a bug with requests HTTP library (and others as well as httplib) when you want to send an iterable object as POST data (with a non-chunked way), it works in Python 3 but not 2, and this effects behaviour and performance... ---------- nosy: +tzickel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 17:09:06 2018 From: report at bugs.python.org (fcurella) Date: Tue, 30 Oct 2018 21:09:06 +0000 Subject: [issue35115] UUID objects can't be casted by `hex()` In-Reply-To: <1540912336.8.0.788709270274.issue35115@psf.upfronthosting.co.za> Message-ID: <1540933746.23.0.788709270274.issue35115@psf.upfronthosting.co.za> Change by fcurella : ---------- status: -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 17:15:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 21:15:23 +0000 Subject: [issue35116] Doc/library entries for cgi.FieldStorage max_num_fields In-Reply-To: <1540925333.22.0.788709270274.issue35116@psf.upfronthosting.co.za> Message-ID: <1540934123.1.0.788709270274.issue35116@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 691196d1af6a7e9d218e3281a8f3385616b2ca86 by Victor Stinner (matthewbelisle-wf) in branch '3.6': bpo-35116, urllib.parse: Document the new max_num_fields parameter (GH-10248) https://github.com/python/cpython/commit/691196d1af6a7e9d218e3281a8f3385616b2ca86 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 17:15:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 21:15:30 +0000 Subject: [issue35116] Doc/library entries for cgi.FieldStorage max_num_fields In-Reply-To: <1540925333.22.0.788709270274.issue35116@psf.upfronthosting.co.za> Message-ID: <1540934130.88.0.788709270274.issue35116@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset aa0a21a7c81cb4eca723b0f400e860a0e8e730b5 by Victor Stinner (matthewbelisle-wf) in branch '3.7': bpo-35116, urllib.parse: Document the new max_num_fields parameter (GH-10246) https://github.com/python/cpython/commit/aa0a21a7c81cb4eca723b0f400e860a0e8e730b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 17:16:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 21:16:32 +0000 Subject: [issue34866] CGI DOS vulnerability via long post list In-Reply-To: <1538429007.97.0.545547206417.issue34866@psf.upfronthosting.co.za> Message-ID: <1540934192.45.0.788709270274.issue34866@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset bc6f74a520112d25ef40324e3de4e8187ff2835d by Victor Stinner (matthewbelisle-wf) in branch '2.7': bpo-34866: Add max_num_fields to cgi.FieldStorage (GH-9660) (GH-9969) https://github.com/python/cpython/commit/bc6f74a520112d25ef40324e3de4e8187ff2835d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 17:16:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 21:16:58 +0000 Subject: [issue35116] Doc/library entries for cgi.FieldStorage max_num_fields In-Reply-To: <1540925333.22.0.788709270274.issue35116@psf.upfronthosting.co.za> Message-ID: <1540934218.41.0.788709270274.issue35116@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 Oct 30 17:18:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 21:18:33 +0000 Subject: [issue34866] CGI DOS vulnerability via long post list In-Reply-To: <1538429007.97.0.545547206417.issue34866@psf.upfronthosting.co.za> Message-ID: <1540934313.73.0.788709270274.issue34866@psf.upfronthosting.co.za> STINNER Victor added the comment: I suggest to not add the new parameter to 3.4 and 3.5 branches, even if it's a security fix. The fix requires to *use* the parameter, and I don't expect applications on Python 3.4 and 3.5 to be modified to use it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 17:20:44 2018 From: report at bugs.python.org (cary) Date: Tue, 30 Oct 2018 21:20:44 +0000 Subject: [issue33376] [pysqlite] Duplicate rows can be returned after rolling back a transaction In-Reply-To: <1524874511.54.0.682650639539.issue33376@psf.upfronthosting.co.za> Message-ID: <1540934444.02.0.788709270274.issue33376@psf.upfronthosting.co.za> Change by cary : ---------- keywords: +patch pull_requests: +9564 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 17:24:47 2018 From: report at bugs.python.org (=?utf-8?q?Vladimir_Filipovi=C4=87?=) Date: Tue, 30 Oct 2018 21:24:47 +0000 Subject: [issue35034] Add closing and iteration to threading.Queue In-Reply-To: <1540078155.51.0.788709270274.issue35034@psf.upfronthosting.co.za> Message-ID: <1540934687.25.0.788709270274.issue35034@psf.upfronthosting.co.za> Vladimir Filipovi? added the comment: Hi Raymond! I've posted to python-ideas: https://mail.python.org/pipermail/python-ideas/2018-October/054238.html The amount of attention it got was modest, so I couldn't exactly say the community has thoroughly vetted and enthusiastically endorsed this proposal :) But all responses were in the narrow range of neutral to MILDLY positive. There weren't any objections at all to either the idea or the code. Nor did anybody question whether a feature of this kind should be added at all. I don't think I could realistically expect much more support than that for a change this minor. (Well, it would have been better if at least one person'd had an (uncontested) strongly positive response.) Some problems with other kinds of implementations were brought up, but this one isn't vulnerable to them. I believe I've also addressed all your comments from this BPO issue in the opening post there. An older discussion was linked, which had also shown tacit consensus that this type of feature in general would be welcome. I suppose it's time to decide if that level of response is enough. ---------- resolution: later -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 17:27:59 2018 From: report at bugs.python.org (Matthew Belisle) Date: Tue, 30 Oct 2018 21:27:59 +0000 Subject: [issue34866] CGI DOS vulnerability via long post list In-Reply-To: <1538429007.97.0.545547206417.issue34866@psf.upfronthosting.co.za> Message-ID: <1540934879.22.0.788709270274.issue34866@psf.upfronthosting.co.za> Matthew Belisle added the comment: That makes sense Victor, I agree. Thanks for merging those PRs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 17:30:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Oct 2018 21:30:20 +0000 Subject: [issue34866] CGI DOS vulnerability via long post list In-Reply-To: <1538429007.97.0.545547206417.issue34866@psf.upfronthosting.co.za> Message-ID: <1540935020.93.0.788709270274.issue34866@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Matthew Belisle for the nice security counter-measure! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 18:36:37 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 30 Oct 2018 22:36:37 +0000 Subject: [issue35109] Doctest in CI uses python binary built from master causing DeprecationWarnings In-Reply-To: <1540888465.31.0.788709270274.issue35109@psf.upfronthosting.co.za> Message-ID: <1540938997.34.0.788709270274.issue35109@psf.upfronthosting.co.za> Change by Julien Palard : ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 18:45:46 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 30 Oct 2018 22:45:46 +0000 Subject: [issue35109] Doctest in CI uses python binary built from master causing DeprecationWarnings In-Reply-To: <1540888465.31.0.788709270274.issue35109@psf.upfronthosting.co.za> Message-ID: <1540939546.89.0.788709270274.issue35109@psf.upfronthosting.co.za> Julien Palard added the comment: > I propose using stable version of Python like python 3.7 If we do so, we won't be able to write doctest about new features (existing in 3.8, not existing in 3.7), which is worse than having warnings. I think the right move is to do some PR on remote projects (like babel) to fix the warning, future-proofing them from having a real issue in 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 19:11:47 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Oct 2018 23:11:47 +0000 Subject: [issue35109] Doctest in CI uses python binary built from master causing DeprecationWarnings In-Reply-To: <1540888465.31.0.788709270274.issue35109@psf.upfronthosting.co.za> Message-ID: <1540941107.72.0.788709270274.issue35109@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I have an open PR for babel https://github.com/python-babel/babel/pull/608 . The problem is merging them and cutting a new release depends on the maintainers availability. Once it's fixed we have to make sure dependencies of babel like sphinx use the latest version and also make a release if needed. I agree it has to be fixed on those projects but coordinating release across various projects depends on the maintainers availability and shouldn't end up as a blocker for CPython's development here and in future with these type of deprecation warnings. I suggested using a stable version because when ran locally make venv for doctest uses python3 as binary name and on CI it uses python built from master branch that might cause confusion. Also it's not necessarily CPython's responsibility to make sure all our external projects work well on development branch. We can keep this as an open issue while the warnings are fixed in the projects and also use this for reference when the collections import related code has to be removed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 19:19:54 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Oct 2018 23:19:54 +0000 Subject: [issue35109] Doctest in CI uses python binary built from master causing DeprecationWarnings In-Reply-To: <1540888465.31.0.788709270274.issue35109@psf.upfronthosting.co.za> Message-ID: <1540941594.03.0.788709270274.issue35109@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: > If we do so, we won't be able to write doctest about new features (existing in 3.8, not existing in 3.7), which is worse than having warnings. I agree with the same. Maybe I am running doctest wrong locally? I use make venv and make doctest. Sorry for the confusion on this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 19:23:12 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Oct 2018 23:23:12 +0000 Subject: [issue33376] [pysqlite] Duplicate rows can be returned after rolling back a transaction In-Reply-To: <1524874511.54.0.682650639539.issue33376@psf.upfronthosting.co.za> Message-ID: <1540941792.58.0.788709270274.issue33376@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 19:29:27 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 30 Oct 2018 23:29:27 +0000 Subject: [issue35109] Doctest in CI uses python binary built from master causing DeprecationWarnings In-Reply-To: <1540888465.31.0.788709270274.issue35109@psf.upfronthosting.co.za> Message-ID: <1540942167.44.0.788709270274.issue35109@psf.upfronthosting.co.za> Julien Palard added the comment: > Maybe I am running doctest wrong locally? Dunno. IIRC we had problems running doctest with a Python 3.7 on the 3.8 branch, which make sense. Anyway, if it works today, the first developper writing doctest about a 3.8 feature will cause a doctest failure so no we can't use 3.7 to test 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 19:37:20 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Oct 2018 23:37:20 +0000 Subject: [issue35109] Doctest in CI uses python binary built from master causing DeprecationWarnings In-Reply-To: <1540888465.31.0.788709270274.issue35109@psf.upfronthosting.co.za> Message-ID: <1540942640.36.0.788709270274.issue35109@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: > Anyway, if it works today, the first developper writing doctest about a 3.8 feature will cause a doctest failure so no we can't use 3.7 to test 3.8. Agreed that we need to run on the master branch binary for 3.8 only features like PEP 572 which is a language level change. Sorry, I forgot about that scenario. I guess it's then the right way to fix the dependencies upstream so that they work properly on development branch going forward. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 19:49:36 2018 From: report at bugs.python.org (Lisa Roach) Date: Tue, 30 Oct 2018 23:49:36 +0000 Subject: [issue34788] ipaddress module fails on rfc4007 scoped IPv6 addresses In-Reply-To: <1537799403.03.0.956365154283.issue34788@psf.upfronthosting.co.za> Message-ID: <1540943376.71.0.788709270274.issue34788@psf.upfronthosting.co.za> Lisa Roach added the comment: I think this is something that would be good to have. Jeremy would you care to make a PR for this? ---------- nosy: +lisroach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 19:50:52 2018 From: report at bugs.python.org (Maxime Belanger) Date: Tue, 30 Oct 2018 23:50:52 +0000 Subject: [issue33376] [pysqlite] Duplicate rows can be returned after rolling back a transaction In-Reply-To: <1524874511.54.0.682650639539.issue33376@psf.upfronthosting.co.za> Message-ID: <1540943452.39.0.788709270274.issue33376@psf.upfronthosting.co.za> Change by Maxime Belanger : ---------- nosy: +Maxime Belanger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 20:26:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2018 00:26:10 +0000 Subject: [issue35110] Fix more spaces around hyphens and dashes In-Reply-To: <1540892433.13.0.788709270274.issue35110@psf.upfronthosting.co.za> Message-ID: <1540945570.93.0.788709270274.issue35110@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3f819ca138db6945ee4271bf13e42db9f9b3b1e4 by Serhiy Storchaka in branch 'master': bpo-35110: Fix unintentional spaces around hyphens and dashes. (GH-10231) https://github.com/python/cpython/commit/3f819ca138db6945ee4271bf13e42db9f9b3b1e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 20:28:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2018 00:28:10 +0000 Subject: [issue33138] Improve standard error for uncopyable types In-Reply-To: <1521994898.68.0.467229070634.issue33138@psf.upfronthosting.co.za> Message-ID: <1540945690.21.0.788709270274.issue33138@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 0353b4eaaf451ad463ce7eb3074f6b62d332f401 by Serhiy Storchaka in branch 'master': bpo-33138: Change standard error message for non-pickleable and non-copyable types. (GH-6239) https://github.com/python/cpython/commit/0353b4eaaf451ad463ce7eb3074f6b62d332f401 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 20:28:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2018 00:28:36 +0000 Subject: [issue33138] Improve standard error for uncopyable types In-Reply-To: <1521994898.68.0.467229070634.issue33138@psf.upfronthosting.co.za> Message-ID: <1540945716.67.0.788709270274.issue33138@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 Oct 30 22:17:01 2018 From: report at bugs.python.org (Michael DePalatis) Date: Wed, 31 Oct 2018 02:17:01 +0000 Subject: [issue33533] Provide an async-generator version of as_completed In-Reply-To: <1526453333.0.0.682650639539.issue33533@psf.upfronthosting.co.za> Message-ID: <1540952221.57.0.788709270274.issue33533@psf.upfronthosting.co.za> Change by Michael DePalatis : ---------- keywords: +patch pull_requests: +9565 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 23:20:18 2018 From: report at bugs.python.org (Windson Yang) Date: Wed, 31 Oct 2018 03:20:18 +0000 Subject: [issue35118] Add peek() or first() method in queue Message-ID: <1540956018.19.0.788709270274.issue35118@psf.upfronthosting.co.za> New submission from Windson Yang : I found other languages like Java and C++ have the method to access the first value in Queue like first() and peek(). Since we use deque_ to create Queue now, it's easy to implement in python using the index. Otherwise, we can add this to the document? I also found some discussion_ here. .. _deque: https://github.com/python/cpython/blob/master/Lib/queue.py#L205 .. _discussion https://mail.python.org/pipermail/python-list/2010-March/569930.html ---------- assignee: docs at python components: Documentation messages: 328963 nosy: Windson Yang, docs at python priority: normal severity: normal status: open title: Add peek() or first() method in queue 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 Tue Oct 30 23:38:13 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 31 Oct 2018 03:38:13 +0000 Subject: [issue35118] Add peek() or first() method in queue In-Reply-To: <1540956018.19.0.788709270274.issue35118@psf.upfronthosting.co.za> Message-ID: <1540957093.22.0.788709270274.issue35118@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 23:39:09 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 31 Oct 2018 03:39:09 +0000 Subject: [issue35117] set.discard should return True or False based on if element existed. In-Reply-To: <1540925432.63.0.788709270274.issue35117@psf.upfronthosting.co.za> Message-ID: <1540957149.56.0.788709270274.issue35117@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 30 23:52:31 2018 From: report at bugs.python.org (Windson Yang) Date: Wed, 31 Oct 2018 03:52:31 +0000 Subject: [issue35117] set.discard should return True or False based on if element existed. In-Reply-To: <1540925432.63.0.788709270274.issue35117@psf.upfronthosting.co.za> Message-ID: <1540957951.49.0.788709270274.issue35117@psf.upfronthosting.co.za> Windson Yang added the comment: I guess we can implement using ref_count? However, I agreed "The use of variables that haven't been defined or set (implicitly or explicitly) is almost always a bad thing in any language since it indicates that the logic of the program hasn't been thought through properly, and is likely to result in unpredictable behavior." from https://stackoverflow.com/questions/843277/how-do-i-check-if-a-variable-exists ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 00:06:35 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 31 Oct 2018 04:06:35 +0000 Subject: [issue35118] Add peek() or first() method in queue In-Reply-To: <1540956018.19.0.788709270274.issue35118@psf.upfronthosting.co.za> Message-ID: <1540958795.56.0.788709270274.issue35118@psf.upfronthosting.co.za> Raymond Hettinger added the comment: For deque, we have d[0]. Is anything more needed? Even lists don't require a peek. For Queue, I'm not sure I've ever seen any use case for peek. What do you have in mind? * https://docs.oracle.com/javase/7/docs/api/java/util/Queue.html#peek() ---------- 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 Oct 31 00:26:14 2018 From: report at bugs.python.org (Denis Osipov) Date: Wed, 31 Oct 2018 04:26:14 +0000 Subject: [issue35119] Customizing module attribute access example raises RecursionError Message-ID: <1540959974.35.0.788709270274.issue35119@psf.upfronthosting.co.za> New submission from Denis Osipov : Customizing module attribute access example raises RecursionError: >>> import sys >>> from types import ModuleType >>> class VerboseModule(ModuleType): ... def __repr__(self): ... return f'Verbose {self.__name__}' ... def __setattr__(self, attr, value): ... print(f'Setting {attr}...') ... setattr(self, attr, value) ... >>> sys.modules[__name__].__class__ = VerboseModule >>> sys.modules[__name__].a = 5 Setting a... <...> Setting a... Traceback (most recent call last): File "", line 1, in File "", line 6, in __setattr__ File "", line 6, in __setattr__ File "", line 6, in __setattr__ [Previous line repeated 495 more times] File "", line 5, in __setattr__ RecursionError: maximum recursion depth exceeded while calling a Python object Setting a...>>> Something like this can fix it: def __setattr__(self, attr, value): ... print(f'Setting {attr}...') ... super().setattr(self, attr, value) ---------- assignee: docs at python components: Documentation messages: 328966 nosy: denis-osipov, docs at python priority: normal severity: normal status: open title: Customizing module attribute access example raises RecursionError type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 01:17:28 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 31 Oct 2018 05:17:28 +0000 Subject: [issue35111] Make Custom Object Classes JSON Serializable In-Reply-To: <1540899782.53.0.788709270274.issue35111@psf.upfronthosting.co.za> Message-ID: <1540963048.86.0.788709270274.issue35111@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: -> bob.ippolito nosy: +bob.ippolito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 01:23:49 2018 From: report at bugs.python.org (Windson Yang) Date: Wed, 31 Oct 2018 05:23:49 +0000 Subject: [issue35118] Add peek() or first() method in queue In-Reply-To: <1540956018.19.0.788709270274.issue35118@psf.upfronthosting.co.za> Message-ID: <1540963429.35.0.788709270274.issue35118@psf.upfronthosting.co.za> Windson Yang added the comment: For deque, we can add peek() function to deque or just make it clear in the document that we can use deque[0] to access the first element(I can only find index method in the document) For Queue, I found Java and C++ has the function like first() or peek(), I'm not sure should we also implement a method like this. * http://www.cplusplus.com/reference/queue/queue/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 01:32:01 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 31 Oct 2018 05:32:01 +0000 Subject: [issue35111] Make Custom Object Classes JSON Serializable In-Reply-To: <1540899782.53.0.788709270274.issue35111@psf.upfronthosting.co.za> Message-ID: <1540963921.24.0.788709270274.issue35111@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > If you can serialize an object using pickle, > why not have the ability to serialize objects using json? One reason would be that the JSON spec was intentionally designed to handle a limited number of types so that it would have maximum interoperability between languages. Another reason is that in order to make other types round-trip between encoding and decoding, you would need to control both ends, in which case, you might as well use pickle. ---------- nosy: +rhettinger 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 Oct 31 01:38:13 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 31 Oct 2018 05:38:13 +0000 Subject: [issue35118] Add peek() or first() method in queue In-Reply-To: <1540956018.19.0.788709270274.issue35118@psf.upfronthosting.co.za> Message-ID: <1540964293.38.0.788709270274.issue35118@psf.upfronthosting.co.za> Raymond Hettinger added the comment: In the absence of good use cases, I'll decline the API expansion. Feel free to post a PR to have the deque documentation to mention d[0] indexing more prominently. Am not really sure that is needed though, we don't have to point out the same thing for lists and I haven't encountered any misunderstandings on the topic. This would be just a minor usage note. ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 01:49:56 2018 From: report at bugs.python.org (Mohit Sharma) Date: Wed, 31 Oct 2018 05:49:56 +0000 Subject: [issue35120] SSH tunnel support to ftp lib Message-ID: <1540964996.8.0.788709270274.issue35120@psf.upfronthosting.co.za> New submission from Mohit Sharma : SSH tunnel forwarding doesn't work with ftp lib ---------- messages: 328970 nosy: msharma priority: normal severity: normal status: open title: SSH tunnel support to ftp lib type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 02:17:23 2018 From: report at bugs.python.org (Bob Ippolito) Date: Wed, 31 Oct 2018 06:17:23 +0000 Subject: [issue35111] Make Custom Object Classes JSON Serializable In-Reply-To: <1540899782.53.0.788709270274.issue35111@psf.upfronthosting.co.za> Message-ID: <1540966643.74.0.788709270274.issue35111@psf.upfronthosting.co.za> Bob Ippolito added the comment: The trouble with having such a hook is that it would take precedence over any customization you might want or need to do to satisfy the protocol you're implementing. Other than the limited set of types that are part of the JSON specification, there's essentially no standard for encoding of anything else. This is why customization is left to the call sites for encoding and decoding, and I would recommend using the `default` and `object_pairs_hook` keyword arguments to `dumps` and `loads` respectively for that, rather than any of the options that you've enumerated. For what it's worth, simplejson has had a `for_json` method hook for several years to encourage some consolidation, but it's opt-in and there hasn't been a lot of demand to make it the default. The inverse `from_json` type operation is not supported. If you think about it, how *could* you even implement such a thing in the general case, in a way that wouldn't have lots of surprises and performance issues? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 02:51:06 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 31 Oct 2018 06:51:06 +0000 Subject: [issue35117] set.discard should return True or False based on if element existed. In-Reply-To: <1540925432.63.0.788709270274.issue35117@psf.upfronthosting.co.za> Message-ID: <1540968666.05.0.788709270274.issue35117@psf.upfronthosting.co.za> Raymond Hettinger added the comment: We already have ways to do it (use the in-operator to test membership or put a remove() call in a try/except). Since already we have ways to do it and since those patterns are rare in practice, an API extension doesn't seem warranted. Also, I don't really like the proposed API. Except for methods like pop() that must return a value while mutating the data structure, it is rare in Python for mutating methods to return a value instead of None. Another related issue is that it atypical and arguably non-pythonic to hide a mutation in a conditional, so it would lead to leas readable code. To my eyes, in the example that follows, the current way is clearer and more pythonic than the proposed API: # Proposed way subscriber = request.query['subscriber'] if subscribers.discard(subscriber): print('Unsubscribed') else: print('Subscriber not found') # Current way subscriber = request.query['subscriber'] if subscriber in subscribers: subscribers.remove(subscriber) print('Unsubscribed') else: print('Subscriber not found') Note, the latter way is also what we would use if subscribers were a dictionary (using del instead of remove). The proposed API is also at odds with the original intent of discard() as meaning "we don't care whether the element is present or not, we just want it gone". ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 02:52:48 2018 From: report at bugs.python.org (=?utf-8?b?6KW/55Sw6ZuE5rK7?=) Date: Wed, 31 Oct 2018 06:52:48 +0000 Subject: [issue35121] Cookie domain check returns incorrect results Message-ID: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> New submission from ???? : http.cookiejar.DefaultPolicy.domain_return_ok returns incorrect results. So, HTTP clients send cookies which issued from wrong server. policy = http.cookiejar.DefaultCookiePolicy() req = urllib.request.Request('https://xxxfoo.co.jp/') print(policy.domain_return_ok('foo.co.jp', req) # should be False, but it returns True ---------- components: Library (Lib) messages: 328973 nosy: ???? priority: normal severity: normal status: open title: Cookie domain check returns incorrect results type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 03:46:49 2018 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 31 Oct 2018 07:46:49 +0000 Subject: [issue35115] UUID objects can't be casted by `hex()` In-Reply-To: <1540912336.8.0.788709270274.issue35115@psf.upfronthosting.co.za> Message-ID: <1540972009.22.0.788709270274.issue35115@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I don't see large usability difference between 'uuid={:x}'.format(u) and 'uuid={.hex}'.format(u). Agreed. @fcurella: marking as enhancement is fine, but you need to be specific about what exact enhancement you're proposing. Adding __hex__ back isn't a realistic option; it was deliberately removed in Python 3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 04:15:02 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 31 Oct 2018 08:15:02 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1540973702.19.0.788709270274.issue35121@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: The current set of tests are at https://github.com/python/cpython/blob/0353b4eaaf451ad463ce7eb3074f6b62d332f401/Lib/test/test_http_cookiejar.py#L406 . A simple set of tuple that can be added based on the report as below : ("http://barfoo.com", ".foo.com", False) ("http://barfoo.com", "foo.com", False) # Fails on master The check is done at https://github.com/python/cpython/blob/0353b4eaaf451ad463ce7eb3074f6b62d332f401/Lib/http/cookiejar.py#L1176 . There is no check to add '.' before domain if absent. Hence it performs a substring match with the values req_host = ".barfoo.com" and erhn = ".barfoo.com" and domain = "foo.com" so the condition `not (req_host.endswith(domain) or erhn.endswith(domain))` fails and doesn't return False. I would suggest adding a check to make sure domain also starts with '.' similar to req_host and erhn thus fixing the issue. I tried the fix and existing tests along with the reported case works fine. diff --git a/Lib/http/cookiejar.py b/Lib/http/cookiejar.py index 0ba8200f32..da7462701b 100644 --- a/Lib/http/cookiejar.py +++ b/Lib/http/cookiejar.py @@ -1173,6 +1173,8 @@ class DefaultCookiePolicy(CookiePolicy): req_host = "."+req_host if not erhn.startswith("."): erhn = "."+erhn + if not domain.startswith("."): + domain = "."+domain if not (req_host.endswith(domain) or erhn.endswith(domain)): #_debug(" request domain %s does not match cookie domain %s", # req_host, domain) ("http://barfoo.com", ".foo.com", False) ("http://barfoo.com", "foo.com", False) # Tests pass with fix Also tried the script attached in the report $ cat ../backups/bpo35121.py import urllib from http.cookiejar import DefaultCookiePolicy policy = DefaultCookiePolicy() req = urllib.request.Request('https://xxxfoo.co.jp/') print(policy.domain_return_ok('foo.co.jp', req)) # without fix $ ./python.exe ../backups/bpo35121.py True # With domain fix $ ./python.exe ../backups/bpo35121.py False The check was added in 2004 with commit 2a6ba9097ee3942ae328befaf074ce9722b93ca0 . If my fix is correct I am willing to raise a PR for this with test. Hope it helps! ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 04:22:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2018 08:22:39 +0000 Subject: [issue35110] Fix more spaces around hyphens and dashes In-Reply-To: <1540892433.13.0.788709270274.issue35110@psf.upfronthosting.co.za> Message-ID: <1540974159.16.0.788709270274.issue35110@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9566 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 04:26:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2018 08:26:15 +0000 Subject: [issue35110] Fix more spaces around hyphens and dashes In-Reply-To: <1540892433.13.0.788709270274.issue35110@psf.upfronthosting.co.za> Message-ID: <1540974375.46.0.788709270274.issue35110@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9567 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 05:00:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2018 09:00:28 +0000 Subject: [issue35110] Fix more spaces around hyphens and dashes In-Reply-To: <1540892433.13.0.788709270274.issue35110@psf.upfronthosting.co.za> Message-ID: <1540976428.72.0.788709270274.issue35110@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b183750f999953bac7738b1fff114e0a2615d970 by Serhiy Storchaka in branch '3.7': [3.7] bpo-35110: Fix unintentional spaces around hyphens and dashes. (GH-10231). (GH-10253) https://github.com/python/cpython/commit/b183750f999953bac7738b1fff114e0a2615d970 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 05:00:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2018 09:00:42 +0000 Subject: [issue35110] Fix more spaces around hyphens and dashes In-Reply-To: <1540892433.13.0.788709270274.issue35110@psf.upfronthosting.co.za> Message-ID: <1540976442.0.0.788709270274.issue35110@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 1e8c18509eb15efb8e80971b9935d17e7bbeabf4 by Serhiy Storchaka in branch '3.6': [3.6] bpo-35110: Fix unintentional spaces around hyphens and dashes. (GH-10231). (GH-10254) https://github.com/python/cpython/commit/1e8c18509eb15efb8e80971b9935d17e7bbeabf4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 05:01:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2018 09:01:29 +0000 Subject: [issue35110] Fix more spaces around hyphens and dashes In-Reply-To: <1540892433.13.0.788709270274.issue35110@psf.upfronthosting.co.za> Message-ID: <1540976489.99.0.788709270274.issue35110@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +9568 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 05:14:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2018 09:14:41 +0000 Subject: [issue35110] Fix more spaces around hyphens and dashes In-Reply-To: <1540892433.13.0.788709270274.issue35110@psf.upfronthosting.co.za> Message-ID: <1540977281.23.0.788709270274.issue35110@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 511747bec3aca4ad7930005e3adece9196c1cd39 by Serhiy Storchaka in branch 'master': bpo-35110: Fix yet few spaces before dashes. (GH-10255) https://github.com/python/cpython/commit/511747bec3aca4ad7930005e3adece9196c1cd39 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 05:15:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2018 09:15:14 +0000 Subject: [issue35110] Fix more spaces around hyphens and dashes In-Reply-To: <1540892433.13.0.788709270274.issue35110@psf.upfronthosting.co.za> Message-ID: <1540977314.18.0.788709270274.issue35110@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 Oct 31 05:18:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2018 09:18:54 +0000 Subject: [issue33138] Improve standard error for uncopyable types In-Reply-To: <1521994898.68.0.467229070634.issue33138@psf.upfronthosting.co.za> Message-ID: <1540977534.82.0.788709270274.issue33138@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Changed to "cannot pickle 'XXX' object" after discussing on Python-Dev: https://mail.python.org/pipermail/python-dev/2018-October/155599.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 05:26:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Oct 2018 09:26:14 +0000 Subject: [issue33023] Unable to copy ssl.SSLContext In-Reply-To: <1520489361.61.0.467229070634.issue33023@psf.upfronthosting.co.za> Message-ID: <1540977974.73.0.788709270274.issue33023@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: After discussing on Python-Dev all error messages were changed to "cannot pickle 'XXX' object". https://mail.python.org/pipermail/python-dev/2018-October/155599.html I suggest to not add __getstate__() methods with different error messages. But the dup() method should be fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 06:24:45 2018 From: report at bugs.python.org (=?utf-8?b?6KW/55Sw6ZuE5rK7?=) Date: Wed, 31 Oct 2018 10:24:45 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1540981485.11.0.788709270274.issue35121@psf.upfronthosting.co.za> ???? added the comment: I think that is desired result. thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 06:29:16 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 31 Oct 2018 10:29:16 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1540981756.39.0.788709270274.issue35121@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +9569 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 06:59:33 2018 From: report at bugs.python.org (Pradyun Gedam) Date: Wed, 31 Oct 2018 10:59:33 +0000 Subject: [issue15809] 2.7 IDLE console uses incorrect encoding. In-Reply-To: <1346244102.55.0.0360895602485.issue15809@psf.upfronthosting.co.za> Message-ID: <1540983573.35.0.788709270274.issue15809@psf.upfronthosting.co.za> Change by Pradyun Gedam : ---------- nosy: -pradyunsg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 07:08:44 2018 From: report at bugs.python.org (Pradyun Gedam) Date: Wed, 31 Oct 2018 11:08:44 +0000 Subject: [issue21314] Document '/' in signatures In-Reply-To: <1397988439.5.0.703056699862.issue21314@psf.upfronthosting.co.za> Message-ID: <1540984124.67.0.788709270274.issue21314@psf.upfronthosting.co.za> Pradyun Gedam added the comment: We now have a PEP for this; just noting this here since I don't see a cross reference between them. https://www.python.org/dev/peps/pep-0570/ ---------- nosy: +pradyunsg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 07:16:38 2018 From: report at bugs.python.org (akhi singhania) Date: Wed, 31 Oct 2018 11:16:38 +0000 Subject: [issue35122] Process not exiting on unhandled exception when using multiprocessing module Message-ID: <1540984598.88.0.788709270274.issue35122@psf.upfronthosting.co.za> New submission from akhi singhania : I am not sure if this is an implementation bug or just a documentation bug. When using the multiprocessing module, I have come across a scenario where the process fails to exit when it throws an unhandled exception because it is waiting for the feeder thread to join forever. Sending SIGINT doesn't cause the process to exit either but sending SIGTERM does cause it to exit. I have attached a simple reproducer. When main() raises the unhandled exception, the process does not exit. However, if the size of data that is enqueued is reduced or the child process closes the queue on exiting, then the process exits fine. In the scenario, when the process exits successfully, I see the following output: **** creating queue [DEBUG/MainProcess] created semlock with handle 140197742751744 [DEBUG/MainProcess] created semlock with handle 140197742747648 [DEBUG/MainProcess] created semlock with handle 140197742743552 [DEBUG/MainProcess] Queue._after_fork() **** created queue **** creating process **** starting process **** started process **** starting enqueue [DEBUG/MainProcess] Queue._start_thread() [DEBUG/MainProcess] doing self._thread.start() [DEBUG/Process-1] Queue._after_fork() [INFO/Process-1] child process calling self.run() [DEBUG/MainProcess] starting thread to feed data to pipe [DEBUG/MainProcess] ... done self._thread.start() **** done enqueue **** starting sleep **** done sleep Traceback (most recent call last): File "example.py", line 58, in main() File "example.py", line 54, in main raise Exception('foo') Exception: foo [INFO/MainProcess] process shutting down [DEBUG/MainProcess] running all "atexit" finalizers with priority >= 0 [DEBUG/MainProcess] telling queue thread to quit [DEBUG/MainProcess] running the remaining "atexit" finalizers [DEBUG/MainProcess] joining queue thread [DEBUG/MainProcess] feeder thread got sentinel -- exiting [DEBUG/MainProcess] ... queue thread joined In the scenario when the process does not exit successfully, I see the following output: **** creating queue [DEBUG/MainProcess] created semlock with handle 139683574689792 [DEBUG/MainProcess] created semlock with handle 139683574685696 [DEBUG/MainProcess] created semlock with handle 139683574681600 [DEBUG/MainProcess] Queue._after_fork() **** created queue **** creating process **** starting process **** started process **** starting enqueue [DEBUG/MainProcess] Queue._start_thread() [DEBUG/MainProcess] doing self._thread.start() [DEBUG/Process-1] Queue._after_fork() [INFO/Process-1] child process calling self.run() [DEBUG/MainProcess] starting thread to feed data to pipe [DEBUG/MainProcess] ... done self._thread.start() **** done enqueue **** starting sleep **** done sleep Traceback (most recent call last): File "example.py", line 58, in main() File "example.py", line 54, in main raise Exception('foo') Exception: foo [INFO/MainProcess] process shutting down [DEBUG/MainProcess] running all "atexit" finalizers with priority >= 0 [DEBUG/MainProcess] telling queue thread to quit [DEBUG/MainProcess] running the remaining "atexit" finalizers [DEBUG/MainProcess] joining queue thread <<<< Process hangs here >>>> I found the "solution" of closing the queue in the child by trial and error and looking through the code. The current documentation suggests that multiprocessing.Queue.close() and multiprocessing.Queue.join_thread() are "usually unnecessary for most code". I am not sure if the attached code can be classified as normal code. I believe that at the very least, the documentation should be updated or maybe it should be investigated if some code changes can address this. ---------- components: Extension Modules files: example.py messages: 328983 nosy: akhi singhania priority: normal severity: normal status: open title: Process not exiting on unhandled exception when using multiprocessing module type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file47896/example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 07:22:05 2018 From: report at bugs.python.org (Robert Wright) Date: Wed, 31 Oct 2018 11:22:05 +0000 Subject: [issue35123] Add style guide for sentinel usage Message-ID: <1540984925.04.0.788709270274.issue35123@psf.upfronthosting.co.za> New submission from Robert Wright : Sentinel values are used inconsistently in the Python code base. It would be helpful to have a style guide (about eg. casing, placement, and sentinel reuse) to prevent arguments about their use in future code. ---------- messages: 328984 nosy: madman bob priority: normal severity: normal status: open title: Add style guide for sentinel usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 07:27:17 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 31 Oct 2018 11:27:17 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1540985237.84.0.788709270274.issue35121@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the confirmation. I have created a PR (https://github.com/python/cpython/pull/10258) with test and added 3.8 as affected version. Please add in if I have missed anything in the PR. ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 07:31:54 2018 From: report at bugs.python.org (Robert Wright) Date: Wed, 31 Oct 2018 11:31:54 +0000 Subject: [issue35124] Add style guide for unit tests Message-ID: <1540985514.2.0.788709270274.issue35124@psf.upfronthosting.co.za> New submission from Robert Wright : There should be a style guide for tests, to prevent arguments about their use in future code. ---------- messages: 328986 nosy: madman bob priority: normal severity: normal status: open title: Add style guide for unit tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 07:33:17 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 31 Oct 2018 11:33:17 +0000 Subject: [issue35123] Add style guide for sentinel usage In-Reply-To: <1540984925.04.0.788709270274.issue35123@psf.upfronthosting.co.za> Message-ID: <1540985597.9.0.788709270274.issue35123@psf.upfronthosting.co.za> Eric V. Smith added the comment: Could you give some examples of problems caused by inconsistent usage of sentinels? I do often wish modules exposed their sentinel values, since it makes writing wrappers easier. It's one of the reasons I ended up exposing dataclasses.MISSING. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 07:49:21 2018 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 31 Oct 2018 11:49:21 +0000 Subject: [issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field In-Reply-To: <1540440221.28.0.788709270274.issue35062@psf.upfronthosting.co.za> Message-ID: <1540986561.04.0.788709270274.issue35062@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset b08746bfdf64e55ce33516f2065fa2aa4f51be95 by Xiang Zhang in branch 'master': bpo-35062: Fix parsing _io.IncrementalNewlineDecoder's *translate* argument. (GH-10217) https://github.com/python/cpython/commit/b08746bfdf64e55ce33516f2065fa2aa4f51be95 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 07:49:29 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Oct 2018 11:49:29 +0000 Subject: [issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field In-Reply-To: <1540440221.28.0.788709270274.issue35062@psf.upfronthosting.co.za> Message-ID: <1540986569.78.0.788709270274.issue35062@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9570 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 07:49:38 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Oct 2018 11:49:38 +0000 Subject: [issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field In-Reply-To: <1540440221.28.0.788709270274.issue35062@psf.upfronthosting.co.za> Message-ID: <1540986578.23.0.788709270274.issue35062@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9571 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 07:49:48 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 31 Oct 2018 11:49:48 +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: <1540986588.02.0.788709270274.issue31354@psf.upfronthosting.co.za> Change by Charalampos Stratakis : ---------- pull_requests: +9572 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 07:49:48 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Oct 2018 11:49:48 +0000 Subject: [issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field In-Reply-To: <1540440221.28.0.788709270274.issue35062@psf.upfronthosting.co.za> Message-ID: <1540986588.08.0.788709270274.issue35062@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9573 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 08:00:16 2018 From: report at bugs.python.org (Robert Wright) Date: Wed, 31 Oct 2018 12:00:16 +0000 Subject: [issue35123] Add style guide for sentinel usage In-Reply-To: <1540984925.04.0.788709270274.issue35123@psf.upfronthosting.co.za> Message-ID: <1540987216.59.0.788709270274.issue35123@psf.upfronthosting.co.za> Robert Wright added the comment: Just the classic problems caused by inconsistency in code - confusion when reading, and disagreements when writing. For reading: Where should I look in a file for the sentinels? Is this value a sentinel, or is it some other type of variable? For writing, there will always be disagreements in PRs, so we should nip it in the bud. You raise a good point about exposing sentinel values. I was previously on the fence about whether sentinels should (in general) be private, or public. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 08:25:16 2018 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 31 Oct 2018 12:25:16 +0000 Subject: [issue25416] Add encoding aliases from the (HTML5) Encoding Standard In-Reply-To: <1444932787.73.0.313042926579.issue25416@psf.upfronthosting.co.za> Message-ID: <1540988716.7.0.788709270274.issue25416@psf.upfronthosting.co.za> Ezio Melotti added the comment: Adding those aliases sounds good to me. I think it would be good to add some tests first (possibly as a separate issue/pr), even though I'm not sure what would be the best way to test the aliases. Testing if the list is complete/correct should be done against the HTML5/Unicode specs, but that, if automated, would require downloading/parsing the specs and is probably not worth doing it. We can also check that all the aliases are accepted by str.encode/decode, and all corresponding aliases should give the same result, however if str.encode/decode use the aliases dict, the test is nothing more than a sanity check and won't detect e.g. typos in the aliases names, or wrongly assigned aliases. ---------- nosy: +fbidu stage: patch review -> test needed versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 08:36:05 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 31 Oct 2018 12:36:05 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1540989365.32.0.788709270274.issue35121@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +martin.panter, orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 08:36:24 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Oct 2018 12:36:24 +0000 Subject: [issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field In-Reply-To: <1540440221.28.0.788709270274.issue35062@psf.upfronthosting.co.za> Message-ID: <1540989384.9.0.788709270274.issue35062@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 71b6c1af727fbe13525fb734568057d78cea33f3 by Miss Islington (bot) in branch '3.7': bpo-35062: Fix parsing _io.IncrementalNewlineDecoder's *translate* argument. (GH-10217) https://github.com/python/cpython/commit/71b6c1af727fbe13525fb734568057d78cea33f3 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 08:36:37 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Oct 2018 12:36:37 +0000 Subject: [issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field In-Reply-To: <1540440221.28.0.788709270274.issue35062@psf.upfronthosting.co.za> Message-ID: <1540989397.41.0.788709270274.issue35062@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 907b07ee31a657914dafb0a6b7fa724be0f8d8ac by Miss Islington (bot) in branch '3.6': bpo-35062: Fix parsing _io.IncrementalNewlineDecoder's *translate* argument. (GH-10217) https://github.com/python/cpython/commit/907b07ee31a657914dafb0a6b7fa724be0f8d8ac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 08:37:10 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Oct 2018 12:37:10 +0000 Subject: [issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field In-Reply-To: <1540440221.28.0.788709270274.issue35062@psf.upfronthosting.co.za> Message-ID: <1540989430.09.0.788709270274.issue35062@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 05acd44ad6b61adb24571eb0203de7b25c7e869b by Miss Islington (bot) in branch '2.7': bpo-35062: Fix parsing _io.IncrementalNewlineDecoder's *translate* argument. (GH-10217) https://github.com/python/cpython/commit/05acd44ad6b61adb24571eb0203de7b25c7e869b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 08:39:33 2018 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 31 Oct 2018 12:39:33 +0000 Subject: [issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field In-Reply-To: <1540440221.28.0.788709270274.issue35062@psf.upfronthosting.co.za> Message-ID: <1540989573.93.0.788709270274.issue35062@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 Oct 31 08:52:22 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 31 Oct 2018 12:52:22 +0000 Subject: [issue35119] Customizing module attribute access example raises RecursionError In-Reply-To: <1540959974.35.0.788709270274.issue35119@psf.upfronthosting.co.za> Message-ID: <1540990342.68.0.788709270274.issue35119@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the report Denis. Would you like to propose a PR for this? The file is at https://github.com/python/cpython/blob/master/Doc/reference/datamodel.rst . This was added as part of 5364b5cd757. I am adding Ivan who added the example for confirmation and review. ---------- nosy: +levkivskyi, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 09:29:59 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 31 Oct 2018 13:29:59 +0000 Subject: [issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1540992599.81.0.788709270274.issue19376@psf.upfronthosting.co.za> Tal Einat added the comment: > I think for starters we should document the behavior of strptime when no year, month or day are specified. As part of that documentation, we can add a footnote about Feb 29th. This sounds good to me. We could also improve the exception raised in the specific case of Feb 29th; IMO this should be a separate PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 11:12:38 2018 From: report at bugs.python.org (fcurella) Date: Wed, 31 Oct 2018 15:12:38 +0000 Subject: [issue35115] UUID objects can't be casted by `hex()` In-Reply-To: <1540912336.8.0.788709270274.issue35115@psf.upfronthosting.co.za> Message-ID: <1540998758.2.0.788709270274.issue35115@psf.upfronthosting.co.za> fcurella added the comment: I'm not sure what can be done to make UUIDs work with `hex()`. The only way I see is to add back something _like_ `__hex__`, but with a different name. But in that case, I can see how the same arguments that were originally brought up against `__hex__` could apply to the new dunder method. I'm closing the issue as 'wont fix'. ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 11:18:41 2018 From: report at bugs.python.org (mainro) Date: Wed, 31 Oct 2018 15:18:41 +0000 Subject: [issue35125] asyncio shield: remove inner callback on outer cancellation Message-ID: <1540999121.33.0.788709270274.issue35125@psf.upfronthosting.co.za> New submission from mainro : When the future returned by shield is cancelled, its completion callback of the inner future is not removed. This makes the callback list of inner inner future grow each time a shield is created. ---------- components: asyncio files: shield_cancel.patch keywords: patch messages: 328997 nosy: asvetlov, mainro, yselivanov priority: normal severity: normal status: open title: asyncio shield: remove inner callback on outer cancellation type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file47897/shield_cancel.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 11:58:55 2018 From: report at bugs.python.org (Julien Palard) Date: Wed, 31 Oct 2018 15:58:55 +0000 Subject: [issue35033] Column or row spanning cells are not implemented. In-Reply-To: <1540052915.48.0.788709270274.issue35033@psf.upfronthosting.co.za> Message-ID: <1541001535.65.0.788709270274.issue35033@psf.upfronthosting.co.za> Julien Palard added the comment: https://github.com/sphinx-doc/sphinx/pull/5559 has been merged, let's wait for a release of Sphinx and we'll be able to build Python 3.8 documentation as text again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 11:59:07 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 31 Oct 2018 15:59:07 +0000 Subject: [issue35119] Customizing module attribute access example raises RecursionError In-Reply-To: <1540959974.35.0.788709270274.issue35119@psf.upfronthosting.co.za> Message-ID: <1541001547.24.0.788709270274.issue35119@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm not convinced that any change is needed, this is completely expected behaviour (and not special to modules). The following code also raises RecursionError: class VerboseObject: def __setattr__(self, nm, value): print(f"Setting {nm} to {value}") setattr(self, nm, value) o = VerboseObject() o.a = 42 This is because setattr() calls the __setattr__ method, which calls setattr() again, ... . The fix is to call super().__setattr__ instead: class VerboseObject: def __setattr__(self, nm, value): print(f"Setting {nm} to {value}") super().__setattr__(nm, value) o = VerboseObject() o.a = 42 ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 13:07:39 2018 From: report at bugs.python.org (Pawel) Date: Wed, 31 Oct 2018 17:07:39 +0000 Subject: [issue35126] Mistake in FAQ about converting number to string. Message-ID: <1541005659.07.0.788709270274.issue35126@psf.upfronthosting.co.za> New submission from Pawel : In this question: https://docs.python.org/2.7/faq/programming.html#how-do-i-convert-a-number-to-a-string There is a statement: "{:.3f}".format(1/3) yields '0.333' While In [2]: "{:.3f}".format(1/3) Out[2]: '0.000' In [3]: "{:.3f}".format(1/3.0) Out[3]: '0.333' ---------- assignee: docs at python components: Documentation messages: 329000 nosy: docs at python, grottrumsel priority: normal severity: normal status: open title: Mistake in FAQ about converting number to string. versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 13:44:43 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 31 Oct 2018 17:44:43 +0000 Subject: [issue31625] stop using ranlib In-Reply-To: <1506665732.66.0.213398074469.issue31625@psf.upfronthosting.co.za> Message-ID: <1541007883.95.0.788709270274.issue31625@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Would it make sense to backport that to 3.6 as well? Currently this blocks https://bugs.python.org/issue28015 from being backported to 3.6 ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 13:45:57 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 31 Oct 2018 17:45:57 +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: <1541007957.3.0.788709270274.issue28015@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: The issue with the 3.6 branch is https://bugs.python.org/issue31625 which hasn't been backported to 3.6. Would it make sense to backport it? I have the backports ready locally but not sure if pushing https://bugs.python.org/issue31625 to 3.6 is desirable. ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 13:57:02 2018 From: report at bugs.python.org (andrew c) Date: Wed, 31 Oct 2018 17:57:02 +0000 Subject: [issue35111] Make Custom Object Classes JSON Serializable In-Reply-To: <1540966643.74.0.788709270274.issue35111@psf.upfronthosting.co.za> Message-ID: andrew c added the comment: Bob, I understand what you are saying, but having a built-in is way easier than encoder/decoders. You can still have both actually. Even if you didn't have two way, a one way would be amazingly helpful. For large development systems, a __json__ method would make serialization super easy. class foo(object): a = 1 b = [1,2,3] def __json__(self): return {'a':self.a,'b':self.b} ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 14:19:47 2018 From: report at bugs.python.org (Bob Ippolito) Date: Wed, 31 Oct 2018 18:19:47 +0000 Subject: [issue35111] Make Custom Object Classes JSON Serializable In-Reply-To: <1540899782.53.0.788709270274.issue35111@psf.upfronthosting.co.za> Message-ID: <1541009987.36.0.788709270274.issue35111@psf.upfronthosting.co.za> Bob Ippolito added the comment: That's what the for_json method is in simplejson, it does not have widespread usage. You can implement that when encoding: ``` def json_default(obj): try: return obj.__json__() except AttributeError: raise TypeError("{} can not be JSON encoded".format(type(obj))) json.dumps(foo(), default=json_default) ``` This way, you can choose precisely how the output needs to work when encoding. It's not ideal for every use case, but nothing is. The point is that it doesn't get in your way, whatever you need to do can be done without any awful tricks, so long as you have control over the dumps call site. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 15:06:46 2018 From: report at bugs.python.org (Gyff Mjord) Date: Wed, 31 Oct 2018 19:06:46 +0000 Subject: [issue35127] pyurandom() fails if user does not have an entropy device Message-ID: <1541012806.8.0.788709270274.issue35127@psf.upfronthosting.co.za> New submission from Gyff Mjord : Because of [reasons], I installed a FreeBSD and recompiled it to provide a minimalist kernel. Thus, it does not have the entropy devices /dev/urandom and /dev/random It is a FreeBSD-10-0 running in a Hyper-V virutalization platform. I kinda recompiled python-3.7.1 from the source code to get my own version of python running, but I got stuck in this part. So looking at the Modules/bootstrap_hash.c file I do not see the code of pyurandom() falling back to a something silly. Plus, there is a problem that happens only in Unix at least in this version of python. Looking at the code of the same file. we can see: static int pyurandom(...) { ... int res ... if (res < 0){ return -1 } if (res == 1){ return 0 } ... } I am sorry for the laziness but I believe my point is clear. The thing is. If the random function returns 0 it will return 0 but if it returns 1 it will also return 0. In other words, the number 1 is out of the scope of the random numbers. It is a small prejudice for the random function, but it is not mathematically right. This issue with the number 1, does not happen if the user does not have /dev/random (But it still needs /dev/urandom) ---------- components: FreeBSD messages: 329005 nosy: koobs, pehdrah priority: normal severity: normal status: open title: pyurandom() fails if user does not have an entropy device type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 15:19:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Oct 2018 19:19:33 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541013573.21.0.788709270274.issue35081@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2be00d987d37682a55db67c298e82c405d01b868 by Victor Stinner in branch 'master': bpo-35081: Move Py_BUILD_CORE code to internal/mem.h (GH-10249) https://github.com/python/cpython/commit/2be00d987d37682a55db67c298e82c405d01b868 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 15:35:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Oct 2018 19:35:29 +0000 Subject: [issue35123] Add style guide for sentinel usage In-Reply-To: <1540984925.04.0.788709270274.issue35123@psf.upfronthosting.co.za> Message-ID: <1541014529.6.0.788709270274.issue35123@psf.upfronthosting.co.za> STINNER Victor added the comment: Context: https://github.com/python/cpython/pull/8548#pullrequestreview-166711603 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 15:35:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Oct 2018 19:35:44 +0000 Subject: [issue35124] Add style guide for unit tests In-Reply-To: <1540985514.2.0.788709270274.issue35124@psf.upfronthosting.co.za> Message-ID: <1541014544.82.0.788709270274.issue35124@psf.upfronthosting.co.za> STINNER Victor added the comment: Context: https://github.com/python/cpython/pull/8548#pullrequestreview-166712031 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 15:48:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Oct 2018 19:48:53 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541015333.33.0.788709270274.issue35081@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9574 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 15:50:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Oct 2018 19:50:00 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541015400.7.0.788709270274.issue35081@psf.upfronthosting.co.za> STINNER Victor added the comment: > Include/internal/pystate.h uses #include "pystate.h" to include Include/pystate.h, but it tries to include itself (Include/internal/pystate.h) which does nothing because of "#ifndef Py_INTERNAL_PYSTATE_H #define Py_INTERNAL_PYSTATE_H ... #endif". I proposed to rename internal header files, add an "internal_" prefix, to avoid this issue: PR 10263. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 15:51:22 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 31 Oct 2018 19:51:22 +0000 Subject: [issue35127] pyurandom() fails if user does not have an entropy device In-Reply-To: <1541012806.8.0.788709270274.issue35127@psf.upfronthosting.co.za> Message-ID: <1541015482.95.0.788709270274.issue35127@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 15:53:34 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 31 Oct 2018 19:53:34 +0000 Subject: [issue35113] inspect.getsource returns incorrect source for classes when class definition is part of multiline strings In-Reply-To: <1540902777.26.0.788709270274.issue35113@psf.upfronthosting.co.za> Message-ID: <1541015614.33.0.788709270274.issue35113@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 16:01:50 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Wed, 31 Oct 2018 20:01:50 +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: <1541016109.99.0.788709270274.issue30410@psf.upfronthosting.co.za> Change by Lysandros Nikolaou : ---------- keywords: +patch pull_requests: +9575 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 16:02:06 2018 From: report at bugs.python.org (Windson Yang) Date: Wed, 31 Oct 2018 20:02:06 +0000 Subject: [issue34965] Python on Docker container using flask is going down after sometime In-Reply-To: <1539354059.88.0.788709270274.issue34965@psf.upfronthosting.co.za> Message-ID: <1541016126.85.0.788709270274.issue34965@psf.upfronthosting.co.za> Windson Yang added the comment: Hello, Srikanth, I think you have to look through the docker documents like https://docs.docker.com/config/containers/logging/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 16:09:39 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Wed, 31 Oct 2018 20:09:39 +0000 Subject: [issue24916] In sysconfig, don't rely on sys.version format In-Reply-To: <1440265954.47.0.288307978254.issue24916@psf.upfronthosting.co.za> Message-ID: <1541016579.17.0.788709270274.issue24916@psf.upfronthosting.co.za> Lysandros Nikolaou added the comment: I'm working on changing _PY_VERSION to get its value from sys.version_info instead of sys.version, but I am not sure what the best way is to map between a release stage to the corresponding letter(release->rc). Could someone help me a tiny bit with this one? ---------- nosy: +lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 16:09:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Oct 2018 20:09:50 +0000 Subject: [issue25416] Add encoding aliases from the (HTML5) Encoding Standard In-Reply-To: <1444932787.73.0.313042926579.issue25416@psf.upfronthosting.co.za> Message-ID: <1541016590.12.0.788709270274.issue25416@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 16:11:34 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 31 Oct 2018 20:11:34 +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: <1541016694.61.0.788709270274.issue35122@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Unless I don't understand the issue correctly, this is documented here: https://docs.python.org/3/library/multiprocessing.html#multiprocessing-programming Bear in mind that a process that has put items in a queue will wait before terminating until all the buffered items are fed by the ?feeder? thread to the underlying pipe. (The child process can call the Queue.cancel_join_thread method of the queue to avoid this behaviour.) This means that whenever you use a queue you need to make sure that all items which have been put on the queue will eventually be removed before the process is joined. Otherwise you cannot be sure that processes which have put items on the queue will terminate. Remember also that non-daemonic processes will be joined automatically. In you example, if you add: ch._queue.get() before raising the exception, the program does not hang anymore once the item is taken out of the queue. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 16:14:01 2018 From: report at bugs.python.org (Windson Yang) Date: Wed, 31 Oct 2018 20:14:01 +0000 Subject: [issue35118] Add peek() or first() method in queue In-Reply-To: <1540956018.19.0.788709270274.issue35118@psf.upfronthosting.co.za> Message-ID: <1541016841.05.0.788709270274.issue35118@psf.upfronthosting.co.za> Change by Windson Yang : ---------- keywords: +patch pull_requests: +9576 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 16:17:47 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 31 Oct 2018 20:17:47 +0000 Subject: [issue34965] Python on Docker container using flask is going down after sometime In-Reply-To: <1539354059.88.0.788709270274.issue34965@psf.upfronthosting.co.za> Message-ID: <1541017067.38.0.788709270274.issue34965@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: What version of Python are you using? There is very few things we can do on out side if you don't provide some reproducer or some evidence that CPython is the source of this problem and not your application code or a third party module. Could you try to attach a reproducer? ---------- components: +Interpreter Core -Tests nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 16:22:15 2018 From: report at bugs.python.org (Windson Yang) Date: Wed, 31 Oct 2018 20:22:15 +0000 Subject: [issue34912] Update overflow checks in resize_buffer In-Reply-To: <1538803916.84.0.545547206417.issue34912@psf.upfronthosting.co.za> Message-ID: <1541017335.3.0.788709270274.issue34912@psf.upfronthosting.co.za> Windson Yang added the comment: Sorry, Stefan Behnel, I still don't get it. alloc will always bigger than size after the if else case: if (size < alloc / 2) { /* Major downsize; resize down to exact size. */ alloc = size + 1; } else if (size < alloc) { /* Within allocated size; quick exit */ return 0; } else if (size <= alloc * 1.125) { /* Moderate upsize; overallocate similar to list_resize() */ alloc = size + (size >> 3) + (size < 9 ? 3 : 6); } else { /* Major upsize; resize up to exact size */ alloc = size + 1; } Since we limit the alloc at: if (alloc > PY_SIZE_MAX / sizeof(Py_UCS4)) goto overflow; whenever size > PY_SIZE_MAX / sizeof(Py_UCS4) at first will cause alloc overflow. So why not limit size to PY_SIZE_MAX / sizeof(Py_UCS4) at the beginning? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 16:22:17 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 31 Oct 2018 20:22:17 +0000 Subject: [issue35105] Document that CPython accepts "invalid" identifiers In-Reply-To: <1540815891.13.0.788709270274.issue35105@psf.upfronthosting.co.za> Message-ID: <1541017337.03.0.788709270274.issue35105@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 16:25:46 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 31 Oct 2018 20:25:46 +0000 Subject: [issue35126] Mistake in FAQ about converting number to string. In-Reply-To: <1541005659.07.0.788709270274.issue35126@psf.upfronthosting.co.za> Message-ID: <1541017546.68.0.788709270274.issue35126@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Yep, this is incorrect in Python 2 unless `from __future__ import division` is imported at the beginning. Would you want to make a PR against the 2.7 branch to correct this? ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 17:19:40 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Oct 2018 21:19:40 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541020780.03.0.788709270274.issue35081@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9577 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 17:39:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Oct 2018 21:39:43 +0000 Subject: [issue26558] Disable PyGILState_Check() when Py_NewInterpreter() is called and add more checks on the GIL In-Reply-To: <1457961401.7.0.508641923687.issue26558@psf.upfronthosting.co.za> Message-ID: <1541021983.87.0.788709270274.issue26558@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9578 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 17:47:42 2018 From: report at bugs.python.org (Pablo Santiago Blum de Aguiar) Date: Wed, 31 Oct 2018 21:47:42 +0000 Subject: [issue35128] warning.warn messages with spacing issues Message-ID: <1541022462.19.0.788709270274.issue35128@psf.upfronthosting.co.za> New submission from Pablo Santiago Blum de Aguiar : Some warn messages miss space between words, such as: Use of 'buffering' argument is deprecated and ignoredsince Python 3.0. in bz2 library, and: keyfile and certfile are deprecated, use acustom context instead in many libraries, such as poplib and smtplib. Other warn messages contain too much spaces between words, such as: The 'filename' attribute will be removed in future versions. Use 'source' instead. in configparser library. I'm not sure if such issues affect older versions of Python. I might need help on that. ---------- messages: 329016 nosy: scorphus priority: normal severity: normal status: open title: warning.warn messages with spacing issues versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 17:55:38 2018 From: report at bugs.python.org (Pablo Santiago Blum de Aguiar) Date: Wed, 31 Oct 2018 21:55:38 +0000 Subject: [issue35128] warning.warn messages with spacing issues In-Reply-To: <1541022462.19.0.788709270274.issue35128@psf.upfronthosting.co.za> Message-ID: <1541022938.32.0.788709270274.issue35128@psf.upfronthosting.co.za> Pablo Santiago Blum de Aguiar added the comment: Sorry, only when creating the PR I read that trivial changes like this need no issue. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 18:28:42 2018 From: report at bugs.python.org (davide moro) Date: Wed, 31 Oct 2018 22:28:42 +0000 Subject: [issue35129] Different behaviour comparing versions (distutils.version.LooseVersion) between python2.7 and python3.x Message-ID: <1541024922.77.0.788709270274.issue35129@psf.upfronthosting.co.za> New submission from davide moro : I noticed that with the python2.7 version of distutils.version.LooseVersion let you compare '7' with 'xp' without exceptions (e.g., LooseVersion('7') > LooseVersion('xp')). If you do the same with python3.6 or python3.7, you'll get the following exception: * TypeError: '<' not supported between instances of 'int' and 'str' You can see the full example with complete traceback and differences between python2.x and python3.x here: * https://pastebin.com/kAwUTihe Thanks, davide ---------- components: Distutils messages: 329018 nosy: davide moro, dstufft, eric.araujo priority: normal severity: normal status: open title: Different behaviour comparing versions (distutils.version.LooseVersion) between python2.7 and python3.x type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 18:33:23 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Wed, 31 Oct 2018 22:33:23 +0000 Subject: [issue35119] Customizing module attribute access example raises RecursionError In-Reply-To: <1540959974.35.0.788709270274.issue35119@psf.upfronthosting.co.za> Message-ID: <1541025203.13.0.788709270274.issue35119@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Yes, this is expected, you should use ``super().__setattr__()``. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 18:49:18 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 31 Oct 2018 22:49:18 +0000 Subject: [issue35129] Different behaviour comparing versions (distutils.version.LooseVersion) between python2.7 and python3.x In-Reply-To: <1541024922.77.0.788709270274.issue35129@psf.upfronthosting.co.za> Message-ID: <1541026158.54.0.788709270274.issue35129@psf.upfronthosting.co.za> Steven D'Aprano added the comment: There is no need to split the relevant code into a third-party website, especially when it is so small and can be included in-line here. Python 2.7: py> import distutils.version py> distutils.version.LooseVersion('7') > distutils.version.LooseVersion('XP') False Python 3.6: py> import distutils.version py> distutils.version.LooseVersion('7') > distutils.version.LooseVersion('XP') Traceback (most recent call last): File "", line 1, in File "/storage/python/Python-3.6.4/Lib/distutils/version.py", line 64, in __gt__ c = self._cmp(other) File "/storage/python/Python-3.6.4/Lib/distutils/version.py", line 337, in _cmp if self.version < other.version: TypeError: '<' not supported between instances of 'int' and 'str' (By the way, you appear to have a bug in your sys.excepthook handler. At least I can't reproduce the ModuleNotFoundError you are getting.) ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 19:08:03 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 31 Oct 2018 23:08:03 +0000 Subject: [issue35123] Add style guide for sentinel usage In-Reply-To: <1540984925.04.0.788709270274.issue35123@psf.upfronthosting.co.za> Message-ID: <1541027283.33.0.788709270274.issue35123@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I was not aware that there currently were arguments about the use of sentinels in future code. I feel that you are being excessively prescriptive here: "we should nip it in the bud" is good advice for gardening, but for programming it just results in a lot of pre-emptive arguments about prescriptive rules that aren't needed. What makes a sentinel a sentinel is *how it is used*, not what it is. As such, sentinels are just another type of (pseudo-)constant, and the same style guides should apply: in general, they should be in UPPER case, at the top of the module. (But remember the rule about foolish consistency.) And each sentinel should be reused exactly as often as is appropriate. The same as any other constant. As for exposing sentinels, the same applies to any part of the implementation. Should we make this a public part of the API or a private implementation detail? That has to be judged on a case-by-case basis. Making a rule or even a guideline that just because something is a sentinel is "should be" public (or private) is precisely the sort of thing I don't want to see. Sentinels should be public when it makes sense to make them public and private when it makes sense to keep them as private implementation details. The bottom line is, I don't think we need sentinel-specific rules in the style guide. That would be like adding specific rules for "numeric constants", or specific rules for "constants used by decorators". ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 19:10:00 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 31 Oct 2018 23:10:00 +0000 Subject: [issue35124] Add style guide for unit tests In-Reply-To: <1540985514.2.0.788709270274.issue35124@psf.upfronthosting.co.za> Message-ID: <1541027400.2.0.788709270274.issue35124@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I think this is being excessively prescriptive and solving a problem that isn't a problem. But perhaps if you start by proposing a concrete style guide, I can judge better. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 19:26:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Oct 2018 23:26:44 +0000 Subject: [issue26558] Disable PyGILState_Check() when Py_NewInterpreter() is called and add more checks on the GIL In-Reply-To: <1457961401.7.0.508641923687.issue26558@psf.upfronthosting.co.za> Message-ID: <1541028404.09.0.788709270274.issue26558@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3a228ab17c2a9cffd1a2f15f30d6209768de20a6 by Victor Stinner in branch 'master': bpo-26558: Fix Py_FatalError() with GIL released (GH-10267) https://github.com/python/cpython/commit/3a228ab17c2a9cffd1a2f15f30d6209768de20a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 19:27:03 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Oct 2018 23:27:03 +0000 Subject: [issue26558] Disable PyGILState_Check() when Py_NewInterpreter() is called and add more checks on the GIL In-Reply-To: <1457961401.7.0.508641923687.issue26558@psf.upfronthosting.co.za> Message-ID: <1541028423.42.0.788709270274.issue26558@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +9579 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 19:34:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Oct 2018 23:34:08 +0000 Subject: [issue26558] Disable PyGILState_Check() when Py_NewInterpreter() is called and add more checks on the GIL In-Reply-To: <1457961401.7.0.508641923687.issue26558@psf.upfronthosting.co.za> Message-ID: <1541028848.43.0.788709270274.issue26558@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9580 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 19:38:53 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 31 Oct 2018 23:38:53 +0000 Subject: [issue35123] Add style guide for sentinel usage In-Reply-To: <1540984925.04.0.788709270274.issue35123@psf.upfronthosting.co.za> Message-ID: <1541029133.04.0.788709270274.issue35123@psf.upfronthosting.co.za> Eric V. Smith added the comment: I don't see any problems that need solving. My only interest in this is that I tend to think sentinels that are used for missing parameters should be exposed, and this isn't always an obvious consideration when designing an API. For example, say there's a library that has a function: open(name, type, [mode]) That is, mode is optional. I realize that in pure Python, I could find out what sentinel value they're using, unless they're playing tricks with args and kwargs. But maybe this is written in C. Now, say I want to write a wrapper around this, called myopen, and always pass in "foo" for type. I'd need to use my own sentinel: _MISSING= object() def myopen(name, mode=_MISSING) But, how do I call open? In the past, I've done things like: if mode is _MISSING: return open(name, "foo") else: return open(name, "foo", mode) That doesn't scale well if there are multiple optional parameters. In any event, this just seems like a guideline we should be aware of when adding APIs. Absent any concrete proposals for a "sentinel style guide", I don't think there's anything actionable here. I agree with Steven that it's a case-by-case thing. One size need not fit all. As to the issue referenced by Victor: I'm not sure what a style guide would bring to the table. I think the issue of whether to use a second sentinel or not could be decided in this file alone, without needed a global decision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 19:45:46 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Oct 2018 23:45:46 +0000 Subject: [issue26558] Disable PyGILState_Check() when Py_NewInterpreter() is called and add more checks on the GIL In-Reply-To: <1457961401.7.0.508641923687.issue26558@psf.upfronthosting.co.za> Message-ID: <1541029546.32.0.788709270274.issue26558@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 192c54713b4c67a8d14b2d98056771feba40ca37 by Miss Islington (bot) in branch '3.7': bpo-26558: Fix Py_FatalError() with GIL released (GH-10267) https://github.com/python/cpython/commit/192c54713b4c67a8d14b2d98056771feba40ca37 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 19:47:21 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 31 Oct 2018 23:47:21 +0000 Subject: [issue26558] Disable PyGILState_Check() when Py_NewInterpreter() is called and add more checks on the GIL In-Reply-To: <1457961401.7.0.508641923687.issue26558@psf.upfronthosting.co.za> Message-ID: <1541029641.58.0.788709270274.issue26558@psf.upfronthosting.co.za> Change by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 19:49:47 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 31 Oct 2018 23:49:47 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541029787.56.0.788709270274.issue35081@psf.upfronthosting.co.za> Change by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 19:50:40 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 31 Oct 2018 23:50:40 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1541029840.13.0.788709270274.issue35059@psf.upfronthosting.co.za> Change by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 19:52:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Oct 2018 23:52:31 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541029951.4.0.788709270274.issue35081@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 27e2d1f21975dfb8c0ddcb192fa0f45a51b7977e by Victor Stinner in branch 'master': bpo-35081: Add pycore_ prefix to internal header files (GH-10263) https://github.com/python/cpython/commit/27e2d1f21975dfb8c0ddcb192fa0f45a51b7977e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 19:53:21 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 31 Oct 2018 23:53:21 +0000 Subject: [issue35129] Different behaviour comparing versions (distutils.version.LooseVersion) between python2.7 and python3.x In-Reply-To: <1541024922.77.0.788709270274.issue35129@psf.upfronthosting.co.za> Message-ID: <1541030001.41.0.788709270274.issue35129@psf.upfronthosting.co.za> ?ric Araujo added the comment: Please discuss on #14894 ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> distutils.LooseVersion fails to compare number and a word _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 19:54:52 2018 From: report at bugs.python.org (Pablo Santiago Blum de Aguiar) Date: Wed, 31 Oct 2018 23:54:52 +0000 Subject: [issue35128] warning.warn messages with spacing issues In-Reply-To: <1541022462.19.0.788709270274.issue35128@psf.upfronthosting.co.za> Message-ID: <1541030092.34.0.788709270274.issue35128@psf.upfronthosting.co.za> Change by Pablo Santiago Blum de Aguiar : ---------- pull_requests: +9581 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 20:11:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 01 Nov 2018 00:11:57 +0000 Subject: [issue26558] Disable PyGILState_Check() when Py_NewInterpreter() is called and add more checks on the GIL In-Reply-To: <1457961401.7.0.508641923687.issue26558@psf.upfronthosting.co.za> Message-ID: <1541031117.25.0.788709270274.issue26558@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset ff56597151206a03ce421712516323430b7749c8 by Victor Stinner in branch '3.6': bpo-26558: Fix Py_FatalError() with GIL released (GH-10267) (GH-10270) https://github.com/python/cpython/commit/ff56597151206a03ce421712516323430b7749c8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 20:51:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 01 Nov 2018 00:51:44 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541033504.72.0.788709270274.issue35081@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 50b48572d9a90c5bb36e2bef6179548ea927a35a by Victor Stinner in branch 'master': bpo-35081: Add _PyThreadState_GET() internal macro (GH-10266) https://github.com/python/cpython/commit/50b48572d9a90c5bb36e2bef6179548ea927a35a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 21:03:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 01 Nov 2018 01:03:55 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541034235.69.0.788709270274.issue35081@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9582 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 21:11:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 01 Nov 2018 01:11:22 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541034682.41.0.788709270274.issue35081@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9583 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 21:30:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 01 Nov 2018 01:30:41 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541035841.11.0.788709270274.issue35081@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e281f7d80ce2584a7e6a36acffb5a9cd796a0fe2 by Victor Stinner in branch 'master': bpo-35081: Move accu.h to Include/internal/pycore_accu.h (GH-10271) https://github.com/python/cpython/commit/e281f7d80ce2584a7e6a36acffb5a9cd796a0fe2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 21:31:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 01 Nov 2018 01:31:22 +0000 Subject: [issue35081] Rename Include/internals/ to Include/pycore/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541035882.25.0.788709270274.issue35081@psf.upfronthosting.co.za> STINNER Victor added the comment: Copy of my comment on PR 10271: https://github.com/python/cpython/pull/10271#issuecomment-434897408 I tried to enforce to require Py_BUILD_CORE in pycore_accu.h to be defined using: #ifndef Py_BUILD_CORE # error "Py_BUILD_CORE must be defined to include this header" #endif But the compilation of the _json module failed, because it isn't compiled with Py_BUILD_CORE. Moreover, _json.c contains: /* Core extension modules are built-in on some platforms (e.g. Windows). */ #ifdef Py_BUILD_CORE #define Py_BUILD_CORE_BUILTIN #undef Py_BUILD_CORE #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 21:32:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 01 Nov 2018 01:32:06 +0000 Subject: [issue35081] Move internal headers to Include/internal/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541035926.36.0.788709270274.issue35081@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: Rename Include/internals/ to Include/pycore/ -> Move internal headers to Include/internal/ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 21:42:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 01 Nov 2018 01:42:00 +0000 Subject: [issue35081] Move internal headers to Include/internal/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541036520.31.0.788709270274.issue35081@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9584 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 21:49:13 2018 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 01 Nov 2018 01:49:13 +0000 Subject: [issue32804] urllib.retrieve documentation doesn't mention context parameter In-Reply-To: <1518140001.56.0.467229070634.issue32804@psf.upfronthosting.co.za> Message-ID: <1541036953.23.0.788709270274.issue32804@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset aa39c1ab6de6d3fb0204741efdde9b7eed25b093 by Xiang Zhang (Lysandros Nikolaou) in branch '2.7': [2.7] bpo-32804: Include the context parameter in urlretrieve documentation (GH-10203) https://github.com/python/cpython/commit/aa39c1ab6de6d3fb0204741efdde9b7eed25b093 ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 21:49:45 2018 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 01 Nov 2018 01:49:45 +0000 Subject: [issue32804] urllib.retrieve documentation doesn't mention context parameter In-Reply-To: <1518140001.56.0.467229070634.issue32804@psf.upfronthosting.co.za> Message-ID: <1541036985.46.0.788709270274.issue32804@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 Oct 31 21:54:38 2018 From: report at bugs.python.org (orlnub123) Date: Thu, 01 Nov 2018 01:54:38 +0000 Subject: [issue35101] inspect.findsource breaks on class frame objects In-Reply-To: <1540786670.85.0.788709270274.issue35101@psf.upfronthosting.co.za> Message-ID: <1541037278.04.0.788709270274.issue35101@psf.upfronthosting.co.za> orlnub123 added the comment: Added the requested test cases. They aren't an exact match but they should serve the same purpose. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 22:06:58 2018 From: report at bugs.python.org (orlnub123) Date: Thu, 01 Nov 2018 02:06:58 +0000 Subject: [issue35105] Document that CPython accepts "invalid" identifiers In-Reply-To: <1540815891.13.0.788709270274.issue35105@psf.upfronthosting.co.za> Message-ID: <1541038018.41.0.788709270274.issue35105@psf.upfronthosting.co.za> orlnub123 added the comment: I'd argue that it's an implementation detail. Documenting it might be nice as some projects such as pytest do use it but I don't think it would make sense in setattr() or getattr() since all they do (at least in this case) is assign/retrieve from the __dict__. One thing to note is that __slots__ doesn't accept them. ---------- nosy: +orlnub123 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 22:16:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 01 Nov 2018 02:16:01 +0000 Subject: [issue35081] Move internal headers to Include/internal/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541038561.61.0.788709270274.issue35081@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a1c249c40517917d2e0971d55aea8d14a44b2cc8 by Victor Stinner in branch 'master': bpo-35081: And pycore_lifecycle.h and pycore_pathconfig.h (GH-10273) https://github.com/python/cpython/commit/a1c249c40517917d2e0971d55aea8d14a44b2cc8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 22:22:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 01 Nov 2018 02:22:34 +0000 Subject: [issue35081] Move internal headers to Include/internal/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541038954.63.0.788709270274.issue35081@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9585 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 22:23:54 2018 From: report at bugs.python.org (Windson Yang) Date: Thu, 01 Nov 2018 02:23:54 +0000 Subject: [issue35120] SSH tunnel support to ftp lib In-Reply-To: <1540964996.8.0.788709270274.issue35120@psf.upfronthosting.co.za> Message-ID: <1541039034.07.0.788709270274.issue35120@psf.upfronthosting.co.za> Windson Yang added the comment: Hello, Mohit Sharma. Would you mind adding more details about the bug? ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 22:25:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 01 Nov 2018 02:25:24 +0000 Subject: [issue35081] Move internal headers to Include/internal/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541039124.71.0.788709270274.issue35081@psf.upfronthosting.co.za> STINNER Victor added the comment: > bpo-35081: And pycore_lifecycle.h and pycore_pathconfig.h (GH-10273) I tried to add the Py_BUILD_CORE guard in pycore_pathconfig.h: +#ifndef Py_BUILD_CORE +# error "Py_BUILD_CORE must be defined to include this header" +#endif But it breaks the compilation of _testcapimodule.c: get_coreconfig() uses _Py_wstrlist_as_pylist(), and _Py_wstrlist_as_pylist() is defined in pycore_pathconfig.h. IMHO _testcapi should be compiled with Py_BUILD_CORE defined. I wrote PR 10274 but then _testcapi fails because of datetime.h: this bug should be fixed by PR 10238. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 22:38:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 01 Nov 2018 02:38:41 +0000 Subject: [issue35081] Move internal headers to Include/internal/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541039921.95.0.788709270274.issue35081@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9586 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 22:42:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 01 Nov 2018 02:42:41 +0000 Subject: [issue35105] Document that CPython accepts "invalid" identifiers In-Reply-To: <1540815891.13.0.788709270274.issue35105@psf.upfronthosting.co.za> Message-ID: <1541040161.62.0.788709270274.issue35105@psf.upfronthosting.co.za> STINNER Victor added the comment: > I'd argue that it's an implementation detail. Documenting it might be nice as some projects such as pytest do use it but I don't think it would make sense in setattr() or getattr() since all they do (at least in this case) is assign/retrieve from the __dict__. One thing to note is that __slots__ doesn't accept them. Maybe it's obvious to you, but the question is asked again and again, at least once per year. So it seems like we need to document it somewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 22:45:14 2018 From: report at bugs.python.org (Windson Yang) Date: Thu, 01 Nov 2018 02:45:14 +0000 Subject: [issue35105] Document that CPython accepts "invalid" identifiers In-Reply-To: <1540815891.13.0.788709270274.issue35105@psf.upfronthosting.co.za> Message-ID: <1541040314.68.0.788709270274.issue35105@psf.upfronthosting.co.za> Windson Yang added the comment: I agreed we should document it, it' not obvious to me at least. ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 22:52:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 01 Nov 2018 02:52:33 +0000 Subject: [issue35081] Move internal headers to Include/internal/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541040753.13.0.788709270274.issue35081@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9587 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 23:06:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 01 Nov 2018 03:06:47 +0000 Subject: [issue35081] Move internal headers to Include/internal/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1541041607.88.0.788709270274.issue35081@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9588 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 23:18:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 01 Nov 2018 03:18:50 +0000 Subject: [issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions In-Reply-To: <1540391516.33.0.788709270274.issue35059@psf.upfronthosting.co.za> Message-ID: <1541042330.23.0.788709270274.issue35059@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +9589 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 31 23:19:54 2018 From: report at bugs.python.org (orlnub123) Date: Thu, 01 Nov 2018 03:19:54 +0000 Subject: [issue35105] Document that CPython accepts "invalid" identifiers In-Reply-To: <1540815891.13.0.788709270274.issue35105@psf.upfronthosting.co.za> Message-ID: <1541042394.03.0.788709270274.issue35105@psf.upfronthosting.co.za> orlnub123 added the comment: The customizing attribute access section of the data model might be a suitable place. ---------- _______________________________________ Python tracker _______________________________________